Skip to content

Commit d79ebd2

Browse files
feat: regenerate proto
1 parent 19095c0 commit d79ebd2

File tree

92 files changed

+3824
-956
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

92 files changed

+3824
-956
lines changed

cloudapi

Submodule cloudapi updated 48 files

yandex/cloud/ai/assistants/v1/common_pb2.py

Lines changed: 28 additions & 9 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

yandex/cloud/ai/assistants/v1/common_pb2.pyi

Lines changed: 231 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ import collections.abc
88
import google.protobuf.descriptor
99
import google.protobuf.internal.containers
1010
import google.protobuf.message
11+
import google.protobuf.struct_pb2
1112
import google.protobuf.wrappers_pb2
1213
import typing
1314

@@ -19,21 +20,65 @@ class PromptTruncationOptions(google.protobuf.message.Message):
1920

2021
DESCRIPTOR: google.protobuf.descriptor.Descriptor
2122

23+
@typing.final
24+
class AutoStrategy(google.protobuf.message.Message):
25+
"""Auto truncation strategy.
26+
No specific parameters are required for this strategy.
27+
The system will handle truncation in a way that aims to preserve the most relevant context.
28+
"""
29+
30+
DESCRIPTOR: google.protobuf.descriptor.Descriptor
31+
32+
def __init__(
33+
self,
34+
) -> None: ...
35+
36+
@typing.final
37+
class LastMessagesStrategy(google.protobuf.message.Message):
38+
"""Truncates the prompt by retaining only the last `num_messages` messages in the thread."""
39+
40+
DESCRIPTOR: google.protobuf.descriptor.Descriptor
41+
42+
NUM_MESSAGES_FIELD_NUMBER: builtins.int
43+
num_messages: builtins.int
44+
"""The number of most recent messages to retain in the prompt.
45+
If these messages exceed `max_prompt_tokens`, older messages will be further truncated to fit the limit.
46+
"""
47+
def __init__(
48+
self,
49+
*,
50+
num_messages: builtins.int = ...,
51+
) -> None: ...
52+
def ClearField(self, field_name: typing.Literal["num_messages", b"num_messages"]) -> None: ...
53+
2254
MAX_PROMPT_TOKENS_FIELD_NUMBER: builtins.int
55+
AUTO_STRATEGY_FIELD_NUMBER: builtins.int
56+
LAST_MESSAGES_STRATEGY_FIELD_NUMBER: builtins.int
2357
@property
2458
def max_prompt_tokens(self) -> google.protobuf.wrappers_pb2.Int64Value:
2559
"""The maximum number of tokens allowed in the prompt.
2660
If the prompt exceeds this limit, the thread messages will be truncated.
2761
Default max_prompt_tokens: 7000
2862
"""
2963

64+
@property
65+
def auto_strategy(self) -> global___PromptTruncationOptions.AutoStrategy: ...
66+
@property
67+
def last_messages_strategy(self) -> global___PromptTruncationOptions.LastMessagesStrategy:
68+
"""Retains only the last `num_messages` messages in the thread.
69+
If these messages exceed `max_prompt_tokens`, older messages will be further truncated to fit the limit.
70+
"""
71+
3072
def __init__(
3173
self,
3274
*,
3375
max_prompt_tokens: google.protobuf.wrappers_pb2.Int64Value | None = ...,
76+
auto_strategy: global___PromptTruncationOptions.AutoStrategy | None = ...,
77+
last_messages_strategy: global___PromptTruncationOptions.LastMessagesStrategy | None = ...,
3478
) -> None: ...
35-
def HasField(self, field_name: typing.Literal["max_prompt_tokens", b"max_prompt_tokens"]) -> builtins.bool: ...
36-
def ClearField(self, field_name: typing.Literal["max_prompt_tokens", b"max_prompt_tokens"]) -> None: ...
79+
def HasField(self, field_name: typing.Literal["TruncationStrategy", b"TruncationStrategy", "auto_strategy", b"auto_strategy", "last_messages_strategy", b"last_messages_strategy", "max_prompt_tokens", b"max_prompt_tokens"]) -> builtins.bool: ...
80+
def ClearField(self, field_name: typing.Literal["TruncationStrategy", b"TruncationStrategy", "auto_strategy", b"auto_strategy", "last_messages_strategy", b"last_messages_strategy", "max_prompt_tokens", b"max_prompt_tokens"]) -> None: ...
81+
def WhichOneof(self, oneof_group: typing.Literal["TruncationStrategy", b"TruncationStrategy"]) -> typing.Literal["auto_strategy", "last_messages_strategy"] | None: ...
3782

3883
global___PromptTruncationOptions = PromptTruncationOptions
3984

@@ -69,6 +114,118 @@ class CompletionOptions(google.protobuf.message.Message):
69114

70115
global___CompletionOptions = CompletionOptions
71116

