Skip to content

Commit 33d58b1

Browse files
stainless-app[bot]stainless-bot
authored andcommitted
feat(api): OpenAPI spec update via Stainless API (#145)
1 parent 7405055 commit 33d58b1

File tree

3 files changed

+10
-2
lines changed

3 files changed

+10
-2
lines changed

CONTRIBUTING.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -86,7 +86,7 @@ Most tests require you to [set up a mock server](https://github.com/stoplightio/
8686

8787
```bash
8888
# you will need npm installed
89-
npx prism path/to/your/openapi.yml
89+
npx prism mock path/to/your/openapi.yml
9090
```
9191

9292
```bash

src/cloudflare/_models.py

+7-1
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
import inspect
44
from typing import TYPE_CHECKING, Any, Type, Union, Generic, TypeVar, Callable, cast
55
from datetime import date, datetime
6+
from functools import lru_cache
67
from typing_extensions import (
78
Unpack,
89
Literal,
@@ -533,7 +534,12 @@ class GenericModel(BaseGenericModel, BaseModel):
533534

534535

535536
if PYDANTIC_V2:
536-
from pydantic import TypeAdapter
537+
if TYPE_CHECKING:
538+
from pydantic import TypeAdapter
539+
else:
540+
from pydantic import TypeAdapter as _TypeAdapter
541+
542+
TypeAdapter = lru_cache(_TypeAdapter)
537543

538544
def _validate_non_model_type(*, type_: type[_T], value: object) -> _T:
539545
return TypeAdapter(type_).validate_python(value)

src/cloudflare/types/workers/ai_run_params.py

+2
Original file line numberDiff line numberDiff line change
@@ -75,6 +75,8 @@ class BodyObjectDetection(TypedDict, total=False):
7575
class BodyUnionMember10(TypedDict, total=False):
7676
prompt: Required[str]
7777

78+
lora: str
79+
7880
max_tokens: int
7981

8082
raw: bool

0 commit comments

Comments
 (0)