Skip to content

Commit 3dcb89f

Browse files
stainless-app[bot]stainless-bot
authored andcommitted
feat(api): OpenAPI spec update via Stainless API (#1166)
1 parent 6503a16 commit 3dcb89f

File tree

9 files changed

+26
-8
lines changed

9 files changed

+26
-8
lines changed

.devcontainer/Dockerfile

+1-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ FROM mcr.microsoft.com/vscode/devcontainers/python:0-${VARIANT}
33

44
USER vscode
55

6-
RUN curl -sSf https://rye.astral.sh/get | RYE_VERSION="0.24.0" RYE_INSTALL_OPTION="--yes" bash
6+
RUN curl -sSf https://rye.astral.sh/get | RYE_VERSION="0.35.0" RYE_INSTALL_OPTION="--yes" bash
77
ENV PATH=/home/vscode/.rye/shims:$PATH
88

99
RUN echo "[[ -d .venv ]] && source .venv/bin/activate" >> /home/vscode/.bashrc

.github/workflows/ci.yml

+4-4
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ jobs:
2121
curl -sSf https://rye.astral.sh/get | bash
2222
echo "$HOME/.rye/shims" >> $GITHUB_PATH
2323
env:
24-
RYE_VERSION: 0.24.0
24+
RYE_VERSION: '0.35.0'
2525
RYE_INSTALL_OPTION: '--yes'
2626

2727
- name: Install dependencies
@@ -41,7 +41,7 @@ jobs:
4141
curl -sSf https://rye.astral.sh/get | bash
4242
echo "$HOME/.rye/shims" >> $GITHUB_PATH
4343
env:
44-
RYE_VERSION: 0.24.0
44+
RYE_VERSION: '0.35.0'
4545
RYE_INSTALL_OPTION: '--yes'
4646

4747
- name: Bootstrap
@@ -61,8 +61,8 @@ jobs:
6161
curl -sSf https://rye.astral.sh/get | bash
6262
echo "$HOME/.rye/shims" >> $GITHUB_PATH
6363
env:
64-
RYE_VERSION: 0.24.0
65-
RYE_INSTALL_OPTION: "--yes"
64+
RYE_VERSION: '0.35.0'
65+
RYE_INSTALL_OPTION: '--yes'
6666
- name: Install dependencies
6767
run: |
6868
rye sync --all-features

.github/workflows/publish-pypi.yml

+2-2
Original file line numberDiff line numberDiff line change
@@ -21,8 +21,8 @@ jobs:
2121
curl -sSf https://rye.astral.sh/get | bash
2222
echo "$HOME/.rye/shims" >> $GITHUB_PATH
2323
env:
24-
RYE_VERSION: 0.24.0
25-
RYE_INSTALL_OPTION: "--yes"
24+
RYE_VERSION: '0.35.0'
25+
RYE_INSTALL_OPTION: '--yes'
2626

2727
- name: Publish to PyPI
2828
run: |

.stats.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
11
configured_endpoints: 1254
2-
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-9ec83085fa15e1f1cc613401a707a27556909eab3b6b756359938f8fd4a1aef4.yml
2+
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-ad7a39118e76762e485d8d1f264939212ed6a602f6e717a254cf924316e058f0.yml

requirements-dev.lock

+1
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66
# features: []
77
# all-features: true
88
# with-sources: false
9+
# generate-hashes: false
910

1011
-e file:.
1112
annotated-types==0.6.0

requirements.lock

+1
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66
# features: []
77
# all-features: true
88
# with-sources: false
9+
# generate-hashes: false
910

1011
-e file:.
1112
annotated-types==0.6.0

src/cloudflare/resources/workers/ai/ai.py

+8
Original file line numberDiff line numberDiff line change
@@ -133,6 +133,8 @@ def run(
133133
prompt: str,
134134
guidance: float | NotGiven = NOT_GIVEN,
135135
image: Iterable[float] | NotGiven = NOT_GIVEN,
136+
lora_weights: Iterable[float] | NotGiven = NOT_GIVEN,
137+
loras: List[str] | NotGiven = NOT_GIVEN,
136138
mask: Iterable[float] | NotGiven = NOT_GIVEN,
137139
num_steps: int | NotGiven = NOT_GIVEN,
138140
strength: float | NotGiven = NOT_GIVEN,
@@ -486,6 +488,8 @@ def run(
486488
prompt: str | NotGiven = NOT_GIVEN,
487489
guidance: float | NotGiven = NOT_GIVEN,
488490
image: Iterable[float] | NotGiven = NOT_GIVEN,
491+
lora_weights: Iterable[float] | NotGiven = NOT_GIVEN,
492+
loras: List[str] | NotGiven = NOT_GIVEN,
489493
mask: Iterable[float] | NotGiven = NOT_GIVEN,
490494
num_steps: int | NotGiven = NOT_GIVEN,
491495
strength: float | NotGiven = NOT_GIVEN,
@@ -624,6 +628,8 @@ async def run(
624628
prompt: str,
625629
guidance: float | NotGiven = NOT_GIVEN,
626630
image: Iterable[float] | NotGiven = NOT_GIVEN,
631+
lora_weights: Iterable[float] | NotGiven = NOT_GIVEN,
632+
loras: List[str] | NotGiven = NOT_GIVEN,
627633
mask: Iterable[float] | NotGiven = NOT_GIVEN,
628634
num_steps: int | NotGiven = NOT_GIVEN,
629635
strength: float | NotGiven = NOT_GIVEN,
@@ -977,6 +983,8 @@ async def run(
977983
prompt: str | NotGiven = NOT_GIVEN,
978984
guidance: float | NotGiven = NOT_GIVEN,
979985
image: Iterable[float] | NotGiven = NOT_GIVEN,
986+
lora_weights: Iterable[float] | NotGiven = NOT_GIVEN,
987+
loras: List[str] | NotGiven = NOT_GIVEN,
980988
mask: Iterable[float] | NotGiven = NOT_GIVEN,
981989
num_steps: int | NotGiven = NOT_GIVEN,
982990
strength: float | NotGiven = NOT_GIVEN,

src/cloudflare/types/workers/ai_run_params.py

+4
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,10 @@ class TextToImage(TypedDict, total=False):
4444

4545
image: Iterable[float]
4646

47+
lora_weights: Iterable[float]
48+
49+
loras: List[str]
50+
4751
mask: Iterable[float]
4852

4953
num_steps: int

tests/api_resources/workers/test_ai.py

+4
Original file line numberDiff line numberDiff line change
@@ -140,6 +140,8 @@ def test_method_run_with_all_params_overload_3(self, client: Cloudflare) -> None
140140
prompt="x",
141141
guidance=0,
142142
image=[0, 0, 0],
143+
lora_weights=[0, 0, 0],
144+
loras=["string", "string", "string"],
143145
mask=[0, 0, 0],
144146
num_steps=0,
145147
strength=0,
@@ -820,6 +822,8 @@ async def test_method_run_with_all_params_overload_3(self, async_client: AsyncCl
820822
prompt="x",
821823
guidance=0,
822824
image=[0, 0, 0],
825+
lora_weights=[0, 0, 0],
826+
loras=["string", "string", "string"],
823827
mask=[0, 0, 0],
824828
num_steps=0,
825829
strength=0,

0 commit comments

Comments
 (0)