117+
@typing.final
118+
class Tool(google.protobuf.message.Message):
119+
"""Represents a general tool that can be one of several types."""
120+
121+
DESCRIPTOR: google.protobuf.descriptor.Descriptor
122+
123+
SEARCH_INDEX_FIELD_NUMBER: builtins.int
124+
FUNCTION_FIELD_NUMBER: builtins.int
125+
@property
126+
def search_index(self) -> global___SearchIndexTool:
127+
"""SearchIndexTool tool that performs search across specified indexes."""
128+
129+
@property
130+
def function(self) -> global___FunctionTool:
131+
"""Function tool that can be invoked by the assistant."""
132+
133+
def __init__(
134+
self,
135+
*,
136+
search_index: global___SearchIndexTool | None = ...,
137+
function: global___FunctionTool | None = ...,
138+
) -> None: ...
139+
def HasField(self, field_name: typing.Literal["ToolType", b"ToolType", "function", b"function", "search_index", b"search_index"]) -> builtins.bool: ...
140+
def ClearField(self, field_name: typing.Literal["ToolType", b"ToolType", "function", b"function", "search_index", b"search_index"]) -> None: ...
141+
def WhichOneof(self, oneof_group: typing.Literal["ToolType", b"ToolType"]) -> typing.Literal["search_index", "function"] | None: ...
142+
143+
global___Tool = Tool
144+
145+
@typing.final
146+
class ToolCall(google.protobuf.message.Message):
147+
"""Represents a call to a tool."""
148+
149+
DESCRIPTOR: google.protobuf.descriptor.Descriptor
150+
151+
FUNCTION_CALL_FIELD_NUMBER: builtins.int
152+
@property
153+
def function_call(self) -> global___FunctionCall:
154+
"""Represents a call to a function."""
155+
156+
def __init__(
157+
self,
158+
*,
159+
function_call: global___FunctionCall | None = ...,
160+
) -> None: ...
161+
def HasField(self, field_name: typing.Literal["ToolCallType", b"ToolCallType", "function_call", b"function_call"]) -> builtins.bool: ...
162+
def ClearField(self, field_name: typing.Literal["ToolCallType", b"ToolCallType", "function_call", b"function_call"]) -> None: ...
163+
def WhichOneof(self, oneof_group: typing.Literal["ToolCallType", b"ToolCallType"]) -> typing.Literal["function_call"] | None: ...
164+
165+
global___ToolCall = ToolCall
166+
167+
@typing.final
168+
class ToolCallList(google.protobuf.message.Message):
169+
"""Represents a list of tool calls."""
170+
171+
DESCRIPTOR: google.protobuf.descriptor.Descriptor
172+
173+
TOOL_CALLS_FIELD_NUMBER: builtins.int
174+
@property
175+
def tool_calls(self) -> google.protobuf.internal.containers.RepeatedCompositeFieldContainer[global___ToolCall]:
176+
"""A list of tool calls to be executed."""
177+
178+
def __init__(
179+
self,
180+
*,
181+
tool_calls: collections.abc.Iterable[global___ToolCall] | None = ...,
182+
) -> None: ...
183+
def ClearField(self, field_name: typing.Literal["tool_calls", b"tool_calls"]) -> None: ...
184+
185+
global___ToolCallList = ToolCallList
186+
187+
@typing.final
188+
class ToolResult(google.protobuf.message.Message):
189+
"""Represents the result of a tool call."""
190+
191+
DESCRIPTOR: google.protobuf.descriptor.Descriptor
192+
193+
FUNCTION_RESULT_FIELD_NUMBER: builtins.int
194+
@property
195+
def function_result(self) -> global___FunctionResult:
196+
"""Represents the result of a function call."""
197+
198+
def __init__(
199+
self,
200+
*,
201+
function_result: global___FunctionResult | None = ...,
202+
) -> None: ...
203+
def HasField(self, field_name: typing.Literal["ToolResultType", b"ToolResultType", "function_result", b"function_result"]) -> builtins.bool: ...
204+
def ClearField(self, field_name: typing.Literal["ToolResultType", b"ToolResultType", "function_result", b"function_result"]) -> None: ...
205+
def WhichOneof(self, oneof_group: typing.Literal["ToolResultType", b"ToolResultType"]) -> typing.Literal["function_result"] | None: ...
206+
207+
global___ToolResult = ToolResult
208+
209+
@typing.final
210+
class ToolResultList(google.protobuf.message.Message):
211+
"""Represents a list of tool results."""
212+
213+
DESCRIPTOR: google.protobuf.descriptor.Descriptor
214+
215+
TOOL_RESULTS_FIELD_NUMBER: builtins.int
216+
@property
217+
def tool_results(self) -> google.protobuf.internal.containers.RepeatedCompositeFieldContainer[global___ToolResult]:
218+
"""A list of tool results."""
219+
220+
def __init__(
221+
self,
222+
*,
223+
tool_results: collections.abc.Iterable[global___ToolResult] | None = ...,
224+
) -> None: ...
225+
def ClearField(self, field_name: typing.Literal["tool_results", b"tool_results"]) -> None: ...
226+
227+
global___ToolResultList = ToolResultList
228+
72229
@typing.final
73230
class SearchIndexTool(google.protobuf.message.Message):
74231
"""Configures a tool that enables Retrieval-Augmented Generation (RAG) by allowing the assistant to search across a specified search index."""
@@ -100,23 +257,85 @@ class SearchIndexTool(google.protobuf.message.Message):
100257
global___SearchIndexTool = SearchIndexTool
101258

