Skip to content

Commit 386c341

Browse files
committed
ci: regenerated with OpenAPI Doc , Speakeasy CLI 1.488.0
1 parent d2ffe71 commit 386c341

File tree

1,557 files changed

+23612
-34874
lines changed

Some content is hidden

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

1,557 files changed

+23612
-34874
lines changed

.speakeasy/gen.lock

Lines changed: 692 additions & 968 deletions
Large diffs are not rendered by default.

.speakeasy/gen.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@ python:
2222
clientServerStatusCodesAsErrors: true
2323
defaultErrorName: APIError
2424
description: Python Client SDK for the Orq API.
25+
enableCustomCodeRegions: false
2526
enumFormat: union
2627
envVarPrefix: ORQ
2728
fixFlags:

.speakeasy/workflow.lock

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -10,11 +10,11 @@ sources:
1010
- "2.0"
1111
orq-ai-sdk-python:
1212
sourceNamespace: orq-ai-sdk-python
13-
sourceRevisionDigest: sha256:86ad53e82be1a4f66ecf0287b8012c0987d1f12b148bb2315742ea6a3cad2e9d
14-
sourceBlobDigest: sha256:94b09accae719a572dfb76f78d438c093dd0815568b5b4b8658914e16f7c5f68
13+
sourceRevisionDigest: sha256:8258930a2ac929ef10f9cc835c67b900c9bc21d49597d5b54686e4ead108e06b
14+
sourceBlobDigest: sha256:a47c00cd79a27a4e20b6e0d01fd9b5f2c0946d6b7e4375e548c60d2a189be33a
1515
tags:
1616
- latest
17-
- speakeasy-sdk-regen-1736964206
17+
- speakeasy-sdk-regen-1739292301
1818
- "2.0"
1919
targets:
2020
orq-ai-sdk-prerelease-python:
@@ -27,10 +27,10 @@ targets:
2727
orq-ai-sdk-python:
2828
source: orq-ai-sdk-python
2929
sourceNamespace: orq-ai-sdk-python
30-
sourceRevisionDigest: sha256:86ad53e82be1a4f66ecf0287b8012c0987d1f12b148bb2315742ea6a3cad2e9d
31-
sourceBlobDigest: sha256:94b09accae719a572dfb76f78d438c093dd0815568b5b4b8658914e16f7c5f68
30+
sourceRevisionDigest: sha256:8258930a2ac929ef10f9cc835c67b900c9bc21d49597d5b54686e4ead108e06b
31+
sourceBlobDigest: sha256:a47c00cd79a27a4e20b6e0d01fd9b5f2c0946d6b7e4375e548c60d2a189be33a
3232
codeSamplesNamespace: orq-ai-sdk-python-code-samples
33-
codeSamplesRevisionDigest: sha256:b5a391dfcca2d512734451f100c18125e5fc4cde80a058187d4a07267d38e672
33+
codeSamplesRevisionDigest: sha256:932545731188eef2868d50ac85a5cfa6084409406855cd3542e11164d1b4ef06
3434
workflow:
3535
workflowVersion: 1.0.0
3636
speakeasyVersion: latest

README.md

Lines changed: 82 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ Developer-friendly & type-safe Python SDK specifically catered to leverage *orq-
1212
<!-- Start Summary [summary] -->
1313
## Summary
1414

15-
[Dev] orq.ai API: The Orquesta API
15+
[Dev] orq.ai API: orq.ai API documentation
1616

