Skip to content

Commit

Permalink
fix: DIA-1562: false precision in cost reports (#347)
Browse files Browse the repository at this point in the history
Co-authored-by: fern-api <115122769+fern-api[bot]@users.noreply.github.com>
Co-authored-by: Matt Bernstein <[email protected]>
  • Loading branch information
3 people authored Oct 30, 2024
1 parent f68b723 commit 9163715
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion .mock/definition/__package__.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2398,7 +2398,7 @@ types:
docs: Status of the refinement job
default: Pending
total_cost:
type: optional<float>
type: optional<string>
docs: Total cost of the refinement job (in USD)
previous_version:
type: optional<PromptVersion>
Expand Down
4 changes: 2 additions & 2 deletions .mock/definition/prompts/versions.yml
Original file line number Diff line number Diff line change
Expand Up @@ -248,7 +248,7 @@ service:
prompt: prompt
refinement_job_id: refinement_job_id
refinement_status: Pending
total_cost: 1.1
total_cost: total_cost
previous_version:
title: title
parent_model: 1
Expand Down Expand Up @@ -309,7 +309,7 @@ service:
prompt: prompt
refinement_job_id: refinement_job_id
refinement_status: Pending
total_cost: 1.1
total_cost: total_cost
previous_version:
title: title
parent_model: 1
Expand Down
2 changes: 1 addition & 1 deletion src/label_studio_sdk/types/refined_prompt_response.py
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ class RefinedPromptResponse(pydantic_v1.BaseModel):
Status of the refinement job
"""

total_cost: typing.Optional[float] = pydantic_v1.Field(default=None)
total_cost: typing.Optional[str] = pydantic_v1.Field(default=None)
"""
Total cost of the refinement job (in USD)
"""
Expand Down
4 changes: 2 additions & 2 deletions tests/prompts/test_versions.py
Original file line number Diff line number Diff line change
Expand Up @@ -182,7 +182,7 @@ async def test_get_refined_prompt(client: LabelStudio, async_client: AsyncLabelS
"prompt": "prompt",
"refinement_job_id": "refinement_job_id",
"refinement_status": "Pending",
"total_cost": 1.1,
"total_cost": "total_cost",
"previous_version": {
"title": "title",
"parent_model": 1,
Expand Down Expand Up @@ -234,7 +234,7 @@ async def test_refine_prompt(client: LabelStudio, async_client: AsyncLabelStudio
"prompt": "prompt",
"refinement_job_id": "refinement_job_id",
"refinement_status": "Pending",
"total_cost": 1.1,
"total_cost": "total_cost",
"previous_version": {
"title": "title",
"parent_model": 1,
Expand Down

0 comments on commit 9163715

Please sign in to comment.