Skip to content

Commit

Permalink
feat(api): OpenAPI spec update via Stainless API (#433)
Browse files Browse the repository at this point in the history
  • Loading branch information
stainless-app[bot] authored May 2, 2024
1 parent 023a7b8 commit 2798a48
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 6 deletions.
2 changes: 1 addition & 1 deletion .stats.yml
Original file line number Diff line number Diff line change
@@ -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
8 changes: 4 additions & 4 deletions src/cloudflare/resources/workers/ai.py
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down Expand Up @@ -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,
Expand Down Expand Up @@ -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,
Expand Down Expand Up @@ -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,
Expand Down
2 changes: 1 addition & 1 deletion src/cloudflare/types/workers/ai_run_params.py
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
1 change: 1 addition & 0 deletions src/cloudflare/types/workers/ai_run_response.py
Original file line number Diff line number Diff line change
Expand Up @@ -93,6 +93,7 @@ class ImageToText(BaseModel):
AIRunResponse = Union[
List[TextClassification],
object,
object,
List[float],
TextEmbeddings,
SpeechRecognition,
Expand Down

0 comments on commit 2798a48

Please sign in to comment.