Skip to content

Commit 0cdcd9c

Browse files
feat(api): manual updates
1 parent 4a2fd27 commit 0cdcd9c

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

49 files changed

+2005
-519
lines changed

.github/workflows/publish-pypi.yml

Lines changed: 0 additions & 31 deletions
This file was deleted.

.github/workflows/release-doctor.yml

Lines changed: 0 additions & 21 deletions
This file was deleted.

.release-please-manifest.json

Lines changed: 0 additions & 3 deletions
This file was deleted.

.stats.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
configured_endpoints: 17
1+
configured_endpoints: 24
22
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/lemma%2Flemma-7d37defa0f907862d7d3c807dd33259df967ddaa70601f91d4d771c9c02e4dec.yml
33
openapi_spec_hash: 357f9bb257a1f73b57bd4bd5f3018000
4-
config_hash: c26eaf8479479c9a80fe7012f50bd948
4+
config_hash: 72bba444e708e30816320b8c89ed4a97

CONTRIBUTING.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ If you’d like to use the repository from source, you can either install from g
6262
To install via git:
6363

6464
```sh
65-
$ pip install git+ssh://git@github.com/uselemma/sdk-python.git
65+
$ pip install git+ssh://git@github.com/stainless-sdks/lemma-python.git
6666
```
6767

6868
Alternatively, you can build from source and install the wheel file:
@@ -120,7 +120,7 @@ the changes aren't made through the automated pipeline, you may want to make rel
120120

121121
### Publish with a GitHub workflow
122122

