diff --git a/.stats.yml b/.stats.yml index e1aa4a76cd9..23bd6be1885 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,2 +1,2 @@ configured_endpoints: 1252 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-57358570b9af58f781ddd4b9333cd38dc712fb26845901cbe8bce2b7bba4ff26.yml +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-9f6e9da01b27f4f387991ca14ecafe0c42a356cc3c47b269e5f8b4f6cd0ed700.yml diff --git a/src/cloudflare/resources/workers/ai/ai.py b/src/cloudflare/resources/workers/ai/ai.py index df82885c0b8..9eabaca9253 100644 --- a/src/cloudflare/resources/workers/ai/ai.py +++ b/src/cloudflare/resources/workers/ai/ai.py @@ -130,12 +130,17 @@ def run( account_id: str, prompt: str, guidance: float | NotGiven = NOT_GIVEN, + height: int | NotGiven = NOT_GIVEN, image: Iterable[float] | NotGiven = NOT_GIVEN, + image_b64: str | NotGiven = NOT_GIVEN, lora_weights: Iterable[float] | NotGiven = NOT_GIVEN, loras: List[str] | NotGiven = NOT_GIVEN, mask: Iterable[float] | NotGiven = NOT_GIVEN, + negative_prompt: str | NotGiven = NOT_GIVEN, num_steps: int | NotGiven = NOT_GIVEN, + seed: int | NotGiven = NOT_GIVEN, strength: float | NotGiven = NOT_GIVEN, + width: int | NotGiven = NOT_GIVEN, # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. # The extra values given here take precedence over values defined on the client or passed to this method. extra_headers: Headers | None = None, @@ -485,12 +490,17 @@ def run( text: str | Union[str, List[str]] | NotGiven = NOT_GIVEN, prompt: str | NotGiven = NOT_GIVEN, guidance: float | NotGiven = NOT_GIVEN, + height: int | NotGiven = NOT_GIVEN, image: Iterable[float] | NotGiven = NOT_GIVEN, + image_b64: str | NotGiven = NOT_GIVEN, lora_weights: Iterable[float] | NotGiven = NOT_GIVEN, loras: List[str] | NotGiven = NOT_GIVEN, mask: Iterable[float] | NotGiven = NOT_GIVEN, + negative_prompt: str | NotGiven = NOT_GIVEN, num_steps: int | NotGiven = NOT_GIVEN, + seed: int | NotGiven = NOT_GIVEN, strength: float | NotGiven = NOT_GIVEN, + width: int | NotGiven = NOT_GIVEN, audio: Iterable[float] | NotGiven = NOT_GIVEN, lora: str | NotGiven = NOT_GIVEN, max_tokens: int | NotGiven = NOT_GIVEN, @@ -625,12 +635,17 @@ async def run( account_id: str, prompt: str, guidance: float | NotGiven = NOT_GIVEN, + height: int | NotGiven = NOT_GIVEN, image: Iterable[float] | NotGiven = NOT_GIVEN, + image_b64: str | NotGiven = NOT_GIVEN, lora_weights: Iterable[float] | NotGiven = NOT_GIVEN, loras: List[str] | NotGiven = NOT_GIVEN, mask: Iterable[float] | NotGiven = NOT_GIVEN, + negative_prompt: str | NotGiven = NOT_GIVEN, num_steps: int | NotGiven = NOT_GIVEN, + seed: int | NotGiven = NOT_GIVEN, strength: float | NotGiven = NOT_GIVEN, + width: int | NotGiven = NOT_GIVEN, # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. # The extra values given here take precedence over values defined on the client or passed to this method. extra_headers: Headers | None = None, @@ -980,12 +995,17 @@ async def run( text: str | Union[str, List[str]] | NotGiven = NOT_GIVEN, prompt: str | NotGiven = NOT_GIVEN, guidance: float | NotGiven = NOT_GIVEN, + height: int | NotGiven = NOT_GIVEN, image: Iterable[float] | NotGiven = NOT_GIVEN, + image_b64: str | NotGiven = NOT_GIVEN, lora_weights: Iterable[float] | NotGiven = NOT_GIVEN, loras: List[str] | NotGiven = NOT_GIVEN, mask: Iterable[float] | NotGiven = NOT_GIVEN, + negative_prompt: str | NotGiven = NOT_GIVEN, num_steps: int | NotGiven = NOT_GIVEN, + seed: int | NotGiven = NOT_GIVEN, strength: float | NotGiven = NOT_GIVEN, + width: int | NotGiven = NOT_GIVEN, audio: Iterable[float] | NotGiven = NOT_GIVEN, lora: str | NotGiven = NOT_GIVEN, max_tokens: int | NotGiven = NOT_GIVEN, diff --git a/src/cloudflare/types/workers/ai_run_params.py b/src/cloudflare/types/workers/ai_run_params.py index 12cd367dc01..c4267b81bf5 100644 --- a/src/cloudflare/types/workers/ai_run_params.py +++ b/src/cloudflare/types/workers/ai_run_params.py @@ -42,18 +42,28 @@ class TextToImage(TypedDict, total=False): guidance: float + height: int + image: Iterable[float] + image_b64: str + lora_weights: Iterable[float] loras: List[str] mask: Iterable[float] + negative_prompt: str + num_steps: int + seed: int + strength: float + width: int + class TextEmbeddings(TypedDict, total=False): account_id: Required[str] diff --git a/tests/api_resources/workers/test_ai.py b/tests/api_resources/workers/test_ai.py index aed9946b339..538d0fb1c39 100644 --- a/tests/api_resources/workers/test_ai.py +++ b/tests/api_resources/workers/test_ai.py @@ -139,12 +139,17 @@ def test_method_run_with_all_params_overload_3(self, client: Cloudflare) -> None account_id="023e105f4ecef8ad9ca31a8372d0c353", prompt="x", guidance=0, + height=0, image=[0, 0, 0], + image_b64="image_b64", lora_weights=[0, 0, 0], loras=["string", "string", "string"], mask=[0, 0, 0], + negative_prompt="negative_prompt", num_steps=0, + seed=0, strength=0, + width=0, ) assert_matches_type(Optional[AIRunResponse], ai, path=["response"]) @@ -821,12 +826,17 @@ async def test_method_run_with_all_params_overload_3(self, async_client: AsyncCl account_id="023e105f4ecef8ad9ca31a8372d0c353", prompt="x", guidance=0, + height=0, image=[0, 0, 0], + image_b64="image_b64", lora_weights=[0, 0, 0], loras=["string", "string", "string"], mask=[0, 0, 0], + negative_prompt="negative_prompt", num_steps=0, + seed=0, strength=0, + width=0, ) assert_matches_type(Optional[AIRunResponse], ai, path=["response"])