Skip to content

Commit

Permalink
ci: regenerated with OpenAPI Doc , Speakeasy CLI 1.421.2 (#16)
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 25, 2024
1 parent 18bd942 commit a594aa9
Show file tree
Hide file tree
Showing 49 changed files with 647 additions and 96 deletions.
34 changes: 27 additions & 7 deletions .speakeasy/gen.lock
Original file line number Diff line number Diff line change
@@ -1,19 +1,20 @@
lockVersion: 2.0.0
id: 2d5dbf5a-62be-411a-9c7b-bc7b6dc79e13
management:
docChecksum: 21334b8071b6c8e28a5dda229ceafd7e
speakeasyVersion: 1.405.6
generationVersion: 2.428.1
releaseVersion: 0.5.2
configChecksum: 7327f5aa5f764c498c18bf07efe8face
docChecksum: a140881cbcff74961991f5dfff13f0a0
docVersion: 0.0.0
speakeasyVersion: 1.421.2
generationVersion: 2.438.15
releaseVersion: 0.6.0
configChecksum: d4f553b7eab1ee8b7b6de14095ab240f
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.7
constsAndDefaults: 1.0.4
core: 5.6.0
defaultEnabledRetries: 0.2.0
envVarSecurityUsage: 0.3.1
globalSecurity: 3.0.2
Expand All @@ -29,13 +30,16 @@ features:
uploadStreams: 1.0.0
generatedFiles:
- .gitattributes
- .python-version
- .vscode/settings.json
- CONTRIBUTING.md
- USAGE.md
- docs/models/components/apierror.md
- docs/models/components/audio.md
- docs/models/components/bodygenaudiototext.md
- docs/models/components/bodygenimagetoimage.md
- docs/models/components/bodygenimagetotext.md
- docs/models/components/bodygenimagetotextimage.md
- docs/models/components/bodygenimagetovideo.md
- docs/models/components/bodygenimagetovideoimage.md
- docs/models/components/bodygenllm.md
Expand All @@ -47,6 +51,7 @@ generatedFiles:
- docs/models/components/httpmetadata.md
- docs/models/components/image.md
- docs/models/components/imageresponse.md
- docs/models/components/imagetotextresponse.md
- docs/models/components/llmresponse.md
- docs/models/components/loc.md
- docs/models/components/masksresponse.md
Expand All @@ -60,6 +65,7 @@ generatedFiles:
- docs/models/errors/httpvalidationerror.md
- docs/models/operations/genaudiototextresponse.md
- docs/models/operations/genimagetoimageresponse.md
- docs/models/operations/genimagetotextresponse.md
- docs/models/operations/genimagetovideoresponse.md
- docs/models/operations/genllmresponse.md
- docs/models/operations/gensegmentanything2response.md
Expand All @@ -79,20 +85,23 @@ generatedFiles:
- src/livepeer_ai/_hooks/__init__.py
- src/livepeer_ai/_hooks/sdkhooks.py
- src/livepeer_ai/_hooks/types.py
- src/livepeer_ai/_version.py
- src/livepeer_ai/basesdk.py
- src/livepeer_ai/generate.py
- src/livepeer_ai/httpclient.py
- src/livepeer_ai/models/components/__init__.py
- src/livepeer_ai/models/components/apierror.py
- src/livepeer_ai/models/components/body_genaudiototext.py
- src/livepeer_ai/models/components/body_genimagetoimage.py
- src/livepeer_ai/models/components/body_genimagetotext.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/imagetotextresponse.py
- src/livepeer_ai/models/components/llmresponse.py
- src/livepeer_ai/models/components/masksresponse.py
- src/livepeer_ai/models/components/media.py
Expand All @@ -108,6 +117,7 @@ generatedFiles:
- src/livepeer_ai/models/operations/__init__.py
- src/livepeer_ai/models/operations/genaudiototext.py
- src/livepeer_ai/models/operations/genimagetoimage.py
- src/livepeer_ai/models/operations/genimagetotext.py
- src/livepeer_ai/models/operations/genimagetovideo.py
- src/livepeer_ai/models/operations/genllm.py
- src/livepeer_ai/models/operations/gensegmentanything2.py
Expand Down Expand Up @@ -204,3 +214,13 @@ examples:
"400":
application/json: {"detail": {"msg": "<value>"}}
"422": {}
genImageToText:
speakeasy-default-gen-image-to-text:
requestBody:
multipart/form-data: {"image": {}}
responses:
"200":
application/json: {"text": "<value>"}
"400":
application/json: {"detail": {"msg": "<value>"}}
"422": {}
3 changes: 2 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.2
version: 0.6.0
additionalDependencies:
dev: {}
main: {}
Expand All @@ -26,6 +26,7 @@ python:
responseRequiredSep2024: false
flattenGlobalSecurity: true
flattenRequests: false
flatteningOrder: parameters-first
imports:
option: openapi
paths:
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.405.6
speakeasyVersion: 1.421.2
sources:
livepeer_ai-OAS:
sourceNamespace: livepeer-ai-oas
sourceRevisionDigest: sha256:6c083bb976ce725193fa116da1525e922c5cc008dc6f138ca265003b272d1667
sourceBlobDigest: sha256:1381f76cad0ec28b51d5559fdf87a0b14f39e2946fe25e0c21c0b8b0fe42cf99
sourceRevisionDigest: sha256:7c2d0e199d6baf10fef5575a8a79a5ee1486404713486f96ded33578ba6d01d1
sourceBlobDigest: sha256:ad0b2e92bea306b60b1929309669cb1c3ca574325bb0ab4a2e44949fc8249a9f
tags:
- latest
- main
Expand All @@ -16,10 +16,10 @@ targets:
livepeer-ai-python:
source: livepeer_ai-OAS
sourceNamespace: livepeer-ai-oas
sourceRevisionDigest: sha256:6c083bb976ce725193fa116da1525e922c5cc008dc6f138ca265003b272d1667
sourceBlobDigest: sha256:1381f76cad0ec28b51d5559fdf87a0b14f39e2946fe25e0c21c0b8b0fe42cf99
sourceRevisionDigest: sha256:7c2d0e199d6baf10fef5575a8a79a5ee1486404713486f96ded33578ba6d01d1
sourceBlobDigest: sha256:ad0b2e92bea306b60b1929309669cb1c3ca574325bb0ab4a2e44949fc8249a9f
codeSamplesNamespace: code-samples-python-livepeer-python
codeSamplesRevisionDigest: sha256:2a3c5eac4d47d04d2509592307bd0e451ce09ecacdba64a6638329f2f3286f76
codeSamplesRevisionDigest: sha256:7cae186a8c5eb7d239ad39407c0ca1c5f2269a0e6e17921baacc1ee895fead94
workflow:
workflowVersion: 1.0.0
speakeasyVersion: latest
Expand Down
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -101,6 +101,7 @@ asyncio.run(main())
* [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
* [image_to_text](docs/sdks/generate/README.md#image_to_text) - Image To Text


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

## 2024-10-25 00:16:56
### Changes
Based on:
- OpenAPI Doc
- Speakeasy CLI 1.421.2 (2.438.15) https://github.com/speakeasy-api/speakeasy
### Generated
- [python v0.6.0] .
### Releases
- [PyPI v0.6.0] https://pypi.org/project/livepeer-ai/0.6.0 - .
22 changes: 22 additions & 0 deletions codeSamples.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,28 @@ actions:
if res.image_response is not None:
# handle response
pass
- target: $["paths"]["/image-to-text"]["post"]
update:
x-codeSamples:
- lang: python
label: genImageToText
source: |-
from livepeer_ai import Livepeer
s = Livepeer(
http_bearer="<YOUR_BEARER_TOKEN_HERE>",
)
res = s.generate.image_to_text(request={
"image": {
"file_name": "example.file",
"content": open("example.file", "rb"),
},
})
if res.image_to_text_response is not None:
# handle response
pass
- target: $["paths"]["/image-to-video"]["post"]
update:
x-codeSamples:
Expand Down
10 changes: 10 additions & 0 deletions docs/models/components/bodygenimagetotext.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
# BodyGenImageToText


## Fields

| Field | Type | Required | Description |
| ---------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------- |
| `image` | [components.BodyGenImageToTextImage](../../models/components/bodygenimagetotextimage.md) | :heavy_check_mark: | Uploaded image to transform with the pipeline. |
| `prompt` | *Optional[str]* | :heavy_minus_sign: | Text prompt(s) to guide transformation. |
| `model_id` | *Optional[str]* | :heavy_minus_sign: | Hugging Face model ID used for transformation. |
10 changes: 10 additions & 0 deletions docs/models/components/bodygenimagetotextimage.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
# BodyGenImageToTextImage


## Fields

| Field | Type | Required | Description |
| -------------------------------------------- | -------------------------------------------- | -------------------------------------------- | -------------------------------------------- |
| `file_name` | *str* | :heavy_check_mark: | N/A |
| `content` | *Union[bytes, IO[bytes], io.BufferedReader]* | :heavy_check_mark: | N/A |
| `content_type` | *Optional[str]* | :heavy_minus_sign: | N/A |
10 changes: 10 additions & 0 deletions docs/models/components/imagetotextresponse.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
# ImageToTextResponse

Response model for text generation.


## Fields

| Field | Type | Required | Description |
| ------------------- | ------------------- | ------------------- | ------------------- |
| `text` | *str* | :heavy_check_mark: | The generated text. |
9 changes: 9 additions & 0 deletions docs/models/operations/genimagetotextresponse.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
# GenImageToTextResponse


## Fields

| Field | Type | Required | Description |
| ------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------ |
| `http_meta` | [components.HTTPMetadata](../../models/components/httpmetadata.md) | :heavy_check_mark: | N/A |
| `image_to_text_response` | [Optional[components.ImageToTextResponse]](../../models/components/imagetotextresponse.md) | :heavy_minus_sign: | Successful Response |
48 changes: 47 additions & 1 deletion docs/sdks/generate/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
* [audio_to_text](#audio_to_text) - Audio To Text
* [segment_anything2](#segment_anything2) - Segment Anything 2
* [llm](#llm) - LLM
* [image_to_text](#image_to_text) - Image To Text

## text_to_image

Expand Down Expand Up @@ -233,7 +234,7 @@ if res.text_response is not None:

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

Expand Down Expand Up @@ -322,4 +323,49 @@ if res.llm_response is not None:
| -------------------------- | -------------------------- | -------------------------- |
| errors.HTTPError | 400, 401, 500 | application/json |
| errors.HTTPValidationError | 422 | application/json |
| errors.SDKError | 4XX, 5XX | \*/\* |

## image_to_text

Transform image files to text.

### Example Usage

```python
from livepeer_ai import Livepeer

s = Livepeer(
http_bearer="<YOUR_BEARER_TOKEN_HERE>",
)

res = s.generate.image_to_text(request={
"image": {
"file_name": "example.file",
"content": open("example.file", "rb"),
},
})

if res.image_to_text_response is not None:
# handle response
pass

```

### Parameters

| Parameter | Type | Required | Description |
| ------------------------------------------------------------------------------ | ------------------------------------------------------------------------------ | ------------------------------------------------------------------------------ | ------------------------------------------------------------------------------ |
| `request` | [components.BodyGenImageToText](../../models/components/bodygenimagetotext.md) | :heavy_check_mark: | The request object to use for the request. |
| `retries` | [Optional[utils.RetryConfig]](../../models/utils/retryconfig.md) | :heavy_minus_sign: | Configuration to override the default retry behavior of the client. |

### Response

**[operations.GenImageToTextResponse](../../models/operations/genimagetotextresponse.md)**

### Errors

| Error Type | Status Code | Content Type |
| -------------------------- | -------------------------- | -------------------------- |
| errors.HTTPError | 400, 401, 413, 500 | application/json |
| errors.HTTPValidationError | 422 | application/json |
| errors.SDKError | 4XX, 5XX | \*/\* |
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[tool.poetry]
name = "livepeer-ai"
version = "0.5.2"
version = "0.6.0"
description = "Python Client SDK for the Livepeer AI API."
authors = ["Speakeasy",]
readme = "README-PYPI.md"
Expand Down
4 changes: 4 additions & 0 deletions src/livepeer_ai/__init__.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,8 @@
"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT."""

from ._version import __title__, __version__
from .sdk import *
from .sdkconfiguration import *


VERSION: str = __version__
12 changes: 12 additions & 0 deletions src/livepeer_ai/_version.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT."""

import importlib.metadata

__title__: str = "livepeer-ai"
__version__: str = "0.6.0"

try:
if __package__ is not None:
__version__ = importlib.metadata.version(__package__)
except importlib.metadata.PackageNotFoundError:
pass
Loading

0 comments on commit a594aa9

Please sign in to comment.