Skip to content

Commit e7fbd5c

Browse files
stainless-app[bot]stainless-bot
authored andcommitted
feat(api): OpenAPI spec update via Stainless API (#433)
1 parent f6889f6 commit e7fbd5c

File tree

4 files changed

+7
-6
lines changed

4 files changed

+7
-6
lines changed

.stats.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
11
configured_endpoints: 1267
2-
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-c009571890021a3ddaeb9603ffbfa1f8f23f2ec22c247cd9a1c3bda38e37cac6.yml
2+
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-5c41a7aa9877639ecb82e8e278d9d8d77a58f9d308ed8e8f570cd3243f130e05.yml

src/cloudflare/resources/workers/ai.py

+4-4
Original file line numberDiff line numberDiff line change
@@ -419,7 +419,7 @@ def run(
419419
model_name: str,
420420
*,
421421
account_id: str,
422-
image: Iterable[float],
422+
image: Union[Iterable[float], str],
423423
max_tokens: int | NotGiven = NOT_GIVEN,
424424
messages: Iterable[ai_run_params.ImageToTextMessage] | NotGiven = NOT_GIVEN,
425425
prompt: str | NotGiven = NOT_GIVEN,
@@ -475,7 +475,7 @@ def run(
475475
text: str | Union[str, List[str]] | NotGiven = NOT_GIVEN,
476476
prompt: str | NotGiven = NOT_GIVEN,
477477
guidance: float | NotGiven = NOT_GIVEN,
478-
image: Iterable[float] | NotGiven = NOT_GIVEN,
478+
image: Iterable[float] | Union[Iterable[float], str] | NotGiven = NOT_GIVEN,
479479
mask: Iterable[float] | NotGiven = NOT_GIVEN,
480480
num_steps: int | NotGiven = NOT_GIVEN,
481481
strength: float | NotGiven = NOT_GIVEN,
@@ -935,7 +935,7 @@ async def run(
935935
model_name: str,
936936
*,
937937
account_id: str,
938-
image: Iterable[float],
938+
image: Union[Iterable[float], str],
939939
max_tokens: int | NotGiven = NOT_GIVEN,
940940
messages: Iterable[ai_run_params.ImageToTextMessage] | NotGiven = NOT_GIVEN,
941941
prompt: str | NotGiven = NOT_GIVEN,
@@ -991,7 +991,7 @@ async def run(
991991
text: str | Union[str, List[str]] | NotGiven = NOT_GIVEN,
992992
prompt: str | NotGiven = NOT_GIVEN,
993993
guidance: float | NotGiven = NOT_GIVEN,
994-
image: Iterable[float] | NotGiven = NOT_GIVEN,
994+
image: Iterable[float] | Union[Iterable[float], str] | NotGiven = NOT_GIVEN,
995995
mask: Iterable[float] | NotGiven = NOT_GIVEN,
996996
num_steps: int | NotGiven = NOT_GIVEN,
997997
strength: float | NotGiven = NOT_GIVEN,

src/cloudflare/types/workers/ai_run_params.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -120,7 +120,7 @@ class Summarization(TypedDict, total=False):
120120
class ImageToText(TypedDict, total=False):
121121
account_id: Required[str]
122122

123-
image: Required[Iterable[float]]
123+
image: Required[Union[Iterable[float], str]]
124124

125125
max_tokens: int
126126

src/cloudflare/types/workers/ai_run_response.py

+1
Original file line numberDiff line numberDiff line change
@@ -93,6 +93,7 @@ class ImageToText(BaseModel):
9393
AIRunResponse = Union[
9494
List[TextClassification],
9595
object,
96+
object,
9697
List[float],
9798
TextEmbeddings,
9899
SpeechRecognition,

0 commit comments

Comments
 (0)