Skip to content

Commit

Permalink
ci: regenerated with OpenAPI Doc , Speakeasy CLI 1.405.6 (#15)
Browse files Browse the repository at this point in the history
Co-authored-by: speakeasybot <[email protected]>
  • Loading branch information
github-actions[bot] and speakeasybot authored Oct 1, 2024
1 parent e5754c7 commit 18bd942
Show file tree
Hide file tree
Showing 20 changed files with 446 additions and 52 deletions.
31 changes: 23 additions & 8 deletions .speakeasy/gen.lock
Original file line number Diff line number Diff line change
@@ -1,20 +1,19 @@
lockVersion: 2.0.0
id: 2d5dbf5a-62be-411a-9c7b-bc7b6dc79e13
management:
docChecksum: 4a28bceb165adf1c1dd97bbc8fe41a27
docVersion: v0.5.0
speakeasyVersion: 1.401.2
generationVersion: 2.421.3
releaseVersion: 0.5.1
configChecksum: 57016dfe6f67d305306547b9aa2c1601
docChecksum: 21334b8071b6c8e28a5dda229ceafd7e
speakeasyVersion: 1.405.6
generationVersion: 2.428.1
releaseVersion: 0.5.2
configChecksum: 7327f5aa5f764c498c18bf07efe8face
repoURL: https://github.com/livepeer/livepeer-ai-python.git
installationURL: https://github.com/livepeer/livepeer-ai-python.git
published: true
features:
python:
additionalDependencies: 1.0.0
constsAndDefaults: 1.0.3
core: 5.5.4
core: 5.5.7
defaultEnabledRetries: 0.2.0
envVarSecurityUsage: 0.3.1
globalSecurity: 3.0.2
Expand All @@ -23,7 +22,7 @@ features:
globalServerURLs: 3.0.0
multipartFileContentType: 1.0.0
nameOverrides: 3.0.0
responseFormat: 1.0.0
responseFormat: 1.0.1
retries: 3.0.2
sdkHooks: 1.0.0
unions: 3.0.2
Expand All @@ -39,6 +38,7 @@ generatedFiles:
- docs/models/components/bodygenimagetoimage.md
- docs/models/components/bodygenimagetovideo.md
- docs/models/components/bodygenimagetovideoimage.md
- docs/models/components/bodygenllm.md
- docs/models/components/bodygensegmentanything2.md
- docs/models/components/bodygensegmentanything2image.md
- docs/models/components/bodygenupscale.md
Expand All @@ -47,6 +47,7 @@ generatedFiles:
- docs/models/components/httpmetadata.md
- docs/models/components/image.md
- docs/models/components/imageresponse.md
- docs/models/components/llmresponse.md
- docs/models/components/loc.md
- docs/models/components/masksresponse.md
- docs/models/components/media.md
Expand All @@ -60,6 +61,7 @@ generatedFiles:
- docs/models/operations/genaudiototextresponse.md
- docs/models/operations/genimagetoimageresponse.md
- docs/models/operations/genimagetovideoresponse.md
- docs/models/operations/genllmresponse.md
- docs/models/operations/gensegmentanything2response.md
- docs/models/operations/gentexttoimageresponse.md
- docs/models/operations/genupscaleresponse.md
Expand All @@ -85,11 +87,13 @@ generatedFiles:
- src/livepeer_ai/models/components/body_genaudiototext.py
- src/livepeer_ai/models/components/body_genimagetoimage.py
- src/livepeer_ai/models/components/body_genimagetovideo.py
- src/livepeer_ai/models/components/body_genllm.py
- src/livepeer_ai/models/components/body_gensegmentanything2.py
- src/livepeer_ai/models/components/body_genupscale.py
- src/livepeer_ai/models/components/chunk.py
- src/livepeer_ai/models/components/httpmetadata.py
- src/livepeer_ai/models/components/imageresponse.py
- src/livepeer_ai/models/components/llmresponse.py
- src/livepeer_ai/models/components/masksresponse.py
- src/livepeer_ai/models/components/media.py
- src/livepeer_ai/models/components/security.py
Expand All @@ -105,6 +109,7 @@ generatedFiles:
- src/livepeer_ai/models/operations/genaudiototext.py
- src/livepeer_ai/models/operations/genimagetoimage.py
- src/livepeer_ai/models/operations/genimagetovideo.py
- src/livepeer_ai/models/operations/genllm.py
- src/livepeer_ai/models/operations/gensegmentanything2.py
- src/livepeer_ai/models/operations/gentexttoimage.py
- src/livepeer_ai/models/operations/genupscale.py
Expand Down Expand Up @@ -189,3 +194,13 @@ examples:
"400":
application/json: {"detail": {"msg": "<value>"}}
"422": {}
genLLM:
speakeasy-default-gen-LLM:
requestBody:
application/x-www-form-urlencoded: {"prompt": "<value>"}
responses:
"200":
application/json: {"response": "<value>", "tokens_used": 60712}
"400":
application/json: {"detail": {"msg": "<value>"}}
"422": {}
4 changes: 3 additions & 1 deletion .speakeasy/gen.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ generation:
auth:
oAuth2ClientCredentialsEnabled: true
python:
version: 0.5.1
version: 0.5.2
additionalDependencies:
dev: {}
main: {}
Expand All @@ -22,6 +22,8 @@ python:
clientServerStatusCodesAsErrors: true
description: Python Client SDK for the Livepeer AI API.
enumFormat: enum
fixFlags:
responseRequiredSep2024: false
flattenGlobalSecurity: true
flattenRequests: false
imports:
Expand Down
12 changes: 6 additions & 6 deletions .speakeasy/workflow.lock
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
speakeasyVersion: 1.401.2
speakeasyVersion: 1.405.6
sources:
livepeer_ai-OAS:
sourceNamespace: livepeer-ai-oas
sourceRevisionDigest: sha256:4f6e897095eeeb8d23e6ecc1421334cf273ffd96b45a1e6e79bf04b39d5ce543
sourceBlobDigest: sha256:ffdfa01671cab29ecdb8b014925f080497ace7616108fe5a4b9153cc0e562f93
sourceRevisionDigest: sha256:6c083bb976ce725193fa116da1525e922c5cc008dc6f138ca265003b272d1667
sourceBlobDigest: sha256:1381f76cad0ec28b51d5559fdf87a0b14f39e2946fe25e0c21c0b8b0fe42cf99
tags:
- latest
- main
Expand All @@ -16,10 +16,10 @@ targets:
livepeer-ai-python:
source: livepeer_ai-OAS
sourceNamespace: livepeer-ai-oas
sourceRevisionDigest: sha256:4f6e897095eeeb8d23e6ecc1421334cf273ffd96b45a1e6e79bf04b39d5ce543
sourceBlobDigest: sha256:ffdfa01671cab29ecdb8b014925f080497ace7616108fe5a4b9153cc0e562f93
sourceRevisionDigest: sha256:6c083bb976ce725193fa116da1525e922c5cc008dc6f138ca265003b272d1667
sourceBlobDigest: sha256:1381f76cad0ec28b51d5559fdf87a0b14f39e2946fe25e0c21c0b8b0fe42cf99
codeSamplesNamespace: code-samples-python-livepeer-python
codeSamplesRevisionDigest: sha256:196012791664b5a4437be3bf2d09ed1a3b6ee7bd83da508a3def8332836f5b31
codeSamplesRevisionDigest: sha256:2a3c5eac4d47d04d2509592307bd0e451ce09ecacdba64a6638329f2f3286f76
workflow:
workflowVersion: 1.0.0
speakeasyVersion: latest
Expand Down
20 changes: 16 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -100,6 +100,7 @@ asyncio.run(main())
* [upscale](docs/sdks/generate/README.md#upscale) - Upscale
* [audio_to_text](docs/sdks/generate/README.md#audio_to_text) - Audio To Text
* [segment_anything2](docs/sdks/generate/README.md#segment_anything2) - Segment Anything 2
* [llm](docs/sdks/generate/README.md#llm) - LLM


</details>
Expand Down Expand Up @@ -186,13 +187,24 @@ if res.image_response is not None:
<!-- Start Error Handling [errors] -->
## Error Handling

Handling errors in this SDK should largely match your expectations. All operations return a response object or raise an error. If Error objects are specified in your OpenAPI Spec, the SDK will raise the appropriate Error type.
Handling errors in this SDK should largely match your expectations. All operations return a response object or raise an exception.

| Error Object | Status Code | Content Type |
By default, an API error will raise a errors.SDKError exception, which has the following properties:

| Property | Type | Description |
|-----------------|------------------|-----------------------|
| `.status_code` | *int* | The HTTP status code |
| `.message` | *str* | The error message |
| `.raw_response` | *httpx.Response* | The raw HTTP response |
| `.body` | *str* | The response content |

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 `text_to_image_async` method may raise the following exceptions:

| Error Type | Status Code | Content Type |
| -------------------------- | -------------------------- | -------------------------- |
| errors.HTTPError | 400,401,500 | application/json |
| errors.HTTPError | 400, 401, 500 | application/json |
| errors.HTTPValidationError | 422 | application/json |
| errors.SDKError | 4xx-5xx | */* |
| errors.SDKError | 4XX, 5XX | \*/\* |

### Example

Expand Down
12 changes: 11 additions & 1 deletion RELEASES.md
Original file line number Diff line number Diff line change
Expand Up @@ -78,4 +78,14 @@ Based on:
### Generated
- [python v0.5.1] .
### Releases
- [PyPI v0.5.1] https://pypi.org/project/livepeer-ai/0.5.1 - .
- [PyPI v0.5.1] https://pypi.org/project/livepeer-ai/0.5.1 - .

## 2024-10-01 20:49:55
### Changes
Based on:
- OpenAPI Doc
- Speakeasy CLI 1.405.6 (2.428.1) https://github.com/speakeasy-api/speakeasy
### Generated
- [python v0.5.2] .
### Releases
- [PyPI v0.5.2] https://pypi.org/project/livepeer-ai/0.5.2 - .
19 changes: 19 additions & 0 deletions codeSamples.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,25 @@ actions:
if res.video_response is not None:
# handle response
pass
- target: $["paths"]["/llm"]["post"]
update:
x-codeSamples:
- lang: python
label: genLLM
source: |-
from livepeer_ai import Livepeer
s = Livepeer(
http_bearer="<YOUR_BEARER_TOKEN_HERE>",
)
res = s.generate.llm(request={
"prompt": "<value>",
})
if res.llm_response is not None:
# handle response
pass
- target: $["paths"]["/segment-anything-2"]["post"]
update:
x-codeSamples:
Expand Down
14 changes: 14 additions & 0 deletions docs/models/components/bodygenllm.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
# BodyGenLLM


## Fields

| Field | Type | Required | Description |
| ------------------ | ------------------ | ------------------ | ------------------ |
| `prompt` | *str* | :heavy_check_mark: | N/A |
| `model_id` | *Optional[str]* | :heavy_minus_sign: | N/A |
| `system_msg` | *Optional[str]* | :heavy_minus_sign: | N/A |
| `temperature` | *Optional[float]* | :heavy_minus_sign: | N/A |
| `max_tokens` | *Optional[int]* | :heavy_minus_sign: | N/A |
| `history` | *Optional[str]* | :heavy_minus_sign: | N/A |
| `stream` | *Optional[bool]* | :heavy_minus_sign: | N/A |
9 changes: 9 additions & 0 deletions docs/models/components/llmresponse.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
# LLMResponse


## Fields

| Field | Type | Required | Description |
| ------------------ | ------------------ | ------------------ | ------------------ |
| `response` | *str* | :heavy_check_mark: | N/A |
| `tokens_used` | *int* | :heavy_check_mark: | N/A |
2 changes: 0 additions & 2 deletions docs/models/errors/httpvalidationerror.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
# HTTPValidationError

Validation Error


## Fields

Expand Down
9 changes: 9 additions & 0 deletions docs/models/operations/genllmresponse.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
# GenLLMResponse


## Fields

| Field | Type | Required | Description |
| -------------------------------------------------------------------------- | -------------------------------------------------------------------------- | -------------------------------------------------------------------------- | -------------------------------------------------------------------------- |
| `http_meta` | [components.HTTPMetadata](../../models/components/httpmetadata.md) | :heavy_check_mark: | N/A |
| `llm_response` | [Optional[components.LLMResponse]](../../models/components/llmresponse.md) | :heavy_minus_sign: | Successful Response |
Loading

0 comments on commit 18bd942

Please sign in to comment.