From d9fdbc7673d764b7a4d98fabd91a570a9f0e443e Mon Sep 17 00:00:00 2001
From: fern-api <115122769+fern-api[bot]@users.noreply.github.com>
Date: Thu, 3 Oct 2024 05:34:00 +0000
Subject: [PATCH 1/6] SDK regeneration
---
.mock/definition/prompts/versions.yml | 42 ++++++
poetry.lock | 14 +-
reference.md | 97 ++++++++++++++
.../prompts/versions/client.py | 124 ++++++++++++++++++
tests/prompts/test_versions.py | 12 ++
5 files changed, 282 insertions(+), 7 deletions(-)
diff --git a/.mock/definition/prompts/versions.yml b/.mock/definition/prompts/versions.yml
index 4e0df35d4..8a69a01d9 100644
--- a/.mock/definition/prompts/versions.yml
+++ b/.mock/definition/prompts/versions.yml
@@ -162,6 +162,48 @@ service:
organization: 1
audiences:
- public
+ cost_estimate:
+ path: /api/prompts/{prompt_id}/versions/{version_id}/cost-estimate
+ method: POST
+ auth: true
+ docs: >
+ Get cost estimate for running a prompt version on a particular
+ project/subset
+ path-parameters:
+ prompt_id:
+ type: integer
+ docs: Prompt ID
+ version_id:
+ type: integer
+ docs: Prompt Version ID
+ display-name: >-
+ Get cost estimate for running a prompt version on a particular
+ project/subset
+ request:
+ name: VersionsCostEstimateRequest
+ query-parameters:
+ project_id:
+ type: integer
+ docs: ID of the project to get an estimate for running on
+ project_subset:
+ type: integer
+ docs: >-
+ Subset of the project to get an estimate for running on (e.g.
+ 'All', 'Sample', or 'HasGT')
+ response:
+ docs: ''
+ type: float
+ examples:
+ - path-parameters:
+ prompt_id: 1
+ version_id: 1
+ query-parameters:
+ project_id: 1
+ project_subset: 1
+ response:
+ body: 1.1
+ audiences:
+ - public
refine_prompt:
path: /api/prompts/{prompt_id}/versions/{version_id}/refine
method: POST
diff --git a/poetry.lock b/poetry.lock
index 864798fe0..ec01a31f7 100644
--- a/poetry.lock
+++ b/poetry.lock
@@ -1426,13 +1426,13 @@ files = [
[[package]]
name = "tomli"
-version = "2.0.1"
+version = "2.0.2"
description = "A lil' TOML parser"
optional = false
-python-versions = ">=3.7"
+python-versions = ">=3.8"
files = [
- {file = "tomli-2.0.1-py3-none-any.whl", hash = "sha256:939de3e7a6161af0c887ef91b7d41a53e7c5a1ca976325f429cb46ea9bc30ecc"},
- {file = "tomli-2.0.1.tar.gz", hash = "sha256:de526c12914f0c550d15924c62d72abc48d6fe7364aa87328337a31007fe8a4f"},
+ {file = "tomli-2.0.2-py3-none-any.whl", hash = "sha256:2ebe24485c53d303f690b0ec092806a085f07af5a5aa1464f3931eec36caaa38"},
+ {file = "tomli-2.0.2.tar.gz", hash = "sha256:d46d457a85337051c36524bc5349dd91b1877838e2979ac5ced3e710ed8a60ed"},
]
[[package]]
@@ -1457,13 +1457,13 @@ telegram = ["requests"]
[[package]]
name = "types-python-dateutil"
-version = "2.9.0.20240906"
+version = "2.9.0.20241003"
description = "Typing stubs for python-dateutil"
optional = false
python-versions = ">=3.8"
files = [
- {file = "types-python-dateutil-2.9.0.20240906.tar.gz", hash = "sha256:9706c3b68284c25adffc47319ecc7947e5bb86b3773f843c73906fd598bc176e"},
- {file = "types_python_dateutil-2.9.0.20240906-py3-none-any.whl", hash = "sha256:27c8cc2d058ccb14946eebcaaa503088f4f6dbc4fb6093d3d456a49aef2753f6"},
+ {file = "types-python-dateutil-2.9.0.20241003.tar.gz", hash = "sha256:58cb85449b2a56d6684e41aeefb4c4280631246a0da1a719bdbe6f3fb0317446"},
+ {file = "types_python_dateutil-2.9.0.20241003-py3-none-any.whl", hash = "sha256:250e1d8e80e7bbc3a6c99b907762711d1a1cdd00e978ad39cb5940f6f0a87f3d"},
]
[[package]]
diff --git a/reference.md b/reference.md
index 456ca2b4d..74c82db9a 100644
--- a/reference.md
+++ b/reference.md
@@ -15161,6 +15161,103 @@ client.prompts.versions.update(
+
+
+
+
+client.prompts.versions.cost_estimate(...)
+
+-
+
+#### 📝 Description
+
+
+-
+
+
+-
+
+Get cost estimate for running a prompt version on a particular project/subset
+
+
+
+
+
+#### 🔌 Usage
+
+
+-
+
+
+-
+
+```python
+from label_studio_sdk.client import LabelStudio
+
+client = LabelStudio(
+ api_key="YOUR_API_KEY",
+)
+client.prompts.versions.cost_estimate(
+ prompt_id=1,
+ version_id=1,
+ project_id=1,
+ project_subset=1,
+)
+
+```
+
+
+
+
+
+#### ⚙️ Parameters
+
+
+-
+
+
+-
+
+**prompt_id:** `int` — Prompt ID
+
+
+
+
+
+-
+
+**version_id:** `int` — Prompt Version ID
+
+
+
+
+
+-
+
+**project_id:** `int` — ID of the project to get an estimate for running on
+
+
+
+
+
+-
+
+**project_subset:** `int` — Subset of the project to get an estimate for running on (e.g. 'All', 'Sample', or 'HasGT')
+
+
+
+
+
+-
+
+**request_options:** `typing.Optional[RequestOptions]` — Request-specific configuration.
+
+
+
+
+
+
+
diff --git a/src/label_studio_sdk/prompts/versions/client.py b/src/label_studio_sdk/prompts/versions/client.py
index c0c65062d..8769f885f 100644
--- a/src/label_studio_sdk/prompts/versions/client.py
+++ b/src/label_studio_sdk/prompts/versions/client.py
@@ -335,6 +335,68 @@ def update(
raise ApiError(status_code=_response.status_code, body=_response.text)
raise ApiError(status_code=_response.status_code, body=_response_json)
+ def cost_estimate(
+ self,
+ prompt_id: int,
+ version_id: int,
+ *,
+ project_id: int,
+ project_subset: int,
+ request_options: typing.Optional[RequestOptions] = None,
+ ) -> float:
+ """
+ Get cost estimate for running a prompt version on a particular project/subset
+
+ Parameters
+ ----------
+ prompt_id : int
+ Prompt ID
+
+ version_id : int
+ Prompt Version ID
+
+ project_id : int
+ ID of the project to get an estimate for running on
+
+ project_subset : int
+ Subset of the project to get an estimate for running on (e.g. 'All', 'Sample', or 'HasGT')
+
+ request_options : typing.Optional[RequestOptions]
+ Request-specific configuration.
+
+ Returns
+ -------
+ float
+
+
+ Examples
+ --------
+ from label_studio_sdk.client import LabelStudio
+
+ client = LabelStudio(
+ api_key="YOUR_API_KEY",
+ )
+ client.prompts.versions.cost_estimate(
+ prompt_id=1,
+ version_id=1,
+ project_id=1,
+ project_subset=1,
+ )
+ """
+ _response = self._client_wrapper.httpx_client.request(
+ f"api/prompts/{jsonable_encoder(prompt_id)}/versions/{jsonable_encoder(version_id)}/cost-estimate",
+ method="POST",
+ params={"project_id": project_id, "project_subset": project_subset},
+ request_options=request_options,
+ )
+ try:
+ if 200 <= _response.status_code < 300:
+ return pydantic_v1.parse_obj_as(float, _response.json()) # type: ignore
+ _response_json = _response.json()
+ except JSONDecodeError:
+ raise ApiError(status_code=_response.status_code, body=_response.text)
+ raise ApiError(status_code=_response.status_code, body=_response_json)
+
def refine_prompt(
self,
prompt_id: int,
@@ -726,6 +788,68 @@ async def update(
raise ApiError(status_code=_response.status_code, body=_response.text)
raise ApiError(status_code=_response.status_code, body=_response_json)
+ async def cost_estimate(
+ self,
+ prompt_id: int,
+ version_id: int,
+ *,
+ project_id: int,
+ project_subset: int,
+ request_options: typing.Optional[RequestOptions] = None,
+ ) -> float:
+ """
+ Get cost estimate for running a prompt version on a particular project/subset
+
+ Parameters
+ ----------
+ prompt_id : int
+ Prompt ID
+
+ version_id : int
+ Prompt Version ID
+
+ project_id : int
+ ID of the project to get an estimate for running on
+
+ project_subset : int
+ Subset of the project to get an estimate for running on (e.g. 'All', 'Sample', or 'HasGT')
+
+ request_options : typing.Optional[RequestOptions]
+ Request-specific configuration.
+
+ Returns
+ -------
+ float
+
+
+ Examples
+ --------
+ from label_studio_sdk.client import AsyncLabelStudio
+
+ client = AsyncLabelStudio(
+ api_key="YOUR_API_KEY",
+ )
+ await client.prompts.versions.cost_estimate(
+ prompt_id=1,
+ version_id=1,
+ project_id=1,
+ project_subset=1,
+ )
+ """
+ _response = await self._client_wrapper.httpx_client.request(
+ f"api/prompts/{jsonable_encoder(prompt_id)}/versions/{jsonable_encoder(version_id)}/cost-estimate",
+ method="POST",
+ params={"project_id": project_id, "project_subset": project_subset},
+ request_options=request_options,
+ )
+ try:
+ if 200 <= _response.status_code < 300:
+ return pydantic_v1.parse_obj_as(float, _response.json()) # type: ignore
+ _response_json = _response.json()
+ except JSONDecodeError:
+ raise ApiError(status_code=_response.status_code, body=_response.text)
+ raise ApiError(status_code=_response.status_code, body=_response_json)
+
async def refine_prompt(
self,
prompt_id: int,
diff --git a/tests/prompts/test_versions.py b/tests/prompts/test_versions.py
index 585e5a9c9..13d6d1f51 100644
--- a/tests/prompts/test_versions.py
+++ b/tests/prompts/test_versions.py
@@ -149,6 +149,18 @@ async def test_update(client: LabelStudio, async_client: AsyncLabelStudio) -> No
validate_response(async_response, expected_response, expected_types)
+async def test_cost_estimate(client: LabelStudio, async_client: AsyncLabelStudio) -> None:
+ expected_response: typing.Any = 1.1
+ expected_types: typing.Any = None
+ response = client.prompts.versions.cost_estimate(prompt_id=1, version_id=1, project_id=1, project_subset=1)
+ validate_response(response, expected_response, expected_types)
+
+ async_response = await async_client.prompts.versions.cost_estimate(
+ prompt_id=1, version_id=1, project_id=1, project_subset=1
+ )
+ validate_response(async_response, expected_response, expected_types)
+
+
async def test_refine_prompt(client: LabelStudio, async_client: AsyncLabelStudio) -> None:
expected_response: typing.Any = {
"title": "title",
From e6fabdfc59a58f62a7e45e0591c97cb2caae8d5e Mon Sep 17 00:00:00 2001
From: fern-api <115122769+fern-api[bot]@users.noreply.github.com>
Date: Mon, 7 Oct 2024 23:11:45 +0000
Subject: [PATCH 2/6] SDK regeneration
---
.mock/definition/__package__.yml | 13 ++++++
.mock/definition/prompts/versions.yml | 7 +++-
src/label_studio_sdk/__init__.py | 2 +
.../prompts/versions/client.py | 13 +++---
src/label_studio_sdk/types/__init__.py | 2 +
.../types/inference_run_cost_estimate.py | 42 +++++++++++++++++++
tests/prompts/test_versions.py | 4 +-
7 files changed, 73 insertions(+), 10 deletions(-)
create mode 100644 src/label_studio_sdk/types/inference_run_cost_estimate.py
diff --git a/.mock/definition/__package__.yml b/.mock/definition/__package__.yml
index ae77adcd4..1b195fc5c 100644
--- a/.mock/definition/__package__.yml
+++ b/.mock/definition/__package__.yml
@@ -2347,6 +2347,19 @@ types:
organization: optional
source:
openapi: openapi/openapi.yaml
+ InferenceRunCostEstimate:
+ properties:
+ prompt_cost_usd:
+ type: optional
+ docs: Cost of the prompt (in USD)
+ completion_cost_usd:
+ type: optional
+ docs: Cost of the completion (in USD)
+ total_cost_usd:
+ type: optional
+ docs: Total cost of the inference (in USD)
+ source:
+ openapi: openapi/openapi.yaml
InferenceRunOrganization:
discriminated: false
union:
diff --git a/.mock/definition/prompts/versions.yml b/.mock/definition/prompts/versions.yml
index 8a69a01d9..35b41766d 100644
--- a/.mock/definition/prompts/versions.yml
+++ b/.mock/definition/prompts/versions.yml
@@ -192,7 +192,7 @@ service:
'All', 'Sample', or 'HasGT')
response:
docs: ''
- type: float
+ type: root.InferenceRunCostEstimate
examples:
- path-parameters:
prompt_id: 1
@@ -201,7 +201,10 @@ service:
project_id: 1
project_subset: 1
response:
- body: 1.1
+ body:
+ prompt_cost_usd: 1.1
+ completion_cost_usd: 1.1
+ total_cost_usd: 1.1
audiences:
- public
refine_prompt:
diff --git a/src/label_studio_sdk/__init__.py b/src/label_studio_sdk/__init__.py
index c0829e6c8..d2c383277 100644
--- a/src/label_studio_sdk/__init__.py
+++ b/src/label_studio_sdk/__init__.py
@@ -35,6 +35,7 @@
GcsImportStorage,
GcsImportStorageStatus,
InferenceRun,
+ InferenceRunCostEstimate,
InferenceRunCreatedBy,
InferenceRunOrganization,
InferenceRunProjectSubset,
@@ -220,6 +221,7 @@
"GcsImportStorageStatus",
"ImportStorageListTypesResponseItem",
"InferenceRun",
+ "InferenceRunCostEstimate",
"InferenceRunCreatedBy",
"InferenceRunOrganization",
"InferenceRunProjectSubset",
diff --git a/src/label_studio_sdk/prompts/versions/client.py b/src/label_studio_sdk/prompts/versions/client.py
index 8769f885f..3886161a1 100644
--- a/src/label_studio_sdk/prompts/versions/client.py
+++ b/src/label_studio_sdk/prompts/versions/client.py
@@ -9,6 +9,7 @@
from ...core.jsonable_encoder import jsonable_encoder
from ...core.pydantic_utilities import pydantic_v1
from ...core.request_options import RequestOptions
+from ...types.inference_run_cost_estimate import InferenceRunCostEstimate
from ...types.prompt_version import PromptVersion
from ...types.prompt_version_created_by import PromptVersionCreatedBy
from ...types.prompt_version_organization import PromptVersionOrganization
@@ -343,7 +344,7 @@ def cost_estimate(
project_id: int,
project_subset: int,
request_options: typing.Optional[RequestOptions] = None,
- ) -> float:
+ ) -> InferenceRunCostEstimate:
"""
Get cost estimate for running a prompt version on a particular project/subset
@@ -366,7 +367,7 @@ def cost_estimate(
Returns
-------
- float
+ InferenceRunCostEstimate
Examples
@@ -391,7 +392,7 @@ def cost_estimate(
)
try:
if 200 <= _response.status_code < 300:
- return pydantic_v1.parse_obj_as(float, _response.json()) # type: ignore
+ return pydantic_v1.parse_obj_as(InferenceRunCostEstimate, _response.json()) # type: ignore
_response_json = _response.json()
except JSONDecodeError:
raise ApiError(status_code=_response.status_code, body=_response.text)
@@ -796,7 +797,7 @@ async def cost_estimate(
project_id: int,
project_subset: int,
request_options: typing.Optional[RequestOptions] = None,
- ) -> float:
+ ) -> InferenceRunCostEstimate:
"""
Get cost estimate for running a prompt version on a particular project/subset
@@ -819,7 +820,7 @@ async def cost_estimate(
Returns
-------
- float
+ InferenceRunCostEstimate
Examples
@@ -844,7 +845,7 @@ async def cost_estimate(
)
try:
if 200 <= _response.status_code < 300:
- return pydantic_v1.parse_obj_as(float, _response.json()) # type: ignore
+ return pydantic_v1.parse_obj_as(InferenceRunCostEstimate, _response.json()) # type: ignore
_response_json = _response.json()
except JSONDecodeError:
raise ApiError(status_code=_response.status_code, body=_response.text)
diff --git a/src/label_studio_sdk/types/__init__.py b/src/label_studio_sdk/types/__init__.py
index 63b00095e..3b19c71dd 100644
--- a/src/label_studio_sdk/types/__init__.py
+++ b/src/label_studio_sdk/types/__init__.py
@@ -34,6 +34,7 @@
from .gcs_import_storage import GcsImportStorage
from .gcs_import_storage_status import GcsImportStorageStatus
from .inference_run import InferenceRun
+from .inference_run_cost_estimate import InferenceRunCostEstimate
from .inference_run_created_by import InferenceRunCreatedBy
from .inference_run_organization import InferenceRunOrganization
from .inference_run_project_subset import InferenceRunProjectSubset
@@ -128,6 +129,7 @@
"GcsImportStorage",
"GcsImportStorageStatus",
"InferenceRun",
+ "InferenceRunCostEstimate",
"InferenceRunCreatedBy",
"InferenceRunOrganization",
"InferenceRunProjectSubset",
diff --git a/src/label_studio_sdk/types/inference_run_cost_estimate.py b/src/label_studio_sdk/types/inference_run_cost_estimate.py
new file mode 100644
index 000000000..30920a15f
--- /dev/null
+++ b/src/label_studio_sdk/types/inference_run_cost_estimate.py
@@ -0,0 +1,42 @@
+# This file was auto-generated by Fern from our API Definition.
+
+import datetime as dt
+import typing
+
+from ..core.datetime_utils import serialize_datetime
+from ..core.pydantic_utilities import deep_union_pydantic_dicts, pydantic_v1
+
+
+class InferenceRunCostEstimate(pydantic_v1.BaseModel):
+ prompt_cost_usd: typing.Optional[float] = pydantic_v1.Field(default=None)
+ """
+ Cost of the prompt (in USD)
+ """
+
+ completion_cost_usd: typing.Optional[float] = pydantic_v1.Field(default=None)
+ """
+ Cost of the completion (in USD)
+ """
+
+ total_cost_usd: typing.Optional[float] = pydantic_v1.Field(default=None)
+ """
+ Total cost of the inference (in USD)
+ """
+
+ def json(self, **kwargs: typing.Any) -> str:
+ kwargs_with_defaults: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
+ return super().json(**kwargs_with_defaults)
+
+ def dict(self, **kwargs: typing.Any) -> typing.Dict[str, typing.Any]:
+ kwargs_with_defaults_exclude_unset: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
+ kwargs_with_defaults_exclude_none: typing.Any = {"by_alias": True, "exclude_none": True, **kwargs}
+
+ return deep_union_pydantic_dicts(
+ super().dict(**kwargs_with_defaults_exclude_unset), super().dict(**kwargs_with_defaults_exclude_none)
+ )
+
+ class Config:
+ frozen = True
+ smart_union = True
+ extra = pydantic_v1.Extra.allow
+ json_encoders = {dt.datetime: serialize_datetime}
diff --git a/tests/prompts/test_versions.py b/tests/prompts/test_versions.py
index 13d6d1f51..fca8c3d78 100644
--- a/tests/prompts/test_versions.py
+++ b/tests/prompts/test_versions.py
@@ -150,8 +150,8 @@ async def test_update(client: LabelStudio, async_client: AsyncLabelStudio) -> No
async def test_cost_estimate(client: LabelStudio, async_client: AsyncLabelStudio) -> None:
- expected_response: typing.Any = 1.1
- expected_types: typing.Any = None
+ expected_response: typing.Any = {"prompt_cost_usd": 1.1, "completion_cost_usd": 1.1, "total_cost_usd": 1.1}
+ expected_types: typing.Any = {"prompt_cost_usd": None, "completion_cost_usd": None, "total_cost_usd": None}
response = client.prompts.versions.cost_estimate(prompt_id=1, version_id=1, project_id=1, project_subset=1)
validate_response(response, expected_response, expected_types)
From 34909d6c17e0fcb220a6e082c7d1db15f9b793b6 Mon Sep 17 00:00:00 2001
From: fern-api <115122769+fern-api[bot]@users.noreply.github.com>
Date: Mon, 7 Oct 2024 23:44:41 +0000
Subject: [PATCH 3/6] SDK regeneration
---
.mock/definition/__package__.yml | 30 ++++
.mock/definition/prompts/versions.yml | 57 ++++++--
reference.md | 96 ++++++++++++
src/label_studio_sdk/__init__.py | 4 +
.../prompts/versions/client.py | 137 +++++++++++++++++-
src/label_studio_sdk/types/__init__.py | 4 +
.../types/refined_prompt_response.py | 53 +++++++
...fined_prompt_response_refinement_status.py | 7 +
tests/prompts/test_versions.py | 48 ++++--
9 files changed, 405 insertions(+), 31 deletions(-)
create mode 100644 src/label_studio_sdk/types/refined_prompt_response.py
create mode 100644 src/label_studio_sdk/types/refined_prompt_response_refinement_status.py
diff --git a/.mock/definition/__package__.yml b/.mock/definition/__package__.yml
index 1b195fc5c..9da4153c1 100644
--- a/.mock/definition/__package__.yml
+++ b/.mock/definition/__package__.yml
@@ -2360,6 +2360,36 @@ types:
docs: Total cost of the inference (in USD)
source:
openapi: openapi/openapi.yaml
+ RefinedPromptResponseRefinementStatus:
+ enum:
+ - Pending
+ - InProgress
+ - Completed
+ - Failed
+ docs: Status of the refinement job
+ default: Pending
+ source:
+ openapi: openapi/openapi.yaml
+ RefinedPromptResponse:
+ properties:
+ title:
+ type: optional
+ docs: Title of the refined prompt
+ reasoning:
+ type: optional
+ docs: Reasoning behind the refinement
+ prompt:
+ type: string
+ docs: The refined prompt text
+ refinement_job_id:
+ type: optional
+ docs: Unique identifier for the refinement job
+ refinement_status:
+ type: optional
+ docs: Status of the refinement job
+ default: Pending
+ source:
+ openapi: openapi/openapi.yaml
InferenceRunOrganization:
discriminated: false
union:
diff --git a/.mock/definition/prompts/versions.yml b/.mock/definition/prompts/versions.yml
index 35b41766d..73e2b3e88 100644
--- a/.mock/definition/prompts/versions.yml
+++ b/.mock/definition/prompts/versions.yml
@@ -207,6 +207,46 @@ service:
total_cost_usd: 1.1
audiences:
- public
+ get_refined_prompt:
+ path: /api/prompts/{prompt_id}/versions/{version_id}/refine
+ method: GET
+ auth: true
+ docs: |
+ Get the refined prompt based on the `refinement_job_id`.
+ path-parameters:
+ prompt_id:
+ type: integer
+ docs: Prompt ID
+ version_id:
+ type: integer
+ docs: Prompt Version ID
+ display-name: Get refined prompt
+ request:
+ name: VersionsGetRefinedPromptRequest
+ query-parameters:
+ refinement_job_id:
+ type: string
+ docs: >-
+ Refinement Job ID acquired from the `POST
+ /api/prompts/{prompt_id}/versions/{version_id}/refine` endpoint
+ response:
+ docs: ''
+ type: root.RefinedPromptResponse
+ examples:
+ - path-parameters:
+ prompt_id: 1
+ version_id: 1
+ query-parameters:
+ refinement_job_id: refinement_job_id
+ response:
+ body:
+ title: title
+ reasoning: reasoning
+ prompt: prompt
+ refinement_job_id: refinement_job_id
+ refinement_status: Pending
+ audiences:
+ - public
refine_prompt:
path: /api/prompts/{prompt_id}/versions/{version_id}/refine
method: POST
@@ -224,6 +264,10 @@ service:
display-name: Refine a prompt version
request:
name: VersionsRefinePromptRequest
+ query-parameters:
+ async:
+ type: optional
+ docs: Run the refinement job asynchronously
body:
properties:
teacher_model_provider_connection_id:
@@ -237,7 +281,7 @@ service:
docs: Project ID to target the refined prompt for
response:
docs: ''
- type: root.PromptVersion
+ type: root.RefinedPromptResponse
examples:
- path-parameters:
prompt_id: 1
@@ -246,15 +290,10 @@ service:
response:
body:
title: title
- parent_model: 1
- model_provider_connection: 1
+ reasoning: reasoning
prompt: prompt
- provider: OpenAI
- provider_model_id: provider_model_id
- created_by: 1
- created_at: '2024-01-15T09:30:00Z'
- updated_at: '2024-01-15T09:30:00Z'
- organization: 1
+ refinement_job_id: refinement_job_id
+ refinement_status: Pending
audiences:
- public
source:
diff --git a/reference.md b/reference.md
index 74c82db9a..aebf73bf4 100644
--- a/reference.md
+++ b/reference.md
@@ -15258,6 +15258,94 @@ client.prompts.versions.cost_estimate(
+
+
+
+
+client.prompts.versions.get_refined_prompt(...)
+
+-
+
+#### 📝 Description
+
+
+-
+
+
+-
+
+Get the refined prompt based on the `refinement_job_id`.
+
+
+
+
+
+#### 🔌 Usage
+
+
+-
+
+
+-
+
+```python
+from label_studio_sdk.client import LabelStudio
+
+client = LabelStudio(
+ api_key="YOUR_API_KEY",
+)
+client.prompts.versions.get_refined_prompt(
+ prompt_id=1,
+ version_id=1,
+ refinement_job_id="refinement_job_id",
+)
+
+```
+
+
+
+
+
+#### ⚙️ Parameters
+
+
+-
+
+
+-
+
+**prompt_id:** `int` — Prompt ID
+
+
+
+
+
+-
+
+**version_id:** `int` — Prompt Version ID
+
+
+
+
+
+-
+
+**refinement_job_id:** `str` — Refinement Job ID acquired from the `POST /api/prompts/{prompt_id}/versions/{version_id}/refine` endpoint
+
+
+
+
+
+-
+
+**request_options:** `typing.Optional[RequestOptions]` — Request-specific configuration.
+
+
+
+
+
+
+
@@ -15329,6 +15417,14 @@ client.prompts.versions.refine_prompt(
-
+**async_:** `typing.Optional[bool]` — Run the refinement job asynchronously
+
+
+
+
+
+-
+
**teacher_model_provider_connection_id:** `typing.Optional[int]` — Model Provider Connection ID to use to refine the prompt
diff --git a/src/label_studio_sdk/__init__.py b/src/label_studio_sdk/__init__.py
index d2c383277..4cadefefb 100644
--- a/src/label_studio_sdk/__init__.py
+++ b/src/label_studio_sdk/__init__.py
@@ -75,6 +75,8 @@
RedisExportStorageStatus,
RedisImportStorage,
RedisImportStorageStatus,
+ RefinedPromptResponse,
+ RefinedPromptResponseRefinementStatus,
S3ExportStorage,
S3ExportStorageStatus,
S3ImportStorage,
@@ -277,6 +279,8 @@
"RedisExportStorageStatus",
"RedisImportStorage",
"RedisImportStorageStatus",
+ "RefinedPromptResponse",
+ "RefinedPromptResponseRefinementStatus",
"S3ExportStorage",
"S3ExportStorageStatus",
"S3ImportStorage",
diff --git a/src/label_studio_sdk/prompts/versions/client.py b/src/label_studio_sdk/prompts/versions/client.py
index 3886161a1..dfea4d441 100644
--- a/src/label_studio_sdk/prompts/versions/client.py
+++ b/src/label_studio_sdk/prompts/versions/client.py
@@ -14,6 +14,7 @@
from ...types.prompt_version_created_by import PromptVersionCreatedBy
from ...types.prompt_version_organization import PromptVersionOrganization
from ...types.prompt_version_provider import PromptVersionProvider
+from ...types.refined_prompt_response import RefinedPromptResponse
# this is used as the default value for optional parameters
OMIT = typing.cast(typing.Any, ...)
@@ -398,16 +399,74 @@ def cost_estimate(
raise ApiError(status_code=_response.status_code, body=_response.text)
raise ApiError(status_code=_response.status_code, body=_response_json)
+ def get_refined_prompt(
+ self,
+ prompt_id: int,
+ version_id: int,
+ *,
+ refinement_job_id: str,
+ request_options: typing.Optional[RequestOptions] = None,
+ ) -> RefinedPromptResponse:
+ """
+ Get the refined prompt based on the `refinement_job_id`.
+
+ Parameters
+ ----------
+ prompt_id : int
+ Prompt ID
+
+ version_id : int
+ Prompt Version ID
+
+ refinement_job_id : str
+ Refinement Job ID acquired from the `POST /api/prompts/{prompt_id}/versions/{version_id}/refine` endpoint
+
+ request_options : typing.Optional[RequestOptions]
+ Request-specific configuration.
+
+ Returns
+ -------
+ RefinedPromptResponse
+
+
+ Examples
+ --------
+ from label_studio_sdk.client import LabelStudio
+
+ client = LabelStudio(
+ api_key="YOUR_API_KEY",
+ )
+ client.prompts.versions.get_refined_prompt(
+ prompt_id=1,
+ version_id=1,
+ refinement_job_id="refinement_job_id",
+ )
+ """
+ _response = self._client_wrapper.httpx_client.request(
+ f"api/prompts/{jsonable_encoder(prompt_id)}/versions/{jsonable_encoder(version_id)}/refine",
+ method="GET",
+ params={"refinement_job_id": refinement_job_id},
+ request_options=request_options,
+ )
+ try:
+ if 200 <= _response.status_code < 300:
+ return pydantic_v1.parse_obj_as(RefinedPromptResponse, _response.json()) # type: ignore
+ _response_json = _response.json()
+ except JSONDecodeError:
+ raise ApiError(status_code=_response.status_code, body=_response.text)
+ raise ApiError(status_code=_response.status_code, body=_response_json)
+
def refine_prompt(
self,
prompt_id: int,
version_id: int,
*,
+ async_: typing.Optional[bool] = None,
teacher_model_provider_connection_id: typing.Optional[int] = OMIT,
teacher_model_name: typing.Optional[str] = OMIT,
project_id: typing.Optional[int] = OMIT,
request_options: typing.Optional[RequestOptions] = None,
- ) -> PromptVersion:
+ ) -> RefinedPromptResponse:
"""
Refine a prompt version using a teacher model and save the refined prompt as a new version.
@@ -419,6 +478,9 @@ def refine_prompt(
version_id : int
Base Prompt Version ID
+ async_ : typing.Optional[bool]
+ Run the refinement job asynchronously
+
teacher_model_provider_connection_id : typing.Optional[int]
Model Provider Connection ID to use to refine the prompt
@@ -433,7 +495,7 @@ def refine_prompt(
Returns
-------
- PromptVersion
+ RefinedPromptResponse
Examples
@@ -451,6 +513,7 @@ def refine_prompt(
_response = self._client_wrapper.httpx_client.request(
f"api/prompts/{jsonable_encoder(prompt_id)}/versions/{jsonable_encoder(version_id)}/refine",
method="POST",
+ params={"async": async_},
json={
"teacher_model_provider_connection_id": teacher_model_provider_connection_id,
"teacher_model_name": teacher_model_name,
@@ -461,7 +524,7 @@ def refine_prompt(
)
try:
if 200 <= _response.status_code < 300:
- return pydantic_v1.parse_obj_as(PromptVersion, _response.json()) # type: ignore
+ return pydantic_v1.parse_obj_as(RefinedPromptResponse, _response.json()) # type: ignore
_response_json = _response.json()
except JSONDecodeError:
raise ApiError(status_code=_response.status_code, body=_response.text)
@@ -851,16 +914,74 @@ async def cost_estimate(
raise ApiError(status_code=_response.status_code, body=_response.text)
raise ApiError(status_code=_response.status_code, body=_response_json)
+ async def get_refined_prompt(
+ self,
+ prompt_id: int,
+ version_id: int,
+ *,
+ refinement_job_id: str,
+ request_options: typing.Optional[RequestOptions] = None,
+ ) -> RefinedPromptResponse:
+ """
+ Get the refined prompt based on the `refinement_job_id`.
+
+ Parameters
+ ----------
+ prompt_id : int
+ Prompt ID
+
+ version_id : int
+ Prompt Version ID
+
+ refinement_job_id : str
+ Refinement Job ID acquired from the `POST /api/prompts/{prompt_id}/versions/{version_id}/refine` endpoint
+
+ request_options : typing.Optional[RequestOptions]
+ Request-specific configuration.
+
+ Returns
+ -------
+ RefinedPromptResponse
+
+
+ Examples
+ --------
+ from label_studio_sdk.client import AsyncLabelStudio
+
+ client = AsyncLabelStudio(
+ api_key="YOUR_API_KEY",
+ )
+ await client.prompts.versions.get_refined_prompt(
+ prompt_id=1,
+ version_id=1,
+ refinement_job_id="refinement_job_id",
+ )
+ """
+ _response = await self._client_wrapper.httpx_client.request(
+ f"api/prompts/{jsonable_encoder(prompt_id)}/versions/{jsonable_encoder(version_id)}/refine",
+ method="GET",
+ params={"refinement_job_id": refinement_job_id},
+ request_options=request_options,
+ )
+ try:
+ if 200 <= _response.status_code < 300:
+ return pydantic_v1.parse_obj_as(RefinedPromptResponse, _response.json()) # type: ignore
+ _response_json = _response.json()
+ except JSONDecodeError:
+ raise ApiError(status_code=_response.status_code, body=_response.text)
+ raise ApiError(status_code=_response.status_code, body=_response_json)
+
async def refine_prompt(
self,
prompt_id: int,
version_id: int,
*,
+ async_: typing.Optional[bool] = None,
teacher_model_provider_connection_id: typing.Optional[int] = OMIT,
teacher_model_name: typing.Optional[str] = OMIT,
project_id: typing.Optional[int] = OMIT,
request_options: typing.Optional[RequestOptions] = None,
- ) -> PromptVersion:
+ ) -> RefinedPromptResponse:
"""
Refine a prompt version using a teacher model and save the refined prompt as a new version.
@@ -872,6 +993,9 @@ async def refine_prompt(
version_id : int
Base Prompt Version ID
+ async_ : typing.Optional[bool]
+ Run the refinement job asynchronously
+
teacher_model_provider_connection_id : typing.Optional[int]
Model Provider Connection ID to use to refine the prompt
@@ -886,7 +1010,7 @@ async def refine_prompt(
Returns
-------
- PromptVersion
+ RefinedPromptResponse
Examples
@@ -904,6 +1028,7 @@ async def refine_prompt(
_response = await self._client_wrapper.httpx_client.request(
f"api/prompts/{jsonable_encoder(prompt_id)}/versions/{jsonable_encoder(version_id)}/refine",
method="POST",
+ params={"async": async_},
json={
"teacher_model_provider_connection_id": teacher_model_provider_connection_id,
"teacher_model_name": teacher_model_name,
@@ -914,7 +1039,7 @@ async def refine_prompt(
)
try:
if 200 <= _response.status_code < 300:
- return pydantic_v1.parse_obj_as(PromptVersion, _response.json()) # type: ignore
+ return pydantic_v1.parse_obj_as(RefinedPromptResponse, _response.json()) # type: ignore
_response_json = _response.json()
except JSONDecodeError:
raise ApiError(status_code=_response.status_code, body=_response.text)
diff --git a/src/label_studio_sdk/types/__init__.py b/src/label_studio_sdk/types/__init__.py
index 3b19c71dd..2a293de05 100644
--- a/src/label_studio_sdk/types/__init__.py
+++ b/src/label_studio_sdk/types/__init__.py
@@ -74,6 +74,8 @@
from .redis_export_storage_status import RedisExportStorageStatus
from .redis_import_storage import RedisImportStorage
from .redis_import_storage_status import RedisImportStorageStatus
+from .refined_prompt_response import RefinedPromptResponse
+from .refined_prompt_response_refinement_status import RefinedPromptResponseRefinementStatus
from .s3export_storage import S3ExportStorage
from .s3export_storage_status import S3ExportStorageStatus
from .s3import_storage import S3ImportStorage
@@ -169,6 +171,8 @@
"RedisExportStorageStatus",
"RedisImportStorage",
"RedisImportStorageStatus",
+ "RefinedPromptResponse",
+ "RefinedPromptResponseRefinementStatus",
"S3ExportStorage",
"S3ExportStorageStatus",
"S3ImportStorage",
diff --git a/src/label_studio_sdk/types/refined_prompt_response.py b/src/label_studio_sdk/types/refined_prompt_response.py
new file mode 100644
index 000000000..756cecc4a
--- /dev/null
+++ b/src/label_studio_sdk/types/refined_prompt_response.py
@@ -0,0 +1,53 @@
+# This file was auto-generated by Fern from our API Definition.
+
+import datetime as dt
+import typing
+
+from ..core.datetime_utils import serialize_datetime
+from ..core.pydantic_utilities import deep_union_pydantic_dicts, pydantic_v1
+from .refined_prompt_response_refinement_status import RefinedPromptResponseRefinementStatus
+
+
+class RefinedPromptResponse(pydantic_v1.BaseModel):
+ title: typing.Optional[str] = pydantic_v1.Field(default=None)
+ """
+ Title of the refined prompt
+ """
+
+ reasoning: typing.Optional[str] = pydantic_v1.Field(default=None)
+ """
+ Reasoning behind the refinement
+ """
+
+ prompt: str = pydantic_v1.Field()
+ """
+ The refined prompt text
+ """
+
+ refinement_job_id: typing.Optional[str] = pydantic_v1.Field(default=None)
+ """
+ Unique identifier for the refinement job
+ """
+
+ refinement_status: typing.Optional[RefinedPromptResponseRefinementStatus] = pydantic_v1.Field(default=None)
+ """
+ Status of the refinement job
+ """
+
+ def json(self, **kwargs: typing.Any) -> str:
+ kwargs_with_defaults: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
+ return super().json(**kwargs_with_defaults)
+
+ def dict(self, **kwargs: typing.Any) -> typing.Dict[str, typing.Any]:
+ kwargs_with_defaults_exclude_unset: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
+ kwargs_with_defaults_exclude_none: typing.Any = {"by_alias": True, "exclude_none": True, **kwargs}
+
+ return deep_union_pydantic_dicts(
+ super().dict(**kwargs_with_defaults_exclude_unset), super().dict(**kwargs_with_defaults_exclude_none)
+ )
+
+ class Config:
+ frozen = True
+ smart_union = True
+ extra = pydantic_v1.Extra.allow
+ json_encoders = {dt.datetime: serialize_datetime}
diff --git a/src/label_studio_sdk/types/refined_prompt_response_refinement_status.py b/src/label_studio_sdk/types/refined_prompt_response_refinement_status.py
new file mode 100644
index 000000000..8488e13ca
--- /dev/null
+++ b/src/label_studio_sdk/types/refined_prompt_response_refinement_status.py
@@ -0,0 +1,7 @@
+# This file was auto-generated by Fern from our API Definition.
+
+import typing
+
+RefinedPromptResponseRefinementStatus = typing.Union[
+ typing.Literal["Pending", "InProgress", "Completed", "Failed"], typing.Any
+]
diff --git a/tests/prompts/test_versions.py b/tests/prompts/test_versions.py
index fca8c3d78..f611fead8 100644
--- a/tests/prompts/test_versions.py
+++ b/tests/prompts/test_versions.py
@@ -161,30 +161,46 @@ async def test_cost_estimate(client: LabelStudio, async_client: AsyncLabelStudio
validate_response(async_response, expected_response, expected_types)
+async def test_get_refined_prompt(client: LabelStudio, async_client: AsyncLabelStudio) -> None:
+ expected_response: typing.Any = {
+ "title": "title",
+ "reasoning": "reasoning",
+ "prompt": "prompt",
+ "refinement_job_id": "refinement_job_id",
+ "refinement_status": "Pending",
+ }
+ expected_types: typing.Any = {
+ "title": None,
+ "reasoning": None,
+ "prompt": None,
+ "refinement_job_id": None,
+ "refinement_status": None,
+ }
+ response = client.prompts.versions.get_refined_prompt(
+ prompt_id=1, version_id=1, refinement_job_id="refinement_job_id"
+ )
+ validate_response(response, expected_response, expected_types)
+
+ async_response = await async_client.prompts.versions.get_refined_prompt(
+ prompt_id=1, version_id=1, refinement_job_id="refinement_job_id"
+ )
+ validate_response(async_response, expected_response, expected_types)
+
+
async def test_refine_prompt(client: LabelStudio, async_client: AsyncLabelStudio) -> None:
expected_response: typing.Any = {
"title": "title",
- "parent_model": 1,
- "model_provider_connection": 1,
+ "reasoning": "reasoning",
"prompt": "prompt",
- "provider": "OpenAI",
- "provider_model_id": "provider_model_id",
- "created_by": 1,
- "created_at": "2024-01-15T09:30:00Z",
- "updated_at": "2024-01-15T09:30:00Z",
- "organization": 1,
+ "refinement_job_id": "refinement_job_id",
+ "refinement_status": "Pending",
}
expected_types: typing.Any = {
"title": None,
- "parent_model": "integer",
- "model_provider_connection": "integer",
+ "reasoning": None,
"prompt": None,
- "provider": None,
- "provider_model_id": None,
- "created_by": "integer",
- "created_at": "datetime",
- "updated_at": "datetime",
- "organization": "integer",
+ "refinement_job_id": None,
+ "refinement_status": None,
}
response = client.prompts.versions.refine_prompt(prompt_id=1, version_id=1)
validate_response(response, expected_response, expected_types)
From 877d78ea661bb6f406589870fd916e87aa944f87 Mon Sep 17 00:00:00 2001
From: fern-api <115122769+fern-api[bot]@users.noreply.github.com>
Date: Wed, 9 Oct 2024 13:47:12 +0000
Subject: [PATCH 4/6] SDK regeneration
---
.mock/definition/__package__.yml | 6 +-
.mock/definition/prompts/versions.yml | 6 +-
poetry.lock | 197 ++++++++++--------
.../types/inference_run_cost_estimate.py | 6 +-
tests/prompts/test_versions.py | 6 +-
5 files changed, 120 insertions(+), 101 deletions(-)
diff --git a/.mock/definition/__package__.yml b/.mock/definition/__package__.yml
index 9da4153c1..ecdaa9a60 100644
--- a/.mock/definition/__package__.yml
+++ b/.mock/definition/__package__.yml
@@ -2350,13 +2350,13 @@ types:
InferenceRunCostEstimate:
properties:
prompt_cost_usd:
- type: optional
+ type: optional
docs: Cost of the prompt (in USD)
completion_cost_usd:
- type: optional
+ type: optional
docs: Cost of the completion (in USD)
total_cost_usd:
- type: optional
+ type: optional
docs: Total cost of the inference (in USD)
source:
openapi: openapi/openapi.yaml
diff --git a/.mock/definition/prompts/versions.yml b/.mock/definition/prompts/versions.yml
index 73e2b3e88..241777d8a 100644
--- a/.mock/definition/prompts/versions.yml
+++ b/.mock/definition/prompts/versions.yml
@@ -202,9 +202,9 @@ service:
project_subset: 1
response:
body:
- prompt_cost_usd: 1.1
- completion_cost_usd: 1.1
- total_cost_usd: 1.1
+ prompt_cost_usd: prompt_cost_usd
+ completion_cost_usd: completion_cost_usd
+ total_cost_usd: total_cost_usd
audiences:
- public
get_refined_prompt:
diff --git a/poetry.lock b/poetry.lock
index ec01a31f7..8a690afc1 100644
--- a/poetry.lock
+++ b/poetry.lock
@@ -79,101 +79,116 @@ files = [
[[package]]
name = "charset-normalizer"
-version = "3.3.2"
+version = "3.4.0"
description = "The Real First Universal Charset Detector. Open, modern and actively maintained alternative to Chardet."
optional = false
python-versions = ">=3.7.0"
files = [
- {file = "charset-normalizer-3.3.2.tar.gz", hash = "sha256:f30c3cb33b24454a82faecaf01b19c18562b1e89558fb6c56de4d9118a032fd5"},
- {file = "charset_normalizer-3.3.2-cp310-cp310-macosx_10_9_universal2.whl", hash = "sha256:25baf083bf6f6b341f4121c2f3c548875ee6f5339300e08be3f2b2ba1721cdd3"},
- {file = "charset_normalizer-3.3.2-cp310-cp310-macosx_10_9_x86_64.whl", hash = "sha256:06435b539f889b1f6f4ac1758871aae42dc3a8c0e24ac9e60c2384973ad73027"},
- {file = "charset_normalizer-3.3.2-cp310-cp310-macosx_11_0_arm64.whl", hash = "sha256:9063e24fdb1e498ab71cb7419e24622516c4a04476b17a2dab57e8baa30d6e03"},
- {file = "charset_normalizer-3.3.2-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:6897af51655e3691ff853668779c7bad41579facacf5fd7253b0133308cf000d"},
- {file = "charset_normalizer-3.3.2-cp310-cp310-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:1d3193f4a680c64b4b6a9115943538edb896edc190f0b222e73761716519268e"},
- {file = "charset_normalizer-3.3.2-cp310-cp310-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:cd70574b12bb8a4d2aaa0094515df2463cb429d8536cfb6c7ce983246983e5a6"},
- {file = "charset_normalizer-3.3.2-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:8465322196c8b4d7ab6d1e049e4c5cb460d0394da4a27d23cc242fbf0034b6b5"},
- {file = "charset_normalizer-3.3.2-cp310-cp310-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:a9a8e9031d613fd2009c182b69c7b2c1ef8239a0efb1df3f7c8da66d5dd3d537"},
- {file = "charset_normalizer-3.3.2-cp310-cp310-musllinux_1_1_aarch64.whl", hash = "sha256:beb58fe5cdb101e3a055192ac291b7a21e3b7ef4f67fa1d74e331a7f2124341c"},
- {file = "charset_normalizer-3.3.2-cp310-cp310-musllinux_1_1_i686.whl", hash = "sha256:e06ed3eb3218bc64786f7db41917d4e686cc4856944f53d5bdf83a6884432e12"},
- {file = "charset_normalizer-3.3.2-cp310-cp310-musllinux_1_1_ppc64le.whl", hash = "sha256:2e81c7b9c8979ce92ed306c249d46894776a909505d8f5a4ba55b14206e3222f"},
- {file = "charset_normalizer-3.3.2-cp310-cp310-musllinux_1_1_s390x.whl", hash = "sha256:572c3763a264ba47b3cf708a44ce965d98555f618ca42c926a9c1616d8f34269"},
- {file = "charset_normalizer-3.3.2-cp310-cp310-musllinux_1_1_x86_64.whl", hash = "sha256:fd1abc0d89e30cc4e02e4064dc67fcc51bd941eb395c502aac3ec19fab46b519"},
- {file = "charset_normalizer-3.3.2-cp310-cp310-win32.whl", hash = "sha256:3d47fa203a7bd9c5b6cee4736ee84ca03b8ef23193c0d1ca99b5089f72645c73"},
- {file = "charset_normalizer-3.3.2-cp310-cp310-win_amd64.whl", hash = "sha256:10955842570876604d404661fbccbc9c7e684caf432c09c715ec38fbae45ae09"},
- {file = "charset_normalizer-3.3.2-cp311-cp311-macosx_10_9_universal2.whl", hash = "sha256:802fe99cca7457642125a8a88a084cef28ff0cf9407060f7b93dca5aa25480db"},
- {file = "charset_normalizer-3.3.2-cp311-cp311-macosx_10_9_x86_64.whl", hash = "sha256:573f6eac48f4769d667c4442081b1794f52919e7edada77495aaed9236d13a96"},
- {file = "charset_normalizer-3.3.2-cp311-cp311-macosx_11_0_arm64.whl", hash = "sha256:549a3a73da901d5bc3ce8d24e0600d1fa85524c10287f6004fbab87672bf3e1e"},
- {file = "charset_normalizer-3.3.2-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:f27273b60488abe721a075bcca6d7f3964f9f6f067c8c4c605743023d7d3944f"},
- {file = "charset_normalizer-3.3.2-cp311-cp311-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:1ceae2f17a9c33cb48e3263960dc5fc8005351ee19db217e9b1bb15d28c02574"},
- {file = "charset_normalizer-3.3.2-cp311-cp311-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:65f6f63034100ead094b8744b3b97965785388f308a64cf8d7c34f2f2e5be0c4"},
- {file = "charset_normalizer-3.3.2-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:753f10e867343b4511128c6ed8c82f7bec3bd026875576dfd88483c5c73b2fd8"},
- {file = "charset_normalizer-3.3.2-cp311-cp311-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:4a78b2b446bd7c934f5dcedc588903fb2f5eec172f3d29e52a9096a43722adfc"},
- {file = "charset_normalizer-3.3.2-cp311-cp311-musllinux_1_1_aarch64.whl", hash = "sha256:e537484df0d8f426ce2afb2d0f8e1c3d0b114b83f8850e5f2fbea0e797bd82ae"},
- {file = "charset_normalizer-3.3.2-cp311-cp311-musllinux_1_1_i686.whl", hash = "sha256:eb6904c354526e758fda7167b33005998fb68c46fbc10e013ca97f21ca5c8887"},
- {file = "charset_normalizer-3.3.2-cp311-cp311-musllinux_1_1_ppc64le.whl", hash = "sha256:deb6be0ac38ece9ba87dea880e438f25ca3eddfac8b002a2ec3d9183a454e8ae"},
- {file = "charset_normalizer-3.3.2-cp311-cp311-musllinux_1_1_s390x.whl", hash = "sha256:4ab2fe47fae9e0f9dee8c04187ce5d09f48eabe611be8259444906793ab7cbce"},
- {file = "charset_normalizer-3.3.2-cp311-cp311-musllinux_1_1_x86_64.whl", hash = "sha256:80402cd6ee291dcb72644d6eac93785fe2c8b9cb30893c1af5b8fdd753b9d40f"},
- {file = "charset_normalizer-3.3.2-cp311-cp311-win32.whl", hash = "sha256:7cd13a2e3ddeed6913a65e66e94b51d80a041145a026c27e6bb76c31a853c6ab"},
- {file = "charset_normalizer-3.3.2-cp311-cp311-win_amd64.whl", hash = "sha256:663946639d296df6a2bb2aa51b60a2454ca1cb29835324c640dafb5ff2131a77"},
- {file = "charset_normalizer-3.3.2-cp312-cp312-macosx_10_9_universal2.whl", hash = "sha256:0b2b64d2bb6d3fb9112bafa732def486049e63de9618b5843bcdd081d8144cd8"},
- {file = "charset_normalizer-3.3.2-cp312-cp312-macosx_10_9_x86_64.whl", hash = "sha256:ddbb2551d7e0102e7252db79ba445cdab71b26640817ab1e3e3648dad515003b"},
- {file = "charset_normalizer-3.3.2-cp312-cp312-macosx_11_0_arm64.whl", hash = "sha256:55086ee1064215781fff39a1af09518bc9255b50d6333f2e4c74ca09fac6a8f6"},
- {file = "charset_normalizer-3.3.2-cp312-cp312-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:8f4a014bc36d3c57402e2977dada34f9c12300af536839dc38c0beab8878f38a"},
- {file = "charset_normalizer-3.3.2-cp312-cp312-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:a10af20b82360ab00827f916a6058451b723b4e65030c5a18577c8b2de5b3389"},
- {file = "charset_normalizer-3.3.2-cp312-cp312-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:8d756e44e94489e49571086ef83b2bb8ce311e730092d2c34ca8f7d925cb20aa"},
- {file = "charset_normalizer-3.3.2-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:90d558489962fd4918143277a773316e56c72da56ec7aa3dc3dbbe20fdfed15b"},
- {file = "charset_normalizer-3.3.2-cp312-cp312-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:6ac7ffc7ad6d040517be39eb591cac5ff87416c2537df6ba3cba3bae290c0fed"},
- {file = "charset_normalizer-3.3.2-cp312-cp312-musllinux_1_1_aarch64.whl", hash = "sha256:7ed9e526742851e8d5cc9e6cf41427dfc6068d4f5a3bb03659444b4cabf6bc26"},
- {file = "charset_normalizer-3.3.2-cp312-cp312-musllinux_1_1_i686.whl", hash = "sha256:8bdb58ff7ba23002a4c5808d608e4e6c687175724f54a5dade5fa8c67b604e4d"},
- {file = "charset_normalizer-3.3.2-cp312-cp312-musllinux_1_1_ppc64le.whl", hash = "sha256:6b3251890fff30ee142c44144871185dbe13b11bab478a88887a639655be1068"},
- {file = "charset_normalizer-3.3.2-cp312-cp312-musllinux_1_1_s390x.whl", hash = "sha256:b4a23f61ce87adf89be746c8a8974fe1c823c891d8f86eb218bb957c924bb143"},
- {file = "charset_normalizer-3.3.2-cp312-cp312-musllinux_1_1_x86_64.whl", hash = "sha256:efcb3f6676480691518c177e3b465bcddf57cea040302f9f4e6e191af91174d4"},
- {file = "charset_normalizer-3.3.2-cp312-cp312-win32.whl", hash = "sha256:d965bba47ddeec8cd560687584e88cf699fd28f192ceb452d1d7ee807c5597b7"},
- {file = "charset_normalizer-3.3.2-cp312-cp312-win_amd64.whl", hash = "sha256:96b02a3dc4381e5494fad39be677abcb5e6634bf7b4fa83a6dd3112607547001"},
- {file = "charset_normalizer-3.3.2-cp37-cp37m-macosx_10_9_x86_64.whl", hash = "sha256:95f2a5796329323b8f0512e09dbb7a1860c46a39da62ecb2324f116fa8fdc85c"},
- {file = "charset_normalizer-3.3.2-cp37-cp37m-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:c002b4ffc0be611f0d9da932eb0f704fe2602a9a949d1f738e4c34c75b0863d5"},
- {file = "charset_normalizer-3.3.2-cp37-cp37m-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:a981a536974bbc7a512cf44ed14938cf01030a99e9b3a06dd59578882f06f985"},
- {file = "charset_normalizer-3.3.2-cp37-cp37m-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:3287761bc4ee9e33561a7e058c72ac0938c4f57fe49a09eae428fd88aafe7bb6"},
- {file = "charset_normalizer-3.3.2-cp37-cp37m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:42cb296636fcc8b0644486d15c12376cb9fa75443e00fb25de0b8602e64c1714"},
- {file = "charset_normalizer-3.3.2-cp37-cp37m-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:0a55554a2fa0d408816b3b5cedf0045f4b8e1a6065aec45849de2d6f3f8e9786"},
- {file = "charset_normalizer-3.3.2-cp37-cp37m-musllinux_1_1_aarch64.whl", hash = "sha256:c083af607d2515612056a31f0a8d9e0fcb5876b7bfc0abad3ecd275bc4ebc2d5"},
- {file = "charset_normalizer-3.3.2-cp37-cp37m-musllinux_1_1_i686.whl", hash = "sha256:87d1351268731db79e0f8e745d92493ee2841c974128ef629dc518b937d9194c"},
- {file = "charset_normalizer-3.3.2-cp37-cp37m-musllinux_1_1_ppc64le.whl", hash = "sha256:bd8f7df7d12c2db9fab40bdd87a7c09b1530128315d047a086fa3ae3435cb3a8"},
- {file = "charset_normalizer-3.3.2-cp37-cp37m-musllinux_1_1_s390x.whl", hash = "sha256:c180f51afb394e165eafe4ac2936a14bee3eb10debc9d9e4db8958fe36afe711"},
- {file = "charset_normalizer-3.3.2-cp37-cp37m-musllinux_1_1_x86_64.whl", hash = "sha256:8c622a5fe39a48f78944a87d4fb8a53ee07344641b0562c540d840748571b811"},
- {file = "charset_normalizer-3.3.2-cp37-cp37m-win32.whl", hash = "sha256:db364eca23f876da6f9e16c9da0df51aa4f104a972735574842618b8c6d999d4"},
- {file = "charset_normalizer-3.3.2-cp37-cp37m-win_amd64.whl", hash = "sha256:86216b5cee4b06df986d214f664305142d9c76df9b6512be2738aa72a2048f99"},
- {file = "charset_normalizer-3.3.2-cp38-cp38-macosx_10_9_universal2.whl", hash = "sha256:6463effa3186ea09411d50efc7d85360b38d5f09b870c48e4600f63af490e56a"},
- {file = "charset_normalizer-3.3.2-cp38-cp38-macosx_10_9_x86_64.whl", hash = "sha256:6c4caeef8fa63d06bd437cd4bdcf3ffefe6738fb1b25951440d80dc7df8c03ac"},
- {file = "charset_normalizer-3.3.2-cp38-cp38-macosx_11_0_arm64.whl", hash = "sha256:37e55c8e51c236f95b033f6fb391d7d7970ba5fe7ff453dad675e88cf303377a"},
- {file = "charset_normalizer-3.3.2-cp38-cp38-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:fb69256e180cb6c8a894fee62b3afebae785babc1ee98b81cdf68bbca1987f33"},
- {file = "charset_normalizer-3.3.2-cp38-cp38-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:ae5f4161f18c61806f411a13b0310bea87f987c7d2ecdbdaad0e94eb2e404238"},
- {file = "charset_normalizer-3.3.2-cp38-cp38-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:b2b0a0c0517616b6869869f8c581d4eb2dd83a4d79e0ebcb7d373ef9956aeb0a"},
- {file = "charset_normalizer-3.3.2-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:45485e01ff4d3630ec0d9617310448a8702f70e9c01906b0d0118bdf9d124cf2"},
- {file = "charset_normalizer-3.3.2-cp38-cp38-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:eb00ed941194665c332bf8e078baf037d6c35d7c4f3102ea2d4f16ca94a26dc8"},
- {file = "charset_normalizer-3.3.2-cp38-cp38-musllinux_1_1_aarch64.whl", hash = "sha256:2127566c664442652f024c837091890cb1942c30937add288223dc895793f898"},
- {file = "charset_normalizer-3.3.2-cp38-cp38-musllinux_1_1_i686.whl", hash = "sha256:a50aebfa173e157099939b17f18600f72f84eed3049e743b68ad15bd69b6bf99"},
- {file = "charset_normalizer-3.3.2-cp38-cp38-musllinux_1_1_ppc64le.whl", hash = "sha256:4d0d1650369165a14e14e1e47b372cfcb31d6ab44e6e33cb2d4e57265290044d"},
- {file = "charset_normalizer-3.3.2-cp38-cp38-musllinux_1_1_s390x.whl", hash = "sha256:923c0c831b7cfcb071580d3f46c4baf50f174be571576556269530f4bbd79d04"},
- {file = "charset_normalizer-3.3.2-cp38-cp38-musllinux_1_1_x86_64.whl", hash = "sha256:06a81e93cd441c56a9b65d8e1d043daeb97a3d0856d177d5c90ba85acb3db087"},
- {file = "charset_normalizer-3.3.2-cp38-cp38-win32.whl", hash = "sha256:6ef1d82a3af9d3eecdba2321dc1b3c238245d890843e040e41e470ffa64c3e25"},
- {file = "charset_normalizer-3.3.2-cp38-cp38-win_amd64.whl", hash = "sha256:eb8821e09e916165e160797a6c17edda0679379a4be5c716c260e836e122f54b"},
- {file = "charset_normalizer-3.3.2-cp39-cp39-macosx_10_9_universal2.whl", hash = "sha256:c235ebd9baae02f1b77bcea61bce332cb4331dc3617d254df3323aa01ab47bd4"},
- {file = "charset_normalizer-3.3.2-cp39-cp39-macosx_10_9_x86_64.whl", hash = "sha256:5b4c145409bef602a690e7cfad0a15a55c13320ff7a3ad7ca59c13bb8ba4d45d"},
- {file = "charset_normalizer-3.3.2-cp39-cp39-macosx_11_0_arm64.whl", hash = "sha256:68d1f8a9e9e37c1223b656399be5d6b448dea850bed7d0f87a8311f1ff3dabb0"},
- {file = "charset_normalizer-3.3.2-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:22afcb9f253dac0696b5a4be4a1c0f8762f8239e21b99680099abd9b2b1b2269"},
- {file = "charset_normalizer-3.3.2-cp39-cp39-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:e27ad930a842b4c5eb8ac0016b0a54f5aebbe679340c26101df33424142c143c"},
- {file = "charset_normalizer-3.3.2-cp39-cp39-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:1f79682fbe303db92bc2b1136016a38a42e835d932bab5b3b1bfcfbf0640e519"},
- {file = "charset_normalizer-3.3.2-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:b261ccdec7821281dade748d088bb6e9b69e6d15b30652b74cbbac25e280b796"},
- {file = "charset_normalizer-3.3.2-cp39-cp39-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:122c7fa62b130ed55f8f285bfd56d5f4b4a5b503609d181f9ad85e55c89f4185"},
- {file = "charset_normalizer-3.3.2-cp39-cp39-musllinux_1_1_aarch64.whl", hash = "sha256:d0eccceffcb53201b5bfebb52600a5fb483a20b61da9dbc885f8b103cbe7598c"},
- {file = "charset_normalizer-3.3.2-cp39-cp39-musllinux_1_1_i686.whl", hash = "sha256:9f96df6923e21816da7e0ad3fd47dd8f94b2a5ce594e00677c0013018b813458"},
- {file = "charset_normalizer-3.3.2-cp39-cp39-musllinux_1_1_ppc64le.whl", hash = "sha256:7f04c839ed0b6b98b1a7501a002144b76c18fb1c1850c8b98d458ac269e26ed2"},
- {file = "charset_normalizer-3.3.2-cp39-cp39-musllinux_1_1_s390x.whl", hash = "sha256:34d1c8da1e78d2e001f363791c98a272bb734000fcef47a491c1e3b0505657a8"},
- {file = "charset_normalizer-3.3.2-cp39-cp39-musllinux_1_1_x86_64.whl", hash = "sha256:ff8fa367d09b717b2a17a052544193ad76cd49979c805768879cb63d9ca50561"},
- {file = "charset_normalizer-3.3.2-cp39-cp39-win32.whl", hash = "sha256:aed38f6e4fb3f5d6bf81bfa990a07806be9d83cf7bacef998ab1a9bd660a581f"},
- {file = "charset_normalizer-3.3.2-cp39-cp39-win_amd64.whl", hash = "sha256:b01b88d45a6fcb69667cd6d2f7a9aeb4bf53760d7fc536bf679ec94fe9f3ff3d"},
- {file = "charset_normalizer-3.3.2-py3-none-any.whl", hash = "sha256:3e4d1f6587322d2788836a99c69062fbb091331ec940e02d12d179c1d53e25fc"},
+ {file = "charset_normalizer-3.4.0-cp310-cp310-macosx_10_9_universal2.whl", hash = "sha256:4f9fc98dad6c2eaa32fc3af1417d95b5e3d08aff968df0cd320066def971f9a6"},
+ {file = "charset_normalizer-3.4.0-cp310-cp310-macosx_10_9_x86_64.whl", hash = "sha256:0de7b687289d3c1b3e8660d0741874abe7888100efe14bd0f9fd7141bcbda92b"},
+ {file = "charset_normalizer-3.4.0-cp310-cp310-macosx_11_0_arm64.whl", hash = "sha256:5ed2e36c3e9b4f21dd9422f6893dec0abf2cca553af509b10cd630f878d3eb99"},
+ {file = "charset_normalizer-3.4.0-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:40d3ff7fc90b98c637bda91c89d51264a3dcf210cade3a2c6f838c7268d7a4ca"},
+ {file = "charset_normalizer-3.4.0-cp310-cp310-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:1110e22af8ca26b90bd6364fe4c763329b0ebf1ee213ba32b68c73de5752323d"},
+ {file = "charset_normalizer-3.4.0-cp310-cp310-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:86f4e8cca779080f66ff4f191a685ced73d2f72d50216f7112185dc02b90b9b7"},
+ {file = "charset_normalizer-3.4.0-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:7f683ddc7eedd742e2889d2bfb96d69573fde1d92fcb811979cdb7165bb9c7d3"},
+ {file = "charset_normalizer-3.4.0-cp310-cp310-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:27623ba66c183eca01bf9ff833875b459cad267aeeb044477fedac35e19ba907"},
+ {file = "charset_normalizer-3.4.0-cp310-cp310-musllinux_1_2_aarch64.whl", hash = "sha256:f606a1881d2663630ea5b8ce2efe2111740df4b687bd78b34a8131baa007f79b"},
+ {file = "charset_normalizer-3.4.0-cp310-cp310-musllinux_1_2_i686.whl", hash = "sha256:0b309d1747110feb25d7ed6b01afdec269c647d382c857ef4663bbe6ad95a912"},
+ {file = "charset_normalizer-3.4.0-cp310-cp310-musllinux_1_2_ppc64le.whl", hash = "sha256:136815f06a3ae311fae551c3df1f998a1ebd01ddd424aa5603a4336997629e95"},
+ {file = "charset_normalizer-3.4.0-cp310-cp310-musllinux_1_2_s390x.whl", hash = "sha256:14215b71a762336254351b00ec720a8e85cada43b987da5a042e4ce3e82bd68e"},
+ {file = "charset_normalizer-3.4.0-cp310-cp310-musllinux_1_2_x86_64.whl", hash = "sha256:79983512b108e4a164b9c8d34de3992f76d48cadc9554c9e60b43f308988aabe"},
+ {file = "charset_normalizer-3.4.0-cp310-cp310-win32.whl", hash = "sha256:c94057af19bc953643a33581844649a7fdab902624d2eb739738a30e2b3e60fc"},
+ {file = "charset_normalizer-3.4.0-cp310-cp310-win_amd64.whl", hash = "sha256:55f56e2ebd4e3bc50442fbc0888c9d8c94e4e06a933804e2af3e89e2f9c1c749"},
+ {file = "charset_normalizer-3.4.0-cp311-cp311-macosx_10_9_universal2.whl", hash = "sha256:0d99dd8ff461990f12d6e42c7347fd9ab2532fb70e9621ba520f9e8637161d7c"},
+ {file = "charset_normalizer-3.4.0-cp311-cp311-macosx_10_9_x86_64.whl", hash = "sha256:c57516e58fd17d03ebe67e181a4e4e2ccab1168f8c2976c6a334d4f819fe5944"},
+ {file = "charset_normalizer-3.4.0-cp311-cp311-macosx_11_0_arm64.whl", hash = "sha256:6dba5d19c4dfab08e58d5b36304b3f92f3bd5d42c1a3fa37b5ba5cdf6dfcbcee"},
+ {file = "charset_normalizer-3.4.0-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:bf4475b82be41b07cc5e5ff94810e6a01f276e37c2d55571e3fe175e467a1a1c"},
+ {file = "charset_normalizer-3.4.0-cp311-cp311-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:ce031db0408e487fd2775d745ce30a7cd2923667cf3b69d48d219f1d8f5ddeb6"},
+ {file = "charset_normalizer-3.4.0-cp311-cp311-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:8ff4e7cdfdb1ab5698e675ca622e72d58a6fa2a8aa58195de0c0061288e6e3ea"},
+ {file = "charset_normalizer-3.4.0-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:3710a9751938947e6327ea9f3ea6332a09bf0ba0c09cae9cb1f250bd1f1549bc"},
+ {file = "charset_normalizer-3.4.0-cp311-cp311-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:82357d85de703176b5587dbe6ade8ff67f9f69a41c0733cf2425378b49954de5"},
+ {file = "charset_normalizer-3.4.0-cp311-cp311-musllinux_1_2_aarch64.whl", hash = "sha256:47334db71978b23ebcf3c0f9f5ee98b8d65992b65c9c4f2d34c2eaf5bcaf0594"},
+ {file = "charset_normalizer-3.4.0-cp311-cp311-musllinux_1_2_i686.whl", hash = "sha256:8ce7fd6767a1cc5a92a639b391891bf1c268b03ec7e021c7d6d902285259685c"},
+ {file = "charset_normalizer-3.4.0-cp311-cp311-musllinux_1_2_ppc64le.whl", hash = "sha256:f1a2f519ae173b5b6a2c9d5fa3116ce16e48b3462c8b96dfdded11055e3d6365"},
+ {file = "charset_normalizer-3.4.0-cp311-cp311-musllinux_1_2_s390x.whl", hash = "sha256:63bc5c4ae26e4bc6be6469943b8253c0fd4e4186c43ad46e713ea61a0ba49129"},
+ {file = "charset_normalizer-3.4.0-cp311-cp311-musllinux_1_2_x86_64.whl", hash = "sha256:bcb4f8ea87d03bc51ad04add8ceaf9b0f085ac045ab4d74e73bbc2dc033f0236"},
+ {file = "charset_normalizer-3.4.0-cp311-cp311-win32.whl", hash = "sha256:9ae4ef0b3f6b41bad6366fb0ea4fc1d7ed051528e113a60fa2a65a9abb5b1d99"},
+ {file = "charset_normalizer-3.4.0-cp311-cp311-win_amd64.whl", hash = "sha256:cee4373f4d3ad28f1ab6290684d8e2ebdb9e7a1b74fdc39e4c211995f77bec27"},
+ {file = "charset_normalizer-3.4.0-cp312-cp312-macosx_10_13_universal2.whl", hash = "sha256:0713f3adb9d03d49d365b70b84775d0a0d18e4ab08d12bc46baa6132ba78aaf6"},
+ {file = "charset_normalizer-3.4.0-cp312-cp312-macosx_10_13_x86_64.whl", hash = "sha256:de7376c29d95d6719048c194a9cf1a1b0393fbe8488a22008610b0361d834ecf"},
+ {file = "charset_normalizer-3.4.0-cp312-cp312-macosx_11_0_arm64.whl", hash = "sha256:4a51b48f42d9358460b78725283f04bddaf44a9358197b889657deba38f329db"},
+ {file = "charset_normalizer-3.4.0-cp312-cp312-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:b295729485b06c1a0683af02a9e42d2caa9db04a373dc38a6a58cdd1e8abddf1"},
+ {file = "charset_normalizer-3.4.0-cp312-cp312-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:ee803480535c44e7f5ad00788526da7d85525cfefaf8acf8ab9a310000be4b03"},
+ {file = "charset_normalizer-3.4.0-cp312-cp312-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:3d59d125ffbd6d552765510e3f31ed75ebac2c7470c7274195b9161a32350284"},
+ {file = "charset_normalizer-3.4.0-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:8cda06946eac330cbe6598f77bb54e690b4ca93f593dee1568ad22b04f347c15"},
+ {file = "charset_normalizer-3.4.0-cp312-cp312-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:07afec21bbbbf8a5cc3651aa96b980afe2526e7f048fdfb7f1014d84acc8b6d8"},
+ {file = "charset_normalizer-3.4.0-cp312-cp312-musllinux_1_2_aarch64.whl", hash = "sha256:6b40e8d38afe634559e398cc32b1472f376a4099c75fe6299ae607e404c033b2"},
+ {file = "charset_normalizer-3.4.0-cp312-cp312-musllinux_1_2_i686.whl", hash = "sha256:b8dcd239c743aa2f9c22ce674a145e0a25cb1566c495928440a181ca1ccf6719"},
+ {file = "charset_normalizer-3.4.0-cp312-cp312-musllinux_1_2_ppc64le.whl", hash = "sha256:84450ba661fb96e9fd67629b93d2941c871ca86fc38d835d19d4225ff946a631"},
+ {file = "charset_normalizer-3.4.0-cp312-cp312-musllinux_1_2_s390x.whl", hash = "sha256:44aeb140295a2f0659e113b31cfe92c9061622cadbc9e2a2f7b8ef6b1e29ef4b"},
+ {file = "charset_normalizer-3.4.0-cp312-cp312-musllinux_1_2_x86_64.whl", hash = "sha256:1db4e7fefefd0f548d73e2e2e041f9df5c59e178b4c72fbac4cc6f535cfb1565"},
+ {file = "charset_normalizer-3.4.0-cp312-cp312-win32.whl", hash = "sha256:5726cf76c982532c1863fb64d8c6dd0e4c90b6ece9feb06c9f202417a31f7dd7"},
+ {file = "charset_normalizer-3.4.0-cp312-cp312-win_amd64.whl", hash = "sha256:b197e7094f232959f8f20541ead1d9862ac5ebea1d58e9849c1bf979255dfac9"},
+ {file = "charset_normalizer-3.4.0-cp313-cp313-macosx_10_13_universal2.whl", hash = "sha256:dd4eda173a9fcccb5f2e2bd2a9f423d180194b1bf17cf59e3269899235b2a114"},
+ {file = "charset_normalizer-3.4.0-cp313-cp313-macosx_10_13_x86_64.whl", hash = "sha256:e9e3c4c9e1ed40ea53acf11e2a386383c3304212c965773704e4603d589343ed"},
+ {file = "charset_normalizer-3.4.0-cp313-cp313-macosx_11_0_arm64.whl", hash = "sha256:92a7e36b000bf022ef3dbb9c46bfe2d52c047d5e3f3343f43204263c5addc250"},
+ {file = "charset_normalizer-3.4.0-cp313-cp313-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:54b6a92d009cbe2fb11054ba694bc9e284dad30a26757b1e372a1fdddaf21920"},
+ {file = "charset_normalizer-3.4.0-cp313-cp313-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:1ffd9493de4c922f2a38c2bf62b831dcec90ac673ed1ca182fe11b4d8e9f2a64"},
+ {file = "charset_normalizer-3.4.0-cp313-cp313-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:35c404d74c2926d0287fbd63ed5d27eb911eb9e4a3bb2c6d294f3cfd4a9e0c23"},
+ {file = "charset_normalizer-3.4.0-cp313-cp313-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:4796efc4faf6b53a18e3d46343535caed491776a22af773f366534056c4e1fbc"},
+ {file = "charset_normalizer-3.4.0-cp313-cp313-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:e7fdd52961feb4c96507aa649550ec2a0d527c086d284749b2f582f2d40a2e0d"},
+ {file = "charset_normalizer-3.4.0-cp313-cp313-musllinux_1_2_aarch64.whl", hash = "sha256:92db3c28b5b2a273346bebb24857fda45601aef6ae1c011c0a997106581e8a88"},
+ {file = "charset_normalizer-3.4.0-cp313-cp313-musllinux_1_2_i686.whl", hash = "sha256:ab973df98fc99ab39080bfb0eb3a925181454d7c3ac8a1e695fddfae696d9e90"},
+ {file = "charset_normalizer-3.4.0-cp313-cp313-musllinux_1_2_ppc64le.whl", hash = "sha256:4b67fdab07fdd3c10bb21edab3cbfe8cf5696f453afce75d815d9d7223fbe88b"},
+ {file = "charset_normalizer-3.4.0-cp313-cp313-musllinux_1_2_s390x.whl", hash = "sha256:aa41e526a5d4a9dfcfbab0716c7e8a1b215abd3f3df5a45cf18a12721d31cb5d"},
+ {file = "charset_normalizer-3.4.0-cp313-cp313-musllinux_1_2_x86_64.whl", hash = "sha256:ffc519621dce0c767e96b9c53f09c5d215578e10b02c285809f76509a3931482"},
+ {file = "charset_normalizer-3.4.0-cp313-cp313-win32.whl", hash = "sha256:f19c1585933c82098c2a520f8ec1227f20e339e33aca8fa6f956f6691b784e67"},
+ {file = "charset_normalizer-3.4.0-cp313-cp313-win_amd64.whl", hash = "sha256:707b82d19e65c9bd28b81dde95249b07bf9f5b90ebe1ef17d9b57473f8a64b7b"},
+ {file = "charset_normalizer-3.4.0-cp37-cp37m-macosx_10_9_x86_64.whl", hash = "sha256:dbe03226baf438ac4fda9e2d0715022fd579cb641c4cf639fa40d53b2fe6f3e2"},
+ {file = "charset_normalizer-3.4.0-cp37-cp37m-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:dd9a8bd8900e65504a305bf8ae6fa9fbc66de94178c420791d0293702fce2df7"},
+ {file = "charset_normalizer-3.4.0-cp37-cp37m-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:b8831399554b92b72af5932cdbbd4ddc55c55f631bb13ff8fe4e6536a06c5c51"},
+ {file = "charset_normalizer-3.4.0-cp37-cp37m-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:a14969b8691f7998e74663b77b4c36c0337cb1df552da83d5c9004a93afdb574"},
+ {file = "charset_normalizer-3.4.0-cp37-cp37m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:dcaf7c1524c0542ee2fc82cc8ec337f7a9f7edee2532421ab200d2b920fc97cf"},
+ {file = "charset_normalizer-3.4.0-cp37-cp37m-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:425c5f215d0eecee9a56cdb703203dda90423247421bf0d67125add85d0c4455"},
+ {file = "charset_normalizer-3.4.0-cp37-cp37m-musllinux_1_2_aarch64.whl", hash = "sha256:d5b054862739d276e09928de37c79ddeec42a6e1bfc55863be96a36ba22926f6"},
+ {file = "charset_normalizer-3.4.0-cp37-cp37m-musllinux_1_2_i686.whl", hash = "sha256:f3e73a4255342d4eb26ef6df01e3962e73aa29baa3124a8e824c5d3364a65748"},
+ {file = "charset_normalizer-3.4.0-cp37-cp37m-musllinux_1_2_ppc64le.whl", hash = "sha256:2f6c34da58ea9c1a9515621f4d9ac379871a8f21168ba1b5e09d74250de5ad62"},
+ {file = "charset_normalizer-3.4.0-cp37-cp37m-musllinux_1_2_s390x.whl", hash = "sha256:f09cb5a7bbe1ecae6e87901a2eb23e0256bb524a79ccc53eb0b7629fbe7677c4"},
+ {file = "charset_normalizer-3.4.0-cp37-cp37m-musllinux_1_2_x86_64.whl", hash = "sha256:0099d79bdfcf5c1f0c2c72f91516702ebf8b0b8ddd8905f97a8aecf49712c621"},
+ {file = "charset_normalizer-3.4.0-cp37-cp37m-win32.whl", hash = "sha256:9c98230f5042f4945f957d006edccc2af1e03ed5e37ce7c373f00a5a4daa6149"},
+ {file = "charset_normalizer-3.4.0-cp37-cp37m-win_amd64.whl", hash = "sha256:62f60aebecfc7f4b82e3f639a7d1433a20ec32824db2199a11ad4f5e146ef5ee"},
+ {file = "charset_normalizer-3.4.0-cp38-cp38-macosx_10_9_universal2.whl", hash = "sha256:af73657b7a68211996527dbfeffbb0864e043d270580c5aef06dc4b659a4b578"},
+ {file = "charset_normalizer-3.4.0-cp38-cp38-macosx_10_9_x86_64.whl", hash = "sha256:cab5d0b79d987c67f3b9e9c53f54a61360422a5a0bc075f43cab5621d530c3b6"},
+ {file = "charset_normalizer-3.4.0-cp38-cp38-macosx_11_0_arm64.whl", hash = "sha256:9289fd5dddcf57bab41d044f1756550f9e7cf0c8e373b8cdf0ce8773dc4bd417"},
+ {file = "charset_normalizer-3.4.0-cp38-cp38-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:6b493a043635eb376e50eedf7818f2f322eabbaa974e948bd8bdd29eb7ef2a51"},
+ {file = "charset_normalizer-3.4.0-cp38-cp38-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:9fa2566ca27d67c86569e8c85297aaf413ffab85a8960500f12ea34ff98e4c41"},
+ {file = "charset_normalizer-3.4.0-cp38-cp38-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:a8e538f46104c815be19c975572d74afb53f29650ea2025bbfaef359d2de2f7f"},
+ {file = "charset_normalizer-3.4.0-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:6fd30dc99682dc2c603c2b315bded2799019cea829f8bf57dc6b61efde6611c8"},
+ {file = "charset_normalizer-3.4.0-cp38-cp38-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:2006769bd1640bdf4d5641c69a3d63b71b81445473cac5ded39740a226fa88ab"},
+ {file = "charset_normalizer-3.4.0-cp38-cp38-musllinux_1_2_aarch64.whl", hash = "sha256:dc15e99b2d8a656f8e666854404f1ba54765871104e50c8e9813af8a7db07f12"},
+ {file = "charset_normalizer-3.4.0-cp38-cp38-musllinux_1_2_i686.whl", hash = "sha256:ab2e5bef076f5a235c3774b4f4028a680432cded7cad37bba0fd90d64b187d19"},
+ {file = "charset_normalizer-3.4.0-cp38-cp38-musllinux_1_2_ppc64le.whl", hash = "sha256:4ec9dd88a5b71abfc74e9df5ebe7921c35cbb3b641181a531ca65cdb5e8e4dea"},
+ {file = "charset_normalizer-3.4.0-cp38-cp38-musllinux_1_2_s390x.whl", hash = "sha256:43193c5cda5d612f247172016c4bb71251c784d7a4d9314677186a838ad34858"},
+ {file = "charset_normalizer-3.4.0-cp38-cp38-musllinux_1_2_x86_64.whl", hash = "sha256:aa693779a8b50cd97570e5a0f343538a8dbd3e496fa5dcb87e29406ad0299654"},
+ {file = "charset_normalizer-3.4.0-cp38-cp38-win32.whl", hash = "sha256:7706f5850360ac01d80c89bcef1640683cc12ed87f42579dab6c5d3ed6888613"},
+ {file = "charset_normalizer-3.4.0-cp38-cp38-win_amd64.whl", hash = "sha256:c3e446d253bd88f6377260d07c895816ebf33ffffd56c1c792b13bff9c3e1ade"},
+ {file = "charset_normalizer-3.4.0-cp39-cp39-macosx_10_9_universal2.whl", hash = "sha256:980b4f289d1d90ca5efcf07958d3eb38ed9c0b7676bf2831a54d4f66f9c27dfa"},
+ {file = "charset_normalizer-3.4.0-cp39-cp39-macosx_10_9_x86_64.whl", hash = "sha256:f28f891ccd15c514a0981f3b9db9aa23d62fe1a99997512b0491d2ed323d229a"},
+ {file = "charset_normalizer-3.4.0-cp39-cp39-macosx_11_0_arm64.whl", hash = "sha256:a8aacce6e2e1edcb6ac625fb0f8c3a9570ccc7bfba1f63419b3769ccf6a00ed0"},
+ {file = "charset_normalizer-3.4.0-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:bd7af3717683bea4c87acd8c0d3d5b44d56120b26fd3f8a692bdd2d5260c620a"},
+ {file = "charset_normalizer-3.4.0-cp39-cp39-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:5ff2ed8194587faf56555927b3aa10e6fb69d931e33953943bc4f837dfee2242"},
+ {file = "charset_normalizer-3.4.0-cp39-cp39-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:e91f541a85298cf35433bf66f3fab2a4a2cff05c127eeca4af174f6d497f0d4b"},
+ {file = "charset_normalizer-3.4.0-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:309a7de0a0ff3040acaebb35ec45d18db4b28232f21998851cfa709eeff49d62"},
+ {file = "charset_normalizer-3.4.0-cp39-cp39-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:285e96d9d53422efc0d7a17c60e59f37fbf3dfa942073f666db4ac71e8d726d0"},
+ {file = "charset_normalizer-3.4.0-cp39-cp39-musllinux_1_2_aarch64.whl", hash = "sha256:5d447056e2ca60382d460a604b6302d8db69476fd2015c81e7c35417cfabe4cd"},
+ {file = "charset_normalizer-3.4.0-cp39-cp39-musllinux_1_2_i686.whl", hash = "sha256:20587d20f557fe189b7947d8e7ec5afa110ccf72a3128d61a2a387c3313f46be"},
+ {file = "charset_normalizer-3.4.0-cp39-cp39-musllinux_1_2_ppc64le.whl", hash = "sha256:130272c698667a982a5d0e626851ceff662565379baf0ff2cc58067b81d4f11d"},
+ {file = "charset_normalizer-3.4.0-cp39-cp39-musllinux_1_2_s390x.whl", hash = "sha256:ab22fbd9765e6954bc0bcff24c25ff71dcbfdb185fcdaca49e81bac68fe724d3"},
+ {file = "charset_normalizer-3.4.0-cp39-cp39-musllinux_1_2_x86_64.whl", hash = "sha256:7782afc9b6b42200f7362858f9e73b1f8316afb276d316336c0ec3bd73312742"},
+ {file = "charset_normalizer-3.4.0-cp39-cp39-win32.whl", hash = "sha256:2de62e8801ddfff069cd5c504ce3bc9672b23266597d4e4f50eda28846c322f2"},
+ {file = "charset_normalizer-3.4.0-cp39-cp39-win_amd64.whl", hash = "sha256:95c3c157765b031331dd4db3c775e58deaee050a3042fcad72cbc4189d7c8dca"},
+ {file = "charset_normalizer-3.4.0-py3-none-any.whl", hash = "sha256:fe9f97feb71aa9896b81973a7bbada8c49501dc73e58a10fcef6663af95e5079"},
+ {file = "charset_normalizer-3.4.0.tar.gz", hash = "sha256:223217c3d4f82c3ac5e29032b3f1c2eb0fb591b72161f86d93f5719079dae93e"},
]
[[package]]
diff --git a/src/label_studio_sdk/types/inference_run_cost_estimate.py b/src/label_studio_sdk/types/inference_run_cost_estimate.py
index 30920a15f..550ccc8a7 100644
--- a/src/label_studio_sdk/types/inference_run_cost_estimate.py
+++ b/src/label_studio_sdk/types/inference_run_cost_estimate.py
@@ -8,17 +8,17 @@
class InferenceRunCostEstimate(pydantic_v1.BaseModel):
- prompt_cost_usd: typing.Optional[float] = pydantic_v1.Field(default=None)
+ prompt_cost_usd: typing.Optional[str] = pydantic_v1.Field(default=None)
"""
Cost of the prompt (in USD)
"""
- completion_cost_usd: typing.Optional[float] = pydantic_v1.Field(default=None)
+ completion_cost_usd: typing.Optional[str] = pydantic_v1.Field(default=None)
"""
Cost of the completion (in USD)
"""
- total_cost_usd: typing.Optional[float] = pydantic_v1.Field(default=None)
+ total_cost_usd: typing.Optional[str] = pydantic_v1.Field(default=None)
"""
Total cost of the inference (in USD)
"""
diff --git a/tests/prompts/test_versions.py b/tests/prompts/test_versions.py
index f611fead8..d150204d2 100644
--- a/tests/prompts/test_versions.py
+++ b/tests/prompts/test_versions.py
@@ -150,7 +150,11 @@ async def test_update(client: LabelStudio, async_client: AsyncLabelStudio) -> No
async def test_cost_estimate(client: LabelStudio, async_client: AsyncLabelStudio) -> None:
- expected_response: typing.Any = {"prompt_cost_usd": 1.1, "completion_cost_usd": 1.1, "total_cost_usd": 1.1}
+ expected_response: typing.Any = {
+ "prompt_cost_usd": "prompt_cost_usd",
+ "completion_cost_usd": "completion_cost_usd",
+ "total_cost_usd": "total_cost_usd",
+ }
expected_types: typing.Any = {"prompt_cost_usd": None, "completion_cost_usd": None, "total_cost_usd": None}
response = client.prompts.versions.cost_estimate(prompt_id=1, version_id=1, project_id=1, project_subset=1)
validate_response(response, expected_response, expected_types)
From 6754a15077b74a61c3e2cd32285a9cdf93c301ea Mon Sep 17 00:00:00 2001
From: fern-api <115122769+fern-api[bot]@users.noreply.github.com>
Date: Thu, 17 Oct 2024 07:15:59 +0000
Subject: [PATCH 5/6] SDK regeneration
---
.mock/definition/__package__.yml | 9 +++++++++
.mock/definition/prompts/versions.yml | 3 +++
poetry.lock | 8 ++++----
.../types/inference_run_cost_estimate.py | 15 +++++++++++++++
tests/prompts/test_versions.py | 12 +++++++++++-
5 files changed, 42 insertions(+), 5 deletions(-)
diff --git a/.mock/definition/__package__.yml b/.mock/definition/__package__.yml
index ecdaa9a60..05f08477c 100644
--- a/.mock/definition/__package__.yml
+++ b/.mock/definition/__package__.yml
@@ -2358,6 +2358,15 @@ types:
total_cost_usd:
type: optional
docs: Total cost of the inference (in USD)
+ error:
+ type: optional
+ docs: Whether an error occurred or not
+ error_type:
+ type: optional
+ docs: Type of error (e.g. "Timeout", "Rate Limit", etc)
+ error_message:
+ type: optional
+ docs: Error message details
source:
openapi: openapi/openapi.yaml
RefinedPromptResponseRefinementStatus:
diff --git a/.mock/definition/prompts/versions.yml b/.mock/definition/prompts/versions.yml
index 241777d8a..ccf3f6eab 100644
--- a/.mock/definition/prompts/versions.yml
+++ b/.mock/definition/prompts/versions.yml
@@ -205,6 +205,9 @@ service:
prompt_cost_usd: prompt_cost_usd
completion_cost_usd: completion_cost_usd
total_cost_usd: total_cost_usd
+ error: true
+ error_type: error_type
+ error_message: error_message
audiences:
- public
get_refined_prompt:
diff --git a/poetry.lock b/poetry.lock
index 8a690afc1..15b2184a9 100644
--- a/poetry.lock
+++ b/poetry.lock
@@ -16,13 +16,13 @@ typing-extensions = {version = ">=4.0.0", markers = "python_version < \"3.9\""}
[[package]]
name = "anyio"
-version = "4.5.0"
+version = "4.5.2"
description = "High level compatibility layer for multiple asynchronous event loop implementations"
optional = false
python-versions = ">=3.8"
files = [
- {file = "anyio-4.5.0-py3-none-any.whl", hash = "sha256:fdeb095b7cc5a5563175eedd926ec4ae55413bb4be5770c424af0ba46ccb4a78"},
- {file = "anyio-4.5.0.tar.gz", hash = "sha256:c5a275fe5ca0afd788001f58fca1e69e29ce706d746e317d660e21f70c530ef9"},
+ {file = "anyio-4.5.2-py3-none-any.whl", hash = "sha256:c011ee36bc1e8ba40e5a81cb9df91925c218fe9b778554e0b56a21e1b5d4716f"},
+ {file = "anyio-4.5.2.tar.gz", hash = "sha256:23009af4ed04ce05991845451e11ef02fc7c5ed29179ac9a420e5ad0ac7ddc5b"},
]
[package.dependencies]
@@ -33,7 +33,7 @@ typing-extensions = {version = ">=4.1", markers = "python_version < \"3.11\""}
[package.extras]
doc = ["Sphinx (>=7.4,<8.0)", "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.21.0b1)"]
+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", "truststore (>=0.9.1)", "uvloop (>=0.21.0b1)"]
trio = ["trio (>=0.26.1)"]
[[package]]
diff --git a/src/label_studio_sdk/types/inference_run_cost_estimate.py b/src/label_studio_sdk/types/inference_run_cost_estimate.py
index 550ccc8a7..6c7b2bc44 100644
--- a/src/label_studio_sdk/types/inference_run_cost_estimate.py
+++ b/src/label_studio_sdk/types/inference_run_cost_estimate.py
@@ -23,6 +23,21 @@ class InferenceRunCostEstimate(pydantic_v1.BaseModel):
Total cost of the inference (in USD)
"""
+ error: typing.Optional[bool] = pydantic_v1.Field(default=None)
+ """
+ Whether an error occurred or not
+ """
+
+ error_type: typing.Optional[str] = pydantic_v1.Field(default=None)
+ """
+ Type of error (e.g. "Timeout", "Rate Limit", etc)
+ """
+
+ error_message: typing.Optional[str] = pydantic_v1.Field(default=None)
+ """
+ Error message details
+ """
+
def json(self, **kwargs: typing.Any) -> str:
kwargs_with_defaults: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
return super().json(**kwargs_with_defaults)
diff --git a/tests/prompts/test_versions.py b/tests/prompts/test_versions.py
index d150204d2..c58d53afd 100644
--- a/tests/prompts/test_versions.py
+++ b/tests/prompts/test_versions.py
@@ -154,8 +154,18 @@ async def test_cost_estimate(client: LabelStudio, async_client: AsyncLabelStudio
"prompt_cost_usd": "prompt_cost_usd",
"completion_cost_usd": "completion_cost_usd",
"total_cost_usd": "total_cost_usd",
+ "error": True,
+ "error_type": "error_type",
+ "error_message": "error_message",
+ }
+ expected_types: typing.Any = {
+ "prompt_cost_usd": None,
+ "completion_cost_usd": None,
+ "total_cost_usd": None,
+ "error": None,
+ "error_type": None,
+ "error_message": None,
}
- expected_types: typing.Any = {"prompt_cost_usd": None, "completion_cost_usd": None, "total_cost_usd": None}
response = client.prompts.versions.cost_estimate(prompt_id=1, version_id=1, project_id=1, project_subset=1)
validate_response(response, expected_response, expected_types)
From 235d7690e38a8be22bf582e48f66d9516760e373 Mon Sep 17 00:00:00 2001
From: fern-api <115122769+fern-api[bot]@users.noreply.github.com>
Date: Thu, 17 Oct 2024 23:10:43 +0000
Subject: [PATCH 6/6] SDK regeneration
---
.mock/definition/__package__.yml | 2 +-
.mock/definition/prompts/versions.yml | 2 +-
src/label_studio_sdk/types/inference_run_cost_estimate.py | 2 +-
tests/prompts/test_versions.py | 4 ++--
4 files changed, 5 insertions(+), 5 deletions(-)
diff --git a/.mock/definition/__package__.yml b/.mock/definition/__package__.yml
index 05f08477c..19a64561e 100644
--- a/.mock/definition/__package__.yml
+++ b/.mock/definition/__package__.yml
@@ -2358,7 +2358,7 @@ types:
total_cost_usd:
type: optional
docs: Total cost of the inference (in USD)
- error:
+ is_error:
type: optional
docs: Whether an error occurred or not
error_type:
diff --git a/.mock/definition/prompts/versions.yml b/.mock/definition/prompts/versions.yml
index ccf3f6eab..f040af4ac 100644
--- a/.mock/definition/prompts/versions.yml
+++ b/.mock/definition/prompts/versions.yml
@@ -205,7 +205,7 @@ service:
prompt_cost_usd: prompt_cost_usd
completion_cost_usd: completion_cost_usd
total_cost_usd: total_cost_usd
- error: true
+ is_error: true
error_type: error_type
error_message: error_message
audiences:
diff --git a/src/label_studio_sdk/types/inference_run_cost_estimate.py b/src/label_studio_sdk/types/inference_run_cost_estimate.py
index 6c7b2bc44..76187d717 100644
--- a/src/label_studio_sdk/types/inference_run_cost_estimate.py
+++ b/src/label_studio_sdk/types/inference_run_cost_estimate.py
@@ -23,7 +23,7 @@ class InferenceRunCostEstimate(pydantic_v1.BaseModel):
Total cost of the inference (in USD)
"""
- error: typing.Optional[bool] = pydantic_v1.Field(default=None)
+ is_error: typing.Optional[bool] = pydantic_v1.Field(default=None)
"""
Whether an error occurred or not
"""
diff --git a/tests/prompts/test_versions.py b/tests/prompts/test_versions.py
index c58d53afd..d1cb19e9a 100644
--- a/tests/prompts/test_versions.py
+++ b/tests/prompts/test_versions.py
@@ -154,7 +154,7 @@ async def test_cost_estimate(client: LabelStudio, async_client: AsyncLabelStudio
"prompt_cost_usd": "prompt_cost_usd",
"completion_cost_usd": "completion_cost_usd",
"total_cost_usd": "total_cost_usd",
- "error": True,
+ "is_error": True,
"error_type": "error_type",
"error_message": "error_message",
}
@@ -162,7 +162,7 @@ async def test_cost_estimate(client: LabelStudio, async_client: AsyncLabelStudio
"prompt_cost_usd": None,
"completion_cost_usd": None,
"total_cost_usd": None,
- "error": None,
+ "is_error": None,
"error_type": None,
"error_message": None,
}