-
Notifications
You must be signed in to change notification settings - Fork 139
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Regen REST model for StrictModeConfig output type #916
base: dev
Are you sure you want to change the base?
Changes from 2 commits
7b83229
a633e61
d285665
bfca8d0
eef5010
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -9,7 +9,9 @@ | |
Payload = Dict[str, Any] | ||
SparseVectorsConfig = Dict[str, "SparseVectorParams"] | ||
StrictModeMultivectorConfig = Dict[str, "StrictModeMultivector"] | ||
StrictModeMultivectorConfigOutput = Dict[str, "StrictModeMultivectorOutput"] | ||
StrictModeSparseConfig = Dict[str, "StrictModeSparse"] | ||
StrictModeSparseConfigOutput = Dict[str, "StrictModeSparseOutput"] | ||
VectorsConfigDiff = Dict[str, "VectorParamsDiff"] | ||
|
||
|
||
|
@@ -27,6 +29,10 @@ class AbortTransferOperation(BaseModel, extra="forbid"): | |
abort_transfer: "AbortShardTransfer" = Field(..., description="") | ||
|
||
|
||
class AbsExpression(BaseModel, extra="forbid"): | ||
abs: "Expression" = Field(..., description="") | ||
|
||
|
||
class AliasDescription(BaseModel): | ||
alias_name: str = Field(..., description="") | ||
collection_name: str = Field(..., description="") | ||
|
@@ -164,7 +170,7 @@ class CollectionConfig(BaseModel): | |
quantization_config: Optional["QuantizationConfig"] = Field( | ||
default=None, description="Information about the collection configuration" | ||
) | ||
strict_mode_config: Optional["StrictModeConfig"] = Field( | ||
strict_mode_config: Optional["StrictModeConfigOutput"] = Field( | ||
default=None, description="Information about the collection configuration" | ||
) | ||
|
||
|
@@ -632,6 +638,16 @@ def __str__(self) -> str: | |
MANHATTAN = "Manhattan" | ||
|
||
|
||
class DivExpression(BaseModel, extra="forbid"): | ||
div: "DivParams" = Field(..., description="") | ||
|
||
|
||
class DivParams(BaseModel, extra="forbid"): | ||
left: "Expression" = Field(..., description="") | ||
right: "Expression" = Field(..., description="") | ||
by_zero_default: Optional[float] = Field(default=None, description="") | ||
|
||
|
||
class Document(BaseModel, extra="forbid"): | ||
""" | ||
WARN: Work-in-progress, unimplemented Text document for embedding. Requires inference infrastructure, unimplemented. | ||
|
@@ -668,6 +684,10 @@ class ErrorResponseStatus(BaseModel): | |
error: Optional[str] = Field(default=None, description="Description of the occurred error.") | ||
|
||
|
||
class ExpExpression(BaseModel, extra="forbid"): | ||
exp: "Expression" = Field(..., description="") | ||
|
||
|
||
class FacetRequest(BaseModel, extra="forbid"): | ||
shard_key: Optional["ShardKeySelector"] = Field(default=None, description="") | ||
key: str = Field(..., description="Payload key to use for faceting.") | ||
|
@@ -699,13 +719,21 @@ class FieldCondition(BaseModel, extra="forbid"): | |
match: Optional["Match"] = Field(default=None, description="Check if point has field with a given value") | ||
range: Optional["RangeInterface"] = Field(default=None, description="Check if points value lies in a given range") | ||
geo_bounding_box: Optional["GeoBoundingBox"] = Field( | ||
default=None, description="Check if points geo location lies in a given area" | ||
default=None, description="Check if points geolocation lies in a given area" | ||
) | ||
geo_radius: Optional["GeoRadius"] = Field(default=None, description="Check if geo point is within a given radius") | ||
geo_polygon: Optional["GeoPolygon"] = Field( | ||
default=None, description="Check if geo point is within a given polygon" | ||
) | ||
values_count: Optional["ValuesCount"] = Field(default=None, description="Check number of values of the field") | ||
is_empty: Optional[bool] = Field( | ||
default=None, | ||
description="Check that the field is empty, alternative syntax for `is_empty: \"field_name\"`", | ||
) | ||
is_null: Optional[bool] = Field( | ||
default=None, | ||
description="Check that the field is null, alternative syntax for `is_null: \"field_name\"`", | ||
) | ||
|
||
|
||
class Filter(BaseModel, extra="forbid"): | ||
|
@@ -739,6 +767,11 @@ class FloatIndexType(str, Enum): | |
FLOAT = "float" | ||
|
||
|
||
class FormulaQuery(BaseModel, extra="forbid"): | ||
formula: "Expression" = Field(..., description="") | ||
defaults: Optional[Dict[str, Any]] = Field(default={}, description="") | ||
|
||
|
||
class Fusion(str, Enum): | ||
""" | ||
Fusion algorithm allows to combine results of multiple prefetches. Available fusion algorithms: * `rrf` - Reciprocal Rank Fusion * `dbsf` - Distribution-Based Score Fusion | ||
|
@@ -770,6 +803,15 @@ class GeoBoundingBox(BaseModel, extra="forbid"): | |
) | ||
|
||
|
||
class GeoDistance(BaseModel, extra="forbid"): | ||
geo_distance: "GeoDistanceParams" = Field(..., description="") | ||
|
||
|
||
class GeoDistanceParams(BaseModel, extra="forbid"): | ||
origin: "GeoPoint" = Field(..., description="") | ||
to: str = Field(..., description="Payload field with the destination geo point") | ||
|
||
|
||
class GeoIndexParams(BaseModel, extra="forbid"): | ||
type: "GeoIndexType" = Field(..., description="") | ||
on_disk: Optional[bool] = Field(default=None, description="If true, store the index on disk. Default: false.") | ||
|
@@ -1224,6 +1266,10 @@ class KeywordIndexType(str, Enum): | |
KEYWORD = "keyword" | ||
|
||
|
||
class LnExpression(BaseModel, extra="forbid"): | ||
ln: "Expression" = Field(..., description="") | ||
|
||
|
||
class LocalShardInfo(BaseModel): | ||
shard_id: int = Field(..., description="Local shard id") | ||
shard_key: Optional["ShardKey"] = Field(default=None, description="User-defined sharding key") | ||
|
@@ -1245,6 +1291,10 @@ class LocksOption(BaseModel, extra="forbid"): | |
write: bool = Field(..., description="") | ||
|
||
|
||
class Log10Expression(BaseModel, extra="forbid"): | ||
log10: "Expression" = Field(..., description="") | ||
|
||
|
||
class LookupLocation(BaseModel, extra="forbid"): | ||
""" | ||
Defines a location to use for looking up the vector. Specifies collection and vector field name. | ||
|
@@ -1349,6 +1399,10 @@ class MoveShardOperation(BaseModel, extra="forbid"): | |
move_shard: "MoveShard" = Field(..., description="") | ||
|
||
|
||
class MultExpression(BaseModel, extra="forbid"): | ||
mult: List["Expression"] = Field(..., description="") | ||
|
||
|
||
class MultiVectorComparator(str, Enum): | ||
MAX_SIM = "max_sim" | ||
|
||
|
@@ -1379,6 +1433,10 @@ class NearestQuery(BaseModel, extra="forbid"): | |
nearest: "VectorInput" = Field(..., description="") | ||
|
||
|
||
class NegExpression(BaseModel, extra="forbid"): | ||
neg: "Expression" = Field(..., description="") | ||
|
||
|
||
class Nested(BaseModel, extra="forbid"): | ||
""" | ||
Select points with payload for a specified nested field | ||
|
@@ -1641,6 +1699,15 @@ class PointsList(BaseModel, extra="forbid"): | |
shard_key: Optional["ShardKeySelector"] = Field(default=None, description="") | ||
|
||
|
||
class PowExpression(BaseModel, extra="forbid"): | ||
pow: "PowParams" = Field(..., description="") | ||
|
||
|
||
class PowParams(BaseModel, extra="forbid"): | ||
base: "Expression" = Field(..., description="") | ||
exponent: "Expression" = Field(..., description="") | ||
|
||
|
||
class Prefetch(BaseModel, extra="forbid"): | ||
prefetch: Optional[Union[List["Prefetch"], "Prefetch"]] = Field( | ||
default=None, | ||
|
@@ -2632,6 +2699,10 @@ def __str__(self) -> str: | |
MMAP = "mmap" | ||
|
||
|
||
class SqrtExpression(BaseModel, extra="forbid"): | ||
sqrt: "Expression" = Field(..., description="") | ||
|
||
|
||
class StartResharding(BaseModel, extra="forbid"): | ||
direction: "ReshardingDirection" = Field(..., description="") | ||
peer_id: Optional[int] = Field(default=None, description="") | ||
|
@@ -2663,10 +2734,10 @@ class StrictModeConfig(BaseModel, extra="forbid"): | |
) | ||
max_timeout: Optional[int] = Field(default=None, description="Max allowed `timeout` parameter.") | ||
unindexed_filtering_retrieve: Optional[bool] = Field( | ||
default=None, description="Allow usage of unindexed fields in retrieval based (eg. search) filters." | ||
default=None, description="Allow usage of unindexed fields in retrieval based (e.g. search) filters." | ||
) | ||
unindexed_filtering_update: Optional[bool] = Field( | ||
default=None, description="Allow usage of unindexed fields in filtered updates (eg. delete by payload)." | ||
default=None, description="Allow usage of unindexed fields in filtered updates (e.g. delete by payload)." | ||
) | ||
search_max_hnsw_ef: Optional[int] = Field(default=None, description="Max HNSW value allowed in search parameters.") | ||
search_allow_exact: Optional[bool] = Field(default=None, description="Whether exact search is allowed or not.") | ||
|
@@ -2697,14 +2768,69 @@ class StrictModeConfig(BaseModel, extra="forbid"): | |
sparse_config: Optional["StrictModeSparseConfig"] = Field(default=None, description="Sparse vector configuration") | ||
|
||
|
||
class StrictModeConfigOutput(BaseModel): | ||
enabled: Optional[bool] = Field(default=None, description="Whether strict mode is enabled for a collection or not.") | ||
max_query_limit: Optional[int] = Field( | ||
default=None, description="Max allowed `limit` parameter for all APIs that don't have their own max limit." | ||
) | ||
max_timeout: Optional[int] = Field(default=None, description="Max allowed `timeout` parameter.") | ||
unindexed_filtering_retrieve: Optional[bool] = Field( | ||
default=None, description="Allow usage of unindexed fields in retrieval based (e.g. search) filters." | ||
) | ||
unindexed_filtering_update: Optional[bool] = Field( | ||
default=None, description="Allow usage of unindexed fields in filtered updates (e.g. delete by payload)." | ||
) | ||
search_max_hnsw_ef: Optional[int] = Field(default=None, description="Max HNSW value allowed in search parameters.") | ||
search_allow_exact: Optional[bool] = Field(default=None, description="Whether exact search is allowed or not.") | ||
search_max_oversampling: Optional[float] = Field( | ||
default=None, description="Max oversampling value allowed in search." | ||
) | ||
upsert_max_batchsize: Optional[int] = Field(default=None, description="Max batchsize when upserting") | ||
max_collection_vector_size_bytes: Optional[int] = Field( | ||
default=None, description="Max size of a collections vector storage in bytes, ignoring replicas." | ||
) | ||
read_rate_limit: Optional[int] = Field( | ||
default=None, description="Max number of read operations per minute per replica" | ||
) | ||
write_rate_limit: Optional[int] = Field( | ||
default=None, description="Max number of write operations per minute per replica" | ||
) | ||
max_collection_payload_size_bytes: Optional[int] = Field( | ||
default=None, description="Max size of a collections payload storage in bytes" | ||
) | ||
max_points_count: Optional[int] = Field(default=None, description="Max number of points estimated in a collection") | ||
filter_max_conditions: Optional[int] = Field(default=None, description="Max conditions a filter can have.") | ||
condition_max_size: Optional[int] = Field( | ||
default=None, description="Max size of a condition, eg. items in `MatchAny`." | ||
) | ||
multivector_config: Optional["StrictModeMultivectorConfigOutput"] = Field( | ||
default=None, description="Multivector configuration" | ||
) | ||
sparse_config: Optional["StrictModeSparseConfigOutput"] = Field( | ||
default=None, description="Sparse vector configuration" | ||
) | ||
|
||
|
||
class StrictModeMultivector(BaseModel, extra="forbid"): | ||
max_vectors: Optional[int] = Field(default=None, description="Max number of vectors in a multivector") | ||
|
||
|
||
class StrictModeMultivectorOutput(BaseModel): | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. no |
||
max_vectors: Optional[int] = Field(default=None, description="Max number of vectors in a multivector") | ||
|
||
|
||
class StrictModeSparse(BaseModel, extra="forbid"): | ||
max_length: Optional[int] = Field(default=None, description="Max length of sparse vector") | ||
|
||
|
||
class StrictModeSparseOutput(BaseModel): | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. no |
||
max_length: Optional[int] = Field(default=None, description="Max length of sparse vector") | ||
|
||
|
||
class SumExpression(BaseModel, extra="forbid"): | ||
sum: List["Expression"] = Field(..., description="") | ||
|
||
|
||
class TelemetryData(BaseModel): | ||
id: str = Field(..., description="") | ||
app: "AppBuildTelemetry" = Field(..., description="") | ||
|
@@ -3161,6 +3287,7 @@ def __str__(self) -> str: | |
ContextQuery, | ||
OrderByQuery, | ||
FusionQuery, | ||
FormulaQuery, | ||
SampleQuery, | ||
] | ||
RangeInterface = Union[ | ||
|
@@ -3270,6 +3397,22 @@ def __str__(self) -> str: | |
List[Image], | ||
List[InferenceObject], | ||
] | ||
Expression = Union[ | ||
StrictFloat, | ||
StrictStr, | ||
Condition, | ||
MultExpression, | ||
SumExpression, | ||
NegExpression, | ||
AbsExpression, | ||
DivExpression, | ||
SqrtExpression, | ||
PowExpression, | ||
ExpExpression, | ||
Log10Expression, | ||
LnExpression, | ||
GeoDistance, | ||
] | ||
PayloadFieldSchema = Union[ | ||
PayloadSchemaType, | ||
PayloadSchemaParams, | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -6,7 +6,7 @@ PROJECT_ROOT="$(pwd)/$(dirname "$0")/../" | |
|
||
cd $(mktemp -d) | ||
|
||
git clone --sparse --filter=blob:none --depth=1 -b dev git@github.com:qdrant/qdrant.git | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. TODO revert once core PR merged in dev |
||
git clone --sparse --filter=blob:none --depth=1 -b strict-mode-config-output git@github.com:qdrant/qdrant.git | ||
|
||
cd qdrant | ||
git sparse-checkout add docs/redoc/master | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
no
extra="forbid"