Skip to content

Commit 76e0208

Browse files
Merge pull request #17 from maisaai/release-please--branches--main--changes--next
release: 0.1.0-alpha.4
2 parents 536c74e + 9de2aa0 commit 76e0208

42 files changed

Lines changed: 980 additions & 163 deletions

Some content is hidden

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

‎.github/workflows/ci.yml‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ jobs:
1414

1515

1616
steps:
17-
- uses: actions/checkout@v3
17+
- uses: actions/checkout@v4
1818

1919
- name: Install Rye
2020
run: |

‎.github/workflows/publish-pypi.yml‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# This workflow is triggered when a GitHub release is created.
22
# It can also be run manually to re-publish to PyPI in case it failed for some reason.
3-
# You can run this workflow by navigating to https://www.github.com/clibrain/python-sdk/actions/workflows/publish-pypi.yml
3+
# You can run this workflow by navigating to https://www.github.com/maisaai/python-sdk/actions/workflows/publish-pypi.yml
44
name: Publish PyPI
55
on:
66
workflow_dispatch:

‎.github/workflows/release-doctor.yml‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ jobs:
77
release_doctor:
88
name: release doctor
99
runs-on: ubuntu-latest
10-
if: github.repository == 'clibrain/python-sdk' && (github.event_name == 'push' || github.event_name == 'workflow_dispatch' || startsWith(github.head_ref, 'release-please') || github.head_ref == 'next')
10+
if: github.repository == 'maisaai/python-sdk' && (github.event_name == 'push' || github.event_name == 'workflow_dispatch' || startsWith(github.head_ref, 'release-please') || github.head_ref == 'next')
1111

1212
steps:
1313
- uses: actions/checkout@v3

‎.release-please-manifest.json‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
{
2-
".": "0.1.0-alpha.3"
2+
".": "0.1.0-alpha.4"
33
}

‎.stats.yml‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
configured_endpoints: 14
1+
configured_endpoints: 15

‎CHANGELOG.md‎

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,13 @@
11
# Changelog
22

