You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+76Lines changed: 76 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -132,6 +132,51 @@ Streaming with `client.messages.stream(...)` exposes [various helpers for your c
132
132
133
133
Alternatively, you can use `client.messages.create({ ..., stream: true })` which only returns an async iterable of the events in the stream and thus uses less memory (it does not build up a final message object for you).
134
134
135
+
## Message Batches
136
+
137
+
This SDK provides beta support for the [Message Batches API](https://docs.anthropic.com/en/docs/build-with-claude/message-batches) under the `client.beta.messages.batches` namespace.
138
+
139
+
### Creating a batch
140
+
141
+
Message Batches take the exact same request params as the standard Messages API:
This SDK provides beta support for tool use, aka function calling. More details can be found in [the documentation](https://docs.anthropic.com/claude/docs/tool-use).
@@ -224,6 +269,37 @@ On timeout, an `APIConnectionTimeoutError` is thrown.
224
269
225
270
Note that requests which time out will be [retried twice by default](#retries).
226
271
272
+
## Auto-pagination
273
+
274
+
List methods in the Anthropic API are paginated.
275
+
You can use `for await … of` syntax to iterate through items across all pages:
0 commit comments