1717
For more information about the API: [orq.ai Documentation](https://docs.orq.ai)
1818
<!-- End Summary [summary] -->
@@ -32,6 +32,7 @@ For more information about the API: [orq.ai Documentation](https://docs.orq.ai)
3232
* [Error Handling](#error-handling)
3333
* [Server Selection](#server-selection)
3434
* [Custom HTTP Client](#custom-http-client)
35+
* [Resource Management](#resource-management)
3536
* [Debugging](#debugging)
3637
* [Development](#development)
3738
* [Maturity](#maturity)
@@ -42,6 +43,11 @@ For more information about the API: [orq.ai Documentation](https://docs.orq.ai)
4243
<!-- Start SDK Installation [installation] -->
4344
## SDK Installation
4445

46+
> [!NOTE]
47+
> **Python version upgrade policy**
48+
>
49+
> Once a Python version reaches its [official end of life date](https://devguide.python.org/versions/), a 3-month grace period is provided for users to upgrade. Following this grace period, the minimum python version supported in the SDK will be updated.
50+
4551
The SDK can be installed with either *pip* or *poetry* package managers.
4652

4753
### PIP
@@ -59,6 +65,37 @@ pip install orq-ai-sdk
5965
```bash
6066
poetry add orq-ai-sdk
6167
```
68+
69+
### Shell and script usage with `uv`
70+
71+
You can use this SDK in a Python shell with [uv](https://docs.astral.sh/uv/) and the `uvx` command that comes with it like so:
72+
73+
```shell
74+
uvx --from orq-ai-sdk python
75+
```
76+
77+
It's also possible to write a standalone Python script without needing to set up a whole project like so:
78+
79+
```python
80+
#!/usr/bin/env -S uv run --script
81+
# /// script
82+
# requires-python = ">=3.9"
83+
# dependencies = [
84+
# "orq-ai-sdk",
85+
# ]
86+
# ///
87+
88+
from orq_ai_sdk import Orq
89+
90+
sdk = Orq(
91+
# SDK arguments
92+
)
93+
94+
# Rest of script here...
95+
```
96+
97+
Once that is saved to a file, you can run it with `uv run script.py` where
98+
`script.py` can be replaced with the actual file name.
6299
<!-- End SDK Installation [installation] -->
63100

64101
<!-- Start IDE Support [idesupport] -->
@@ -160,9 +197,10 @@ with Orq(
160197

161198
### [deployments](docs/sdks/deploymentssdk/README.md)
162199

163-
* [all](docs/sdks/deploymentssdk/README.md#all) - List all deployments
200+
* [list](docs/sdks/deploymentssdk/README.md#list) - List all deployments
164201
* [get_config](docs/sdks/deploymentssdk/README.md#get_config) - Get config
165202
* [invoke](docs/sdks/deploymentssdk/README.md#invoke) - Invoke
203+
* [stream](docs/sdks/deploymentssdk/README.md#stream) - Stream
166204

167205
#### [deployments.metrics](docs/sdks/metrics/README.md)
168206

@@ -177,31 +215,27 @@ with Orq(
177215
* [upload](docs/sdks/files/README.md#upload) - Upload file
178216
* [list](docs/sdks/files/README.md#list) - List all files
179217
* [get](docs/sdks/files/README.md#get) - Get file by ID
180-
* [update](docs/sdks/files/README.md#update) - Update file name
181218
* [delete](docs/sdks/files/README.md#delete) - Delete file
182-
* [bulk_upload](docs/sdks/files/README.md#bulk_upload) - Bulk upload file
183-
184-
185-
### [prompt](docs/sdks/prompt/README.md)
186-
187219

188-
#### [prompt.snippets](docs/sdks/snippets/README.md)
189220

190-
* [find_one](docs/sdks/snippets/README.md#find_one) - Get one prompt snippet
221+
### [prompt_snippets](docs/sdks/promptsnippets/README.md)
191222

192-
#### [prompt.templates](docs/sdks/templates/README.md)
193-
194-
* [get_all](docs/sdks/templates/README.md#get_all) - Get all prompt templates
223+
* [list](docs/sdks/promptsnippets/README.md#list) - List all prompts snippets
224+
* [create](docs/sdks/promptsnippets/README.md#create) - Create a prompt snippet
225+
* [update](docs/sdks/promptsnippets/README.md#update) - Update a prompt snippet
226+
* [delete](docs/sdks/promptsnippets/README.md#delete) - Delete a prompt snippet
227+
* [get](docs/sdks/promptsnippets/README.md#get) - Retrieve a prompt snippet
228+
* [get_by_key](docs/sdks/promptsnippets/README.md#get_by_key) - Retrieve a prompt snippet by key
195229

196230
### [prompts](docs/sdks/prompts/README.md)
197231

198-
* [create](docs/sdks/prompts/README.md#create) - Create a new prompt
199-
* [create_version](docs/sdks/prompts/README.md#create_version) - Create a new prompt version
200-
* [delete](docs/sdks/prompts/README.md#delete) - Delete a prompt
201-
* [get_one](docs/sdks/prompts/README.md#get_one) - Get one prompt
232+
* [list](docs/sdks/prompts/README.md#list) - List all prompts
233+
* [create](docs/sdks/prompts/README.md#create) - Create a prompt
234+
* [retrieve](docs/sdks/prompts/README.md#retrieve) - Retrieve a prompt
202235
* [update](docs/sdks/prompts/README.md#update) - Update a prompt
203-
* [duplicate](docs/sdks/prompts/README.md#duplicate) - Duplicate a prompt
204-
* [get_all](docs/sdks/prompts/README.md#get_all) - Get all prompts
236+
* [delete](docs/sdks/prompts/README.md#delete) - Delete a prompt
237+
* [list_versions](docs/sdks/prompts/README.md#list_versions) - List all prompt versions
238+
* [get_version](docs/sdks/prompts/README.md#get_version) - Retrieve a prompt version
205239

206240
### [remoteconfig](docs/sdks/remoteconfig/README.md)
207241

@@ -230,7 +264,7 @@ with Orq(
230264
api_key=os.getenv("ORQ_API_KEY", ""),
231265
) as orq:
232266

233-
res = orq.deployments.invoke(key="<key>")
267+
res = orq.deployments.stream(key="<key>")
234268

235269
assert res is not None
236270

@@ -334,7 +368,7 @@ By default, an API error will raise a models.APIError exception, which has the f
334368
| `.raw_response` | *httpx.Response* | The raw HTTP response |
335369
| `.body` | *str* | The response content |
336370

337-
When custom error responses are specified for an operation, the SDK may also raise their associated exceptions. You can refer to respective *Errors* tables in SDK docs for more details on possible exception types for each operation. For example, the `all_async` method may raise the following exceptions:
371+
When custom error responses are specified for an operation, the SDK may also raise their associated exceptions. You can refer to respective *Errors* tables in SDK docs for more details on possible exception types for each operation. For example, the `list_async` method may raise the following exceptions:
338372

339373
| Error Type | Status Code | Content Type |
340374
| ------------------- | ----------- | ---------------- |
@@ -353,7 +387,7 @@ with Orq(
353387
res = None
354388
try:
355389

356-
res = orq.deployments.all()
390+
res = orq.deployments.list()
357391

358392
assert res is not None
359393

@@ -475,6 +509,32 @@ s = Orq(async_client=CustomClient(httpx.AsyncClient()))
475509
```
476510
<!-- End Custom HTTP Client [http-client] -->
477511

512+
<!-- Start Resource Management [resource-management] -->
513+
## Resource Management
514+
515+
The `Orq` class implements the context manager protocol and registers a finalizer function to close the underlying sync and async HTTPX clients it uses under the hood. This will close HTTP connections, release memory and free up other resources held by the SDK. In short-lived Python programs and notebooks that make a few SDK method calls, resource management may not be a concern. However, in longer-lived programs, it is beneficial to create a single SDK instance via a [context manager][context-manager] and reuse it across the application.
516+
517+
[context-manager]: https://docs.python.org/3/reference/datamodel.html#context-managers
518+
519+
```python
520+
from orq_ai_sdk import Orq
521+
import os
522+
def main():
523+
with Orq(
524+
api_key=os.getenv("ORQ_API_KEY", ""),
525+
) as orq:
526+
# Rest of application here...
527+
528+
529+
# Or when using async:
530+
async def amain():
531+
async with Orq(
532+
api_key=os.getenv("ORQ_API_KEY", ""),
533+
) as orq:
534+
# Rest of application here...
535+
```
536+
<!-- End Resource Management [resource-management] -->
537+
478538
<!-- Start Debugging [debug] -->
479539
## Debugging
480540

RELEASES.md

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,4 +28,14 @@ Based on:
2828
### Generated
2929
- [python v3.0.1] .
3030
### Releases
31-
- [PyPI v3.0.1] https://pypi.org/project/orq-ai-sdk/3.0.1 - .
31+
- [PyPI v3.0.1] https://pypi.org/project/orq-ai-sdk/3.0.1 - .
32+
33+
## 2025-02-11 16:44:44
34+
### Changes
35+
Based on:
36+
- OpenAPI Doc
37+
- Speakeasy CLI 1.488.0 (2.506.0) https://github.com/speakeasy-api/speakeasy
38+
### Generated
39+
- [python v3.1.0] .
40+
### Releases
41+
- [PyPI v3.1.0] https://pypi.org/project/orq-ai-sdk/3.1.0 - .

docs/models/bulkfileuploadfiles.md

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

docs/models/bulkfileuploadfilespurpose.md

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

docs/models/bulkfileuploadpurpose.md

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

docs/models/bulkfileuploadrequestbody.md

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

docs/models/createpromptlanguage.md

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
# CreatePromptLanguage
2+
3+
The language that the prompt is written in. Use this field to categorize the prompt for your own purpose
4+
5+
6+
## Values
7+
8+
| Name | Value |
9+
| --------- | --------- |
10+
| `CHINESE` | Chinese |
11+
| `DUTCH` | Dutch |
12+
| `ENGLISH` | English |
13+
| `FRENCH` | French |
14+
| `GERMAN` | German |
15+
| `RUSSIAN` | Russian |
16+
| `SPANISH` | Spanish |

docs/models/createpromptmetadata.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33

44
## Fields
55

6-
| Field | Type | Required | Description |
7-
| ------------------ | ------------------ | ------------------ | ------------------ |
8-
| `use_cases` | List[*str*] | :heavy_minus_sign: | N/A |
9-
| `language` | *Optional[str]* | :heavy_minus_sign: | N/A |
6+
| Field | Type | Required | Description |
7+
| ------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------- |
8+
| `use_cases` | List[[models.CreatePromptUseCases](../models/createpromptusecases.md)] | :heavy_minus_sign: | A list of use cases that the prompt is meant to be used for. Use this field to categorize the prompt for your own purpose |
9+
| `language` | [Optional[models.CreatePromptLanguage]](../models/createpromptlanguage.md) | :heavy_minus_sign: | The language that the prompt is written in. Use this field to categorize the prompt for your own purpose |

0 commit comments

Comments
 (0)