From 774a53a5636da312e2b6434a1cb22fa156c488a8 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Mon, 17 Jun 2024 11:04:11 +0000 Subject: [PATCH] feat(api): OpenAPI spec update via Stainless API (#1002) --- .stats.yml | 2 +- src/cloudflare/types/workers/ai_run_response.py | 15 ++++++++++++--- 2 files changed, 13 insertions(+), 4 deletions(-) diff --git a/.stats.yml b/.stats.yml index fd3e0235fc0..b882f703b73 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,2 +1,2 @@ configured_endpoints: 1348 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-d492ae5acff80b29c47150117fb6934a23891c45978e644382ebaa5bbee60222.yml +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-60eaec2f4029582531bbb45c66bb499e91203845eeeb3d507ae7ed5675a6bbe6.yml diff --git a/src/cloudflare/types/workers/ai_run_response.py b/src/cloudflare/types/workers/ai_run_response.py index 5877761e02c..87644ee64f6 100644 --- a/src/cloudflare/types/workers/ai_run_response.py +++ b/src/cloudflare/types/workers/ai_run_response.py @@ -13,7 +13,8 @@ "ImageClassification", "ObjectDetection", "ObjectDetectionBox", - "Response", + "UnionMember7", + "UnionMember7ToolCall", "Translation", "Summarization", "ImageToText", @@ -74,9 +75,17 @@ class ObjectDetection(BaseModel): score: Optional[float] = None -class Response(BaseModel): +class UnionMember7ToolCall(BaseModel): + arguments: Optional[object] = None + + name: Optional[str] = None + + +class UnionMember7(BaseModel): response: Optional[str] = None + tool_calls: Optional[List[UnionMember7ToolCall]] = None + class Translation(BaseModel): translated_text: Optional[str] = None @@ -98,7 +107,7 @@ class ImageToText(BaseModel): SpeechRecognition, List[ImageClassification], List[ObjectDetection], - Response, + UnionMember7, object, Translation, Summarization,