123-
You can release to package managers by using [the `Publish PyPI` GitHub action](https://www.github.com/uselemma/sdk-python/actions/workflows/publish-pypi.yml). This requires a setup organization or repository secret to be set up.
123+
You can release to package managers by using [the `Publish PyPI` GitHub action](https://www.github.com/stainless-sdks/lemma-python/actions/workflows/publish-pypi.yml). This requires a setup organization or repository secret to be set up.
124124

125125
### Publish manually
126126

README.md

Lines changed: 16 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -16,8 +16,8 @@ The full API of this library can be found in [api.md](api.md).
1616
## Installation
1717

1818
```sh
19-
# install from the production repo
20-
pip install git+ssh://git@github.com/uselemma/sdk-python.git
19+
# install from this staging repo
20+
pip install git+ssh://git@github.com/stainless-sdks/lemma-python.git
2121
```
2222

2323
> [!NOTE]
@@ -28,9 +28,12 @@ pip install git+ssh://git@github.com/uselemma/sdk-python.git
2828
The full API of this library can be found in [api.md](api.md).
2929

3030
```python
31+
import os
3132
from lemma import Lemma
3233

33-
client = Lemma()
34+
client = Lemma(
35+
api_key=os.environ.get("LEMMA_API_KEY"), # This is the default and can be omitted
36+
)
3437

3538
dataset = client.datasets.create(
3639
name="name",
@@ -48,10 +51,13 @@ so that your API Key is not stored in source control.
4851
Simply import `AsyncLemma` instead of `Lemma` and use `await` with each API call:
4952

5053
```python
54+
import os
5155
import asyncio
5256
from lemma import AsyncLemma
5357

54-
client = AsyncLemma()
58+
client = AsyncLemma(
59+
api_key=os.environ.get("LEMMA_API_KEY"), # This is the default and can be omitted
60+
)
5561

5662

5763
async def main() -> None:
@@ -73,8 +79,8 @@ By default, the async client uses `httpx` for HTTP requests. However, for improv
7379
You can enable this by installing `aiohttp`:
7480

7581
```sh
76-
# install from the production repo
77-
pip install 'lemma[aiohttp] @ git+ssh://git@github.com/uselemma/sdk-python.git'
82+
# install from this staging repo
83+
pip install 'lemma[aiohttp] @ git+ssh://git@github.com/stainless-sdks/lemma-python.git'
7884
```
7985

8086
Then you can enable it by instantiating the client with `http_client=DefaultAioHttpClient()`:
@@ -87,6 +93,7 @@ from lemma import AsyncLemma
8793

8894
async def main() -> None:
8995
async with AsyncLemma(
96+
api_key="My API Key",
9097
http_client=DefaultAioHttpClient(),
9198
) as client:
9299
dataset = await client.datasets.create(
@@ -262,9 +269,9 @@ dataset = response.parse() # get the object that `datasets.create()` would have
262269
print(dataset.id)
263270
```
264271

265-
These methods return an [`APIResponse`](https://github.com/uselemma/sdk-python/tree/main/src/lemma/_response.py) object.
272+
These methods return an [`APIResponse`](https://github.com/stainless-sdks/lemma-python/tree/main/src/lemma/_response.py) object.
266273

267-
The async client returns an [`AsyncAPIResponse`](https://github.com/uselemma/sdk-python/tree/main/src/lemma/_response.py) with the same structure, the only difference being `await`able methods for reading the response content.
274+
The async client returns an [`AsyncAPIResponse`](https://github.com/stainless-sdks/lemma-python/tree/main/src/lemma/_response.py) with the same structure, the only difference being `await`able methods for reading the response content.
268275

269276
#### `.with_streaming_response`
270277

@@ -370,7 +377,7 @@ This package generally follows [SemVer](https://semver.org/spec/v2.0.0.html) con
370377

371378
We take backwards-compatibility seriously and work hard to ensure you can rely on a smooth upgrade experience.
372379

373-
We are keen for your feedback; please open an [issue](https://www.github.com/uselemma/sdk-python/issues) with questions, bugs, or suggestions.
380+
We are keen for your feedback; please open an [issue](https://www.github.com/stainless-sdks/lemma-python/issues) with questions, bugs, or suggestions.
374381

375382
### Determining the installed version
376383

api.md

Lines changed: 49 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ Types:
55
```python
66
from lemma.types import (
77
Dataset,
8+
DatasetListResponse,
89
DatasetDeleteResponse,
910
DatasetCreateDownloadURLResponse,
1011
DatasetGenerateDatasetResponse,
@@ -15,25 +16,40 @@ from lemma.types import (
1516

1617
Methods:
1718

18-
- <code title="post /datasets">client.datasets.<a href="./src/lemma/resources/datasets.py">create</a>(\*\*<a href="src/lemma/types/dataset_create_params.py">params</a>) -> <a href="./src/lemma/types/dataset.py">Dataset</a></code>
19-
- <code title="get /datasets/{dataset_id}">client.datasets.<a href="./src/lemma/resources/datasets.py">retrieve</a>(dataset_id) -> <a href="./src/lemma/types/dataset.py">Dataset</a></code>
20-
- <code title="delete /datasets/{dataset_id}">client.datasets.<a href="./src/lemma/resources/datasets.py">delete</a>(dataset_id) -> <a href="./src/lemma/types/dataset_delete_response.py">DatasetDeleteResponse</a></code>
21-
- <code title="get /datasets/{dataset_id}/create-download-url">client.datasets.<a href="./src/lemma/resources/datasets.py">create_download_url</a>(dataset_id) -> str</code>
22-
- <code title="post /datasets/generate-dataset">client.datasets.<a href="./src/lemma/resources/datasets.py">generate_dataset</a>(\*\*<a href="src/lemma/types/dataset_generate_dataset_params.py">params</a>) -> <a href="./src/lemma/types/dataset_generate_dataset_response.py">DatasetGenerateDatasetResponse</a></code>
23-
- <code title="post /datasets/generate-schema">client.datasets.<a href="./src/lemma/resources/datasets.py">generate_schema</a>(\*\*<a href="src/lemma/types/dataset_generate_schema_params.py">params</a>) -> <a href="./src/lemma/types/dataset_generate_schema_response.py">DatasetGenerateSchemaResponse</a></code>
24-
- <code title="post /datasets/generate-validators">client.datasets.<a href="./src/lemma/resources/datasets.py">generate_validators</a>(\*\*<a href="src/lemma/types/dataset_generate_validators_params.py">params</a>) -> <a href="./src/lemma/types/dataset_generate_validators_response.py">DatasetGenerateValidatorsResponse</a></code>
19+
- <code title="post /datasets">client.datasets.<a href="./src/lemma/resources/datasets/datasets.py">create</a>(\*\*<a href="src/lemma/types/dataset_create_params.py">params</a>) -> <a href="./src/lemma/types/dataset.py">Dataset</a></code>
20+
- <code title="get /datasets/{dataset_id}">client.datasets.<a href="./src/lemma/resources/datasets/datasets.py">retrieve</a>(dataset_id) -> <a href="./src/lemma/types/dataset.py">Dataset</a></code>
21+
- <code title="get /datasets/">client.datasets.<a href="./src/lemma/resources/datasets/datasets.py">list</a>() -> <a href="./src/lemma/types/dataset_list_response.py">DatasetListResponse</a></code>
22+
- <code title="delete /datasets/{dataset_id}">client.datasets.<a href="./src/lemma/resources/datasets/datasets.py">delete</a>(dataset_id) -> <a href="./src/lemma/types/dataset_delete_response.py">DatasetDeleteResponse</a></code>
23+
- <code title="get /datasets/{dataset_id}/create-download-url">client.datasets.<a href="./src/lemma/resources/datasets/datasets.py">create_download_url</a>(dataset_id) -> str</code>
24+
- <code title="post /datasets/generate-dataset">client.datasets.<a href="./src/lemma/resources/datasets/datasets.py">generate_dataset</a>(\*\*<a href="src/lemma/types/dataset_generate_dataset_params.py">params</a>) -> <a href="./src/lemma/types/dataset_generate_dataset_response.py">DatasetGenerateDatasetResponse</a></code>
25+
- <code title="post /datasets/generate-schema">client.datasets.<a href="./src/lemma/resources/datasets/datasets.py">generate_schema</a>(\*\*<a href="src/lemma/types/dataset_generate_schema_params.py">params</a>) -> <a href="./src/lemma/types/dataset_generate_schema_response.py">DatasetGenerateSchemaResponse</a></code>
26+
- <code title="post /datasets/generate-validators">client.datasets.<a href="./src/lemma/resources/datasets/datasets.py">generate_validators</a>(\*\*<a href="src/lemma/types/dataset_generate_validators_params.py">params</a>) -> <a href="./src/lemma/types/dataset_generate_validators_response.py">DatasetGenerateValidatorsResponse</a></code>
27+
28+
## Generations
29+
30+
Types:
31+
32+
```python
33+
from lemma.types.datasets import DatasetGeneration, GenerationListResponse
34+
```
35+
36+
Methods:
37+
38+
- <code title="get /datasets/generations/{generation_id}">client.datasets.generations.<a href="./src/lemma/resources/datasets/generations.py">retrieve</a>(generation_id) -> <a href="./src/lemma/types/datasets/dataset_generation.py">DatasetGeneration</a></code>
39+
- <code title="get /datasets/generations">client.datasets.generations.<a href="./src/lemma/resources/datasets/generations.py">list</a>(\*\*<a href="src/lemma/types/datasets/generation_list_params.py">params</a>) -> <a href="./src/lemma/types/datasets/generation_list_response.py">GenerationListResponse</a></code>
2540

2641
# Logs
2742

2843
Types:
2944

3045
```python
31-
from lemma.types import Log, LogListResponse
46+
from lemma.types import Log, LogRetrieveResponse, LogListResponse
3247
```
3348

3449
Methods:
3550

3651
- <code title="post /logs/">client.logs.<a href="./src/lemma/resources/logs.py">create</a>(\*\*<a href="src/lemma/types/log_create_params.py">params</a>) -> <a href="./src/lemma/types/log.py">Log</a></code>
52+
- <code title="get /logs/{log_id}">client.logs.<a href="./src/lemma/resources/logs.py">retrieve</a>(log_id) -> <a href="./src/lemma/types/log_retrieve_response.py">LogRetrieveResponse</a></code>
3753
- <code title="get /logs/">client.logs.<a href="./src/lemma/resources/logs.py">list</a>(\*\*<a href="src/lemma/types/log_list_params.py">params</a>) -> <a href="./src/lemma/types/log_list_response.py">LogListResponse</a></code>
3854

3955
# Playground
@@ -47,21 +63,41 @@ Methods:
4763
Types:
4864

4965
```python
50-
from lemma.types import PromptCreateResponse, PromptDeleteResponse, PromptCreateIterationResponse
66+
from lemma.types import Prompt, PromptListResponse, PromptDeleteResponse
67+
```
68+
69+
Methods:
70+
71+
- <code title="post /prompts">client.prompts.<a href="./src/lemma/resources/prompts/prompts.py">create</a>(\*\*<a href="src/lemma/types/prompt_create_params.py">params</a>) -> <a href="./src/lemma/types/prompt.py">Prompt</a></code>
72+
- <code title="get /prompts/{prompt_id}">client.prompts.<a href="./src/lemma/resources/prompts/prompts.py">retrieve</a>(prompt_id) -> <a href="./src/lemma/types/prompt.py">Prompt</a></code>
73+
- <code title="get /prompts">client.prompts.<a href="./src/lemma/resources/prompts/prompts.py">list</a>() -> <a href="./src/lemma/types/prompt_list_response.py">PromptListResponse</a></code>
74+
- <code title="delete /prompts/{prompt_id}">client.prompts.<a href="./src/lemma/resources/prompts/prompts.py">delete</a>(prompt_id) -> <a href="./src/lemma/types/prompt_delete_response.py">PromptDeleteResponse</a></code>
75+
76+
## Iterations
77+
78+
Types:
79+
80+
```python
81+
from lemma.types.prompts import PromptIteration, IterationListResponse
5182
```
5283

5384
Methods:
5485

55-
- <code title="post /prompts">client.prompts.<a href="./src/lemma/resources/prompts.py">create</a>(\*\*<a href="src/lemma/types/prompt_create_params.py">params</a>) -> <a href="./src/lemma/types/prompt_create_response.py">PromptCreateResponse</a></code>
56-
- <code title="delete /prompts/{prompt_id}">client.prompts.<a href="./src/lemma/resources/prompts.py">delete</a>(prompt_id) -> <a href="./src/lemma/types/prompt_delete_response.py">PromptDeleteResponse</a></code>
57-
- <code title="post /prompts/{prompt_id}/iterations">client.prompts.<a href="./src/lemma/resources/prompts.py">create_iteration</a>(prompt_id, \*\*<a href="src/lemma/types/prompt_create_iteration_params.py">params</a>) -> <a href="./src/lemma/types/prompt_create_iteration_response.py">PromptCreateIterationResponse</a></code>
86+
- <code title="post /prompts/{prompt_id}/iterations">client.prompts.iterations.<a href="./src/lemma/resources/prompts/iterations.py">create</a>(prompt_id, \*\*<a href="src/lemma/types/prompts/iteration_create_params.py">params</a>) -> <a href="./src/lemma/types/prompts/prompt_iteration.py">PromptIteration</a></code>
87+
- <code title="get /prompts/{prompt_id}/iterations">client.prompts.iterations.<a href="./src/lemma/resources/prompts/iterations.py">list</a>(prompt_id) -> <a href="./src/lemma/types/prompts/iteration_list_response.py">IterationListResponse</a></code>
5888

5989
# Evaluators
6090

6191
Types:
6292

6393
```python
64-
from lemma.types import Evaluator, EvaluatorListResponse, EvaluatorCreateRubricResponse
94+
from lemma.types import (
95+
Evaluator,
96+
RubricCriterion,
97+
RubricExample,
98+
EvaluatorListResponse,
99+
EvaluatorCreateRubricResponse,
100+
)
65101
```
66102

67103
Methods:

bin/check-release-environment

Lines changed: 0 additions & 21 deletions
This file was deleted.

pyproject.toml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -35,8 +35,8 @@ classifiers = [
3535
]
3636

3737
[project.urls]
38-
Homepage = "https://github.com/uselemma/sdk-python"
39-
Repository = "https://github.com/uselemma/sdk-python"
38+
Homepage = "https://github.com/stainless-sdks/lemma-python"
39+
Repository = "https://github.com/stainless-sdks/lemma-python"
4040

4141
[project.optional-dependencies]
4242
aiohttp = ["aiohttp", "httpx_aiohttp>=0.1.8"]
@@ -124,7 +124,7 @@ path = "README.md"
124124
[[tool.hatch.metadata.hooks.fancy-pypi-readme.substitutions]]
125125
# replace relative links with absolute links
126126
pattern = '\[(.+?)\]\(((?!https?://)\S+?)\)'
127-
replacement = '[\1](https://github.com/uselemma/sdk-python/tree/main/\g<2>)'
127+
replacement = '[\1](https://github.com/stainless-sdks/lemma-python/tree/main/\g<2>)'
128128

129129
[tool.pytest.ini_options]
130130
testpaths = ["tests"]

release-please-config.json

Lines changed: 0 additions & 66 deletions
This file was deleted.

0 commit comments

Comments
 (0)