diff --git a/.gitignore b/.gitignore index 0bf616a..0ef1870 100644 --- a/.gitignore +++ b/.gitignore @@ -1,3 +1,4 @@ +.speakeasy/temp/ .speakeasy/reports # Speakeasy .venv/ diff --git a/.speakeasy/gen.lock b/.speakeasy/gen.lock index 7d1221a..328bd67 100644 --- a/.speakeasy/gen.lock +++ b/.speakeasy/gen.lock @@ -1,12 +1,12 @@ lockVersion: 2.0.0 id: 2d5dbf5a-62be-411a-9c7b-bc7b6dc79e13 management: - docChecksum: 6657dd3e876a909472f364dc1fe34d72 - docVersion: 0.0.0 - speakeasyVersion: 1.480.0 - generationVersion: 2.499.0 - releaseVersion: 0.10.0 - configChecksum: 2b2d2389ee9ff1be5cd354baf7c62739 + docChecksum: 2c2f35044e9904f5bbd8daec5eed8020 + docVersion: 0.1.0 + speakeasyVersion: 1.540.0 + generationVersion: 2.593.3 + releaseVersion: 0.11.0 + configChecksum: 7dc5d91a976db7fc235765e2b9a611a9 repoURL: https://github.com/livepeer/livepeer-ai-python.git installationURL: https://github.com/livepeer/livepeer-ai-python.git published: true @@ -14,10 +14,10 @@ features: python: additionalDependencies: 1.0.0 constsAndDefaults: 1.0.5 - core: 5.10.7 + core: 5.16.0 defaultEnabledRetries: 0.2.0 envVarSecurityUsage: 0.3.2 - globalSecurity: 3.0.2 + globalSecurity: 3.0.3 globalSecurityCallbacks: 1.0.0 globalSecurityFlattening: 1.0.0 globalServerURLs: 3.1.0 @@ -25,7 +25,7 @@ features: nameOverrides: 3.0.1 responseFormat: 1.0.1 retries: 3.0.2 - sdkHooks: 1.0.0 + sdkHooks: 1.0.1 unions: 3.0.4 uploadStreams: 1.0.0 generatedFiles: @@ -88,7 +88,7 @@ generatedFiles: - py.typed - pylintrc - pyproject.toml - - scripts/prepare-readme.py + - scripts/prepare_readme.py - scripts/publish.sh - src/livepeer_ai/__init__.py - src/livepeer_ai/_hooks/__init__.py @@ -98,6 +98,7 @@ generatedFiles: - src/livepeer_ai/basesdk.py - src/livepeer_ai/generate.py - src/livepeer_ai/httpclient.py + - src/livepeer_ai/models/__init__.py - src/livepeer_ai/models/components/__init__.py - src/livepeer_ai/models/components/apierror.py - src/livepeer_ai/models/components/audioresponse.py @@ -149,6 +150,7 @@ generatedFiles: - src/livepeer_ai/types/basemodel.py - src/livepeer_ai/utils/__init__.py - src/livepeer_ai/utils/annotations.py + - src/livepeer_ai/utils/datetimes.py - src/livepeer_ai/utils/enums.py - src/livepeer_ai/utils/eventstreaming.py - src/livepeer_ai/utils/forms.py @@ -179,7 +181,7 @@ examples: genImageToImage: speakeasy-default-gen-image-to-image: requestBody: - multipart/form-data: {"prompt": "", "image": {"": "x-file: example.file"}, "model_id": "", "loras": "", "strength": 0.8, "guidance_scale": 7.5, "image_guidance_scale": 1.5, "negative_prompt": "", "safety_check": true, "num_inference_steps": 100, "num_images_per_prompt": 1} + multipart/form-data: {"prompt": "", "image": {}, "model_id": "", "loras": "", "strength": 0.8, "guidance_scale": 7.5, "image_guidance_scale": 1.5, "negative_prompt": "", "safety_check": true, "num_inference_steps": 100, "num_images_per_prompt": 1} responses: "200": application/json: {"images": [{"url": "https://selfish-operating.name/", "seed": 976514, "nsfw": false}]} @@ -192,7 +194,7 @@ examples: genImageToVideo: speakeasy-default-gen-image-to-video: requestBody: - multipart/form-data: {"image": {"": "x-file: example.file"}, "model_id": "", "height": 576, "width": 1024, "fps": 6, "motion_bucket_id": 127, "noise_aug_strength": 0.02, "safety_check": true, "num_inference_steps": 25} + multipart/form-data: {"image": {}, "model_id": "", "height": 576, "width": 1024, "fps": 6, "motion_bucket_id": 127, "noise_aug_strength": 0.02, "safety_check": true, "num_inference_steps": 25} responses: "200": application/json: {"images": [{"url": "https://low-handover.name/", "seed": 87160, "nsfw": true}]} @@ -205,7 +207,7 @@ examples: genUpscale: speakeasy-default-gen-upscale: requestBody: - multipart/form-data: {"prompt": "", "image": {"": "x-file: example.file"}, "model_id": "", "safety_check": true, "num_inference_steps": 75} + multipart/form-data: {"prompt": "", "image": {}, "model_id": "", "safety_check": true, "num_inference_steps": 75} responses: "200": application/json: {"images": [{"url": "https://bogus-typewriter.net", "seed": 311567, "nsfw": false}]} @@ -218,7 +220,7 @@ examples: genAudioToText: speakeasy-default-gen-audio-to-text: requestBody: - multipart/form-data: {"audio": {"": "x-file: example.file"}, "model_id": "", "return_timestamps": "true"} + multipart/form-data: {"audio": {}, "model_id": "", "return_timestamps": "true"} responses: "200": application/json: {"text": "", "chunks": [{"timestamp": ["", ""], "text": ""}, {"timestamp": [], "text": ""}]} @@ -231,7 +233,7 @@ examples: genSegmentAnything2: speakeasy-default-gen-segment-anything2: requestBody: - multipart/form-data: {"image": {"": "x-file: example.file"}, "model_id": "", "multimask_output": true, "return_logits": true, "normalize_coords": true} + multipart/form-data: {"image": {}, "model_id": "", "multimask_output": true, "return_logits": true, "normalize_coords": true} responses: "200": application/json: {"masks": "", "scores": "", "logits": ""} @@ -257,7 +259,7 @@ examples: genImageToText: speakeasy-default-gen-image-to-text: requestBody: - multipart/form-data: {"image": {"": "x-file: example.file"}, "prompt": "", "model_id": ""} + multipart/form-data: {"image": {}, "prompt": "", "model_id": ""} responses: "200": application/json: {"text": ""} @@ -270,10 +272,10 @@ examples: genLiveVideoToVideo: speakeasy-default-gen-live-video-to-video: requestBody: - application/json: {"subscribe_url": "https://soulful-lava.org/", "publish_url": "https://vain-tabletop.biz", "control_url": "", "events_url": "", "model_id": ""} + application/json: {"subscribe_url": "https://soulful-lava.org/", "publish_url": "https://vain-tabletop.biz", "control_url": "", "events_url": "", "model_id": "", "gateway_request_id": "", "stream_id": ""} responses: "200": - application/json: {"subscribe_url": "https://vain-kiss.name", "publish_url": "https://frail-duffel.com", "control_url": "", "events_url": ""} + application/json: {"subscribe_url": "https://vain-kiss.name", "publish_url": "https://frail-duffel.com", "control_url": "", "events_url": "", "request_id": ""} "400": application/json: {"detail": {"msg": ""}} "422": @@ -293,5 +295,5 @@ examples: application/json: {} "500": application/json: {"detail": {"msg": ""}} -examplesVersion: 1.0.0 +examplesVersion: 1.0.1 generatedTests: {} diff --git a/.speakeasy/gen.yaml b/.speakeasy/gen.yaml index 0dbd2d1..f17a041 100644 --- a/.speakeasy/gen.yaml +++ b/.speakeasy/gen.yaml @@ -7,13 +7,15 @@ generation: useClassNamesForArrayFields: true fixes: nameResolutionDec2023: true + nameResolutionFeb2025: false parameterOrderingFeb2024: true requestResponseComponentNamesFeb2024: true + securityFeb2025: false auth: oAuth2ClientCredentialsEnabled: true oAuth2PasswordEnabled: false python: - version: 0.10.0 + version: 0.11.0 additionalDependencies: dev: {} main: {} @@ -44,5 +46,6 @@ python: outputModelSuffix: output packageName: livepeer-ai projectUrls: {} + pytestTimeout: 0 responseFormat: envelope-http templateVersion: v2 diff --git a/.speakeasy/workflow.lock b/.speakeasy/workflow.lock index 3b25486..c0eabe5 100644 --- a/.speakeasy/workflow.lock +++ b/.speakeasy/workflow.lock @@ -1,13 +1,13 @@ -speakeasyVersion: 1.480.0 +speakeasyVersion: 1.540.0 sources: livepeer_ai-OAS: sourceNamespace: livepeer-ai-oas - sourceRevisionDigest: sha256:0f47b792f474d38abc86f9276b065e4047dc61d6c0899a85a11008e48857db3a - sourceBlobDigest: sha256:7c0df39c1c5f0ffe580b63f5dc6cb0f81181f5361a80f63f41314cf81d0f3bf4 + sourceRevisionDigest: sha256:15f6304e212f90547f92332965296a59c14f84ed9e4736ebce2164c62b72bc54 + sourceBlobDigest: sha256:fe4da37cb00b561462984ee59b590fed7f004fee5572a4bcf2532371841e3dbd tags: - latest - - speakeasy-sdk-regen-1736900210 - - 0.0.0 + - speakeasy-sdk-regen-1739751486 + - 0.1.0 targets: livepeer-ai: source: livepeer_ai-OAS @@ -17,10 +17,10 @@ targets: livepeer-ai-python: source: livepeer_ai-OAS sourceNamespace: livepeer-ai-oas - sourceRevisionDigest: sha256:0f47b792f474d38abc86f9276b065e4047dc61d6c0899a85a11008e48857db3a - sourceBlobDigest: sha256:7c0df39c1c5f0ffe580b63f5dc6cb0f81181f5361a80f63f41314cf81d0f3bf4 + sourceRevisionDigest: sha256:15f6304e212f90547f92332965296a59c14f84ed9e4736ebce2164c62b72bc54 + sourceBlobDigest: sha256:fe4da37cb00b561462984ee59b590fed7f004fee5572a4bcf2532371841e3dbd codeSamplesNamespace: code-samples-python-livepeer-python - codeSamplesRevisionDigest: sha256:c8ec9be643b93d4a2f53b416df7270cf0cdb44cee849f5de6d2501edef3d2fa9 + codeSamplesRevisionDigest: sha256:ce677d09f1652ce5139163c37beac29b0b390e8ef13b8c692b7888ed60b8c9a6 workflow: workflowVersion: 1.0.0 speakeasyVersion: latest diff --git a/README.md b/README.md index c1934a6..42588a6 100644 --- a/README.md +++ b/README.md @@ -34,6 +34,37 @@ pip install livepeer-ai ```bash poetry add livepeer-ai ``` + +### Shell and script usage with `uv` + +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: + +```shell +uvx --from livepeer-ai python +``` + +It's also possible to write a standalone Python script without needing to set up a whole project like so: + +```python +#!/usr/bin/env -S uv run --script +# /// script +# requires-python = ">=3.9" +# dependencies = [ +# "livepeer-ai", +# ] +# /// + +from livepeer_ai import Livepeer + +sdk = Livepeer( + # SDK arguments +) + +# Rest of script here... +``` + +Once that is saved to a file, you can run it with `uv run script.py` where +`script.py` can be replaced with the actual file name. @@ -55,21 +86,13 @@ Generally, the SDK will work well with most IDEs out of the box. However, when u # Synchronous Example from livepeer_ai import Livepeer + with Livepeer( http_bearer="", ) as livepeer: res = livepeer.generate.text_to_image(request={ "prompt": "", - "model_id": "", - "loras": "", - "height": 576, - "width": 1024, - "guidance_scale": 7.5, - "negative_prompt": "", - "safety_check": True, - "num_inference_steps": 50, - "num_images_per_prompt": 1, }) assert res.image_response is not None @@ -87,21 +110,13 @@ import asyncio from livepeer_ai import Livepeer async def main(): + async with Livepeer( http_bearer="", ) as livepeer: res = await livepeer.generate.text_to_image_async(request={ "prompt": "", - "model_id": "", - "loras": "", - "height": 576, - "width": 1024, - "guidance_scale": 7.5, - "negative_prompt": "", - "safety_check": True, - "num_inference_steps": 50, - "num_images_per_prompt": 1, }) assert res.image_response is not None @@ -149,6 +164,7 @@ Certain SDK methods accept file objects as part of a request body or multi-part ```python from livepeer_ai import Livepeer + with Livepeer( http_bearer="", ) as livepeer: @@ -159,15 +175,6 @@ with Livepeer( "file_name": "example.file", "content": open("example.file", "rb"), }, - "model_id": "", - "loras": "", - "strength": 0.8, - "guidance_scale": 7.5, - "image_guidance_scale": 1.5, - "negative_prompt": "", - "safety_check": True, - "num_inference_steps": 100, - "num_images_per_prompt": 1, }) assert res.image_response is not None @@ -188,21 +195,13 @@ To change the default retry strategy for a single API call, simply provide a `Re from livepeer_ai import Livepeer from livepeer_ai.utils import BackoffStrategy, RetryConfig + with Livepeer( http_bearer="", ) as livepeer: res = livepeer.generate.text_to_image(request={ "prompt": "", - "model_id": "", - "loras": "", - "height": 576, - "width": 1024, - "guidance_scale": 7.5, - "negative_prompt": "", - "safety_check": True, - "num_inference_steps": 50, - "num_images_per_prompt": 1, }, RetryConfig("backoff", BackoffStrategy(1, 50, 1.1, 100), False)) @@ -218,6 +217,7 @@ If you'd like to override the default retry strategy for all operations that sup from livepeer_ai import Livepeer from livepeer_ai.utils import BackoffStrategy, RetryConfig + with Livepeer( retry_config=RetryConfig("backoff", BackoffStrategy(1, 50, 1.1, 100), False), http_bearer="", @@ -225,15 +225,6 @@ with Livepeer( res = livepeer.generate.text_to_image(request={ "prompt": "", - "model_id": "", - "loras": "", - "height": 576, - "width": 1024, - "guidance_scale": 7.5, - "negative_prompt": "", - "safety_check": True, - "num_inference_steps": 50, - "num_images_per_prompt": 1, }) assert res.image_response is not None @@ -273,6 +264,7 @@ When custom error responses are specified for an operation, the SDK may also rai from livepeer_ai import Livepeer from livepeer_ai.models import errors + with Livepeer( http_bearer="", ) as livepeer: @@ -281,15 +273,6 @@ with Livepeer( res = livepeer.generate.text_to_image(request={ "prompt": "", - "model_id": "", - "loras": "", - "height": 576, - "width": 1024, - "guidance_scale": 7.5, - "negative_prompt": "", - "safety_check": True, - "num_inference_steps": 50, - "num_images_per_prompt": 1, }) assert res.image_response is not None @@ -319,16 +302,17 @@ with Livepeer( You can override the default server globally by passing a server index to the `server_idx: int` optional parameter when initializing the SDK client instance. The selected server will then be used as the default on the operations that use it. This table lists the indexes associated with the available servers: -| # | Server | -| --- | ------------------------------------------- | -| 0 | `https://dream-gateway.livepeer.cloud` | -| 1 | `https://livepeer.studio/api/beta/generate` | +| # | Server | Description | +| --- | ------------------------------------------- | -------------------------------- | +| 0 | `https://dream-gateway.livepeer.cloud` | Livepeer Cloud Community Gateway | +| 1 | `https://livepeer.studio/api/beta/generate` | Livepeer Studio Gateway | #### Example ```python from livepeer_ai import Livepeer + with Livepeer( server_idx=1, http_bearer="", @@ -336,15 +320,6 @@ with Livepeer( res = livepeer.generate.text_to_image(request={ "prompt": "", - "model_id": "", - "loras": "", - "height": 576, - "width": 1024, - "guidance_scale": 7.5, - "negative_prompt": "", - "safety_check": True, - "num_inference_steps": 50, - "num_images_per_prompt": 1, }) assert res.image_response is not None @@ -360,6 +335,7 @@ The default server can also be overridden globally by passing a URL to the `serv ```python from livepeer_ai import Livepeer + with Livepeer( server_url="https://dream-gateway.livepeer.cloud", http_bearer="", @@ -367,15 +343,6 @@ with Livepeer( res = livepeer.generate.text_to_image(request={ "prompt": "", - "model_id": "", - "loras": "", - "height": 576, - "width": 1024, - "guidance_scale": 7.5, - "negative_prompt": "", - "safety_check": True, - "num_inference_steps": 50, - "num_images_per_prompt": 1, }) assert res.image_response is not None @@ -482,21 +449,13 @@ To authenticate with the API the `http_bearer` parameter must be set when initia ```python from livepeer_ai import Livepeer + with Livepeer( http_bearer="", ) as livepeer: res = livepeer.generate.text_to_image(request={ "prompt": "", - "model_id": "", - "loras": "", - "height": 576, - "width": 1024, - "guidance_scale": 7.5, - "negative_prompt": "", - "safety_check": True, - "num_inference_steps": 50, - "num_images_per_prompt": 1, }) assert res.image_response is not None @@ -517,6 +476,7 @@ The `Livepeer` class implements the context manager protocol and registers a fin ```python from livepeer_ai import Livepeer def main(): + with Livepeer( http_bearer="", ) as livepeer: @@ -525,6 +485,7 @@ def main(): # Or when using async: async def amain(): + async with Livepeer( http_bearer="", ) as livepeer: diff --git a/RELEASES.md b/RELEASES.md index 60caa97..4b6ecb2 100644 --- a/RELEASES.md +++ b/RELEASES.md @@ -138,4 +138,14 @@ Based on: ### Generated - [python v0.10.0] . ### Releases -- [PyPI v0.10.0] https://pypi.org/project/livepeer-ai/0.10.0 - . \ No newline at end of file +- [PyPI v0.10.0] https://pypi.org/project/livepeer-ai/0.10.0 - . + +## 2025-04-27 00:19:53 +### Changes +Based on: +- OpenAPI Doc +- Speakeasy CLI 1.540.0 (2.593.3) https://github.com/speakeasy-api/speakeasy +### Generated +- [python v0.11.0] . +### Releases +- [PyPI v0.11.0] https://pypi.org/project/livepeer-ai/0.11.0 - . \ No newline at end of file diff --git a/USAGE.md b/USAGE.md index b791757..8d7ec8b 100644 --- a/USAGE.md +++ b/USAGE.md @@ -3,21 +3,13 @@ # Synchronous Example from livepeer_ai import Livepeer + with Livepeer( http_bearer="", ) as livepeer: res = livepeer.generate.text_to_image(request={ "prompt": "", - "model_id": "", - "loras": "", - "height": 576, - "width": 1024, - "guidance_scale": 7.5, - "negative_prompt": "", - "safety_check": True, - "num_inference_steps": 50, - "num_images_per_prompt": 1, }) assert res.image_response is not None @@ -35,21 +27,13 @@ import asyncio from livepeer_ai import Livepeer async def main(): + async with Livepeer( http_bearer="", ) as livepeer: res = await livepeer.generate.text_to_image_async(request={ "prompt": "", - "model_id": "", - "loras": "", - "height": 576, - "width": 1024, - "guidance_scale": 7.5, - "negative_prompt": "", - "safety_check": True, - "num_inference_steps": 50, - "num_images_per_prompt": 1, }) assert res.image_response is not None diff --git a/codeSamples.yaml b/codeSamples.yaml index 261c4e1..433ba15 100644 --- a/codeSamples.yaml +++ b/codeSamples.yaml @@ -11,6 +11,7 @@ actions: source: |- from livepeer_ai import Livepeer + with Livepeer( http_bearer="", ) as livepeer: @@ -20,8 +21,6 @@ actions: "file_name": "example.file", "content": open("example.file", "rb"), }, - "model_id": "", - "return_timestamps": "true", }) assert res.text_response is not None @@ -36,6 +35,7 @@ actions: source: |- from livepeer_ai import Livepeer + with Livepeer( http_bearer="", ) as livepeer: @@ -46,15 +46,6 @@ actions: "file_name": "example.file", "content": open("example.file", "rb"), }, - "model_id": "", - "loras": "", - "strength": 0.8, - "guidance_scale": 7.5, - "image_guidance_scale": 1.5, - "negative_prompt": "", - "safety_check": True, - "num_inference_steps": 100, - "num_images_per_prompt": 1, }) assert res.image_response is not None @@ -69,6 +60,7 @@ actions: source: |- from livepeer_ai import Livepeer + with Livepeer( http_bearer="", ) as livepeer: @@ -78,8 +70,6 @@ actions: "file_name": "example.file", "content": open("example.file", "rb"), }, - "prompt": "", - "model_id": "", }) assert res.image_to_text_response is not None @@ -94,6 +84,7 @@ actions: source: |- from livepeer_ai import Livepeer + with Livepeer( http_bearer="", ) as livepeer: @@ -103,14 +94,6 @@ actions: "file_name": "example.file", "content": open("example.file", "rb"), }, - "model_id": "", - "height": 576, - "width": 1024, - "fps": 6, - "motion_bucket_id": 127, - "noise_aug_strength": 0.02, - "safety_check": True, - "num_inference_steps": 25, }) assert res.video_response is not None @@ -125,6 +108,7 @@ actions: source: |- from livepeer_ai import Livepeer + with Livepeer( http_bearer="", ) as livepeer: @@ -132,9 +116,6 @@ actions: res = livepeer.generate.live_video_to_video(request={ "subscribe_url": "https://soulful-lava.org/", "publish_url": "https://vain-tabletop.biz", - "control_url": "", - "events_url": "", - "model_id": "", }) assert res.live_video_to_video_response is not None @@ -149,20 +130,13 @@ actions: source: |- from livepeer_ai import Livepeer + with Livepeer( http_bearer="", ) as livepeer: res = livepeer.generate.llm(request={ - "messages": [ - - ], - "model": "", - "temperature": 0.7, - "max_tokens": 256, - "top_p": 1, - "top_k": -1, - "stream": False, + "messages": [], }) assert res.llm_response is not None @@ -177,6 +151,7 @@ actions: source: |- from livepeer_ai import Livepeer + with Livepeer( http_bearer="", ) as livepeer: @@ -186,10 +161,6 @@ actions: "file_name": "example.file", "content": open("example.file", "rb"), }, - "model_id": "", - "multimask_output": True, - "return_logits": True, - "normalize_coords": True, }) assert res.masks_response is not None @@ -204,21 +175,13 @@ actions: source: |- from livepeer_ai import Livepeer + with Livepeer( http_bearer="", ) as livepeer: res = livepeer.generate.text_to_image(request={ - "model_id": "", - "loras": "", "prompt": "", - "height": 576, - "width": 1024, - "guidance_scale": 7.5, - "negative_prompt": "", - "safety_check": True, - "num_inference_steps": 50, - "num_images_per_prompt": 1, }) assert res.image_response is not None @@ -233,15 +196,12 @@ actions: source: |- from livepeer_ai import Livepeer + with Livepeer( http_bearer="", ) as livepeer: - res = livepeer.generate.text_to_speech(request={ - "model_id": "", - "text": "", - "description": "A male speaker delivers a slightly expressive and animated speech with a moderate speed and pitch.", - }) + res = livepeer.generate.text_to_speech(request={}) assert res.audio_response is not None @@ -255,6 +215,7 @@ actions: source: |- from livepeer_ai import Livepeer + with Livepeer( http_bearer="", ) as livepeer: @@ -265,9 +226,6 @@ actions: "file_name": "example.file", "content": open("example.file", "rb"), }, - "model_id": "", - "safety_check": True, - "num_inference_steps": 75, }) assert res.image_response is not None diff --git a/docs/models/components/livevideotovideoparams.md b/docs/models/components/livevideotovideoparams.md index 00cdce2..30269f8 100644 --- a/docs/models/components/livevideotovideoparams.md +++ b/docs/models/components/livevideotovideoparams.md @@ -10,4 +10,6 @@ | `control_url` | *Optional[str]* | :heavy_minus_sign: | URL for subscribing via Trickle protocol for updates in the live video-to-video generation params. | | `events_url` | *Optional[str]* | :heavy_minus_sign: | URL for publishing events via Trickle protocol for pipeline status and logs. | | `model_id` | *Optional[str]* | :heavy_minus_sign: | Name of the pipeline to run in the live video to video job. Notice that this is named model_id for consistency with other routes, but it does not refer to a Hugging Face model ID. The exact model(s) depends on the pipeline implementation and might be configurable via the `params` argument. | -| `params` | [Optional[components.Params]](../../models/components/params.md) | :heavy_minus_sign: | Initial parameters for the pipeline. | \ No newline at end of file +| `params` | [Optional[components.Params]](../../models/components/params.md) | :heavy_minus_sign: | Initial parameters for the pipeline. | +| `gateway_request_id` | *Optional[str]* | :heavy_minus_sign: | The ID of the Gateway request (for logging purposes). | +| `stream_id` | *Optional[str]* | :heavy_minus_sign: | The Stream ID (for logging purposes). | \ No newline at end of file diff --git a/docs/models/components/livevideotovideoresponse.md b/docs/models/components/livevideotovideoresponse.md index be6f816..d94cb2b 100644 --- a/docs/models/components/livevideotovideoresponse.md +++ b/docs/models/components/livevideotovideoresponse.md @@ -10,4 +10,5 @@ Response model for live video-to-video generation. | `subscribe_url` | *str* | :heavy_check_mark: | Source URL of the incoming stream to subscribe to | | `publish_url` | *str* | :heavy_check_mark: | Destination URL of the outgoing stream to publish to | | `control_url` | *Optional[str]* | :heavy_minus_sign: | URL for updating the live video-to-video generation | -| `events_url` | *Optional[str]* | :heavy_minus_sign: | URL for subscribing to events for pipeline status and logs | \ No newline at end of file +| `events_url` | *Optional[str]* | :heavy_minus_sign: | URL for subscribing to events for pipeline status and logs | +| `request_id` | *Optional[str]* | :heavy_minus_sign: | The ID generated for this request | \ No newline at end of file diff --git a/docs/models/components/texttoimageparams.md b/docs/models/components/texttoimageparams.md index 7abc04d..fb3111c 100644 --- a/docs/models/components/texttoimageparams.md +++ b/docs/models/components/texttoimageparams.md @@ -5,9 +5,9 @@ | Field | Type | Required | Description | | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| `prompt` | *str* | :heavy_check_mark: | Text prompt(s) to guide image generation. Separate multiple prompts with '\|' if supported by the model. | | `model_id` | *Optional[str]* | :heavy_minus_sign: | Hugging Face model ID used for image generation. | | `loras` | *Optional[str]* | :heavy_minus_sign: | A LoRA (Low-Rank Adaptation) model and its corresponding weight for image generation. Example: { "latent-consistency/lcm-lora-sdxl": 1.0, "nerijs/pixel-art-xl": 1.2}. | +| `prompt` | *str* | :heavy_check_mark: | Text prompt(s) to guide image generation. Separate multiple prompts with '\|' if supported by the model. | | `height` | *Optional[int]* | :heavy_minus_sign: | The height in pixels of the generated image. | | `width` | *Optional[int]* | :heavy_minus_sign: | The width in pixels of the generated image. | | `guidance_scale` | *Optional[float]* | :heavy_minus_sign: | Encourages model to generate images closely linked to the text prompt (higher values may reduce image quality). | diff --git a/docs/sdks/generate/README.md b/docs/sdks/generate/README.md index 787807d..f965c4f 100644 --- a/docs/sdks/generate/README.md +++ b/docs/sdks/generate/README.md @@ -25,21 +25,13 @@ Generate images from text prompts. ```python from livepeer_ai import Livepeer + with Livepeer( http_bearer="", ) as livepeer: res = livepeer.generate.text_to_image(request={ "prompt": "", - "model_id": "", - "loras": "", - "height": 576, - "width": 1024, - "guidance_scale": 7.5, - "negative_prompt": "", - "safety_check": True, - "num_inference_steps": 50, - "num_images_per_prompt": 1, }) assert res.image_response is not None @@ -78,6 +70,7 @@ Apply image transformations to a provided image. ```python from livepeer_ai import Livepeer + with Livepeer( http_bearer="", ) as livepeer: @@ -88,15 +81,6 @@ with Livepeer( "file_name": "example.file", "content": open("example.file", "rb"), }, - "model_id": "", - "loras": "", - "strength": 0.8, - "guidance_scale": 7.5, - "image_guidance_scale": 1.5, - "negative_prompt": "", - "safety_check": True, - "num_inference_steps": 100, - "num_images_per_prompt": 1, }) assert res.image_response is not None @@ -135,6 +119,7 @@ Generate a video from a provided image. ```python from livepeer_ai import Livepeer + with Livepeer( http_bearer="", ) as livepeer: @@ -144,14 +129,6 @@ with Livepeer( "file_name": "example.file", "content": open("example.file", "rb"), }, - "model_id": "", - "height": 576, - "width": 1024, - "fps": 6, - "motion_bucket_id": 127, - "noise_aug_strength": 0.02, - "safety_check": True, - "num_inference_steps": 25, }) assert res.video_response is not None @@ -190,6 +167,7 @@ Upscale an image by increasing its resolution. ```python from livepeer_ai import Livepeer + with Livepeer( http_bearer="", ) as livepeer: @@ -200,9 +178,6 @@ with Livepeer( "file_name": "example.file", "content": open("example.file", "rb"), }, - "model_id": "", - "safety_check": True, - "num_inference_steps": 75, }) assert res.image_response is not None @@ -241,6 +216,7 @@ Transcribe audio files to text. ```python from livepeer_ai import Livepeer + with Livepeer( http_bearer="", ) as livepeer: @@ -250,8 +226,6 @@ with Livepeer( "file_name": "example.file", "content": open("example.file", "rb"), }, - "model_id": "", - "return_timestamps": "true", }) assert res.text_response is not None @@ -290,6 +264,7 @@ Segment objects in an image. ```python from livepeer_ai import Livepeer + with Livepeer( http_bearer="", ) as livepeer: @@ -299,10 +274,6 @@ with Livepeer( "file_name": "example.file", "content": open("example.file", "rb"), }, - "model_id": "", - "multimask_output": True, - "return_logits": True, - "normalize_coords": True, }) assert res.masks_response is not None @@ -341,20 +312,13 @@ Generate text using a language model. ```python from livepeer_ai import Livepeer + with Livepeer( http_bearer="", ) as livepeer: res = livepeer.generate.llm(request={ - "messages": [ - - ], - "model": "", - "temperature": 0.7, - "max_tokens": 256, - "top_p": 1, - "top_k": -1, - "stream": False, + "messages": [], }) assert res.llm_response is not None @@ -393,6 +357,7 @@ Transform image files to text. ```python from livepeer_ai import Livepeer + with Livepeer( http_bearer="", ) as livepeer: @@ -402,8 +367,6 @@ with Livepeer( "file_name": "example.file", "content": open("example.file", "rb"), }, - "prompt": "", - "model_id": "", }) assert res.image_to_text_response is not None @@ -442,6 +405,7 @@ Apply transformations to a live video streamed to the returned endpoints. ```python from livepeer_ai import Livepeer + with Livepeer( http_bearer="", ) as livepeer: @@ -449,9 +413,6 @@ with Livepeer( res = livepeer.generate.live_video_to_video(request={ "subscribe_url": "https://soulful-lava.org/", "publish_url": "https://vain-tabletop.biz", - "control_url": "", - "events_url": "", - "model_id": "", }) assert res.live_video_to_video_response is not None @@ -490,15 +451,12 @@ Generate a text-to-speech audio file based on the provided text input and speake ```python from livepeer_ai import Livepeer + with Livepeer( http_bearer="", ) as livepeer: - res = livepeer.generate.text_to_speech(request={ - "model_id": "", - "text": "", - "description": "A male speaker delivers a slightly expressive and animated speech with a moderate speed and pitch.", - }) + res = livepeer.generate.text_to_speech(request={}) assert res.audio_response is not None diff --git a/poetry.lock b/poetry.lock index 431e79a..b5c0213 100644 --- a/poetry.lock +++ b/poetry.lock @@ -1,4 +1,4 @@ -# This file is automatically @generated by Poetry 2.0.1 and should not be changed by hand. +# This file is automatically @generated by Poetry 2.1.2 and should not be changed by hand. [[package]] name = "annotated-types" @@ -32,7 +32,7 @@ typing-extensions = {version = ">=4.1", markers = "python_version < \"3.11\""} [package.extras] doc = ["Sphinx (>=7)", "packaging", "sphinx-autodoc-typehints (>=1.2.0)", "sphinx-rtd-theme"] -test = ["anyio[trio]", "coverage[toml] (>=7)", "exceptiongroup (>=1.2.0)", "hypothesis (>=4.0)", "psutil (>=5.9)", "pytest (>=7.0)", "pytest-mock (>=3.6.1)", "trustme", "uvloop (>=0.17)"] +test = ["anyio[trio]", "coverage[toml] (>=7)", "exceptiongroup (>=1.2.0)", "hypothesis (>=4.0)", "psutil (>=5.9)", "pytest (>=7.0)", "pytest-mock (>=3.6.1)", "trustme", "uvloop (>=0.17) ; platform_python_implementation == \"CPython\" and platform_system != \"Windows\""] trio = ["trio (>=0.23)"] [[package]] @@ -91,21 +91,6 @@ files = [ graph = ["objgraph (>=1.7.2)"] profile = ["gprof2dot (>=2022.7.29)"] -[[package]] -name = "eval-type-backport" -version = "0.2.0" -description = "Like `typing._eval_type`, but lets older Python versions use newer typing features." -optional = false -python-versions = ">=3.8" -groups = ["main"] -files = [ - {file = "eval_type_backport-0.2.0-py3-none-any.whl", hash = "sha256:ac2f73d30d40c5a30a80b8739a789d6bb5e49fdffa66d7912667e2015d9c9933"}, - {file = "eval_type_backport-0.2.0.tar.gz", hash = "sha256:68796cfbc7371ebf923f03bdf7bef415f3ec098aeced24e054b253a0e78f7b37"}, -] - -[package.extras] -tests = ["pytest"] - [[package]] name = "exceptiongroup" version = "1.2.2" @@ -175,7 +160,7 @@ httpcore = "==1.*" idna = "*" [package.extras] -brotli = ["brotli", "brotlicffi"] +brotli = ["brotli ; platform_python_implementation == \"CPython\"", "brotlicffi ; platform_python_implementation != \"CPython\""] cli = ["click (==8.*)", "pygments (==2.*)", "rich (>=10,<14)"] http2 = ["h2 (>=3,<5)"] socks = ["socksio (==1.*)"] @@ -222,50 +207,44 @@ files = [ [[package]] name = "mypy" -version = "1.14.1" +version = "1.15.0" description = "Optional static typing for Python" optional = false -python-versions = ">=3.8" +python-versions = ">=3.9" groups = ["dev"] files = [ - {file = "mypy-1.14.1-cp310-cp310-macosx_10_9_x86_64.whl", hash = "sha256:52686e37cf13d559f668aa398dd7ddf1f92c5d613e4f8cb262be2fb4fedb0fcb"}, - {file = "mypy-1.14.1-cp310-cp310-macosx_11_0_arm64.whl", hash = "sha256:1fb545ca340537d4b45d3eecdb3def05e913299ca72c290326be19b3804b39c0"}, - {file = "mypy-1.14.1-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:90716d8b2d1f4cd503309788e51366f07c56635a3309b0f6a32547eaaa36a64d"}, - {file = "mypy-1.14.1-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:2ae753f5c9fef278bcf12e1a564351764f2a6da579d4a81347e1d5a15819997b"}, - {file = "mypy-1.14.1-cp310-cp310-musllinux_1_2_x86_64.whl", hash = "sha256:e0fe0f5feaafcb04505bcf439e991c6d8f1bf8b15f12b05feeed96e9e7bf1427"}, - {file = "mypy-1.14.1-cp310-cp310-win_amd64.whl", hash = "sha256:7d54bd85b925e501c555a3227f3ec0cfc54ee8b6930bd6141ec872d1c572f81f"}, - {file = "mypy-1.14.1-cp311-cp311-macosx_10_9_x86_64.whl", hash = "sha256:f995e511de847791c3b11ed90084a7a0aafdc074ab88c5a9711622fe4751138c"}, - {file = "mypy-1.14.1-cp311-cp311-macosx_11_0_arm64.whl", hash = "sha256:d64169ec3b8461311f8ce2fd2eb5d33e2d0f2c7b49116259c51d0d96edee48d1"}, - {file = "mypy-1.14.1-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:ba24549de7b89b6381b91fbc068d798192b1b5201987070319889e93038967a8"}, - {file = "mypy-1.14.1-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:183cf0a45457d28ff9d758730cd0210419ac27d4d3f285beda038c9083363b1f"}, - {file = "mypy-1.14.1-cp311-cp311-musllinux_1_2_x86_64.whl", hash = "sha256:f2a0ecc86378f45347f586e4163d1769dd81c5a223d577fe351f26b179e148b1"}, - {file = "mypy-1.14.1-cp311-cp311-win_amd64.whl", hash = "sha256:ad3301ebebec9e8ee7135d8e3109ca76c23752bac1e717bc84cd3836b4bf3eae"}, - {file = "mypy-1.14.1-cp312-cp312-macosx_10_13_x86_64.whl", hash = "sha256:30ff5ef8519bbc2e18b3b54521ec319513a26f1bba19a7582e7b1f58a6e69f14"}, - {file = "mypy-1.14.1-cp312-cp312-macosx_11_0_arm64.whl", hash = "sha256:cb9f255c18052343c70234907e2e532bc7e55a62565d64536dbc7706a20b78b9"}, - {file = "mypy-1.14.1-cp312-cp312-manylinux_2_17_aarch64.manylinux2014_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:8b4e3413e0bddea671012b063e27591b953d653209e7a4fa5e48759cda77ca11"}, - {file = "mypy-1.14.1-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:553c293b1fbdebb6c3c4030589dab9fafb6dfa768995a453d8a5d3b23784af2e"}, - {file = "mypy-1.14.1-cp312-cp312-musllinux_1_2_x86_64.whl", hash = "sha256:fad79bfe3b65fe6a1efaed97b445c3d37f7be9fdc348bdb2d7cac75579607c89"}, - {file = "mypy-1.14.1-cp312-cp312-win_amd64.whl", hash = "sha256:8fa2220e54d2946e94ab6dbb3ba0a992795bd68b16dc852db33028df2b00191b"}, - {file = "mypy-1.14.1-cp313-cp313-macosx_10_13_x86_64.whl", hash = "sha256:92c3ed5afb06c3a8e188cb5da4984cab9ec9a77ba956ee419c68a388b4595255"}, - {file = "mypy-1.14.1-cp313-cp313-macosx_11_0_arm64.whl", hash = "sha256:dbec574648b3e25f43d23577309b16534431db4ddc09fda50841f1e34e64ed34"}, - {file = "mypy-1.14.1-cp313-cp313-manylinux_2_17_aarch64.manylinux2014_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:8c6d94b16d62eb3e947281aa7347d78236688e21081f11de976376cf010eb31a"}, - {file = "mypy-1.14.1-cp313-cp313-manylinux_2_17_x86_64.manylinux2014_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:d4b19b03fdf54f3c5b2fa474c56b4c13c9dbfb9a2db4370ede7ec11a2c5927d9"}, - {file = "mypy-1.14.1-cp313-cp313-musllinux_1_2_x86_64.whl", hash = "sha256:0c911fde686394753fff899c409fd4e16e9b294c24bfd5e1ea4675deae1ac6fd"}, - {file = "mypy-1.14.1-cp313-cp313-win_amd64.whl", hash = "sha256:8b21525cb51671219f5307be85f7e646a153e5acc656e5cebf64bfa076c50107"}, - {file = "mypy-1.14.1-cp38-cp38-macosx_10_9_x86_64.whl", hash = "sha256:7084fb8f1128c76cd9cf68fe5971b37072598e7c31b2f9f95586b65c741a9d31"}, - {file = "mypy-1.14.1-cp38-cp38-macosx_11_0_arm64.whl", hash = "sha256:8f845a00b4f420f693f870eaee5f3e2692fa84cc8514496114649cfa8fd5e2c6"}, - {file = "mypy-1.14.1-cp38-cp38-manylinux_2_17_aarch64.manylinux2014_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:44bf464499f0e3a2d14d58b54674dee25c031703b2ffc35064bd0df2e0fac319"}, - {file = "mypy-1.14.1-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:c99f27732c0b7dc847adb21c9d47ce57eb48fa33a17bc6d7d5c5e9f9e7ae5bac"}, - {file = "mypy-1.14.1-cp38-cp38-musllinux_1_2_x86_64.whl", hash = "sha256:bce23c7377b43602baa0bd22ea3265c49b9ff0b76eb315d6c34721af4cdf1d9b"}, - {file = "mypy-1.14.1-cp38-cp38-win_amd64.whl", hash = "sha256:8edc07eeade7ebc771ff9cf6b211b9a7d93687ff892150cb5692e4f4272b0837"}, - {file = "mypy-1.14.1-cp39-cp39-macosx_10_9_x86_64.whl", hash = "sha256:3888a1816d69f7ab92092f785a462944b3ca16d7c470d564165fe703b0970c35"}, - {file = "mypy-1.14.1-cp39-cp39-macosx_11_0_arm64.whl", hash = "sha256:46c756a444117c43ee984bd055db99e498bc613a70bbbc120272bd13ca579fbc"}, - {file = "mypy-1.14.1-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:27fc248022907e72abfd8e22ab1f10e903915ff69961174784a3900a8cba9ad9"}, - {file = "mypy-1.14.1-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:499d6a72fb7e5de92218db961f1a66d5f11783f9ae549d214617edab5d4dbdbb"}, - {file = "mypy-1.14.1-cp39-cp39-musllinux_1_2_x86_64.whl", hash = "sha256:57961db9795eb566dc1d1b4e9139ebc4c6b0cb6e7254ecde69d1552bf7613f60"}, - {file = "mypy-1.14.1-cp39-cp39-win_amd64.whl", hash = "sha256:07ba89fdcc9451f2ebb02853deb6aaaa3d2239a236669a63ab3801bbf923ef5c"}, - {file = "mypy-1.14.1-py3-none-any.whl", hash = "sha256:b66a60cc4073aeb8ae00057f9c1f64d49e90f918fbcef9a977eb121da8b8f1d1"}, - {file = "mypy-1.14.1.tar.gz", hash = "sha256:7ec88144fe9b510e8475ec2f5f251992690fcf89ccb4500b214b4226abcd32d6"}, + {file = "mypy-1.15.0-cp310-cp310-macosx_10_9_x86_64.whl", hash = "sha256:979e4e1a006511dacf628e36fadfecbcc0160a8af6ca7dad2f5025529e082c13"}, + {file = "mypy-1.15.0-cp310-cp310-macosx_11_0_arm64.whl", hash = "sha256:c4bb0e1bd29f7d34efcccd71cf733580191e9a264a2202b0239da95984c5b559"}, + {file = "mypy-1.15.0-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:be68172e9fd9ad8fb876c6389f16d1c1b5f100ffa779f77b1fb2176fcc9ab95b"}, + {file = "mypy-1.15.0-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:c7be1e46525adfa0d97681432ee9fcd61a3964c2446795714699a998d193f1a3"}, + {file = "mypy-1.15.0-cp310-cp310-musllinux_1_2_x86_64.whl", hash = "sha256:2e2c2e6d3593f6451b18588848e66260ff62ccca522dd231cd4dd59b0160668b"}, + {file = "mypy-1.15.0-cp310-cp310-win_amd64.whl", hash = "sha256:6983aae8b2f653e098edb77f893f7b6aca69f6cffb19b2cc7443f23cce5f4828"}, + {file = "mypy-1.15.0-cp311-cp311-macosx_10_9_x86_64.whl", hash = "sha256:2922d42e16d6de288022e5ca321cd0618b238cfc5570e0263e5ba0a77dbef56f"}, + {file = "mypy-1.15.0-cp311-cp311-macosx_11_0_arm64.whl", hash = "sha256:2ee2d57e01a7c35de00f4634ba1bbf015185b219e4dc5909e281016df43f5ee5"}, + {file = "mypy-1.15.0-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:973500e0774b85d9689715feeffcc980193086551110fd678ebe1f4342fb7c5e"}, + {file = "mypy-1.15.0-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:5a95fb17c13e29d2d5195869262f8125dfdb5c134dc8d9a9d0aecf7525b10c2c"}, + {file = "mypy-1.15.0-cp311-cp311-musllinux_1_2_x86_64.whl", hash = "sha256:1905f494bfd7d85a23a88c5d97840888a7bd516545fc5aaedff0267e0bb54e2f"}, + {file = "mypy-1.15.0-cp311-cp311-win_amd64.whl", hash = "sha256:c9817fa23833ff189db061e6d2eff49b2f3b6ed9856b4a0a73046e41932d744f"}, + {file = "mypy-1.15.0-cp312-cp312-macosx_10_13_x86_64.whl", hash = "sha256:aea39e0583d05124836ea645f412e88a5c7d0fd77a6d694b60d9b6b2d9f184fd"}, + {file = "mypy-1.15.0-cp312-cp312-macosx_11_0_arm64.whl", hash = "sha256:2f2147ab812b75e5b5499b01ade1f4a81489a147c01585cda36019102538615f"}, + {file = "mypy-1.15.0-cp312-cp312-manylinux_2_17_aarch64.manylinux2014_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:ce436f4c6d218a070048ed6a44c0bbb10cd2cc5e272b29e7845f6a2f57ee4464"}, + {file = "mypy-1.15.0-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:8023ff13985661b50a5928fc7a5ca15f3d1affb41e5f0a9952cb68ef090b31ee"}, + {file = "mypy-1.15.0-cp312-cp312-musllinux_1_2_x86_64.whl", hash = "sha256:1124a18bc11a6a62887e3e137f37f53fbae476dc36c185d549d4f837a2a6a14e"}, + {file = "mypy-1.15.0-cp312-cp312-win_amd64.whl", hash = "sha256:171a9ca9a40cd1843abeca0e405bc1940cd9b305eaeea2dda769ba096932bb22"}, + {file = "mypy-1.15.0-cp313-cp313-macosx_10_13_x86_64.whl", hash = "sha256:93faf3fdb04768d44bf28693293f3904bbb555d076b781ad2530214ee53e3445"}, + {file = "mypy-1.15.0-cp313-cp313-macosx_11_0_arm64.whl", hash = "sha256:811aeccadfb730024c5d3e326b2fbe9249bb7413553f15499a4050f7c30e801d"}, + {file = "mypy-1.15.0-cp313-cp313-manylinux_2_17_aarch64.manylinux2014_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:98b7b9b9aedb65fe628c62a6dc57f6d5088ef2dfca37903a7d9ee374d03acca5"}, + {file = "mypy-1.15.0-cp313-cp313-manylinux_2_17_x86_64.manylinux2014_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:c43a7682e24b4f576d93072216bf56eeff70d9140241f9edec0c104d0c515036"}, + {file = "mypy-1.15.0-cp313-cp313-musllinux_1_2_x86_64.whl", hash = "sha256:baefc32840a9f00babd83251560e0ae1573e2f9d1b067719479bfb0e987c6357"}, + {file = "mypy-1.15.0-cp313-cp313-win_amd64.whl", hash = "sha256:b9378e2c00146c44793c98b8d5a61039a048e31f429fb0eb546d93f4b000bedf"}, + {file = "mypy-1.15.0-cp39-cp39-macosx_10_9_x86_64.whl", hash = "sha256:e601a7fa172c2131bff456bb3ee08a88360760d0d2f8cbd7a75a65497e2df078"}, + {file = "mypy-1.15.0-cp39-cp39-macosx_11_0_arm64.whl", hash = "sha256:712e962a6357634fef20412699a3655c610110e01cdaa6180acec7fc9f8513ba"}, + {file = "mypy-1.15.0-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:f95579473af29ab73a10bada2f9722856792a36ec5af5399b653aa28360290a5"}, + {file = "mypy-1.15.0-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:8f8722560a14cde92fdb1e31597760dc35f9f5524cce17836c0d22841830fd5b"}, + {file = "mypy-1.15.0-cp39-cp39-musllinux_1_2_x86_64.whl", hash = "sha256:1fbb8da62dc352133d7d7ca90ed2fb0e9d42bb1a32724c287d3c76c58cbaa9c2"}, + {file = "mypy-1.15.0-cp39-cp39-win_amd64.whl", hash = "sha256:d10d994b41fb3497719bbf866f227b3489048ea4bbbb5015357db306249f7980"}, + {file = "mypy-1.15.0-py3-none-any.whl", hash = "sha256:5469affef548bd1895d86d3bf10ce2b44e33d86923c29e4d675b3e323437ea3e"}, + {file = "mypy-1.15.0.tar.gz", hash = "sha256:404534629d51d3efea5c800ee7c42b72a6554d6c400e6a79eafe15d11341fd43"}, ] [package.dependencies] @@ -286,7 +265,7 @@ version = "1.0.0" description = "Type system extensions for programs checked with the mypy type checker." optional = false python-versions = ">=3.5" -groups = ["main", "dev"] +groups = ["dev"] files = [ {file = "mypy_extensions-1.0.0-py3-none-any.whl", hash = "sha256:4392f6c0eb8a5668a69e23d168ffa70f0be9ccfd32b5cc2d26a34ae5b844552d"}, {file = "mypy_extensions-1.0.0.tar.gz", hash = "sha256:75dbf8955dc00442a438fc4d0666508a9a97b6bd41aa2f0ffe9d2f2725af0782"}, @@ -311,133 +290,133 @@ type = ["mypy (>=1.8)"] [[package]] name = "pydantic" -version = "2.10.3" +version = "2.11.3" description = "Data validation using Python type hints" optional = false -python-versions = ">=3.8" +python-versions = ">=3.9" groups = ["main"] files = [ - {file = "pydantic-2.10.3-py3-none-any.whl", hash = "sha256:be04d85bbc7b65651c5f8e6b9976ed9c6f41782a55524cef079a34a0bb82144d"}, - {file = "pydantic-2.10.3.tar.gz", hash = "sha256:cb5ac360ce894ceacd69c403187900a02c4b20b693a9dd1d643e1effab9eadf9"}, + {file = "pydantic-2.11.3-py3-none-any.whl", hash = "sha256:a082753436a07f9ba1289c6ffa01cd93db3548776088aa917cc43b63f68fa60f"}, + {file = "pydantic-2.11.3.tar.gz", hash = "sha256:7471657138c16adad9322fe3070c0116dd6c3ad8d649300e3cbdfe91f4db4ec3"}, ] [package.dependencies] annotated-types = ">=0.6.0" -pydantic-core = "2.27.1" +pydantic-core = "2.33.1" typing-extensions = ">=4.12.2" +typing-inspection = ">=0.4.0" [package.extras] email = ["email-validator (>=2.0.0)"] -timezone = ["tzdata"] +timezone = ["tzdata ; python_version >= \"3.9\" and platform_system == \"Windows\""] [[package]] name = "pydantic-core" -version = "2.27.1" +version = "2.33.1" description = "Core functionality for Pydantic validation and serialization" optional = false -python-versions = ">=3.8" +python-versions = ">=3.9" groups = ["main"] files = [ - {file = "pydantic_core-2.27.1-cp310-cp310-macosx_10_12_x86_64.whl", hash = "sha256:71a5e35c75c021aaf400ac048dacc855f000bdfed91614b4a726f7432f1f3d6a"}, - {file = "pydantic_core-2.27.1-cp310-cp310-macosx_11_0_arm64.whl", hash = "sha256:f82d068a2d6ecfc6e054726080af69a6764a10015467d7d7b9f66d6ed5afa23b"}, - {file = "pydantic_core-2.27.1-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:121ceb0e822f79163dd4699e4c54f5ad38b157084d97b34de8b232bcaad70278"}, - {file = "pydantic_core-2.27.1-cp310-cp310-manylinux_2_17_armv7l.manylinux2014_armv7l.whl", hash = "sha256:4603137322c18eaf2e06a4495f426aa8d8388940f3c457e7548145011bb68e05"}, - {file = "pydantic_core-2.27.1-cp310-cp310-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:a33cd6ad9017bbeaa9ed78a2e0752c5e250eafb9534f308e7a5f7849b0b1bfb4"}, - {file = "pydantic_core-2.27.1-cp310-cp310-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:15cc53a3179ba0fcefe1e3ae50beb2784dede4003ad2dfd24f81bba4b23a454f"}, - {file = "pydantic_core-2.27.1-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:45d9c5eb9273aa50999ad6adc6be5e0ecea7e09dbd0d31bd0c65a55a2592ca08"}, - {file = "pydantic_core-2.27.1-cp310-cp310-manylinux_2_5_i686.manylinux1_i686.whl", hash = "sha256:8bf7b66ce12a2ac52d16f776b31d16d91033150266eb796967a7e4621707e4f6"}, - {file = "pydantic_core-2.27.1-cp310-cp310-musllinux_1_1_aarch64.whl", hash = "sha256:655d7dd86f26cb15ce8a431036f66ce0318648f8853d709b4167786ec2fa4807"}, - {file = "pydantic_core-2.27.1-cp310-cp310-musllinux_1_1_armv7l.whl", hash = "sha256:5556470f1a2157031e676f776c2bc20acd34c1990ca5f7e56f1ebf938b9ab57c"}, - {file = "pydantic_core-2.27.1-cp310-cp310-musllinux_1_1_x86_64.whl", hash = "sha256:f69ed81ab24d5a3bd93861c8c4436f54afdf8e8cc421562b0c7504cf3be58206"}, - {file = "pydantic_core-2.27.1-cp310-none-win32.whl", hash = "sha256:f5a823165e6d04ccea61a9f0576f345f8ce40ed533013580e087bd4d7442b52c"}, - {file = "pydantic_core-2.27.1-cp310-none-win_amd64.whl", hash = "sha256:57866a76e0b3823e0b56692d1a0bf722bffb324839bb5b7226a7dbd6c9a40b17"}, - {file = "pydantic_core-2.27.1-cp311-cp311-macosx_10_12_x86_64.whl", hash = "sha256:ac3b20653bdbe160febbea8aa6c079d3df19310d50ac314911ed8cc4eb7f8cb8"}, - {file = "pydantic_core-2.27.1-cp311-cp311-macosx_11_0_arm64.whl", hash = "sha256:a5a8e19d7c707c4cadb8c18f5f60c843052ae83c20fa7d44f41594c644a1d330"}, - {file = "pydantic_core-2.27.1-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:7f7059ca8d64fea7f238994c97d91f75965216bcbe5f695bb44f354893f11d52"}, - {file = "pydantic_core-2.27.1-cp311-cp311-manylinux_2_17_armv7l.manylinux2014_armv7l.whl", hash = "sha256:bed0f8a0eeea9fb72937ba118f9db0cb7e90773462af7962d382445f3005e5a4"}, - {file = "pydantic_core-2.27.1-cp311-cp311-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:a3cb37038123447cf0f3ea4c74751f6a9d7afef0eb71aa07bf5f652b5e6a132c"}, - {file = "pydantic_core-2.27.1-cp311-cp311-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:84286494f6c5d05243456e04223d5a9417d7f443c3b76065e75001beb26f88de"}, - {file = "pydantic_core-2.27.1-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:acc07b2cfc5b835444b44a9956846b578d27beeacd4b52e45489e93276241025"}, - {file = "pydantic_core-2.27.1-cp311-cp311-manylinux_2_5_i686.manylinux1_i686.whl", hash = "sha256:4fefee876e07a6e9aad7a8c8c9f85b0cdbe7df52b8a9552307b09050f7512c7e"}, - {file = "pydantic_core-2.27.1-cp311-cp311-musllinux_1_1_aarch64.whl", hash = "sha256:258c57abf1188926c774a4c94dd29237e77eda19462e5bb901d88adcab6af919"}, - {file = "pydantic_core-2.27.1-cp311-cp311-musllinux_1_1_armv7l.whl", hash = "sha256:35c14ac45fcfdf7167ca76cc80b2001205a8d5d16d80524e13508371fb8cdd9c"}, - {file = "pydantic_core-2.27.1-cp311-cp311-musllinux_1_1_x86_64.whl", hash = "sha256:d1b26e1dff225c31897696cab7d4f0a315d4c0d9e8666dbffdb28216f3b17fdc"}, - {file = "pydantic_core-2.27.1-cp311-none-win32.whl", hash = "sha256:2cdf7d86886bc6982354862204ae3b2f7f96f21a3eb0ba5ca0ac42c7b38598b9"}, - {file = "pydantic_core-2.27.1-cp311-none-win_amd64.whl", hash = "sha256:3af385b0cee8df3746c3f406f38bcbfdc9041b5c2d5ce3e5fc6637256e60bbc5"}, - {file = "pydantic_core-2.27.1-cp311-none-win_arm64.whl", hash = "sha256:81f2ec23ddc1b476ff96563f2e8d723830b06dceae348ce02914a37cb4e74b89"}, - {file = "pydantic_core-2.27.1-cp312-cp312-macosx_10_12_x86_64.whl", hash = "sha256:9cbd94fc661d2bab2bc702cddd2d3370bbdcc4cd0f8f57488a81bcce90c7a54f"}, - {file = "pydantic_core-2.27.1-cp312-cp312-macosx_11_0_arm64.whl", hash = "sha256:5f8c4718cd44ec1580e180cb739713ecda2bdee1341084c1467802a417fe0f02"}, - {file = "pydantic_core-2.27.1-cp312-cp312-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:15aae984e46de8d376df515f00450d1522077254ef6b7ce189b38ecee7c9677c"}, - {file = "pydantic_core-2.27.1-cp312-cp312-manylinux_2_17_armv7l.manylinux2014_armv7l.whl", hash = "sha256:1ba5e3963344ff25fc8c40da90f44b0afca8cfd89d12964feb79ac1411a260ac"}, - {file = "pydantic_core-2.27.1-cp312-cp312-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:992cea5f4f3b29d6b4f7f1726ed8ee46c8331c6b4eed6db5b40134c6fe1768bb"}, - {file = "pydantic_core-2.27.1-cp312-cp312-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:0325336f348dbee6550d129b1627cb8f5351a9dc91aad141ffb96d4937bd9529"}, - {file = "pydantic_core-2.27.1-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:7597c07fbd11515f654d6ece3d0e4e5093edc30a436c63142d9a4b8e22f19c35"}, - {file = "pydantic_core-2.27.1-cp312-cp312-manylinux_2_5_i686.manylinux1_i686.whl", hash = "sha256:3bbd5d8cc692616d5ef6fbbbd50dbec142c7e6ad9beb66b78a96e9c16729b089"}, - {file = "pydantic_core-2.27.1-cp312-cp312-musllinux_1_1_aarch64.whl", hash = "sha256:dc61505e73298a84a2f317255fcc72b710b72980f3a1f670447a21efc88f8381"}, - {file = "pydantic_core-2.27.1-cp312-cp312-musllinux_1_1_armv7l.whl", hash = "sha256:e1f735dc43da318cad19b4173dd1ffce1d84aafd6c9b782b3abc04a0d5a6f5bb"}, - {file = "pydantic_core-2.27.1-cp312-cp312-musllinux_1_1_x86_64.whl", hash = "sha256:f4e5658dbffe8843a0f12366a4c2d1c316dbe09bb4dfbdc9d2d9cd6031de8aae"}, - {file = "pydantic_core-2.27.1-cp312-none-win32.whl", hash = "sha256:672ebbe820bb37988c4d136eca2652ee114992d5d41c7e4858cdd90ea94ffe5c"}, - {file = "pydantic_core-2.27.1-cp312-none-win_amd64.whl", hash = "sha256:66ff044fd0bb1768688aecbe28b6190f6e799349221fb0de0e6f4048eca14c16"}, - {file = "pydantic_core-2.27.1-cp312-none-win_arm64.whl", hash = "sha256:9a3b0793b1bbfd4146304e23d90045f2a9b5fd5823aa682665fbdaf2a6c28f3e"}, - {file = "pydantic_core-2.27.1-cp313-cp313-macosx_10_12_x86_64.whl", hash = "sha256:f216dbce0e60e4d03e0c4353c7023b202d95cbaeff12e5fd2e82ea0a66905073"}, - {file = "pydantic_core-2.27.1-cp313-cp313-macosx_11_0_arm64.whl", hash = "sha256:a2e02889071850bbfd36b56fd6bc98945e23670773bc7a76657e90e6b6603c08"}, - {file = "pydantic_core-2.27.1-cp313-cp313-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:42b0e23f119b2b456d07ca91b307ae167cc3f6c846a7b169fca5326e32fdc6cf"}, - {file = "pydantic_core-2.27.1-cp313-cp313-manylinux_2_17_armv7l.manylinux2014_armv7l.whl", hash = "sha256:764be71193f87d460a03f1f7385a82e226639732214b402f9aa61f0d025f0737"}, - {file = "pydantic_core-2.27.1-cp313-cp313-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:1c00666a3bd2f84920a4e94434f5974d7bbc57e461318d6bb34ce9cdbbc1f6b2"}, - {file = "pydantic_core-2.27.1-cp313-cp313-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:3ccaa88b24eebc0f849ce0a4d09e8a408ec5a94afff395eb69baf868f5183107"}, - {file = "pydantic_core-2.27.1-cp313-cp313-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:c65af9088ac534313e1963443d0ec360bb2b9cba6c2909478d22c2e363d98a51"}, - {file = "pydantic_core-2.27.1-cp313-cp313-manylinux_2_5_i686.manylinux1_i686.whl", hash = "sha256:206b5cf6f0c513baffaeae7bd817717140770c74528f3e4c3e1cec7871ddd61a"}, - {file = "pydantic_core-2.27.1-cp313-cp313-musllinux_1_1_aarch64.whl", hash = "sha256:062f60e512fc7fff8b8a9d680ff0ddaaef0193dba9fa83e679c0c5f5fbd018bc"}, - {file = "pydantic_core-2.27.1-cp313-cp313-musllinux_1_1_armv7l.whl", hash = "sha256:a0697803ed7d4af5e4c1adf1670af078f8fcab7a86350e969f454daf598c4960"}, - {file = "pydantic_core-2.27.1-cp313-cp313-musllinux_1_1_x86_64.whl", hash = "sha256:58ca98a950171f3151c603aeea9303ef6c235f692fe555e883591103da709b23"}, - {file = "pydantic_core-2.27.1-cp313-none-win32.whl", hash = "sha256:8065914ff79f7eab1599bd80406681f0ad08f8e47c880f17b416c9f8f7a26d05"}, - {file = "pydantic_core-2.27.1-cp313-none-win_amd64.whl", hash = "sha256:ba630d5e3db74c79300d9a5bdaaf6200172b107f263c98a0539eeecb857b2337"}, - {file = "pydantic_core-2.27.1-cp313-none-win_arm64.whl", hash = "sha256:45cf8588c066860b623cd11c4ba687f8d7175d5f7ef65f7129df8a394c502de5"}, - {file = "pydantic_core-2.27.1-cp38-cp38-macosx_10_12_x86_64.whl", hash = "sha256:5897bec80a09b4084aee23f9b73a9477a46c3304ad1d2d07acca19723fb1de62"}, - {file = "pydantic_core-2.27.1-cp38-cp38-macosx_11_0_arm64.whl", hash = "sha256:d0165ab2914379bd56908c02294ed8405c252250668ebcb438a55494c69f44ab"}, - {file = "pydantic_core-2.27.1-cp38-cp38-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:6b9af86e1d8e4cfc82c2022bfaa6f459381a50b94a29e95dcdda8442d6d83864"}, - {file = "pydantic_core-2.27.1-cp38-cp38-manylinux_2_17_armv7l.manylinux2014_armv7l.whl", hash = "sha256:5f6c8a66741c5f5447e047ab0ba7a1c61d1e95580d64bce852e3df1f895c4067"}, - {file = "pydantic_core-2.27.1-cp38-cp38-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:9a42d6a8156ff78981f8aa56eb6394114e0dedb217cf8b729f438f643608cbcd"}, - {file = "pydantic_core-2.27.1-cp38-cp38-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:64c65f40b4cd8b0e049a8edde07e38b476da7e3aaebe63287c899d2cff253fa5"}, - {file = "pydantic_core-2.27.1-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:9fdcf339322a3fae5cbd504edcefddd5a50d9ee00d968696846f089b4432cf78"}, - {file = "pydantic_core-2.27.1-cp38-cp38-manylinux_2_5_i686.manylinux1_i686.whl", hash = "sha256:bf99c8404f008750c846cb4ac4667b798a9f7de673ff719d705d9b2d6de49c5f"}, - {file = "pydantic_core-2.27.1-cp38-cp38-musllinux_1_1_aarch64.whl", hash = "sha256:8f1edcea27918d748c7e5e4d917297b2a0ab80cad10f86631e488b7cddf76a36"}, - {file = "pydantic_core-2.27.1-cp38-cp38-musllinux_1_1_armv7l.whl", hash = "sha256:159cac0a3d096f79ab6a44d77a961917219707e2a130739c64d4dd46281f5c2a"}, - {file = "pydantic_core-2.27.1-cp38-cp38-musllinux_1_1_x86_64.whl", hash = "sha256:029d9757eb621cc6e1848fa0b0310310de7301057f623985698ed7ebb014391b"}, - {file = "pydantic_core-2.27.1-cp38-none-win32.whl", hash = "sha256:a28af0695a45f7060e6f9b7092558a928a28553366519f64083c63a44f70e618"}, - {file = "pydantic_core-2.27.1-cp38-none-win_amd64.whl", hash = "sha256:2d4567c850905d5eaaed2f7a404e61012a51caf288292e016360aa2b96ff38d4"}, - {file = "pydantic_core-2.27.1-cp39-cp39-macosx_10_12_x86_64.whl", hash = "sha256:e9386266798d64eeb19dd3677051f5705bf873e98e15897ddb7d76f477131967"}, - {file = "pydantic_core-2.27.1-cp39-cp39-macosx_11_0_arm64.whl", hash = "sha256:4228b5b646caa73f119b1ae756216b59cc6e2267201c27d3912b592c5e323b60"}, - {file = "pydantic_core-2.27.1-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:0b3dfe500de26c52abe0477dde16192ac39c98f05bf2d80e76102d394bd13854"}, - {file = "pydantic_core-2.27.1-cp39-cp39-manylinux_2_17_armv7l.manylinux2014_armv7l.whl", hash = "sha256:aee66be87825cdf72ac64cb03ad4c15ffef4143dbf5c113f64a5ff4f81477bf9"}, - {file = "pydantic_core-2.27.1-cp39-cp39-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:3b748c44bb9f53031c8cbc99a8a061bc181c1000c60a30f55393b6e9c45cc5bd"}, - {file = "pydantic_core-2.27.1-cp39-cp39-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:5ca038c7f6a0afd0b2448941b6ef9d5e1949e999f9e5517692eb6da58e9d44be"}, - {file = "pydantic_core-2.27.1-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:6e0bd57539da59a3e4671b90a502da9a28c72322a4f17866ba3ac63a82c4498e"}, - {file = "pydantic_core-2.27.1-cp39-cp39-manylinux_2_5_i686.manylinux1_i686.whl", hash = "sha256:ac6c2c45c847bbf8f91930d88716a0fb924b51e0c6dad329b793d670ec5db792"}, - {file = "pydantic_core-2.27.1-cp39-cp39-musllinux_1_1_aarch64.whl", hash = "sha256:b94d4ba43739bbe8b0ce4262bcc3b7b9f31459ad120fb595627eaeb7f9b9ca01"}, - {file = "pydantic_core-2.27.1-cp39-cp39-musllinux_1_1_armv7l.whl", hash = "sha256:00e6424f4b26fe82d44577b4c842d7df97c20be6439e8e685d0d715feceb9fb9"}, - {file = "pydantic_core-2.27.1-cp39-cp39-musllinux_1_1_x86_64.whl", hash = "sha256:38de0a70160dd97540335b7ad3a74571b24f1dc3ed33f815f0880682e6880131"}, - {file = "pydantic_core-2.27.1-cp39-none-win32.whl", hash = "sha256:7ccebf51efc61634f6c2344da73e366c75e735960b5654b63d7e6f69a5885fa3"}, - {file = "pydantic_core-2.27.1-cp39-none-win_amd64.whl", hash = "sha256:a57847b090d7892f123726202b7daa20df6694cbd583b67a592e856bff603d6c"}, - {file = "pydantic_core-2.27.1-pp310-pypy310_pp73-macosx_10_12_x86_64.whl", hash = "sha256:3fa80ac2bd5856580e242dbc202db873c60a01b20309c8319b5c5986fbe53ce6"}, - {file = "pydantic_core-2.27.1-pp310-pypy310_pp73-macosx_11_0_arm64.whl", hash = "sha256:d950caa237bb1954f1b8c9227b5065ba6875ac9771bb8ec790d956a699b78676"}, - {file = "pydantic_core-2.27.1-pp310-pypy310_pp73-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:0e4216e64d203e39c62df627aa882f02a2438d18a5f21d7f721621f7a5d3611d"}, - {file = "pydantic_core-2.27.1-pp310-pypy310_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:02a3d637bd387c41d46b002f0e49c52642281edacd2740e5a42f7017feea3f2c"}, - {file = "pydantic_core-2.27.1-pp310-pypy310_pp73-manylinux_2_5_i686.manylinux1_i686.whl", hash = "sha256:161c27ccce13b6b0c8689418da3885d3220ed2eae2ea5e9b2f7f3d48f1d52c27"}, - {file = "pydantic_core-2.27.1-pp310-pypy310_pp73-musllinux_1_1_aarch64.whl", hash = "sha256:19910754e4cc9c63bc1c7f6d73aa1cfee82f42007e407c0f413695c2f7ed777f"}, - {file = "pydantic_core-2.27.1-pp310-pypy310_pp73-musllinux_1_1_armv7l.whl", hash = "sha256:e173486019cc283dc9778315fa29a363579372fe67045e971e89b6365cc035ed"}, - {file = "pydantic_core-2.27.1-pp310-pypy310_pp73-musllinux_1_1_x86_64.whl", hash = "sha256:af52d26579b308921b73b956153066481f064875140ccd1dfd4e77db89dbb12f"}, - {file = "pydantic_core-2.27.1-pp310-pypy310_pp73-win_amd64.whl", hash = "sha256:981fb88516bd1ae8b0cbbd2034678a39dedc98752f264ac9bc5839d3923fa04c"}, - {file = "pydantic_core-2.27.1-pp39-pypy39_pp73-macosx_10_12_x86_64.whl", hash = "sha256:5fde892e6c697ce3e30c61b239330fc5d569a71fefd4eb6512fc6caec9dd9e2f"}, - {file = "pydantic_core-2.27.1-pp39-pypy39_pp73-macosx_11_0_arm64.whl", hash = "sha256:816f5aa087094099fff7edabb5e01cc370eb21aa1a1d44fe2d2aefdfb5599b31"}, - {file = "pydantic_core-2.27.1-pp39-pypy39_pp73-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:9c10c309e18e443ddb108f0ef64e8729363adbfd92d6d57beec680f6261556f3"}, - {file = "pydantic_core-2.27.1-pp39-pypy39_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:98476c98b02c8e9b2eec76ac4156fd006628b1b2d0ef27e548ffa978393fd154"}, - {file = "pydantic_core-2.27.1-pp39-pypy39_pp73-manylinux_2_5_i686.manylinux1_i686.whl", hash = "sha256:c3027001c28434e7ca5a6e1e527487051136aa81803ac812be51802150d880dd"}, - {file = "pydantic_core-2.27.1-pp39-pypy39_pp73-musllinux_1_1_aarch64.whl", hash = "sha256:7699b1df36a48169cdebda7ab5a2bac265204003f153b4bd17276153d997670a"}, - {file = "pydantic_core-2.27.1-pp39-pypy39_pp73-musllinux_1_1_armv7l.whl", hash = "sha256:1c39b07d90be6b48968ddc8c19e7585052088fd7ec8d568bb31ff64c70ae3c97"}, - {file = "pydantic_core-2.27.1-pp39-pypy39_pp73-musllinux_1_1_x86_64.whl", hash = "sha256:46ccfe3032b3915586e469d4972973f893c0a2bb65669194a5bdea9bacc088c2"}, - {file = "pydantic_core-2.27.1-pp39-pypy39_pp73-win_amd64.whl", hash = "sha256:62ba45e21cf6571d7f716d903b5b7b6d2617e2d5d67c0923dc47b9d41369f840"}, - {file = "pydantic_core-2.27.1.tar.gz", hash = "sha256:62a763352879b84aa31058fc931884055fd75089cccbd9d58bb6afd01141b235"}, + {file = "pydantic_core-2.33.1-cp310-cp310-macosx_10_12_x86_64.whl", hash = "sha256:3077cfdb6125cc8dab61b155fdd714663e401f0e6883f9632118ec12cf42df26"}, + {file = "pydantic_core-2.33.1-cp310-cp310-macosx_11_0_arm64.whl", hash = "sha256:8ffab8b2908d152e74862d276cf5017c81a2f3719f14e8e3e8d6b83fda863927"}, + {file = "pydantic_core-2.33.1-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:5183e4f6a2d468787243ebcd70cf4098c247e60d73fb7d68d5bc1e1beaa0c4db"}, + {file = "pydantic_core-2.33.1-cp310-cp310-manylinux_2_17_armv7l.manylinux2014_armv7l.whl", hash = "sha256:398a38d323f37714023be1e0285765f0a27243a8b1506b7b7de87b647b517e48"}, + {file = "pydantic_core-2.33.1-cp310-cp310-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:87d3776f0001b43acebfa86f8c64019c043b55cc5a6a2e313d728b5c95b46969"}, + {file = "pydantic_core-2.33.1-cp310-cp310-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:c566dd9c5f63d22226409553531f89de0cac55397f2ab8d97d6f06cfce6d947e"}, + {file = "pydantic_core-2.33.1-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:a0d5f3acc81452c56895e90643a625302bd6be351e7010664151cc55b7b97f89"}, + {file = "pydantic_core-2.33.1-cp310-cp310-manylinux_2_5_i686.manylinux1_i686.whl", hash = "sha256:d3a07fadec2a13274a8d861d3d37c61e97a816beae717efccaa4b36dfcaadcde"}, + {file = "pydantic_core-2.33.1-cp310-cp310-musllinux_1_1_aarch64.whl", hash = "sha256:f99aeda58dce827f76963ee87a0ebe75e648c72ff9ba1174a253f6744f518f65"}, + {file = "pydantic_core-2.33.1-cp310-cp310-musllinux_1_1_armv7l.whl", hash = "sha256:902dbc832141aa0ec374f4310f1e4e7febeebc3256f00dc359a9ac3f264a45dc"}, + {file = "pydantic_core-2.33.1-cp310-cp310-musllinux_1_1_x86_64.whl", hash = "sha256:fe44d56aa0b00d66640aa84a3cbe80b7a3ccdc6f0b1ca71090696a6d4777c091"}, + {file = "pydantic_core-2.33.1-cp310-cp310-win32.whl", hash = "sha256:ed3eb16d51257c763539bde21e011092f127a2202692afaeaccb50db55a31383"}, + {file = "pydantic_core-2.33.1-cp310-cp310-win_amd64.whl", hash = "sha256:694ad99a7f6718c1a498dc170ca430687a39894a60327f548e02a9c7ee4b6504"}, + {file = "pydantic_core-2.33.1-cp311-cp311-macosx_10_12_x86_64.whl", hash = "sha256:6e966fc3caaf9f1d96b349b0341c70c8d6573bf1bac7261f7b0ba88f96c56c24"}, + {file = "pydantic_core-2.33.1-cp311-cp311-macosx_11_0_arm64.whl", hash = "sha256:bfd0adeee563d59c598ceabddf2c92eec77abcb3f4a391b19aa7366170bd9e30"}, + {file = "pydantic_core-2.33.1-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:91815221101ad3c6b507804178a7bb5cb7b2ead9ecd600041669c8d805ebd595"}, + {file = "pydantic_core-2.33.1-cp311-cp311-manylinux_2_17_armv7l.manylinux2014_armv7l.whl", hash = "sha256:9fea9c1869bb4742d174a57b4700c6dadea951df8b06de40c2fedb4f02931c2e"}, + {file = "pydantic_core-2.33.1-cp311-cp311-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:1d20eb4861329bb2484c021b9d9a977566ab16d84000a57e28061151c62b349a"}, + {file = "pydantic_core-2.33.1-cp311-cp311-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:0fb935c5591573ae3201640579f30128ccc10739b45663f93c06796854405505"}, + {file = "pydantic_core-2.33.1-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:c964fd24e6166420d18fb53996d8c9fd6eac9bf5ae3ec3d03015be4414ce497f"}, + {file = "pydantic_core-2.33.1-cp311-cp311-manylinux_2_5_i686.manylinux1_i686.whl", hash = "sha256:681d65e9011f7392db5aa002b7423cc442d6a673c635668c227c6c8d0e5a4f77"}, + {file = "pydantic_core-2.33.1-cp311-cp311-musllinux_1_1_aarch64.whl", hash = "sha256:e100c52f7355a48413e2999bfb4e139d2977a904495441b374f3d4fb4a170961"}, + {file = "pydantic_core-2.33.1-cp311-cp311-musllinux_1_1_armv7l.whl", hash = "sha256:048831bd363490be79acdd3232f74a0e9951b11b2b4cc058aeb72b22fdc3abe1"}, + {file = "pydantic_core-2.33.1-cp311-cp311-musllinux_1_1_x86_64.whl", hash = "sha256:bdc84017d28459c00db6f918a7272a5190bec3090058334e43a76afb279eac7c"}, + {file = "pydantic_core-2.33.1-cp311-cp311-win32.whl", hash = "sha256:32cd11c5914d1179df70406427097c7dcde19fddf1418c787540f4b730289896"}, + {file = "pydantic_core-2.33.1-cp311-cp311-win_amd64.whl", hash = "sha256:2ea62419ba8c397e7da28a9170a16219d310d2cf4970dbc65c32faf20d828c83"}, + {file = "pydantic_core-2.33.1-cp311-cp311-win_arm64.whl", hash = "sha256:fc903512177361e868bc1f5b80ac8c8a6e05fcdd574a5fb5ffeac5a9982b9e89"}, + {file = "pydantic_core-2.33.1-cp312-cp312-macosx_10_12_x86_64.whl", hash = "sha256:1293d7febb995e9d3ec3ea09caf1a26214eec45b0f29f6074abb004723fc1de8"}, + {file = "pydantic_core-2.33.1-cp312-cp312-macosx_11_0_arm64.whl", hash = "sha256:99b56acd433386c8f20be5c4000786d1e7ca0523c8eefc995d14d79c7a081498"}, + {file = "pydantic_core-2.33.1-cp312-cp312-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:35a5ec3fa8c2fe6c53e1b2ccc2454398f95d5393ab398478f53e1afbbeb4d939"}, + {file = "pydantic_core-2.33.1-cp312-cp312-manylinux_2_17_armv7l.manylinux2014_armv7l.whl", hash = "sha256:b172f7b9d2f3abc0efd12e3386f7e48b576ef309544ac3a63e5e9cdd2e24585d"}, + {file = "pydantic_core-2.33.1-cp312-cp312-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:9097b9f17f91eea659b9ec58148c0747ec354a42f7389b9d50701610d86f812e"}, + {file = "pydantic_core-2.33.1-cp312-cp312-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:cc77ec5b7e2118b152b0d886c7514a4653bcb58c6b1d760134a9fab915f777b3"}, + {file = "pydantic_core-2.33.1-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:d5e3d15245b08fa4a84cefc6c9222e6f37c98111c8679fbd94aa145f9a0ae23d"}, + {file = "pydantic_core-2.33.1-cp312-cp312-manylinux_2_5_i686.manylinux1_i686.whl", hash = "sha256:ef99779001d7ac2e2461d8ab55d3373fe7315caefdbecd8ced75304ae5a6fc6b"}, + {file = "pydantic_core-2.33.1-cp312-cp312-musllinux_1_1_aarch64.whl", hash = "sha256:fc6bf8869e193855e8d91d91f6bf59699a5cdfaa47a404e278e776dd7f168b39"}, + {file = "pydantic_core-2.33.1-cp312-cp312-musllinux_1_1_armv7l.whl", hash = "sha256:b1caa0bc2741b043db7823843e1bde8aaa58a55a58fda06083b0569f8b45693a"}, + {file = "pydantic_core-2.33.1-cp312-cp312-musllinux_1_1_x86_64.whl", hash = "sha256:ec259f62538e8bf364903a7d0d0239447059f9434b284f5536e8402b7dd198db"}, + {file = "pydantic_core-2.33.1-cp312-cp312-win32.whl", hash = "sha256:e14f369c98a7c15772b9da98987f58e2b509a93235582838bd0d1d8c08b68fda"}, + {file = "pydantic_core-2.33.1-cp312-cp312-win_amd64.whl", hash = "sha256:1c607801d85e2e123357b3893f82c97a42856192997b95b4d8325deb1cd0c5f4"}, + {file = "pydantic_core-2.33.1-cp312-cp312-win_arm64.whl", hash = "sha256:8d13f0276806ee722e70a1c93da19748594f19ac4299c7e41237fc791d1861ea"}, + {file = "pydantic_core-2.33.1-cp313-cp313-macosx_10_12_x86_64.whl", hash = "sha256:70af6a21237b53d1fe7b9325b20e65cbf2f0a848cf77bed492b029139701e66a"}, + {file = "pydantic_core-2.33.1-cp313-cp313-macosx_11_0_arm64.whl", hash = "sha256:282b3fe1bbbe5ae35224a0dbd05aed9ccabccd241e8e6b60370484234b456266"}, + {file = "pydantic_core-2.33.1-cp313-cp313-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:4b315e596282bbb5822d0c7ee9d255595bd7506d1cb20c2911a4da0b970187d3"}, + {file = "pydantic_core-2.33.1-cp313-cp313-manylinux_2_17_armv7l.manylinux2014_armv7l.whl", hash = "sha256:1dfae24cf9921875ca0ca6a8ecb4bb2f13c855794ed0d468d6abbec6e6dcd44a"}, + {file = "pydantic_core-2.33.1-cp313-cp313-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:6dd8ecfde08d8bfadaea669e83c63939af76f4cf5538a72597016edfa3fad516"}, + {file = "pydantic_core-2.33.1-cp313-cp313-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:2f593494876eae852dc98c43c6f260f45abdbfeec9e4324e31a481d948214764"}, + {file = "pydantic_core-2.33.1-cp313-cp313-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:948b73114f47fd7016088e5186d13faf5e1b2fe83f5e320e371f035557fd264d"}, + {file = "pydantic_core-2.33.1-cp313-cp313-manylinux_2_5_i686.manylinux1_i686.whl", hash = "sha256:e11f3864eb516af21b01e25fac915a82e9ddad3bb0fb9e95a246067398b435a4"}, + {file = "pydantic_core-2.33.1-cp313-cp313-musllinux_1_1_aarch64.whl", hash = "sha256:549150be302428b56fdad0c23c2741dcdb5572413776826c965619a25d9c6bde"}, + {file = "pydantic_core-2.33.1-cp313-cp313-musllinux_1_1_armv7l.whl", hash = "sha256:495bc156026efafd9ef2d82372bd38afce78ddd82bf28ef5276c469e57c0c83e"}, + {file = "pydantic_core-2.33.1-cp313-cp313-musllinux_1_1_x86_64.whl", hash = "sha256:ec79de2a8680b1a67a07490bddf9636d5c2fab609ba8c57597e855fa5fa4dacd"}, + {file = "pydantic_core-2.33.1-cp313-cp313-win32.whl", hash = "sha256:ee12a7be1742f81b8a65b36c6921022301d466b82d80315d215c4c691724986f"}, + {file = "pydantic_core-2.33.1-cp313-cp313-win_amd64.whl", hash = "sha256:ede9b407e39949d2afc46385ce6bd6e11588660c26f80576c11c958e6647bc40"}, + {file = "pydantic_core-2.33.1-cp313-cp313-win_arm64.whl", hash = "sha256:aa687a23d4b7871a00e03ca96a09cad0f28f443690d300500603bd0adba4b523"}, + {file = "pydantic_core-2.33.1-cp313-cp313t-macosx_11_0_arm64.whl", hash = "sha256:401d7b76e1000d0dd5538e6381d28febdcacb097c8d340dde7d7fc6e13e9f95d"}, + {file = "pydantic_core-2.33.1-cp313-cp313t-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:7aeb055a42d734c0255c9e489ac67e75397d59c6fbe60d155851e9782f276a9c"}, + {file = "pydantic_core-2.33.1-cp313-cp313t-win_amd64.whl", hash = "sha256:338ea9b73e6e109f15ab439e62cb3b78aa752c7fd9536794112e14bee02c8d18"}, + {file = "pydantic_core-2.33.1-cp39-cp39-macosx_10_12_x86_64.whl", hash = "sha256:5ab77f45d33d264de66e1884fca158bc920cb5e27fd0764a72f72f5756ae8bdb"}, + {file = "pydantic_core-2.33.1-cp39-cp39-macosx_11_0_arm64.whl", hash = "sha256:e7aaba1b4b03aaea7bb59e1b5856d734be011d3e6d98f5bcaa98cb30f375f2ad"}, + {file = "pydantic_core-2.33.1-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:7fb66263e9ba8fea2aa85e1e5578980d127fb37d7f2e292773e7bc3a38fb0c7b"}, + {file = "pydantic_core-2.33.1-cp39-cp39-manylinux_2_17_armv7l.manylinux2014_armv7l.whl", hash = "sha256:3f2648b9262607a7fb41d782cc263b48032ff7a03a835581abbf7a3bec62bcf5"}, + {file = "pydantic_core-2.33.1-cp39-cp39-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:723c5630c4259400818b4ad096735a829074601805d07f8cafc366d95786d331"}, + {file = "pydantic_core-2.33.1-cp39-cp39-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:d100e3ae783d2167782391e0c1c7a20a31f55f8015f3293647544df3f9c67824"}, + {file = "pydantic_core-2.33.1-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:177d50460bc976a0369920b6c744d927b0ecb8606fb56858ff542560251b19e5"}, + {file = "pydantic_core-2.33.1-cp39-cp39-manylinux_2_5_i686.manylinux1_i686.whl", hash = "sha256:a3edde68d1a1f9af1273b2fe798997b33f90308fb6d44d8550c89fc6a3647cf6"}, + {file = "pydantic_core-2.33.1-cp39-cp39-musllinux_1_1_aarch64.whl", hash = "sha256:a62c3c3ef6a7e2c45f7853b10b5bc4ddefd6ee3cd31024754a1a5842da7d598d"}, + {file = "pydantic_core-2.33.1-cp39-cp39-musllinux_1_1_armv7l.whl", hash = "sha256:c91dbb0ab683fa0cd64a6e81907c8ff41d6497c346890e26b23de7ee55353f96"}, + {file = "pydantic_core-2.33.1-cp39-cp39-musllinux_1_1_x86_64.whl", hash = "sha256:9f466e8bf0a62dc43e068c12166281c2eca72121dd2adc1040f3aa1e21ef8599"}, + {file = "pydantic_core-2.33.1-cp39-cp39-win32.whl", hash = "sha256:ab0277cedb698749caada82e5d099dc9fed3f906a30d4c382d1a21725777a1e5"}, + {file = "pydantic_core-2.33.1-cp39-cp39-win_amd64.whl", hash = "sha256:5773da0ee2d17136b1f1c6fbde543398d452a6ad2a7b54ea1033e2daa739b8d2"}, + {file = "pydantic_core-2.33.1-pp310-pypy310_pp73-macosx_10_12_x86_64.whl", hash = "sha256:5c834f54f8f4640fd7e4b193f80eb25a0602bba9e19b3cd2fc7ffe8199f5ae02"}, + {file = "pydantic_core-2.33.1-pp310-pypy310_pp73-macosx_11_0_arm64.whl", hash = "sha256:049e0de24cf23766f12cc5cc71d8abc07d4a9deb9061b334b62093dedc7cb068"}, + {file = "pydantic_core-2.33.1-pp310-pypy310_pp73-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:1a28239037b3d6f16916a4c831a5a0eadf856bdd6d2e92c10a0da3a59eadcf3e"}, + {file = "pydantic_core-2.33.1-pp310-pypy310_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:9d3da303ab5f378a268fa7d45f37d7d85c3ec19769f28d2cc0c61826a8de21fe"}, + {file = "pydantic_core-2.33.1-pp310-pypy310_pp73-manylinux_2_5_i686.manylinux1_i686.whl", hash = "sha256:25626fb37b3c543818c14821afe0fd3830bc327a43953bc88db924b68c5723f1"}, + {file = "pydantic_core-2.33.1-pp310-pypy310_pp73-musllinux_1_1_aarch64.whl", hash = "sha256:3ab2d36e20fbfcce8f02d73c33a8a7362980cff717926bbae030b93ae46b56c7"}, + {file = "pydantic_core-2.33.1-pp310-pypy310_pp73-musllinux_1_1_armv7l.whl", hash = "sha256:2f9284e11c751b003fd4215ad92d325d92c9cb19ee6729ebd87e3250072cdcde"}, + {file = "pydantic_core-2.33.1-pp310-pypy310_pp73-musllinux_1_1_x86_64.whl", hash = "sha256:048c01eee07d37cbd066fc512b9d8b5ea88ceeb4e629ab94b3e56965ad655add"}, + {file = "pydantic_core-2.33.1-pp310-pypy310_pp73-win_amd64.whl", hash = "sha256:5ccd429694cf26af7997595d627dd2637e7932214486f55b8a357edaac9dae8c"}, + {file = "pydantic_core-2.33.1-pp311-pypy311_pp73-macosx_10_12_x86_64.whl", hash = "sha256:3a371dc00282c4b84246509a5ddc808e61b9864aa1eae9ecc92bb1268b82db4a"}, + {file = "pydantic_core-2.33.1-pp311-pypy311_pp73-macosx_11_0_arm64.whl", hash = "sha256:f59295ecc75a1788af8ba92f2e8c6eeaa5a94c22fc4d151e8d9638814f85c8fc"}, + {file = "pydantic_core-2.33.1-pp311-pypy311_pp73-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:08530b8ac922003033f399128505f513e30ca770527cc8bbacf75a84fcc2c74b"}, + {file = "pydantic_core-2.33.1-pp311-pypy311_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:bae370459da6a5466978c0eacf90690cb57ec9d533f8e63e564ef3822bfa04fe"}, + {file = "pydantic_core-2.33.1-pp311-pypy311_pp73-manylinux_2_5_i686.manylinux1_i686.whl", hash = "sha256:e3de2777e3b9f4d603112f78006f4ae0acb936e95f06da6cb1a45fbad6bdb4b5"}, + {file = "pydantic_core-2.33.1-pp311-pypy311_pp73-musllinux_1_1_aarch64.whl", hash = "sha256:3a64e81e8cba118e108d7126362ea30e021291b7805d47e4896e52c791be2761"}, + {file = "pydantic_core-2.33.1-pp311-pypy311_pp73-musllinux_1_1_armv7l.whl", hash = "sha256:52928d8c1b6bda03cc6d811e8923dffc87a2d3c8b3bfd2ce16471c7147a24850"}, + {file = "pydantic_core-2.33.1-pp311-pypy311_pp73-musllinux_1_1_x86_64.whl", hash = "sha256:1b30d92c9412beb5ac6b10a3eb7ef92ccb14e3f2a8d7732e2d739f58b3aa7544"}, + {file = "pydantic_core-2.33.1-pp311-pypy311_pp73-win_amd64.whl", hash = "sha256:f995719707e0e29f0f41a8aa3bcea6e761a36c9136104d3189eafb83f5cec5e5"}, + {file = "pydantic_core-2.33.1-pp39-pypy39_pp73-macosx_10_12_x86_64.whl", hash = "sha256:7edbc454a29fc6aeae1e1eecba4f07b63b8d76e76a748532233c4c167b4cb9ea"}, + {file = "pydantic_core-2.33.1-pp39-pypy39_pp73-macosx_11_0_arm64.whl", hash = "sha256:ad05b683963f69a1d5d2c2bdab1274a31221ca737dbbceaa32bcb67359453cdd"}, + {file = "pydantic_core-2.33.1-pp39-pypy39_pp73-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:df6a94bf9452c6da9b5d76ed229a5683d0306ccb91cca8e1eea883189780d568"}, + {file = "pydantic_core-2.33.1-pp39-pypy39_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:7965c13b3967909a09ecc91f21d09cfc4576bf78140b988904e94f130f188396"}, + {file = "pydantic_core-2.33.1-pp39-pypy39_pp73-manylinux_2_5_i686.manylinux1_i686.whl", hash = "sha256:3f1fdb790440a34f6ecf7679e1863b825cb5ffde858a9197f851168ed08371e5"}, + {file = "pydantic_core-2.33.1-pp39-pypy39_pp73-musllinux_1_1_aarch64.whl", hash = "sha256:5277aec8d879f8d05168fdd17ae811dd313b8ff894aeeaf7cd34ad28b4d77e33"}, + {file = "pydantic_core-2.33.1-pp39-pypy39_pp73-musllinux_1_1_armv7l.whl", hash = "sha256:8ab581d3530611897d863d1a649fb0644b860286b4718db919bfd51ece41f10b"}, + {file = "pydantic_core-2.33.1-pp39-pypy39_pp73-musllinux_1_1_x86_64.whl", hash = "sha256:0483847fa9ad5e3412265c1bd72aad35235512d9ce9d27d81a56d935ef489672"}, + {file = "pydantic_core-2.33.1-pp39-pypy39_pp73-win_amd64.whl", hash = "sha256:de9e06abe3cc5ec6a2d5f75bc99b0bdca4f5c719a5b34026f8c57efbdecd2ee3"}, + {file = "pydantic_core-2.33.1.tar.gz", hash = "sha256:bcc9c6fdb0ced789245b02b7d6603e17d1563064ddcfc36f046b61c0c05dd9df"}, ] [package.dependencies] @@ -461,7 +440,7 @@ colorama = {version = ">=0.4.5", markers = "sys_platform == \"win32\""} dill = [ {version = ">=0.2", markers = "python_version < \"3.11\""}, {version = ">=0.3.7", markers = "python_version >= \"3.12\""}, - {version = ">=0.3.6", markers = "python_version >= \"3.11\" and python_version < \"3.12\""}, + {version = ">=0.3.6", markers = "python_version == \"3.11\""}, ] isort = ">=4.2.5,<5.13.0 || >5.13.0,<6" mccabe = ">=0.6,<0.8" @@ -474,33 +453,6 @@ typing-extensions = {version = ">=3.10.0", markers = "python_version < \"3.10\"" spelling = ["pyenchant (>=3.2,<4.0)"] testutils = ["gitpython (>3)"] -[[package]] -name = "python-dateutil" -version = "2.8.2" -description = "Extensions to the standard Python datetime module" -optional = false -python-versions = "!=3.0.*,!=3.1.*,!=3.2.*,>=2.7" -groups = ["main"] -files = [ - {file = "python-dateutil-2.8.2.tar.gz", hash = "sha256:0123cacc1627ae19ddf3c27a5de5bd67ee4586fbdd6440d9748f8abb483d3e86"}, - {file = "python_dateutil-2.8.2-py2.py3-none-any.whl", hash = "sha256:961d03dc3453ebbc59dbdea9e4e11c5651520a876d0f4db161e8674aae935da9"}, -] - -[package.dependencies] -six = ">=1.5" - -[[package]] -name = "six" -version = "1.16.0" -description = "Python 2 and 3 compatibility utilities" -optional = false -python-versions = ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*" -groups = ["main"] -files = [ - {file = "six-1.16.0-py2.py3-none-any.whl", hash = "sha256:8abb2f1d86890a2dfb989f9a77cfcfd3e47c2a354b01111771326f8aa26e0254"}, - {file = "six-1.16.0.tar.gz", hash = "sha256:1e61c37477a1626458e36f7b1d82aa5c9b094fa4802892072e49de9c60c4c926"}, -] - [[package]] name = "sniffio" version = "1.3.1" @@ -538,18 +490,6 @@ files = [ {file = "tomlkit-0.13.2.tar.gz", hash = "sha256:fff5fe59a87295b278abd31bec92c15d9bc4a06885ab12bcea52c71119392e79"}, ] -[[package]] -name = "types-python-dateutil" -version = "2.9.0.20240821" -description = "Typing stubs for python-dateutil" -optional = false -python-versions = ">=3.8" -groups = ["dev"] -files = [ - {file = "types-python-dateutil-2.9.0.20240821.tar.gz", hash = "sha256:9649d1dcb6fef1046fb18bebe9ea2aa0028b160918518c34589a46045f6ebd98"}, - {file = "types_python_dateutil-2.9.0.20240821-py3-none-any.whl", hash = "sha256:f5889fcb4e63ed4aaa379b44f93c32593d50b9a94c9a60a0c854d8cc3511cd57"}, -] - [[package]] name = "typing-extensions" version = "4.12.2" @@ -563,22 +503,21 @@ files = [ ] [[package]] -name = "typing-inspect" -version = "0.9.0" -description = "Runtime inspection utilities for typing module." +name = "typing-inspection" +version = "0.4.0" +description = "Runtime typing introspection tools" optional = false -python-versions = "*" +python-versions = ">=3.9" groups = ["main"] files = [ - {file = "typing_inspect-0.9.0-py3-none-any.whl", hash = "sha256:9ee6fc59062311ef8547596ab6b955e1b8aa46242d854bfc78f4f6b0eff35f9f"}, - {file = "typing_inspect-0.9.0.tar.gz", hash = "sha256:b23fc42ff6f6ef6954e4852c1fb512cdd18dbea03134f91f856a95ccc9461f78"}, + {file = "typing_inspection-0.4.0-py3-none-any.whl", hash = "sha256:50e72559fcd2a6367a19f7a7e610e6afcb9fac940c650290eed893d61386832f"}, + {file = "typing_inspection-0.4.0.tar.gz", hash = "sha256:9765c87de36671694a67904bf2c96e395be9c6439bb6c87b5142569dcdd65122"}, ] [package.dependencies] -mypy-extensions = ">=0.3.0" -typing-extensions = ">=3.7.4" +typing-extensions = ">=4.12.0" [metadata] lock-version = "2.1" python-versions = ">=3.9" -content-hash = "1f0dcb22a1bf4d933c50fbaab2e7f694592f680adf1171c2dc13507e4259a9c0" +content-hash = "6354f0f1856076ab30608ac13a9b2c92427e32d83253a3a3801e1919bb853282" diff --git a/pylintrc b/pylintrc index f2385e8..e8cd3e8 100644 --- a/pylintrc +++ b/pylintrc @@ -454,7 +454,11 @@ disable=raw-checker-failed, bare-except, broad-exception-caught, fixme, - relative-beyond-top-level + relative-beyond-top-level, + consider-using-with, + wildcard-import, + unused-wildcard-import, + too-many-return-statements # Enable the message, report, category or checker with the given id(s). You can # either give multiple identifier separated by comma (,) or put this option @@ -655,4 +659,4 @@ init-import=no # List of qualified module names which can have objects that can redefine # builtins. -redefining-builtins-modules=six.moves,past.builtins,future.builtins,builtins,io +redefining-builtins-modules=six.moves,past.builtins,future.builtins,builtins,io \ No newline at end of file diff --git a/pyproject.toml b/pyproject.toml index 3fe1d11..474944c 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,16 +1,13 @@ [project] name = "livepeer-ai" -version = "0.10.0" +version = "0.11.0" description = "Python Client SDK for the Livepeer AI API." authors = [{ name = "Speakeasy" },] readme = "README-PYPI.md" requires-python = ">=3.9" dependencies = [ - "eval-type-backport >=0.2.0", "httpx >=0.28.1", - "pydantic >=2.10.3", - "python-dateutil >=2.8.2", - "typing-inspect >=0.9.0", + "pydantic >=2.11.2", ] [tool.poetry] @@ -27,9 +24,8 @@ include = ["py.typed", "src/livepeer_ai/py.typed"] in-project = true [tool.poetry.group.dev.dependencies] -mypy = "==1.14.1" +mypy = "==1.15.0" pylint = "==3.2.3" -types-python-dateutil = "^2.9.0.20240316" [build-system] requires = ["poetry-core"] diff --git a/scripts/prepare-readme.py b/scripts/prepare_readme.py similarity index 84% rename from scripts/prepare-readme.py rename to scripts/prepare_readme.py index 8e46a80..cc23cb6 100644 --- a/scripts/prepare-readme.py +++ b/scripts/prepare_readme.py @@ -4,7 +4,7 @@ import shutil try: - with open("README.md", "r") as rh: + with open("README.md", "r", encoding="utf-8") as rh: readme_contents = rh.read() GITHUB_URL = "https://github.com/livepeer/livepeer-ai-python.git" GITHUB_URL = ( @@ -21,13 +21,13 @@ readme_contents, ) - with open("README-PYPI.md", "w") as wh: + with open("README-PYPI.md", "w", encoding="utf-8") as wh: wh.write(readme_contents) except Exception as e: try: print("Failed to rewrite README.md to README-PYPI.md, copying original instead") print(e) shutil.copyfile("README.md", "README-PYPI.md") - except Exception as e: + except Exception as ie: print("Failed to copy README.md to README-PYPI.md") - print(e) + print(ie) diff --git a/scripts/publish.sh b/scripts/publish.sh index ab45b1f..f2f2cf2 100755 --- a/scripts/publish.sh +++ b/scripts/publish.sh @@ -2,6 +2,6 @@ export POETRY_PYPI_TOKEN_PYPI=${PYPI_TOKEN} -poetry run python scripts/prepare-readme.py +poetry run python scripts/prepare_readme.py poetry publish --build --skip-existing diff --git a/src/livepeer_ai/_hooks/types.py b/src/livepeer_ai/_hooks/types.py index a6bee66..811713a 100644 --- a/src/livepeer_ai/_hooks/types.py +++ b/src/livepeer_ai/_hooks/types.py @@ -7,16 +7,19 @@ class HookContext: + base_url: str operation_id: str oauth2_scopes: Optional[List[str]] = None security_source: Optional[Union[Any, Callable[[], Any]]] = None def __init__( self, + base_url: str, operation_id: str, oauth2_scopes: Optional[List[str]], security_source: Optional[Union[Any, Callable[[], Any]]], ): + self.base_url = base_url self.operation_id = operation_id self.oauth2_scopes = oauth2_scopes self.security_source = security_source @@ -25,21 +28,30 @@ def __init__( class BeforeRequestContext(HookContext): def __init__(self, hook_ctx: HookContext): super().__init__( - hook_ctx.operation_id, hook_ctx.oauth2_scopes, hook_ctx.security_source + hook_ctx.base_url, + hook_ctx.operation_id, + hook_ctx.oauth2_scopes, + hook_ctx.security_source, ) class AfterSuccessContext(HookContext): def __init__(self, hook_ctx: HookContext): super().__init__( - hook_ctx.operation_id, hook_ctx.oauth2_scopes, hook_ctx.security_source + hook_ctx.base_url, + hook_ctx.operation_id, + hook_ctx.oauth2_scopes, + hook_ctx.security_source, ) class AfterErrorContext(HookContext): def __init__(self, hook_ctx: HookContext): super().__init__( - hook_ctx.operation_id, hook_ctx.oauth2_scopes, hook_ctx.security_source + hook_ctx.base_url, + hook_ctx.operation_id, + hook_ctx.oauth2_scopes, + hook_ctx.security_source, ) diff --git a/src/livepeer_ai/_version.py b/src/livepeer_ai/_version.py index 0775e8c..0ddd59c 100644 --- a/src/livepeer_ai/_version.py +++ b/src/livepeer_ai/_version.py @@ -3,10 +3,10 @@ import importlib.metadata __title__: str = "livepeer-ai" -__version__: str = "0.10.0" -__openapi_doc_version__: str = "0.0.0" -__gen_version__: str = "2.499.0" -__user_agent__: str = "speakeasy-sdk/python 0.10.0 2.499.0 0.0.0 livepeer-ai" +__version__: str = "0.11.0" +__openapi_doc_version__: str = "0.1.0" +__gen_version__: str = "2.593.3" +__user_agent__: str = "speakeasy-sdk/python 0.11.0 2.593.3 0.1.0 livepeer-ai" try: if __package__ is not None: diff --git a/src/livepeer_ai/basesdk.py b/src/livepeer_ai/basesdk.py index 91d4a01..a216c86 100644 --- a/src/livepeer_ai/basesdk.py +++ b/src/livepeer_ai/basesdk.py @@ -232,6 +232,10 @@ def do(): req.headers, get_body_content(req), ) + + if client is None: + raise ValueError("client is required") + http_res = client.send(req, stream=stream) except Exception as e: _, e = self.sdk_configuration.get_hooks().after_error( @@ -304,6 +308,10 @@ async def do(): req.headers, get_body_content(req), ) + + if client is None: + raise ValueError("client is required") + http_res = await client.send(req, stream=stream) except Exception as e: _, e = self.sdk_configuration.get_hooks().after_error( diff --git a/src/livepeer_ai/generate.py b/src/livepeer_ai/generate.py index 7fcc2c3..c0da865 100644 --- a/src/livepeer_ai/generate.py +++ b/src/livepeer_ai/generate.py @@ -37,6 +37,8 @@ def text_to_image( if server_url is not None: base_url = server_url + else: + base_url = self._get_url(base_url, url_variables) if not isinstance(request, BaseModel): request = utils.unmarshal(request, components.TextToImageParams) @@ -71,6 +73,7 @@ def text_to_image( http_res = self.do_request( hook_ctx=HookContext( + base_url=base_url or "", operation_id="genTextToImage", oauth2_scopes=[], security_source=self.sdk_configuration.security, @@ -80,7 +83,7 @@ def text_to_image( retry_config=retry_config, ) - data: Any = None + response_data: Any = None if utils.match_response(http_res, "200", "application/json"): return operations.GenTextToImageResponse( image_response=utils.unmarshal_json( @@ -89,14 +92,16 @@ def text_to_image( http_meta=components.HTTPMetadata(request=req, response=http_res), ) if utils.match_response(http_res, ["400", "401"], "application/json"): - data = utils.unmarshal_json(http_res.text, errors.HTTPErrorData) - raise errors.HTTPError(data=data) + response_data = utils.unmarshal_json(http_res.text, errors.HTTPErrorData) + raise errors.HTTPError(data=response_data) if utils.match_response(http_res, "422", "application/json"): - data = utils.unmarshal_json(http_res.text, errors.HTTPValidationErrorData) - raise errors.HTTPValidationError(data=data) + response_data = utils.unmarshal_json( + http_res.text, errors.HTTPValidationErrorData + ) + raise errors.HTTPValidationError(data=response_data) if utils.match_response(http_res, "500", "application/json"): - data = utils.unmarshal_json(http_res.text, errors.HTTPErrorData) - raise errors.HTTPError(data=data) + response_data = utils.unmarshal_json(http_res.text, errors.HTTPErrorData) + raise errors.HTTPError(data=response_data) if utils.match_response(http_res, "4XX", "*"): http_res_text = utils.stream_to_text(http_res) raise errors.SDKError( @@ -145,6 +150,8 @@ async def text_to_image_async( if server_url is not None: base_url = server_url + else: + base_url = self._get_url(base_url, url_variables) if not isinstance(request, BaseModel): request = utils.unmarshal(request, components.TextToImageParams) @@ -179,6 +186,7 @@ async def text_to_image_async( http_res = await self.do_request_async( hook_ctx=HookContext( + base_url=base_url or "", operation_id="genTextToImage", oauth2_scopes=[], security_source=self.sdk_configuration.security, @@ -188,7 +196,7 @@ async def text_to_image_async( retry_config=retry_config, ) - data: Any = None + response_data: Any = None if utils.match_response(http_res, "200", "application/json"): return operations.GenTextToImageResponse( image_response=utils.unmarshal_json( @@ -197,14 +205,16 @@ async def text_to_image_async( http_meta=components.HTTPMetadata(request=req, response=http_res), ) if utils.match_response(http_res, ["400", "401"], "application/json"): - data = utils.unmarshal_json(http_res.text, errors.HTTPErrorData) - raise errors.HTTPError(data=data) + response_data = utils.unmarshal_json(http_res.text, errors.HTTPErrorData) + raise errors.HTTPError(data=response_data) if utils.match_response(http_res, "422", "application/json"): - data = utils.unmarshal_json(http_res.text, errors.HTTPValidationErrorData) - raise errors.HTTPValidationError(data=data) + response_data = utils.unmarshal_json( + http_res.text, errors.HTTPValidationErrorData + ) + raise errors.HTTPValidationError(data=response_data) if utils.match_response(http_res, "500", "application/json"): - data = utils.unmarshal_json(http_res.text, errors.HTTPErrorData) - raise errors.HTTPError(data=data) + response_data = utils.unmarshal_json(http_res.text, errors.HTTPErrorData) + raise errors.HTTPError(data=response_data) if utils.match_response(http_res, "4XX", "*"): http_res_text = await utils.stream_to_text_async(http_res) raise errors.SDKError( @@ -253,6 +263,8 @@ def image_to_image( if server_url is not None: base_url = server_url + else: + base_url = self._get_url(base_url, url_variables) if not isinstance(request, BaseModel): request = utils.unmarshal(request, components.BodyGenImageToImage) @@ -287,6 +299,7 @@ def image_to_image( http_res = self.do_request( hook_ctx=HookContext( + base_url=base_url or "", operation_id="genImageToImage", oauth2_scopes=[], security_source=self.sdk_configuration.security, @@ -296,7 +309,7 @@ def image_to_image( retry_config=retry_config, ) - data: Any = None + response_data: Any = None if utils.match_response(http_res, "200", "application/json"): return operations.GenImageToImageResponse( image_response=utils.unmarshal_json( @@ -305,14 +318,16 @@ def image_to_image( http_meta=components.HTTPMetadata(request=req, response=http_res), ) if utils.match_response(http_res, ["400", "401"], "application/json"): - data = utils.unmarshal_json(http_res.text, errors.HTTPErrorData) - raise errors.HTTPError(data=data) + response_data = utils.unmarshal_json(http_res.text, errors.HTTPErrorData) + raise errors.HTTPError(data=response_data) if utils.match_response(http_res, "422", "application/json"): - data = utils.unmarshal_json(http_res.text, errors.HTTPValidationErrorData) - raise errors.HTTPValidationError(data=data) + response_data = utils.unmarshal_json( + http_res.text, errors.HTTPValidationErrorData + ) + raise errors.HTTPValidationError(data=response_data) if utils.match_response(http_res, "500", "application/json"): - data = utils.unmarshal_json(http_res.text, errors.HTTPErrorData) - raise errors.HTTPError(data=data) + response_data = utils.unmarshal_json(http_res.text, errors.HTTPErrorData) + raise errors.HTTPError(data=response_data) if utils.match_response(http_res, "4XX", "*"): http_res_text = utils.stream_to_text(http_res) raise errors.SDKError( @@ -361,6 +376,8 @@ async def image_to_image_async( if server_url is not None: base_url = server_url + else: + base_url = self._get_url(base_url, url_variables) if not isinstance(request, BaseModel): request = utils.unmarshal(request, components.BodyGenImageToImage) @@ -395,6 +412,7 @@ async def image_to_image_async( http_res = await self.do_request_async( hook_ctx=HookContext( + base_url=base_url or "", operation_id="genImageToImage", oauth2_scopes=[], security_source=self.sdk_configuration.security, @@ -404,7 +422,7 @@ async def image_to_image_async( retry_config=retry_config, ) - data: Any = None + response_data: Any = None if utils.match_response(http_res, "200", "application/json"): return operations.GenImageToImageResponse( image_response=utils.unmarshal_json( @@ -413,14 +431,16 @@ async def image_to_image_async( http_meta=components.HTTPMetadata(request=req, response=http_res), ) if utils.match_response(http_res, ["400", "401"], "application/json"): - data = utils.unmarshal_json(http_res.text, errors.HTTPErrorData) - raise errors.HTTPError(data=data) + response_data = utils.unmarshal_json(http_res.text, errors.HTTPErrorData) + raise errors.HTTPError(data=response_data) if utils.match_response(http_res, "422", "application/json"): - data = utils.unmarshal_json(http_res.text, errors.HTTPValidationErrorData) - raise errors.HTTPValidationError(data=data) + response_data = utils.unmarshal_json( + http_res.text, errors.HTTPValidationErrorData + ) + raise errors.HTTPValidationError(data=response_data) if utils.match_response(http_res, "500", "application/json"): - data = utils.unmarshal_json(http_res.text, errors.HTTPErrorData) - raise errors.HTTPError(data=data) + response_data = utils.unmarshal_json(http_res.text, errors.HTTPErrorData) + raise errors.HTTPError(data=response_data) if utils.match_response(http_res, "4XX", "*"): http_res_text = await utils.stream_to_text_async(http_res) raise errors.SDKError( @@ -469,6 +489,8 @@ def image_to_video( if server_url is not None: base_url = server_url + else: + base_url = self._get_url(base_url, url_variables) if not isinstance(request, BaseModel): request = utils.unmarshal(request, components.BodyGenImageToVideo) @@ -503,6 +525,7 @@ def image_to_video( http_res = self.do_request( hook_ctx=HookContext( + base_url=base_url or "", operation_id="genImageToVideo", oauth2_scopes=[], security_source=self.sdk_configuration.security, @@ -512,7 +535,7 @@ def image_to_video( retry_config=retry_config, ) - data: Any = None + response_data: Any = None if utils.match_response(http_res, "200", "application/json"): return operations.GenImageToVideoResponse( video_response=utils.unmarshal_json( @@ -521,14 +544,16 @@ def image_to_video( http_meta=components.HTTPMetadata(request=req, response=http_res), ) if utils.match_response(http_res, ["400", "401"], "application/json"): - data = utils.unmarshal_json(http_res.text, errors.HTTPErrorData) - raise errors.HTTPError(data=data) + response_data = utils.unmarshal_json(http_res.text, errors.HTTPErrorData) + raise errors.HTTPError(data=response_data) if utils.match_response(http_res, "422", "application/json"): - data = utils.unmarshal_json(http_res.text, errors.HTTPValidationErrorData) - raise errors.HTTPValidationError(data=data) + response_data = utils.unmarshal_json( + http_res.text, errors.HTTPValidationErrorData + ) + raise errors.HTTPValidationError(data=response_data) if utils.match_response(http_res, "500", "application/json"): - data = utils.unmarshal_json(http_res.text, errors.HTTPErrorData) - raise errors.HTTPError(data=data) + response_data = utils.unmarshal_json(http_res.text, errors.HTTPErrorData) + raise errors.HTTPError(data=response_data) if utils.match_response(http_res, "4XX", "*"): http_res_text = utils.stream_to_text(http_res) raise errors.SDKError( @@ -577,6 +602,8 @@ async def image_to_video_async( if server_url is not None: base_url = server_url + else: + base_url = self._get_url(base_url, url_variables) if not isinstance(request, BaseModel): request = utils.unmarshal(request, components.BodyGenImageToVideo) @@ -611,6 +638,7 @@ async def image_to_video_async( http_res = await self.do_request_async( hook_ctx=HookContext( + base_url=base_url or "", operation_id="genImageToVideo", oauth2_scopes=[], security_source=self.sdk_configuration.security, @@ -620,7 +648,7 @@ async def image_to_video_async( retry_config=retry_config, ) - data: Any = None + response_data: Any = None if utils.match_response(http_res, "200", "application/json"): return operations.GenImageToVideoResponse( video_response=utils.unmarshal_json( @@ -629,14 +657,16 @@ async def image_to_video_async( http_meta=components.HTTPMetadata(request=req, response=http_res), ) if utils.match_response(http_res, ["400", "401"], "application/json"): - data = utils.unmarshal_json(http_res.text, errors.HTTPErrorData) - raise errors.HTTPError(data=data) + response_data = utils.unmarshal_json(http_res.text, errors.HTTPErrorData) + raise errors.HTTPError(data=response_data) if utils.match_response(http_res, "422", "application/json"): - data = utils.unmarshal_json(http_res.text, errors.HTTPValidationErrorData) - raise errors.HTTPValidationError(data=data) + response_data = utils.unmarshal_json( + http_res.text, errors.HTTPValidationErrorData + ) + raise errors.HTTPValidationError(data=response_data) if utils.match_response(http_res, "500", "application/json"): - data = utils.unmarshal_json(http_res.text, errors.HTTPErrorData) - raise errors.HTTPError(data=data) + response_data = utils.unmarshal_json(http_res.text, errors.HTTPErrorData) + raise errors.HTTPError(data=response_data) if utils.match_response(http_res, "4XX", "*"): http_res_text = await utils.stream_to_text_async(http_res) raise errors.SDKError( @@ -683,6 +713,8 @@ def upscale( if server_url is not None: base_url = server_url + else: + base_url = self._get_url(base_url, url_variables) if not isinstance(request, BaseModel): request = utils.unmarshal(request, components.BodyGenUpscale) @@ -717,6 +749,7 @@ def upscale( http_res = self.do_request( hook_ctx=HookContext( + base_url=base_url or "", operation_id="genUpscale", oauth2_scopes=[], security_source=self.sdk_configuration.security, @@ -726,7 +759,7 @@ def upscale( retry_config=retry_config, ) - data: Any = None + response_data: Any = None if utils.match_response(http_res, "200", "application/json"): return operations.GenUpscaleResponse( image_response=utils.unmarshal_json( @@ -735,14 +768,16 @@ def upscale( http_meta=components.HTTPMetadata(request=req, response=http_res), ) if utils.match_response(http_res, ["400", "401"], "application/json"): - data = utils.unmarshal_json(http_res.text, errors.HTTPErrorData) - raise errors.HTTPError(data=data) + response_data = utils.unmarshal_json(http_res.text, errors.HTTPErrorData) + raise errors.HTTPError(data=response_data) if utils.match_response(http_res, "422", "application/json"): - data = utils.unmarshal_json(http_res.text, errors.HTTPValidationErrorData) - raise errors.HTTPValidationError(data=data) + response_data = utils.unmarshal_json( + http_res.text, errors.HTTPValidationErrorData + ) + raise errors.HTTPValidationError(data=response_data) if utils.match_response(http_res, "500", "application/json"): - data = utils.unmarshal_json(http_res.text, errors.HTTPErrorData) - raise errors.HTTPError(data=data) + response_data = utils.unmarshal_json(http_res.text, errors.HTTPErrorData) + raise errors.HTTPError(data=response_data) if utils.match_response(http_res, "4XX", "*"): http_res_text = utils.stream_to_text(http_res) raise errors.SDKError( @@ -789,6 +824,8 @@ async def upscale_async( if server_url is not None: base_url = server_url + else: + base_url = self._get_url(base_url, url_variables) if not isinstance(request, BaseModel): request = utils.unmarshal(request, components.BodyGenUpscale) @@ -823,6 +860,7 @@ async def upscale_async( http_res = await self.do_request_async( hook_ctx=HookContext( + base_url=base_url or "", operation_id="genUpscale", oauth2_scopes=[], security_source=self.sdk_configuration.security, @@ -832,7 +870,7 @@ async def upscale_async( retry_config=retry_config, ) - data: Any = None + response_data: Any = None if utils.match_response(http_res, "200", "application/json"): return operations.GenUpscaleResponse( image_response=utils.unmarshal_json( @@ -841,14 +879,16 @@ async def upscale_async( http_meta=components.HTTPMetadata(request=req, response=http_res), ) if utils.match_response(http_res, ["400", "401"], "application/json"): - data = utils.unmarshal_json(http_res.text, errors.HTTPErrorData) - raise errors.HTTPError(data=data) + response_data = utils.unmarshal_json(http_res.text, errors.HTTPErrorData) + raise errors.HTTPError(data=response_data) if utils.match_response(http_res, "422", "application/json"): - data = utils.unmarshal_json(http_res.text, errors.HTTPValidationErrorData) - raise errors.HTTPValidationError(data=data) + response_data = utils.unmarshal_json( + http_res.text, errors.HTTPValidationErrorData + ) + raise errors.HTTPValidationError(data=response_data) if utils.match_response(http_res, "500", "application/json"): - data = utils.unmarshal_json(http_res.text, errors.HTTPErrorData) - raise errors.HTTPError(data=data) + response_data = utils.unmarshal_json(http_res.text, errors.HTTPErrorData) + raise errors.HTTPError(data=response_data) if utils.match_response(http_res, "4XX", "*"): http_res_text = await utils.stream_to_text_async(http_res) raise errors.SDKError( @@ -897,6 +937,8 @@ def audio_to_text( if server_url is not None: base_url = server_url + else: + base_url = self._get_url(base_url, url_variables) if not isinstance(request, BaseModel): request = utils.unmarshal(request, components.BodyGenAudioToText) @@ -931,6 +973,7 @@ def audio_to_text( http_res = self.do_request( hook_ctx=HookContext( + base_url=base_url or "", operation_id="genAudioToText", oauth2_scopes=[], security_source=self.sdk_configuration.security, @@ -940,7 +983,7 @@ def audio_to_text( retry_config=retry_config, ) - data: Any = None + response_data: Any = None if utils.match_response(http_res, "200", "application/json"): return operations.GenAudioToTextResponse( text_response=utils.unmarshal_json( @@ -951,14 +994,16 @@ def audio_to_text( if utils.match_response( http_res, ["400", "401", "413", "415"], "application/json" ): - data = utils.unmarshal_json(http_res.text, errors.HTTPErrorData) - raise errors.HTTPError(data=data) + response_data = utils.unmarshal_json(http_res.text, errors.HTTPErrorData) + raise errors.HTTPError(data=response_data) if utils.match_response(http_res, "422", "application/json"): - data = utils.unmarshal_json(http_res.text, errors.HTTPValidationErrorData) - raise errors.HTTPValidationError(data=data) + response_data = utils.unmarshal_json( + http_res.text, errors.HTTPValidationErrorData + ) + raise errors.HTTPValidationError(data=response_data) if utils.match_response(http_res, "500", "application/json"): - data = utils.unmarshal_json(http_res.text, errors.HTTPErrorData) - raise errors.HTTPError(data=data) + response_data = utils.unmarshal_json(http_res.text, errors.HTTPErrorData) + raise errors.HTTPError(data=response_data) if utils.match_response(http_res, "4XX", "*"): http_res_text = utils.stream_to_text(http_res) raise errors.SDKError( @@ -1007,6 +1052,8 @@ async def audio_to_text_async( if server_url is not None: base_url = server_url + else: + base_url = self._get_url(base_url, url_variables) if not isinstance(request, BaseModel): request = utils.unmarshal(request, components.BodyGenAudioToText) @@ -1041,6 +1088,7 @@ async def audio_to_text_async( http_res = await self.do_request_async( hook_ctx=HookContext( + base_url=base_url or "", operation_id="genAudioToText", oauth2_scopes=[], security_source=self.sdk_configuration.security, @@ -1050,7 +1098,7 @@ async def audio_to_text_async( retry_config=retry_config, ) - data: Any = None + response_data: Any = None if utils.match_response(http_res, "200", "application/json"): return operations.GenAudioToTextResponse( text_response=utils.unmarshal_json( @@ -1061,14 +1109,16 @@ async def audio_to_text_async( if utils.match_response( http_res, ["400", "401", "413", "415"], "application/json" ): - data = utils.unmarshal_json(http_res.text, errors.HTTPErrorData) - raise errors.HTTPError(data=data) + response_data = utils.unmarshal_json(http_res.text, errors.HTTPErrorData) + raise errors.HTTPError(data=response_data) if utils.match_response(http_res, "422", "application/json"): - data = utils.unmarshal_json(http_res.text, errors.HTTPValidationErrorData) - raise errors.HTTPValidationError(data=data) + response_data = utils.unmarshal_json( + http_res.text, errors.HTTPValidationErrorData + ) + raise errors.HTTPValidationError(data=response_data) if utils.match_response(http_res, "500", "application/json"): - data = utils.unmarshal_json(http_res.text, errors.HTTPErrorData) - raise errors.HTTPError(data=data) + response_data = utils.unmarshal_json(http_res.text, errors.HTTPErrorData) + raise errors.HTTPError(data=response_data) if utils.match_response(http_res, "4XX", "*"): http_res_text = await utils.stream_to_text_async(http_res) raise errors.SDKError( @@ -1118,6 +1168,8 @@ def segment_anything2( if server_url is not None: base_url = server_url + else: + base_url = self._get_url(base_url, url_variables) if not isinstance(request, BaseModel): request = utils.unmarshal(request, components.BodyGenSegmentAnything2) @@ -1152,6 +1204,7 @@ def segment_anything2( http_res = self.do_request( hook_ctx=HookContext( + base_url=base_url or "", operation_id="genSegmentAnything2", oauth2_scopes=[], security_source=self.sdk_configuration.security, @@ -1161,7 +1214,7 @@ def segment_anything2( retry_config=retry_config, ) - data: Any = None + response_data: Any = None if utils.match_response(http_res, "200", "application/json"): return operations.GenSegmentAnything2Response( masks_response=utils.unmarshal_json( @@ -1170,14 +1223,16 @@ def segment_anything2( http_meta=components.HTTPMetadata(request=req, response=http_res), ) if utils.match_response(http_res, ["400", "401"], "application/json"): - data = utils.unmarshal_json(http_res.text, errors.HTTPErrorData) - raise errors.HTTPError(data=data) + response_data = utils.unmarshal_json(http_res.text, errors.HTTPErrorData) + raise errors.HTTPError(data=response_data) if utils.match_response(http_res, "422", "application/json"): - data = utils.unmarshal_json(http_res.text, errors.HTTPValidationErrorData) - raise errors.HTTPValidationError(data=data) + response_data = utils.unmarshal_json( + http_res.text, errors.HTTPValidationErrorData + ) + raise errors.HTTPValidationError(data=response_data) if utils.match_response(http_res, "500", "application/json"): - data = utils.unmarshal_json(http_res.text, errors.HTTPErrorData) - raise errors.HTTPError(data=data) + response_data = utils.unmarshal_json(http_res.text, errors.HTTPErrorData) + raise errors.HTTPError(data=response_data) if utils.match_response(http_res, "4XX", "*"): http_res_text = utils.stream_to_text(http_res) raise errors.SDKError( @@ -1227,6 +1282,8 @@ async def segment_anything2_async( if server_url is not None: base_url = server_url + else: + base_url = self._get_url(base_url, url_variables) if not isinstance(request, BaseModel): request = utils.unmarshal(request, components.BodyGenSegmentAnything2) @@ -1261,6 +1318,7 @@ async def segment_anything2_async( http_res = await self.do_request_async( hook_ctx=HookContext( + base_url=base_url or "", operation_id="genSegmentAnything2", oauth2_scopes=[], security_source=self.sdk_configuration.security, @@ -1270,7 +1328,7 @@ async def segment_anything2_async( retry_config=retry_config, ) - data: Any = None + response_data: Any = None if utils.match_response(http_res, "200", "application/json"): return operations.GenSegmentAnything2Response( masks_response=utils.unmarshal_json( @@ -1279,14 +1337,16 @@ async def segment_anything2_async( http_meta=components.HTTPMetadata(request=req, response=http_res), ) if utils.match_response(http_res, ["400", "401"], "application/json"): - data = utils.unmarshal_json(http_res.text, errors.HTTPErrorData) - raise errors.HTTPError(data=data) + response_data = utils.unmarshal_json(http_res.text, errors.HTTPErrorData) + raise errors.HTTPError(data=response_data) if utils.match_response(http_res, "422", "application/json"): - data = utils.unmarshal_json(http_res.text, errors.HTTPValidationErrorData) - raise errors.HTTPValidationError(data=data) + response_data = utils.unmarshal_json( + http_res.text, errors.HTTPValidationErrorData + ) + raise errors.HTTPValidationError(data=response_data) if utils.match_response(http_res, "500", "application/json"): - data = utils.unmarshal_json(http_res.text, errors.HTTPErrorData) - raise errors.HTTPError(data=data) + response_data = utils.unmarshal_json(http_res.text, errors.HTTPErrorData) + raise errors.HTTPError(data=response_data) if utils.match_response(http_res, "4XX", "*"): http_res_text = await utils.stream_to_text_async(http_res) raise errors.SDKError( @@ -1333,6 +1393,8 @@ def llm( if server_url is not None: base_url = server_url + else: + base_url = self._get_url(base_url, url_variables) if not isinstance(request, BaseModel): request = utils.unmarshal(request, components.LLMRequest) @@ -1367,6 +1429,7 @@ def llm( http_res = self.do_request( hook_ctx=HookContext( + base_url=base_url or "", operation_id="genLLM", oauth2_scopes=[], security_source=self.sdk_configuration.security, @@ -1376,7 +1439,7 @@ def llm( retry_config=retry_config, ) - data: Any = None + response_data: Any = None if utils.match_response(http_res, "200", "application/json"): return operations.GenLLMResponse( llm_response=utils.unmarshal_json( @@ -1385,14 +1448,16 @@ def llm( http_meta=components.HTTPMetadata(request=req, response=http_res), ) if utils.match_response(http_res, ["400", "401"], "application/json"): - data = utils.unmarshal_json(http_res.text, errors.HTTPErrorData) - raise errors.HTTPError(data=data) + response_data = utils.unmarshal_json(http_res.text, errors.HTTPErrorData) + raise errors.HTTPError(data=response_data) if utils.match_response(http_res, "422", "application/json"): - data = utils.unmarshal_json(http_res.text, errors.HTTPValidationErrorData) - raise errors.HTTPValidationError(data=data) + response_data = utils.unmarshal_json( + http_res.text, errors.HTTPValidationErrorData + ) + raise errors.HTTPValidationError(data=response_data) if utils.match_response(http_res, "500", "application/json"): - data = utils.unmarshal_json(http_res.text, errors.HTTPErrorData) - raise errors.HTTPError(data=data) + response_data = utils.unmarshal_json(http_res.text, errors.HTTPErrorData) + raise errors.HTTPError(data=response_data) if utils.match_response(http_res, "4XX", "*"): http_res_text = utils.stream_to_text(http_res) raise errors.SDKError( @@ -1439,6 +1504,8 @@ async def llm_async( if server_url is not None: base_url = server_url + else: + base_url = self._get_url(base_url, url_variables) if not isinstance(request, BaseModel): request = utils.unmarshal(request, components.LLMRequest) @@ -1473,6 +1540,7 @@ async def llm_async( http_res = await self.do_request_async( hook_ctx=HookContext( + base_url=base_url or "", operation_id="genLLM", oauth2_scopes=[], security_source=self.sdk_configuration.security, @@ -1482,7 +1550,7 @@ async def llm_async( retry_config=retry_config, ) - data: Any = None + response_data: Any = None if utils.match_response(http_res, "200", "application/json"): return operations.GenLLMResponse( llm_response=utils.unmarshal_json( @@ -1491,14 +1559,16 @@ async def llm_async( http_meta=components.HTTPMetadata(request=req, response=http_res), ) if utils.match_response(http_res, ["400", "401"], "application/json"): - data = utils.unmarshal_json(http_res.text, errors.HTTPErrorData) - raise errors.HTTPError(data=data) + response_data = utils.unmarshal_json(http_res.text, errors.HTTPErrorData) + raise errors.HTTPError(data=response_data) if utils.match_response(http_res, "422", "application/json"): - data = utils.unmarshal_json(http_res.text, errors.HTTPValidationErrorData) - raise errors.HTTPValidationError(data=data) + response_data = utils.unmarshal_json( + http_res.text, errors.HTTPValidationErrorData + ) + raise errors.HTTPValidationError(data=response_data) if utils.match_response(http_res, "500", "application/json"): - data = utils.unmarshal_json(http_res.text, errors.HTTPErrorData) - raise errors.HTTPError(data=data) + response_data = utils.unmarshal_json(http_res.text, errors.HTTPErrorData) + raise errors.HTTPError(data=response_data) if utils.match_response(http_res, "4XX", "*"): http_res_text = await utils.stream_to_text_async(http_res) raise errors.SDKError( @@ -1547,6 +1617,8 @@ def image_to_text( if server_url is not None: base_url = server_url + else: + base_url = self._get_url(base_url, url_variables) if not isinstance(request, BaseModel): request = utils.unmarshal(request, components.BodyGenImageToText) @@ -1581,6 +1653,7 @@ def image_to_text( http_res = self.do_request( hook_ctx=HookContext( + base_url=base_url or "", operation_id="genImageToText", oauth2_scopes=[], security_source=self.sdk_configuration.security, @@ -1590,7 +1663,7 @@ def image_to_text( retry_config=retry_config, ) - data: Any = None + response_data: Any = None if utils.match_response(http_res, "200", "application/json"): return operations.GenImageToTextResponse( image_to_text_response=utils.unmarshal_json( @@ -1599,14 +1672,16 @@ def image_to_text( http_meta=components.HTTPMetadata(request=req, response=http_res), ) if utils.match_response(http_res, ["400", "401", "413"], "application/json"): - data = utils.unmarshal_json(http_res.text, errors.HTTPErrorData) - raise errors.HTTPError(data=data) + response_data = utils.unmarshal_json(http_res.text, errors.HTTPErrorData) + raise errors.HTTPError(data=response_data) if utils.match_response(http_res, "422", "application/json"): - data = utils.unmarshal_json(http_res.text, errors.HTTPValidationErrorData) - raise errors.HTTPValidationError(data=data) + response_data = utils.unmarshal_json( + http_res.text, errors.HTTPValidationErrorData + ) + raise errors.HTTPValidationError(data=response_data) if utils.match_response(http_res, "500", "application/json"): - data = utils.unmarshal_json(http_res.text, errors.HTTPErrorData) - raise errors.HTTPError(data=data) + response_data = utils.unmarshal_json(http_res.text, errors.HTTPErrorData) + raise errors.HTTPError(data=response_data) if utils.match_response(http_res, "4XX", "*"): http_res_text = utils.stream_to_text(http_res) raise errors.SDKError( @@ -1655,6 +1730,8 @@ async def image_to_text_async( if server_url is not None: base_url = server_url + else: + base_url = self._get_url(base_url, url_variables) if not isinstance(request, BaseModel): request = utils.unmarshal(request, components.BodyGenImageToText) @@ -1689,6 +1766,7 @@ async def image_to_text_async( http_res = await self.do_request_async( hook_ctx=HookContext( + base_url=base_url or "", operation_id="genImageToText", oauth2_scopes=[], security_source=self.sdk_configuration.security, @@ -1698,7 +1776,7 @@ async def image_to_text_async( retry_config=retry_config, ) - data: Any = None + response_data: Any = None if utils.match_response(http_res, "200", "application/json"): return operations.GenImageToTextResponse( image_to_text_response=utils.unmarshal_json( @@ -1707,14 +1785,16 @@ async def image_to_text_async( http_meta=components.HTTPMetadata(request=req, response=http_res), ) if utils.match_response(http_res, ["400", "401", "413"], "application/json"): - data = utils.unmarshal_json(http_res.text, errors.HTTPErrorData) - raise errors.HTTPError(data=data) + response_data = utils.unmarshal_json(http_res.text, errors.HTTPErrorData) + raise errors.HTTPError(data=response_data) if utils.match_response(http_res, "422", "application/json"): - data = utils.unmarshal_json(http_res.text, errors.HTTPValidationErrorData) - raise errors.HTTPValidationError(data=data) + response_data = utils.unmarshal_json( + http_res.text, errors.HTTPValidationErrorData + ) + raise errors.HTTPValidationError(data=response_data) if utils.match_response(http_res, "500", "application/json"): - data = utils.unmarshal_json(http_res.text, errors.HTTPErrorData) - raise errors.HTTPError(data=data) + response_data = utils.unmarshal_json(http_res.text, errors.HTTPErrorData) + raise errors.HTTPError(data=response_data) if utils.match_response(http_res, "4XX", "*"): http_res_text = await utils.stream_to_text_async(http_res) raise errors.SDKError( @@ -1764,6 +1844,8 @@ def live_video_to_video( if server_url is not None: base_url = server_url + else: + base_url = self._get_url(base_url, url_variables) if not isinstance(request, BaseModel): request = utils.unmarshal(request, components.LiveVideoToVideoParams) @@ -1798,6 +1880,7 @@ def live_video_to_video( http_res = self.do_request( hook_ctx=HookContext( + base_url=base_url or "", operation_id="genLiveVideoToVideo", oauth2_scopes=[], security_source=self.sdk_configuration.security, @@ -1807,7 +1890,7 @@ def live_video_to_video( retry_config=retry_config, ) - data: Any = None + response_data: Any = None if utils.match_response(http_res, "200", "application/json"): return operations.GenLiveVideoToVideoResponse( live_video_to_video_response=utils.unmarshal_json( @@ -1816,14 +1899,16 @@ def live_video_to_video( http_meta=components.HTTPMetadata(request=req, response=http_res), ) if utils.match_response(http_res, ["400", "401"], "application/json"): - data = utils.unmarshal_json(http_res.text, errors.HTTPErrorData) - raise errors.HTTPError(data=data) + response_data = utils.unmarshal_json(http_res.text, errors.HTTPErrorData) + raise errors.HTTPError(data=response_data) if utils.match_response(http_res, "422", "application/json"): - data = utils.unmarshal_json(http_res.text, errors.HTTPValidationErrorData) - raise errors.HTTPValidationError(data=data) + response_data = utils.unmarshal_json( + http_res.text, errors.HTTPValidationErrorData + ) + raise errors.HTTPValidationError(data=response_data) if utils.match_response(http_res, "500", "application/json"): - data = utils.unmarshal_json(http_res.text, errors.HTTPErrorData) - raise errors.HTTPError(data=data) + response_data = utils.unmarshal_json(http_res.text, errors.HTTPErrorData) + raise errors.HTTPError(data=response_data) if utils.match_response(http_res, "4XX", "*"): http_res_text = utils.stream_to_text(http_res) raise errors.SDKError( @@ -1873,6 +1958,8 @@ async def live_video_to_video_async( if server_url is not None: base_url = server_url + else: + base_url = self._get_url(base_url, url_variables) if not isinstance(request, BaseModel): request = utils.unmarshal(request, components.LiveVideoToVideoParams) @@ -1907,6 +1994,7 @@ async def live_video_to_video_async( http_res = await self.do_request_async( hook_ctx=HookContext( + base_url=base_url or "", operation_id="genLiveVideoToVideo", oauth2_scopes=[], security_source=self.sdk_configuration.security, @@ -1916,7 +2004,7 @@ async def live_video_to_video_async( retry_config=retry_config, ) - data: Any = None + response_data: Any = None if utils.match_response(http_res, "200", "application/json"): return operations.GenLiveVideoToVideoResponse( live_video_to_video_response=utils.unmarshal_json( @@ -1925,14 +2013,16 @@ async def live_video_to_video_async( http_meta=components.HTTPMetadata(request=req, response=http_res), ) if utils.match_response(http_res, ["400", "401"], "application/json"): - data = utils.unmarshal_json(http_res.text, errors.HTTPErrorData) - raise errors.HTTPError(data=data) + response_data = utils.unmarshal_json(http_res.text, errors.HTTPErrorData) + raise errors.HTTPError(data=response_data) if utils.match_response(http_res, "422", "application/json"): - data = utils.unmarshal_json(http_res.text, errors.HTTPValidationErrorData) - raise errors.HTTPValidationError(data=data) + response_data = utils.unmarshal_json( + http_res.text, errors.HTTPValidationErrorData + ) + raise errors.HTTPValidationError(data=response_data) if utils.match_response(http_res, "500", "application/json"): - data = utils.unmarshal_json(http_res.text, errors.HTTPErrorData) - raise errors.HTTPError(data=data) + response_data = utils.unmarshal_json(http_res.text, errors.HTTPErrorData) + raise errors.HTTPError(data=response_data) if utils.match_response(http_res, "4XX", "*"): http_res_text = await utils.stream_to_text_async(http_res) raise errors.SDKError( @@ -1981,6 +2071,8 @@ def text_to_speech( if server_url is not None: base_url = server_url + else: + base_url = self._get_url(base_url, url_variables) if not isinstance(request, BaseModel): request = utils.unmarshal(request, components.TextToSpeechParams) @@ -2015,6 +2107,7 @@ def text_to_speech( http_res = self.do_request( hook_ctx=HookContext( + base_url=base_url or "", operation_id="genTextToSpeech", oauth2_scopes=[], security_source=self.sdk_configuration.security, @@ -2024,7 +2117,7 @@ def text_to_speech( retry_config=retry_config, ) - data: Any = None + response_data: Any = None if utils.match_response(http_res, "200", "application/json"): return operations.GenTextToSpeechResponse( audio_response=utils.unmarshal_json( @@ -2033,14 +2126,16 @@ def text_to_speech( http_meta=components.HTTPMetadata(request=req, response=http_res), ) if utils.match_response(http_res, ["400", "401"], "application/json"): - data = utils.unmarshal_json(http_res.text, errors.HTTPErrorData) - raise errors.HTTPError(data=data) + response_data = utils.unmarshal_json(http_res.text, errors.HTTPErrorData) + raise errors.HTTPError(data=response_data) if utils.match_response(http_res, "422", "application/json"): - data = utils.unmarshal_json(http_res.text, errors.HTTPValidationErrorData) - raise errors.HTTPValidationError(data=data) + response_data = utils.unmarshal_json( + http_res.text, errors.HTTPValidationErrorData + ) + raise errors.HTTPValidationError(data=response_data) if utils.match_response(http_res, "500", "application/json"): - data = utils.unmarshal_json(http_res.text, errors.HTTPErrorData) - raise errors.HTTPError(data=data) + response_data = utils.unmarshal_json(http_res.text, errors.HTTPErrorData) + raise errors.HTTPError(data=response_data) if utils.match_response(http_res, "4XX", "*"): http_res_text = utils.stream_to_text(http_res) raise errors.SDKError( @@ -2089,6 +2184,8 @@ async def text_to_speech_async( if server_url is not None: base_url = server_url + else: + base_url = self._get_url(base_url, url_variables) if not isinstance(request, BaseModel): request = utils.unmarshal(request, components.TextToSpeechParams) @@ -2123,6 +2220,7 @@ async def text_to_speech_async( http_res = await self.do_request_async( hook_ctx=HookContext( + base_url=base_url or "", operation_id="genTextToSpeech", oauth2_scopes=[], security_source=self.sdk_configuration.security, @@ -2132,7 +2230,7 @@ async def text_to_speech_async( retry_config=retry_config, ) - data: Any = None + response_data: Any = None if utils.match_response(http_res, "200", "application/json"): return operations.GenTextToSpeechResponse( audio_response=utils.unmarshal_json( @@ -2141,14 +2239,16 @@ async def text_to_speech_async( http_meta=components.HTTPMetadata(request=req, response=http_res), ) if utils.match_response(http_res, ["400", "401"], "application/json"): - data = utils.unmarshal_json(http_res.text, errors.HTTPErrorData) - raise errors.HTTPError(data=data) + response_data = utils.unmarshal_json(http_res.text, errors.HTTPErrorData) + raise errors.HTTPError(data=response_data) if utils.match_response(http_res, "422", "application/json"): - data = utils.unmarshal_json(http_res.text, errors.HTTPValidationErrorData) - raise errors.HTTPValidationError(data=data) + response_data = utils.unmarshal_json( + http_res.text, errors.HTTPValidationErrorData + ) + raise errors.HTTPValidationError(data=response_data) if utils.match_response(http_res, "500", "application/json"): - data = utils.unmarshal_json(http_res.text, errors.HTTPErrorData) - raise errors.HTTPError(data=data) + response_data = utils.unmarshal_json(http_res.text, errors.HTTPErrorData) + raise errors.HTTPError(data=response_data) if utils.match_response(http_res, "4XX", "*"): http_res_text = await utils.stream_to_text_async(http_res) raise errors.SDKError( diff --git a/src/livepeer_ai/httpclient.py b/src/livepeer_ai/httpclient.py index 9dc43cb..1e42635 100644 --- a/src/livepeer_ai/httpclient.py +++ b/src/livepeer_ai/httpclient.py @@ -94,7 +94,9 @@ class ClientOwner(Protocol): def close_clients( owner: ClientOwner, sync_client: Union[HttpClient, None], + sync_client_supplied: bool, async_client: Union[AsyncHttpClient, None], + async_client_supplied: bool, ) -> None: """ A finalizer function that is meant to be used with weakref.finalize to close @@ -107,13 +109,13 @@ def close_clients( owner.client = None owner.async_client = None - if sync_client is not None: + if sync_client is not None and not sync_client_supplied: try: sync_client.close() except Exception: pass - if async_client is not None: + if async_client is not None and not async_client_supplied: is_async = False try: asyncio.get_running_loop() diff --git a/src/livepeer_ai/models/__init__.py b/src/livepeer_ai/models/__init__.py new file mode 100644 index 0000000..cc53976 --- /dev/null +++ b/src/livepeer_ai/models/__init__.py @@ -0,0 +1,4 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" + +# package + diff --git a/src/livepeer_ai/models/components/livevideotovideoparams.py b/src/livepeer_ai/models/components/livevideotovideoparams.py index 3afd049..6b6aabb 100644 --- a/src/livepeer_ai/models/components/livevideotovideoparams.py +++ b/src/livepeer_ai/models/components/livevideotovideoparams.py @@ -27,6 +27,10 @@ class LiveVideoToVideoParamsTypedDict(TypedDict): r"""Name of the pipeline to run in the live video to video job. Notice that this is named model_id for consistency with other routes, but it does not refer to a Hugging Face model ID. The exact model(s) depends on the pipeline implementation and might be configurable via the `params` argument.""" params: NotRequired[ParamsTypedDict] r"""Initial parameters for the pipeline.""" + gateway_request_id: NotRequired[str] + r"""The ID of the Gateway request (for logging purposes).""" + stream_id: NotRequired[str] + r"""The Stream ID (for logging purposes).""" class LiveVideoToVideoParams(BaseModel): @@ -47,3 +51,9 @@ class LiveVideoToVideoParams(BaseModel): params: Optional[Params] = None r"""Initial parameters for the pipeline.""" + + gateway_request_id: Optional[str] = "" + r"""The ID of the Gateway request (for logging purposes).""" + + stream_id: Optional[str] = "" + r"""The Stream ID (for logging purposes).""" diff --git a/src/livepeer_ai/models/components/livevideotovideoresponse.py b/src/livepeer_ai/models/components/livevideotovideoresponse.py index cba67ee..32ed905 100644 --- a/src/livepeer_ai/models/components/livevideotovideoresponse.py +++ b/src/livepeer_ai/models/components/livevideotovideoresponse.py @@ -17,6 +17,8 @@ class LiveVideoToVideoResponseTypedDict(TypedDict): r"""URL for updating the live video-to-video generation""" events_url: NotRequired[str] r"""URL for subscribing to events for pipeline status and logs""" + request_id: NotRequired[str] + r"""The ID generated for this request""" class LiveVideoToVideoResponse(BaseModel): @@ -33,3 +35,6 @@ class LiveVideoToVideoResponse(BaseModel): events_url: Optional[str] = "" r"""URL for subscribing to events for pipeline status and logs""" + + request_id: Optional[str] = "" + r"""The ID generated for this request""" diff --git a/src/livepeer_ai/sdk.py b/src/livepeer_ai/sdk.py index 59d8ab5..5159e23 100644 --- a/src/livepeer_ai/sdk.py +++ b/src/livepeer_ai/sdk.py @@ -43,15 +43,19 @@ def __init__( :param retry_config: The retry configuration to use for all supported methods :param timeout_ms: Optional request timeout applied to each operation in milliseconds """ + client_supplied = True if client is None: client = httpx.Client() + client_supplied = False assert issubclass( type(client), HttpClient ), "The provided client must implement the HttpClient protocol." + async_client_supplied = True if async_client is None: async_client = httpx.AsyncClient() + async_client_supplied = False if debug_logger is None: debug_logger = get_default_logger() @@ -75,7 +79,9 @@ def __init__( self, SDKConfiguration( client=client, + client_supplied=client_supplied, async_client=async_client, + async_client_supplied=async_client_supplied, security=security, server_url=server_url, server_idx=server_idx, @@ -89,7 +95,7 @@ def __init__( current_server_url, *_ = self.sdk_configuration.get_server_details() server_url, self.sdk_configuration.client = hooks.sdk_init( - current_server_url, self.sdk_configuration.client + current_server_url, client ) if current_server_url != server_url: self.sdk_configuration.server_url = server_url @@ -102,7 +108,9 @@ def __init__( close_clients, cast(ClientOwner, self.sdk_configuration), self.sdk_configuration.client, + self.sdk_configuration.client_supplied, self.sdk_configuration.async_client, + self.sdk_configuration.async_client_supplied, ) self._init_sdks() @@ -117,9 +125,17 @@ async def __aenter__(self): return self def __exit__(self, exc_type, exc_val, exc_tb): - if self.sdk_configuration.client is not None: + if ( + self.sdk_configuration.client is not None + and not self.sdk_configuration.client_supplied + ): self.sdk_configuration.client.close() + self.sdk_configuration.client = None async def __aexit__(self, exc_type, exc_val, exc_tb): - if self.sdk_configuration.async_client is not None: + if ( + self.sdk_configuration.async_client is not None + and not self.sdk_configuration.async_client_supplied + ): await self.sdk_configuration.async_client.aclose() + self.sdk_configuration.async_client = None diff --git a/src/livepeer_ai/sdkconfiguration.py b/src/livepeer_ai/sdkconfiguration.py index 1bdbc10..62b33bf 100644 --- a/src/livepeer_ai/sdkconfiguration.py +++ b/src/livepeer_ai/sdkconfiguration.py @@ -27,8 +27,10 @@ @dataclass class SDKConfiguration: - client: HttpClient - async_client: AsyncHttpClient + client: Union[HttpClient, None] + client_supplied: bool + async_client: Union[AsyncHttpClient, None] + async_client_supplied: bool debug_logger: Logger security: Optional[ Union[components.Security, Callable[[], components.Security]] diff --git a/src/livepeer_ai/types/basemodel.py b/src/livepeer_ai/types/basemodel.py index a6187ef..231c2e3 100644 --- a/src/livepeer_ai/types/basemodel.py +++ b/src/livepeer_ai/types/basemodel.py @@ -2,7 +2,7 @@ from pydantic import ConfigDict, model_serializer from pydantic import BaseModel as PydanticBaseModel -from typing import TYPE_CHECKING, Literal, Optional, TypeVar, Union, NewType +from typing import TYPE_CHECKING, Literal, Optional, TypeVar, Union from typing_extensions import TypeAliasType, TypeAlias @@ -35,5 +35,5 @@ def __bool__(self) -> Literal[False]: "OptionalNullable", Union[Optional[Nullable[T]], Unset], type_params=(T,) ) -UnrecognizedInt = NewType("UnrecognizedInt", int) -UnrecognizedStr = NewType("UnrecognizedStr", str) +UnrecognizedInt: TypeAlias = int +UnrecognizedStr: TypeAlias = str diff --git a/src/livepeer_ai/utils/__init__.py b/src/livepeer_ai/utils/__init__.py index 26d51ae..f2950ee 100644 --- a/src/livepeer_ai/utils/__init__.py +++ b/src/livepeer_ai/utils/__init__.py @@ -1,6 +1,7 @@ """Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" from .annotations import get_discriminator +from .datetimes import parse_datetime from .enums import OpenEnumMeta from .headers import get_headers, get_response_headers from .metadata import ( @@ -42,6 +43,7 @@ match_content_type, match_status_codes, match_response, + cast_partial, ) from .logger import Logger, get_body_content, get_default_logger @@ -94,4 +96,5 @@ "validate_float", "validate_int", "validate_open_enum", + "cast_partial", ] diff --git a/src/livepeer_ai/utils/datetimes.py b/src/livepeer_ai/utils/datetimes.py new file mode 100644 index 0000000..a6c52cd --- /dev/null +++ b/src/livepeer_ai/utils/datetimes.py @@ -0,0 +1,23 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" + +from datetime import datetime +import sys + + +def parse_datetime(datetime_string: str) -> datetime: + """ + Convert a RFC 3339 / ISO 8601 formatted string into a datetime object. + Python versions 3.11 and later support parsing RFC 3339 directly with + datetime.fromisoformat(), but for earlier versions, this function + encapsulates the necessary extra logic. + """ + # Python 3.11 and later can parse RFC 3339 directly + if sys.version_info >= (3, 11): + return datetime.fromisoformat(datetime_string) + + # For Python 3.10 and earlier, a common ValueError is trailing 'Z' suffix, + # so fix that upfront. + if datetime_string.endswith("Z"): + datetime_string = datetime_string[:-1] + "+00:00" + + return datetime.fromisoformat(datetime_string) diff --git a/src/livepeer_ai/utils/enums.py b/src/livepeer_ai/utils/enums.py index c650b10..c3bc13c 100644 --- a/src/livepeer_ai/utils/enums.py +++ b/src/livepeer_ai/utils/enums.py @@ -1,34 +1,74 @@ """Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" import enum - +import sys class OpenEnumMeta(enum.EnumMeta): - def __call__( - cls, value, names=None, *, module=None, qualname=None, type=None, start=1 - ): - # The `type` kwarg also happens to be a built-in that pylint flags as - # redeclared. Safe to ignore this lint rule with this scope. - # pylint: disable=redefined-builtin + # The __call__ method `boundary` kwarg was added in 3.11 and must be present + # for pyright. Refer also: https://github.com/pylint-dev/pylint/issues/9622 + # pylint: disable=unexpected-keyword-arg + # The __call__ method `values` varg must be named for pyright. + # pylint: disable=keyword-arg-before-vararg + + if sys.version_info >= (3, 11): + def __call__( + cls, value, names=None, *values, module=None, qualname=None, type=None, start=1, boundary=None + ): + # The `type` kwarg also happens to be a built-in that pylint flags as + # redeclared. Safe to ignore this lint rule with this scope. + # pylint: disable=redefined-builtin + + if names is not None: + return super().__call__( + value, + names=names, + *values, + module=module, + qualname=qualname, + type=type, + start=start, + boundary=boundary, + ) + + try: + return super().__call__( + value, + names=names, # pyright: ignore[reportArgumentType] + *values, + module=module, + qualname=qualname, + type=type, + start=start, + boundary=boundary, + ) + except ValueError: + return value + else: + def __call__( + cls, value, names=None, *, module=None, qualname=None, type=None, start=1 + ): + # The `type` kwarg also happens to be a built-in that pylint flags as + # redeclared. Safe to ignore this lint rule with this scope. + # pylint: disable=redefined-builtin - if names is not None: - return super().__call__( - value, - names=names, - module=module, - qualname=qualname, - type=type, - start=start, - ) + if names is not None: + return super().__call__( + value, + names=names, + module=module, + qualname=qualname, + type=type, + start=start, + ) - try: - return super().__call__( - value, - names=names, # pyright: ignore[reportArgumentType] - module=module, - qualname=qualname, - type=type, - start=start, - ) - except ValueError: - return value + try: + return super().__call__( + value, + names=names, # pyright: ignore[reportArgumentType] + module=module, + qualname=qualname, + type=type, + start=start, + ) + except ValueError: + return value diff --git a/src/livepeer_ai/utils/serializers.py b/src/livepeer_ai/utils/serializers.py index c5eb365..76e44d7 100644 --- a/src/livepeer_ai/utils/serializers.py +++ b/src/livepeer_ai/utils/serializers.py @@ -1,20 +1,24 @@ """Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" from decimal import Decimal +import functools import json -from typing import Any, Dict, List, Union, get_args -import httpx +import typing +from typing import Any, Dict, List, Tuple, Union, get_args +import typing_extensions from typing_extensions import get_origin + +import httpx from pydantic import ConfigDict, create_model from pydantic_core import from_json -from typing_inspect import is_optional_type from ..types.basemodel import BaseModel, Nullable, OptionalNullable, Unset def serialize_decimal(as_str: bool): def serialize(d): - if is_optional_type(type(d)) and d is None: + # Optional[T] is a Union[T, None] + if is_union(type(d)) and type(None) in get_args(type(d)) and d is None: return None if isinstance(d, Unset): return d @@ -42,7 +46,8 @@ def validate_decimal(d): def serialize_float(as_str: bool): def serialize(f): - if is_optional_type(type(f)) and f is None: + # Optional[T] is a Union[T, None] + if is_union(type(f)) and type(None) in get_args(type(f)) and f is None: return None if isinstance(f, Unset): return f @@ -70,7 +75,8 @@ def validate_float(f): def serialize_int(as_str: bool): def serialize(i): - if is_optional_type(type(i)) and i is None: + # Optional[T] is a Union[T, None] + if is_union(type(i)) and type(None) in get_args(type(i)) and i is None: return None if isinstance(i, Unset): return i @@ -118,7 +124,8 @@ def validate(e): def validate_const(v): def validate(c): - if is_optional_type(type(c)) and c is None: + # Optional[T] is a Union[T, None] + if is_union(type(c)) and type(None) in get_args(type(c)) and c is None: return None if v != c: @@ -163,7 +170,7 @@ def marshal_json(val, typ): if len(d) == 0: return "" - return json.dumps(d[next(iter(d))], separators=(",", ":"), sort_keys=True) + return json.dumps(d[next(iter(d))], separators=(",", ":")) def is_nullable(field): @@ -181,6 +188,13 @@ def is_nullable(field): return False +def is_union(obj: object) -> bool: + """ + Returns True if the given object is a typing.Union or typing_extensions.Union. + """ + return any(obj is typing_obj for typing_obj in _get_typing_objects_by_name_of("Union")) + + def stream_to_text(stream: httpx.Response) -> str: return "".join(stream.iter_text()) @@ -213,3 +227,22 @@ def _contains_pydantic_model(data: Any) -> bool: return any(_contains_pydantic_model(value) for value in data.values()) return False + + +@functools.cache +def _get_typing_objects_by_name_of(name: str) -> Tuple[Any, ...]: + """ + Get typing objects by name from typing and typing_extensions. + Reference: https://typing-extensions.readthedocs.io/en/latest/#runtime-use-of-types + """ + result = tuple( + getattr(module, name) + for module in (typing, typing_extensions) + if hasattr(module, name) + ) + if not result: + raise ValueError( + f"Neither typing nor typing_extensions has an object called {name!r}" + ) + return result + diff --git a/src/livepeer_ai/utils/values.py b/src/livepeer_ai/utils/values.py index 2b4b683..dae01a4 100644 --- a/src/livepeer_ai/utils/values.py +++ b/src/livepeer_ai/utils/values.py @@ -3,8 +3,9 @@ from datetime import datetime from enum import Enum from email.message import Message +from functools import partial import os -from typing import Any, Callable, Dict, List, Optional, Tuple, TypeVar, Union +from typing import Any, Callable, Dict, List, Optional, Tuple, TypeVar, Union, cast from httpx import Response from pydantic import BaseModel @@ -51,6 +52,8 @@ def match_status_codes(status_codes: List[str], status_code: int) -> bool: T = TypeVar("T") +def cast_partial(typ): + return partial(cast, typ) def get_global_from_env( value: Optional[T], env_key: str, type_cast: Callable[[str], T]