102259
@typing.final
103-
class Tool(google.protobuf.message.Message):
104-
"""Represents a general tool that can be one of several types."""
260+
class FunctionTool(google.protobuf.message.Message):
261+
"""Represents a function tool that can be invoked by the assistant."""
105262

106263
DESCRIPTOR: google.protobuf.descriptor.Descriptor
107264

108-
SEARCH_INDEX_FIELD_NUMBER: builtins.int
265+
NAME_FIELD_NUMBER: builtins.int
266+
DESCRIPTION_FIELD_NUMBER: builtins.int
267+
PARAMETERS_FIELD_NUMBER: builtins.int
268+
name: builtins.str
269+
"""The name of the function."""
270+
description: builtins.str
271+
"""A description of the function's purpose or behavior."""
109272
@property
110-
def search_index(self) -> global___SearchIndexTool:
111-
"""SearchIndexTool tool that performs search across specified indexes."""
273+
def parameters(self) -> google.protobuf.struct_pb2.Struct:
274+
"""A JSON Schema that defines the expected parameters for the function.
275+
The schema should describe the required fields, their types, and any constraints or default values.
276+
"""
112277

113278
def __init__(
114279
self,
115280
*,
116-
search_index: global___SearchIndexTool | None = ...,
281+
name: builtins.str = ...,
282+
description: builtins.str = ...,
283+
parameters: google.protobuf.struct_pb2.Struct | None = ...,
117284
) -> None: ...
118-
def HasField(self, field_name: typing.Literal["ToolType", b"ToolType", "search_index", b"search_index"]) -> builtins.bool: ...
119-
def ClearField(self, field_name: typing.Literal["ToolType", b"ToolType", "search_index", b"search_index"]) -> None: ...
120-
def WhichOneof(self, oneof_group: typing.Literal["ToolType", b"ToolType"]) -> typing.Literal["search_index"] | None: ...
285+
def HasField(self, field_name: typing.Literal["parameters", b"parameters"]) -> builtins.bool: ...
286+
def ClearField(self, field_name: typing.Literal["description", b"description", "name", b"name", "parameters", b"parameters"]) -> None: ...
121287

122-
global___Tool = Tool
288+
global___FunctionTool = FunctionTool
289+
290+
@typing.final
291+
class FunctionCall(google.protobuf.message.Message):
292+
"""Represents the invocation of a function with specific arguments."""
293+
294+
DESCRIPTOR: google.protobuf.descriptor.Descriptor
295+
296+
NAME_FIELD_NUMBER: builtins.int
297+
ARGUMENTS_FIELD_NUMBER: builtins.int
298+
name: builtins.str
299+
"""The name of the function being called."""
300+
@property
301+
def arguments(self) -> google.protobuf.struct_pb2.Struct:
302+
"""The structured arguments passed to the function.
303+
These arguments must adhere to the JSON Schema defined in the corresponding function's parameters.
304+
"""
305+
306+
def __init__(
307+
self,
308+
*,
309+
name: builtins.str = ...,
310+
arguments: google.protobuf.struct_pb2.Struct | None = ...,
311+
) -> None: ...
312+
def HasField(self, field_name: typing.Literal["arguments", b"arguments"]) -> builtins.bool: ...
313+
def ClearField(self, field_name: typing.Literal["arguments", b"arguments", "name", b"name"]) -> None: ...
314+
315+
global___FunctionCall = FunctionCall
316+
317+
@typing.final
318+
class FunctionResult(google.protobuf.message.Message):
319+
"""Represents the result of a function call."""
320+
321+
DESCRIPTOR: google.protobuf.descriptor.Descriptor
322+
323+
NAME_FIELD_NUMBER: builtins.int
324+
CONTENT_FIELD_NUMBER: builtins.int
325+
name: builtins.str
326+
"""The name of the function that was executed."""
327+
content: builtins.str
328+
"""The result of the function call, represented as a string.
329+
This field can be used to store the output of the function.
330+
"""
331+
def __init__(
332+
self,
333+
*,
334+
name: builtins.str = ...,
335+
content: builtins.str = ...,
336+
) -> None: ...
337+
def HasField(self, field_name: typing.Literal["ContentType", b"ContentType", "content", b"content"]) -> builtins.bool: ...
338+
def ClearField(self, field_name: typing.Literal["ContentType", b"ContentType", "content", b"content", "name", b"name"]) -> None: ...
339+
def WhichOneof(self, oneof_group: typing.Literal["ContentType", b"ContentType"]) -> typing.Literal["content"] | None: ...
340+
341+
global___FunctionResult = FunctionResult

0 commit comments

Comments
 (0)