Skip to content

Commit 299551e

Browse files
committed
update
1 parent e48a217 commit 299551e

File tree

3 files changed

+9
-26
lines changed

3 files changed

+9
-26
lines changed

src/yandex_cloud_ml_sdk/_tools/domain.py

Lines changed: 3 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66

77
from yandex_cloud_ml_sdk._search_indexes.search_index import BaseSearchIndex
88
from yandex_cloud_ml_sdk._types.domain import BaseDomain
9+
from yandex_cloud_ml_sdk._utils.doc import doc_from
910
from yandex_cloud_ml_sdk._types.misc import UNDEFINED, UndefinedOr, get_defined_value, is_defined
1011
from yandex_cloud_ml_sdk._utils.coerce import ResourceType, coerce_resource_ids
1112

@@ -85,19 +86,10 @@ def search_index(
8586
call_strategy=call_strategy_,
8687
)
8788

88-
89+
@doc_from(BaseTools)
8990
class AsyncTools(BaseTools[AsyncFunctionTools]):
90-
"""
91-
Asynchronous implementation of tools functionality.
92-
93-
Provides async versions of all tools methods.
94-
"""
9591
_functions_impl = AsyncFunctionTools
9692

93+
@doc_from(BaseTools)
9794
class Tools(BaseTools[FunctionTools]):
98-
"""
99-
Synchronous implementation of tools functionality.
100-
101-
Provides sync versions of all tools methods.
102-
"""
10395
_functions_impl = FunctionTools

src/yandex_cloud_ml_sdk/_tools/function.py

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
from typing import Optional, TypeVar, cast
44

55
from yandex_cloud_ml_sdk._types.domain import BaseDomain
6+
from yandex_cloud_ml_sdk._utils.doc import doc_from
67
from yandex_cloud_ml_sdk._types.misc import UNDEFINED, UndefinedOr, get_defined_value
78
# JsonObject needed for weird sphinx reasons
89
# pylint: disable=unused-import
@@ -59,17 +60,12 @@ def __call__(
5960
)
6061

6162

63+
@doc_from(BaseFunctionTools)
6264
class AsyncFunctionTools(BaseFunctionTools[AsyncToolCall]):
63-
"""
64-
Asynchronous version of function tools.
65-
"""
6665
_call_impl = AsyncToolCall
6766

68-
67+
@doc_from(BaseFunctionTools)
6968
class FunctionTools(BaseFunctionTools[ToolCall]):
70-
"""
71-
Synchronous version of function tools.
72-
"""
7369
_call_impl = ToolCall
7470

7571

src/yandex_cloud_ml_sdk/_tools/tool_call.py

Lines changed: 3 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@
1010

1111
from yandex_cloud_ml_sdk._types.json import JsonBased, JsonObject
1212
from yandex_cloud_ml_sdk._types.proto import ProtoBased, SDKType
13+
from yandex_cloud_ml_sdk._utils.doc import doc_from
1314

1415
from .function_call import AsyncFunctionCall, FunctionCall, FunctionCallTypeT
1516

@@ -79,18 +80,12 @@ def _from_json(cls, *, data: JsonObject, sdk: SDKType) -> Self:
7980
_json_origin=data,
8081
)
8182

82-
83+
@doc_from(BaseToolCall)
8384
class AsyncToolCall(BaseToolCall):
84-
"""
85-
Asynchronous version of tool call representation.
86-
"""
8785
_function_call_impl = AsyncFunctionCall
8886

89-
87+
@doc_from(BaseToolCall)
9088
class ToolCall(BaseToolCall):
91-
"""
92-
Synchronous version of tool call representation.
93-
"""
9489
_function_call_impl = FunctionCall
9590

9691

0 commit comments

Comments
 (0)