Skip to content

Commit 6c913e4

Browse files
chore(internal): codegen related update (#22)
1 parent a9c1c23 commit 6c913e4

File tree

2 files changed

+24
-0
lines changed

2 files changed

+24
-0
lines changed

README.md

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -84,6 +84,28 @@ Nested request parameters are [TypedDicts](https://docs.python.org/3/library/typ
8484

8585
Typed requests and responses provide autocomplete and documentation within your editor. If you would like to see type errors in VS Code to help catch bugs earlier, set `python.analysis.typeCheckingMode` to `basic`.
8686

87+
## Nested params
88+
89+
Nested parameters are dictionaries, typed using `TypedDict`, for example:
90+
91+
```python
92+
from isaacus import Isaacus
93+
94+
client = Isaacus()
95+
96+
universal_classification = client.classifications.universal.create(
97+
model="kanon-universal-classifier",
98+
query="This is a confidentiality clause.",
99+
text="I agree not to tell anyone about the document.",
100+
chunking_options={
101+
"overlap_ratio": 0.1,
102+
"overlap_tokens": 0,
103+
"size": 512,
104+
},
105+
)
106+
print(universal_classification.chunking_options)
107+
```
108+
87109
## Handling errors
88110

89111
When the library is unable to connect to the API (for example, due to network connection problems or a timeout), a subclass of `isaacus.APIConnectionError` is raised.

scripts/test

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,8 @@ else
5252
echo
5353
fi
5454

55+
export DEFER_PYDANTIC_BUILD=false
56+
5557
echo "==> Running tests"
5658
rye run pytest "$@"
5759

0 commit comments

Comments
 (0)