diff --git a/.stats.yml b/.stats.yml index fd690353766..a020cecdf87 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,2 +1,2 @@ configured_endpoints: 1267 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-c009571890021a3ddaeb9603ffbfa1f8f23f2ec22c247cd9a1c3bda38e37cac6.yml +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-5c41a7aa9877639ecb82e8e278d9d8d77a58f9d308ed8e8f570cd3243f130e05.yml diff --git a/src/cloudflare/resources/workers/ai.py b/src/cloudflare/resources/workers/ai.py index fa587e8cf49..45a971ef797 100644 --- a/src/cloudflare/resources/workers/ai.py +++ b/src/cloudflare/resources/workers/ai.py @@ -419,7 +419,7 @@ def run( model_name: str, *, account_id: str, - image: Iterable[float], + image: Union[Iterable[float], str], max_tokens: int | NotGiven = NOT_GIVEN, messages: Iterable[ai_run_params.ImageToTextMessage] | NotGiven = NOT_GIVEN, prompt: str | NotGiven = NOT_GIVEN, @@ -475,7 +475,7 @@ def run( text: str | Union[str, List[str]] | NotGiven = NOT_GIVEN, prompt: str | NotGiven = NOT_GIVEN, guidance: float | NotGiven = NOT_GIVEN, - image: Iterable[float] | NotGiven = NOT_GIVEN, + image: Iterable[float] | Union[Iterable[float], str] | NotGiven = NOT_GIVEN, mask: Iterable[float] | NotGiven = NOT_GIVEN, num_steps: int | NotGiven = NOT_GIVEN, strength: float | NotGiven = NOT_GIVEN, @@ -935,7 +935,7 @@ async def run( model_name: str, *, account_id: str, - image: Iterable[float], + image: Union[Iterable[float], str], max_tokens: int | NotGiven = NOT_GIVEN, messages: Iterable[ai_run_params.ImageToTextMessage] | NotGiven = NOT_GIVEN, prompt: str | NotGiven = NOT_GIVEN, @@ -991,7 +991,7 @@ async def run( text: str | Union[str, List[str]] | NotGiven = NOT_GIVEN, prompt: str | NotGiven = NOT_GIVEN, guidance: float | NotGiven = NOT_GIVEN, - image: Iterable[float] | NotGiven = NOT_GIVEN, + image: Iterable[float] | Union[Iterable[float], str] | NotGiven = NOT_GIVEN, mask: Iterable[float] | NotGiven = NOT_GIVEN, num_steps: int | NotGiven = NOT_GIVEN, strength: float | NotGiven = NOT_GIVEN, diff --git a/src/cloudflare/types/workers/ai_run_params.py b/src/cloudflare/types/workers/ai_run_params.py index 888e17d7d99..313fc93b94f 100644 --- a/src/cloudflare/types/workers/ai_run_params.py +++ b/src/cloudflare/types/workers/ai_run_params.py @@ -120,7 +120,7 @@ class Summarization(TypedDict, total=False): class ImageToText(TypedDict, total=False): account_id: Required[str] - image: Required[Iterable[float]] + image: Required[Union[Iterable[float], str]] max_tokens: int diff --git a/src/cloudflare/types/workers/ai_run_response.py b/src/cloudflare/types/workers/ai_run_response.py index 5877761e02c..4894fee25d6 100644 --- a/src/cloudflare/types/workers/ai_run_response.py +++ b/src/cloudflare/types/workers/ai_run_response.py @@ -93,6 +93,7 @@ class ImageToText(BaseModel): AIRunResponse = Union[ List[TextClassification], object, + object, List[float], TextEmbeddings, SpeechRecognition,