3+
## 0.1.0-alpha.4 (2024-03-05)
4+
5+
Full Changelog: [v0.1.0-alpha.3...v0.1.0-alpha.4](https://github.com/maisaai/python-sdk/compare/v0.1.0-alpha.3...v0.1.0-alpha.4)
6+
7+
### Features
8+
9+
* update via SDK Studio ([#16](https://github.com/maisaai/python-sdk/issues/16)) ([c67fc05](https://github.com/maisaai/python-sdk/commit/c67fc05ae116d31bb6113c12b26c4192d1d669ee))
10+
311
## 0.1.0-alpha.3 (2024-02-20)
412

513
Full Changelog: [v0.1.0-alpha.2...v0.1.0-alpha.3](https://github.com/clibrain/python-sdk/compare/v0.1.0-alpha.2...v0.1.0-alpha.3)

‎CONTRIBUTING.md‎

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

6161
```bash
62-
pip install git+ssh://git@github.com:clibrain/python-sdk.git
62+
pip install git+ssh://git@github.com/maisaai/python-sdk.git
6363
```
6464

6565
Alternatively, you can build from source and install the wheel file:
@@ -82,7 +82,7 @@ pip install ./path-to-wheel-file.whl
8282

8383
## Running tests
8484

85-
Most tests will require you to [setup a mock server](https://github.com/stoplightio/prism) against the OpenAPI spec to run the tests.
85+
Most tests require you to [set up a mock server](https://github.com/stoplightio/prism) against the OpenAPI spec to run the tests.
8686

8787
```bash
8888
# you will need npm installed
@@ -117,7 +117,7 @@ the changes aren't made through the automated pipeline, you may want to make rel
117117

118118
### Publish with a GitHub workflow
119119

120-
You can release to package managers by using [the `Publish PyPI` GitHub action](https://www.github.com/clibrain/python-sdk/actions/workflows/publish-pypi.yml). This will require a setup organization or repository secret to be set up.
120+
You can release to package managers by using [the `Publish PyPI` GitHub action](https://www.github.com/maisaai/python-sdk/actions/workflows/publish-pypi.yml). This requires a setup organization or repository secret to be set up.
121121

122122
### Publish manually
123123

‎README.md‎

Lines changed: 24 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -8,11 +8,12 @@ and offers both synchronous and asynchronous clients powered by [httpx](https://
88

99
## Documentation
1010

11-
The REST API documentation can be found [on maisa.ai](https://maisa.ai/). The full API of this library can be found in [api.md](api.md).
11+
The REST API documentation can be found [on docs.maisa.ai](https://docs.maisa.ai/). The full API of this library can be found in [api.md](api.md).
1212

1313
## Installation
1414

1515
```sh
16+
# install from PyPI
1617
pip install --pre maisa
1718
```
1819

@@ -29,10 +30,10 @@ client = Maisa(
2930
api_key=os.environ.get("MAISA_API_KEY"),
3031
)
3132

32-
embeddings = client.models.embeddings.create(
33-
texts=["string"],
33+
text_summary = client.capabilities.summarize(
34+
text="Example long text...",
3435
)
35-
print(embeddings.embeddings)
36+
print(text_summary.summary)
3637
```
3738

3839
While you can provide an `api_key` keyword argument,
@@ -56,10 +57,10 @@ client = AsyncMaisa(
5657

5758

5859
async def main() -> None:
59-
embeddings = await client.models.embeddings.create(
60-
texts=["string"],
60+
text_summary = await client.capabilities.summarize(
61+
text="Example long text...",
6162
)
62-
print(embeddings.embeddings)
63+
print(text_summary.summary)
6364

6465

6566
asyncio.run(main())
@@ -92,8 +93,8 @@ from maisa import Maisa
9293
client = Maisa()
9394

9495
try:
95-
client.models.embeddings.create(
96-
texts=["string"],
96+
client.capabilities.summarize(
97+
text="Example long text...",
9798
)
9899
except maisa.APIConnectionError as e:
99100
print("The server could not be reached")
@@ -121,7 +122,7 @@ Error codes are as followed:
121122

122123
### Retries
123124

124-
Certain errors are automatically retried 3 times by default, with a short exponential backoff.
125+
Certain errors are automatically retried 2 times by default, with a short exponential backoff.
125126
Connection errors (for example, due to a network connectivity problem), 408 Request Timeout, 409 Conflict,
126127
429 Rate Limit, and >=500 Internal errors are all retried by default.
127128

@@ -137,8 +138,8 @@ client = Maisa(
137138
)
138139

139140
# Or, configure per-request:
140-
client.with_options(max_retries=5).models.embeddings.create(
141-
texts=["string"],
141+
client.with_options(max_retries=5).capabilities.summarize(
142+
text="Example long text...",
142143
)
143144
```
144145

@@ -162,8 +163,8 @@ client = Maisa(
162163
)
163164

164165
# Override per-request:
165-
client.with_options(timeout=5 * 1000).models.embeddings.create(
166-
texts=["string"],
166+
client.with_options(timeout=5 * 1000).capabilities.summarize(
167+
text="Example long text...",
167168
)
168169
```
169170

@@ -203,18 +204,18 @@ The "raw" Response object can be accessed by prefixing `.with_raw_response.` to
203204
from maisa import Maisa
204205

205206
client = Maisa()
206-
response = client.models.embeddings.with_raw_response.create(
207-
texts=["string"],
207+
response = client.capabilities.with_raw_response.summarize(
208+
text="Example long text...",
208209
)
209210
print(response.headers.get('X-My-Header'))
210211

211-
embedding = response.parse() # get the object that `models.embeddings.create()` would have returned
212-
print(embedding.embeddings)
212+
capability = response.parse() # get the object that `capabilities.summarize()` would have returned
213+
print(capability.summary)
213214
```
214215

215-
These methods return an [`APIResponse`](https://github.com/clibrain/python-sdk/tree/main/src/maisa/_response.py) object.
216+
These methods return an [`APIResponse`](https://github.com/maisaai/python-sdk/tree/main/src/maisa/_response.py) object.
216217

217-
The async client returns an [`AsyncAPIResponse`](https://github.com/clibrain/python-sdk/tree/main/src/maisa/_response.py) with the same structure, the only difference being `await`able methods for reading the response content.
218+
The async client returns an [`AsyncAPIResponse`](https://github.com/maisaai/python-sdk/tree/main/src/maisa/_response.py) with the same structure, the only difference being `await`able methods for reading the response content.
218219

219220
#### `.with_streaming_response`
220221

@@ -223,8 +224,8 @@ The above interface eagerly reads the full response body when you make the reque
223224
To stream the response body, use `.with_streaming_response` instead, which requires a context manager and only reads the response body once you call `.read()`, `.text()`, `.json()`, `.iter_bytes()`, `.iter_text()`, `.iter_lines()` or `.parse()`. In the async client, these are async methods.
224225

225226
```python
226-
with client.models.embeddings.with_streaming_response.create(
227-
texts=["string"],
227+
with client.capabilities.with_streaming_response.summarize(
228+
text="Example long text...",
228229
) as response:
229230
print(response.headers.get("X-My-Header"))
230231

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

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

273-
We are keen for your feedback; please open an [issue](https://www.github.com/clibrain/python-sdk/issues) with questions, bugs, or suggestions.
274+
We are keen for your feedback; please open an [issue](https://www.github.com/maisaai/python-sdk/issues) with questions, bugs, or suggestions.
274275

275276
## Requirements
276277

‎api.md‎

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,18 @@ Methods:
4646

4747
- <code title="post /v1/models/rerank">client.models.rerank.<a href="./src/maisa/resources/models/rerank.py">create</a>(\*\*<a href="src/maisa/types/models/rerank_create_params.py">params</a>) -> <a href="./src/maisa/types/models/rerank.py">Rerank</a></code>
4848

49+
# Kpu
50+
51+
Types:
52+
53+
```python
54+
from maisa.types import KpuRunResponse
55+
```
56+
57+
Methods:
58+
59+
- <code title="post /v1/kpu/run">client.kpu.<a href="./src/maisa/resources/kpu.py">run</a>(\*\*<a href="src/maisa/types/kpu_run_params.py">params</a>) -> <a href="./src/maisa/types/kpu_run_response.py">KpuRunResponse</a></code>
60+
4961
# FileInterpreter
5062

5163
## FromPdf

‎pyproject.toml‎

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[project]
22
name = "maisa"
3-
version = "0.1.0-alpha.3"
3+
version = "0.1.0-alpha.4"
44
description = "The official Python library for the Maisa API"
55
readme = "README.md"
66
license = "Apache-2.0"
@@ -39,8 +39,8 @@ classifiers = [
3939

4040

4141
[project.urls]
42-
Homepage = "https://github.com/clibrain/python-sdk"
43-
Repository = "https://github.com/clibrain/python-sdk"
42+
Homepage = "https://github.com/maisaai/python-sdk"
43+
Repository = "https://github.com/maisaai/python-sdk"
4444

4545

4646

0 commit comments

Comments
 (0)