Skip to content

Commit

Permalink
feat(api): OpenAPI spec update via Stainless API (#1148)
Browse files Browse the repository at this point in the history
  • Loading branch information
stainless-app[bot] authored and stainless-bot committed Jun 27, 2024
1 parent 26170ae commit ffe4519
Show file tree
Hide file tree
Showing 4 changed files with 25 additions and 10 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: 1254
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-5e3cc17dacbf34ea6c55cfa520e9852ce21b11a0a722ad53edcc7e7fe4299a1e.yml
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-e162f6d2b8d992c37325f085f70201b88fce7c9fb8959d5fb9f92423f7de9b47.yml
15 changes: 15 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -99,6 +99,21 @@ include = [
[tool.hatch.build.targets.wheel]
packages = ["src/cloudflare"]

[tool.hatch.build.targets.sdist]
# Basically everything except hidden files/directories (such as .github, .devcontainers, .python-version, etc)
include = [
"/*.toml",
"/*.json",
"/*.lock",
"/*.md",
"/mypy.ini",
"/noxfile.py",
"bin/*",
"examples/*",
"src/*",
"tests/*",
]

[tool.hatch.metadata.hooks.fancy-pypi-readme]
content-type = "text/markdown"

Expand Down
6 changes: 3 additions & 3 deletions src/cloudflare/types/workers/ai_run_params.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
"TextClassification",
"TextToImage",
"TextEmbeddings",
"SpeechRecognition",
"AutomaticSpeechRecognition",
"ImageClassification",
"ObjectDetection",
"TextGeneration",
Expand Down Expand Up @@ -57,7 +57,7 @@ class TextEmbeddings(TypedDict, total=False):
text: Required[Union[str, List[str]]]


class SpeechRecognition(TypedDict, total=False):
class AutomaticSpeechRecognition(TypedDict, total=False):
account_id: Required[str]

audio: Required[Iterable[float]]
Expand Down Expand Up @@ -142,7 +142,7 @@ class ImageToTextMessage(TypedDict, total=False):
TextClassification,
TextToImage,
TextEmbeddings,
SpeechRecognition,
AutomaticSpeechRecognition,
ImageClassification,
ObjectDetection,
TextGeneration,
Expand Down
12 changes: 6 additions & 6 deletions src/cloudflare/types/workers/ai_run_response.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@
"AIRunResponse",
"TextClassification",
"TextEmbeddings",
"SpeechRecognition",
"SpeechRecognitionWord",
"AutomaticSpeechRecognition",
"AutomaticSpeechRecognitionWord",
"ImageClassification",
"ObjectDetection",
"ObjectDetectionBox",
Expand All @@ -33,22 +33,22 @@ class TextEmbeddings(BaseModel):
shape: Optional[List[float]] = None


class SpeechRecognitionWord(BaseModel):
class AutomaticSpeechRecognitionWord(BaseModel):
end: Optional[float] = None

start: Optional[float] = None

word: Optional[str] = None


class SpeechRecognition(BaseModel):
class AutomaticSpeechRecognition(BaseModel):
text: str

vtt: Optional[str] = None

word_count: Optional[float] = None

words: Optional[List[SpeechRecognitionWord]] = None
words: Optional[List[AutomaticSpeechRecognitionWord]] = None


class ImageClassification(BaseModel):
Expand Down Expand Up @@ -103,7 +103,7 @@ class ImageToText(BaseModel):
List[TextClassification],
object,
TextEmbeddings,
SpeechRecognition,
AutomaticSpeechRecognition,
List[ImageClassification],
List[ObjectDetection],
UnionMember6,
Expand Down

0 comments on commit ffe4519

Please sign in to comment.