Skip to content

Commit 37f4c43

Browse files
authored
Add docstrings for _models/completions/config.py - v1
1 parent 7cfe2f5 commit 37f4c43

File tree

1 file changed

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

1 file changed

+22
-1
lines changed

src/yandex_cloud_ml_sdk/_models/completions/config.py

Lines changed: 22 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,21 +19,42 @@
1919

2020

2121
class ReasoningMode(ProtoEnumBase, Enum):
22+
"""Enumeration for reasoning modes.
23+
24+
This class defines the various modes of reasoning that can be used
25+
in the model's configurations.
26+
"""
27+
#: indicates that the reasoning mode is unspecified
2228
REASONING_MODE_UNSPECIFIED = _m.REASONING_MODE_UNSPECIFIED
29+
#: indicates that reasoning is disabled
2330
DISABLED = _m.DISABLED
31+
#: indicates that reasoning is enabled but hidden
2432
ENABLED_HIDDEN = _m.ENABLED_HIDDEN
2533

26-
34+
#: type alias for reasoning mode representation
2735
ReasoningModeType = Union[int, str, ReasoningMode]
36+
#: type alias for completion tools
2837
CompletionTool: TypeAlias = FunctionTool
2938

3039

3140
@dataclass(frozen=True)
3241
class GPTModelConfig(BaseModelConfig):
42+
"""Configuration for the GPT model.
43+
44+
It holds the configuration settings for the GPT model,
45+
including parameters for generation and tool usage.
46+
"""
47+
#: a sampling temperature to use - higher values mean more random results; should be a double number between 0 (inclusive) and 1 (inclusive)
3348
temperature: float | None = None
49+
#: a maximum number of tokens to generate in the response
3450
max_tokens: int | None = None
51+
#: the mode of reasoning to apply during generation, allowing the model to perform internal reasoning before responding
3552
reasoning_mode: ReasoningModeType | None = None
53+
#: a format of the response returned by the model. Could be a JsonSchema, a JSON string, or a pydantic model
3654
response_format: ResponseType | None = None
55+
#: tools to use for completion. Can be a sequence or a single tool
3756
tools: Sequence[CompletionTool] | CompletionTool | None = None
57+
#: whether to allow parallel calls to tools during completion; defaults to 'true'
3858
parallel_tool_calls: bool | None = None
59+
#: the strategy for choosing tools: depending on this parameter, the model can always call some tool, call the specific tool or don't call any tool.
3960
tool_choice: ToolChoiceType | None = None

0 commit comments

Comments
 (0)