Skip to content

Commit 7cfe2f5

Browse files
authored
Add docstrings for _models/completions/model.py - v4
1 parent 082e74b commit 7cfe2f5

File tree

1 file changed

+6
-1
lines changed
  • src/yandex_cloud_ml_sdk/_models/completions

1 file changed

+6
-1
lines changed

src/yandex_cloud_ml_sdk/_models/completions/model.py

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -115,6 +115,11 @@ def configure( # type: ignore[override]
115115
:param tools: tools to use for completion. Can be a sequence or a single tool.
116116
:param parallel_tool_calls: whether to allow parallel calls to tools during completion.
117117
Defaults to ``true``.
118+
:param tool_choice: the strategy for choosing tools.
119+
There are several ways to configure ``tool_choice`` for query processing:
120+
- no tools to call (tool_choice=``'none'``);
121+
- required to call any tool (tool_choice=``'required'``);
122+
- call a specific tool (tool_choice=``{'type': 'function', 'function': {'name': 'another_calculator'}}`` or directly passing a tool object).
118123
"""
119124
return super().configure(
120125
temperature=temperature,
@@ -319,7 +324,7 @@ async def run(
319324
Executes the model with the provided messages.
320325
321326
:param messages: the input messages to process. Could be a string, a dictionary, or a result object.
322-
Read more about other possible message types in the `documentation <https://yandex.cloud/docs/foundation-models/text-generation/api-ref/TextGeneration/completion#yandex.cloud.ai.foundation_models.v1.Message>`_.
327+
Read more about other possible message types in the `documentation <https://yandex.cloud/docs/foundation-models/sdk/#usage>`_.
323328
:param timeout: the timeout, or the maximum time to wait for the request to complete in seconds.
324329
Defaults to 60 seconds.
325330
"""

0 commit comments

Comments
 (0)