yandexcloud 0.329.0__py3-none-any.whl → 0.331.0__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.
- yandex/cloud/ai/assistants/v1/common_pb2.py +28 -9
- yandex/cloud/ai/assistants/v1/common_pb2.pyi +231 -12
- yandex/cloud/ai/assistants/v1/runs/run_pb2.py +10 -10
- yandex/cloud/ai/assistants/v1/runs/run_pb2.pyi +20 -4
- yandex/cloud/ai/assistants/v1/runs/run_service_pb2.py +26 -22
- yandex/cloud/ai/assistants/v1/runs/run_service_pb2.pyi +50 -4
- yandex/cloud/ai/assistants/v1/runs/run_service_pb2_grpc.py +46 -0
- yandex/cloud/ai/assistants/v1/runs/run_service_pb2_grpc.pyi +29 -0
- yandex/cloud/ai/assistants/v1/searchindex/common_pb2.pyi +13 -0
- yandex/cloud/ai/assistants/v1/searchindex/search_index_pb2.py +7 -7
- yandex/cloud/ai/assistants/v1/searchindex/search_index_pb2.pyi +9 -2
- yandex/cloud/ai/assistants/v1/searchindex/search_index_service_pb2_grpc.py +3 -3
- yandex/cloud/ai/assistants/v1/searchindex/search_index_service_pb2_grpc.pyi +3 -3
- yandex/cloud/ai/assistants/v1/threads/thread_pb2.py +6 -5
- yandex/cloud/ai/assistants/v1/threads/thread_pb2.pyi +8 -1
- yandex/cloud/ai/assistants/v1/threads/thread_service_pb2.py +22 -21
- yandex/cloud/ai/assistants/v1/threads/thread_service_pb2.pyi +15 -2
- yandex/cloud/ai/dataset/v1/dataset_pb2.py +12 -8
- yandex/cloud/ai/dataset/v1/dataset_pb2.pyi +44 -1
- yandex/cloud/ai/dataset/v1/dataset_service_pb2.py +68 -40
- yandex/cloud/ai/dataset/v1/dataset_service_pb2.pyi +161 -1
- yandex/cloud/ai/dataset/v1/dataset_service_pb2_grpc.py +176 -1
- yandex/cloud/ai/dataset/v1/dataset_service_pb2_grpc.pyi +80 -3
- yandex/cloud/ai/files/v1/file_service_pb2.py +3 -3
- yandex/cloud/ai/foundation_models/v1/text_classification/text_classification_service_pb2.pyi +1 -1
- yandex/cloud/ai/foundation_models/v1/text_common_pb2.py +34 -28
- yandex/cloud/ai/foundation_models/v1/text_common_pb2.pyi +73 -3
- yandex/cloud/ai/translate/v2/translation_pb2.pyi +2 -2
- yandex/cloud/ai/translate/v2/translation_service_pb2.pyi +14 -13
- yandex/cloud/ai/tuning/v1/tuning_error_pb2.py +39 -0
- yandex/cloud/ai/tuning/v1/tuning_error_pb2.pyi +54 -0
- yandex/cloud/ai/tuning/v1/tuning_error_pb2_grpc.py +24 -0
- yandex/cloud/ai/tuning/v1/tuning_error_pb2_grpc.pyi +17 -0
- yandex/cloud/ai/tuning/v1/tuning_service_pb2.py +56 -51
- yandex/cloud/ai/tuning/v1/tuning_service_pb2.pyi +44 -4
- yandex/cloud/ai/tuning/v1/tuning_service_pb2_grpc.py +43 -0
- yandex/cloud/ai/tuning/v1/tuning_service_pb2_grpc.pyi +17 -0
- yandex/cloud/ai/tuning/v1/tuning_task_pb2.py +3 -3
- yandex/cloud/ai/tuning/v1/tuning_task_pb2.pyi +2 -0
- yandex/cloud/ai/tuning/v1/tuning_types_pb2.pyi +1 -0
- yandex/cloud/airflow/v1/cluster_pb2.py +28 -26
- yandex/cloud/airflow/v1/cluster_pb2.pyi +12 -2
- yandex/cloud/airflow/v1/cluster_service_pb2.py +26 -26
- yandex/cloud/airflow/v1/cluster_service_pb2.pyi +9 -1
- yandex/cloud/apploadbalancer/v1/load_balancer_pb2.pyi +1 -1
- yandex/cloud/audittrails/v1/trail_pb2.py +17 -15
- yandex/cloud/audittrails/v1/trail_pb2.pyi +25 -2
- yandex/cloud/backup/v1/policy_pb2.py +27 -27
- yandex/cloud/backup/v1/policy_pb2.pyi +8 -2
- yandex/cloud/billing/v1/customer_service_pb2.pyi +2 -2
- yandex/cloud/compute/v1/disk_placement_group_service_pb2.py +28 -28
- yandex/cloud/compute/v1/disk_service_pb2.py +36 -36
- yandex/cloud/compute/v1/filesystem_service_pb2.py +24 -24
- yandex/cloud/compute/v1/gpu_cluster_pb2.pyi +1 -1
- yandex/cloud/compute/v1/host_group_service_pb2.py +36 -36
- yandex/cloud/compute/v1/image_service_pb2.py +24 -24
- yandex/cloud/compute/v1/image_service_pb2.pyi +2 -1
- yandex/cloud/compute/v1/instance_service_pb2.py +130 -130
- yandex/cloud/compute/v1/snapshot_service_pb2.py +24 -24
- yandex/cloud/endpoint/api_endpoint_service_pb2.py +10 -6
- yandex/cloud/iam/v1/api_key_pb2.py +4 -2
- yandex/cloud/iam/v1/api_key_pb2.pyi +9 -1
- yandex/cloud/iam/v1/api_key_service_pb2.py +27 -23
- yandex/cloud/iam/v1/api_key_service_pb2.pyi +21 -3
- yandex/cloud/loadtesting/api/v1/agent/create_compute_instance_pb2.pyi +1 -1
- yandex/cloud/loadtesting/api/v1/agent_service_pb2.py +3 -3
- yandex/cloud/loadtesting/api/v1/config_service_pb2.py +2 -2
- yandex/cloud/loadtesting/api/v1/regression_dashboard_service_pb2.py +3 -3
- yandex/cloud/loadtesting/api/v1/report_service_pb2.py +2 -2
- yandex/cloud/loadtesting/api/v1/test/test_pb2.pyi +1 -1
- yandex/cloud/loadtesting/api/v1/test_service_pb2.py +2 -2
- yandex/cloud/lockbox/v1/payload_service_pb2.py +25 -3
- yandex/cloud/lockbox/v1/payload_service_pb2.pyi +82 -0
- yandex/cloud/lockbox/v1/payload_service_pb2_grpc.py +43 -0
- yandex/cloud/lockbox/v1/payload_service_pb2_grpc.pyi +17 -0
- yandex/cloud/mdb/greenplum/v1/config_pb2.py +24 -24
- yandex/cloud/mdb/greenplum/v1/config_pb2.pyi +20 -2
- yandex/cloud/mdb/greenplum/v1/resource_groups_pb2.py +51 -0
- yandex/cloud/mdb/greenplum/v1/resource_groups_pb2.pyi +62 -0
- yandex/cloud/mdb/greenplum/v1/resource_groups_pb2_grpc.py +24 -0
- yandex/cloud/mdb/greenplum/v1/resource_groups_pb2_grpc.pyi +17 -0
- yandex/cloud/mdb/greenplum/v1/resource_groups_service_pb2.py +99 -0
- yandex/cloud/mdb/greenplum/v1/resource_groups_service_pb2.pyi +187 -0
- yandex/cloud/mdb/greenplum/v1/resource_groups_service_pb2_grpc.py +276 -0
- yandex/cloud/mdb/greenplum/v1/resource_groups_service_pb2_grpc.pyi +126 -0
- yandex/cloud/mdb/mongodb/v1/cluster_pb2.py +6 -6
- yandex/cloud/mdb/mongodb/v1/cluster_pb2.pyi +5 -1
- yandex/cloud/mdb/mongodb/v1/cluster_service_pb2_grpc.py +0 -1
- yandex/cloud/mdb/mongodb/v1/cluster_service_pb2_grpc.pyi +3 -9
- yandex/cloud/mdb/mysql/v1/cluster_service_pb2.py +96 -96
- yandex/cloud/mdb/mysql/v1/cluster_service_pb2.pyi +8 -2
- yandex/cloud/mdb/opensearch/v1/cluster_service_pb2_grpc.py +0 -1
- yandex/cloud/mdb/opensearch/v1/cluster_service_pb2_grpc.pyi +3 -9
- yandex/cloud/mdb/postgresql/v1/cluster_service_pb2.py +98 -98
- yandex/cloud/mdb/postgresql/v1/cluster_service_pb2.pyi +8 -2
- yandex/cloud/mdb/redis/v1/cluster_pb2.py +18 -18
- yandex/cloud/mdb/redis/v1/cluster_pb2.pyi +8 -2
- yandex/cloud/mdb/redis/v1/cluster_service_pb2.py +4 -4
- yandex/cloud/mdb/redis/v1/cluster_service_pb2.pyi +8 -2
- yandex/cloud/mdb/redis/v1/user_pb2.py +47 -0
- yandex/cloud/mdb/redis/v1/user_pb2.pyi +131 -0
- yandex/cloud/mdb/redis/v1/user_pb2_grpc.py +24 -0
- yandex/cloud/mdb/redis/v1/user_pb2_grpc.pyi +17 -0
- yandex/cloud/mdb/redis/v1/user_service_pb2.py +93 -0
- yandex/cloud/mdb/redis/v1/user_service_pb2.pyi +250 -0
- yandex/cloud/mdb/redis/v1/user_service_pb2_grpc.py +281 -0
- yandex/cloud/mdb/redis/v1/user_service_pb2_grpc.pyi +141 -0
- yandex/cloud/monitoring/v3/widget_pb2.py +2 -2
- yandex/cloud/serverless/apigateway/v1/apigateway_service_pb2_grpc.py +1 -1
- yandex/cloud/serverless/apigateway/v1/apigateway_service_pb2_grpc.pyi +3 -3
- yandex/cloud/serverless/containers/v1/container_service_pb2_grpc.py +1 -1
- yandex/cloud/serverless/containers/v1/container_service_pb2_grpc.pyi +3 -3
- yandex/cloud/storage/v1/bucket_pb2.py +78 -76
- yandex/cloud/storage/v1/bucket_pb2.pyi +33 -3
- yandex/cloud/storage/v1/bucket_service_pb2.py +26 -26
- yandex/cloud/storage/v1/bucket_service_pb2.pyi +8 -2
- yandex/cloud/video/v1/channel_service_pb2.py +23 -23
- yandex/cloud/video/v1/episode_service_pb2.py +7 -7
- yandex/cloud/video/v1/playlist_service_pb2.py +29 -29
- yandex/cloud/video/v1/stream_line_service_pb2.py +43 -43
- yandex/cloud/video/v1/stream_service_pb2.py +21 -21
- yandex/cloud/video/v1/subtitle_service_pb2.py +23 -21
- yandex/cloud/video/v1/thumbnail_service_pb2.py +11 -11
- yandex/cloud/video/v1/video_service_pb2.py +67 -66
- yandex/cloud/video/v1/video_service_pb2.pyi +9 -2
- yandexcloud/__init__.py +1 -1
- yandexcloud/_auth_fabric.py +1 -2
- yandexcloud/_auth_plugin.py +1 -1
- yandexcloud/_helpers.py +0 -1
- yandexcloud/_wrappers/dataproc/__init__.py +1 -3
- yandexcloud/operations.py +1 -1
- {yandexcloud-0.329.0.dist-info → yandexcloud-0.331.0.dist-info}/AUTHORS +1 -1
- {yandexcloud-0.329.0.dist-info → yandexcloud-0.331.0.dist-info}/METADATA +3 -3
- {yandexcloud-0.329.0.dist-info → yandexcloud-0.331.0.dist-info}/RECORD +137 -117
- {yandexcloud-0.329.0.dist-info → yandexcloud-0.331.0.dist-info}/WHEEL +1 -1
- {yandexcloud-0.329.0.dist-info → yandexcloud-0.331.0.dist-info}/LICENSE +0 -0
- {yandexcloud-0.329.0.dist-info → yandexcloud-0.331.0.dist-info}/top_level.txt +0 -0
|
@@ -22,10 +22,11 @@ _runtime_version.ValidateProtobufRuntimeVersion(
|
|
|
22
22
|
_sym_db = _symbol_database.Default()
|
|
23
23
|
|
|
24
24
|
|
|
25
|
+
from google.protobuf import struct_pb2 as google_dot_protobuf_dot_struct__pb2
|
|
25
26
|
from google.protobuf import wrappers_pb2 as google_dot_protobuf_dot_wrappers__pb2
|
|
26
27
|
|
|
27
28
|
|
|
28
|
-
DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n*yandex/cloud/ai/assistants/v1/common.proto\x12\x1dyandex.cloud.ai.assistants.v1\x1a\x1egoogle/protobuf/wrappers.proto\"
|
|
29
|
+
DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n*yandex/cloud/ai/assistants/v1/common.proto\x12\x1dyandex.cloud.ai.assistants.v1\x1a\x1cgoogle/protobuf/struct.proto\x1a\x1egoogle/protobuf/wrappers.proto\"\xf2\x02\n\x17PromptTruncationOptions\x12\x36\n\x11max_prompt_tokens\x18\x01 \x01(\x0b\x32\x1b.google.protobuf.Int64Value\x12\\\n\rauto_strategy\x18\x02 \x01(\x0b\x32\x43.yandex.cloud.ai.assistants.v1.PromptTruncationOptions.AutoStrategyH\x00\x12m\n\x16last_messages_strategy\x18\x03 \x01(\x0b\x32K.yandex.cloud.ai.assistants.v1.PromptTruncationOptions.LastMessagesStrategyH\x00\x1a\x0e\n\x0c\x41utoStrategy\x1a,\n\x14LastMessagesStrategy\x12\x14\n\x0cnum_messages\x18\x01 \x01(\x03\x42\x14\n\x12TruncationStrategy\"w\n\x11\x43ompletionOptions\x12/\n\nmax_tokens\x18\x02 \x01(\x0b\x32\x1b.google.protobuf.Int64Value\x12\x31\n\x0btemperature\x18\x03 \x01(\x0b\x32\x1c.google.protobuf.DoubleValue\"\x9b\x01\n\x04Tool\x12\x46\n\x0csearch_index\x18\x01 \x01(\x0b\x32..yandex.cloud.ai.assistants.v1.SearchIndexToolH\x00\x12?\n\x08\x66unction\x18\x02 \x01(\x0b\x32+.yandex.cloud.ai.assistants.v1.FunctionToolH\x00\x42\n\n\x08ToolType\"`\n\x08ToolCall\x12\x44\n\rfunction_call\x18\x01 \x01(\x0b\x32+.yandex.cloud.ai.assistants.v1.FunctionCallH\x00\x42\x0e\n\x0cToolCallType\"K\n\x0cToolCallList\x12;\n\ntool_calls\x18\x01 \x03(\x0b\x32\'.yandex.cloud.ai.assistants.v1.ToolCall\"h\n\nToolResult\x12H\n\x0f\x66unction_result\x18\x01 \x01(\x0b\x32-.yandex.cloud.ai.assistants.v1.FunctionResultH\x00\x42\x10\n\x0eToolResultType\"Q\n\x0eToolResultList\x12?\n\x0ctool_results\x18\x01 \x03(\x0b\x32).yandex.cloud.ai.assistants.v1.ToolResult\"a\n\x0fSearchIndexTool\x12\x18\n\x10search_index_ids\x18\x01 \x03(\t\x12\x34\n\x0fmax_num_results\x18\x02 \x01(\x0b\x32\x1b.google.protobuf.Int64Value\"^\n\x0c\x46unctionTool\x12\x0c\n\x04name\x18\x01 \x01(\t\x12\x13\n\x0b\x64\x65scription\x18\x02 \x01(\t\x12+\n\nparameters\x18\x03 \x01(\x0b\x32\x17.google.protobuf.Struct\"H\n\x0c\x46unctionCall\x12\x0c\n\x04name\x18\x01 \x01(\t\x12*\n\targuments\x18\x02 \x01(\x0b\x32\x17.google.protobuf.Struct\"@\n\x0e\x46unctionResult\x12\x0c\n\x04name\x18\x01 \x01(\t\x12\x11\n\x07\x63ontent\x18\x02 \x01(\tH\x00\x42\r\n\x0b\x43ontentTypeBq\n!yandex.cloud.api.ai.assistants.v1ZLgithub.com/yandex-cloud/go-genproto/yandex/cloud/ai/assistants/v1;assistantsb\x06proto3')
|
|
29
30
|
|
|
30
31
|
_globals = globals()
|
|
31
32
|
_builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, _globals)
|
|
@@ -33,12 +34,30 @@ _builder.BuildTopDescriptorsAndMessages(DESCRIPTOR, 'yandex.cloud.ai.assistants.
|
|
|
33
34
|
if not _descriptor._USE_C_DESCRIPTORS:
|
|
34
35
|
_globals['DESCRIPTOR']._loaded_options = None
|
|
35
36
|
_globals['DESCRIPTOR']._serialized_options = b'\n!yandex.cloud.api.ai.assistants.v1ZLgithub.com/yandex-cloud/go-genproto/yandex/cloud/ai/assistants/v1;assistants'
|
|
36
|
-
_globals['_PROMPTTRUNCATIONOPTIONS']._serialized_start=
|
|
37
|
-
_globals['_PROMPTTRUNCATIONOPTIONS']._serialized_end=
|
|
38
|
-
_globals['
|
|
39
|
-
_globals['
|
|
40
|
-
_globals['
|
|
41
|
-
_globals['
|
|
42
|
-
_globals['
|
|
43
|
-
_globals['
|
|
37
|
+
_globals['_PROMPTTRUNCATIONOPTIONS']._serialized_start=140
|
|
38
|
+
_globals['_PROMPTTRUNCATIONOPTIONS']._serialized_end=510
|
|
39
|
+
_globals['_PROMPTTRUNCATIONOPTIONS_AUTOSTRATEGY']._serialized_start=428
|
|
40
|
+
_globals['_PROMPTTRUNCATIONOPTIONS_AUTOSTRATEGY']._serialized_end=442
|
|
41
|
+
_globals['_PROMPTTRUNCATIONOPTIONS_LASTMESSAGESSTRATEGY']._serialized_start=444
|
|
42
|
+
_globals['_PROMPTTRUNCATIONOPTIONS_LASTMESSAGESSTRATEGY']._serialized_end=488
|
|
43
|
+
_globals['_COMPLETIONOPTIONS']._serialized_start=512
|
|
44
|
+
_globals['_COMPLETIONOPTIONS']._serialized_end=631
|
|
45
|
+
_globals['_TOOL']._serialized_start=634
|
|
46
|
+
_globals['_TOOL']._serialized_end=789
|
|
47
|
+
_globals['_TOOLCALL']._serialized_start=791
|
|
48
|
+
_globals['_TOOLCALL']._serialized_end=887
|
|
49
|
+
_globals['_TOOLCALLLIST']._serialized_start=889
|
|
50
|
+
_globals['_TOOLCALLLIST']._serialized_end=964
|
|
51
|
+
_globals['_TOOLRESULT']._serialized_start=966
|
|
52
|
+
_globals['_TOOLRESULT']._serialized_end=1070
|
|
53
|
+
_globals['_TOOLRESULTLIST']._serialized_start=1072
|
|
54
|
+
_globals['_TOOLRESULTLIST']._serialized_end=1153
|
|
55
|
+
_globals['_SEARCHINDEXTOOL']._serialized_start=1155
|
|
56
|
+
_globals['_SEARCHINDEXTOOL']._serialized_end=1252
|
|
57
|
+
_globals['_FUNCTIONTOOL']._serialized_start=1254
|
|
58
|
+
_globals['_FUNCTIONTOOL']._serialized_end=1348
|
|
59
|
+
_globals['_FUNCTIONCALL']._serialized_start=1350
|
|
60
|
+
_globals['_FUNCTIONCALL']._serialized_end=1422
|
|
61
|
+
_globals['_FUNCTIONRESULT']._serialized_start=1424
|
|
62
|
+
_globals['_FUNCTIONRESULT']._serialized_end=1488
|
|
44
63
|
# @@protoc_insertion_point(module_scope)
|
|
@@ -8,6 +8,7 @@ import collections.abc
|
|
|
8
8
|
import google.protobuf.descriptor
|
|
9
9
|
import google.protobuf.internal.containers
|
|
10
10
|
import google.protobuf.message
|
|
11
|
+
import google.protobuf.struct_pb2
|
|
11
12
|
import google.protobuf.wrappers_pb2
|
|
12
13
|
import typing
|
|
13
14
|
|
|
@@ -19,7 +20,40 @@ class PromptTruncationOptions(google.protobuf.message.Message):
|
|
|
19
20
|
|
|
20
21
|
DESCRIPTOR: google.protobuf.descriptor.Descriptor
|
|
21
22
|
|
|
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
|
+
|
|
22
54
|
MAX_PROMPT_TOKENS_FIELD_NUMBER: builtins.int
|
|
55
|
+
AUTO_STRATEGY_FIELD_NUMBER: builtins.int
|
|
56
|
+
LAST_MESSAGES_STRATEGY_FIELD_NUMBER: builtins.int
|
|
23
57
|
@property
|
|
24
58
|
def max_prompt_tokens(self) -> google.protobuf.wrappers_pb2.Int64Value:
|
|
25
59
|
"""The maximum number of tokens allowed in the prompt.
|
|
@@ -27,13 +61,24 @@ class PromptTruncationOptions(google.protobuf.message.Message):
|
|
|
27
61
|
Default max_prompt_tokens: 7000
|
|
28
62
|
"""
|
|
29
63
|
|
|
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
|
+
|
|
30
72
|
def __init__(
|
|
31
73
|
self,
|
|
32
74
|
*,
|
|
33
75
|
max_prompt_tokens: google.protobuf.wrappers_pb2.Int64Value | None = ...,
|
|
76
|
+
auto_strategy: global___PromptTruncationOptions.AutoStrategy | None = ...,
|
|
77
|
+
last_messages_strategy: global___PromptTruncationOptions.LastMessagesStrategy | None = ...,
|
|
34
78
|
) -> 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: ...
|
|
37
82
|
|
|
38
83
|
global___PromptTruncationOptions = PromptTruncationOptions
|
|
39
84
|
|
|
@@ -69,6 +114,118 @@ class CompletionOptions(google.protobuf.message.Message):
|
|
|
69
114
|
|
|
70
115
|
global___CompletionOptions = CompletionOptions
|
|
71
116
|
|
|
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
|
+
|
|
72
229
|
@typing.final
|
|
73
230
|
class SearchIndexTool(google.protobuf.message.Message):
|
|
74
231
|
"""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):
|
|
|
100
257
|
global___SearchIndexTool = SearchIndexTool
|
|
101
258
|
|
|
102
259
|
@typing.final
|
|
103
|
-
class
|
|
104
|
-
"""Represents a
|
|
260
|
+
class FunctionTool(google.protobuf.message.Message):
|
|
261
|
+
"""Represents a function tool that can be invoked by the assistant."""
|
|
105
262
|
|
|
106
263
|
DESCRIPTOR: google.protobuf.descriptor.Descriptor
|
|
107
264
|
|
|
108
|
-
|
|
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."""
|
|
109
272
|
@property
|
|
110
|
-
def
|
|
111
|
-
"""
|
|
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
|
+
"""
|
|
112
277
|
|
|
113
278
|
def __init__(
|
|
114
279
|
self,
|
|
115
280
|
*,
|
|
116
|
-
|
|
281
|
+
name: builtins.str = ...,
|
|
282
|
+
description: builtins.str = ...,
|
|
283
|
+
parameters: google.protobuf.struct_pb2.Struct | None = ...,
|
|
117
284
|
) -> None: ...
|
|
118
|
-
def HasField(self, field_name: typing.Literal["
|
|
119
|
-
def ClearField(self, field_name: typing.Literal["
|
|
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: ...
|
|
121
287
|
|
|
122
|
-
|
|
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
|
|
@@ -28,7 +28,7 @@ from yandex.cloud.ai.assistants.v1.threads import message_pb2 as yandex_dot_clou
|
|
|
28
28
|
from google.protobuf import timestamp_pb2 as google_dot_protobuf_dot_timestamp__pb2
|
|
29
29
|
|
|
30
30
|
|
|
31
|
-
DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n,yandex/cloud/ai/assistants/v1/runs/run.proto\x12\"yandex.cloud.ai.assistants.v1.runs\x1a#yandex/cloud/ai/common/common.proto\x1a*yandex/cloud/ai/assistants/v1/common.proto\x1a\x33yandex/cloud/ai/assistants/v1/threads/message.proto\x1a\x1fgoogle/protobuf/timestamp.proto\"\
|
|
31
|
+
DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n,yandex/cloud/ai/assistants/v1/runs/run.proto\x12\"yandex.cloud.ai.assistants.v1.runs\x1a#yandex/cloud/ai/common/common.proto\x1a*yandex/cloud/ai/assistants/v1/common.proto\x1a\x33yandex/cloud/ai/assistants/v1/threads/message.proto\x1a\x1fgoogle/protobuf/timestamp.proto\"\xdb\x04\n\x03Run\x12\n\n\x02id\x18\x01 \x01(\t\x12\x14\n\x0c\x61ssistant_id\x18\x02 \x01(\t\x12\x11\n\tthread_id\x18\x03 \x01(\t\x12\x12\n\ncreated_by\x18\x04 \x01(\t\x12.\n\ncreated_at\x18\x05 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12\x43\n\x06labels\x18\x06 \x03(\x0b\x32\x33.yandex.cloud.ai.assistants.v1.runs.Run.LabelsEntry\x12;\n\x05state\x18\x07 \x01(\x0b\x32,.yandex.cloud.ai.assistants.v1.runs.RunState\x12?\n\x05usage\x18\x08 \x01(\x0b\x32\x30.yandex.cloud.ai.assistants.v1.runs.ContentUsage\x12`\n custom_prompt_truncation_options\x18\t \x01(\x0b\x32\x36.yandex.cloud.ai.assistants.v1.PromptTruncationOptions\x12S\n\x19\x63ustom_completion_options\x18\n \x01(\x0b\x32\x30.yandex.cloud.ai.assistants.v1.CompletionOptions\x12\x32\n\x05tools\x18\x0b \x03(\x0b\x32#.yandex.cloud.ai.assistants.v1.Tool\x1a-\n\x0bLabelsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\"\x95\x03\n\x08RunState\x12\x46\n\x06status\x18\x01 \x01(\x0e\x32\x36.yandex.cloud.ai.assistants.v1.runs.RunState.RunStatus\x12.\n\x05\x65rror\x18\x02 \x01(\x0b\x32\x1d.yandex.cloud.ai.common.ErrorH\x00\x12K\n\x11\x63ompleted_message\x18\x03 \x01(\x0b\x32..yandex.cloud.ai.assistants.v1.threads.MessageH\x00\x12\x45\n\x0etool_call_list\x18\x04 \x01(\x0b\x32+.yandex.cloud.ai.assistants.v1.ToolCallListH\x00\"p\n\tRunStatus\x12\x1a\n\x16RUN_STATUS_UNSPECIFIED\x10\x00\x12\x0b\n\x07PENDING\x10\x01\x12\x0f\n\x0bIN_PROGRESS\x10\x02\x12\n\n\x06\x46\x41ILED\x10\x03\x12\r\n\tCOMPLETED\x10\x04\x12\x0e\n\nTOOL_CALLS\x10\x05\x42\x0b\n\tStateData\"V\n\x0c\x43ontentUsage\x12\x15\n\rprompt_tokens\x18\x01 \x01(\x03\x12\x19\n\x11\x63ompletion_tokens\x18\x02 \x01(\x03\x12\x14\n\x0ctotal_tokens\x18\x03 \x01(\x03\x42u\n&yandex.cloud.api.ai.assistants.v1.runsZKgithub.com/yandex-cloud/go-genproto/yandex/cloud/ai/assistants/v1/runs;runsb\x06proto3')
|
|
32
32
|
|
|
33
33
|
_globals = globals()
|
|
34
34
|
_builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, _globals)
|
|
@@ -39,13 +39,13 @@ if not _descriptor._USE_C_DESCRIPTORS:
|
|
|
39
39
|
_globals['_RUN_LABELSENTRY']._loaded_options = None
|
|
40
40
|
_globals['_RUN_LABELSENTRY']._serialized_options = b'8\001'
|
|
41
41
|
_globals['_RUN']._serialized_start=252
|
|
42
|
-
_globals['_RUN']._serialized_end=
|
|
43
|
-
_globals['_RUN_LABELSENTRY']._serialized_start=
|
|
44
|
-
_globals['_RUN_LABELSENTRY']._serialized_end=
|
|
45
|
-
_globals['_RUNSTATE']._serialized_start=
|
|
46
|
-
_globals['_RUNSTATE']._serialized_end=
|
|
47
|
-
_globals['_RUNSTATE_RUNSTATUS']._serialized_start=
|
|
48
|
-
_globals['_RUNSTATE_RUNSTATUS']._serialized_end=
|
|
49
|
-
_globals['_CONTENTUSAGE']._serialized_start=
|
|
50
|
-
_globals['_CONTENTUSAGE']._serialized_end=
|
|
42
|
+
_globals['_RUN']._serialized_end=855
|
|
43
|
+
_globals['_RUN_LABELSENTRY']._serialized_start=810
|
|
44
|
+
_globals['_RUN_LABELSENTRY']._serialized_end=855
|
|
45
|
+
_globals['_RUNSTATE']._serialized_start=858
|
|
46
|
+
_globals['_RUNSTATE']._serialized_end=1263
|
|
47
|
+
_globals['_RUNSTATE_RUNSTATUS']._serialized_start=1138
|
|
48
|
+
_globals['_RUNSTATE_RUNSTATUS']._serialized_end=1250
|
|
49
|
+
_globals['_CONTENTUSAGE']._serialized_start=1265
|
|
50
|
+
_globals['_CONTENTUSAGE']._serialized_end=1351
|
|
51
51
|
# @@protoc_insertion_point(module_scope)
|
|
@@ -55,6 +55,7 @@ class Run(google.protobuf.message.Message):
|
|
|
55
55
|
USAGE_FIELD_NUMBER: builtins.int
|
|
56
56
|
CUSTOM_PROMPT_TRUNCATION_OPTIONS_FIELD_NUMBER: builtins.int
|
|
57
57
|
CUSTOM_COMPLETION_OPTIONS_FIELD_NUMBER: builtins.int
|
|
58
|
+
TOOLS_FIELD_NUMBER: builtins.int
|
|
58
59
|
id: builtins.str
|
|
59
60
|
"""Unique identifier of the run."""
|
|
60
61
|
assistant_id: builtins.str
|
|
@@ -91,6 +92,10 @@ class Run(google.protobuf.message.Message):
|
|
|
91
92
|
If specified, these options will override the assistant's completion settings for this run.
|
|
92
93
|
"""
|
|
93
94
|
|
|
95
|
+
@property
|
|
96
|
+
def tools(self) -> google.protobuf.internal.containers.RepeatedCompositeFieldContainer[yandex.cloud.ai.assistants.v1.common_pb2.Tool]:
|
|
97
|
+
"""List of tools that are available for the assistant to use in this run."""
|
|
98
|
+
|
|
94
99
|
def __init__(
|
|
95
100
|
self,
|
|
96
101
|
*,
|
|
@@ -104,9 +109,10 @@ class Run(google.protobuf.message.Message):
|
|
|
104
109
|
usage: global___ContentUsage | None = ...,
|
|
105
110
|
custom_prompt_truncation_options: yandex.cloud.ai.assistants.v1.common_pb2.PromptTruncationOptions | None = ...,
|
|
106
111
|
custom_completion_options: yandex.cloud.ai.assistants.v1.common_pb2.CompletionOptions | None = ...,
|
|
112
|
+
tools: collections.abc.Iterable[yandex.cloud.ai.assistants.v1.common_pb2.Tool] | None = ...,
|
|
107
113
|
) -> None: ...
|
|
108
114
|
def HasField(self, field_name: typing.Literal["created_at", b"created_at", "custom_completion_options", b"custom_completion_options", "custom_prompt_truncation_options", b"custom_prompt_truncation_options", "state", b"state", "usage", b"usage"]) -> builtins.bool: ...
|
|
109
|
-
def ClearField(self, field_name: typing.Literal["assistant_id", b"assistant_id", "created_at", b"created_at", "created_by", b"created_by", "custom_completion_options", b"custom_completion_options", "custom_prompt_truncation_options", b"custom_prompt_truncation_options", "id", b"id", "labels", b"labels", "state", b"state", "thread_id", b"thread_id", "usage", b"usage"]) -> None: ...
|
|
115
|
+
def ClearField(self, field_name: typing.Literal["assistant_id", b"assistant_id", "created_at", b"created_at", "created_by", b"created_by", "custom_completion_options", b"custom_completion_options", "custom_prompt_truncation_options", b"custom_prompt_truncation_options", "id", b"id", "labels", b"labels", "state", b"state", "thread_id", b"thread_id", "tools", b"tools", "usage", b"usage"]) -> None: ...
|
|
110
116
|
|
|
111
117
|
global___Run = Run
|
|
112
118
|
|
|
@@ -132,6 +138,8 @@ class RunState(google.protobuf.message.Message):
|
|
|
132
138
|
"""Run has failed due to an error."""
|
|
133
139
|
COMPLETED: RunState._RunStatus.ValueType # 4
|
|
134
140
|
"""Run has completed successfully."""
|
|
141
|
+
TOOL_CALLS: RunState._RunStatus.ValueType # 5
|
|
142
|
+
"""The run is waiting for tool calls to be executed and their results to be submitted."""
|
|
135
143
|
|
|
136
144
|
class RunStatus(_RunStatus, metaclass=_RunStatusEnumTypeWrapper):
|
|
137
145
|
"""Enum representing the status of a run."""
|
|
@@ -146,10 +154,13 @@ class RunState(google.protobuf.message.Message):
|
|
|
146
154
|
"""Run has failed due to an error."""
|
|
147
155
|
COMPLETED: RunState.RunStatus.ValueType # 4
|
|
148
156
|
"""Run has completed successfully."""
|
|
157
|
+
TOOL_CALLS: RunState.RunStatus.ValueType # 5
|
|
158
|
+
"""The run is waiting for tool calls to be executed and their results to be submitted."""
|
|
149
159
|
|
|
150
160
|
STATUS_FIELD_NUMBER: builtins.int
|
|
151
161
|
ERROR_FIELD_NUMBER: builtins.int
|
|
152
162
|
COMPLETED_MESSAGE_FIELD_NUMBER: builtins.int
|
|
163
|
+
TOOL_CALL_LIST_FIELD_NUMBER: builtins.int
|
|
153
164
|
status: global___RunState.RunStatus.ValueType
|
|
154
165
|
"""Current status of a run."""
|
|
155
166
|
@property
|
|
@@ -160,16 +171,21 @@ class RunState(google.protobuf.message.Message):
|
|
|
160
171
|
def completed_message(self) -> yandex.cloud.ai.assistants.v1.threads.message_pb2.Message:
|
|
161
172
|
"""Final message generated by an assistant if a run has completed successfully."""
|
|
162
173
|
|
|
174
|
+
@property
|
|
175
|
+
def tool_call_list(self) -> yandex.cloud.ai.assistants.v1.common_pb2.ToolCallList:
|
|
176
|
+
"""A list of tool calls requested by the assistant."""
|
|
177
|
+
|
|
163
178
|
def __init__(
|
|
164
179
|
self,
|
|
165
180
|
*,
|
|
166
181
|
status: global___RunState.RunStatus.ValueType = ...,
|
|
167
182
|
error: yandex.cloud.ai.common.common_pb2.Error | None = ...,
|
|
168
183
|
completed_message: yandex.cloud.ai.assistants.v1.threads.message_pb2.Message | None = ...,
|
|
184
|
+
tool_call_list: yandex.cloud.ai.assistants.v1.common_pb2.ToolCallList | None = ...,
|
|
169
185
|
) -> None: ...
|
|
170
|
-
def HasField(self, field_name: typing.Literal["StateData", b"StateData", "completed_message", b"completed_message", "error", b"error"]) -> builtins.bool: ...
|
|
171
|
-
def ClearField(self, field_name: typing.Literal["StateData", b"StateData", "completed_message", b"completed_message", "error", b"error", "status", b"status"]) -> None: ...
|
|
172
|
-
def WhichOneof(self, oneof_group: typing.Literal["StateData", b"StateData"]) -> typing.Literal["error", "completed_message"] | None: ...
|
|
186
|
+
def HasField(self, field_name: typing.Literal["StateData", b"StateData", "completed_message", b"completed_message", "error", b"error", "tool_call_list", b"tool_call_list"]) -> builtins.bool: ...
|
|
187
|
+
def ClearField(self, field_name: typing.Literal["StateData", b"StateData", "completed_message", b"completed_message", "error", b"error", "status", b"status", "tool_call_list", b"tool_call_list"]) -> None: ...
|
|
188
|
+
def WhichOneof(self, oneof_group: typing.Literal["StateData", b"StateData"]) -> typing.Literal["error", "completed_message", "tool_call_list"] | None: ...
|
|
173
189
|
|
|
174
190
|
global___RunState = RunState
|
|
175
191
|
|
|
@@ -31,7 +31,7 @@ from google.api import annotations_pb2 as google_dot_api_dot_annotations__pb2
|
|
|
31
31
|
from google.protobuf import wrappers_pb2 as google_dot_protobuf_dot_wrappers__pb2
|
|
32
32
|
|
|
33
33
|
|
|
34
|
-
DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n4yandex/cloud/ai/assistants/v1/runs/run_service.proto\x12\"yandex.cloud.ai.assistants.v1.runs\x1a#yandex/cloud/ai/common/common.proto\x1a*yandex/cloud/ai/assistants/v1/common.proto\x1a\x33yandex/cloud/ai/assistants/v1/threads/message.proto\x1a,yandex/cloud/ai/assistants/v1/runs/run.proto\x1a\x1dyandex/cloud/validation.proto\x1a\x1cgoogle/api/annotations.proto\x1a\x1egoogle/protobuf/wrappers.proto\"\
|
|
34
|
+
DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n4yandex/cloud/ai/assistants/v1/runs/run_service.proto\x12\"yandex.cloud.ai.assistants.v1.runs\x1a#yandex/cloud/ai/common/common.proto\x1a*yandex/cloud/ai/assistants/v1/common.proto\x1a\x33yandex/cloud/ai/assistants/v1/threads/message.proto\x1a,yandex/cloud/ai/assistants/v1/runs/run.proto\x1a\x1dyandex/cloud/validation.proto\x1a\x1cgoogle/api/annotations.proto\x1a\x1egoogle/protobuf/wrappers.proto\"\x94\x04\n\x10\x43reateRunRequest\x12\x1a\n\x0c\x61ssistant_id\x18\x01 \x01(\tB\x04\xe8\xc7\x31\x01\x12\x17\n\tthread_id\x18\x02 \x01(\tB\x04\xe8\xc7\x31\x01\x12P\n\x06labels\x18\x03 \x03(\x0b\x32@.yandex.cloud.ai.assistants.v1.runs.CreateRunRequest.LabelsEntry\x12O\n\x13\x61\x64\x64itional_messages\x18\x04 \x03(\x0b\x32\x32.yandex.cloud.ai.assistants.v1.threads.MessageData\x12`\n custom_prompt_truncation_options\x18\x05 \x01(\x0b\x32\x36.yandex.cloud.ai.assistants.v1.PromptTruncationOptions\x12S\n\x19\x63ustom_completion_options\x18\x06 \x01(\x0b\x32\x30.yandex.cloud.ai.assistants.v1.CompletionOptions\x12\x0e\n\x06stream\x18\x07 \x01(\x08\x12\x32\n\x05tools\x18\x08 \x03(\x0b\x32#.yandex.cloud.ai.assistants.v1.Tool\x1a-\n\x0bLabelsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\"_\n\x10ListenRunRequest\x12\x14\n\x06run_id\x18\x01 \x01(\tB\x04\xe8\xc7\x31\x01\x12\x35\n\x10\x65vents_start_idx\x18\x02 \x01(\x0b\x32\x1b.google.protobuf.Int64Value\"\xb3\x01\n\x10\x41ttachRunRequest\x12\x14\n\x06run_id\x18\x01 \x01(\tB\x04\xe8\xc7\x31\x01\x12\x35\n\x10\x65vents_start_idx\x18\x02 \x01(\x0b\x32\x1b.google.protobuf.Int64Value\x12I\n\x10tool_result_list\x18\x03 \x01(\x0b\x32-.yandex.cloud.ai.assistants.v1.ToolResultListH\x00\x42\x07\n\x05\x45vent\"%\n\rGetRunRequest\x12\x14\n\x06run_id\x18\x01 \x01(\tB\x04\xe8\xc7\x31\x01\"4\n\x19GetLastRunByThreadRequest\x12\x17\n\tthread_id\x18\x01 \x01(\tB\x04\xe8\xc7\x31\x01\"Q\n\x0fListRunsRequest\x12\x17\n\tfolder_id\x18\x01 \x01(\tB\x04\xe8\xc7\x31\x01\x12\x11\n\tpage_size\x18\x02 \x01(\x03\x12\x12\n\npage_token\x18\x03 \x01(\t\"b\n\x10ListRunsResponse\x12\x35\n\x04runs\x18\x01 \x03(\x0b\x32\'.yandex.cloud.ai.assistants.v1.runs.Run\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\"K\n\x0cStreamCursor\x12\x19\n\x11\x63urrent_event_idx\x18\x01 \x01(\x03\x12 \n\x18num_user_events_received\x18\x02 \x01(\x03\"\xab\x04\n\x0bStreamEvent\x12M\n\nevent_type\x18\x01 \x01(\x0e\x32\x39.yandex.cloud.ai.assistants.v1.runs.StreamEvent.EventType\x12G\n\rstream_cursor\x18\x02 \x01(\x0b\x32\x30.yandex.cloud.ai.assistants.v1.runs.StreamCursor\x12.\n\x05\x65rror\x18\x03 \x01(\x0b\x32\x1d.yandex.cloud.ai.common.ErrorH\x00\x12P\n\x0fpartial_message\x18\x04 \x01(\x0b\x32\x35.yandex.cloud.ai.assistants.v1.threads.MessageContentH\x00\x12K\n\x11\x63ompleted_message\x18\x05 \x01(\x0b\x32..yandex.cloud.ai.assistants.v1.threads.MessageH\x00\x12\x45\n\x0etool_call_list\x18\x06 \x01(\x0b\x32+.yandex.cloud.ai.assistants.v1.ToolCallListH\x00\"a\n\tEventType\x12\x1a\n\x16\x45VENT_TYPE_UNSPECIFIED\x10\x00\x12\x13\n\x0fPARTIAL_MESSAGE\x10\x01\x12\t\n\x05\x45RROR\x10\x02\x12\x08\n\x04\x44ONE\x10\x03\x12\x0e\n\nTOOL_CALLS\x10\x04\x42\x0b\n\tEventData2\xe3\x06\n\nRunService\x12\x87\x01\n\x06\x43reate\x12\x34.yandex.cloud.ai.assistants.v1.runs.CreateRunRequest\x1a\'.yandex.cloud.ai.assistants.v1.runs.Run\"\x1e\x82\xd3\xe4\x93\x02\x18\"\x13/assistants/v1/runs:\x01*\x12\x95\x01\n\x06Listen\x12\x34.yandex.cloud.ai.assistants.v1.runs.ListenRunRequest\x1a/.yandex.cloud.ai.assistants.v1.runs.StreamEvent\"\"\x82\xd3\xe4\x93\x02\x1c\x12\x1a/assistants/v1/runs/listen0\x01\x12s\n\x06\x41ttach\x12\x34.yandex.cloud.ai.assistants.v1.runs.AttachRunRequest\x1a/.yandex.cloud.ai.assistants.v1.runs.StreamEvent(\x01\x30\x01\x12\x87\x01\n\x03Get\x12\x31.yandex.cloud.ai.assistants.v1.runs.GetRunRequest\x1a\'.yandex.cloud.ai.assistants.v1.runs.Run\"$\x82\xd3\xe4\x93\x02\x1e\x12\x1c/assistants/v1/runs/{run_id}\x12\xa2\x01\n\x0fGetLastByThread\x12=.yandex.cloud.ai.assistants.v1.runs.GetLastRunByThreadRequest\x1a\'.yandex.cloud.ai.assistants.v1.runs.Run\"\'\x82\xd3\xe4\x93\x02!\x12\x1f/assistants/v1/runs:getByThread\x12\x8e\x01\n\x04List\x12\x33.yandex.cloud.ai.assistants.v1.runs.ListRunsRequest\x1a\x34.yandex.cloud.ai.assistants.v1.runs.ListRunsResponse\"\x1b\x82\xd3\xe4\x93\x02\x15\x12\x13/assistants/v1/runsBu\n&yandex.cloud.api.ai.assistants.v1.runsZKgithub.com/yandex-cloud/go-genproto/yandex/cloud/ai/assistants/v1/runs;runsb\x06proto3')
|
|
35
35
|
|
|
36
36
|
_globals = globals()
|
|
37
37
|
_builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, _globals)
|
|
@@ -47,6 +47,8 @@ if not _descriptor._USE_C_DESCRIPTORS:
|
|
|
47
47
|
_globals['_CREATERUNREQUEST'].fields_by_name['thread_id']._serialized_options = b'\350\3071\001'
|
|
48
48
|
_globals['_LISTENRUNREQUEST'].fields_by_name['run_id']._loaded_options = None
|
|
49
49
|
_globals['_LISTENRUNREQUEST'].fields_by_name['run_id']._serialized_options = b'\350\3071\001'
|
|
50
|
+
_globals['_ATTACHRUNREQUEST'].fields_by_name['run_id']._loaded_options = None
|
|
51
|
+
_globals['_ATTACHRUNREQUEST'].fields_by_name['run_id']._serialized_options = b'\350\3071\001'
|
|
50
52
|
_globals['_GETRUNREQUEST'].fields_by_name['run_id']._loaded_options = None
|
|
51
53
|
_globals['_GETRUNREQUEST'].fields_by_name['run_id']._serialized_options = b'\350\3071\001'
|
|
52
54
|
_globals['_GETLASTRUNBYTHREADREQUEST'].fields_by_name['thread_id']._loaded_options = None
|
|
@@ -64,25 +66,27 @@ if not _descriptor._USE_C_DESCRIPTORS:
|
|
|
64
66
|
_globals['_RUNSERVICE'].methods_by_name['List']._loaded_options = None
|
|
65
67
|
_globals['_RUNSERVICE'].methods_by_name['List']._serialized_options = b'\202\323\344\223\002\025\022\023/assistants/v1/runs'
|
|
66
68
|
_globals['_CREATERUNREQUEST']._serialized_start=366
|
|
67
|
-
_globals['_CREATERUNREQUEST']._serialized_end=
|
|
68
|
-
_globals['_CREATERUNREQUEST_LABELSENTRY']._serialized_start=
|
|
69
|
-
_globals['_CREATERUNREQUEST_LABELSENTRY']._serialized_end=
|
|
70
|
-
_globals['_LISTENRUNREQUEST']._serialized_start=
|
|
71
|
-
_globals['_LISTENRUNREQUEST']._serialized_end=
|
|
72
|
-
_globals['
|
|
73
|
-
_globals['
|
|
74
|
-
_globals['
|
|
75
|
-
_globals['
|
|
76
|
-
_globals['
|
|
77
|
-
_globals['
|
|
78
|
-
_globals['
|
|
79
|
-
_globals['
|
|
80
|
-
_globals['
|
|
81
|
-
_globals['
|
|
82
|
-
_globals['
|
|
83
|
-
_globals['
|
|
84
|
-
_globals['
|
|
85
|
-
_globals['
|
|
86
|
-
_globals['
|
|
87
|
-
_globals['
|
|
69
|
+
_globals['_CREATERUNREQUEST']._serialized_end=898
|
|
70
|
+
_globals['_CREATERUNREQUEST_LABELSENTRY']._serialized_start=853
|
|
71
|
+
_globals['_CREATERUNREQUEST_LABELSENTRY']._serialized_end=898
|
|
72
|
+
_globals['_LISTENRUNREQUEST']._serialized_start=900
|
|
73
|
+
_globals['_LISTENRUNREQUEST']._serialized_end=995
|
|
74
|
+
_globals['_ATTACHRUNREQUEST']._serialized_start=998
|
|
75
|
+
_globals['_ATTACHRUNREQUEST']._serialized_end=1177
|
|
76
|
+
_globals['_GETRUNREQUEST']._serialized_start=1179
|
|
77
|
+
_globals['_GETRUNREQUEST']._serialized_end=1216
|
|
78
|
+
_globals['_GETLASTRUNBYTHREADREQUEST']._serialized_start=1218
|
|
79
|
+
_globals['_GETLASTRUNBYTHREADREQUEST']._serialized_end=1270
|
|
80
|
+
_globals['_LISTRUNSREQUEST']._serialized_start=1272
|
|
81
|
+
_globals['_LISTRUNSREQUEST']._serialized_end=1353
|
|
82
|
+
_globals['_LISTRUNSRESPONSE']._serialized_start=1355
|
|
83
|
+
_globals['_LISTRUNSRESPONSE']._serialized_end=1453
|
|
84
|
+
_globals['_STREAMCURSOR']._serialized_start=1455
|
|
85
|
+
_globals['_STREAMCURSOR']._serialized_end=1530
|
|
86
|
+
_globals['_STREAMEVENT']._serialized_start=1533
|
|
87
|
+
_globals['_STREAMEVENT']._serialized_end=2088
|
|
88
|
+
_globals['_STREAMEVENT_EVENTTYPE']._serialized_start=1978
|
|
89
|
+
_globals['_STREAMEVENT_EVENTTYPE']._serialized_end=2075
|
|
90
|
+
_globals['_RUNSERVICE']._serialized_start=2091
|
|
91
|
+
_globals['_RUNSERVICE']._serialized_end=2958
|
|
88
92
|
# @@protoc_insertion_point(module_scope)
|