Skip to content

Commit b56e70e

Browse files
feat: regenerate proto
1 parent 85286c9 commit b56e70e

19 files changed

+453
-107
lines changed

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

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

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

Lines changed: 149 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,12 +4,44 @@ isort:skip_file
44
"""
55

66
import builtins
7+
import collections.abc
78
import google.protobuf.descriptor
9+
import google.protobuf.internal.containers
10+
import google.protobuf.internal.enum_type_wrapper
811
import google.protobuf.message
12+
import google.protobuf.wrappers_pb2
13+
import sys
914
import typing
1015

16+
if sys.version_info >= (3, 10):
17+
import typing as typing_extensions
18+
else:
19+
import typing_extensions
20+
1121
DESCRIPTOR: google.protobuf.descriptor.FileDescriptor
1222

23+
class _NormalizationStrategy:
24+
ValueType = typing.NewType("ValueType", builtins.int)
25+
V: typing_extensions.TypeAlias = ValueType
26+
27+
class _NormalizationStrategyEnumTypeWrapper(google.protobuf.internal.enum_type_wrapper._EnumTypeWrapper[_NormalizationStrategy.ValueType], builtins.type):
28+
DESCRIPTOR: google.protobuf.descriptor.EnumDescriptor
29+
NORMALIZATION_STRATEGY_UNSPECIFIED: _NormalizationStrategy.ValueType # 0
30+
MIN_MAX: _NormalizationStrategy.ValueType # 1
31+
"""https://en.wikipedia.org/wiki/Feature_scaling#Rescaling_(min-max_normalization)"""
32+
L2: _NormalizationStrategy.ValueType # 2
33+
"""https://en.wikipedia.org/wiki/Cosine_similarity#L2-normalized_Euclidean_distance"""
34+
35+
class NormalizationStrategy(_NormalizationStrategy, metaclass=_NormalizationStrategyEnumTypeWrapper):
36+
"""Normalization strategy for relevance scores from different indices"""
37+
38+
NORMALIZATION_STRATEGY_UNSPECIFIED: NormalizationStrategy.ValueType # 0
39+
MIN_MAX: NormalizationStrategy.ValueType # 1
40+
"""https://en.wikipedia.org/wiki/Feature_scaling#Rescaling_(min-max_normalization)"""
41+
L2: NormalizationStrategy.ValueType # 2
42+
"""https://en.wikipedia.org/wiki/Cosine_similarity#L2-normalized_Euclidean_distance"""
43+
global___NormalizationStrategy = NormalizationStrategy
44+
1345
@typing.final
1446
class StaticChunkingStrategy(google.protobuf.message.Message):
1547
"""Defines a chunking strategy where chunks are created with a fixed maximum chunk size and an overlap between consecutive chunks."""
@@ -60,3 +92,120 @@ class ChunkingStrategy(google.protobuf.message.Message):
6092
def WhichOneof(self, oneof_group: typing.Literal["Strategy", b"Strategy"]) -> typing.Literal["static_strategy"] | None: ...
6193

