Skip to content

Commit

Permalink
feat(api): api update (#2385)
Browse files Browse the repository at this point in the history
  • Loading branch information
stainless-app[bot] committed Jan 29, 2025
1 parent e05d928 commit 27bbdfe
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 1 deletion.
2 changes: 1 addition & 1 deletion .stats.yml
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
configured_endpoints: 1493
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-44581b9482743df3b0ea5bd5f20750f379d2d81d73a8d78eb86e525938fca96e.yml
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-45e2bf6da4c3bb8d5a1b7b45606cbb125417f078418c5f0bc542a199cef669a7.yml
15 changes: 15 additions & 0 deletions src/cloudflare/types/ai/ai_run_response.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@
"ObjectDetectionBox",
"UnionMember7",
"UnionMember7ToolCall",
"UnionMember7Usage",
"Translation",
"Summarization",
"ImageToText",
Expand Down Expand Up @@ -111,13 +112,27 @@ class UnionMember7ToolCall(BaseModel):
"""The name of the tool to be called"""


class UnionMember7Usage(BaseModel):
completion_tokens: Optional[float] = None
"""Total number of tokens in output"""

prompt_tokens: Optional[float] = None
"""Total number of tokens in input"""

total_tokens: Optional[float] = None
"""Total number of input and output tokens"""


class UnionMember7(BaseModel):
response: Optional[str] = None
"""The generated text response from the model"""

tool_calls: Optional[List[UnionMember7ToolCall]] = None
"""An array of tool calls requests made during the response generation"""

usage: Optional[UnionMember7Usage] = None
"""Usage statistics for the inference request"""


class Translation(BaseModel):
translated_text: Optional[str] = None
Expand Down

0 comments on commit 27bbdfe

Please sign in to comment.