anthropic 0.67.0__py3-none-any.whl → 0.68.1__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- anthropic/__init__.py +6 -1
- anthropic/_base_client.py +9 -9
- anthropic/_client.py +8 -8
- anthropic/_models.py +13 -4
- anthropic/_qs.py +7 -7
- anthropic/_types.py +18 -11
- anthropic/_utils/_transform.py +2 -2
- anthropic/_utils/_utils.py +4 -4
- anthropic/_version.py +1 -1
- anthropic/lib/tools/__init__.py +20 -0
- anthropic/lib/tools/_beta_functions.py +289 -0
- anthropic/lib/tools/_beta_runner.py +404 -0
- anthropic/resources/beta/files.py +37 -37
- anthropic/resources/beta/messages/batches.py +43 -43
- anthropic/resources/beta/messages/messages.py +531 -162
- anthropic/resources/beta/models.py +19 -19
- anthropic/resources/completions.py +63 -63
- anthropic/resources/messages/batches.py +19 -19
- anthropic/resources/messages/messages.py +125 -125
- anthropic/resources/models.py +19 -19
- {anthropic-0.67.0.dist-info → anthropic-0.68.1.dist-info}/METADATA +51 -1
- {anthropic-0.67.0.dist-info → anthropic-0.68.1.dist-info}/RECORD +24 -21
- {anthropic-0.67.0.dist-info → anthropic-0.68.1.dist-info}/WHEEL +0 -0
- {anthropic-0.67.0.dist-info → anthropic-0.68.1.dist-info}/licenses/LICENSE +0 -0
anthropic/__init__.py
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
import typing as _t
|
|
4
4
|
|
|
5
5
|
from . import types
|
|
6
|
-
from ._types import NOT_GIVEN, Omit, NoneType, NotGiven, Transport, ProxiesTypes
|
|
6
|
+
from ._types import NOT_GIVEN, Omit, NoneType, NotGiven, Transport, ProxiesTypes, omit, not_given
|
|
7
7
|
from ._utils import file_from_path
|
|
8
8
|
from ._client import (
|
|
9
9
|
Client,
|
|
@@ -54,7 +54,9 @@ __all__ = [
|
|
|
54
54
|
"ProxiesTypes",
|
|
55
55
|
"NotGiven",
|
|
56
56
|
"NOT_GIVEN",
|
|
57
|
+
"not_given",
|
|
57
58
|
"Omit",
|
|
59
|
+
"omit",
|
|
58
60
|
"AnthropicError",
|
|
59
61
|
"APIError",
|
|
60
62
|
"APIStatusError",
|
|
@@ -87,11 +89,14 @@ __all__ = [
|
|
|
87
89
|
"DefaultAioHttpClient",
|
|
88
90
|
"HUMAN_PROMPT",
|
|
89
91
|
"AI_PROMPT",
|
|
92
|
+
"beta_tool",
|
|
93
|
+
"beta_async_tool",
|
|
90
94
|
]
|
|
91
95
|
|
|
92
96
|
if not _t.TYPE_CHECKING:
|
|
93
97
|
from ._utils._resources_proxy import resources as resources
|
|
94
98
|
|
|
99
|
+
from .lib.tools import beta_tool, beta_async_tool
|
|
95
100
|
from .lib.vertex import *
|
|
96
101
|
from .lib.bedrock import *
|
|
97
102
|
from .lib.streaming import *
|
anthropic/_base_client.py
CHANGED
|
@@ -45,7 +45,6 @@ from . import _exceptions
|
|
|
45
45
|
from ._qs import Querystring
|
|
46
46
|
from ._files import to_httpx_files, async_to_httpx_files
|
|
47
47
|
from ._types import (
|
|
48
|
-
NOT_GIVEN,
|
|
49
48
|
Body,
|
|
50
49
|
Omit,
|
|
51
50
|
Query,
|
|
@@ -60,6 +59,7 @@ from ._types import (
|
|
|
60
59
|
RequestOptions,
|
|
61
60
|
HttpxRequestFiles,
|
|
62
61
|
ModelBuilderProtocol,
|
|
62
|
+
not_given,
|
|
63
63
|
)
|
|
64
64
|
from ._utils import is_dict, is_list, asyncify, is_given, lru_cache, is_mapping
|
|
65
65
|
from ._compat import PYDANTIC_V1, model_copy, model_dump
|
|
@@ -150,9 +150,9 @@ class PageInfo:
|
|
|
150
150
|
def __init__(
|
|
151
151
|
self,
|
|
152
152
|
*,
|
|
153
|
-
url: URL | NotGiven =
|
|
154
|
-
json: Body | NotGiven =
|
|
155
|
-
params: Query | NotGiven =
|
|
153
|
+
url: URL | NotGiven = not_given,
|
|
154
|
+
json: Body | NotGiven = not_given,
|
|
155
|
+
params: Query | NotGiven = not_given,
|
|
156
156
|
) -> None:
|
|
157
157
|
self.url = url
|
|
158
158
|
self.json = json
|
|
@@ -608,7 +608,7 @@ class BaseClient(Generic[_HttpxClientT, _DefaultStreamT]):
|
|
|
608
608
|
# we internally support defining a temporary header to override the
|
|
609
609
|
# default `cast_to` type for use with `.with_raw_response` and `.with_streaming_response`
|
|
610
610
|
# see _response.py for implementation details
|
|
611
|
-
override_cast_to = headers.pop(OVERRIDE_CAST_TO_HEADER,
|
|
611
|
+
override_cast_to = headers.pop(OVERRIDE_CAST_TO_HEADER, not_given)
|
|
612
612
|
if is_given(override_cast_to):
|
|
613
613
|
options.headers = headers
|
|
614
614
|
return cast(Type[ResponseT], override_cast_to)
|
|
@@ -892,7 +892,7 @@ class SyncAPIClient(BaseClient[httpx.Client, Stream[Any]]):
|
|
|
892
892
|
version: str,
|
|
893
893
|
base_url: str | URL,
|
|
894
894
|
max_retries: int = DEFAULT_MAX_RETRIES,
|
|
895
|
-
timeout: float | Timeout | None | NotGiven =
|
|
895
|
+
timeout: float | Timeout | None | NotGiven = not_given,
|
|
896
896
|
http_client: httpx.Client | None = None,
|
|
897
897
|
custom_headers: Mapping[str, str] | None = None,
|
|
898
898
|
custom_query: Mapping[str, object] | None = None,
|
|
@@ -1477,7 +1477,7 @@ class AsyncAPIClient(BaseClient[httpx.AsyncClient, AsyncStream[Any]]):
|
|
|
1477
1477
|
base_url: str | URL,
|
|
1478
1478
|
_strict_response_validation: bool,
|
|
1479
1479
|
max_retries: int = DEFAULT_MAX_RETRIES,
|
|
1480
|
-
timeout: float | Timeout | None | NotGiven =
|
|
1480
|
+
timeout: float | Timeout | None | NotGiven = not_given,
|
|
1481
1481
|
http_client: httpx.AsyncClient | None = None,
|
|
1482
1482
|
custom_headers: Mapping[str, str] | None = None,
|
|
1483
1483
|
custom_query: Mapping[str, object] | None = None,
|
|
@@ -1954,8 +1954,8 @@ def make_request_options(
|
|
|
1954
1954
|
extra_query: Query | None = None,
|
|
1955
1955
|
extra_body: Body | None = None,
|
|
1956
1956
|
idempotency_key: str | None = None,
|
|
1957
|
-
timeout: float | httpx.Timeout | None | NotGiven =
|
|
1958
|
-
post_parser: PostParser | NotGiven =
|
|
1957
|
+
timeout: float | httpx.Timeout | None | NotGiven = not_given,
|
|
1958
|
+
post_parser: PostParser | NotGiven = not_given,
|
|
1959
1959
|
) -> RequestOptions:
|
|
1960
1960
|
"""Create a dict of type RequestOptions without keys of NotGiven values."""
|
|
1961
1961
|
options: RequestOptions = {}
|
anthropic/_client.py
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
from __future__ import annotations
|
|
4
4
|
|
|
5
5
|
import os
|
|
6
|
-
from typing import TYPE_CHECKING, Any,
|
|
6
|
+
from typing import TYPE_CHECKING, Any, Mapping
|
|
7
7
|
from typing_extensions import Self, override
|
|
8
8
|
|
|
9
9
|
import httpx
|
|
@@ -11,7 +11,6 @@ import httpx
|
|
|
11
11
|
from . import _constants, _exceptions
|
|
12
12
|
from ._qs import Querystring
|
|
13
13
|
from ._types import (
|
|
14
|
-
NOT_GIVEN,
|
|
15
14
|
Omit,
|
|
16
15
|
Headers,
|
|
17
16
|
Timeout,
|
|
@@ -19,6 +18,7 @@ from ._types import (
|
|
|
19
18
|
Transport,
|
|
20
19
|
ProxiesTypes,
|
|
21
20
|
RequestOptions,
|
|
21
|
+
not_given,
|
|
22
22
|
)
|
|
23
23
|
from ._utils import is_given, get_async_library
|
|
24
24
|
from ._compat import cached_property
|
|
@@ -65,7 +65,7 @@ class Anthropic(SyncAPIClient):
|
|
|
65
65
|
api_key: str | None = None,
|
|
66
66
|
auth_token: str | None = None,
|
|
67
67
|
base_url: str | httpx.URL | None = None,
|
|
68
|
-
timeout:
|
|
68
|
+
timeout: float | Timeout | None | NotGiven = not_given,
|
|
69
69
|
max_retries: int = DEFAULT_MAX_RETRIES,
|
|
70
70
|
default_headers: Mapping[str, str] | None = None,
|
|
71
71
|
default_query: Mapping[str, object] | None = None,
|
|
@@ -203,9 +203,9 @@ class Anthropic(SyncAPIClient):
|
|
|
203
203
|
api_key: str | None = None,
|
|
204
204
|
auth_token: str | None = None,
|
|
205
205
|
base_url: str | httpx.URL | None = None,
|
|
206
|
-
timeout: float | Timeout | None | NotGiven =
|
|
206
|
+
timeout: float | Timeout | None | NotGiven = not_given,
|
|
207
207
|
http_client: httpx.Client | None = None,
|
|
208
|
-
max_retries: int | NotGiven =
|
|
208
|
+
max_retries: int | NotGiven = not_given,
|
|
209
209
|
default_headers: Mapping[str, str] | None = None,
|
|
210
210
|
set_default_headers: Mapping[str, str] | None = None,
|
|
211
211
|
default_query: Mapping[str, object] | None = None,
|
|
@@ -305,7 +305,7 @@ class AsyncAnthropic(AsyncAPIClient):
|
|
|
305
305
|
api_key: str | None = None,
|
|
306
306
|
auth_token: str | None = None,
|
|
307
307
|
base_url: str | httpx.URL | None = None,
|
|
308
|
-
timeout:
|
|
308
|
+
timeout: float | Timeout | None | NotGiven = not_given,
|
|
309
309
|
max_retries: int = DEFAULT_MAX_RETRIES,
|
|
310
310
|
default_headers: Mapping[str, str] | None = None,
|
|
311
311
|
default_query: Mapping[str, object] | None = None,
|
|
@@ -443,9 +443,9 @@ class AsyncAnthropic(AsyncAPIClient):
|
|
|
443
443
|
api_key: str | None = None,
|
|
444
444
|
auth_token: str | None = None,
|
|
445
445
|
base_url: str | httpx.URL | None = None,
|
|
446
|
-
timeout: float | Timeout | None | NotGiven =
|
|
446
|
+
timeout: float | Timeout | None | NotGiven = not_given,
|
|
447
447
|
http_client: httpx.AsyncClient | None = None,
|
|
448
|
-
max_retries: int | NotGiven =
|
|
448
|
+
max_retries: int | NotGiven = not_given,
|
|
449
449
|
default_headers: Mapping[str, str] | None = None,
|
|
450
450
|
set_default_headers: Mapping[str, str] | None = None,
|
|
451
451
|
default_query: Mapping[str, object] | None = None,
|
anthropic/_models.py
CHANGED
|
@@ -272,7 +272,7 @@ class BaseModel(pydantic.BaseModel):
|
|
|
272
272
|
mode: Literal["json", "python"] | str = "python",
|
|
273
273
|
include: IncEx | None = None,
|
|
274
274
|
exclude: IncEx | None = None,
|
|
275
|
-
by_alias: bool =
|
|
275
|
+
by_alias: bool | None = None,
|
|
276
276
|
exclude_unset: bool = False,
|
|
277
277
|
exclude_defaults: bool = False,
|
|
278
278
|
exclude_none: bool = False,
|
|
@@ -280,6 +280,7 @@ class BaseModel(pydantic.BaseModel):
|
|
|
280
280
|
warnings: bool | Literal["none", "warn", "error"] = True,
|
|
281
281
|
context: dict[str, Any] | None = None,
|
|
282
282
|
serialize_as_any: bool = False,
|
|
283
|
+
fallback: Callable[[Any], Any] | None = None,
|
|
283
284
|
) -> dict[str, Any]:
|
|
284
285
|
"""Usage docs: https://docs.pydantic.dev/2.4/concepts/serialization/#modelmodel_dump
|
|
285
286
|
|
|
@@ -311,10 +312,12 @@ class BaseModel(pydantic.BaseModel):
|
|
|
311
312
|
raise ValueError("context is only supported in Pydantic v2")
|
|
312
313
|
if serialize_as_any != False:
|
|
313
314
|
raise ValueError("serialize_as_any is only supported in Pydantic v2")
|
|
315
|
+
if fallback is not None:
|
|
316
|
+
raise ValueError("fallback is only supported in Pydantic v2")
|
|
314
317
|
dumped = super().dict( # pyright: ignore[reportDeprecated]
|
|
315
318
|
include=include,
|
|
316
319
|
exclude=exclude,
|
|
317
|
-
by_alias=by_alias,
|
|
320
|
+
by_alias=by_alias if by_alias is not None else False,
|
|
318
321
|
exclude_unset=exclude_unset,
|
|
319
322
|
exclude_defaults=exclude_defaults,
|
|
320
323
|
exclude_none=exclude_none,
|
|
@@ -329,13 +332,14 @@ class BaseModel(pydantic.BaseModel):
|
|
|
329
332
|
indent: int | None = None,
|
|
330
333
|
include: IncEx | None = None,
|
|
331
334
|
exclude: IncEx | None = None,
|
|
332
|
-
by_alias: bool =
|
|
335
|
+
by_alias: bool | None = None,
|
|
333
336
|
exclude_unset: bool = False,
|
|
334
337
|
exclude_defaults: bool = False,
|
|
335
338
|
exclude_none: bool = False,
|
|
336
339
|
round_trip: bool = False,
|
|
337
340
|
warnings: bool | Literal["none", "warn", "error"] = True,
|
|
338
341
|
context: dict[str, Any] | None = None,
|
|
342
|
+
fallback: Callable[[Any], Any] | None = None,
|
|
339
343
|
serialize_as_any: bool = False,
|
|
340
344
|
) -> str:
|
|
341
345
|
"""Usage docs: https://docs.pydantic.dev/2.4/concepts/serialization/#modelmodel_dump_json
|
|
@@ -364,11 +368,13 @@ class BaseModel(pydantic.BaseModel):
|
|
|
364
368
|
raise ValueError("context is only supported in Pydantic v2")
|
|
365
369
|
if serialize_as_any != False:
|
|
366
370
|
raise ValueError("serialize_as_any is only supported in Pydantic v2")
|
|
371
|
+
if fallback is not None:
|
|
372
|
+
raise ValueError("fallback is only supported in Pydantic v2")
|
|
367
373
|
return super().json( # type: ignore[reportDeprecated]
|
|
368
374
|
indent=indent,
|
|
369
375
|
include=include,
|
|
370
376
|
exclude=exclude,
|
|
371
|
-
by_alias=by_alias,
|
|
377
|
+
by_alias=by_alias if by_alias is not None else False,
|
|
372
378
|
exclude_unset=exclude_unset,
|
|
373
379
|
exclude_defaults=exclude_defaults,
|
|
374
380
|
exclude_none=exclude_none,
|
|
@@ -780,6 +786,9 @@ elif not TYPE_CHECKING: # TODO: condition is weird
|
|
|
780
786
|
def _create_pydantic_model(type_: _T) -> Type[RootModel[_T]]:
|
|
781
787
|
return RootModel[type_] # type: ignore
|
|
782
788
|
|
|
789
|
+
def TypeAdapter(*_args: Any, **_kwargs: Any) -> Any:
|
|
790
|
+
raise RuntimeError("attempted to use TypeAdapter in pydantic v1")
|
|
791
|
+
|
|
783
792
|
|
|
784
793
|
class FinalRequestOptionsInput(TypedDict, total=False):
|
|
785
794
|
method: Required[str]
|
anthropic/_qs.py
CHANGED
|
@@ -4,7 +4,7 @@ from typing import Any, List, Tuple, Union, Mapping, TypeVar
|
|
|
4
4
|
from urllib.parse import parse_qs, urlencode
|
|
5
5
|
from typing_extensions import Literal, get_args
|
|
6
6
|
|
|
7
|
-
from ._types import
|
|
7
|
+
from ._types import NotGiven, not_given
|
|
8
8
|
from ._utils import flatten
|
|
9
9
|
|
|
10
10
|
_T = TypeVar("_T")
|
|
@@ -41,8 +41,8 @@ class Querystring:
|
|
|
41
41
|
self,
|
|
42
42
|
params: Params,
|
|
43
43
|
*,
|
|
44
|
-
array_format:
|
|
45
|
-
nested_format:
|
|
44
|
+
array_format: ArrayFormat | NotGiven = not_given,
|
|
45
|
+
nested_format: NestedFormat | NotGiven = not_given,
|
|
46
46
|
) -> str:
|
|
47
47
|
return urlencode(
|
|
48
48
|
self.stringify_items(
|
|
@@ -56,8 +56,8 @@ class Querystring:
|
|
|
56
56
|
self,
|
|
57
57
|
params: Params,
|
|
58
58
|
*,
|
|
59
|
-
array_format:
|
|
60
|
-
nested_format:
|
|
59
|
+
array_format: ArrayFormat | NotGiven = not_given,
|
|
60
|
+
nested_format: NestedFormat | NotGiven = not_given,
|
|
61
61
|
) -> list[tuple[str, str]]:
|
|
62
62
|
opts = Options(
|
|
63
63
|
qs=self,
|
|
@@ -143,8 +143,8 @@ class Options:
|
|
|
143
143
|
self,
|
|
144
144
|
qs: Querystring = _qs,
|
|
145
145
|
*,
|
|
146
|
-
array_format:
|
|
147
|
-
nested_format:
|
|
146
|
+
array_format: ArrayFormat | NotGiven = not_given,
|
|
147
|
+
nested_format: NestedFormat | NotGiven = not_given,
|
|
148
148
|
) -> None:
|
|
149
149
|
self.array_format = qs.array_format if isinstance(array_format, NotGiven) else array_format
|
|
150
150
|
self.nested_format = qs.nested_format if isinstance(nested_format, NotGiven) else nested_format
|
anthropic/_types.py
CHANGED
|
@@ -118,18 +118,21 @@ class RequestOptions(TypedDict, total=False):
|
|
|
118
118
|
# Sentinel class used until PEP 0661 is accepted
|
|
119
119
|
class NotGiven:
|
|
120
120
|
"""
|
|
121
|
-
|
|
122
|
-
|
|
121
|
+
For parameters with a meaningful None value, we need to distinguish between
|
|
122
|
+
the user explicitly passing None, and the user not passing the parameter at
|
|
123
|
+
all.
|
|
124
|
+
|
|
125
|
+
User code shouldn't need to use not_given directly.
|
|
123
126
|
|
|
124
127
|
For example:
|
|
125
128
|
|
|
126
129
|
```py
|
|
127
|
-
def
|
|
130
|
+
def create(timeout: Timeout | None | NotGiven = not_given): ...
|
|
128
131
|
|
|
129
132
|
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
+
create(timeout=1) # 1s timeout
|
|
134
|
+
create(timeout=None) # No timeout
|
|
135
|
+
create() # Default timeout behavior
|
|
133
136
|
```
|
|
134
137
|
"""
|
|
135
138
|
|
|
@@ -141,13 +144,14 @@ class NotGiven:
|
|
|
141
144
|
return "NOT_GIVEN"
|
|
142
145
|
|
|
143
146
|
|
|
144
|
-
|
|
147
|
+
not_given = NotGiven()
|
|
148
|
+
# for backwards compatibility:
|
|
145
149
|
NOT_GIVEN = NotGiven()
|
|
146
150
|
|
|
147
151
|
|
|
148
152
|
class Omit:
|
|
149
|
-
"""
|
|
150
|
-
|
|
153
|
+
"""
|
|
154
|
+
To explicitly omit something from being sent in a request, use `omit`.
|
|
151
155
|
|
|
152
156
|
```py
|
|
153
157
|
# as the default `Content-Type` header is `application/json` that will be sent
|
|
@@ -157,8 +161,8 @@ class Omit:
|
|
|
157
161
|
# to look something like: 'multipart/form-data; boundary=0d8382fcf5f8c3be01ca2e11002d2983'
|
|
158
162
|
client.post(..., headers={"Content-Type": "multipart/form-data"})
|
|
159
163
|
|
|
160
|
-
# instead you can remove the default `application/json` header by passing
|
|
161
|
-
client.post(..., headers={"Content-Type":
|
|
164
|
+
# instead you can remove the default `application/json` header by passing omit
|
|
165
|
+
client.post(..., headers={"Content-Type": omit})
|
|
162
166
|
```
|
|
163
167
|
"""
|
|
164
168
|
|
|
@@ -166,6 +170,9 @@ class Omit:
|
|
|
166
170
|
return False
|
|
167
171
|
|
|
168
172
|
|
|
173
|
+
omit = Omit()
|
|
174
|
+
|
|
175
|
+
|
|
169
176
|
@runtime_checkable
|
|
170
177
|
class ModelBuilderProtocol(Protocol):
|
|
171
178
|
@classmethod
|
anthropic/_utils/_transform.py
CHANGED
|
@@ -268,7 +268,7 @@ def _transform_typeddict(
|
|
|
268
268
|
annotations = get_type_hints(expected_type, include_extras=True)
|
|
269
269
|
for key, value in data.items():
|
|
270
270
|
if not is_given(value):
|
|
271
|
-
# we don't need to include
|
|
271
|
+
# we don't need to include omitted values here as they'll
|
|
272
272
|
# be stripped out before the request is sent anyway
|
|
273
273
|
continue
|
|
274
274
|
|
|
@@ -434,7 +434,7 @@ async def _async_transform_typeddict(
|
|
|
434
434
|
annotations = get_type_hints(expected_type, include_extras=True)
|
|
435
435
|
for key, value in data.items():
|
|
436
436
|
if not is_given(value):
|
|
437
|
-
# we don't need to include
|
|
437
|
+
# we don't need to include omitted values here as they'll
|
|
438
438
|
# be stripped out before the request is sent anyway
|
|
439
439
|
continue
|
|
440
440
|
|
anthropic/_utils/_utils.py
CHANGED
|
@@ -21,7 +21,7 @@ from typing_extensions import TypeGuard
|
|
|
21
21
|
|
|
22
22
|
import sniffio
|
|
23
23
|
|
|
24
|
-
from .._types import NotGiven, FileTypes,
|
|
24
|
+
from .._types import Omit, NotGiven, FileTypes, HeadersLike
|
|
25
25
|
|
|
26
26
|
_T = TypeVar("_T")
|
|
27
27
|
_TupleT = TypeVar("_TupleT", bound=Tuple[object, ...])
|
|
@@ -63,7 +63,7 @@ def _extract_items(
|
|
|
63
63
|
try:
|
|
64
64
|
key = path[index]
|
|
65
65
|
except IndexError:
|
|
66
|
-
if
|
|
66
|
+
if not is_given(obj):
|
|
67
67
|
# no value was provided - we can safely ignore
|
|
68
68
|
return []
|
|
69
69
|
|
|
@@ -126,8 +126,8 @@ def _extract_items(
|
|
|
126
126
|
return []
|
|
127
127
|
|
|
128
128
|
|
|
129
|
-
def is_given(obj:
|
|
130
|
-
return not isinstance(obj, NotGiven)
|
|
129
|
+
def is_given(obj: _T | NotGiven | Omit) -> TypeGuard[_T]:
|
|
130
|
+
return not isinstance(obj, NotGiven) and not isinstance(obj, Omit)
|
|
131
131
|
|
|
132
132
|
|
|
133
133
|
# Type safe methods for narrowing types with TypeVars.
|
anthropic/_version.py
CHANGED
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
from ._beta_runner import BetaToolRunner, BetaAsyncToolRunner, BetaStreamingToolRunner, BetaAsyncStreamingToolRunner
|
|
2
|
+
from ._beta_functions import (
|
|
3
|
+
BetaFunctionTool,
|
|
4
|
+
BetaAsyncFunctionTool,
|
|
5
|
+
BetaFunctionToolResultType,
|
|
6
|
+
beta_tool,
|
|
7
|
+
beta_async_tool,
|
|
8
|
+
)
|
|
9
|
+
|
|
10
|
+
__all__ = [
|
|
11
|
+
"beta_tool",
|
|
12
|
+
"beta_async_tool",
|
|
13
|
+
"BetaFunctionTool",
|
|
14
|
+
"BetaAsyncFunctionTool",
|
|
15
|
+
"BetaToolRunner",
|
|
16
|
+
"BetaAsyncStreamingToolRunner",
|
|
17
|
+
"BetaStreamingToolRunner",
|
|
18
|
+
"BetaAsyncToolRunner",
|
|
19
|
+
"BetaFunctionToolResultType",
|
|
20
|
+
]
|