6294
global___ChunkingStrategy = ChunkingStrategy
95+
96+
@typing.final
97+
class MeanCombinationStrategy(google.protobuf.message.Message):
98+
DESCRIPTOR: google.protobuf.descriptor.Descriptor
99+
100+
class _MeanEvaluationTechnique:
101+
ValueType = typing.NewType("ValueType", builtins.int)
102+
V: typing_extensions.TypeAlias = ValueType
103+
104+
class _MeanEvaluationTechniqueEnumTypeWrapper(google.protobuf.internal.enum_type_wrapper._EnumTypeWrapper[MeanCombinationStrategy._MeanEvaluationTechnique.ValueType], builtins.type):
105+
DESCRIPTOR: google.protobuf.descriptor.EnumDescriptor
106+
MEAN_EVALUATION_TECHNIQUE_UNSPECIFIED: MeanCombinationStrategy._MeanEvaluationTechnique.ValueType # 0
107+
ARITHMETIC: MeanCombinationStrategy._MeanEvaluationTechnique.ValueType # 1
108+
"""https://en.wikipedia.org/wiki/Arithmetic_mean"""
109+
GEOMETRIC: MeanCombinationStrategy._MeanEvaluationTechnique.ValueType # 2
110+
"""https://en.wikipedia.org/wiki/Geometric_mean"""
111+
HARMONIC: MeanCombinationStrategy._MeanEvaluationTechnique.ValueType # 3
112+
"""https://en.wikipedia.org/wiki/Harmonic_mean"""
113+
114+
class MeanEvaluationTechnique(_MeanEvaluationTechnique, metaclass=_MeanEvaluationTechniqueEnumTypeWrapper): ...
115+
MEAN_EVALUATION_TECHNIQUE_UNSPECIFIED: MeanCombinationStrategy.MeanEvaluationTechnique.ValueType # 0
116+
ARITHMETIC: MeanCombinationStrategy.MeanEvaluationTechnique.ValueType # 1
117+
"""https://en.wikipedia.org/wiki/Arithmetic_mean"""
118+
GEOMETRIC: MeanCombinationStrategy.MeanEvaluationTechnique.ValueType # 2
119+
"""https://en.wikipedia.org/wiki/Geometric_mean"""
120+
HARMONIC: MeanCombinationStrategy.MeanEvaluationTechnique.ValueType # 3
121+
"""https://en.wikipedia.org/wiki/Harmonic_mean"""
122+
123+
MEAN_EVALUATION_TECHNIQUE_FIELD_NUMBER: builtins.int
124+
WEIGHTS_FIELD_NUMBER: builtins.int
125+
mean_evaluation_technique: global___MeanCombinationStrategy.MeanEvaluationTechnique.ValueType
126+
"""Technique for averaging relevance scores from different indices. Default is ARITHMETIC"""
127+
@property
128+
def weights(self) -> google.protobuf.internal.containers.RepeatedScalarFieldContainer[builtins.float]:
129+
"""Weights used for evaluating the weighted mean of relevance scores. The sum of the values must equal 1.0
130+
If not provided, all scores are given equal weight
131+
"""
132+
133+
def __init__(
134+
self,
135+
*,
136+
mean_evaluation_technique: global___MeanCombinationStrategy.MeanEvaluationTechnique.ValueType = ...,
137+
weights: collections.abc.Iterable[builtins.float] | None = ...,
138+
) -> None: ...
139+
def ClearField(self, field_name: typing.Literal["mean_evaluation_technique", b"mean_evaluation_technique", "weights", b"weights"]) -> None: ...
140+
141+
global___MeanCombinationStrategy = MeanCombinationStrategy
142+
143+
@typing.final
144+
class ReciprocalRankFusionCombinationStrategy(google.protobuf.message.Message):
145+
"""https://plg.uwaterloo.ca/~gvcormac/cormacksigir09-rrf.pdf"""
146+
147+
DESCRIPTOR: google.protobuf.descriptor.Descriptor
148+
149+
K_FIELD_NUMBER: builtins.int
150+
@property
151+
def k(self) -> google.protobuf.wrappers_pb2.Int64Value:
152+
"""The parameter k for RRFscore. Default is 60"""
153+
154+
def __init__(
155+
self,
156+
*,
157+
k: google.protobuf.wrappers_pb2.Int64Value | None = ...,
158+
) -> None: ...
159+
def HasField(self, field_name: typing.Literal["k", b"k"]) -> builtins.bool: ...
160+
def ClearField(self, field_name: typing.Literal["k", b"k"]) -> None: ...
161+
162+
global___ReciprocalRankFusionCombinationStrategy = ReciprocalRankFusionCombinationStrategy
163+
164+
@typing.final
165+
class CombinationStrategy(google.protobuf.message.Message):
166+
"""Combination strategy for merging rankings from different indices"""
167+
168+
DESCRIPTOR: google.protobuf.descriptor.Descriptor
169+
170+
MEAN_COMBINATION_FIELD_NUMBER: builtins.int
171+
RRF_COMBINATION_FIELD_NUMBER: builtins.int
172+
@property
173+
def mean_combination(self) -> global___MeanCombinationStrategy: ...
174+
@property
175+
def rrf_combination(self) -> global___ReciprocalRankFusionCombinationStrategy: ...
176+
def __init__(
177+
self,
178+
*,
179+
mean_combination: global___MeanCombinationStrategy | None = ...,
180+
rrf_combination: global___ReciprocalRankFusionCombinationStrategy | None = ...,
181+
) -> None: ...
182+
def HasField(self, field_name: typing.Literal["Strategy", b"Strategy", "mean_combination", b"mean_combination", "rrf_combination", b"rrf_combination"]) -> builtins.bool: ...
183+
def ClearField(self, field_name: typing.Literal["Strategy", b"Strategy", "mean_combination", b"mean_combination", "rrf_combination", b"rrf_combination"]) -> None: ...
184+
def WhichOneof(self, oneof_group: typing.Literal["Strategy", b"Strategy"]) -> typing.Literal["mean_combination", "rrf_combination"] | None: ...
185+
186+
global___CombinationStrategy = CombinationStrategy
187+
188+
@typing.final
189+
class NgramTokenizer(google.protobuf.message.Message):
190+
DESCRIPTOR: google.protobuf.descriptor.Descriptor
191+
192+
MIN_GRAM_FIELD_NUMBER: builtins.int
193+
MAX_GRAM_FIELD_NUMBER: builtins.int
194+
@property
195+
def min_gram(self) -> google.protobuf.wrappers_pb2.Int64Value:
196+
"""Minimum length of characters in a gram. Defaults to 3"""
197+
198+
@property
199+
def max_gram(self) -> google.protobuf.wrappers_pb2.Int64Value:
200+
"""Maximum length of characters in a gram. Defaults to 4"""
201+
202+
def __init__(
203+
self,
204+
*,
205+
min_gram: google.protobuf.wrappers_pb2.Int64Value | None = ...,
206+
max_gram: google.protobuf.wrappers_pb2.Int64Value | None = ...,
207+
) -> None: ...
208+
def HasField(self, field_name: typing.Literal["max_gram", b"max_gram", "min_gram", b"min_gram"]) -> builtins.bool: ...
209+
def ClearField(self, field_name: typing.Literal["max_gram", b"max_gram", "min_gram", b"min_gram"]) -> None: ...
210+
211+
global___NgramTokenizer = NgramTokenizer

yandex/cloud/ai/assistants/v1/searchindex/search_index_file_pb2.py

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

yandex/cloud/ai/assistants/v1/searchindex/search_index_file_pb2.pyi

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,6 @@ import google.protobuf.descriptor
88
import google.protobuf.message
99
import google.protobuf.timestamp_pb2
1010
import typing
11-
import yandex.cloud.ai.assistants.v1.searchindex.common_pb2
1211

1312
DESCRIPTOR: google.protobuf.descriptor.FileDescriptor
1413

@@ -22,7 +21,6 @@ class SearchIndexFile(google.protobuf.message.Message):
2221
SEARCH_INDEX_ID_FIELD_NUMBER: builtins.int
2322
CREATED_BY_FIELD_NUMBER: builtins.int
2423
CREATED_AT_FIELD_NUMBER: builtins.int
25-
CHUNKING_STRATEGY_FIELD_NUMBER: builtins.int
2624
id: builtins.str
2725
"""Unique identifier of the file that was used for indexing."""
2826
search_index_id: builtins.str
@@ -33,18 +31,15 @@ class SearchIndexFile(google.protobuf.message.Message):
3331
def created_at(self) -> google.protobuf.timestamp_pb2.Timestamp:
3432
"""Timestamp representing when the file was created."""
3533

36-
@property
37-
def chunking_strategy(self) -> yandex.cloud.ai.assistants.v1.searchindex.common_pb2.ChunkingStrategy: ...
3834
def __init__(
3935
self,
4036
*,
4137
id: builtins.str = ...,
4238
search_index_id: builtins.str = ...,
4339
created_by: builtins.str = ...,
4440
created_at: google.protobuf.timestamp_pb2.Timestamp | None = ...,
45-
chunking_strategy: yandex.cloud.ai.assistants.v1.searchindex.common_pb2.ChunkingStrategy | None = ...,
4641
) -> None: ...
47-
def HasField(self, field_name: typing.Literal["chunking_strategy", b"chunking_strategy", "created_at", b"created_at"]) -> builtins.bool: ...
48-
def ClearField(self, field_name: typing.Literal["chunking_strategy", b"chunking_strategy", "created_at", b"created_at", "created_by", b"created_by", "id", b"id", "search_index_id", b"search_index_id"]) -> None: ...
42+
def HasField(self, field_name: typing.Literal["created_at", b"created_at"]) -> builtins.bool: ...
43+
def ClearField(self, field_name: typing.Literal["created_at", b"created_at", "created_by", b"created_by", "id", b"id", "search_index_id", b"search_index_id"]) -> None: ...
4944

5045
global___SearchIndexFile = SearchIndexFile

0 commit comments

Comments
 (0)