weaviate.collections.classes
weaviate.collections.classes.aggregate
- class weaviate.collections.classes.aggregate.AggregateInteger(count, maximum, mean, median, minimum, mode, sum_)[source]
Bases:
objectThe aggregation result for an int property.
- Parameters:
count (int | None)
maximum (int | None)
mean (float | None)
median (float | None)
minimum (int | None)
mode (int | None)
sum_ (int | None)
- count: int | None
- maximum: int | None
- mean: float | None
- median: float | None
- minimum: int | None
- mode: int | None
- sum_: int | None
- class weaviate.collections.classes.aggregate.AggregateNumber(count, maximum, mean, median, minimum, mode, sum_)[source]
Bases:
objectThe aggregation result for a number property.
- Parameters:
count (int | None)
maximum (float | None)
mean (float | None)
median (float | None)
minimum (float | None)
mode (float | None)
sum_ (float | None)
- count: int | None
- maximum: float | None
- mean: float | None
- median: float | None
- minimum: float | None
- mode: float | None
- sum_: float | None
- class weaviate.collections.classes.aggregate.TopOccurrence(count, value)[source]
Bases:
objectThe top occurrence of a text property.
- Parameters:
count (int | None)
value (str | None)
- count: int | None
- value: str | None
- class weaviate.collections.classes.aggregate.AggregateText(count, top_occurrences)[source]
Bases:
objectThe aggregation result for a text property.
- Parameters:
count (int | None)
top_occurrences (List[TopOccurrence])
- count: int | None
- top_occurrences: List[TopOccurrence]
- class weaviate.collections.classes.aggregate.AggregateBoolean(count, percentage_false, percentage_true, total_false, total_true)[source]
Bases:
objectThe aggregation result for a boolean property.
- Parameters:
count (int | None)
percentage_false (float | None)
percentage_true (float | None)
total_false (int | None)
total_true (int | None)
- count: int | None
- percentage_false: float | None
- percentage_true: float | None
- total_false: int | None
- total_true: int | None
- class weaviate.collections.classes.aggregate.AggregateReference(pointing_to)[source]
Bases:
objectThe aggregation result for a cross-reference property.
- Parameters:
pointing_to (List[str] | None)
- pointing_to: List[str] | None
- class weaviate.collections.classes.aggregate.AggregateDate(count, maximum, median, minimum, mode)[source]
Bases:
objectThe aggregation result for a date property.
- Parameters:
count (int | None)
maximum (str | None)
median (str | None)
minimum (str | None)
mode (str | None)
- count: int | None
- maximum: str | None
- median: str | None
- minimum: str | None
- mode: str | None
- class weaviate.collections.classes.aggregate.AggregateReturn(properties, total_count)[source]
Bases:
objectThe aggregation result for a collection.
- Parameters:
properties (Dict[str, AggregateInteger | AggregateNumber | AggregateText | AggregateBoolean | AggregateDate | AggregateReference])
total_count (int | None)
- properties: Dict[str, AggregateInteger | AggregateNumber | AggregateText | AggregateBoolean | AggregateDate | AggregateReference]
- total_count: int | None
- class weaviate.collections.classes.aggregate.GroupedBy(prop, value)[source]
Bases:
objectThe property that the collection was grouped by.
- Parameters:
prop (str)
value (str | int | float | bool | List[str] | List[int] | List[float] | List[bool] | GeoCoordinate | None)
- prop: str
- value: str | int | float | bool | List[str] | List[int] | List[float] | List[bool] | GeoCoordinate | None
- class weaviate.collections.classes.aggregate.AggregateGroup(grouped_by, properties, total_count)[source]
Bases:
objectThe aggregation result for a collection grouped by a property.
- Parameters:
grouped_by (GroupedBy)
properties (Dict[str, AggregateInteger | AggregateNumber | AggregateText | AggregateBoolean | AggregateDate | AggregateReference])
total_count (int | None)
- properties: Dict[str, AggregateInteger | AggregateNumber | AggregateText | AggregateBoolean | AggregateDate | AggregateReference]
- total_count: int | None
- class weaviate.collections.classes.aggregate.AggregateGroupByReturn(groups)[source]
Bases:
objectThe aggregation results for a collection grouped by a property.
- Parameters:
groups (List[AggregateGroup])
- groups: List[AggregateGroup]
- class weaviate.collections.classes.aggregate._MetricsBase(*, property_name, count)[source]
Bases:
BaseModelCreate a new model by parsing and validating input data from keyword arguments.
Raises [ValidationError][pydantic_core.ValidationError] if the input data cannot be validated to form a valid model.
self is explicitly positional-only to allow self as a field name.
- Parameters:
property_name (str)
count (bool)
- property_name: str
- count: bool
- _abc_impl = <_abc._abc_data object>
- model_config = {}
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- class weaviate.collections.classes.aggregate._MetricsText(*, property_name, count, top_occurrences_count, top_occurrences_value, limit)[source]
Bases:
_MetricsBaseCreate a new model by parsing and validating input data from keyword arguments.
Raises [ValidationError][pydantic_core.ValidationError] if the input data cannot be validated to form a valid model.
self is explicitly positional-only to allow self as a field name.
- Parameters:
property_name (str)
count (bool)
top_occurrences_count (bool)
top_occurrences_value (bool)
limit (int | None)
- top_occurrences_count: bool
- top_occurrences_value: bool
- limit: int | None
- _abc_impl = <_abc._abc_data object>
- model_config = {}
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- class weaviate.collections.classes.aggregate._MetricsNum(*, property_name, count, maximum, mean, median, minimum, mode, sum_)[source]
Bases:
_MetricsBaseCreate a new model by parsing and validating input data from keyword arguments.
Raises [ValidationError][pydantic_core.ValidationError] if the input data cannot be validated to form a valid model.
self is explicitly positional-only to allow self as a field name.
- Parameters:
property_name (str)
count (bool)
maximum (bool)
mean (bool)
median (bool)
minimum (bool)
mode (bool)
sum_ (bool)
- maximum: bool
- mean: bool
- median: bool
- minimum: bool
- mode: bool
- sum_: bool
- _abc_impl = <_abc._abc_data object>
- model_config = {}
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- class weaviate.collections.classes.aggregate._MetricsInteger(*, property_name, count, maximum, mean, median, minimum, mode, sum_)[source]
Bases:
_MetricsNumCreate a new model by parsing and validating input data from keyword arguments.
Raises [ValidationError][pydantic_core.ValidationError] if the input data cannot be validated to form a valid model.
self is explicitly positional-only to allow self as a field name.
- Parameters:
property_name (str)
count (bool)
maximum (bool)
mean (bool)
median (bool)
minimum (bool)
mode (bool)
sum_ (bool)
- _abc_impl = <_abc._abc_data object>
- model_config = {}
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- class weaviate.collections.classes.aggregate._MetricsNumber(*, property_name, count, maximum, mean, median, minimum, mode, sum_)[source]
Bases:
_MetricsNumCreate a new model by parsing and validating input data from keyword arguments.
Raises [ValidationError][pydantic_core.ValidationError] if the input data cannot be validated to form a valid model.
self is explicitly positional-only to allow self as a field name.
- Parameters:
property_name (str)
count (bool)
maximum (bool)
mean (bool)
median (bool)
minimum (bool)
mode (bool)
sum_ (bool)
- _abc_impl = <_abc._abc_data object>
- model_config = {}
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- class weaviate.collections.classes.aggregate._MetricsBoolean(*, property_name, count, percentage_false, percentage_true, total_false, total_true)[source]
Bases:
_MetricsBaseCreate a new model by parsing and validating input data from keyword arguments.
Raises [ValidationError][pydantic_core.ValidationError] if the input data cannot be validated to form a valid model.
self is explicitly positional-only to allow self as a field name.
- Parameters:
property_name (str)
count (bool)
percentage_false (bool)
percentage_true (bool)
total_false (bool)
total_true (bool)
- percentage_false: bool
- percentage_true: bool
- total_false: bool
- total_true: bool
- _abc_impl = <_abc._abc_data object>
- model_config = {}
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- class weaviate.collections.classes.aggregate._MetricsDate(*, property_name, count, maximum, median, minimum, mode)[source]
Bases:
_MetricsBaseCreate a new model by parsing and validating input data from keyword arguments.
Raises [ValidationError][pydantic_core.ValidationError] if the input data cannot be validated to form a valid model.
self is explicitly positional-only to allow self as a field name.
- Parameters:
property_name (str)
count (bool)
maximum (bool)
median (bool)
minimum (bool)
mode (bool)
- maximum: bool
- median: bool
- minimum: bool
- mode: bool
- _abc_impl = <_abc._abc_data object>
- model_config = {}
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- class weaviate.collections.classes.aggregate._MetricsReference(*, property_name, pointing_to)[source]
Bases:
BaseModelCreate a new model by parsing and validating input data from keyword arguments.
Raises [ValidationError][pydantic_core.ValidationError] if the input data cannot be validated to form a valid model.
self is explicitly positional-only to allow self as a field name.
- Parameters:
property_name (str)
pointing_to (bool)
- property_name: str
- pointing_to: bool
- _abc_impl = <_abc._abc_data object>
- model_config = {}
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- class weaviate.collections.classes.aggregate.GroupByAggregate(*, prop, limit=None)[source]
Bases:
_WeaviateInputDefine how the aggregations’s group-by operation should be performed.
Create a new model by parsing and validating input data from keyword arguments.
Raises [ValidationError][pydantic_core.ValidationError] if the input data cannot be validated to form a valid model.
self is explicitly positional-only to allow self as a field name.
- Parameters:
prop (str)
limit (int | None)
- prop: str
- limit: int | None
- _abc_impl = <_abc._abc_data object>
- model_config = {'extra': 'forbid'}
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- class weaviate.collections.classes.aggregate.Metrics(property_)[source]
Bases:
objectDefine the metrics to be returned based on a property when aggregating over a collection.
Use the __init__ method to define the name to the property to be aggregated on. Then use the text, integer, number, boolean, date_, or reference methods to define the metrics to be returned.
See the docs for more details!
- Parameters:
property_ (str)
- text(count: bool = False, top_occurrences_count: bool = False, top_occurrences_value: bool = False, limit: int | None = None) _MetricsText[source]
- text(count: bool = False, top_occurrences_count: bool = False, top_occurrences_value: bool = False, limit: int | None = None, min_occurrences: int | None = None) _MetricsText
Define the metrics to be returned for a TEXT or TEXT_ARRAY property when aggregating over a collection.
If none of the arguments are provided then all metrics will be returned.
- Parameters:
count (bool) – Whether to include the number of objects that contain this property.
top_occurrences_count (bool) – Whether to include the number of the top occurrences of a property’s value.
top_occurrences_value (bool) – Whether to include the value of the top occurrences of a property’s value.
min_occurrences (int | None) – (Deprecated) The maximum number of top occurrences to return. Use limit instead.
limit (int | None) – The maximum number of top occurrences to return.
- Returns:
A _MetricsStr object that includes the metrics to be returned.
- Return type:
- integer(count=False, maximum=False, mean=False, median=False, minimum=False, mode=False, sum_=False)[source]
Define the metrics to be returned for an INT or INT_ARRAY property when aggregating over a collection.
If none of the arguments are provided then all metrics will be returned.
- Parameters:
count (bool) – Whether to include the number of objects that contain this property.
maximum (bool) – Whether to include the maximum value of this property.
mean (bool) – Whether to include the mean value of this property.
median (bool) – Whether to include the median value of this property.
minimum (bool) – Whether to include the minimum value of this property.
mode (bool) – Whether to include the mode value of this property.
sum – Whether to include the sum of this property.
sum_ (bool)
- Returns:
A _MetricsInteger object that includes the metrics to be returned.
- Return type:
- number(count=False, maximum=False, mean=False, median=False, minimum=False, mode=False, sum_=False)[source]
Define the metrics to be returned for a NUMBER or NUMBER_ARRAY property when aggregating over a collection.
If none of the arguments are provided then all metrics will be returned.
- Parameters:
count (bool) – Whether to include the number of objects that contain this property.
maximum (bool) – Whether to include the maximum value of this property.
mean (bool) – Whether to include the mean value of this property.
median (bool) – Whether to include the median value of this property.
minimum (bool) – Whether to include the minimum value of this property.
mode (bool) – Whether to include the mode value of this property.
sum – Whether to include the sum of this property.
sum_ (bool)
- Returns:
A _MetricsNumber object that includes the metrics to be returned.
- Return type:
- boolean(count=False, percentage_false=False, percentage_true=False, total_false=False, total_true=False)[source]
Define the metrics to be returned for a BOOL or BOOL_ARRAY property when aggregating over a collection.
If none of the arguments are provided then all metrics will be returned.
- Parameters:
count (bool) – Whether to include the number of objects that contain this property.
percentage_false (bool) – Whether to include the percentage of objects that have a false value for this property.
percentage_true (bool) – Whether to include the percentage of objects that have a true value for this property.
total_false (bool) – Whether to include the total number of objects that have a false value for this property.
total_true (bool) – Whether to include the total number of objects that have a true value for this property.
- Returns:
A _MetricsBoolean object that includes the metrics to be returned.
- Return type:
- date_(count=False, maximum=False, median=False, minimum=False, mode=False)[source]
Define the metrics to be returned for a DATE or DATE_ARRAY property when aggregating over a collection.
If none of the arguments are provided then all metrics will be returned.
- Parameters:
count (bool) – Whether to include the number of objects that contain this property.
maximum (bool) – Whether to include the maximum value of this property.
median (bool) – Whether to include the median value of this property.
minimum (bool) – Whether to include the minimum value of this property.
mode (bool) – Whether to include the mode value of this property.
- Returns:
A _MetricsDate object that includes the metrics to be returned.
- Return type:
- reference(pointing_to=False)[source]
Define the metrics to be returned for a cross-reference property when aggregating over a collection.
If none of the arguments are provided then all metrics will be returned.
- Parameters:
pointing_to (bool) – The UUIDs of the objects that are being pointed to.
- Returns:
A _MetricsReference object that includes the metrics to be returned.
- Return type:
weaviate.collections.classes.batch
- class weaviate.collections.classes.batch._BatchObject(collection: str, vector: Mapping[str, Sequence[int | float] | Sequence[Sequence[int | float]]] | Sequence[int | float] | NoneType, uuid: str, properties: Dict[str, NoneType | str | bool | int | float | datetime.datetime | uuid.UUID | weaviate.collections.classes.types.GeoCoordinate | weaviate.collections.classes.types.PhoneNumber | weaviate.collections.classes.types._PhoneNumber | Mapping[str, ForwardRef('WeaviateField')] | Sequence[str] | Sequence[bool] | Sequence[int] | Sequence[float] | Sequence[datetime.datetime] | Sequence[uuid.UUID] | Sequence[Mapping[str, ForwardRef('WeaviateField')]]] | None, tenant: str | None, references: Mapping[str, str | uuid.UUID | Sequence[str | uuid.UUID] | weaviate.collections.classes.internal.ReferenceToMulti] | None, index: int, retry_count: int = 0)[source]
Bases:
object- Parameters:
collection (str)
vector (Mapping[str, Sequence[int | float] | Sequence[Sequence[int | float]]] | Sequence[int | float] | None)
uuid (str)
properties (Dict[str, None | str | bool | int | float | datetime | UUID | GeoCoordinate | PhoneNumber | _PhoneNumber | Mapping[str, None | str | bool | int | float | datetime | UUID | GeoCoordinate | PhoneNumber | _PhoneNumber | Mapping[str, WeaviateField] | Sequence[str] | Sequence[bool] | Sequence[int] | Sequence[float] | Sequence[datetime] | Sequence[UUID] | Sequence[Mapping[str, WeaviateField]]] | Sequence[str] | Sequence[bool] | Sequence[int] | Sequence[float] | Sequence[datetime] | Sequence[UUID] | Sequence[Mapping[str, None | str | bool | int | float | datetime | UUID | GeoCoordinate | PhoneNumber | _PhoneNumber | Mapping[str, WeaviateField] | Sequence[str] | Sequence[bool] | Sequence[int] | Sequence[float] | Sequence[datetime] | Sequence[UUID] | Sequence[Mapping[str, WeaviateField]]]]] | None)
tenant (str | None)
references (Mapping[str, str | UUID | Sequence[str | UUID] | ReferenceToMulti] | None)
index (int)
retry_count (int)
- collection: str
- vector: Mapping[str, Sequence[int | float] | Sequence[Sequence[int | float]]] | Sequence[int | float] | None
- uuid: str
- properties: Dict[str, None | str | bool | int | float | datetime | UUID | GeoCoordinate | PhoneNumber | _PhoneNumber | Mapping[str, None | str | bool | int | float | datetime | UUID | GeoCoordinate | PhoneNumber | _PhoneNumber | Mapping[str, WeaviateField] | Sequence[str] | Sequence[bool] | Sequence[int] | Sequence[float] | Sequence[datetime] | Sequence[UUID] | Sequence[Mapping[str, WeaviateField]]] | Sequence[str] | Sequence[bool] | Sequence[int] | Sequence[float] | Sequence[datetime] | Sequence[UUID] | Sequence[Mapping[str, None | str | bool | int | float | datetime | UUID | GeoCoordinate | PhoneNumber | _PhoneNumber | Mapping[str, WeaviateField] | Sequence[str] | Sequence[bool] | Sequence[int] | Sequence[float] | Sequence[datetime] | Sequence[UUID] | Sequence[Mapping[str, WeaviateField]]]]] | None
- tenant: str | None
- references: Mapping[str, str | UUID | Sequence[str | UUID] | ReferenceToMulti] | None
- index: int
- retry_count: int = 0
- class weaviate.collections.classes.batch._BatchReference(from_: str, to: str, tenant: str | None, from_uuid: str, to_uuid: str | None, index: int)[source]
Bases:
object- Parameters:
from_ (str)
to (str)
tenant (str | None)
from_uuid (str)
to_uuid (str | None)
index (int)
- from_: str
- to: str
- tenant: str | None
- from_uuid: str
- to_uuid: str | None
- index: int
- class weaviate.collections.classes.batch.BatchObject(*, collection, properties=None, references=None, uuid=None, vector=None, tenant=None, index, retry_count=0)[source]
Bases:
BaseModelA Weaviate object to be added to the database.
Performs validation on the class name and UUID, and automatically generates a UUID if one is not provided. Also converts the vector to a list of floats if it is provided as a numpy array.
Create a new model by parsing and validating input data from keyword arguments.
Raises [ValidationError][pydantic_core.ValidationError] if the input data cannot be validated to form a valid model.
self is explicitly positional-only to allow self as a field name.
- Parameters:
collection (Annotated[str, MinLen(min_length=1)])
properties (Dict[str, Any] | None)
references (Mapping[str, str | UUID | Sequence[str | UUID] | ReferenceToMulti] | None)
uuid (str | UUID | None)
vector (Mapping[str, Sequence[int | float] | Sequence[Sequence[int | float]]] | Sequence[int | float] | None)
tenant (str | None)
index (int)
retry_count (int)
- collection: str
- properties: Dict[str, Any] | None
- references: Mapping[str, str | UUID | Sequence[str | UUID] | ReferenceToMulti] | None
- uuid: str | UUID | None
- vector: Mapping[str, Sequence[int | float] | Sequence[Sequence[int | float]]] | Sequence[int | float] | None
- tenant: str | None
- index: int
- retry_count: int
- classmethod _from_internal(obj)[source]
- Parameters:
obj (_BatchObject)
- Return type:
- _abc_impl = <_abc._abc_data object>
- model_config = {}
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- class weaviate.collections.classes.batch.Shard(*, collection, tenant=None)[source]
Bases:
BaseModelUse this class when defining a shard whose vector indexing process will be awaited for in a sync blocking fashion.
Create a new model by parsing and validating input data from keyword arguments.
Raises [ValidationError][pydantic_core.ValidationError] if the input data cannot be validated to form a valid model.
self is explicitly positional-only to allow self as a field name.
- Parameters:
collection (str)
tenant (str | None)
- collection: str
- tenant: str | None
- _abc_impl = <_abc._abc_data object>
- model_config = {}
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- class weaviate.collections.classes.batch.BatchReference(*, from_object_collection, from_object_uuid, from_property_name, to_object_uuid, to_object_collection=None, tenant=None, index)[source]
Bases:
BaseModelA reference between two objects in Weaviate.
Performs validation on the class names and UUIDs.
Converts provided data to an internal object containing beacons for insertion into Weaviate.
Create a new model by parsing and validating input data from keyword arguments.
Raises [ValidationError][pydantic_core.ValidationError] if the input data cannot be validated to form a valid model.
self is explicitly positional-only to allow self as a field name.
- Parameters:
from_object_collection (Annotated[str, MinLen(min_length=1)])
from_object_uuid (str | UUID)
from_property_name (str)
to_object_uuid (str | UUID)
to_object_collection (str | None)
tenant (str | None)
index (int)
- from_object_collection: str
- from_object_uuid: str | UUID
- from_property_name: str
- to_object_uuid: str | UUID
- to_object_collection: str | None
- tenant: str | None
- index: int
- classmethod _validate_to_object_collection(v)[source]
- Parameters:
v (str | None)
- Return type:
str | None
- classmethod _from_internal(ref)[source]
- Parameters:
ref (_BatchReference)
- Return type:
- _abc_impl = <_abc._abc_data object>
- model_config = {}
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- class weaviate.collections.classes.batch.ErrorObject(message, object_, original_uuid=None)[source]
Bases:
objectThis class contains the error information for a single object in a batch operation.
- Parameters:
message (str)
object_ (BatchObject)
original_uuid (str | UUID | None)
- message: str
- object_: BatchObject
- original_uuid: str | UUID | None = None
- class weaviate.collections.classes.batch.ErrorReference(message, reference)[source]
Bases:
objectThis class contains the error information for a single reference in a batch operation.
- Parameters:
message (str)
reference (BatchReference)
- message: str
- reference: BatchReference
- class weaviate.collections.classes.batch.BatchObjectReturn(_all_responses=<factory>, elapsed_seconds=0.0, errors=<factory>, uuids=<factory>, has_errors=False)[source]
Bases:
objectThis class contains the results of a batch insert_many operation.
Since the individual objects within the batch can error for differing reasons, the data is split up within this class for ease use when performing error checking, handling, and data revalidation.
Note
Due to concerns over memory usage, this object will only ever store the last MAX_STORED_RESULTS uuids in the uuids dictionary and MAX_STORED_RESULTS in the all_responses list. If more than MAX_STORED_RESULTS uuids are added to the dictionary, the oldest uuids will be removed. If the number of objects inserted in this batch exceeds MAX_STORED_RESULTS, the all_responses list will only contain the last MAX_STORED_RESULTS objects. The keys of the errors and uuids dictionaries will always be equivalent to the original_index of the objects as you added them to the batching loop but won’t necessarily be the same as the indices in the all_responses list because of this.
- Parameters:
_all_responses (List[UUID | ErrorObject])
elapsed_seconds (float)
errors (Dict[int, ErrorObject])
uuids (Dict[int, UUID])
has_errors (bool)
- elapsed_seconds
The time taken to perform the batch operation.
- Type:
float
- errors
A dictionary of all the failed responses from the batch operation. The keys are the indices of the objects in the batch, and the values are the Error objects.
- Type:
- uuids
A dictionary of all the successful responses from the batch operation. The keys are the indices of the objects in the batch, and the values are the uuid_package.UUID objects.
- Type:
Dict[int, uuid.UUID]
- has_errors
A boolean indicating whether or not any of the objects in the batch failed to be inserted. If this is True, then the errors dictionary will contain at least one entry.
- Type:
bool
- _all_responses: List[UUID | ErrorObject]
- elapsed_seconds: float = 0.0
- errors: Dict[int, ErrorObject]
- uuids: Dict[int, UUID]
- has_errors: bool = False
- property all_responses: List[UUID | ErrorObject]
A list of all the responses from the batch operation. Each response is either a uuid_package.UUID object or an Error object.
WARNING: This only stores the last MAX_STORED_RESULTS objects. If more than MAX_STORED_RESULTS objects are added to the batch, the oldest objects will be removed from this list.
- Type:
@deprecated
- add_uuids(uuids)[source]
Add a list of uuids to the batch return object.
- Parameters:
uuids (Dict[int, UUID])
- Return type:
None
- add_errors(errors)[source]
Add a list of errors to the batch return object.
- Parameters:
errors (Dict[int, ErrorObject])
- Return type:
None
- class weaviate.collections.classes.batch.BatchReferenceReturn(elapsed_seconds=0.0, errors=<factory>, has_errors=False)[source]
Bases:
objectThis class contains the results of a batch insert_many_references operation.
Since the individual references within the batch can error for differing reasons, the data is split up within this class for ease use when performing error checking, handling, and data revalidation.
- Parameters:
elapsed_seconds (float)
errors (Dict[int, ErrorReference])
has_errors (bool)
- elapsed_seconds
The time taken to perform the batch operation.
- Type:
float
- errors
A dictionary of all the failed responses from the batch operation. The keys are the indices of the references in the batch, and the values are the Error objects.
- Type:
Dict[int, weaviate.collections.classes.batch.ErrorReference]
- has_errors
A boolean indicating whether or not any of the references in the batch failed to be inserted. If this is True, then the errors dictionary will contain at least one entry.
- Type:
bool
- elapsed_seconds: float = 0.0
- errors: Dict[int, ErrorReference]
- has_errors: bool = False
- add_errors(errors)[source]
Add a list of errors to the batch return object.
- Parameters:
errors (Dict[int, ErrorReference])
- Return type:
None
- class weaviate.collections.classes.batch.BatchResult[source]
Bases:
objectThis class contains the results of a batch operation.
Since the individual objects and references within the batch can error for differing reasons, the data is split up within this class for ease use when performing error checking, handling, and data revalidation.
- objs
The results of the batch object operation.
- refs
The results of the batch reference operation.
- objs: BatchObjectReturn
- refs: BatchReferenceReturn
- class weaviate.collections.classes.batch.DeleteManyObject(uuid, successful, error=None)[source]
Bases:
objectThis class contains the objects of a delete_many operation.
- Parameters:
uuid (UUID)
successful (bool)
error (str | None)
- uuid: UUID
- successful: bool
- error: str | None = None
- class weaviate.collections.classes.batch.DeleteManyReturn(failed, matches, objects, successful)[source]
Bases:
Generic[T]This class contains the results of a delete_many operation..
- Parameters:
failed (int)
matches (int)
objects (T)
successful (int)
- failed: int
- matches: int
- objects: T
- successful: int
weaviate.collections.classes.cluster
- class weaviate.collections.classes.cluster.Shard(collection, name, node, object_count, vector_indexing_status, vector_queue_length, compressed, loaded)[source]
Bases:
objectThe properties of a single shard of a collection.
- Parameters:
collection (str)
name (str)
node (str)
object_count (int)
vector_indexing_status (Literal['READONLY', 'INDEXING', 'READY', 'LAZY_LOADING'])
vector_queue_length (int)
compressed (bool)
loaded (bool | None)
- collection: str
- name: str
- node: str
- object_count: int
- vector_indexing_status: Literal['READONLY', 'INDEXING', 'READY', 'LAZY_LOADING']
- vector_queue_length: int
- compressed: bool
- loaded: bool | None
- class weaviate.collections.classes.cluster.Stats(object_count, shard_count)[source]
Bases:
objectThe statistics of a collection.
- Parameters:
object_count (int)
shard_count (int)
- object_count: int
- shard_count: int
- class weaviate.collections.classes.cluster.Node(git_hash, name, shards, stats, status, version)[source]
Bases:
Generic[Sh,St]The properties of a single node in the cluster.
- Parameters:
git_hash (str)
name (str)
shards (Sh)
stats (St)
status (str)
version (str)
- git_hash: str
- name: str
- shards: Sh
- stats: St
- status: str
- version: str
weaviate.collections.classes.config
- class weaviate.collections.classes.config.ConsistencyLevel(*values)[source]
Bases:
str,BaseEnumThe consistency levels when writing to Weaviate with replication enabled.
- ALL
Wait for confirmation of write success from all, N, replicas.
- ONE
Wait for confirmation of write success from only one replica.
- QUORUM
Wait for confirmation of write success from a quorum: N/2+1, of replicas.
- ALL = 'ALL'
- ONE = 'ONE'
- QUORUM = 'QUORUM'
- class weaviate.collections.classes.config.DataType(*values)[source]
Bases:
str,BaseEnumThe available primitive data types in Weaviate.
- TEXT
Text data type.
- TEXT_ARRAY
Text array data type.
- INT
Integer data type.
- INT_ARRAY
Integer array data type.
- BOOL
Boolean data type.
- BOOL_ARRAY
Boolean array data type.
- NUMBER
Number data type.
- NUMBER_ARRAY
Number array data type.
- DATE
Date data type.
- DATE_ARRAY
Date array data type.
- UUID
UUID data type.
- UUID_ARRAY
UUID array data type.
- GEO_COORDINATES
Geo coordinates data type.
- BLOB
Blob data type.
- PHONE_NUMBER
Phone number data type.
- OBJECT
Object data type.
- OBJECT_ARRAY
Object array data type.
- TEXT = 'text'
- TEXT_ARRAY = 'text[]'
- INT = 'int'
- INT_ARRAY = 'int[]'
- BOOL = 'boolean'
- BOOL_ARRAY = 'boolean[]'
- NUMBER = 'number'
- NUMBER_ARRAY = 'number[]'
- DATE = 'date'
- DATE_ARRAY = 'date[]'
- UUID = 'uuid'
- UUID_ARRAY = 'uuid[]'
- GEO_COORDINATES = 'geoCoordinates'
- BLOB = 'blob'
- PHONE_NUMBER = 'phoneNumber'
- OBJECT = 'object'
- OBJECT_ARRAY = 'object[]'
- class weaviate.collections.classes.config.Tokenization(*values)[source]
Bases:
str,BaseEnumThe available inverted index tokenization methods for text properties in Weaviate.
- WORD
Tokenize by word.
- WHITESPACE
Tokenize by whitespace.
- LOWERCASE
Tokenize by lowercase.
- FIELD
Tokenize by field.
- GSE
Tokenize using GSE (for Chinese and Japanese).
- TRIGRAM
Tokenize into trigrams.
- KAGOME_JA
Tokenize using the ‘Kagome’ tokenizer (for Japanese).
- KAGOME_KR
Tokenize using the ‘Kagome’ tokenizer and a Korean MeCab dictionary (for Korean).
- GSE_CH
Tokenize using GSE (for Chinese).
- WORD = 'word'
- WHITESPACE = 'whitespace'
- LOWERCASE = 'lowercase'
- FIELD = 'field'
- GSE = 'gse'
- TRIGRAM = 'trigram'
- KAGOME_JA = 'kagome_ja'
- KAGOME_KR = 'kagome_kr'
- GSE_CH = 'gse_ch'
- class weaviate.collections.classes.config.GenerativeSearches(*values)[source]
Bases:
str,BaseEnumThe available generative search modules in Weaviate.
These modules generate text from text-based inputs. See the docs for more details.
- AWS
Weaviate module backed by AWS Bedrock generative models.
- ANTHROPIC
Weaviate module backed by Anthropic generative models.
- ANYSCALE
Weaviate module backed by Anyscale generative models.
- COHERE
Weaviate module backed by Cohere generative models.
- CONTEXTUALAI
Weaviate module backed by ContextualAI generative models.
- DATABRICKS
Weaviate module backed by Databricks generative models.
- FRIENDLIAI
Weaviate module backed by FriendliAI generative models.
- MISTRAL
Weaviate module backed by Mistral generative models.
- NVIDIA
Weaviate module backed by NVIDIA generative models.
- OLLAMA
Weaviate module backed by generative models deployed on Ollama infrastructure.
- OPENAI
Weaviate module backed by OpenAI and Azure-OpenAI generative models.
- PALM
Weaviate module backed by PaLM generative models.
- AWS = 'generative-aws'
- ANTHROPIC = 'generative-anthropic'
- ANYSCALE = 'generative-anyscale'
- COHERE = 'generative-cohere'
- CONTEXTUALAI = 'generative-contextualai'
- DATABRICKS = 'generative-databricks'
- DUMMY = 'generative-dummy'
- FRIENDLIAI = 'generative-friendliai'
- MISTRAL = 'generative-mistral'
- NVIDIA = 'generative-nvidia'
- OLLAMA = 'generative-ollama'
- OPENAI = 'generative-openai'
- PALM = 'generative-palm'
- XAI = 'generative-xai'
- class weaviate.collections.classes.config.Rerankers(*values)[source]
Bases:
str,BaseEnumThe available reranker modules in Weaviate.
These modules rerank the results of a search query. See the docs for more details.
- NONE
No reranker.
- COHERE
Weaviate module backed by Cohere reranking models.
- CONTEXTUALAI
Weaviate module backed by ContextualAI reranking models.
- TRANSFORMERS
Weaviate module backed by Transformers reranking models.
- VOYAGEAI
Weaviate module backed by VoyageAI reranking models.
- JINAAI
Weaviate module backed by JinaAI reranking models.
- NVIDIA
Weaviate module backed by NVIDIA reranking models.
- NONE = 'none'
- COHERE = 'reranker-cohere'
- CONTEXTUALAI = 'reranker-contextualai'
- TRANSFORMERS = 'reranker-transformers'
- VOYAGEAI = 'reranker-voyageai'
- JINAAI = 'reranker-jinaai'
- NVIDIA = 'reranker-nvidia'
- class weaviate.collections.classes.config.StopwordsPreset(*values)[source]
Bases:
str,BaseEnumPreset stopwords to use in the Stopwords class.
- EN
English stopwords.
- NONE
No stopwords.
- NONE = 'none'
- EN = 'en'
- class weaviate.collections.classes.config.ReplicationDeletionStrategy(*values)[source]
Bases:
str,BaseEnumHow object deletions in multi node environments should be resolved.
- PERMANENT_DELETION
Once an object has been deleted on one node it will be deleted on all nodes in case of conflicts.
- NO_AUTOMATED_RESOLUTION
No deletion resolution.
- DELETE_ON_CONFLICT = 'DeleteOnConflict'
- NO_AUTOMATED_RESOLUTION = 'NoAutomatedResolution'
- TIME_BASED_RESOLUTION = 'TimeBasedResolution'
- class weaviate.collections.classes.config._ShardingConfigCreate(*, virtualPerPhysical, desiredCount, desiredVirtualCount, key='_id', strategy='hash', function='murmur3')[source]
Bases:
_ConfigCreateModelCreate a new model by parsing and validating input data from keyword arguments.
Raises [ValidationError][pydantic_core.ValidationError] if the input data cannot be validated to form a valid model.
self is explicitly positional-only to allow self as a field name.
- Parameters:
virtualPerPhysical (int | None)
desiredCount (int | None)
desiredVirtualCount (int | None)
key (str)
strategy (str)
function (str)
- virtualPerPhysical: int | None
- desiredCount: int | None
- desiredVirtualCount: int | None
- key: str
- strategy: str
- function: str
- _abc_impl = <_abc._abc_data object>
- model_config = {'strict': True}
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- class weaviate.collections.classes.config._AsyncReplicationConfigCreate(*, maxWorkers, hashtreeHeight, frequency, frequencyWhilePropagating, aliveNodesCheckingFrequency, loggingFrequency, diffBatchSize, diffPerNodeTimeout, prePropagationTimeout, propagationTimeout, propagationLimit, propagationDelay, propagationConcurrency, propagationBatchSize)[source]
Bases:
_ConfigCreateModelCreate a new model by parsing and validating input data from keyword arguments.
Raises [ValidationError][pydantic_core.ValidationError] if the input data cannot be validated to form a valid model.
self is explicitly positional-only to allow self as a field name.
- Parameters:
maxWorkers (int | None)
hashtreeHeight (int | None)
frequency (int | None)
frequencyWhilePropagating (int | None)
aliveNodesCheckingFrequency (int | None)
loggingFrequency (int | None)
diffBatchSize (int | None)
diffPerNodeTimeout (int | None)
prePropagationTimeout (int | None)
propagationTimeout (int | None)
propagationLimit (int | None)
propagationDelay (int | None)
propagationConcurrency (int | None)
propagationBatchSize (int | None)
- maxWorkers: int | None
- hashtreeHeight: int | None
- frequency: int | None
- frequencyWhilePropagating: int | None
- aliveNodesCheckingFrequency: int | None
- loggingFrequency: int | None
- diffBatchSize: int | None
- diffPerNodeTimeout: int | None
- prePropagationTimeout: int | None
- propagationTimeout: int | None
- propagationLimit: int | None
- propagationDelay: int | None
- propagationConcurrency: int | None
- propagationBatchSize: int | None
- _abc_impl = <_abc._abc_data object>
- model_config = {'strict': True}
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- class weaviate.collections.classes.config._AsyncReplicationConfigUpdate(*, maxWorkers, hashtreeHeight, frequency, frequencyWhilePropagating, aliveNodesCheckingFrequency, loggingFrequency, diffBatchSize, diffPerNodeTimeout, prePropagationTimeout, propagationTimeout, propagationLimit, propagationDelay, propagationConcurrency, propagationBatchSize)[source]
Bases:
_ConfigUpdateModelCreate a new model by parsing and validating input data from keyword arguments.
Raises [ValidationError][pydantic_core.ValidationError] if the input data cannot be validated to form a valid model.
self is explicitly positional-only to allow self as a field name.
- Parameters:
maxWorkers (int | None)
hashtreeHeight (int | None)
frequency (int | None)
frequencyWhilePropagating (int | None)
aliveNodesCheckingFrequency (int | None)
loggingFrequency (int | None)
diffBatchSize (int | None)
diffPerNodeTimeout (int | None)
prePropagationTimeout (int | None)
propagationTimeout (int | None)
propagationLimit (int | None)
propagationDelay (int | None)
propagationConcurrency (int | None)
propagationBatchSize (int | None)
- maxWorkers: int | None
- hashtreeHeight: int | None
- frequency: int | None
- frequencyWhilePropagating: int | None
- aliveNodesCheckingFrequency: int | None
- loggingFrequency: int | None
- diffBatchSize: int | None
- diffPerNodeTimeout: int | None
- prePropagationTimeout: int | None
- propagationTimeout: int | None
- propagationLimit: int | None
- propagationDelay: int | None
- propagationConcurrency: int | None
- propagationBatchSize: int | None
- _abc_impl = <_abc._abc_data object>
- model_config = {'strict': True}
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- class weaviate.collections.classes.config._ReplicationConfigCreate(*, factor, asyncEnabled, asyncConfig, deletionStrategy)[source]
Bases:
_ConfigCreateModelCreate a new model by parsing and validating input data from keyword arguments.
Raises [ValidationError][pydantic_core.ValidationError] if the input data cannot be validated to form a valid model.
self is explicitly positional-only to allow self as a field name.
- Parameters:
factor (int | None)
asyncEnabled (bool | None)
asyncConfig (_AsyncReplicationConfigCreate | None)
deletionStrategy (ReplicationDeletionStrategy | None)
- factor: int | None
- asyncEnabled: bool | None
- asyncConfig: _AsyncReplicationConfigCreate | None
- deletionStrategy: ReplicationDeletionStrategy | None
- _abc_impl = <_abc._abc_data object>
- model_config = {'strict': True}
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- class weaviate.collections.classes.config._ReplicationConfigUpdate(*, factor, asyncEnabled, asyncConfig, deletionStrategy)[source]
Bases:
_ConfigUpdateModelCreate a new model by parsing and validating input data from keyword arguments.
Raises [ValidationError][pydantic_core.ValidationError] if the input data cannot be validated to form a valid model.
self is explicitly positional-only to allow self as a field name.
- Parameters:
factor (int | None)
asyncEnabled (bool | None)
asyncConfig (_AsyncReplicationConfigUpdate | None)
deletionStrategy (ReplicationDeletionStrategy | None)
- factor: int | None
- asyncEnabled: bool | None
- asyncConfig: _AsyncReplicationConfigUpdate | None
- deletionStrategy: ReplicationDeletionStrategy | None
- merge_with_existing(schema)[source]
- Parameters:
schema (Dict[str, Any])
- Return type:
Dict[str, Any]
- _abc_impl = <_abc._abc_data object>
- model_config = {'strict': True}
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- class weaviate.collections.classes.config._BM25ConfigCreate(*, b, k1)[source]
Bases:
_ConfigCreateModelCreate a new model by parsing and validating input data from keyword arguments.
Raises [ValidationError][pydantic_core.ValidationError] if the input data cannot be validated to form a valid model.
self is explicitly positional-only to allow self as a field name.
- Parameters:
b (float)
k1 (float)
- b: float
- k1: float
- _abc_impl = <_abc._abc_data object>
- model_config = {'strict': True}
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- class weaviate.collections.classes.config._BM25ConfigUpdate(*, b, k1)[source]
Bases:
_ConfigUpdateModelCreate a new model by parsing and validating input data from keyword arguments.
Raises [ValidationError][pydantic_core.ValidationError] if the input data cannot be validated to form a valid model.
self is explicitly positional-only to allow self as a field name.
- Parameters:
b (float | None)
k1 (float | None)
- b: float | None
- k1: float | None
- _abc_impl = <_abc._abc_data object>
- model_config = {'strict': True}
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- class weaviate.collections.classes.config._StopwordsCreate(*, preset, additions, removals)[source]
Bases:
_ConfigCreateModelCreate a new model by parsing and validating input data from keyword arguments.
Raises [ValidationError][pydantic_core.ValidationError] if the input data cannot be validated to form a valid model.
self is explicitly positional-only to allow self as a field name.
- Parameters:
preset (StopwordsPreset | None)
additions (List[str] | None)
removals (List[str] | None)
- preset: StopwordsPreset | None
- additions: List[str] | None
- removals: List[str] | None
- _abc_impl = <_abc._abc_data object>
- model_config = {'strict': True}
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- class weaviate.collections.classes.config._StopwordsUpdate(*, preset, additions, removals)[source]
Bases:
_ConfigUpdateModelCreate a new model by parsing and validating input data from keyword arguments.
Raises [ValidationError][pydantic_core.ValidationError] if the input data cannot be validated to form a valid model.
self is explicitly positional-only to allow self as a field name.
- Parameters:
preset (StopwordsPreset | None)
additions (List[str] | None)
removals (List[str] | None)
- preset: StopwordsPreset | None
- additions: List[str] | None
- removals: List[str] | None
- _abc_impl = <_abc._abc_data object>
- model_config = {'strict': True}
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- class weaviate.collections.classes.config._InvertedIndexConfigCreate(*, bm25, cleanupIntervalSeconds, indexTimestamps, indexPropertyLength, indexNullState, stopwords)[source]
Bases:
_ConfigCreateModelCreate a new model by parsing and validating input data from keyword arguments.
Raises [ValidationError][pydantic_core.ValidationError] if the input data cannot be validated to form a valid model.
self is explicitly positional-only to allow self as a field name.
- Parameters:
bm25 (_BM25ConfigCreate | None)
cleanupIntervalSeconds (int | None)
indexTimestamps (bool | None)
indexPropertyLength (bool | None)
indexNullState (bool | None)
stopwords (_StopwordsCreate)
- bm25: _BM25ConfigCreate | None
- cleanupIntervalSeconds: int | None
- indexTimestamps: bool | None
- indexPropertyLength: bool | None
- indexNullState: bool | None
- stopwords: _StopwordsCreate
- _abc_impl = <_abc._abc_data object>
- model_config = {'strict': True}
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- class weaviate.collections.classes.config._InvertedIndexConfigUpdate(*, bm25, cleanupIntervalSeconds, stopwords)[source]
Bases:
_ConfigUpdateModelCreate a new model by parsing and validating input data from keyword arguments.
Raises [ValidationError][pydantic_core.ValidationError] if the input data cannot be validated to form a valid model.
self is explicitly positional-only to allow self as a field name.
- Parameters:
bm25 (_BM25ConfigUpdate | None)
cleanupIntervalSeconds (int | None)
stopwords (_StopwordsUpdate | None)
- bm25: _BM25ConfigUpdate | None
- cleanupIntervalSeconds: int | None
- stopwords: _StopwordsUpdate | None
- _abc_impl = <_abc._abc_data object>
- model_config = {'strict': True}
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- class weaviate.collections.classes.config._MultiTenancyConfigCreate(*, enabled, autoTenantCreation, autoTenantActivation)[source]
Bases:
_ConfigCreateModelCreate a new model by parsing and validating input data from keyword arguments.
Raises [ValidationError][pydantic_core.ValidationError] if the input data cannot be validated to form a valid model.
self is explicitly positional-only to allow self as a field name.
- Parameters:
enabled (bool)
autoTenantCreation (bool | None)
autoTenantActivation (bool | None)
- enabled: bool
- autoTenantCreation: bool | None
- autoTenantActivation: bool | None
- _abc_impl = <_abc._abc_data object>
- model_config = {'strict': True}
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- class weaviate.collections.classes.config._MultiTenancyConfigUpdate(*, autoTenantCreation, autoTenantActivation)[source]
Bases:
_ConfigUpdateModelCreate a new model by parsing and validating input data from keyword arguments.
Raises [ValidationError][pydantic_core.ValidationError] if the input data cannot be validated to form a valid model.
self is explicitly positional-only to allow self as a field name.
- Parameters:
autoTenantCreation (bool | None)
autoTenantActivation (bool | None)
- autoTenantCreation: bool | None
- autoTenantActivation: bool | None
- _abc_impl = <_abc._abc_data object>
- model_config = {'strict': True}
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- class weaviate.collections.classes.config._GenerativeProvider(*, generative)[source]
Bases:
_ConfigCreateModelCreate a new model by parsing and validating input data from keyword arguments.
Raises [ValidationError][pydantic_core.ValidationError] if the input data cannot be validated to form a valid model.
self is explicitly positional-only to allow self as a field name.
- Parameters:
generative (GenerativeSearches | _EnumLikeStr)
- generative: GenerativeSearches | _EnumLikeStr
- _abc_impl = <_abc._abc_data object>
- model_config = {'strict': True}
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- class weaviate.collections.classes.config._GenerativeAnyscale(*, generative=GenerativeSearches.ANYSCALE, baseURL, temperature, model)[source]
Bases:
_GenerativeProviderCreate a new model by parsing and validating input data from keyword arguments.
Raises [ValidationError][pydantic_core.ValidationError] if the input data cannot be validated to form a valid model.
self is explicitly positional-only to allow self as a field name.
- Parameters:
generative (GenerativeSearches | _EnumLikeStr)
baseURL (str | None)
temperature (float | None)
model (str | None)
- generative: GenerativeSearches | _EnumLikeStr
- baseURL: str | None
- temperature: float | None
- model: str | None
- _abc_impl = <_abc._abc_data object>
- model_config = {'strict': True}
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- class weaviate.collections.classes.config._GenerativeCustom(*, generative, module_config)[source]
Bases:
_GenerativeProviderCreate a new model by parsing and validating input data from keyword arguments.
Raises [ValidationError][pydantic_core.ValidationError] if the input data cannot be validated to form a valid model.
self is explicitly positional-only to allow self as a field name.
- Parameters:
generative (GenerativeSearches | _EnumLikeStr)
module_config (Dict[str, Any] | None)
- module_config: Dict[str, Any] | None
- _abc_impl = <_abc._abc_data object>
- model_config = {'strict': True}
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- class weaviate.collections.classes.config._GenerativeDatabricks(*, generative=GenerativeSearches.DATABRICKS, endpoint, maxTokens, temperature, topK, topP)[source]
Bases:
_GenerativeProviderCreate a new model by parsing and validating input data from keyword arguments.
Raises [ValidationError][pydantic_core.ValidationError] if the input data cannot be validated to form a valid model.
self is explicitly positional-only to allow self as a field name.
- Parameters:
generative (GenerativeSearches | _EnumLikeStr)
endpoint (str)
maxTokens (int | None)
temperature (float | None)
topK (int | None)
topP (float | None)
- generative: GenerativeSearches | _EnumLikeStr
- endpoint: str
- maxTokens: int | None
- temperature: float | None
- topK: int | None
- topP: float | None
- _abc_impl = <_abc._abc_data object>
- model_config = {'strict': True}
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- class weaviate.collections.classes.config._GenerativeMistral(*, generative=GenerativeSearches.MISTRAL, temperature, model, maxTokens, baseURL)[source]
Bases:
_GenerativeProviderCreate a new model by parsing and validating input data from keyword arguments.
Raises [ValidationError][pydantic_core.ValidationError] if the input data cannot be validated to form a valid model.
self is explicitly positional-only to allow self as a field name.
- Parameters:
generative (GenerativeSearches | _EnumLikeStr)
temperature (float | None)
model (str | None)
maxTokens (int | None)
baseURL (str | None)
- generative: GenerativeSearches | _EnumLikeStr
- temperature: float | None
- model: str | None
- maxTokens: int | None
- baseURL: str | None
- _abc_impl = <_abc._abc_data object>
- model_config = {'strict': True}
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- class weaviate.collections.classes.config._GenerativeNvidia(*, generative=GenerativeSearches.NVIDIA, temperature, model, maxTokens, baseURL)[source]
Bases:
_GenerativeProviderCreate a new model by parsing and validating input data from keyword arguments.
Raises [ValidationError][pydantic_core.ValidationError] if the input data cannot be validated to form a valid model.
self is explicitly positional-only to allow self as a field name.
- Parameters:
generative (GenerativeSearches | _EnumLikeStr)
temperature (float | None)
model (str | None)
maxTokens (int | None)
baseURL (str | None)
- generative: GenerativeSearches | _EnumLikeStr
- temperature: float | None
- model: str | None
- maxTokens: int | None
- baseURL: str | None
- _abc_impl = <_abc._abc_data object>
- model_config = {'strict': True}
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- class weaviate.collections.classes.config._GenerativeXai(*, generative=GenerativeSearches.XAI, temperature, model, maxTokens, baseURL, topP)[source]
Bases:
_GenerativeProviderCreate a new model by parsing and validating input data from keyword arguments.
Raises [ValidationError][pydantic_core.ValidationError] if the input data cannot be validated to form a valid model.
self is explicitly positional-only to allow self as a field name.
- Parameters:
generative (GenerativeSearches | _EnumLikeStr)
temperature (float | None)
model (str | None)
maxTokens (int | None)
baseURL (str | None)
topP (float | None)
- generative: GenerativeSearches | _EnumLikeStr
- temperature: float | None
- model: str | None
- maxTokens: int | None
- baseURL: str | None
- topP: float | None
- _abc_impl = <_abc._abc_data object>
- model_config = {'strict': True}
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- class weaviate.collections.classes.config._GenerativeFriendliai(*, generative=GenerativeSearches.FRIENDLIAI, temperature, model, maxTokens, baseURL)[source]
Bases:
_GenerativeProviderCreate a new model by parsing and validating input data from keyword arguments.
Raises [ValidationError][pydantic_core.ValidationError] if the input data cannot be validated to form a valid model.
self is explicitly positional-only to allow self as a field name.
- Parameters:
generative (GenerativeSearches | _EnumLikeStr)
temperature (float | None)
model (str | None)
maxTokens (int | None)
baseURL (str | None)
- generative: GenerativeSearches | _EnumLikeStr
- temperature: float | None
- model: str | None
- maxTokens: int | None
- baseURL: str | None
- _abc_impl = <_abc._abc_data object>
- model_config = {'strict': True}
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- class weaviate.collections.classes.config._GenerativeOllama(*, generative=GenerativeSearches.OLLAMA, model, apiEndpoint)[source]
Bases:
_GenerativeProviderCreate a new model by parsing and validating input data from keyword arguments.
Raises [ValidationError][pydantic_core.ValidationError] if the input data cannot be validated to form a valid model.
self is explicitly positional-only to allow self as a field name.
- Parameters:
generative (GenerativeSearches | _EnumLikeStr)
model (str | None)
apiEndpoint (str | None)
- generative: GenerativeSearches | _EnumLikeStr
- model: str | None
- apiEndpoint: str | None
- _abc_impl = <_abc._abc_data object>
- model_config = {'strict': True}
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- class weaviate.collections.classes.config._GenerativeOpenAIConfigBase(*, generative=GenerativeSearches.OPENAI, baseURL, frequencyPenalty, presencePenalty, maxTokens, temperature, topP)[source]
Bases:
_GenerativeProviderCreate a new model by parsing and validating input data from keyword arguments.
Raises [ValidationError][pydantic_core.ValidationError] if the input data cannot be validated to form a valid model.
self is explicitly positional-only to allow self as a field name.
- Parameters:
generative (GenerativeSearches | _EnumLikeStr)
baseURL (AnyHttpUrl | None)
frequencyPenalty (float | None)
presencePenalty (float | None)
maxTokens (int | None)
temperature (float | None)
topP (float | None)
- generative: GenerativeSearches | _EnumLikeStr
- baseURL: AnyHttpUrl | None
- frequencyPenalty: float | None
- presencePenalty: float | None
- maxTokens: int | None
- temperature: float | None
- topP: float | None
- _abc_impl = <_abc._abc_data object>
- model_config = {'strict': True}
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- class weaviate.collections.classes.config._GenerativeOpenAIConfig(*, generative=GenerativeSearches.OPENAI, baseURL, frequencyPenalty, presencePenalty, maxTokens, temperature, topP, model, verbosity, reasoningEffort)[source]
Bases:
_GenerativeOpenAIConfigBaseCreate a new model by parsing and validating input data from keyword arguments.
Raises [ValidationError][pydantic_core.ValidationError] if the input data cannot be validated to form a valid model.
self is explicitly positional-only to allow self as a field name.
- Parameters:
generative (GenerativeSearches | _EnumLikeStr)
baseURL (AnyHttpUrl | None)
frequencyPenalty (float | None)
presencePenalty (float | None)
maxTokens (int | None)
temperature (float | None)
topP (float | None)
model (str | None)
verbosity (str | None)
reasoningEffort (str | None)
- model: str | None
- verbosity: str | None
- reasoningEffort: str | None
- _abc_impl = <_abc._abc_data object>
- model_config = {'strict': True}
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- class weaviate.collections.classes.config._GenerativeAzureOpenAIConfig(*, generative=GenerativeSearches.OPENAI, baseURL, frequencyPenalty, presencePenalty, maxTokens, temperature, topP, resourceName, deploymentId)[source]
Bases:
_GenerativeOpenAIConfigBaseCreate a new model by parsing and validating input data from keyword arguments.
Raises [ValidationError][pydantic_core.ValidationError] if the input data cannot be validated to form a valid model.
self is explicitly positional-only to allow self as a field name.
- Parameters:
generative (GenerativeSearches | _EnumLikeStr)
baseURL (AnyHttpUrl | None)
frequencyPenalty (float | None)
presencePenalty (float | None)
maxTokens (int | None)
temperature (float | None)
topP (float | None)
resourceName (str)
deploymentId (str)
- resourceName: str
- deploymentId: str
- _abc_impl = <_abc._abc_data object>
- model_config = {'strict': True}
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- class weaviate.collections.classes.config._GenerativeCohereConfig(*, generative=GenerativeSearches.COHERE, baseURL, k, model, maxTokens, stopSequences, temperature)[source]
Bases:
_GenerativeProviderCreate a new model by parsing and validating input data from keyword arguments.
Raises [ValidationError][pydantic_core.ValidationError] if the input data cannot be validated to form a valid model.
self is explicitly positional-only to allow self as a field name.
- Parameters:
generative (GenerativeSearches | _EnumLikeStr)
baseURL (AnyHttpUrl | None)
k (int | None)
model (str | None)
maxTokens (int | None)
stopSequences (List[str] | None)
temperature (float | None)
- generative: GenerativeSearches | _EnumLikeStr
- baseURL: AnyHttpUrl | None
- k: int | None
- model: str | None
- maxTokens: int | None
- stopSequences: List[str] | None
- temperature: float | None
- _abc_impl = <_abc._abc_data object>
- model_config = {'strict': True}
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- class weaviate.collections.classes.config._GenerativeContextualAIConfig(*, generative=GenerativeSearches.CONTEXTUALAI, model, temperature, topP, maxNewTokens, systemPrompt, avoidCommentary, knowledge)[source]
Bases:
_GenerativeProviderCreate a new model by parsing and validating input data from keyword arguments.
Raises [ValidationError][pydantic_core.ValidationError] if the input data cannot be validated to form a valid model.
self is explicitly positional-only to allow self as a field name.
- Parameters:
generative (GenerativeSearches | _EnumLikeStr)
model (str | None)
temperature (float | None)
topP (float | None)
maxNewTokens (int | None)
systemPrompt (str | None)
avoidCommentary (bool | None)
knowledge (List[str] | None)
- generative: GenerativeSearches | _EnumLikeStr
- model: str | None
- temperature: float | None
- topP: float | None
- maxNewTokens: int | None
- systemPrompt: str | None
- avoidCommentary: bool | None
- knowledge: List[str] | None
- _abc_impl = <_abc._abc_data object>
- model_config = {'strict': True}
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- class weaviate.collections.classes.config._GenerativeGoogleConfig(*, generative=GenerativeSearches.PALM, apiEndpoint, endpointId, region, maxOutputTokens, modelId, projectId, temperature, topK, topP, stopSequences, frequencyPenalty, presencePenalty)[source]
Bases:
_GenerativeProviderCreate a new model by parsing and validating input data from keyword arguments.
Raises [ValidationError][pydantic_core.ValidationError] if the input data cannot be validated to form a valid model.
self is explicitly positional-only to allow self as a field name.
- Parameters:
generative (GenerativeSearches | _EnumLikeStr)
apiEndpoint (str | None)
endpointId (str | None)
region (str | None)
maxOutputTokens (int | None)
modelId (str | None)
projectId (str)
temperature (float | None)
topK (int | None)
topP (float | None)
stopSequences (list[str] | None)
frequencyPenalty (float | None)
presencePenalty (float | None)
- generative: GenerativeSearches | _EnumLikeStr
- apiEndpoint: str | None
- endpointId: str | None
- region: str | None
- maxOutputTokens: int | None
- modelId: str | None
- projectId: str
- temperature: float | None
- topK: int | None
- topP: float | None
- stopSequences: list[str] | None
- frequencyPenalty: float | None
- presencePenalty: float | None
- _abc_impl = <_abc._abc_data object>
- model_config = {'strict': True}
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- class weaviate.collections.classes.config._GenerativeAWSConfig(*, generative=GenerativeSearches.AWS, region, service, model, endpoint, temperature, targetModel, targetVariant, topK, topP, stopSequences, maxTokens)[source]
Bases:
_GenerativeProviderCreate a new model by parsing and validating input data from keyword arguments.
Raises [ValidationError][pydantic_core.ValidationError] if the input data cannot be validated to form a valid model.
self is explicitly positional-only to allow self as a field name.
- Parameters:
generative (GenerativeSearches | _EnumLikeStr)
region (str)
service (str)
model (str | None)
endpoint (str | None)
temperature (float | None)
targetModel (str | None)
targetVariant (str | None)
topK (int | None)
topP (float | None)
stopSequences (List[str] | None)
maxTokens (int | None)
- generative: GenerativeSearches | _EnumLikeStr
- region: str
- service: str
- model: str | None
- endpoint: str | None
- temperature: float | None
- targetModel: str | None
- targetVariant: str | None
- topK: int | None
- topP: float | None
- stopSequences: List[str] | None
- maxTokens: int | None
- _abc_impl = <_abc._abc_data object>
- model_config = {'strict': True}
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- class weaviate.collections.classes.config._GenerativeAnthropicConfig(*, generative=GenerativeSearches.ANTHROPIC, model, maxTokens, stopSequences, temperature, topK, topP)[source]
Bases:
_GenerativeProviderCreate a new model by parsing and validating input data from keyword arguments.
Raises [ValidationError][pydantic_core.ValidationError] if the input data cannot be validated to form a valid model.
self is explicitly positional-only to allow self as a field name.
- Parameters:
generative (GenerativeSearches | _EnumLikeStr)
model (str | None)
maxTokens (int | None)
stopSequences (List[str] | None)
temperature (float | None)
topK (int | None)
topP (float | None)
- generative: GenerativeSearches | _EnumLikeStr
- model: str | None
- maxTokens: int | None
- stopSequences: List[str] | None
- temperature: float | None
- topK: int | None
- topP: float | None
- _abc_impl = <_abc._abc_data object>
- model_config = {'strict': True}
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- class weaviate.collections.classes.config._RerankerProvider(*, reranker)[source]
Bases:
_ConfigCreateModelCreate a new model by parsing and validating input data from keyword arguments.
Raises [ValidationError][pydantic_core.ValidationError] if the input data cannot be validated to form a valid model.
self is explicitly positional-only to allow self as a field name.
- Parameters:
reranker (Rerankers | _EnumLikeStr)
- reranker: Rerankers | _EnumLikeStr
- _abc_impl = <_abc._abc_data object>
- model_config = {'strict': True}
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- class weaviate.collections.classes.config._RerankerCohereConfig(*, reranker=Rerankers.COHERE, model=None, baseURL)[source]
Bases:
_RerankerProviderCreate a new model by parsing and validating input data from keyword arguments.
Raises [ValidationError][pydantic_core.ValidationError] if the input data cannot be validated to form a valid model.
self is explicitly positional-only to allow self as a field name.
- Parameters:
reranker (Rerankers | _EnumLikeStr)
model (Literal['rerank-english-v2.0', 'rerank-multilingual-v2.0'] | str | None)
baseURL (AnyHttpUrl | None)
- reranker: Rerankers | _EnumLikeStr
- model: Literal['rerank-english-v2.0', 'rerank-multilingual-v2.0'] | str | None
- baseURL: AnyHttpUrl | None
- _abc_impl = <_abc._abc_data object>
- model_config = {'strict': True}
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- class weaviate.collections.classes.config._RerankerCustomConfig(*, reranker, module_config)[source]
Bases:
_RerankerProviderCreate a new model by parsing and validating input data from keyword arguments.
Raises [ValidationError][pydantic_core.ValidationError] if the input data cannot be validated to form a valid model.
self is explicitly positional-only to allow self as a field name.
- Parameters:
reranker (Rerankers | _EnumLikeStr)
module_config (Dict[str, Any] | None)
- module_config: Dict[str, Any] | None
- _abc_impl = <_abc._abc_data object>
- model_config = {'strict': True}
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- class weaviate.collections.classes.config._RerankerTransformersConfig(*, reranker=Rerankers.TRANSFORMERS)[source]
Bases:
_RerankerProviderCreate a new model by parsing and validating input data from keyword arguments.
Raises [ValidationError][pydantic_core.ValidationError] if the input data cannot be validated to form a valid model.
self is explicitly positional-only to allow self as a field name.
- Parameters:
reranker (Rerankers | _EnumLikeStr)
- reranker: Rerankers | _EnumLikeStr
- _abc_impl = <_abc._abc_data object>
- model_config = {'strict': True}
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- class weaviate.collections.classes.config._RerankerJinaAIConfig(*, reranker=Rerankers.JINAAI, model=None)[source]
Bases:
_RerankerProviderCreate a new model by parsing and validating input data from keyword arguments.
Raises [ValidationError][pydantic_core.ValidationError] if the input data cannot be validated to form a valid model.
self is explicitly positional-only to allow self as a field name.
- Parameters:
reranker (Rerankers | _EnumLikeStr)
model (Literal['jina-reranker-v2-base-multilingual', 'jina-reranker-v1-base-en', 'jina-reranker-v1-turbo-en', 'jina-reranker-v1-tiny-en', 'jina-colbert-v1-en'] | str | None)
- reranker: Rerankers | _EnumLikeStr
- model: Literal['jina-reranker-v2-base-multilingual', 'jina-reranker-v1-base-en', 'jina-reranker-v1-turbo-en', 'jina-reranker-v1-tiny-en', 'jina-colbert-v1-en'] | str | None
- _abc_impl = <_abc._abc_data object>
- model_config = {'strict': True}
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- class weaviate.collections.classes.config._RerankerVoyageAIConfig(*, reranker=Rerankers.VOYAGEAI, model=None)[source]
Bases:
_RerankerProviderCreate a new model by parsing and validating input data from keyword arguments.
Raises [ValidationError][pydantic_core.ValidationError] if the input data cannot be validated to form a valid model.
self is explicitly positional-only to allow self as a field name.
- Parameters:
reranker (Rerankers | _EnumLikeStr)
model (Literal['rerank-2', 'rerank-2-lite', 'rerank-lite-1', 'rerank-1'] | str | None)
- reranker: Rerankers | _EnumLikeStr
- model: Literal['rerank-2', 'rerank-2-lite', 'rerank-lite-1', 'rerank-1'] | str | None
- _abc_impl = <_abc._abc_data object>
- model_config = {'strict': True}
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- class weaviate.collections.classes.config._RerankerNvidiaConfig(*, reranker=Rerankers.NVIDIA, model=None, baseURL)[source]
Bases:
_RerankerProviderCreate a new model by parsing and validating input data from keyword arguments.
Raises [ValidationError][pydantic_core.ValidationError] if the input data cannot be validated to form a valid model.
self is explicitly positional-only to allow self as a field name.
- Parameters:
reranker (Rerankers | _EnumLikeStr)
model (str | None)
baseURL (AnyHttpUrl | None)
- reranker: Rerankers | _EnumLikeStr
- model: str | None
- baseURL: AnyHttpUrl | None
- _abc_impl = <_abc._abc_data object>
- model_config = {'strict': True}
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- class weaviate.collections.classes.config._RerankerContextualAIConfig(*, reranker=Rerankers.CONTEXTUALAI, model=None, instruction=None, topN=None)[source]
Bases:
_RerankerProviderCreate a new model by parsing and validating input data from keyword arguments.
Raises [ValidationError][pydantic_core.ValidationError] if the input data cannot be validated to form a valid model.
self is explicitly positional-only to allow self as a field name.
- Parameters:
reranker (Rerankers | _EnumLikeStr)
model (Literal['ctxl-rerank-v2-instruct-multilingual', 'ctxl-rerank-v2-instruct-multilingual-mini', 'ctxl-rerank-v1-instruct'] | str | None)
instruction (str | None)
topN (int | None)
- reranker: Rerankers | _EnumLikeStr
- model: Literal['ctxl-rerank-v2-instruct-multilingual', 'ctxl-rerank-v2-instruct-multilingual-mini', 'ctxl-rerank-v1-instruct'] | str | None
- instruction: str | None
- topN: int | None
- _abc_impl = <_abc._abc_data object>
- model_config = {'strict': True}
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- class weaviate.collections.classes.config._Generative[source]
Bases:
objectUse this factory class to create the correct object for the generative_config argument in the collections.create() method.
Each staticmethod provides options specific to the named generative search module in the function’s name. Under-the-hood data validation steps will ensure that any mis-specifications will be caught before the request is sent to Weaviate.
- static anyscale(model=None, temperature=None, base_url=None)[source]
Create a _GenerativeAnyscale object for use when generating using the generative-anyscale module.
- Parameters:
model (str | None) – The model to use. Defaults to None, which uses the server-defined default
temperature (float | None) – The temperature to use. Defaults to None, which uses the server-defined default
base_url (str | None) – The base URL where the API request should go. Defaults to None, which uses the server-defined default
- Return type:
- static custom(module_name, module_config=None)[source]
Create a _GenerativeCustom object for use when generating using a custom specification.
- Parameters:
module_name (str) – The name of the module to use, REQUIRED.
module_config (Dict[str, Any] | None) – The configuration to use for the module. Defaults to None, which uses the server-defined default.
- Return type:
- static databricks(*, endpoint, max_tokens=None, temperature=None, top_k=None, top_p=None)[source]
Create a _GenerativeDatabricks object for use when performing AI generation using the generative-databricks module.
- Parameters:
endpoint (str) – The URL where the API request should go. Defaults to None, which uses the server-defined default
max_tokens (int | None) – The maximum number of tokens to generate. Defaults to None, which uses the server-defined default
temperature (float | None) – The temperature to use. Defaults to None, which uses the server-defined default
top_k (int | None) – The top K value to use. Defaults to None, which uses the server-defined default
top_p (float | None) – The top P value to use. Defaults to None, which uses the server-defined default
- Return type:
- static friendliai(*, base_url=None, model=None, temperature=None, max_tokens=None)[source]
Create a _GenerativeFriendliai object for use when performing AI generation using the generative-friendliai module.
- Parameters:
base_url (str | None) – The base URL where the API request should go. Defaults to None, which uses the server-defined default
model (str | None) – The model to use. Defaults to None, which uses the server-defined default
temperature (float | None) – The temperature to use. Defaults to None, which uses the server-defined default
max_tokens (int | None) – The maximum number of tokens to generate. Defaults to None, which uses the server-defined default
- Return type:
- static mistral(model=None, temperature=None, max_tokens=None, base_url=None)[source]
Create a _GenerativeMistral object for use when performing AI generation using the generative-mistral module.
- Parameters:
model (str | None) – The model to use. Defaults to None, which uses the server-defined default
temperature (float | None) – The temperature to use. Defaults to None, which uses the server-defined default
max_tokens (int | None) – The maximum number of tokens to generate. Defaults to None, which uses the server-defined default
base_url (str | None) – The base URL where the API request should go. Defaults to None, which uses the server-defined default
- Return type:
- static nvidia(*, base_url=None, model=None, temperature=None, max_tokens=None)[source]
Create a _GenerativeNvidia object for use when performing AI generation using the generative-nvidia module.
- Parameters:
base_url (str | None) – The base URL where the API request should go. Defaults to None, which uses the server-defined default
model (str | None) – The model to use. Defaults to None, which uses the server-defined default
temperature (float | None) – The temperature to use. Defaults to None, which uses the server-defined default
max_tokens (int | None) – The maximum number of tokens to generate. Defaults to None, which uses the server-defined default
- Return type:
- static xai(*, base_url=None, model=None, temperature=None, max_tokens=None, top_p=None)[source]
Create a _GenerativeXai object for use when performing AI generation using the generative-xai module.
- Parameters:
base_url (str | None) – The base URL where the API request should go. Defaults to None, which uses the server-defined default
model (str | None) – The model to use. Defaults to None, which uses the server-defined default
temperature (float | None) – The temperature to use. Defaults to None, which uses the server-defined default
max_tokens (int | None) – The maximum number of tokens to generate. Defaults to None, which uses the server-defined default
top_p (float | None) – The top P value to use. Defaults to None, which uses the server-defined default
- Return type:
- static ollama(*, api_endpoint=None, model=None)[source]
Create a _GenerativeOllama object for use when performing AI generation using the generative-ollama module.
- Parameters:
api_endpoint (str | None) – The API endpoint to use. Defaults to None, which uses the server-defined default Docker users may need to specify an alias, such as http://host.docker.internal:11434 so that the container can access the host machine.
model (str | None) – The model to use. Defaults to None, which uses the server-defined default
- Return type:
- static openai(model=None, frequency_penalty=None, max_tokens=None, presence_penalty=None, temperature=None, top_p=None, base_url=None, *, verbosity=None, reasoning_effort=None)[source]
Create a _GenerativeOpenAIConfig object for use when performing AI generation using the generative-openai module.
See the documentation for detailed usage.
- Parameters:
model (str | None) – The model to use. Defaults to None, which uses the server-defined default
frequency_penalty (float | None) – The frequency penalty to use. Defaults to None, which uses the server-defined default
max_tokens (int | None) – The maximum number of tokens to generate. Defaults to None, which uses the server-defined default
presence_penalty (float | None) – The presence penalty to use. Defaults to None, which uses the server-defined default
temperature (float | None) – The temperature to use. Defaults to None, which uses the server-defined default
top_p (float | None) – The top P to use. Defaults to None, which uses the server-defined default
base_url (AnyHttpUrl | None) – The base URL where the API request should go. Defaults to None, which uses the server-defined default
verbosity (Literal['low', 'medium', 'high'] | str | None) – The verbosity level to use. One of ‘low’, ‘medium’, ‘high’. Defaults to None, which uses the server-defined default
reasoning_effort (Literal['minimal', 'low', 'medium', 'high'] | str | None) – The reasoning effort level to use. One of ‘minimal’, ‘low
- Return type:
- static azure_openai(resource_name, deployment_id, frequency_penalty=None, max_tokens=None, presence_penalty=None, temperature=None, top_p=None, base_url=None)[source]
Create a _GenerativeAzureOpenAIConfig object for use when performing AI generation using the generative-openai module.
See the documentation for detailed usage.
- Parameters:
resource_name (str) – The name of the Azure OpenAI resource to use.
deployment_id (str) – The Azure OpenAI deployment ID to use.
frequency_penalty (float | None) – The frequency penalty to use. Defaults to None, which uses the server-defined default
max_tokens (int | None) – The maximum number of tokens to generate. Defaults to None, which uses the server-defined default
presence_penalty (float | None) – The presence penalty to use. Defaults to None, which uses the server-defined default
temperature (float | None) – The temperature to use. Defaults to None, which uses the server-defined default
top_p (float | None) – The top P to use. Defaults to None, which uses the server-defined default
base_url (AnyHttpUrl | None) – The base URL where the API request should go. Defaults to None, which uses the server-defined default
- Return type:
- static cohere(model=None, k=None, max_tokens=None, return_likelihoods=None, stop_sequences=None, temperature=None, base_url=None)[source]
Create a _GenerativeCohereConfig object for use when performing AI generation using the generative-cohere module.
See the documentation for detailed usage.
- Parameters:
model (str | None) – The model to use. Defaults to None, which uses the server-defined default
k (int | None) – The number of sequences to generate. Defaults to None, which uses the server-defined default
max_tokens (int | None) – The maximum number of tokens to generate. Defaults to None, which uses the server-defined default
return_likelihoods (str | None) – (Deprecated) The return likelihoods setting to use. No longer has any effect.
stop_sequences (List[str] | None) – The stop sequences to use. Defaults to None, which uses the server-defined default
temperature (float | None) – The temperature to use. Defaults to None, which uses the server-defined default
base_url (AnyHttpUrl | None) – The base URL where the API request should go. Defaults to None, which uses the server-defined default
- Return type:
- static contextualai(model=None, max_new_tokens=None, temperature=None, top_p=None, system_prompt=None, avoid_commentary=None, knowledge=None)[source]
Create a _GenerativeContextualAIConfig object for use when performing AI generation using the generative-contextualai module.
See the documentation for detailed usage.
- Parameters:
model (str | None) – The model to use. Defaults to None, which uses the server-defined default
max_new_tokens (int | None) – The maximum number of tokens to generate. Defaults to None, which uses the server-defined default
temperature (float | None) – The temperature to use. Defaults to None, which uses the server-defined default
top_p (float | None) – Nucleus sampling parameter (0 < x <= 1). Defaults to None, which uses the server-defined default
system_prompt (str | None) – System instructions the model follows. Defaults to None, which uses the server-defined default
avoid_commentary (bool | None) – If True, reduce conversational commentary in responses. Defaults to None, which uses the server-defined default
knowledge (List[str] | None) – Additional detailed knowledge sources with varied information. Defaults to None, which uses the server-defined default
- Return type:
- static palm(project_id, api_endpoint=None, max_output_tokens=None, model_id=None, temperature=None, top_k=None, top_p=None)[source]
Deprecated since version 4.9.0.
This method is deprecated and will be removed in Q2 ‘25. Please use
google()instead.Create a _GenerativePaLMConfig object for use when performing AI generation using the generative-palm module.
See the documentation for detailed usage.
- Args:
project_id: The PalM project ID to use. api_endpoint: The API endpoint to use without a leading scheme such as http://. Defaults to None, which uses the server-defined default max_output_tokens: The maximum number of tokens to generate. Defaults to None, which uses the server-defined default model_id: The model ID to use. Defaults to None, which uses the server-defined default temperature: The temperature to use. Defaults to None, which uses the server-defined default top_k: The top K to use. Defaults to None, which uses the server-defined default top_p: The top P to use. Defaults to None, which uses the server-defined default
- Parameters:
project_id (str)
api_endpoint (str | None)
max_output_tokens (int | None)
model_id (str | None)
temperature (float | None)
top_k (int | None)
top_p (float | None)
- Return type:
- static google(project_id, api_endpoint=None, max_output_tokens=None, model_id=None, temperature=None, top_k=None, top_p=None)[source]
Create a _GenerativeGoogleConfig object for use when performing AI generation using the generative-google module.
See the documentation for detailed usage.
- Parameters:
project_id (str) – The PalM project ID to use.
api_endpoint (str | None) – The API endpoint to use without a leading scheme such as http://. Defaults to None, which uses the server-defined default
max_output_tokens (int | None) – The maximum number of tokens to generate. Defaults to None, which uses the server-defined default
model_id (str | None) – The model ID to use. Defaults to None, which uses the server-defined default
temperature (float | None) – The temperature to use. Defaults to None, which uses the server-defined default
top_k (int | None) – The top K to use. Defaults to None, which uses the server-defined default
top_p (float | None) – The top P to use. Defaults to None, which uses the server-defined default
- Return type:
- static google_vertex(project_id, api_endpoint=None, region=None, max_output_tokens=None, model_id=None, endpoint_id=None, temperature=None, top_k=None, top_p=None)[source]
Create a _GenerativeGoogleConfig object for use when performing AI generation using the generative-google module.
See the documentation for detailed usage.
- Parameters:
project_id (str) – The Google Vertex project ID to use.
api_endpoint (str | None) – The API endpoint to use without a leading scheme such as http://. Defaults to None, which uses the server-defined default
region (str | None) – The region to use. Defaults to None, which uses the server-defined default
max_output_tokens (int | None) – The maximum number of tokens to generate. Defaults to None, which uses the server-defined default
model_id (str | None) – The model ID to use. Defaults to None, which uses the server-defined default
endpoint_id (str | None) – The endpoint ID to use. Defaults to None, which uses the server-defined default
temperature (float | None) – The temperature to use. Defaults to None, which uses the server-defined default
top_k (int | None) – The top K to use. Defaults to None, which uses the server-defined default
top_p (float | None) – The top P to use. Defaults to None, which uses the server-defined default
- Return type:
- static google_gemini(max_output_tokens=None, model=None, temperature=None, top_k=None, top_p=None)[source]
Create a _GenerativeGoogleConfig object for use when performing AI generation using the generative-google module with the Gemini API.
See the documentation for detailed usage.
- Parameters:
max_output_tokens (int | None) – The maximum number of tokens to generate. Defaults to None, which uses the server-defined default
model (str | None) – The model to use. Defaults to None, which uses the server-defined default
temperature (float | None) – The temperature to use. Defaults to None, which uses the server-defined default
top_k (int | None) – The top K to use. Defaults to None, which uses the server-defined default
top_p (float | None) – The top P to use. Defaults to None, which uses the server-defined default
- Return type:
- static aws(model=None, region='', endpoint=None, service='bedrock', max_tokens=None)[source]
Create a _GenerativeAWSConfig object for use when performing AI generation using the generative-aws module.
See the documentation for detailed usage.
- Parameters:
model (str | None) – The model to use, REQUIRED for service “bedrock”.
max_tokens (int | None) – The maximum number of tokens to generate. Defaults to None, which uses the server-defined default.
region (str) – The AWS region to run the model from, REQUIRED.
endpoint (str | None) – The model to use, REQUIRED for service “sagemaker”.
service (Literal['bedrock', 'sagemaker'] | str) – The AWS service to use, options are “bedrock” and “sagemaker”.
- Return type:
- static aws_bedrock(model, region, temperature=None, max_tokens=None, top_k=None, top_p=None, stop_sequences=None)[source]
Create a _GenerativeAWSConfig object for use when performing AI generation using the generative-aws module.
See the documentation for detailed usage.
- Parameters:
model (str) – The model to use, REQUIRED
region (str) – The AWS region to run the model from, REQUIRED.
temperature (float | None) – The temperature to use. Defaults to None, which uses the server-defined default
max_tokens (int | None) – The maximum number of tokens to generate. Defaults to None, which uses the server-defined default.
top_k (int | None) – The top K to use. Defaults to None, which uses the server-defined default
top_p (float | None) – The top P to use. Defaults to None, which uses the server-defined default
stop_sequences (List[str] | None) – The stop sequences to use. Defaults to None, which uses the server-defined default
- Return type:
- static aws_sagemaker(region, endpoint, max_tokens=None, target_model=None, target_variant=None, temperature=None, top_k=None, top_p=None, stop_sequences=None)[source]
Create a _GenerativeAWSConfig object for use when performing AI generation using the generative-aws module.
See the documentation for detailed usage.
- Parameters:
region (str) – The AWS region to run the model from, REQUIRED.
endpoint (str) – The model to use, REQUIRED.
max_tokens (int | None) – The maximum token count to generate. Defaults to None, which uses the server-defined default.
target_model (str | None) – The target model to use. Defaults to None, which uses the server-defined default
target_variant (str | None) – The target variant to use. Defaults to None, which uses the server-defined default
temperature (float | None) – The temperature to use. Defaults to None, which uses the server-defined default
top_k (int | None) – The top K to use. Defaults to None, which uses the server-defined default
top_p (float | None) – The top P to use. Defaults to None, which uses the server-defined default
stop_sequences (List[str] | None) – The stop sequences to use. Defaults to None, which uses the server-defined default
- Return type:
- static anthropic(model=None, max_tokens=None, stop_sequences=None, temperature=None, top_k=None, top_p=None)[source]
Create a _GenerativeAnthropicConfig object for use when performing AI generation using the generative-anthropic module.
- Parameters:
model (str | None) – The model to use. Defaults to None, which uses the server-defined default
max_tokens (int | None) – The maximum number of tokens to generate. Defaults to None, which uses the server-defined default
stop_sequences (List[str] | None) – The stop sequences to use. Defaults to None, which uses the server-defined default
temperature (float | None) – The temperature to use. Defaults to None, which uses the server-defined default
top_k (int | None) – The top K to use. Defaults to None, which uses the server-defined default
top_p (float | None) – The top P to use. Defaults to None, which uses the server-defined default
- Return type:
- class weaviate.collections.classes.config._Reranker[source]
Bases:
objectUse this factory class to create the correct object for the reranker_config argument in the collections.create() method.
Each staticmethod provides options specific to the named reranker in the function’s name. Under-the-hood data validation steps will ensure that any mis-specifications will be caught before the request is sent to Weaviate.
- static transformers()[source]
Create a _RerankerTransformersConfig object for use when reranking using the reranker-transformers module.
See the documentation for detailed usage.
- Return type:
- static custom(module_name, module_config=None)[source]
Create a _RerankerCustomConfig object for use when reranking using a custom module.
- Parameters:
module_name (str) – The name of the module to use, REQUIRED.
module_config (Dict[str, Any] | None) – The configuration to use for the module. Defaults to None, which uses the server-defined default.
- Return type:
- static cohere(model=None, base_url=None)[source]
Create a _RerankerCohereConfig object for use when reranking using the reranker-cohere module.
See the documentation for detailed usage.
- Parameters:
model (Literal['rerank-english-v2.0', 'rerank-multilingual-v2.0'] | str | None) – The model to use. Defaults to None, which uses the server-defined default
base_url (str | None) – The base URL to send the reranker requests to. Defaults to None, which uses the server-defined default.
- Return type:
- static jinaai(model=None)[source]
Create a _RerankerJinaAIConfig object for use when reranking using the reranker-jinaai module.
See the documentation for detailed usage.
- Parameters:
model (Literal['jina-reranker-v2-base-multilingual', 'jina-reranker-v1-base-en', 'jina-reranker-v1-turbo-en', 'jina-reranker-v1-tiny-en', 'jina-colbert-v1-en'] | str | None) – The model to use. Defaults to None, which uses the server-defined default
- Return type:
- static voyageai(model=None)[source]
Create a _RerankerVoyageAIConfig object for use when reranking using the reranker-voyageai module.
See the documentation for detailed usage.
- Parameters:
model (Literal['rerank-2', 'rerank-2-lite', 'rerank-lite-1', 'rerank-1'] | str | None) – The model to use. Defaults to None, which uses the server-defined default
- Return type:
- static nvidia(model=None, base_url=None)[source]
Create a _RerankerNvidiaConfig object for use when reranking using the reranker-nvidia module.
See the documentation for detailed usage.
- Parameters:
model (str | None) – The model to use. Defaults to None, which uses the server-defined default
base_url (AnyHttpUrl | None) – The base URL to send the reranker requests to. Defaults to None, which uses the server-defined default.
- Return type:
- static contextualai(model=None, instruction=None, top_n=None)[source]
Create a _RerankerContextualAIConfig object for use when reranking using the reranker-contextualai module.
See the documentation for detailed usage.
- Parameters:
model (str | None) – The model to use. Defaults to None, which uses the server-defined default
instruction (str | None) – Custom instructions for reranking. Defaults to None.
top_n (int | None) – Number of top results to return. Defaults to None, which uses the server-defined default.
- Return type:
- class weaviate.collections.classes.config._CollectionConfigUpdate(*, description=None, property_descriptions=None, inverted_index_config=None, object_ttl_config=None, replication_config=None, vector_index_config=None, vectorizer_config=None, vector_config=None, multi_tenancy_config=None, generative_config=None, reranker_config=None)[source]
Bases:
_ConfigUpdateModelCreate a new model by parsing and validating input data from keyword arguments.
Raises [ValidationError][pydantic_core.ValidationError] if the input data cannot be validated to form a valid model.
self is explicitly positional-only to allow self as a field name.
- Parameters:
description (str | None)
property_descriptions (Dict[str, str] | None)
inverted_index_config (_InvertedIndexConfigUpdate | None)
object_ttl_config (_ObjectTTLConfigUpdate | None)
replication_config (_ReplicationConfigUpdate | None)
vector_index_config (_VectorIndexConfigUpdate | None)
vectorizer_config (_VectorIndexConfigUpdate | List[_NamedVectorConfigUpdate] | None)
vector_config (_VectorConfigUpdate | List[_VectorConfigUpdate] | None)
multi_tenancy_config (_MultiTenancyConfigUpdate | None)
generative_config (_GenerativeProvider | None)
reranker_config (_RerankerProvider | None)
- description: str | None
- property_descriptions: Dict[str, str] | None
- invertedIndexConfig: _InvertedIndexConfigUpdate | None
- objectTTLConfig: _ObjectTTLConfigUpdate | None
- replicationConfig: _ReplicationConfigUpdate | None
- vectorIndexConfig: _VectorIndexConfigUpdate | None
- vectorizerConfig: _VectorIndexConfigUpdate | List[_NamedVectorConfigUpdate] | None
- vectorConfig: _VectorConfigUpdate | List[_VectorConfigUpdate] | None
- multiTenancyConfig: _MultiTenancyConfigUpdate | None
- generativeConfig: _GenerativeProvider | None
- rerankerConfig: _RerankerProvider | None
- classmethod mutual_exclusivity(v, info)[source]
- Parameters:
v (_VectorConfigUpdate | List[_VectorConfigUpdate] | None)
info (ValidationInfo)
- merge_with_existing(schema)[source]
- Parameters:
schema (Dict[str, Any])
- Return type:
Dict[str, Any]
- static _CollectionConfigUpdate__add_to_module_config(return_dict, addition_key, addition_val)
- Parameters:
return_dict (Dict[str, Any])
addition_key (str)
addition_val (Dict[str, Any])
- Return type:
None
- _CollectionConfigUpdate__check_quantizers(quantizer, vector_index_config)
- Parameters:
quantizer (_QuantizerConfigUpdate | None)
vector_index_config (dict)
- Return type:
None
- _abc_impl = <_abc._abc_data object>
- model_config = {'strict': True}
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- class weaviate.collections.classes.config._BM25Config(b: float, k1: float)[source]
Bases:
_ConfigBase- Parameters:
b (float)
k1 (float)
- b: float
- k1: float
- weaviate.collections.classes.config.BM25Config
alias of
_BM25Config
- class weaviate.collections.classes.config._StopwordsConfig(preset: weaviate.collections.classes.config.StopwordsPreset, additions: List[str] | None, removals: List[str] | None)[source]
Bases:
_ConfigBase- Parameters:
preset (StopwordsPreset)
additions (List[str] | None)
removals (List[str] | None)
- preset: StopwordsPreset
- additions: List[str] | None
- removals: List[str] | None
- weaviate.collections.classes.config.StopwordsConfig
alias of
_StopwordsConfig
- class weaviate.collections.classes.config._InvertedIndexConfig(bm25: weaviate.collections.classes.config._BM25Config, cleanup_interval_seconds: int, index_null_state: bool, index_property_length: bool, index_timestamps: bool, stopwords: weaviate.collections.classes.config._StopwordsConfig)[source]
Bases:
_ConfigBase- Parameters:
bm25 (_BM25Config)
cleanup_interval_seconds (int)
index_null_state (bool)
index_property_length (bool)
index_timestamps (bool)
stopwords (_StopwordsConfig)
- bm25: _BM25Config
- cleanup_interval_seconds: int
- index_null_state: bool
- index_property_length: bool
- index_timestamps: bool
- stopwords: _StopwordsConfig
- weaviate.collections.classes.config.InvertedIndexConfig
alias of
_InvertedIndexConfig
- class weaviate.collections.classes.config._MultiTenancyConfig(enabled: bool, auto_tenant_creation: bool, auto_tenant_activation: bool)[source]
Bases:
_ConfigBase- Parameters:
enabled (bool)
auto_tenant_creation (bool)
auto_tenant_activation (bool)
- enabled: bool
- auto_tenant_creation: bool
- auto_tenant_activation: bool
- weaviate.collections.classes.config.MultiTenancyConfig
alias of
_MultiTenancyConfig
- class weaviate.collections.classes.config._PropertyVectorizerConfig(skip: bool, vectorize_property_name: bool)[source]
Bases:
object- Parameters:
skip (bool)
vectorize_property_name (bool)
- skip: bool
- vectorize_property_name: bool
- weaviate.collections.classes.config.PropertyVectorizerConfig
alias of
_PropertyVectorizerConfig
- class weaviate.collections.classes.config._NestedProperty(data_type: weaviate.collections.classes.config.DataType, description: str | None, index_filterable: bool, index_searchable: bool, name: str, nested_properties: List[ForwardRef('NestedProperty')] | None, tokenization: weaviate.collections.classes.config.Tokenization | None)[source]
Bases:
_ConfigBase- Parameters:
data_type (DataType)
description (str | None)
index_filterable (bool)
index_searchable (bool)
name (str)
nested_properties (List[_NestedProperty] | None)
tokenization (Tokenization | None)
- description: str | None
- index_filterable: bool
- index_searchable: bool
- name: str
- nested_properties: List[_NestedProperty] | None
- tokenization: Tokenization | None
- weaviate.collections.classes.config.NestedProperty
alias of
_NestedProperty
- class weaviate.collections.classes.config._PropertyBase(name: str, description: str | None)[source]
Bases:
_ConfigBase- Parameters:
name (str)
description (str | None)
- name: str
- description: str | None
- class weaviate.collections.classes.config._Property(name: str, description: str | None, data_type: weaviate.collections.classes.config.DataType, index_filterable: bool, index_range_filters: bool, index_searchable: bool, nested_properties: List[weaviate.collections.classes.config._NestedProperty] | None, tokenization: weaviate.collections.classes.config.Tokenization | None, vectorizer_config: weaviate.collections.classes.config._PropertyVectorizerConfig | None, vectorizer: str | None, vectorizer_configs: Dict[str, weaviate.collections.classes.config._PropertyVectorizerConfig] | None)[source]
Bases:
_PropertyBase- Parameters:
name (str)
description (str | None)
data_type (DataType)
index_filterable (bool)
index_range_filters (bool)
index_searchable (bool)
nested_properties (List[_NestedProperty] | None)
tokenization (Tokenization | None)
vectorizer_config (_PropertyVectorizerConfig | None)
vectorizer (str | None)
vectorizer_configs (Dict[str, _PropertyVectorizerConfig] | None)
- index_filterable: bool
- index_range_filters: bool
- index_searchable: bool
- nested_properties: List[_NestedProperty] | None
- tokenization: Tokenization | None
- vectorizer_config: _PropertyVectorizerConfig | None
- vectorizer: str | None
- vectorizer_configs: Dict[str, _PropertyVectorizerConfig] | None
- class weaviate.collections.classes.config._ReferenceProperty(name: str, description: str | None, target_collections: List[str])[source]
Bases:
_PropertyBase- Parameters:
name (str)
description (str | None)
target_collections (List[str])
- target_collections: List[str]
- weaviate.collections.classes.config.ReferencePropertyConfig
alias of
_ReferenceProperty
- class weaviate.collections.classes.config._AsyncReplicationConfig(max_workers: int | None, hashtree_height: int | None, frequency: int | None, frequency_while_propagating: int | None, alive_nodes_checking_frequency: int | None, logging_frequency: int | None, diff_batch_size: int | None, diff_per_node_timeout: int | None, pre_propagation_timeout: int | None, propagation_timeout: int | None, propagation_limit: int | None, propagation_delay: int | None, propagation_concurrency: int | None, propagation_batch_size: int | None)[source]
Bases:
_ConfigBase- Parameters:
max_workers (int | None)
hashtree_height (int | None)
frequency (int | None)
frequency_while_propagating (int | None)
alive_nodes_checking_frequency (int | None)
logging_frequency (int | None)
diff_batch_size (int | None)
diff_per_node_timeout (int | None)
pre_propagation_timeout (int | None)
propagation_timeout (int | None)
propagation_limit (int | None)
propagation_delay (int | None)
propagation_concurrency (int | None)
propagation_batch_size (int | None)
- max_workers: int | None
- hashtree_height: int | None
- frequency: int | None
- frequency_while_propagating: int | None
- alive_nodes_checking_frequency: int | None
- logging_frequency: int | None
- diff_batch_size: int | None
- diff_per_node_timeout: int | None
- pre_propagation_timeout: int | None
- propagation_timeout: int | None
- propagation_limit: int | None
- propagation_delay: int | None
- propagation_concurrency: int | None
- propagation_batch_size: int | None
- weaviate.collections.classes.config.AsyncReplicationConfig
alias of
_AsyncReplicationConfig
- class weaviate.collections.classes.config._ReplicationConfig(factor: int, async_enabled: bool, deletion_strategy: weaviate.collections.classes.config.ReplicationDeletionStrategy, async_config: weaviate.collections.classes.config._AsyncReplicationConfig | None = None)[source]
Bases:
_ConfigBase- Parameters:
factor (int)
async_enabled (bool)
deletion_strategy (ReplicationDeletionStrategy)
async_config (_AsyncReplicationConfig | None)
- factor: int
- async_enabled: bool
- deletion_strategy: ReplicationDeletionStrategy
- async_config: _AsyncReplicationConfig | None = None
- weaviate.collections.classes.config.ReplicationConfig
alias of
_ReplicationConfig
- class weaviate.collections.classes.config._ShardingConfig(virtual_per_physical: int, desired_count: int, actual_count: int, desired_virtual_count: int, actual_virtual_count: int, key: str, strategy: str, function: str)[source]
Bases:
_ConfigBase- Parameters:
virtual_per_physical (int)
desired_count (int)
actual_count (int)
desired_virtual_count (int)
actual_virtual_count (int)
key (str)
strategy (str)
function (str)
- virtual_per_physical: int
- desired_count: int
- actual_count: int
- desired_virtual_count: int
- actual_virtual_count: int
- key: str
- strategy: str
- function: str
- weaviate.collections.classes.config.ShardingConfig
alias of
_ShardingConfig
- class weaviate.collections.classes.config._PQEncoderConfig(type_: weaviate.collections.classes.config_vector_index.PQEncoderType, distribution: weaviate.collections.classes.config_vector_index.PQEncoderDistribution)[source]
Bases:
_ConfigBase- Parameters:
type_ (PQEncoderType)
distribution (PQEncoderDistribution)
- type_: PQEncoderType
- distribution: PQEncoderDistribution
- weaviate.collections.classes.config.PQEncoderConfig
alias of
_PQEncoderConfig
- class weaviate.collections.classes.config._PQConfig(internal_bit_compression: bool, segments: int, centroids: int, training_limit: int, encoder: weaviate.collections.classes.config._PQEncoderConfig)[source]
Bases:
_ConfigBase- Parameters:
internal_bit_compression (bool)
segments (int)
centroids (int)
training_limit (int)
encoder (_PQEncoderConfig)
- internal_bit_compression: bool
- segments: int
- centroids: int
- training_limit: int
- encoder: _PQEncoderConfig
- property bit_compression: bool
- class weaviate.collections.classes.config._BQConfig(cache: bool | None, rescore_limit: int)[source]
Bases:
_ConfigBase- Parameters:
cache (bool | None)
rescore_limit (int)
- cache: bool | None
- rescore_limit: int
- class weaviate.collections.classes.config._SQConfig(rescore_limit: int, training_limit: int)[source]
Bases:
_ConfigBase- Parameters:
rescore_limit (int)
training_limit (int)
- rescore_limit: int
- training_limit: int
- class weaviate.collections.classes.config._RQConfig(cache: bool | None, bits: int | None, rescore_limit: int)[source]
Bases:
_ConfigBase- Parameters:
cache (bool | None)
bits (int | None)
rescore_limit (int)
- cache: bool | None
- bits: int | None
- rescore_limit: int
- class weaviate.collections.classes.config._MuveraConfig(enabled: bool | None, ksim: int | None, dprojections: int | None, repetitions: int | None)[source]
Bases:
_ConfigBase- Parameters:
enabled (bool | None)
ksim (int | None)
dprojections (int | None)
repetitions (int | None)
- enabled: bool | None
- ksim: int | None
- dprojections: int | None
- repetitions: int | None
- weaviate.collections.classes.config.MuveraConfig
alias of
_MuveraConfig
- class weaviate.collections.classes.config._MultiVectorConfig(encoding: weaviate.collections.classes.config._MuveraConfig | None, aggregation: str)[source]
Bases:
_ConfigBase- Parameters:
encoding (_MuveraConfig | None)
aggregation (str)
- encoding: _MuveraConfig | None
- aggregation: str
- weaviate.collections.classes.config.MultiVector
alias of
_MultiVectorConfig
- class weaviate.collections.classes.config._VectorIndexConfig(multi_vector: weaviate.collections.classes.config._MultiVectorConfig | None, quantizer: weaviate.collections.classes.config._PQConfig | weaviate.collections.classes.config._BQConfig | weaviate.collections.classes.config._SQConfig | weaviate.collections.classes.config._RQConfig | NoneType)[source]
Bases:
_ConfigBase- Parameters:
multi_vector (_MultiVectorConfig | None)
quantizer (_PQConfig | _BQConfig | _SQConfig | _RQConfig | None)
- multi_vector: _MultiVectorConfig | None
- class weaviate.collections.classes.config._VectorIndexConfigHNSW(multi_vector: weaviate.collections.classes.config._MultiVectorConfig | None, quantizer: weaviate.collections.classes.config._PQConfig | weaviate.collections.classes.config._BQConfig | weaviate.collections.classes.config._SQConfig | weaviate.collections.classes.config._RQConfig | NoneType, cleanup_interval_seconds: int, distance_metric: weaviate.collections.classes.config_vectorizers.VectorDistances, dynamic_ef_min: int, dynamic_ef_max: int, dynamic_ef_factor: int, ef: int, ef_construction: int, filter_strategy: weaviate.collections.classes.config_vector_index.VectorFilterStrategy, flat_search_cutoff: int, max_connections: int, skip: bool, vector_cache_max_objects: int)[source]
Bases:
_VectorIndexConfig- Parameters:
multi_vector (_MultiVectorConfig | None)
quantizer (_PQConfig | _BQConfig | _SQConfig | _RQConfig | None)
cleanup_interval_seconds (int)
distance_metric (VectorDistances)
dynamic_ef_min (int)
dynamic_ef_max (int)
dynamic_ef_factor (int)
ef (int)
ef_construction (int)
filter_strategy (VectorFilterStrategy)
flat_search_cutoff (int)
max_connections (int)
skip (bool)
vector_cache_max_objects (int)
- cleanup_interval_seconds: int
- distance_metric: VectorDistances
- dynamic_ef_min: int
- dynamic_ef_max: int
- dynamic_ef_factor: int
- ef: int
- ef_construction: int
- filter_strategy: VectorFilterStrategy
- flat_search_cutoff: int
- max_connections: int
- skip: bool
- vector_cache_max_objects: int
- weaviate.collections.classes.config.VectorIndexConfigHNSW
alias of
_VectorIndexConfigHNSW
- class weaviate.collections.classes.config._VectorIndexConfigHFresh(multi_vector: weaviate.collections.classes.config._MultiVectorConfig | None, quantizer: weaviate.collections.classes.config._PQConfig | weaviate.collections.classes.config._BQConfig | weaviate.collections.classes.config._SQConfig | weaviate.collections.classes.config._RQConfig | NoneType, distance_metric: weaviate.collections.classes.config_vectorizers.VectorDistances, max_posting_size_kb: int, replicas: int, search_probe: int)[source]
Bases:
_VectorIndexConfig- Parameters:
multi_vector (_MultiVectorConfig | None)
quantizer (_PQConfig | _BQConfig | _SQConfig | _RQConfig | None)
distance_metric (VectorDistances)
max_posting_size_kb (int)
replicas (int)
search_probe (int)
- distance_metric: VectorDistances
- max_posting_size_kb: int
- replicas: int
- search_probe: int
- weaviate.collections.classes.config.VectorIndexConfigHFresh
alias of
_VectorIndexConfigHFresh
- class weaviate.collections.classes.config._VectorIndexConfigFlat(multi_vector: weaviate.collections.classes.config._MultiVectorConfig | None, quantizer: weaviate.collections.classes.config._PQConfig | weaviate.collections.classes.config._BQConfig | weaviate.collections.classes.config._SQConfig | weaviate.collections.classes.config._RQConfig | NoneType, distance_metric: weaviate.collections.classes.config_vectorizers.VectorDistances, vector_cache_max_objects: int)[source]
Bases:
_VectorIndexConfig- Parameters:
multi_vector (_MultiVectorConfig | None)
quantizer (_PQConfig | _BQConfig | _SQConfig | _RQConfig | None)
distance_metric (VectorDistances)
vector_cache_max_objects (int)
- distance_metric: VectorDistances
- vector_cache_max_objects: int
- weaviate.collections.classes.config.VectorIndexConfigFlat
alias of
_VectorIndexConfigFlat
- class weaviate.collections.classes.config._VectorIndexConfigDynamic(distance_metric: weaviate.collections.classes.config_vectorizers.VectorDistances, hnsw: weaviate.collections.classes.config._VectorIndexConfigHNSW | None, flat: weaviate.collections.classes.config._VectorIndexConfigFlat | None, threshold: int | None)[source]
Bases:
_ConfigBase- Parameters:
distance_metric (VectorDistances)
hnsw (_VectorIndexConfigHNSW | None)
flat (_VectorIndexConfigFlat | None)
threshold (int | None)
- distance_metric: VectorDistances
- hnsw: _VectorIndexConfigHNSW | None
- flat: _VectorIndexConfigFlat | None
- threshold: int | None
- weaviate.collections.classes.config.VectorIndexConfigDynamic
alias of
_VectorIndexConfigDynamic
- class weaviate.collections.classes.config._GenerativeConfig(generative: weaviate.collections.classes.config.GenerativeSearches | str, model: Dict[str, Any])[source]
Bases:
_ConfigBase- Parameters:
generative (GenerativeSearches | str)
model (Dict[str, Any])
- generative: GenerativeSearches | str
- model: Dict[str, Any]
- weaviate.collections.classes.config.GenerativeConfig
alias of
_GenerativeConfig
- class weaviate.collections.classes.config._VectorizerConfig(vectorizer: weaviate.collections.classes.config_vectorizers.Vectorizers | str, model: Dict[str, Any], vectorize_collection_name: bool)[source]
Bases:
_ConfigBase- Parameters:
vectorizer (Vectorizers | str)
model (Dict[str, Any])
vectorize_collection_name (bool)
- vectorizer: Vectorizers | str
- model: Dict[str, Any]
- vectorize_collection_name: bool
- weaviate.collections.classes.config.VectorizerConfig
alias of
_VectorizerConfig
- class weaviate.collections.classes.config._RerankerConfig(model: Dict[str, Any], reranker: weaviate.collections.classes.config.Rerankers | str)[source]
Bases:
_ConfigBase- Parameters:
model (Dict[str, Any])
reranker (Rerankers | str)
- model: Dict[str, Any]
- weaviate.collections.classes.config.RerankerConfig
alias of
_RerankerConfig
- class weaviate.collections.classes.config._NamedVectorizerConfig(vectorizer: weaviate.collections.classes.config_vectorizers.Vectorizers | str, model: Dict[str, Any], source_properties: List[str] | None)[source]
Bases:
_ConfigBase- Parameters:
vectorizer (Vectorizers | str)
model (Dict[str, Any])
source_properties (List[str] | None)
- vectorizer: Vectorizers | str
- model: Dict[str, Any]
- source_properties: List[str] | None
- class weaviate.collections.classes.config._NamedVectorConfig(vectorizer: weaviate.collections.classes.config._NamedVectorizerConfig, vector_index_config: weaviate.collections.classes.config._VectorIndexConfigHNSW | weaviate.collections.classes.config._VectorIndexConfigFlat | weaviate.collections.classes.config._VectorIndexConfigDynamic | weaviate.collections.classes.config._VectorIndexConfigHFresh)[source]
Bases:
_ConfigBase- Parameters:
vectorizer (_NamedVectorizerConfig)
vector_index_config (_VectorIndexConfigHNSW | _VectorIndexConfigFlat | _VectorIndexConfigDynamic | _VectorIndexConfigHFresh)
- vectorizer: _NamedVectorizerConfig
- vector_index_config: _VectorIndexConfigHNSW | _VectorIndexConfigFlat | _VectorIndexConfigDynamic | _VectorIndexConfigHFresh
- weaviate.collections.classes.config.NamedVectorConfig
alias of
_NamedVectorConfig
- class weaviate.collections.classes.config._ObjectTTLConfig(enabled: bool, time_to_live: datetime.timedelta | None, filter_expired_objects: bool, delete_on: str | Literal['updateTime'] | Literal['creationTime'])[source]
Bases:
_ConfigBase- Parameters:
enabled (bool)
time_to_live (timedelta | None)
filter_expired_objects (bool)
delete_on (str | Literal['updateTime'] | ~typing.Literal['creationTime'])
- enabled: bool
- time_to_live: timedelta | None
- filter_expired_objects: bool
- delete_on: str | Literal['updateTime'] | Literal['creationTime']
- weaviate.collections.classes.config.ObjectTTLConfig
alias of
_ObjectTTLConfig
- class weaviate.collections.classes.config._CollectionConfig(name: str, description: str | None, generative_config: weaviate.collections.classes.config._GenerativeConfig | None, inverted_index_config: weaviate.collections.classes.config._InvertedIndexConfig, multi_tenancy_config: weaviate.collections.classes.config._MultiTenancyConfig, object_ttl_config: weaviate.collections.classes.config._ObjectTTLConfig | None, properties: List[weaviate.collections.classes.config._Property], references: List[weaviate.collections.classes.config._ReferenceProperty], replication_config: weaviate.collections.classes.config._ReplicationConfig, reranker_config: weaviate.collections.classes.config._RerankerConfig | None, sharding_config: weaviate.collections.classes.config._ShardingConfig | None, vector_index_config: weaviate.collections.classes.config._VectorIndexConfigHNSW | weaviate.collections.classes.config._VectorIndexConfigFlat | weaviate.collections.classes.config._VectorIndexConfigDynamic | weaviate.collections.classes.config._VectorIndexConfigHFresh | NoneType, vector_index_type: weaviate.collections.classes.config_vector_index.VectorIndexType | None, vectorizer_config: weaviate.collections.classes.config._VectorizerConfig | None, vectorizer: weaviate.collections.classes.config_vectorizers.Vectorizers | str | NoneType, vector_config: Dict[str, weaviate.collections.classes.config._NamedVectorConfig] | None)[source]
Bases:
_ConfigBase- Parameters:
name (str)
description (str | None)
generative_config (_GenerativeConfig | None)
inverted_index_config (_InvertedIndexConfig)
multi_tenancy_config (_MultiTenancyConfig)
object_ttl_config (_ObjectTTLConfig | None)
properties (List[_Property])
references (List[_ReferenceProperty])
replication_config (_ReplicationConfig)
reranker_config (_RerankerConfig | None)
sharding_config (_ShardingConfig | None)
vector_index_config (_VectorIndexConfigHNSW | _VectorIndexConfigFlat | _VectorIndexConfigDynamic | _VectorIndexConfigHFresh | None)
vector_index_type (VectorIndexType | None)
vectorizer_config (_VectorizerConfig | None)
vectorizer (Vectorizers | str | None)
vector_config (Dict[str, _NamedVectorConfig] | None)
- name: str
- description: str | None
- generative_config: _GenerativeConfig | None
- inverted_index_config: _InvertedIndexConfig
- multi_tenancy_config: _MultiTenancyConfig
- object_ttl_config: _ObjectTTLConfig | None
- references: List[_ReferenceProperty]
- replication_config: _ReplicationConfig
- reranker_config: _RerankerConfig | None
- sharding_config: _ShardingConfig | None
- vector_index_config: _VectorIndexConfigHNSW | _VectorIndexConfigFlat | _VectorIndexConfigDynamic | _VectorIndexConfigHFresh | None
- vector_index_type: VectorIndexType | None
- vectorizer_config: _VectorizerConfig | None
- vectorizer: Vectorizers | str | None
- vector_config: Dict[str, _NamedVectorConfig] | None
- weaviate.collections.classes.config.CollectionConfig
alias of
_CollectionConfig
- class weaviate.collections.classes.config._CollectionConfigSimple(name: str, description: str | None, generative_config: weaviate.collections.classes.config._GenerativeConfig | None, properties: List[weaviate.collections.classes.config._Property], references: List[weaviate.collections.classes.config._ReferenceProperty], reranker_config: weaviate.collections.classes.config._RerankerConfig | None, vectorizer_config: weaviate.collections.classes.config._VectorizerConfig | None, vectorizer: weaviate.collections.classes.config_vectorizers.Vectorizers | str | NoneType, vector_config: Dict[str, weaviate.collections.classes.config._NamedVectorConfig] | None, object_ttl_config: weaviate.collections.classes.config._ObjectTTLConfig | None)[source]
Bases:
_ConfigBase- Parameters:
name (str)
description (str | None)
generative_config (_GenerativeConfig | None)
properties (List[_Property])
references (List[_ReferenceProperty])
reranker_config (_RerankerConfig | None)
vectorizer_config (_VectorizerConfig | None)
vectorizer (Vectorizers | str | None)
vector_config (Dict[str, _NamedVectorConfig] | None)
object_ttl_config (_ObjectTTLConfig | None)
- name: str
- description: str | None
- generative_config: _GenerativeConfig | None
- references: List[_ReferenceProperty]
- reranker_config: _RerankerConfig | None
- vectorizer_config: _VectorizerConfig | None
- vectorizer: Vectorizers | str | None
- vector_config: Dict[str, _NamedVectorConfig] | None
- object_ttl_config: _ObjectTTLConfig | None
- weaviate.collections.classes.config.CollectionConfigSimple
alias of
_CollectionConfigSimple
- class weaviate.collections.classes.config._ShardStatus(name: str, status: Literal['READONLY', 'READY', 'INDEXING'], vector_queue_size: int)[source]
Bases:
object- Parameters:
name (str)
status (Literal['READONLY', 'READY', 'INDEXING'])
vector_queue_size (int)
- name: str
- status: Literal['READONLY', 'READY', 'INDEXING']
- vector_queue_size: int
- weaviate.collections.classes.config.ShardStatus
alias of
_ShardStatus
- class weaviate.collections.classes.config.Property(*, name, data_type, description=None, index_filterable=None, index_searchable=None, index_range_filters=None, nested_properties=None, skip_vectorization=False, tokenization=None, vectorize_property_name=True)[source]
Bases:
_ConfigCreateModelThis class defines the structure of a data property that a collection can have within Weaviate.
- Parameters:
name (str)
data_type (DataType)
description (str | None)
index_filterable (bool | None)
index_searchable (bool | None)
index_range_filters (bool | None)
skip_vectorization (bool)
tokenization (Tokenization | None)
vectorize_property_name (bool)
- name
The name of the property, REQUIRED.
- Type:
str
- data_type
The data type of the property, REQUIRED.
- description
A description of the property.
- Type:
str | None
- index_filterable
Whether the property should be filterable in the inverted index.
- index_range_filters
Whether the property should support range filters in the inverted index.
- index_searchable
Whether the property should be searchable in the inverted index.
- nested_properties
nested properties for data type OBJECT and OBJECT_ARRAY`.
- skip_vectorization
Whether to skip vectorization of the property. Defaults to False.
- Type:
bool
- tokenization
The tokenization method to use for the inverted index. Defaults to None.
- Type:
- vectorize_property_name
Whether to vectorize the property name. Defaults to True.
- Type:
bool
Create a new model by parsing and validating input data from keyword arguments.
Raises [ValidationError][pydantic_core.ValidationError] if the input data cannot be validated to form a valid model.
self is explicitly positional-only to allow self as a field name.
- name: str
- description: str | None
- indexFilterable: bool | None
- indexSearchable: bool | None
- indexRangeFilters: bool | None
- skip_vectorization: bool
- tokenization: Tokenization | None
- vectorize_property_name: bool
- _to_dict(vectorizers=None)[source]
- Parameters:
vectorizers (Sequence[Vectorizers | _EnumLikeStr] | None)
- Return type:
Dict[str, Any]
- _abc_impl = <_abc._abc_data object>
- model_config = {'strict': True}
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- class weaviate.collections.classes.config._ReferencePropertyBase(*, name)[source]
Bases:
_ConfigCreateModelCreate a new model by parsing and validating input data from keyword arguments.
Raises [ValidationError][pydantic_core.ValidationError] if the input data cannot be validated to form a valid model.
self is explicitly positional-only to allow self as a field name.
- Parameters:
name (str)
- name: str
- _abc_impl = <_abc._abc_data object>
- model_config = {'strict': True}
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- class weaviate.collections.classes.config._ReferencePropertyMultiTarget(*, name, target_collections, description=None)[source]
Bases:
_ReferencePropertyBaseThis class defines properties that are cross references to multiple target collections.
Use this class when you want to create a cross-reference in the collection’s config that is capable of having cross-references to multiple other collections at once.
- Parameters:
name (str)
target_collections (List[str])
description (str | None)
- name
The name of the property, REQUIRED.
- target_collections
The names of the target collections, REQUIRED.
- Type:
List[str]
- description
A description of the property.
- Type:
str | None
Create a new model by parsing and validating input data from keyword arguments.
Raises [ValidationError][pydantic_core.ValidationError] if the input data cannot be validated to form a valid model.
self is explicitly positional-only to allow self as a field name.
- target_collections: List[str]
- description: str | None
- _abc_impl = <_abc._abc_data object>
- model_config = {'strict': True}
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- class weaviate.collections.classes.config.ReferenceProperty(*, name, target_collection, description=None)[source]
Bases:
_ReferencePropertyBaseThis class defines properties that are cross references to a single target collection.
Use this class when you want to create a cross-reference in the collection’s config that is capable of having only cross-references to a single other collection.
- Parameters:
name (str)
target_collection (str)
description (str | None)
- name
The name of the property, REQUIRED.
- target_collection
The name of the target collection, REQUIRED.
- Type:
str
- description
A description of the property.
- Type:
str | None
Create a new model by parsing and validating input data from keyword arguments.
Raises [ValidationError][pydantic_core.ValidationError] if the input data cannot be validated to form a valid model.
self is explicitly positional-only to allow self as a field name.
- target_collection: str
- description: str | None
- MultiTarget
alias of
_ReferencePropertyMultiTarget
- _abc_impl = <_abc._abc_data object>
- model_config = {'strict': True}
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- class weaviate.collections.classes.config._CollectionConfigCreate(*, name, properties=None, references=None, description=None, inverted_index_config=None, multi_tenancy_config=None, object_ttl_config=None, replication_config=None, sharding_config=None, vector_index_config=None, vectorizer_config=None, vector_config=None, generative_config=None, reranker_config=None)[source]
Bases:
_ConfigCreateModelCreate a new model by parsing and validating input data from keyword arguments.
Raises [ValidationError][pydantic_core.ValidationError] if the input data cannot be validated to form a valid model.
self is explicitly positional-only to allow self as a field name.
- Parameters:
name (str)
properties (Sequence[Property] | None)
references (List[_ReferencePropertyBase] | None)
description (str | None)
inverted_index_config (_InvertedIndexConfigCreate | None)
multi_tenancy_config (_MultiTenancyConfigCreate | None)
object_ttl_config (_ObjectTTLConfigCreate | None)
replication_config (_ReplicationConfigCreate | None)
sharding_config (_ShardingConfigCreate | None)
vector_index_config (_VectorIndexConfigCreate | None)
vectorizer_config (_VectorizerConfigCreate | List[_NamedVectorConfigCreate] | None)
vector_config (_VectorConfigCreate | List[_VectorConfigCreate] | None)
generative_config (_GenerativeProvider | None)
reranker_config (_RerankerProvider | None)
- name: str
- references: List[_ReferencePropertyBase] | None
- description: str | None
- invertedIndexConfig: _InvertedIndexConfigCreate | None
- multiTenancyConfig: _MultiTenancyConfigCreate | None
- objectTtlConfig: _ObjectTTLConfigCreate | None
- replicationConfig: _ReplicationConfigCreate | None
- shardingConfig: _ShardingConfigCreate | None
- vectorIndexConfig: _VectorIndexConfigCreate | None
- vectorizerConfig: _VectorizerConfigCreate | List[_NamedVectorConfigCreate] | None
- vectorConfig: _VectorConfigCreate | List[_VectorConfigCreate] | None
- generativeSearch: _GenerativeProvider | None
- rerankerConfig: _RerankerProvider | None
- model_post_init(_CollectionConfigCreate__context)[source]
Override this method to perform additional initialization after __init__ and model_construct. This is useful if you want to do some validation that requires the entire model to be initialized.
- Parameters:
_CollectionConfigCreate__context (Any)
- Return type:
None
- classmethod validate_vector_names(v, info)[source]
- Parameters:
v (_VectorizerConfigCreate | _NamedVectorConfigCreate | List[_NamedVectorConfigCreate])
info (ValidationInfo)
- Return type:
_VectorizerConfigCreate | _NamedVectorConfigCreate | List[_NamedVectorConfigCreate]
- classmethod inject_vector_config_none(v, info)[source]
- Parameters:
v (_VectorConfigCreate | List[_VectorConfigCreate] | None)
info (ValidationInfo)
- Return type:
_VectorConfigCreate | List[_VectorConfigCreate] | None
- _CollectionConfigCreate__add_props(props, ret_dict)
- Parameters:
props (Sequence[Property | _ReferencePropertyBase] | List[_ReferencePropertyBase] | None)
ret_dict (Dict[str, Any])
- Return type:
None
- static _CollectionConfigCreate__add_to_module_config(return_dict, addition_key, addition_val)
- Parameters:
return_dict (Dict[str, Any])
addition_key (str)
addition_val (Dict[str, Any])
- Return type:
None
- _abc_impl = <_abc._abc_data object>
- model_config = {'strict': True}
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- class weaviate.collections.classes.config._Replication[source]
Bases:
object- static async_config(*, max_workers=None, hashtree_height=None, frequency=None, frequency_while_propagating=None, alive_nodes_checking_frequency=None, logging_frequency=None, diff_batch_size=None, diff_per_node_timeout=None, pre_propagation_timeout=None, propagation_timeout=None, propagation_limit=None, propagation_delay=None, propagation_concurrency=None, propagation_batch_size=None)[source]
Create a configuration object create for async replication settings when creating a collection.
This is only available with WeaviateDB >=v1.36.0.
- Parameters:
max_workers (int | None)
hashtree_height (int | None)
frequency (int | None)
frequency_while_propagating (int | None)
alive_nodes_checking_frequency (int | None)
logging_frequency (int | None)
diff_batch_size (int | None)
diff_per_node_timeout (int | None)
pre_propagation_timeout (int | None)
propagation_timeout (int | None)
propagation_limit (int | None)
propagation_delay (int | None)
propagation_concurrency (int | None)
propagation_batch_size (int | None)
- Return type:
- class weaviate.collections.classes.config._ReplicationUpdate[source]
Bases:
object- static async_config(*, max_workers=None, hashtree_height=None, frequency=None, frequency_while_propagating=None, alive_nodes_checking_frequency=None, logging_frequency=None, diff_batch_size=None, diff_per_node_timeout=None, pre_propagation_timeout=None, propagation_timeout=None, propagation_limit=None, propagation_delay=None, propagation_concurrency=None, propagation_batch_size=None)[source]
Create a configuration object for async replication settings when updating a collection.
This is only available with WeaviateDB >=v1.36.0.
- Parameters:
max_workers (int | None)
hashtree_height (int | None)
frequency (int | None)
frequency_while_propagating (int | None)
alive_nodes_checking_frequency (int | None)
logging_frequency (int | None)
diff_batch_size (int | None)
diff_per_node_timeout (int | None)
pre_propagation_timeout (int | None)
propagation_timeout (int | None)
propagation_limit (int | None)
propagation_delay (int | None)
propagation_concurrency (int | None)
propagation_batch_size (int | None)
- Return type:
- class weaviate.collections.classes.config.Configure[source]
Bases:
objectUse this factory class to generate the correct object for use when using the collections.create() method. E.g., .multi_tenancy() will return a MultiTenancyConfigCreate object to be used in the multi_tenancy_config argument.
Each class method provides options specific to the named configuration type in the function’s name. Under-the-hood data validation steps will ensure that any mis-specifications are caught before the request is sent to Weaviate.
- Generative
alias of
_Generative
- Vectorizer
alias of
_Vectorizer
- VectorIndex
alias of
_VectorIndex
- NamedVectors
alias of
_NamedVectors
- Vectors
alias of
_Vectors
- MultiVectors
alias of
_MultiVectors
- ObjectTTL
alias of
_ObjectTTL
- Replication
alias of
_Replication
- static inverted_index(bm25_b=None, bm25_k1=None, cleanup_interval_seconds=None, index_timestamps=None, index_property_length=None, index_null_state=None, stopwords_preset=None, stopwords_additions=None, stopwords_removals=None)[source]
Create an InvertedIndexConfigCreate object to be used when defining the configuration of the keyword searching algorithm of Weaviate.
- Parameters:
<https (See `the docs) –
//weaviate.io/developers/weaviate/configuration/indexes#configure-the-inverted-index>`_ for details!
bm25_b (float | None)
bm25_k1 (float | None)
cleanup_interval_seconds (int | None)
index_timestamps (bool | None)
index_property_length (bool | None)
index_null_state (bool | None)
stopwords_preset (StopwordsPreset | None)
stopwords_additions (List[str] | None)
stopwords_removals (List[str] | None)
- Return type:
- static multi_tenancy(enabled=True, auto_tenant_creation=None, auto_tenant_activation=None)[source]
Create a MultiTenancyConfigCreate object to be used when defining the multi-tenancy configuration of Weaviate.
- Parameters:
enabled (bool) – Whether multi-tenancy is enabled. Defaults to True.
auto_tenant_creation (bool | None) – Automatically create nonexistent tenants during object creation. Defaults to None, which uses the server-defined default.
auto_tenant_activation (bool | None) – Automatically turn tenants implicitly HOT when they are accessed. Defaults to None, which uses the server-defined default.
- Return type:
- static replication(factor=None, async_enabled=None, deletion_strategy=None, async_config=None)[source]
Create a ReplicationConfigCreate object to be used when defining the replication configuration of Weaviate.
NOTE: async_enabled is only available with WeaviateDB >=v1.26.0
- Parameters:
factor (int | None) – The replication factor.
async_enabled (bool | None) – Enabled async replication.
deletion_strategy (ReplicationDeletionStrategy | None) – How conflicts between different nodes about deleted objects are resolved.
async_config (_AsyncReplicationConfigCreate | None) – The configuration for async replication. This is only relevant if async_enabled is True.
- Return type:
- static sharding(virtual_per_physical=None, desired_count=None, actual_count=None, desired_virtual_count=None, actual_virtual_count=None)[source]
Create a ShardingConfigCreate object to be used when defining the sharding configuration of Weaviate.
NOTE: You can only use one of Sharding or Replication, not both.
See the docs for more details.
- Parameters:
virtual_per_physical (int | None) – The number of virtual shards per physical shard.
desired_count (int | None) – The desired number of physical shards.
actual_count (int | None) – The actual number of physical shards. This is a read-only field so has no effect. It is kept for backwards compatibility but will be removed in a future release.
desired_virtual_count (int | None) – The desired number of virtual shards.
actual_virtual_count (int | None) – The actual number of virtual shards. This is a read-only field so has no effect. It is kept for backwards compatibility but will be removed in a future release.
- Return type:
- class weaviate.collections.classes.config._VectorIndexQuantizerUpdate[source]
Bases:
object- static pq(bit_compression=None, centroids=None, encoder_distribution=None, encoder_type=None, segments=None, training_limit=None, enabled=True)[source]
Create a _PQConfigUpdate object to be used when updating the product quantization (PQ) configuration of Weaviate.
Use this method when defining the quantizer argument in the vector_index configuration in collection.update().
- Parameters:
<https (See `the docs) –
//weaviate.io/developers/weaviate/concepts/vector-index#hnsw-with-compression>`_ for a more detailed view!
bit_compression (bool | None)
centroids (int | None)
encoder_distribution (PQEncoderDistribution | None)
encoder_type (PQEncoderType | None)
segments (int | None)
training_limit (int | None)
enabled (bool)
- Return type:
- static bq(rescore_limit=None, enabled=True)[source]
Create a _BQConfigUpdate object to be used when updating the binary quantization (BQ) configuration of Weaviate.
Use this method when defining the quantizer argument in the vector_index configuration in collection.update().
- Parameters:
<https (See `the docs) –
//weaviate.io/developers/weaviate/concepts/vector-index#hnsw-with-compression>`_ for a more detailed view!
rescore_limit (int | None)
enabled (bool)
- Return type:
- static sq(rescore_limit=None, training_limit=None, enabled=True)[source]
Create a _SQConfigUpdate object to be used when updating the scalar quantization (SQ) configuration of Weaviate.
Use this method when defining the quantizer argument in the vector_index configuration in collection.update().
- Parameters:
<https (See `the docs) –
//weaviate.io/developers/weaviate/concepts/vector-index#hnsw-with-compression>`_ for a more detailed view!
rescore_limit (int | None)
training_limit (int | None)
enabled (bool)
- Return type:
- static rq(rescore_limit=None, enabled=True, bits=None)[source]
Create a _RQConfigUpdate object to be used when updating the Rotational quantization (RQ) configuration of Weaviate.
Use this method when defining the quantizer argument in the vector_index configuration in collection.update().
- Parameters:
<https (See `the docs) –
//weaviate.io/developers/weaviate/concepts/vector-index#hnsw-with-compression>`_ for a more detailed view!
rescore_limit (int | None)
enabled (bool)
bits (int | None)
- Return type:
- class weaviate.collections.classes.config._VectorIndexUpdate[source]
Bases:
object- Quantizer
alias of
_VectorIndexQuantizerUpdate
- static hnsw(dynamic_ef_factor=None, dynamic_ef_min=None, dynamic_ef_max=None, ef=None, flat_search_cutoff=None, filter_strategy=None, vector_cache_max_objects=None, quantizer=None)[source]
Create an _VectorIndexConfigHNSWUpdate object to update the configuration of the HNSW vector index.
Use this method when defining the vectorizer_config argument in collection.update().
- Parameters:
<https (See `the docs) –
//weaviate.io/developers/weaviate/configuration/indexes#configure-the-inverted-index>`_ for a more detailed view!
dynamic_ef_factor (int | None)
dynamic_ef_min (int | None)
dynamic_ef_max (int | None)
ef (int | None)
flat_search_cutoff (int | None)
filter_strategy (VectorFilterStrategy | None)
vector_cache_max_objects (int | None)
quantizer (_PQConfigUpdate | _BQConfigUpdate | _SQConfigUpdate | _RQConfigUpdate | None)
- Return type:
- static flat(vector_cache_max_objects=None, quantizer=None)[source]
Create an _VectorIndexConfigFlatUpdate object to update the configuration of the FLAT vector index.
Use this method when defining the vectorizer_config argument in collection.update().
- Parameters:
<https (See `the docs) –
//weaviate.io/developers/weaviate/configuration/indexes#configure-the-inverted-index>`_ for a more detailed view!
vector_cache_max_objects (int | None)
quantizer (_BQConfigUpdate | _RQConfigUpdate | None)
- Return type:
- static dynamic(*, threshold=None, hnsw=None, flat=None, quantizer=None)[source]
Create an _VectorIndexConfigDynamicUpdate object to update the configuration of the Dynamic vector index.
Use this method when defining the vectorizer_config argument in collection.update().
- Parameters:
<https (See `the docs) –
//weaviate.io/developers/weaviate/configuration/indexes#configure-the-inverted-index>`_ for a more detailed view!
threshold (int | None)
hnsw (_VectorIndexConfigHNSWUpdate | None)
flat (_VectorIndexConfigFlatUpdate | None)
quantizer (_BQConfigUpdate | None)
- Return type:
- static hfresh(max_posting_size_kb=None, search_probe=None, quantizer=None)[source]
Create an _VectorIndexConfigHFreshUpdate object to update the configuration of the HFresh vector index.
Use this method when defining the vectorizer_config argument in collection.update().
- Parameters:
<https (See `the docs) –
//weaviate.io/developers/weaviate/configuration/indexes#configure-the-inverted-index>`_ for a more detailed view!
max_posting_size_kb (int | None)
search_probe (int | None)
quantizer (_RQConfigUpdate | None)
- Return type:
- class weaviate.collections.classes.config.Reconfigure[source]
Bases:
objectUse this factory class to generate the correct xxxConfig object for use when using the collection.update() method.
Each staticmethod provides options specific to the named configuration type in the function’s name. Under-the-hood data validation steps will ensure that any mis-specifications are caught before the request is sent to Weaviate. Only those configurations that are mutable are available in this class. If you wish to update the configuration of an immutable aspect of your collection then you will have to delete the collection and re-create it with the new configuration.
- NamedVectors
alias of
_NamedVectorsUpdate
- Vectors
alias of
_VectorsUpdate
- VectorIndex
alias of
_VectorIndexUpdate
- Generative
alias of
_Generative
- ObjectTTL
alias of
_ObjectTTLUpdate
- Replication
alias of
_ReplicationUpdate
- static inverted_index(bm25_b=None, bm25_k1=None, cleanup_interval_seconds=None, stopwords_additions=None, stopwords_preset=None, stopwords_removals=None)[source]
Create an InvertedIndexConfigUpdate object.
Use this method when defining the inverted_index_config argument in collection.update().
- Parameters:
<https (See `the docs) –
//weaviate.io/developers/weaviate/configuration/indexes#configure-the-inverted-index>`_ for a more detailed view!
bm25_b (float | None)
bm25_k1 (float | None)
cleanup_interval_seconds (int | None)
stopwords_additions (List[str] | None)
stopwords_preset (StopwordsPreset | None)
stopwords_removals (List[str] | None)
- Return type:
- static replication(factor=None, async_enabled=None, deletion_strategy=None, async_config=None)[source]
Create a ReplicationConfigUpdate object.
Use this method when defining the replication_config argument in collection.update().
- Parameters:
factor (int | None) – The replication factor.
async_enabled (bool | None) – Enable async replication.
deletion_strategy (ReplicationDeletionStrategy | None) – How conflicts between different nodes about deleted objects are resolved.
async_config (_AsyncReplicationConfigUpdate | None) – The async replication configuration. This is only applicable if async_enabled is set to True.
- Return type:
- static multi_tenancy(auto_tenant_creation=None, auto_tenant_activation=None)[source]
Create a MultiTenancyConfigUpdate object.
Use this method when defining the multi_tenancy argument in collection.update().
- Parameters:
auto_tenant_creation (bool | None) – When set, implicitly creates nonexistent tenants during object creation
auto_tenant_activation (bool | None) – Automatically turn tenants implicitly HOT when they are accessed. Defaults to None, which uses the server-defined default.
- Return type:
weaviate.collections.classes.config_base
- class weaviate.collections.classes.config_base._ConfigCreateModel[source]
Bases:
BaseModelCreate a new model by parsing and validating input data from keyword arguments.
Raises [ValidationError][pydantic_core.ValidationError] if the input data cannot be validated to form a valid model.
self is explicitly positional-only to allow self as a field name.
- model_config = {'strict': True}
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- _abc_impl = <_abc._abc_data object>
- class weaviate.collections.classes.config_base._ConfigUpdateModel[source]
Bases:
BaseModelCreate a new model by parsing and validating input data from keyword arguments.
Raises [ValidationError][pydantic_core.ValidationError] if the input data cannot be validated to form a valid model.
self is explicitly positional-only to allow self as a field name.
- model_config = {'strict': True}
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- merge_with_existing(schema)[source]
- Parameters:
schema (Dict[str, Any])
- Return type:
Dict[str, Any]
- _abc_impl = <_abc._abc_data object>
- class weaviate.collections.classes.config_base._QuantizerConfigCreate(*, enabled=True)[source]
Bases:
_ConfigCreateModelCreate a new model by parsing and validating input data from keyword arguments.
Raises [ValidationError][pydantic_core.ValidationError] if the input data cannot be validated to form a valid model.
self is explicitly positional-only to allow self as a field name.
- Parameters:
enabled (bool)
- enabled: bool
- _abc_impl = <_abc._abc_data object>
- model_config = {'strict': True}
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- class weaviate.collections.classes.config_base._QuantizerConfigUpdate[source]
Bases:
_ConfigUpdateModelCreate a new model by parsing and validating input data from keyword arguments.
Raises [ValidationError][pydantic_core.ValidationError] if the input data cannot be validated to form a valid model.
self is explicitly positional-only to allow self as a field name.
- _abc_impl = <_abc._abc_data object>
- model_config = {'strict': True}
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
weaviate.collections.classes.config_methods
- weaviate.collections.classes.config_methods._is_primitive(d_type)[source]
- Parameters:
d_type (str)
- Return type:
bool
- weaviate.collections.classes.config_methods.__get_rerank_config(schema)[source]
- Parameters:
schema (Dict[str, Any])
- Return type:
_RerankerConfig | None
- weaviate.collections.classes.config_methods.__get_generative_config(schema)[source]
- Parameters:
schema (Dict[str, Any])
- Return type:
_GenerativeConfig | None
- weaviate.collections.classes.config_methods.__get_vectorizer_config(schema)[source]
- Parameters:
schema (Dict[str, Any])
- Return type:
_VectorizerConfig | None
- weaviate.collections.classes.config_methods.__is_vectorizer_present(schema)[source]
- Parameters:
schema (Dict[str, Any])
- Return type:
bool
- weaviate.collections.classes.config_methods.__get_vector_index_type(schema)[source]
- Parameters:
schema (Dict[str, Any])
- Return type:
VectorIndexType | None
- weaviate.collections.classes.config_methods.__get_multivector_encoding(config)[source]
- Parameters:
config (Dict[str, Any])
- Return type:
_MuveraConfig | None
- weaviate.collections.classes.config_methods.__get_multivector(config)[source]
- Parameters:
config (Dict[str, Any])
- Return type:
_MultiVectorConfig | None
- weaviate.collections.classes.config_methods.__get_hnsw_config(config)[source]
- Parameters:
config (Dict[str, Any])
- Return type:
- weaviate.collections.classes.config_methods.__get_hfresh_config(config)[source]
- Parameters:
config (Dict[str, Any])
- Return type:
- weaviate.collections.classes.config_methods.__get_flat_config(config)[source]
- Parameters:
config (Dict[str, Any])
- Return type:
- weaviate.collections.classes.config_methods.__get_vector_index_config(schema)[source]
- Parameters:
schema (Dict[str, Any])
- Return type:
_VectorIndexConfigHNSW | _VectorIndexConfigFlat | _VectorIndexConfigDynamic | _VectorIndexConfigHFresh | None
- weaviate.collections.classes.config_methods.__get_vector_config(schema, simple)[source]
- Parameters:
schema (Dict[str, Any])
simple (bool)
- Return type:
Dict[str, _NamedVectorConfig] | None
- weaviate.collections.classes.config_methods.__get_vectorizer(schema)[source]
- Parameters:
schema (Dict[str, Any])
- Return type:
str | Vectorizers | None
- weaviate.collections.classes.config_methods._collection_config_simple_from_json(schema)[source]
- Parameters:
schema (Dict[str, Any])
- Return type:
- weaviate.collections.classes.config_methods._collection_config_from_json(schema)[source]
- Parameters:
schema (Dict[str, Any])
- Return type:
- weaviate.collections.classes.config_methods._get_object_ttl_config(schema)[source]
- Parameters:
schema (Dict[str, Any])
- Return type:
_ObjectTTLConfig | None
- weaviate.collections.classes.config_methods._collection_configs_from_json(schema)[source]
- Parameters:
schema (Dict[str, Any])
- Return type:
Dict[str, _CollectionConfig]
- weaviate.collections.classes.config_methods._collection_configs_simple_from_json(schema)[source]
- Parameters:
schema (Dict[str, Any])
- Return type:
Dict[str, _CollectionConfigSimple]
- weaviate.collections.classes.config_methods._nested_properties_from_config(props)[source]
- Parameters:
props (List[Dict[str, Any]])
- Return type:
List[_NestedProperty]
- weaviate.collections.classes.config_methods._properties_from_config(schema)[source]
- Parameters:
schema (Dict[str, Any])
- Return type:
List[_Property]
- weaviate.collections.classes.config_methods._references_from_config(schema)[source]
- Parameters:
schema (Dict[str, Any])
- Return type:
List[_ReferenceProperty]
weaviate.collections.classes.config_named_vectors
- class weaviate.collections.classes.config_named_vectors._NamedVectorConfigCreate(*, name, source_properties=None, vectorizer, vectorIndexType=VectorIndexType.HNSW, vector_index_config=None)[source]
Bases:
_ConfigCreateModelCreate a new model by parsing and validating input data from keyword arguments.
Raises [ValidationError][pydantic_core.ValidationError] if the input data cannot be validated to form a valid model.
self is explicitly positional-only to allow self as a field name.
- Parameters:
name (str)
source_properties (Annotated[List[str] | None, MinLen(min_length=1)])
vectorizer (_VectorizerConfigCreate)
vectorIndexType (VectorIndexType)
vector_index_config (_VectorIndexConfigCreate | None)
- name: str
- properties: List[str] | None
- vectorizer: _VectorizerConfigCreate
- vectorIndexType: VectorIndexType
- vectorIndexConfig: _VectorIndexConfigCreate | None
- _NamedVectorConfigCreate__parse_vectorizer()
- Return type:
Dict[str, Any]
- _abc_impl = <_abc._abc_data object>
- model_config = {'strict': True}
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- class weaviate.collections.classes.config_named_vectors._NamedVectorConfigUpdate(*, name, vector_index_config)[source]
Bases:
_ConfigUpdateModelCreate a new model by parsing and validating input data from keyword arguments.
Raises [ValidationError][pydantic_core.ValidationError] if the input data cannot be validated to form a valid model.
self is explicitly positional-only to allow self as a field name.
- Parameters:
name (str)
vector_index_config (_VectorIndexConfigUpdate)
- name: str
- vectorIndexConfig: _VectorIndexConfigUpdate
- _abc_impl = <_abc._abc_data object>
- model_config = {'strict': True}
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- class weaviate.collections.classes.config_named_vectors._NamedVectors[source]
Bases:
object- static none(name, *, vector_index_config=None)[source]
Create a named vector using no vectorizer. You will need to provide the vectors yourself.
- Parameters:
name (str) – The name of the named vector.
vector_index_config (_VectorIndexConfigCreate | None) – The configuration for Weaviate’s vector index. Use wvc.config.Configure.VectorIndex to create a vector index configuration. None by default
- Return type:
- static custom(name, *, module_name, module_config=None, source_properties=None, vector_index_config=None)[source]
Create a named vector using no vectorizer. You will need to provide the vectors yourself.
- Parameters:
name (str) – The name of the named vector.
module_name (str) – The name of the custom module to use.
module_config (Dict[str, Any] | None) – The configuration of the custom module to use.
source_properties (List[str] | None) – Which properties should be included when vectorizing. By default all text properties are included.
vector_index_config (_VectorIndexConfigCreate | None) – The configuration for Weaviate’s vector index. Use wvc.config.Configure.VectorIndex to create a vector index configuration. None by default
- Return type:
- static text2colbert_jinaai(name, *, dimensions=None, model=None, source_properties=None, vector_index_config=None, vectorize_collection_name=True)[source]
Create a named vector using the text2colbert_jinaai module.
See the documentation for detailed usage.
- Parameters:
name (str) – The name of the named vector.
source_properties (List[str] | None) – Which properties should be included when vectorizing. By default all text properties are included.
vector_index_config (_VectorIndexConfigCreate | None) – The configuration for Weaviate’s vector index. Use wvc.config.Configure.VectorIndex to create a vector index configuration. None by default
vectorize_collection_name (bool) – Whether to vectorize the collection name. Defaults to True.
vectorize_collection_name – Whether to vectorize the collection name. Defaults to True.
model (str | None) – The model to use. Defaults to None, which uses the server-defined default.
dimensions (int | None) – Number of dimensions. Applicable to v3 OpenAI models only. Defaults to None, which uses the server-defined default.
- Return type:
- static text2vec_cohere(name, *, base_url=None, model=None, truncate=None, source_properties=None, vector_index_config=None, vectorize_collection_name=True)[source]
Create a named vector using the text2vec_cohere model.
See the documentation for detailed usage.
- Parameters:
name (str) – The name of the named vector.
source_properties (List[str] | None) – Which properties should be included when vectorizing. By default all text properties are included.
vector_index_config (_VectorIndexConfigCreate | None) – The configuration for Weaviate’s vector index. Use wvc.config.Configure.VectorIndex to create a vector index configuration. None by default
vectorize_collection_name (bool) – Whether to vectorize the collection name. Defaults to True.
model (Literal['embed-v4.0', 'embed-multilingual-v2.0', 'embed-multilingual-v3.0', 'embed-multilingual-light-v3.0', 'small', 'medium', 'large', 'multilingual-22-12', 'embed-english-v2.0', 'embed-english-light-v2.0', 'embed-english-v3.0', 'embed-english-light-v3.0'] | str | None) – The model to use. Defaults to None, which uses the server-defined default.
truncate (Literal['NONE', 'START', 'END', 'LEFT', 'RIGHT'] | None) – The truncation strategy to use. Defaults to None, which uses the server-defined default.
vectorize_collection_name – Whether to vectorize the collection name. Defaults to True.
base_url (AnyHttpUrl | None) – The base URL to use where API requests should go. Defaults to None, which uses the server-defined default.
- Raises:
pydantic.ValidationError – If model is not a valid value from the CohereModel type or if truncate is not a valid value from the CohereTruncation type.
- Return type:
- static multi2vec_cohere(name, *, base_url=None, image_fields=None, model=None, text_fields=None, truncate=None, vector_index_config=None, vectorize_collection_name=True)[source]
Create a named vector using the multi2vec_cohere model.
See the documentation for detailed usage.
- Parameters:
name (str) – The name of the named vector.
vector_index_config (_VectorIndexConfigCreate | None) – The configuration for Weaviate’s vector index. Use wvc.config.Configure.VectorIndex to create a vector index configuration. None by default
vectorize_collection_name (bool) – Whether to vectorize the collection name. Defaults to True.
model (Literal['embed-v4.0', 'embed-multilingual-v3.0', 'embed-multilingual-light-v3.0', 'embed-english-v3.0', 'embed-english-light-v3.0'] | str | None) – The model to use. Defaults to None, which uses the server-defined default.
truncate (Literal['NONE', 'START', 'END', 'LEFT', 'RIGHT'] | None) – The truncation strategy to use. Defaults to None, which uses the server-defined default.
base_url (AnyHttpUrl | None) – The base URL to use where API requests should go. Defaults to None, which uses the server-defined default.
image_fields (List[str] | List[Multi2VecField] | None) – The image fields to use in vectorization.
text_fields (List[str] | List[Multi2VecField] | None) – The text fields to use in vectorization.
- Raises:
pydantic.ValidationError – If model is not a valid value from the CohereMultimodalModel type or if truncate is not a valid value from the CohereTruncation type.
- Return type:
- static text2vec_contextionary(name, *, source_properties=None, vector_index_config=None, vectorize_collection_name=True)[source]
Create a named vector using the text2vec_contextionary model.
See the documentation for detailed usage.
- Parameters:
name (str) – The name of the named vector.
source_properties (List[str] | None) – Which properties should be included when vectorizing. By default all text properties are included.
vector_index_config (_VectorIndexConfigCreate | None) – The configuration for Weaviate’s vector index. Use wvc.config.Configure.VectorIndex to create a vector index configuration. None by default
vectorize_collection_name (bool) – Whether to vectorize the collection name. Defaults to True.
- Return type:
- static text2vec_databricks(name, *, endpoint, instruction=None, source_properties=None, vector_index_config=None, vectorize_collection_name=True)[source]
Create a named vector using the text2vec-databricks model.
See the documentation for detailed usage.
- Parameters:
name (str) – The name of the named vector.
source_properties (List[str] | None) – Which properties should be included when vectorizing. By default all text properties are included.
vector_index_config (_VectorIndexConfigCreate | None) – The configuration for Weaviate’s vector index. Use wvc.config.Configure.VectorIndex to create a vector index configuration. None by default
vectorize_collection_name (bool) – Whether to vectorize the collection name. Defaults to True.
endpoint (str) – The endpoint to use.
instruction (str | None) – The instruction strategy to use. Defaults to None, which uses the server-defined default.
- Return type:
- static text2vec_mistral(name, *, base_url=None, model=None, source_properties=None, vector_index_config=None, vectorize_collection_name=True)[source]
Create a named vector using the text2vec-mistral model.
See the documentation for detailed usage.
- Parameters:
name (str) – The name of the named vector.
base_url (AnyHttpUrl | None) – The base URL to use where API requests should go. Defaults to None, which uses the server-defined default.
model (str | None) – The model to use. Defaults to None, which uses the server-defined default.
source_properties (List[str] | None) – Which properties should be included when vectorizing. By default all text properties are included.
vector_index_config (_VectorIndexConfigCreate | None) – The configuration for Weaviate’s vector index. Use wvc.config.Configure.VectorIndex to create a vector index configuration. None by default
vectorize_collection_name (bool) – Whether to vectorize the collection name. Defaults to True.
- Return type:
- static text2vec_ollama(name, *, api_endpoint=None, model=None, source_properties=None, vector_index_config=None, vectorize_collection_name=True)[source]
Create a named vector using the text2vec-ollama model.
See the documentation for detailed usage.
- Parameters:
name (str) – The name of the named vector.
source_properties (List[str] | None) – Which properties should be included when vectorizing. By default all text properties are included.
vector_index_config (_VectorIndexConfigCreate | None) – The configuration for Weaviate’s vector index. Use wvc.config.Configure.VectorIndex to create a vector index configuration. None by default
vectorize_collection_name (bool) – Whether to vectorize the collection name. Defaults to True.
model (str | None) – The model to use. Defaults to None, which uses the server-defined default.
vectorize_collection_name – Whether to vectorize the collection name. Defaults to True.
api_endpoint (str | None) – The base URL to use where API requests should go. Defaults to None, which uses the server-defined default. Docker users may need to specify an alias, such as http://host.docker.internal:11434 so that the container can access the host machine.
- Return type:
- static text2vec_openai(name, *, base_url=None, dimensions=None, model=None, model_version=None, type_=None, source_properties=None, vector_index_config=None, vectorize_collection_name=True)[source]
Create a named vector using the text2vec_openai model.
See the documentation for detailed usage.
- Parameters:
name (str) – The name of the named vector.
source_properties (List[str] | None) – Which properties should be included when vectorizing. By default all text properties are included.
vector_index_config (_VectorIndexConfigCreate | None) – The configuration for Weaviate’s vector index. Use wvc.config.Configure.VectorIndex to create a vector index configuration. None by default
vectorize_collection_name (bool) – Whether to vectorize the collection name. Defaults to True.
model (Literal['text-embedding-3-small', 'text-embedding-3-large', 'text-embedding-ada-002'] | str | None) – The model to use. Defaults to None, which uses the server-defined default.
model_version (str | None) – The model version to use. Defaults to None, which uses the server-defined default.
type – The type of model to use. Defaults to None, which uses the server-defined default.
vectorize_collection_name – Whether to vectorize the collection name. Defaults to True.
base_url (AnyHttpUrl | None) – The base URL to use where API requests should go. Defaults to None, which uses the server-defined default.
dimensions (int | None) – Number of dimensions. Applicable to v3 OpenAI models only. Defaults to None, which uses the server-defined default.
type_ (Literal['text', 'code'] | None)
- Raises:
pydantic.ValidationError – If type_ is not a valid value from the OpenAIType type.
- Return type:
- static text2vec_aws(name, region, *, endpoint=None, model=None, service='bedrock', source_properties=None, vector_index_config=None, vectorize_collection_name=True)[source]
Create a named vector using the text2vec_aws model.
See the documentation for detailed usage.
- Parameters:
name (str) – The name of the named vector.
region (str) – The AWS region to run the model from, REQUIRED.
endpoint (str | None) – The endpoint to use. Defaults to None, which uses the server-defined default.
model (Literal['amazon.titan-embed-text-v1', 'cohere.embed-english-v3', 'cohere.embed-multilingual-v3'] | str | None) – The model to use.
service (Literal['bedrock', 'sagemaker'] | str) – The AWS service to use. Defaults to bedrock.
source_properties (List[str] | None) – Which properties should be included when vectorizing. By default all text properties are included.
vector_index_config (_VectorIndexConfigCreate | None) – The configuration for Weaviate’s vector index. Use wvc.config.Configure.VectorIndex to create a vector index configuration. None by default
vectorize_collection_name (bool) – Whether to vectorize the collection name. Defaults to True.
- Return type:
- static img2vec_neural(name, image_fields, *, vector_index_config=None)[source]
Create a Img2VecNeuralConfig object for use when vectorizing using the img2vec-neural model.
See the documentation for detailed usage.
- Parameters:
name (str) – The name of the named vector.
image_fields (List[str]) – The image fields to use. This is a required field and must match the property fields of the collection that are defined as DataType.BLOB.
vector_index_config (_VectorIndexConfigCreate | None) – The configuration for Weaviate’s vector index. Use wvc.config.Configure.VectorIndex to create a vector index configuration. None by default
- Raises:
pydantic.ValidationError – If image_fields is not a list.
- Return type:
- static multi2vec_clip(name, *, inference_url=None, image_fields=None, text_fields=None, vector_index_config=None, vectorize_collection_name=True)[source]
Create a named vector using the multi2vec_clip model.
See the documentation for detailed usage.
- Parameters:
name (str) – The name of the named vector.
vector_index_config (_VectorIndexConfigCreate | None) – The configuration for Weaviate’s vector index. Use wvc.config.Configure.VectorIndex to create a vector index configuration. None by default
vectorize_collection_name (bool) – Whether to vectorize the collection name. Defaults to True.
image_fields (List[str] | List[Multi2VecField] | None) – The image fields to use in vectorization.
text_fields (List[str] | List[Multi2VecField] | None) – The text fields to use in vectorization.
inference_url (str | None) – The inference url to use where API requests should go. Defaults to None, which uses the server-defined default.
- Return type:
- static multi2vec_palm(name, *, vector_index_config=None, vectorize_collection_name=True, location, project_id, image_fields=None, text_fields=None, video_fields=None, dimensions=None, video_interval_seconds=None, model_id=None)[source]
Deprecated since version 4.9.0.
This method is deprecated and will be removed in Q2 ‘25. Please use
multi2vec_google()instead.Create a named vector using the multi2vec_palm model.
See the documentation for detailed usage.
- Args:
name: The name of the named vector. vector_index_config: The configuration for Weaviate’s vector index. Use wvc.config.Configure.VectorIndex to create a vector index configuration. None by default vectorize_collection_name: Whether to vectorize the collection name. Defaults to True. location: Where the model runs. REQUIRED. project_id: The project ID to use, REQUIRED. image_fields: The image fields to use in vectorization. text_fields: The text fields to use in vectorization. video_fields: The video fields to use in vectorization. dimensions: The number of dimensions to use. Defaults to None, which uses the server-defined default. video_interval_seconds: Length of a video interval. Defaults to None, which uses the server-defined default. model_id: The model ID to use. Defaults to None, which uses the server-defined default.
- Parameters:
name (str)
vector_index_config (_VectorIndexConfigCreate | None)
vectorize_collection_name (bool)
location (str)
project_id (str)
image_fields (List[str] | List[Multi2VecField] | None)
text_fields (List[str] | List[Multi2VecField] | None)
video_fields (List[str] | List[Multi2VecField] | None)
dimensions (int | None)
video_interval_seconds (int | None)
model_id (str | None)
- Return type:
- static multi2vec_google(name, *, location, project_id, audio_fields=None, image_fields=None, text_fields=None, video_fields=None, dimensions=None, video_interval_seconds=None, model_id=None, vector_index_config=None, vectorize_collection_name=True)[source]
Create a named vector using the multi2vec_google model.
See the documentation for detailed usage.
- Parameters:
name (str) – The name of the named vector.
vector_index_config (_VectorIndexConfigCreate | None) – The configuration for Weaviate’s vector index. Use wvc.config.Configure.VectorIndex to create a vector index configuration. None by default
vectorize_collection_name (bool) – Whether to vectorize the collection name. Defaults to True.
location (str) – Where the model runs. REQUIRED.
project_id (str) – The project ID to use, REQUIRED.
audio_fields (List[str] | List[Multi2VecField] | None) – The audio fields to use in vectorization.
image_fields (List[str] | List[Multi2VecField] | None) – The image fields to use in vectorization.
text_fields (List[str] | List[Multi2VecField] | None) – The text fields to use in vectorization.
video_fields (List[str] | List[Multi2VecField] | None) – The video fields to use in vectorization.
dimensions (int | None) – The number of dimensions to use. Defaults to None, which uses the server-defined default.
video_interval_seconds (int | None) – Length of a video interval. Defaults to None, which uses the server-defined default.
model_id (str | None) – The model ID to use. Defaults to None, which uses the server-defined default.
- Return type:
- static multi2vec_bind(name, *, audio_fields=None, depth_fields=None, image_fields=None, imu_fields=None, text_fields=None, thermal_fields=None, video_fields=None, vector_index_config=None, vectorize_collection_name=True)[source]
Create a named vector using the multi2vec_bind model.
See the documentation for detailed usage.
- Parameters:
name (str) – The name of the named vector.
audio_fields (List[str] | List[Multi2VecField] | None) – The audio fields to use in vectorization.
depth_fields (List[str] | List[Multi2VecField] | None) – The depth fields to use in vectorization.
image_fields (List[str] | List[Multi2VecField] | None) – The image fields to use in vectorization.
imu_fields (List[str] | List[Multi2VecField] | None) – The IMU fields to use in vectorization.
text_fields (List[str] | List[Multi2VecField] | None) – The text fields to use in vectorization.
thermal_fields (List[str] | List[Multi2VecField] | None) – The thermal fields to use in vectorization.
video_fields (List[str] | List[Multi2VecField] | None) – The video fields to use in vectorization.
vector_index_config (_VectorIndexConfigCreate | None) – The configuration for Weaviate’s vector index. Use wvc.config.Configure.VectorIndex to create a vector index configuration. None by default
vectorize_collection_name (bool) – Whether to vectorize the collection name. Defaults to True.
- Return type:
- static multi2vec_voyageai(name, *, base_url=None, model=None, truncation=None, output_encoding=None, image_fields=None, text_fields=None, vector_index_config=None, vectorize_collection_name=True)[source]
Create a named vector using the multi2vec_voyageai model.
See the documentation for detailed usage.
- Parameters:
name (str) – The name of the named vector.
vector_index_config (_VectorIndexConfigCreate | None) – The configuration for Weaviate’s vector index. Use wvc.config.Configure.VectorIndex to create a vector index configuration. None by default
vectorize_collection_name (bool) – Whether to vectorize the collection name. Defaults to True.
model (Literal['voyage-multimodal-3', 'voyage-multimodal-3.5'] | str | None) – The model to use. Defaults to None, which uses the server-defined default.
truncation (bool | None) – The truncation strategy to use. Defaults to None, which uses the server-defined default.
base_url (AnyHttpUrl | None) – The base URL to use where API requests should go. Defaults to None, which uses the server-defined default.
image_fields (List[str] | List[Multi2VecField] | None) – The image fields to use in vectorization.
text_fields (List[str] | List[Multi2VecField] | None) – The text fields to use in vectorization.
output_encoding (str | None)
- Raises:
pydantic.ValidationError – If model is not a valid value from the VoyageaiMultimodalModel type.
- Return type:
- static multi2vec_nvidia(name, *, base_url=None, model=None, truncation=None, output_encoding=None, image_fields=None, text_fields=None, vector_index_config=None, vectorize_collection_name=True)[source]
Create a named vector using the multi2vec_nvidia model.
See the documentation for detailed usage.
- Parameters:
name (str) – The name of the named vector.
vector_index_config (_VectorIndexConfigCreate | None) – The configuration for Weaviate’s vector index. Use wvc.config.Configure.VectorIndex to create a vector index configuration. None by default
vectorize_collection_name (bool) – Whether to vectorize the collection name. Defaults to True.
model (str | None) – The model to use. Defaults to None, which uses the server-defined default.
truncation (bool | None) – The truncation strategy to use. Defaults to None, which uses the server-defined default.
base_url (AnyHttpUrl | None) – The base URL to use where API requests should go. Defaults to None, which uses the server-defined default.
image_fields (List[str] | List[Multi2VecField] | None) – The image fields to use in vectorization.
text_fields (List[str] | List[Multi2VecField] | None) – The text fields to use in vectorization.
output_encoding (str | None)
- Raises:
pydantic.ValidationError – If model is not a valid value from the NvidiaMultimodalModel type.
- Return type:
- static ref2vec_centroid(name, reference_properties, *, method='mean', vector_index_config=None)[source]
Create a named vector using the ref2vec_centroid model.
See the documentation for detailed usage.
- Parameters:
name (str) – The name of the named vector.
reference_properties (List[str]) – The reference properties to use in vectorization, REQUIRED.
method (Literal['mean']) – The method to use. Defaults to mean.
vector_index_config (_VectorIndexConfigCreate | None) – The configuration for Weaviate’s vector index. Use wvc.config.Configure.VectorIndex to create a vector index configuration. None by default
- Return type:
- static text2vec_azure_openai(name, resource_name, deployment_id, *, base_url=None, dimensions=None, model=None, source_properties=None, vector_index_config=None, vectorize_collection_name=True)[source]
Create a named vector using the text2vec_azure_openai model.
See the documentation for detailed usage.
- Parameters:
name (str) – The name of the named vector.
resource_name (str) – The resource name to use, REQUIRED.
deployment_id (str) – The deployment ID to use, REQUIRED.
base_url (AnyHttpUrl | None) – The base URL to use where API requests should go. Defaults to None, which uses the server-defined default.
dimensions (int | None) – The dimensionality of the vectors. Defaults to None, which uses the server-defined default.
model (str | None) – The model to use. Defaults to None, which uses the server-defined default.
source_properties (List[str] | None) – Which properties should be included when vectorizing. By default all text properties are included.
vector_index_config (_VectorIndexConfigCreate | None) – The configuration for Weaviate’s vector index. Use wvc.config.Configure.VectorIndex to create a vector index configuration. None by default
vectorize_collection_name (bool) – Whether to vectorize the collection name. Defaults to True.
- Return type:
- static text2vec_gpt4all(name, *, source_properties=None, vector_index_config=None, vectorize_collection_name=True)[source]
Create a named vector using the text2vec_gpt4all model.
See the documentation for detailed usage.
- Parameters:
name (str) – The name of the named vector.
source_properties (List[str] | None) – Which properties should be included when vectorizing. By default all text properties are included.
vector_index_config (_VectorIndexConfigCreate | None) – The configuration for Weaviate’s vector index. Use wvc.config.Configure.VectorIndex to create a vector index configuration. None by default
vectorize_collection_name (bool) – Whether to vectorize the collection name. Defaults to True.
- Return type:
- static text2vec_huggingface(name, *, model=None, passage_model=None, query_model=None, endpoint_url=None, wait_for_model=None, use_gpu=None, use_cache=None, source_properties=None, vector_index_config=None, vectorize_collection_name=True)[source]
Create a named vector using the text2vec_huggingface model.
See the documentation for detailed usage.
- Parameters:
name (str) – The name of the named vector.
source_properties (List[str] | None) – Which properties should be included when vectorizing. By default all text properties are included.
vector_index_config (_VectorIndexConfigCreate | None) – The configuration for Weaviate’s vector index. Use wvc.config.Configure.VectorIndex to create a vector index configuration. None by default
vectorize_collection_name (bool) – Whether to vectorize the collection name. Defaults to True.
model (str | None) – The model to use. Defaults to None, which uses the server-defined default.
passage_model (str | None) – The passage model to use. Defaults to None, which uses the server-defined default.
query_model (str | None) – The query model to use. Defaults to None, which uses the server-defined default.
endpoint_url (AnyHttpUrl | None) – The endpoint URL to use. Defaults to None, which uses the server-defined default.
wait_for_model (bool | None) – Whether to wait for the model to be loaded. Defaults to None, which uses the server-defined default.
use_gpu (bool | None) – Whether to use the GPU. Defaults to None, which uses the server-defined default.
use_cache (bool | None) – Whether to use the cache. Defaults to None, which uses the server-defined default.
- Raises:
pydantic.ValidationError –
If the arguments passed to the function are invalid. It is important to note that some of these variables are mutually exclusive. See the documentation for more details.
- Return type:
- static text2vec_palm(name, project_id, *, source_properties=None, vector_index_config=None, vectorize_collection_name=True, api_endpoint=None, model_id=None, title_property=None)[source]
Deprecated since version 4.9.0.
This method is deprecated and will be removed in Q2 ‘25. Please use
text2vec_google()instead.Create a named vector using the text2vec_palm model.
See the documentation for detailed usage.
- Args:
name: The name of the named vector. source_properties: Which properties should be included when vectorizing. By default all text properties are included. project_id: The project ID to use, REQUIRED. source_properties: Which properties should be included when vectorizing. By default all text properties are included. vector_index_config: The configuration for Weaviate’s vector index. Use wvc.config.Configure.VectorIndex to create a vector index configuration. None by default vectorize_collection_name: Whether to vectorize the collection name. Defaults to True. api_endpoint: The API endpoint to use without a leading scheme such as http://. Defaults to None, which uses the server-defined default model_id: The model ID to use. Defaults to None, which uses the server-defined default. title_property: The Weaviate property name for the gecko-002 or gecko-003 model to use as the title.
- Raises:
pydantic.ValidationError: If api_endpoint is not a valid URL.
- Parameters:
name (str)
project_id (str)
source_properties (List[str] | None)
vector_index_config (_VectorIndexConfigCreate | None)
vectorize_collection_name (bool)
api_endpoint (str | None)
model_id (str | None)
title_property (str | None)
- Return type:
- static text2vec_google(name, project_id, *, api_endpoint=None, model_id=None, title_property=None, source_properties=None, vector_index_config=None, vectorize_collection_name=True)[source]
Create a named vector using the text2vec_palm model.
See the [documentation]https://weaviate.io/developers/weaviate/model-providers/google/embeddings) for detailed usage.
- Parameters:
name (str) – The name of the named vector.
source_properties (List[str] | None) – Which properties should be included when vectorizing. By default all text properties are included.
project_id (str) – The project ID to use, REQUIRED.
source_properties – Which properties should be included when vectorizing. By default all text properties are included.
vector_index_config (_VectorIndexConfigCreate | None) – The configuration for Weaviate’s vector index. Use wvc.config.Configure.VectorIndex to create a vector index configuration. None by default
vectorize_collection_name (bool) – Whether to vectorize the collection name. Defaults to True.
api_endpoint (str | None) – The API endpoint to use without a leading scheme such as http://. Defaults to None, which uses the server-defined default
model_id (str | None) – The model ID to use. Defaults to None, which uses the server-defined default.
title_property (str | None) – The Weaviate property name for the gecko-002 or gecko-003 model to use as the title.
- Raises:
pydantic.ValidationError – If api_endpoint is not a valid URL.
- Return type:
- static text2vec_google_aistudio(name, *, model_id=None, title_property=None, source_properties=None, vector_index_config=None, vectorize_collection_name=True)[source]
Create a named vector using the text2vec_palm model.
See the [documentation]https://weaviate.io/developers/weaviate/model-providers/google/embeddings) for detailed usage.
- Parameters:
name (str) – The name of the named vector.
source_properties (List[str] | None) – Which properties should be included when vectorizing. By default all text properties are included.
source_properties – Which properties should be included when vectorizing. By default all text properties are included.
vector_index_config (_VectorIndexConfigCreate | None) – The configuration for Weaviate’s vector index. Use wvc.config.Configure.VectorIndex to create a vector index configuration. None by default
vectorize_collection_name (bool) – Whether to vectorize the collection name. Defaults to True.
model_id (str | None) – The model ID to use. Defaults to None, which uses the server-defined default.
title_property (str | None) – The Weaviate property name for the gecko-002 or gecko-003 model to use as the title.
- Raises:
pydantic.ValidationError – If api_endpoint is not a valid URL.
- Return type:
- static text2vec_transformers(name, *, dimensions=None, pooling_strategy='masked_mean', inference_url=None, passage_inference_url=None, query_inference_url=None, source_properties=None, vector_index_config=None, vectorize_collection_name=True)[source]
Create a named vector using the text2vec_transformers model.
See the documentation for detailed usage.
- Parameters:
name (str) – The name of the named vector.
dimensions (int | None) – The number of dimensions for the generated embeddings. Defaults to None, which uses the server-defined default.
source_properties (List[str] | None) – Which properties should be included when vectorizing. By default all text properties are included.
vector_index_config (_VectorIndexConfigCreate | None) – The configuration for Weaviate’s vector index. Use wvc.config.Configure.VectorIndex to create a vector index configuration. None by default
vectorize_collection_name (bool) – Whether to vectorize the collection name. Defaults to True.
pooling_strategy (Literal['masked_mean', 'cls']) – The pooling strategy to use. Defaults to masked_mean.
inference_url (str | None) – The inferenceUrl to use where API requests should go. You can use either this OR passage/query_inference_url. Defaults to None, which uses the server-defined default.
passage_inference_url (str | None) – The inferenceUrl to use where passage API requests should go. You can use either this and query_inference_url OR inference_url. Defaults to None, which uses the server-defined default.
query_inference_url (str | None) – The inferenceUrl to use where query API requests should go. You can use either this and passage_inference_url OR inference_url. Defaults to None, which uses the server-defined default.
- Return type:
- static text2vec_jinaai(name, *, base_url=None, dimensions=None, model=None, source_properties=None, vector_index_config=None, vectorize_collection_name=True)[source]
Create a named vector using the text2vec-jinaai model.
See the documentation for detailed usage.
- Parameters:
name (str) – The name of the named vector.
source_properties (List[str] | None) – Which properties should be included when vectorizing. By default all text properties are included.
vector_index_config (_VectorIndexConfigCreate | None) – The configuration for Weaviate’s vector index. Use wvc.config.Configure.VectorIndex to create a vector index configuration. None by default
vectorize_collection_name (bool) – Whether to vectorize the collection name. Defaults to True.
base_url (str | None) – The base URL to send the vectorization requests to. Defaults to None, which uses the server-defined default.
dimensions (int | None) – The number of dimensions for the generated embeddings. Defaults to None, which uses the server-defined default.
model (Literal['jina-embeddings-v2-base-en', 'jina-embeddings-v2-small-en', 'jina-embeddings-v2-base-zh', 'jina-embeddings-v2-base-es', 'jina-embeddings-v2-base-code', 'jina-embeddings-v3', 'jina-embeddings-v4'] | str | None) – The model to use. Defaults to None, which uses the server-defined default.
- Return type:
- static multi2vec_jinaai(name, *, base_url=None, model=None, dimensions=None, image_fields=None, text_fields=None, vector_index_config=None, vectorize_collection_name=True)[source]
Create a named vector using the multi2vec_jinaai model.
See the documentation for detailed usage.
- Parameters:
name (str) – The name of the named vector.
vector_index_config (_VectorIndexConfigCreate | None) – The configuration for Weaviate’s vector index. Use wvc.config.Configure.VectorIndex to create a vector index configuration. None by default
vectorize_collection_name (bool) – Whether to vectorize the collection name. Defaults to True.
model (Literal['jina-clip-v1', 'jina-clip-v2', 'jina-embeddings-v4'] | str | None) – The model to use. Defaults to None, which uses the server-defined default.
base_url (AnyHttpUrl | None) – The base URL to use where API requests should go. Defaults to None, which uses the server-defined default.
dimensions (int | None) – The number of dimensions for the generated embeddings (only available for some models). Defaults to None, which uses the server-defined default.
image_fields (List[str] | List[Multi2VecField] | None) – The image fields to use in vectorization.
text_fields (List[str] | List[Multi2VecField] | None) – The text fields to use in vectorization.
- Raises:
pydantic.ValidationError – If model is not a valid value from the JinaMultimodalModel type.
- Return type:
- static text2vec_voyageai(name, *, model=None, base_url=None, truncate=None, source_properties=None, vector_index_config=None, vectorize_collection_name=True)[source]
Create a named vector using the text2vec-jinaai model.
See the documentation for detailed usage.
- Parameters:
name (str) – The name of the named vector.
source_properties (List[str] | None) – Which properties should be included when vectorizing. By default all text properties are included.
vector_index_config (_VectorIndexConfigCreate | None) – The configuration for Weaviate’s vector index. Use wvc.config.Configure.VectorIndex to create a vector index configuration. None by default
vectorize_collection_name (bool) – Whether to vectorize the collection name. Defaults to True.
model (Literal['voyage-4', 'voyage-4-lite', 'voyage-4-large', 'voyage-3.5', 'voyage-3.5-lite', 'voyage-3-large', 'voyage-3', 'voyage-3-lite', 'voyage-context-3', 'voyage-large-2', 'voyage-code-2', 'voyage-2', 'voyage-law-2', 'voyage-large-2-instruct', 'voyage-finance-2', 'voyage-multilingual-2'] | str | None) –
The model to use. Defaults to None, which uses the server-defined default. See the documentation for more details.
base_url (str | None) – The base URL to use where API requests should go. Defaults to None, which uses the server-defined default.
truncate (bool | None) – Whether to truncate the input texts to fit within the context length. Defaults to None, which uses the server-defined default.
- Return type:
- static text2vec_weaviate(name, *, model=None, base_url=None, dimensions=None, source_properties=None, vector_index_config=None, vectorize_collection_name=True)[source]
- Parameters:
name (str)
model (Literal['Snowflake/snowflake-arctic-embed-l-v2.0', 'Snowflake/snowflake-arctic-embed-m-v1.5'] | str | None)
base_url (str | None)
dimensions (int | None)
source_properties (List[str] | None)
vector_index_config (_VectorIndexConfigCreate | None)
vectorize_collection_name (bool)
- Return type:
- static text2vec_nvidia(name, *, model=None, base_url=None, truncate=None, source_properties=None, vector_index_config=None, vectorize_collection_name=True)[source]
Create a named vector using the text2vec-nvidia model.
See the documentation for detailed usage.
- Parameters:
name (str) – The name of the named vector.
source_properties (List[str] | None) – Which properties should be included when vectorizing. By default all text properties are included.
vector_index_config (_VectorIndexConfigCreate | None) – The configuration for Weaviate’s vector index. Use wvc.config.Configure.VectorIndex to create a vector index configuration. None by default
vectorize_collection_name (bool) – Whether to vectorize the collection name. Defaults to True.
model (str | None) –
The model to use. Defaults to None, which uses the server-defined default. See the documentation for more details.
base_url (str | None) – The base URL to use where API requests should go. Defaults to None, which uses the server-defined default.
truncate (bool | None) – Whether to truncate the input texts to fit within the context length. Defaults to None, which uses the server-defined default.
- Return type:
- static text2vec_model2vec(name, *, source_properties=None, vector_index_config=None, vectorize_collection_name=True, inference_url=None)[source]
Create a named vector using the text2vec-model2vec model.
See the documentation for detailed usage.
- Parameters:
name (str) – The name of the named vector.
source_properties (List[str] | None) – Which properties should be included when vectorizing. By default all text properties are included.
vector_index_config (_VectorIndexConfigCreate | None) – The configuration for Weaviate’s vector index. Use wvc.config.Configure.VectorIndex to create a vector index configuration. None by default
vectorize_collection_name (bool) – Whether to vectorize the collection name. Defaults to True.
inference_url (str | None) – The inference url to use where API requests should go. Defaults to None, which uses the server-defined default.
- Return type:
- class weaviate.collections.classes.config_named_vectors._NamedVectorsUpdate[source]
Bases:
object- static update(name, *, vector_index_config)[source]
Update the vector index configuration of a named vector.
This is the only update operation allowed currently. If you wish to change the vectorization configuration itself, you will have to recreate the collection with the new configuration.
- Parameters:
name (str) – The name of the named vector.
vector_index_config (_VectorIndexConfigHNSWUpdate | _VectorIndexConfigHFreshUpdate | _VectorIndexConfigFlatUpdate | _VectorIndexConfigDynamicUpdate) – The configuration for Weaviate’s vector index. Use wvc.config.Reconfigure.VectorIndex to create a vector index configuration. None by default
- Return type:
weaviate.collections.classes.config_vector_index
- class weaviate.collections.classes.config_vector_index.VectorFilterStrategy(*values)[source]
Bases:
str,EnumSet the strategy when doing a filtered HNSW search.
- SWEEPING
Do normal ANN search and skip nodes.
- ACORN
Multi-hop search to find new candidates matching the filter.
- SWEEPING = 'sweeping'
- ACORN = 'acorn'
- class weaviate.collections.classes.config_vector_index.VectorIndexType(*values)[source]
Bases:
str,EnumThe available vector index types in Weaviate.
- HNSW
Hierarchical Navigable Small World (HNSW) index.
- FLAT
Flat index.
- DYNAMIC
Dynamic index.
- HFRESH
HFRESH index.
- HNSW = 'hnsw'
- FLAT = 'flat'
- DYNAMIC = 'dynamic'
- HFRESH = 'hfresh'
- class weaviate.collections.classes.config_vector_index._MultiVectorConfigCreateBase(*, enabled=True)[source]
Bases:
_ConfigCreateModelCreate a new model by parsing and validating input data from keyword arguments.
Raises [ValidationError][pydantic_core.ValidationError] if the input data cannot be validated to form a valid model.
self is explicitly positional-only to allow self as a field name.
- Parameters:
enabled (bool)
- enabled: bool
- _abc_impl = <_abc._abc_data object>
- model_config = {'strict': True}
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- class weaviate.collections.classes.config_vector_index._MultiVectorEncodingConfigCreate(*, enabled=True)[source]
Bases:
_MultiVectorConfigCreateBaseCreate a new model by parsing and validating input data from keyword arguments.
Raises [ValidationError][pydantic_core.ValidationError] if the input data cannot be validated to form a valid model.
self is explicitly positional-only to allow self as a field name.
- Parameters:
enabled (bool)
- enabled: bool
- _abc_impl = <_abc._abc_data object>
- model_config = {'strict': True}
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- class weaviate.collections.classes.config_vector_index._MuveraConfigCreate(*, enabled=True, ksim, dprojections, repetitions)[source]
Bases:
_MultiVectorEncodingConfigCreateCreate a new model by parsing and validating input data from keyword arguments.
Raises [ValidationError][pydantic_core.ValidationError] if the input data cannot be validated to form a valid model.
self is explicitly positional-only to allow self as a field name.
- Parameters:
enabled (bool)
ksim (int | None)
dprojections (int | None)
repetitions (int | None)
- ksim: int | None
- dprojections: int | None
- repetitions: int | None
- _abc_impl = <_abc._abc_data object>
- model_config = {'strict': True}
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- class weaviate.collections.classes.config_vector_index._MultiVectorConfigCreate(*, enabled=True, encoding, aggregation)[source]
Bases:
_MultiVectorConfigCreateBaseCreate a new model by parsing and validating input data from keyword arguments.
Raises [ValidationError][pydantic_core.ValidationError] if the input data cannot be validated to form a valid model.
self is explicitly positional-only to allow self as a field name.
- Parameters:
enabled (bool)
encoding (_MultiVectorEncodingConfigCreate | None)
aggregation (str | None)
- encoding: _MultiVectorEncodingConfigCreate | None
- aggregation: str | None
- _abc_impl = <_abc._abc_data object>
- model_config = {'strict': True}
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- class weaviate.collections.classes.config_vector_index._VectorIndexConfigCreate(*, distance, multivector, quantizer)[source]
Bases:
_ConfigCreateModelCreate a new model by parsing and validating input data from keyword arguments.
Raises [ValidationError][pydantic_core.ValidationError] if the input data cannot be validated to form a valid model.
self is explicitly positional-only to allow self as a field name.
- Parameters:
distance (VectorDistances | None)
multivector (_MultiVectorConfigCreate | None)
quantizer (_QuantizerConfigCreate | None)
- distance: VectorDistances | None
- multivector: _MultiVectorConfigCreate | None
- quantizer: _QuantizerConfigCreate | None
- _abc_impl = <_abc._abc_data object>
- model_config = {'strict': True}
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- class weaviate.collections.classes.config_vector_index._VectorIndexConfigUpdate(*, quantizer)[source]
Bases:
_ConfigUpdateModelCreate a new model by parsing and validating input data from keyword arguments.
Raises [ValidationError][pydantic_core.ValidationError] if the input data cannot be validated to form a valid model.
self is explicitly positional-only to allow self as a field name.
- Parameters:
quantizer (_QuantizerConfigUpdate | None)
- quantizer: _QuantizerConfigUpdate | None
- _abc_impl = <_abc._abc_data object>
- model_config = {'strict': True}
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- class weaviate.collections.classes.config_vector_index._VectorIndexConfigSkipCreate(*, distance, multivector, quantizer, skip=True)[source]
Bases:
_VectorIndexConfigCreateCreate a new model by parsing and validating input data from keyword arguments.
Raises [ValidationError][pydantic_core.ValidationError] if the input data cannot be validated to form a valid model.
self is explicitly positional-only to allow self as a field name.
- Parameters:
distance (VectorDistances | None)
multivector (_MultiVectorConfigCreate | None)
quantizer (_QuantizerConfigCreate | None)
skip (bool)
- skip: bool
- _abc_impl = <_abc._abc_data object>
- model_config = {'strict': True}
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- class weaviate.collections.classes.config_vector_index._VectorIndexConfigHNSWCreate(*, distance, multivector, quantizer, cleanupIntervalSeconds, dynamicEfMin, dynamicEfMax, dynamicEfFactor, efConstruction, ef, filterStrategy, flatSearchCutoff, maxConnections, vectorCacheMaxObjects)[source]
Bases:
_VectorIndexConfigCreateCreate a new model by parsing and validating input data from keyword arguments.
Raises [ValidationError][pydantic_core.ValidationError] if the input data cannot be validated to form a valid model.
self is explicitly positional-only to allow self as a field name.
- Parameters:
distance (VectorDistances | None)
multivector (_MultiVectorConfigCreate | None)
quantizer (_QuantizerConfigCreate | None)
cleanupIntervalSeconds (int | None)
dynamicEfMin (int | None)
dynamicEfMax (int | None)
dynamicEfFactor (int | None)
efConstruction (int | None)
ef (int | None)
filterStrategy (VectorFilterStrategy | None)
flatSearchCutoff (int | None)
maxConnections (int | None)
vectorCacheMaxObjects (int | None)
- cleanupIntervalSeconds: int | None
- dynamicEfMin: int | None
- dynamicEfMax: int | None
- dynamicEfFactor: int | None
- efConstruction: int | None
- ef: int | None
- filterStrategy: VectorFilterStrategy | None
- flatSearchCutoff: int | None
- maxConnections: int | None
- vectorCacheMaxObjects: int | None
- _abc_impl = <_abc._abc_data object>
- model_config = {'strict': True}
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- class weaviate.collections.classes.config_vector_index._VectorIndexConfigHFreshCreate(*, distance, multivector, quantizer, maxPostingSizeKB, replicas, searchProbe)[source]
Bases:
_VectorIndexConfigCreateCreate a new model by parsing and validating input data from keyword arguments.
Raises [ValidationError][pydantic_core.ValidationError] if the input data cannot be validated to form a valid model.
self is explicitly positional-only to allow self as a field name.
- Parameters:
distance (VectorDistances | None)
multivector (_MultiVectorConfigCreate | None)
quantizer (_QuantizerConfigCreate | None)
maxPostingSizeKB (int | None)
replicas (int | None)
searchProbe (int | None)
- maxPostingSizeKB: int | None
- replicas: int | None
- searchProbe: int | None
- _abc_impl = <_abc._abc_data object>
- model_config = {'strict': True}
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- class weaviate.collections.classes.config_vector_index._VectorIndexConfigFlatCreate(*, distance, multivector, quantizer, vectorCacheMaxObjects)[source]
Bases:
_VectorIndexConfigCreateCreate a new model by parsing and validating input data from keyword arguments.
Raises [ValidationError][pydantic_core.ValidationError] if the input data cannot be validated to form a valid model.
self is explicitly positional-only to allow self as a field name.
- Parameters:
distance (VectorDistances | None)
multivector (_MultiVectorConfigCreate | None)
quantizer (_QuantizerConfigCreate | None)
vectorCacheMaxObjects (int | None)
- vectorCacheMaxObjects: int | None
- _abc_impl = <_abc._abc_data object>
- model_config = {'strict': True}
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- class weaviate.collections.classes.config_vector_index._VectorIndexConfigHNSWUpdate(*, quantizer, dynamicEfMin, dynamicEfMax, dynamicEfFactor, ef, filterStrategy, flatSearchCutoff, vectorCacheMaxObjects)[source]
Bases:
_VectorIndexConfigUpdateCreate a new model by parsing and validating input data from keyword arguments.
Raises [ValidationError][pydantic_core.ValidationError] if the input data cannot be validated to form a valid model.
self is explicitly positional-only to allow self as a field name.
- Parameters:
quantizer (_QuantizerConfigUpdate | None)
dynamicEfMin (int | None)
dynamicEfMax (int | None)
dynamicEfFactor (int | None)
ef (int | None)
filterStrategy (VectorFilterStrategy | None)
flatSearchCutoff (int | None)
vectorCacheMaxObjects (int | None)
- dynamicEfMin: int | None
- dynamicEfMax: int | None
- dynamicEfFactor: int | None
- ef: int | None
- filterStrategy: VectorFilterStrategy | None
- flatSearchCutoff: int | None
- vectorCacheMaxObjects: int | None
- _abc_impl = <_abc._abc_data object>
- model_config = {'strict': True}
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- class weaviate.collections.classes.config_vector_index._VectorIndexConfigHFreshUpdate(*, quantizer, maxPostingSizeKB, searchProbe)[source]
Bases:
_VectorIndexConfigUpdateCreate a new model by parsing and validating input data from keyword arguments.
Raises [ValidationError][pydantic_core.ValidationError] if the input data cannot be validated to form a valid model.
self is explicitly positional-only to allow self as a field name.
- Parameters:
quantizer (_QuantizerConfigUpdate | None)
maxPostingSizeKB (int | None)
searchProbe (int | None)
- maxPostingSizeKB: int | None
- searchProbe: int | None
- _abc_impl = <_abc._abc_data object>
- model_config = {'strict': True}
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- class weaviate.collections.classes.config_vector_index._VectorIndexConfigFlatUpdate(*, quantizer, vectorCacheMaxObjects)[source]
Bases:
_VectorIndexConfigUpdateCreate a new model by parsing and validating input data from keyword arguments.
Raises [ValidationError][pydantic_core.ValidationError] if the input data cannot be validated to form a valid model.
self is explicitly positional-only to allow self as a field name.
- Parameters:
quantizer (_QuantizerConfigUpdate | None)
vectorCacheMaxObjects (int | None)
- vectorCacheMaxObjects: int | None
- _abc_impl = <_abc._abc_data object>
- model_config = {'strict': True}
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- class weaviate.collections.classes.config_vector_index._VectorIndexConfigDynamicCreate(*, distance, multivector, quantizer, threshold, hnsw, flat)[source]
Bases:
_VectorIndexConfigCreateCreate a new model by parsing and validating input data from keyword arguments.
Raises [ValidationError][pydantic_core.ValidationError] if the input data cannot be validated to form a valid model.
self is explicitly positional-only to allow self as a field name.
- Parameters:
distance (VectorDistances | None)
multivector (_MultiVectorConfigCreate | None)
quantizer (_QuantizerConfigCreate | None)
threshold (int | None)
hnsw (_VectorIndexConfigHNSWCreate | None)
flat (_VectorIndexConfigFlatCreate | None)
- threshold: int | None
- hnsw: _VectorIndexConfigHNSWCreate | None
- flat: _VectorIndexConfigFlatCreate | None
- _abc_impl = <_abc._abc_data object>
- model_config = {'strict': True}
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- class weaviate.collections.classes.config_vector_index._VectorIndexConfigDynamicUpdate(*, quantizer, threshold, hnsw, flat)[source]
Bases:
_VectorIndexConfigUpdateCreate a new model by parsing and validating input data from keyword arguments.
Raises [ValidationError][pydantic_core.ValidationError] if the input data cannot be validated to form a valid model.
self is explicitly positional-only to allow self as a field name.
- Parameters:
quantizer (_QuantizerConfigUpdate | None)
threshold (int | None)
hnsw (_VectorIndexConfigHNSWUpdate | None)
flat (_VectorIndexConfigFlatUpdate | None)
- threshold: int | None
- hnsw: _VectorIndexConfigHNSWUpdate | None
- flat: _VectorIndexConfigFlatUpdate | None
- _abc_impl = <_abc._abc_data object>
- model_config = {'strict': True}
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- class weaviate.collections.classes.config_vector_index.PQEncoderType(*values)[source]
Bases:
str,BaseEnumType of the PQ encoder.
- KMEANS
K-means encoder.
- TILE
Tile encoder.
- KMEANS = 'kmeans'
- TILE = 'tile'
- class weaviate.collections.classes.config_vector_index.PQEncoderDistribution(*values)[source]
Bases:
str,BaseEnumDistribution of the PQ encoder.
- LOG_NORMAL
Log-normal distribution.
- NORMAL
Normal distribution.
- LOG_NORMAL = 'log-normal'
- NORMAL = 'normal'
- class weaviate.collections.classes.config_vector_index.MultiVectorAggregation(*values)[source]
Bases:
str,BaseEnumAggregation type to use for multivector indices.
- MAX_SIM
Maximum similarity.
- MAX_SIM = 'maxSim'
- class weaviate.collections.classes.config_vector_index._PQEncoderConfigCreate(*, type_, distribution)[source]
Bases:
_ConfigCreateModelCreate a new model by parsing and validating input data from keyword arguments.
Raises [ValidationError][pydantic_core.ValidationError] if the input data cannot be validated to form a valid model.
self is explicitly positional-only to allow self as a field name.
- Parameters:
type_ (PQEncoderType | None)
distribution (PQEncoderDistribution | None)
- type_: PQEncoderType | None
- distribution: PQEncoderDistribution | None
- _abc_impl = <_abc._abc_data object>
- model_config = {'strict': True}
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- class weaviate.collections.classes.config_vector_index._PQEncoderConfigUpdate(*, type_, distribution)[source]
Bases:
_ConfigUpdateModelCreate a new model by parsing and validating input data from keyword arguments.
Raises [ValidationError][pydantic_core.ValidationError] if the input data cannot be validated to form a valid model.
self is explicitly positional-only to allow self as a field name.
- Parameters:
type_ (PQEncoderType | None)
distribution (PQEncoderDistribution | None)
- type_: PQEncoderType | None
- distribution: PQEncoderDistribution | None
- merge_with_existing(schema)[source]
Must be done manually since Pydantic does not work well with type and type_.
Errors shadowing type occur if we want to use type as a field name.
- Parameters:
schema (Dict[str, Any])
- Return type:
Dict[str, Any]
- _abc_impl = <_abc._abc_data object>
- model_config = {'strict': True}
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- class weaviate.collections.classes.config_vector_index._PQConfigCreate(*, enabled=True, bitCompression=None, centroids, encoder, segments, trainingLimit)[source]
Bases:
_QuantizerConfigCreateCreate a new model by parsing and validating input data from keyword arguments.
Raises [ValidationError][pydantic_core.ValidationError] if the input data cannot be validated to form a valid model.
self is explicitly positional-only to allow self as a field name.
- Parameters:
enabled (bool)
bitCompression (bool | None)
centroids (int | None)
encoder (_PQEncoderConfigCreate)
segments (int | None)
trainingLimit (int | None)
- bitCompression: bool | None
- centroids: int | None
- encoder: _PQEncoderConfigCreate
- segments: int | None
- trainingLimit: int | None
- _abc_impl = <_abc._abc_data object>
- model_config = {'strict': True}
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- class weaviate.collections.classes.config_vector_index._BQConfigCreate(*, enabled=True, cache, rescoreLimit)[source]
Bases:
_QuantizerConfigCreateCreate a new model by parsing and validating input data from keyword arguments.
Raises [ValidationError][pydantic_core.ValidationError] if the input data cannot be validated to form a valid model.
self is explicitly positional-only to allow self as a field name.
- Parameters:
enabled (bool)
cache (bool | None)
rescoreLimit (int | None)
- cache: bool | None
- rescoreLimit: int | None
- _abc_impl = <_abc._abc_data object>
- model_config = {'strict': True}
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- class weaviate.collections.classes.config_vector_index._SQConfigCreate(*, enabled=True, rescoreLimit, trainingLimit)[source]
Bases:
_QuantizerConfigCreateCreate a new model by parsing and validating input data from keyword arguments.
Raises [ValidationError][pydantic_core.ValidationError] if the input data cannot be validated to form a valid model.
self is explicitly positional-only to allow self as a field name.
- Parameters:
enabled (bool)
rescoreLimit (int | None)
trainingLimit (int | None)
- rescoreLimit: int | None
- trainingLimit: int | None
- _abc_impl = <_abc._abc_data object>
- model_config = {'strict': True}
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- class weaviate.collections.classes.config_vector_index._RQConfigCreate(*, enabled=True, cache, bits, rescoreLimit)[source]
Bases:
_QuantizerConfigCreateCreate a new model by parsing and validating input data from keyword arguments.
Raises [ValidationError][pydantic_core.ValidationError] if the input data cannot be validated to form a valid model.
self is explicitly positional-only to allow self as a field name.
- Parameters:
enabled (bool)
cache (bool | None)
bits (int | None)
rescoreLimit (int | None)
- cache: bool | None
- bits: int | None
- rescoreLimit: int | None
- _abc_impl = <_abc._abc_data object>
- model_config = {'strict': True}
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- class weaviate.collections.classes.config_vector_index._UncompressedConfigCreate(*, enabled=True)[source]
Bases:
_QuantizerConfigCreateCreate a new model by parsing and validating input data from keyword arguments.
Raises [ValidationError][pydantic_core.ValidationError] if the input data cannot be validated to form a valid model.
self is explicitly positional-only to allow self as a field name.
- Parameters:
enabled (bool)
- _abc_impl = <_abc._abc_data object>
- model_config = {'strict': True}
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- class weaviate.collections.classes.config_vector_index._PQConfigUpdate(*, bitCompression=None, centroids, enabled, segments, trainingLimit, encoder)[source]
Bases:
_QuantizerConfigUpdateCreate a new model by parsing and validating input data from keyword arguments.
Raises [ValidationError][pydantic_core.ValidationError] if the input data cannot be validated to form a valid model.
self is explicitly positional-only to allow self as a field name.
- Parameters:
bitCompression (bool | None)
centroids (int | None)
enabled (bool | None)
segments (int | None)
trainingLimit (int | None)
encoder (_PQEncoderConfigUpdate | None)
- bitCompression: bool | None
- centroids: int | None
- enabled: bool | None
- segments: int | None
- trainingLimit: int | None
- encoder: _PQEncoderConfigUpdate | None
- _abc_impl = <_abc._abc_data object>
- model_config = {'strict': True}
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- class weaviate.collections.classes.config_vector_index._BQConfigUpdate(*, enabled, rescoreLimit)[source]
Bases:
_QuantizerConfigUpdateCreate a new model by parsing and validating input data from keyword arguments.
Raises [ValidationError][pydantic_core.ValidationError] if the input data cannot be validated to form a valid model.
self is explicitly positional-only to allow self as a field name.
- Parameters:
enabled (bool | None)
rescoreLimit (int | None)
- enabled: bool | None
- rescoreLimit: int | None
- _abc_impl = <_abc._abc_data object>
- model_config = {'strict': True}
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- class weaviate.collections.classes.config_vector_index._RQConfigUpdate(*, enabled, rescoreLimit, bits)[source]
Bases:
_QuantizerConfigUpdateCreate a new model by parsing and validating input data from keyword arguments.
Raises [ValidationError][pydantic_core.ValidationError] if the input data cannot be validated to form a valid model.
self is explicitly positional-only to allow self as a field name.
- Parameters:
enabled (bool | None)
rescoreLimit (int | None)
bits (int | None)
- enabled: bool | None
- rescoreLimit: int | None
- bits: int | None
- _abc_impl = <_abc._abc_data object>
- model_config = {'strict': True}
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- class weaviate.collections.classes.config_vector_index._SQConfigUpdate(*, enabled, rescoreLimit, trainingLimit)[source]
Bases:
_QuantizerConfigUpdateCreate a new model by parsing and validating input data from keyword arguments.
Raises [ValidationError][pydantic_core.ValidationError] if the input data cannot be validated to form a valid model.
self is explicitly positional-only to allow self as a field name.
- Parameters:
enabled (bool | None)
rescoreLimit (int | None)
trainingLimit (int | None)
- enabled: bool | None
- rescoreLimit: int | None
- trainingLimit: int | None
- _abc_impl = <_abc._abc_data object>
- model_config = {'strict': True}
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- class weaviate.collections.classes.config_vector_index._VectorIndexMultivectorEncoding[source]
Bases:
object
- class weaviate.collections.classes.config_vector_index._VectorIndexMultiVector[source]
Bases:
object- Encoding
alias of
_VectorIndexMultivectorEncoding
- static multi_vector(encoding: _MultiVectorEncodingConfigCreate, aggregation: MultiVectorAggregation | None = None) _MultiVectorConfigCreate[source]
- static multi_vector(encoding: _MultiVectorEncodingConfigCreate | None = None, aggregation: MultiVectorAggregation | None = None) _MultiVectorConfigCreate
- Parameters:
encoding (_MultiVectorEncodingConfigCreate | None)
aggregation (MultiVectorAggregation | None)
- Return type:
- class weaviate.collections.classes.config_vector_index._VectorIndexQuantizer[source]
Bases:
object- static pq(bit_compression=None, centroids=None, encoder_distribution=None, encoder_type=None, segments=None, training_limit=None)[source]
Create a _PQConfigCreate object to be used when defining the product quantization (PQ) configuration of Weaviate.
Use this method when defining the quantizer argument in the vector_index configuration.
- Parameters:
<https (See `the docs) –
//weaviate.io/developers/weaviate/concepts/vector-index#hnsw-with-compression>`_ for a more detailed view!
bit_compression (bool | None)
centroids (int | None)
encoder_distribution (PQEncoderDistribution | None)
encoder_type (PQEncoderType | None)
segments (int | None)
training_limit (int | None)
- Return type:
- static bq(cache=None, rescore_limit=None)[source]
Create a _BQConfigCreate object to be used when defining the binary quantization (BQ) configuration of Weaviate.
Use this method when defining the quantizer argument in the vector_index configuration. Note that the arguments have no effect for HNSW.
- Parameters:
<https (See `the docs) –
//weaviate.io/developers/weaviate/concepts/vector-index#binary-quantization>`_ for a more detailed view!
cache (bool | None)
rescore_limit (int | None)
- Return type:
- static sq(cache: bool, rescore_limit: int | None = None, training_limit: int | None = None) _SQConfigCreate[source]
- static sq(cache: Literal[None] = None, rescore_limit: int | None = None, training_limit: int | None = None) _SQConfigCreate
Create a _SQConfigCreate object to be used when defining the scalar quantization (SQ) configuration of Weaviate.
Use this method when defining the quantizer argument in the vector_index configuration. Note that the arguments have no effect for HNSW.
- Parameters:
<https (See `the docs) –
//weaviate.io/developers/weaviate/concepts/vector-index#binary-quantization>`_ for a more detailed view!
cache (bool | None)
rescore_limit (int | None)
training_limit (int | None)
- Return type:
- static rq(cache=None, bits=None, rescore_limit=None)[source]
Create a _RQConfigCreate object to be used when defining the Rotational quantization (RQ) configuration of Weaviate.
Use this method when defining the quantizer argument in the vector_index configuration. Note that the arguments have no effect for HNSW.
- Parameters:
<https (See `the docs) –
//weaviate.io/developers/weaviate/concepts/vector-index>`_ for a more detailed view!
cache (bool | None)
bits (int | None)
rescore_limit (int | None)
- Return type:
- class weaviate.collections.classes.config_vector_index._VectorIndex[source]
Bases:
object- MultiVector
alias of
_VectorIndexMultiVector
- Quantizer
alias of
_VectorIndexQuantizer
- static none()[source]
Create a _VectorIndexConfigSkipCreate object to be used when configuring Weaviate to not index your vectors.
Use this method when defining the vector_index_config argument in collections.create().
- Return type:
- static hnsw(cleanup_interval_seconds: int | None = None, distance_metric: VectorDistances | None = None, dynamic_ef_factor: int | None = None, dynamic_ef_max: int | None = None, dynamic_ef_min: int | None = None, ef: int | None = None, ef_construction: int | None = None, filter_strategy: VectorFilterStrategy | None = None, flat_search_cutoff: int | None = None, max_connections: int | None = None, vector_cache_max_objects: int | None = None, *, quantizer: _QuantizerConfigCreate | None = None, multi_vector: _MultiVectorConfigCreate) _VectorIndexConfigHNSWCreate[source]
- static hnsw(cleanup_interval_seconds: int | None = None, distance_metric: VectorDistances | None = None, dynamic_ef_factor: int | None = None, dynamic_ef_max: int | None = None, dynamic_ef_min: int | None = None, ef: int | None = None, ef_construction: int | None = None, filter_strategy: VectorFilterStrategy | None = None, flat_search_cutoff: int | None = None, max_connections: int | None = None, vector_cache_max_objects: int | None = None, quantizer: _QuantizerConfigCreate | None = None, multi_vector: _MultiVectorConfigCreate | None = None) _VectorIndexConfigHNSWCreate
Create a _VectorIndexConfigHNSWCreate object to be used when defining the HNSW vector index configuration of Weaviate.
Use this method when defining the vector_index_config argument in collections.create().
- Parameters:
<https (See `the docs) –
//weaviate.io/developers/weaviate/configuration/indexes#how-to-configure-hnsw>`_ for a more detailed view!
cleanup_interval_seconds (int | None)
distance_metric (VectorDistances | None)
dynamic_ef_factor (int | None)
dynamic_ef_max (int | None)
dynamic_ef_min (int | None)
ef (int | None)
ef_construction (int | None)
filter_strategy (VectorFilterStrategy | None)
flat_search_cutoff (int | None)
max_connections (int | None)
vector_cache_max_objects (int | None)
quantizer (_QuantizerConfigCreate | None)
multi_vector (_MultiVectorConfigCreate | None)
- Return type:
- static hfresh(distance_metric=None, max_posting_size_kb=None, replicas=None, search_probe=None, quantizer=None, multi_vector=None)[source]
Create a _VectorIndexConfigHFreshCreate object to be used when defining the HFresh vector index configuration of Weaviate.
Use this method when defining the vector_index_config argument in collections.create().
- Parameters:
<https (See `the docs) –
//weaviate.io/developers/weaviate/configuration/indexes#how-to-configure-hfresh>`_ for a more detailed view!
distance_metric (VectorDistances | None)
max_posting_size_kb (int | None)
replicas (int | None)
search_probe (int | None)
quantizer (_QuantizerConfigCreate | None)
multi_vector (_MultiVectorConfigCreate | None)
- Return type:
- static flat(distance_metric=None, vector_cache_max_objects=None, quantizer=None)[source]
Create a _VectorIndexConfigFlatCreate object to be used when defining the FLAT vector index configuration of Weaviate.
Use this method when defining the vector_index_config argument in collections.create().
- Parameters:
<https (See `the docs) –
//weaviate.io/developers/weaviate/configuration/indexes#how-to-configure-hnsw>`_ for a more detailed view!
distance_metric (VectorDistances | None)
vector_cache_max_objects (int | None)
quantizer (_QuantizerConfigCreate | None)
- Return type:
- static dynamic(distance_metric=None, threshold=None, hnsw=None, flat=None)[source]
Create a _VectorIndexConfigDynamicCreate object to be used when defining the DYNAMIC vector index configuration of Weaviate.
Use this method when defining the vector_index_config argument in collections.create().
- Parameters:
<https (See `the docs) –
//weaviate.io/developers/weaviate/configuration/indexes#how-to-configure-hnsw>`_ for a more detailed view!
distance_metric (VectorDistances | None)
threshold (int | None)
hnsw (_VectorIndexConfigHNSWCreate | None)
flat (_VectorIndexConfigFlatCreate | None)
- Return type:
weaviate.collections.classes.config_vectorizers
- class weaviate.collections.classes.config_vectorizers.Vectorizers(*values)[source]
Bases:
str,EnumThe available vectorization modules in Weaviate.
These modules encode binary data into lists of floats called vectors. See the docs for more details.
- NONE
No vectorizer.
- TEXT2VEC_AWS
Weaviate module backed by AWS text-based embedding models.
- TEXT2VEC_COHERE
Weaviate module backed by Cohere text-based embedding models.
- TEXT2VEC_CONTEXTIONARY
Weaviate module backed by Contextionary text-based embedding models.
- TEXT2VEC_GPT4ALL
Weaviate module backed by GPT-4-All text-based embedding models.
- TEXT2VEC_HUGGINGFACE
Weaviate module backed by HuggingFace text-based embedding models.
- TEXT2VEC_OPENAI
Weaviate module backed by OpenAI and Azure-OpenAI text-based embedding models.
- TEXT2VEC_PALM
Weaviate module backed by PaLM text-based embedding models.
- TEXT2VEC_TRANSFORMERS
Weaviate module backed by Transformers text-based embedding models.
- TEXT2VEC_JINAAI
Weaviate module backed by Jina AI text-based embedding models.
- TEXT2VEC_VOYAGEAI
Weaviate module backed by Voyage AI text-based embedding models.
- TEXT2VEC_NVIDIA
Weaviate module backed by NVIDIA text-based embedding models.
- TEXT2VEC_WEAVIATE
Weaviate module backed by Weaviate’s self-hosted text-based embedding models.
- IMG2VEC_NEURAL
Weaviate module backed by a ResNet-50 neural network for images.
- MULTI2VEC_CLIP
Weaviate module backed by a Sentence-BERT CLIP model for images and text.
- MULTI2VEC_PALM
Weaviate module backed by a palm model for images and text.
- MULTI2VEC_BIND
Weaviate module backed by the ImageBind model for images, text, audio, depth, IMU, thermal, and video.
- MULTI2VEC_VOYAGEAI
Weaviate module backed by a Voyage AI multimodal embedding models.
- MULTI2VEC_NVIDIA
Weaviate module backed by NVIDIA multimodal embedding models.
- REF2VEC_CENTROID
Weaviate module backed by a centroid-based model that calculates an object’s vectors from its referenced vectors.
- NONE = 'none'
- TEXT2COLBERT_JINAAI = 'text2colbert-jinaai'
- TEXT2VEC_AWS = 'text2vec-aws'
- TEXT2VEC_COHERE = 'text2vec-cohere'
- TEXT2VEC_CONTEXTIONARY = 'text2vec-contextionary'
- TEXT2VEC_DATABRICKS = 'text2vec-databricks'
- TEXT2VEC_GPT4ALL = 'text2vec-gpt4all'
- TEXT2VEC_HUGGINGFACE = 'text2vec-huggingface'
- TEXT2VEC_MISTRAL = 'text2vec-mistral'
- TEXT2VEC_MORPH = 'text2vec-morph'
- TEXT2VEC_MODEL2VEC = 'text2vec-model2vec'
- TEXT2VEC_NVIDIA = 'text2vec-nvidia'
- TEXT2VEC_OLLAMA = 'text2vec-ollama'
- TEXT2VEC_OPENAI = 'text2vec-openai'
- TEXT2VEC_PALM = 'text2vec-palm'
- TEXT2VEC_TRANSFORMERS = 'text2vec-transformers'
- TEXT2VEC_JINAAI = 'text2vec-jinaai'
- TEXT2VEC_VOYAGEAI = 'text2vec-voyageai'
- TEXT2VEC_WEAVIATE = 'text2vec-weaviate'
- IMG2VEC_NEURAL = 'img2vec-neural'
- MULTI2VEC_AWS = 'multi2vec-aws'
- MULTI2VEC_CLIP = 'multi2vec-clip'
- MULTI2VEC_COHERE = 'multi2vec-cohere'
- MULTI2VEC_JINAAI = 'multi2vec-jinaai'
- MULTI2MULTI_JINAAI = 'multi2multivec-jinaai'
- MULTI2MULTI_WEAVIATE = 'multi2multivec-weaviate'
- MULTI2VEC_BIND = 'multi2vec-bind'
- MULTI2VEC_PALM = 'multi2vec-palm'
- MULTI2VEC_VOYAGEAI = 'multi2vec-voyageai'
- MULTI2VEC_NVIDIA = 'multi2vec-nvidia'
- REF2VEC_CENTROID = 'ref2vec-centroid'
- class weaviate.collections.classes.config_vectorizers.VectorDistances(*values)[source]
Bases:
str,EnumVector similarity distance metric to be used in the VectorIndexConfig class.
To ensure optimal search results, we recommend reviewing whether your model provider advises a specific distance metric and following their advice.
- COSINE = 'cosine'
- DOT = 'dot'
- L2_SQUARED = 'l2-squared'
- HAMMING = 'hamming'
- MANHATTAN = 'manhattan'
- class weaviate.collections.classes.config_vectorizers._VectorizerConfigCreate(*, vectorizer)[source]
Bases:
_ConfigCreateModelCreate a new model by parsing and validating input data from keyword arguments.
Raises [ValidationError][pydantic_core.ValidationError] if the input data cannot be validated to form a valid model.
self is explicitly positional-only to allow self as a field name.
- Parameters:
vectorizer (Vectorizers | _EnumLikeStr)
- vectorizer: Vectorizers | _EnumLikeStr
- _abc_impl = <_abc._abc_data object>
- model_config = {'strict': True}
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- class weaviate.collections.classes.config_vectorizers._Text2ColbertJinaAIConfig(*, vectorizer=Vectorizers.TEXT2COLBERT_JINAAI, vectorizeClassName, model, dimensions)[source]
Bases:
_VectorizerConfigCreateCreate a new model by parsing and validating input data from keyword arguments.
Raises [ValidationError][pydantic_core.ValidationError] if the input data cannot be validated to form a valid model.
self is explicitly positional-only to allow self as a field name.
- Parameters:
vectorizer (Vectorizers | _EnumLikeStr)
vectorizeClassName (bool)
model (str | None)
dimensions (int | None)
- vectorizer: Vectorizers | _EnumLikeStr
- vectorizeClassName: bool
- model: str | None
- dimensions: int | None
- _abc_impl = <_abc._abc_data object>
- model_config = {'strict': True}
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- class weaviate.collections.classes.config_vectorizers._Text2VecContextionaryConfig(*, vectorizer=Vectorizers.TEXT2VEC_CONTEXTIONARY, vectorizeClassName)[source]
Bases:
_VectorizerConfigCreateCreate a new model by parsing and validating input data from keyword arguments.
Raises [ValidationError][pydantic_core.ValidationError] if the input data cannot be validated to form a valid model.
self is explicitly positional-only to allow self as a field name.
- Parameters:
vectorizer (Vectorizers | _EnumLikeStr)
vectorizeClassName (bool)
- vectorizer: Vectorizers | _EnumLikeStr
- vectorizeClassName: bool
- _abc_impl = <_abc._abc_data object>
- model_config = {'strict': True}
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- class weaviate.collections.classes.config_vectorizers._Text2VecModel2VecConfig(*, vectorizer=Vectorizers.TEXT2VEC_MODEL2VEC, vectorizeClassName, inferenceUrl)[source]
Bases:
_VectorizerConfigCreateCreate a new model by parsing and validating input data from keyword arguments.
Raises [ValidationError][pydantic_core.ValidationError] if the input data cannot be validated to form a valid model.
self is explicitly positional-only to allow self as a field name.
- Parameters:
vectorizer (Vectorizers | _EnumLikeStr)
vectorizeClassName (bool)
inferenceUrl (str | None)
- vectorizer: Vectorizers | _EnumLikeStr
- vectorizeClassName: bool
- inferenceUrl: str | None
- _abc_impl = <_abc._abc_data object>
- model_config = {'strict': True}
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- class weaviate.collections.classes.config_vectorizers._VectorizerCustomConfig(*, vectorizer, module_config)[source]
Bases:
_VectorizerConfigCreateCreate a new model by parsing and validating input data from keyword arguments.
Raises [ValidationError][pydantic_core.ValidationError] if the input data cannot be validated to form a valid model.
self is explicitly positional-only to allow self as a field name.
- Parameters:
vectorizer (Vectorizers | _EnumLikeStr)
module_config (Dict[str, Any] | None)
- module_config: Dict[str, Any] | None
- _abc_impl = <_abc._abc_data object>
- model_config = {'strict': True}
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- class weaviate.collections.classes.config_vectorizers._Text2VecAWSConfig(*, vectorizer=Vectorizers.TEXT2VEC_AWS, model, endpoint, region, service, targetModel, targetVariant, vectorizeClassName)[source]
Bases:
_VectorizerConfigCreateCreate a new model by parsing and validating input data from keyword arguments.
Raises [ValidationError][pydantic_core.ValidationError] if the input data cannot be validated to form a valid model.
self is explicitly positional-only to allow self as a field name.
- Parameters:
vectorizer (Vectorizers | _EnumLikeStr)
model (str | None)
endpoint (str | None)
region (str)
service (str)
targetModel (str | None)
targetVariant (str | None)
vectorizeClassName (bool)
- vectorizer: Vectorizers | _EnumLikeStr
- model: str | None
- endpoint: str | None
- region: str
- service: str
- targetModel: str | None
- targetVariant: str | None
- vectorizeClassName: bool
- _abc_impl = <_abc._abc_data object>
- model_config = {'strict': True}
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- class weaviate.collections.classes.config_vectorizers._Text2VecAzureOpenAIConfig(*, vectorizer=Vectorizers.TEXT2VEC_OPENAI, baseURL, resourceName, deploymentId, vectorizeClassName, dimensions, model)[source]
Bases:
_VectorizerConfigCreateCreate a new model by parsing and validating input data from keyword arguments.
Raises [ValidationError][pydantic_core.ValidationError] if the input data cannot be validated to form a valid model.
self is explicitly positional-only to allow self as a field name.
- Parameters:
vectorizer (Vectorizers | _EnumLikeStr)
baseURL (AnyHttpUrl | None)
resourceName (str)
deploymentId (str)
vectorizeClassName (bool)
dimensions (int | None)
model (str | None)
- vectorizer: Vectorizers | _EnumLikeStr
- baseURL: AnyHttpUrl | None
- resourceName: str
- deploymentId: str
- vectorizeClassName: bool
- dimensions: int | None
- model: str | None
- _abc_impl = <_abc._abc_data object>
- model_config = {'strict': True}
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- class weaviate.collections.classes.config_vectorizers._Text2VecHuggingFaceConfig(*, vectorizer=Vectorizers.TEXT2VEC_HUGGINGFACE, model, passageModel, queryModel, endpointURL, waitForModel, useGPU, useCache, vectorizeClassName)[source]
Bases:
_VectorizerConfigCreateCreate a new model by parsing and validating input data from keyword arguments.
Raises [ValidationError][pydantic_core.ValidationError] if the input data cannot be validated to form a valid model.
self is explicitly positional-only to allow self as a field name.
- Parameters:
vectorizer (Vectorizers | _EnumLikeStr)
model (str | None)
passageModel (str | None)
queryModel (str | None)
endpointURL (AnyHttpUrl | None)
waitForModel (bool | None)
useGPU (bool | None)
useCache (bool | None)
vectorizeClassName (bool)
- vectorizer: Vectorizers | _EnumLikeStr
- model: str | None
- passageModel: str | None
- queryModel: str | None
- endpointURL: AnyHttpUrl | None
- waitForModel: bool | None
- useGPU: bool | None
- useCache: bool | None
- vectorizeClassName: bool
- _abc_impl = <_abc._abc_data object>
- model_config = {'strict': True}
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- class weaviate.collections.classes.config_vectorizers._Text2VecMistralConfig(*, vectorizer=Vectorizers.TEXT2VEC_MISTRAL, model, vectorizeClassName, baseURL)[source]
Bases:
_VectorizerConfigCreateCreate a new model by parsing and validating input data from keyword arguments.
Raises [ValidationError][pydantic_core.ValidationError] if the input data cannot be validated to form a valid model.
self is explicitly positional-only to allow self as a field name.
- Parameters:
vectorizer (Vectorizers | _EnumLikeStr)
model (str | None)
vectorizeClassName (bool)
baseURL (AnyHttpUrl | None)
- vectorizer: Vectorizers | _EnumLikeStr
- model: str | None
- vectorizeClassName: bool
- baseURL: AnyHttpUrl | None
- _abc_impl = <_abc._abc_data object>
- model_config = {'strict': True}
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- class weaviate.collections.classes.config_vectorizers._Text2VecMorphConfig(*, vectorizer=Vectorizers.TEXT2VEC_MORPH, model, vectorizeClassName, baseURL)[source]
Bases:
_VectorizerConfigCreateCreate a new model by parsing and validating input data from keyword arguments.
Raises [ValidationError][pydantic_core.ValidationError] if the input data cannot be validated to form a valid model.
self is explicitly positional-only to allow self as a field name.
- Parameters:
vectorizer (Vectorizers | _EnumLikeStr)
model (str | None)
vectorizeClassName (bool)
baseURL (AnyHttpUrl | None)
- vectorizer: Vectorizers | _EnumLikeStr
- model: str | None
- vectorizeClassName: bool
- baseURL: AnyHttpUrl | None
- _abc_impl = <_abc._abc_data object>
- model_config = {'strict': True}
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- class weaviate.collections.classes.config_vectorizers._Text2VecDatabricksConfig(*, vectorizer=Vectorizers.TEXT2VEC_DATABRICKS, endpoint, instruction, vectorizeClassName)[source]
Bases:
_VectorizerConfigCreateCreate a new model by parsing and validating input data from keyword arguments.
Raises [ValidationError][pydantic_core.ValidationError] if the input data cannot be validated to form a valid model.
self is explicitly positional-only to allow self as a field name.
- Parameters:
vectorizer (Vectorizers | _EnumLikeStr)
endpoint (str)
instruction (str | None)
vectorizeClassName (bool)
- vectorizer: Vectorizers | _EnumLikeStr
- endpoint: str
- instruction: str | None
- vectorizeClassName: bool
- _abc_impl = <_abc._abc_data object>
- model_config = {'strict': True}
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- class weaviate.collections.classes.config_vectorizers._Text2VecOpenAIConfig(*, vectorizer=Vectorizers.TEXT2VEC_OPENAI, baseURL, dimensions, model, modelVersion, type_, vectorizeClassName)[source]
Bases:
_VectorizerConfigCreateCreate a new model by parsing and validating input data from keyword arguments.
Raises [ValidationError][pydantic_core.ValidationError] if the input data cannot be validated to form a valid model.
self is explicitly positional-only to allow self as a field name.
- Parameters:
vectorizer (Vectorizers | _EnumLikeStr)
baseURL (AnyHttpUrl | None)
dimensions (int | None)
model (str | None)
modelVersion (str | None)
type_ (Literal['text', 'code'] | None)
vectorizeClassName (bool)
- vectorizer: Vectorizers | _EnumLikeStr
- baseURL: AnyHttpUrl | None
- dimensions: int | None
- model: str | None
- modelVersion: str | None
- type_: Literal['text', 'code'] | None
- vectorizeClassName: bool
- _abc_impl = <_abc._abc_data object>
- model_config = {'strict': True}
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- class weaviate.collections.classes.config_vectorizers._Text2VecCohereConfig(*, vectorizer=Vectorizers.TEXT2VEC_COHERE, baseURL, model, dimensions, truncate, vectorizeClassName)[source]
Bases:
_VectorizerConfigCreateCreate a new model by parsing and validating input data from keyword arguments.
Raises [ValidationError][pydantic_core.ValidationError] if the input data cannot be validated to form a valid model.
self is explicitly positional-only to allow self as a field name.
- Parameters:
vectorizer (Vectorizers | _EnumLikeStr)
baseURL (AnyHttpUrl | None)
model (str | None)
dimensions (int | None)
truncate (Literal['NONE', 'START', 'END', 'LEFT', 'RIGHT'] | None)
vectorizeClassName (bool)
- vectorizer: Vectorizers | _EnumLikeStr
- baseURL: AnyHttpUrl | None
- model: str | None
- dimensions: int | None
- truncate: Literal['NONE', 'START', 'END', 'LEFT', 'RIGHT'] | None
- vectorizeClassName: bool
- _abc_impl = <_abc._abc_data object>
- model_config = {'strict': True}
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- class weaviate.collections.classes.config_vectorizers._Text2VecGoogleConfig(*, vectorizer=Vectorizers.TEXT2VEC_PALM, projectId, apiEndpoint, dimensions, modelId, vectorizeClassName, titleProperty, taskType)[source]
Bases:
_VectorizerConfigCreateCreate a new model by parsing and validating input data from keyword arguments.
Raises [ValidationError][pydantic_core.ValidationError] if the input data cannot be validated to form a valid model.
self is explicitly positional-only to allow self as a field name.
- Parameters:
vectorizer (Vectorizers | _EnumLikeStr)
projectId (str | None)
apiEndpoint (str | None)
dimensions (int | None)
modelId (str | None)
vectorizeClassName (bool)
titleProperty (str | None)
taskType (str | None)
- vectorizer: Vectorizers | _EnumLikeStr
- projectId: str | None
- apiEndpoint: str | None
- dimensions: int | None
- modelId: str | None
- vectorizeClassName: bool
- titleProperty: str | None
- taskType: str | None
- _abc_impl = <_abc._abc_data object>
- model_config = {'strict': True}
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- class weaviate.collections.classes.config_vectorizers._Text2VecTransformersConfig(*, vectorizer=Vectorizers.TEXT2VEC_TRANSFORMERS, poolingStrategy, vectorizeClassName, inferenceUrl, passageInferenceUrl, queryInferenceUrl, dimensions=None)[source]
Bases:
_VectorizerConfigCreateCreate a new model by parsing and validating input data from keyword arguments.
Raises [ValidationError][pydantic_core.ValidationError] if the input data cannot be validated to form a valid model.
self is explicitly positional-only to allow self as a field name.
- Parameters:
vectorizer (Vectorizers | _EnumLikeStr)
poolingStrategy (Literal['masked_mean', 'cls'])
vectorizeClassName (bool)
inferenceUrl (str | None)
passageInferenceUrl (str | None)
queryInferenceUrl (str | None)
dimensions (int | None)
- vectorizer: Vectorizers | _EnumLikeStr
- poolingStrategy: Literal['masked_mean', 'cls']
- vectorizeClassName: bool
- inferenceUrl: str | None
- passageInferenceUrl: str | None
- queryInferenceUrl: str | None
- dimensions: int | None
- _abc_impl = <_abc._abc_data object>
- model_config = {'strict': True}
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- class weaviate.collections.classes.config_vectorizers._Text2VecGPT4AllConfig(*, vectorizer=Vectorizers.TEXT2VEC_GPT4ALL, vectorizeClassName)[source]
Bases:
_VectorizerConfigCreateCreate a new model by parsing and validating input data from keyword arguments.
Raises [ValidationError][pydantic_core.ValidationError] if the input data cannot be validated to form a valid model.
self is explicitly positional-only to allow self as a field name.
- Parameters:
vectorizer (Vectorizers | _EnumLikeStr)
vectorizeClassName (bool)
- vectorizer: Vectorizers | _EnumLikeStr
- vectorizeClassName: bool
- _abc_impl = <_abc._abc_data object>
- model_config = {'strict': True}
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- class weaviate.collections.classes.config_vectorizers._Text2VecJinaConfig(*, vectorizer=Vectorizers.TEXT2VEC_JINAAI, baseURL, dimensions, model, vectorizeClassName)[source]
Bases:
_VectorizerConfigCreateCreate a new model by parsing and validating input data from keyword arguments.
Raises [ValidationError][pydantic_core.ValidationError] if the input data cannot be validated to form a valid model.
self is explicitly positional-only to allow self as a field name.
- Parameters:
vectorizer (Vectorizers | _EnumLikeStr)
baseURL (str | None)
dimensions (int | None)
model (str | None)
vectorizeClassName (bool)
- vectorizer: Vectorizers | _EnumLikeStr
- baseURL: str | None
- dimensions: int | None
- model: str | None
- vectorizeClassName: bool
- _abc_impl = <_abc._abc_data object>
- model_config = {'strict': True}
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- class weaviate.collections.classes.config_vectorizers._Text2VecVoyageConfig(*, vectorizer=Vectorizers.TEXT2VEC_VOYAGEAI, dimensions, model, baseURL, truncate, vectorizeClassName)[source]
Bases:
_VectorizerConfigCreateCreate a new model by parsing and validating input data from keyword arguments.
Raises [ValidationError][pydantic_core.ValidationError] if the input data cannot be validated to form a valid model.
self is explicitly positional-only to allow self as a field name.
- Parameters:
vectorizer (Vectorizers | _EnumLikeStr)
dimensions (int | None)
model (str | None)
baseURL (str | None)
truncate (bool | None)
vectorizeClassName (bool)
- vectorizer: Vectorizers | _EnumLikeStr
- dimensions: int | None
- model: str | None
- baseURL: str | None
- truncate: bool | None
- vectorizeClassName: bool
- _abc_impl = <_abc._abc_data object>
- model_config = {'strict': True}
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- class weaviate.collections.classes.config_vectorizers._Text2VecNvidiaConfig(*, vectorizer=Vectorizers.TEXT2VEC_NVIDIA, model, baseURL, truncate, vectorizeClassName)[source]
Bases:
_VectorizerConfigCreateCreate a new model by parsing and validating input data from keyword arguments.
Raises [ValidationError][pydantic_core.ValidationError] if the input data cannot be validated to form a valid model.
self is explicitly positional-only to allow self as a field name.
- Parameters:
vectorizer (Vectorizers | _EnumLikeStr)
model (str | None)
baseURL (str | None)
truncate (bool | None)
vectorizeClassName (bool)
- vectorizer: Vectorizers | _EnumLikeStr
- model: str | None
- baseURL: str | None
- truncate: bool | None
- vectorizeClassName: bool
- _abc_impl = <_abc._abc_data object>
- model_config = {'strict': True}
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- class weaviate.collections.classes.config_vectorizers._Text2VecWeaviateConfig(*, vectorizer=Vectorizers.TEXT2VEC_WEAVIATE, model, baseURL, vectorizeClassName, dimensions)[source]
Bases:
_VectorizerConfigCreateCreate a new model by parsing and validating input data from keyword arguments.
Raises [ValidationError][pydantic_core.ValidationError] if the input data cannot be validated to form a valid model.
self is explicitly positional-only to allow self as a field name.
- Parameters:
vectorizer (Vectorizers | _EnumLikeStr)
model (str | None)
baseURL (str | None)
vectorizeClassName (bool)
dimensions (int | None)
- vectorizer: Vectorizers | _EnumLikeStr
- model: str | None
- baseURL: str | None
- vectorizeClassName: bool
- dimensions: int | None
- _abc_impl = <_abc._abc_data object>
- model_config = {'strict': True}
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- class weaviate.collections.classes.config_vectorizers._Text2VecOllamaConfig(*, vectorizer=Vectorizers.TEXT2VEC_OLLAMA, model, apiEndpoint, vectorizeClassName)[source]
Bases:
_VectorizerConfigCreateCreate a new model by parsing and validating input data from keyword arguments.
Raises [ValidationError][pydantic_core.ValidationError] if the input data cannot be validated to form a valid model.
self is explicitly positional-only to allow self as a field name.
- Parameters:
vectorizer (Vectorizers | _EnumLikeStr)
model (str | None)
apiEndpoint (str | None)
vectorizeClassName (bool)
- vectorizer: Vectorizers | _EnumLikeStr
- model: str | None
- apiEndpoint: str | None
- vectorizeClassName: bool
- _abc_impl = <_abc._abc_data object>
- model_config = {'strict': True}
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- class weaviate.collections.classes.config_vectorizers._Img2VecNeuralConfig(*, vectorizer=Vectorizers.IMG2VEC_NEURAL, imageFields)[source]
Bases:
_VectorizerConfigCreateCreate a new model by parsing and validating input data from keyword arguments.
Raises [ValidationError][pydantic_core.ValidationError] if the input data cannot be validated to form a valid model.
self is explicitly positional-only to allow self as a field name.
- Parameters:
vectorizer (Vectorizers | _EnumLikeStr)
imageFields (List[str])
- vectorizer: Vectorizers | _EnumLikeStr
- imageFields: List[str]
- _abc_impl = <_abc._abc_data object>
- model_config = {'strict': True}
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- class weaviate.collections.classes.config_vectorizers.Multi2VecField(*, name, weight=None)[source]
Bases:
BaseModelUse this class when defining the fields to use in the Multi2VecClip and Multi2VecBind vectorizers.
Create a new model by parsing and validating input data from keyword arguments.
Raises [ValidationError][pydantic_core.ValidationError] if the input data cannot be validated to form a valid model.
self is explicitly positional-only to allow self as a field name.
- Parameters:
name (str)
weight (float | None)
- name: str
- weight: float | None
- _abc_impl = <_abc._abc_data object>
- model_config = {}
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- class weaviate.collections.classes.config_vectorizers._Multi2VecBase(*, vectorizer, imageFields, textFields)[source]
Bases:
_VectorizerConfigCreateCreate a new model by parsing and validating input data from keyword arguments.
Raises [ValidationError][pydantic_core.ValidationError] if the input data cannot be validated to form a valid model.
self is explicitly positional-only to allow self as a field name.
- Parameters:
vectorizer (Vectorizers | _EnumLikeStr)
imageFields (List[Multi2VecField] | None)
textFields (List[Multi2VecField] | None)
- imageFields: List[Multi2VecField] | None
- textFields: List[Multi2VecField] | None
- _abc_impl = <_abc._abc_data object>
- model_config = {'strict': True}
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- class weaviate.collections.classes.config_vectorizers._Multi2VecCohereConfig(*, vectorizer=Vectorizers.MULTI2VEC_COHERE, imageFields, textFields, baseURL, model, dimensions, truncate)[source]
Bases:
_Multi2VecBaseCreate a new model by parsing and validating input data from keyword arguments.
Raises [ValidationError][pydantic_core.ValidationError] if the input data cannot be validated to form a valid model.
self is explicitly positional-only to allow self as a field name.
- Parameters:
vectorizer (Vectorizers | _EnumLikeStr)
imageFields (List[Multi2VecField] | None)
textFields (List[Multi2VecField] | None)
baseURL (AnyHttpUrl | None)
model (str | None)
dimensions (int | None)
truncate (Literal['NONE', 'START', 'END', 'LEFT', 'RIGHT'] | None)
- vectorizer: Vectorizers | _EnumLikeStr
- baseURL: AnyHttpUrl | None
- model: str | None
- dimensions: int | None
- truncate: Literal['NONE', 'START', 'END', 'LEFT', 'RIGHT'] | None
- _abc_impl = <_abc._abc_data object>
- model_config = {'strict': True}
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- class weaviate.collections.classes.config_vectorizers._Multi2VecJinaConfig(*, vectorizer=Vectorizers.MULTI2VEC_JINAAI, imageFields, textFields, baseURL, model, dimensions)[source]
Bases:
_Multi2VecBaseCreate a new model by parsing and validating input data from keyword arguments.
Raises [ValidationError][pydantic_core.ValidationError] if the input data cannot be validated to form a valid model.
self is explicitly positional-only to allow self as a field name.
- Parameters:
vectorizer (Vectorizers | _EnumLikeStr)
imageFields (List[Multi2VecField] | None)
textFields (List[Multi2VecField] | None)
baseURL (AnyHttpUrl | None)
model (str | None)
dimensions (int | None)
- vectorizer: Vectorizers | _EnumLikeStr
- baseURL: AnyHttpUrl | None
- model: str | None
- dimensions: int | None
- _abc_impl = <_abc._abc_data object>
- model_config = {'strict': True}
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- class weaviate.collections.classes.config_vectorizers._Multi2VecAWSConfig(*, vectorizer=Vectorizers.MULTI2VEC_AWS, imageFields, textFields, region, model, dimensions)[source]
Bases:
_Multi2VecBaseCreate a new model by parsing and validating input data from keyword arguments.
Raises [ValidationError][pydantic_core.ValidationError] if the input data cannot be validated to form a valid model.
self is explicitly positional-only to allow self as a field name.
- Parameters:
vectorizer (Vectorizers | _EnumLikeStr)
imageFields (List[Multi2VecField] | None)
textFields (List[Multi2VecField] | None)
region (str | None)
model (str | None)
dimensions (int | None)
- vectorizer: Vectorizers | _EnumLikeStr
- region: str | None
- model: str | None
- dimensions: int | None
- _abc_impl = <_abc._abc_data object>
- model_config = {'strict': True}
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- class weaviate.collections.classes.config_vectorizers._Multi2MultiVecJinaConfig(*, vectorizer=Vectorizers.MULTI2MULTI_JINAAI, imageFields, textFields, baseURL, model)[source]
Bases:
_Multi2VecBaseCreate a new model by parsing and validating input data from keyword arguments.
Raises [ValidationError][pydantic_core.ValidationError] if the input data cannot be validated to form a valid model.
self is explicitly positional-only to allow self as a field name.
- Parameters:
vectorizer (Vectorizers | _EnumLikeStr)
imageFields (List[Multi2VecField] | None)
textFields (List[Multi2VecField] | None)
baseURL (AnyHttpUrl | None)
model (str | None)
- vectorizer: Vectorizers | _EnumLikeStr
- baseURL: AnyHttpUrl | None
- model: str | None
- _abc_impl = <_abc._abc_data object>
- model_config = {'strict': True}
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- class weaviate.collections.classes.config_vectorizers._Multi2MultiVecWeaviateConfig(*, vectorizer=Vectorizers.MULTI2MULTI_WEAVIATE, imageFields, textFields, baseURL, model)[source]
Bases:
_Multi2VecBaseCreate a new model by parsing and validating input data from keyword arguments.
Raises [ValidationError][pydantic_core.ValidationError] if the input data cannot be validated to form a valid model.
self is explicitly positional-only to allow self as a field name.
- Parameters:
vectorizer (Vectorizers | _EnumLikeStr)
imageFields (List[Multi2VecField] | None)
textFields (List[Multi2VecField] | None)
baseURL (AnyHttpUrl | None)
model (str | None)
- vectorizer: Vectorizers | _EnumLikeStr
- baseURL: AnyHttpUrl | None
- model: str | None
- _abc_impl = <_abc._abc_data object>
- model_config = {'strict': True}
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- class weaviate.collections.classes.config_vectorizers._Multi2VecClipConfig(*, vectorizer=Vectorizers.MULTI2VEC_CLIP, imageFields, textFields, inferenceUrl)[source]
Bases:
_Multi2VecBaseCreate a new model by parsing and validating input data from keyword arguments.
Raises [ValidationError][pydantic_core.ValidationError] if the input data cannot be validated to form a valid model.
self is explicitly positional-only to allow self as a field name.
- Parameters:
vectorizer (Vectorizers | _EnumLikeStr)
imageFields (List[Multi2VecField] | None)
textFields (List[Multi2VecField] | None)
inferenceUrl (str | None)
- vectorizer: Vectorizers | _EnumLikeStr
- inferenceUrl: str | None
- _abc_impl = <_abc._abc_data object>
- model_config = {'strict': True}
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- class weaviate.collections.classes.config_vectorizers._Multi2VecGoogleConfig(*, vectorizer=Vectorizers.MULTI2VEC_PALM, imageFields, textFields, audioFields, videoFields, projectId, location, apiEndpoint=None, modelId, dimensions, videoIntervalSeconds)[source]
Bases:
_Multi2VecBase,_VectorizerConfigCreateCreate a new model by parsing and validating input data from keyword arguments.
Raises [ValidationError][pydantic_core.ValidationError] if the input data cannot be validated to form a valid model.
self is explicitly positional-only to allow self as a field name.
- Parameters:
vectorizer (Vectorizers | _EnumLikeStr)
imageFields (List[Multi2VecField] | None)
textFields (List[Multi2VecField] | None)
audioFields (List[Multi2VecField] | None)
videoFields (List[Multi2VecField] | None)
projectId (str | None)
location (str | None)
apiEndpoint (str | None)
modelId (str | None)
dimensions (int | None)
videoIntervalSeconds (int | None)
- vectorizer: Vectorizers | _EnumLikeStr
- audioFields: List[Multi2VecField] | None
- videoFields: List[Multi2VecField] | None
- projectId: str | None
- location: str | None
- apiEndpoint: str | None
- modelId: str | None
- dimensions: int | None
- videoIntervalSeconds: int | None
- _abc_impl = <_abc._abc_data object>
- model_config = {'strict': True}
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- class weaviate.collections.classes.config_vectorizers._Multi2VecBindConfig(*, vectorizer=Vectorizers.MULTI2VEC_BIND, imageFields, textFields, audioFields, depthFields, IMUFields, thermalFields, videoFields)[source]
Bases:
_Multi2VecBaseCreate a new model by parsing and validating input data from keyword arguments.
Raises [ValidationError][pydantic_core.ValidationError] if the input data cannot be validated to form a valid model.
self is explicitly positional-only to allow self as a field name.
- Parameters:
vectorizer (Vectorizers | _EnumLikeStr)
imageFields (List[Multi2VecField] | None)
textFields (List[Multi2VecField] | None)
audioFields (List[Multi2VecField] | None)
depthFields (List[Multi2VecField] | None)
IMUFields (List[Multi2VecField] | None)
thermalFields (List[Multi2VecField] | None)
videoFields (List[Multi2VecField] | None)
- vectorizer: Vectorizers | _EnumLikeStr
- audioFields: List[Multi2VecField] | None
- depthFields: List[Multi2VecField] | None
- IMUFields: List[Multi2VecField] | None
- thermalFields: List[Multi2VecField] | None
- videoFields: List[Multi2VecField] | None
- _abc_impl = <_abc._abc_data object>
- model_config = {'strict': True}
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- class weaviate.collections.classes.config_vectorizers._Multi2VecVoyageaiConfig(*, vectorizer=Vectorizers.MULTI2VEC_VOYAGEAI, imageFields, textFields, baseURL, model, truncation, dimensions, videoFields)[source]
Bases:
_Multi2VecBaseCreate a new model by parsing and validating input data from keyword arguments.
Raises [ValidationError][pydantic_core.ValidationError] if the input data cannot be validated to form a valid model.
self is explicitly positional-only to allow self as a field name.
- Parameters:
vectorizer (Vectorizers | _EnumLikeStr)
imageFields (List[Multi2VecField] | None)
textFields (List[Multi2VecField] | None)
baseURL (AnyHttpUrl | None)
model (str | None)
truncation (bool | None)
dimensions (int | None)
videoFields (List[Multi2VecField] | None)
- vectorizer: Vectorizers | _EnumLikeStr
- baseURL: AnyHttpUrl | None
- model: str | None
- truncation: bool | None
- dimensions: int | None
- videoFields: List[Multi2VecField] | None
- _abc_impl = <_abc._abc_data object>
- model_config = {'strict': True}
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- class weaviate.collections.classes.config_vectorizers._Multi2VecNvidiaConfig(*, vectorizer=Vectorizers.MULTI2VEC_NVIDIA, imageFields, textFields, baseURL, model, truncation)[source]
Bases:
_Multi2VecBaseCreate a new model by parsing and validating input data from keyword arguments.
Raises [ValidationError][pydantic_core.ValidationError] if the input data cannot be validated to form a valid model.
self is explicitly positional-only to allow self as a field name.
- Parameters:
vectorizer (Vectorizers | _EnumLikeStr)
imageFields (List[Multi2VecField] | None)
textFields (List[Multi2VecField] | None)
baseURL (AnyHttpUrl | None)
model (str | None)
truncation (bool | None)
- vectorizer: Vectorizers | _EnumLikeStr
- baseURL: AnyHttpUrl | None
- model: str | None
- truncation: bool | None
- _abc_impl = <_abc._abc_data object>
- model_config = {'strict': True}
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- class weaviate.collections.classes.config_vectorizers._Ref2VecCentroidConfig(*, vectorizer=Vectorizers.REF2VEC_CENTROID, referenceProperties, method)[source]
Bases:
_VectorizerConfigCreateCreate a new model by parsing and validating input data from keyword arguments.
Raises [ValidationError][pydantic_core.ValidationError] if the input data cannot be validated to form a valid model.
self is explicitly positional-only to allow self as a field name.
- Parameters:
vectorizer (Vectorizers | _EnumLikeStr)
referenceProperties (List[str])
method (Literal['mean'])
- vectorizer: Vectorizers | _EnumLikeStr
- referenceProperties: List[str]
- method: Literal['mean']
- _abc_impl = <_abc._abc_data object>
- model_config = {'strict': True}
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- weaviate.collections.classes.config_vectorizers._map_multi2vec_fields(fields)[source]
- Parameters:
fields (List[str] | List[Multi2VecField] | None)
- Return type:
List[Multi2VecField] | None
- class weaviate.collections.classes.config_vectorizers._Vectorizer[source]
Bases:
objectUse this factory class to create the correct object for the vectorizer_config argument in the collections.create() method.
Each staticmethod provides options specific to the named vectorizer in the function’s name. Under-the-hood data validation steps will ensure that any mis-specifications will be caught before the request is sent to Weaviate.
- static none()[source]
Create a _VectorizerConfigCreate object with the vectorizer set to Vectorizer.NONE.
- Return type:
- static img2vec_neural(image_fields)[source]
Create a _Img2VecNeuralConfigCreate object for use when vectorizing using the img2vec-neural model.
See the documentation for detailed usage.
- Parameters:
image_fields (List[str]) – The image fields to use. This is a required field and must match the property fields of the collection that are defined as DataType.BLOB.
- Raises:
pydantic.ValidationError – If image_fields is not a list.
- Return type:
- static multi2vec_clip(image_fields=None, text_fields=None, interference_url=None, inference_url=None, vectorize_collection_name=True)[source]
Create a _Multi2VecClipConfigCreate object for use when vectorizing using the multi2vec-clip model.
See the documentation for detailed usage.
- Parameters:
image_fields (List[str] | List[Multi2VecField] | None) – The image fields to use in vectorization.
text_fields (List[str] | List[Multi2VecField] | None) – The text fields to use in vectorization.
inference_url (str | None) – The inference url to use where API requests should go. Defaults to None, which uses the server-defined default.
vectorize_collection_name (bool) – Whether to vectorize the collection name. Defaults to True.
interference_url (str | None)
- Raises:
pydantic.ValidationError – If image_fields or text_fields are not None or a list.
- Return type:
- static multi2vec_bind(audio_fields=None, depth_fields=None, image_fields=None, imu_fields=None, text_fields=None, thermal_fields=None, video_fields=None, vectorize_collection_name=True)[source]
Create a _Multi2VecBindConfigCreate object for use when vectorizing using the multi2vec-clip model.
See the documentation for detailed usage.
- Parameters:
audio_fields (List[str] | List[Multi2VecField] | None) – The audio fields to use in vectorization.
depth_fields (List[str] | List[Multi2VecField] | None) – The depth fields to use in vectorization.
image_fields (List[str] | List[Multi2VecField] | None) – The image fields to use in vectorization.
imu_fields (List[str] | List[Multi2VecField] | None) – The IMU fields to use in vectorization.
text_fields (List[str] | List[Multi2VecField] | None) – The text fields to use in vectorization.
thermal_fields (List[str] | List[Multi2VecField] | None) – The thermal fields to use in vectorization.
video_fields (List[str] | List[Multi2VecField] | None) – The video fields to use in vectorization.
vectorize_collection_name (bool) – Whether to vectorize the collection name. Defaults to True.
- Raises:
pydantic.ValidationError – If any of the *_fields are not None or a list.
- Return type:
- static ref2vec_centroid(reference_properties, method='mean')[source]
Create a _Ref2VecCentroidConfigCreate object for use when vectorizing using the ref2vec-centroid model.
See the documentation for detailed usage.
- Parameters:
reference_properties (List[str]) – The reference properties to use in vectorization, REQUIRED.
method (Literal['mean']) – The method to use in vectorization. Defaults to mean.
- Raises:
pydantic.ValidationError – If reference_properties is not a list.
- Return type:
- static text2vec_aws(model=None, region='', endpoint=None, service='bedrock', vectorize_collection_name=True)[source]
Create a _Text2VecAWSConfigCreate object for use when vectorizing using the text2vec-aws model.
See the documentation for detailed usage.
- Parameters:
model (Literal['amazon.titan-embed-text-v1', 'cohere.embed-english-v3', 'cohere.embed-multilingual-v3'] | str | None) – The model to use, REQUIRED for service “bedrock”.
region (str) – The AWS region to run the model from, REQUIRED.
endpoint (str | None) – The model to use, REQUIRED for service “sagemaker”.
service (Literal['bedrock', 'sagemaker'] | str) – The AWS service to use, options are “bedrock” and “sagemaker”.
vectorize_collection_name (bool) – Whether to vectorize the collection name. Defaults to True.
- Return type:
- static text2vec_azure_openai(resource_name, deployment_id, vectorize_collection_name=True, base_url=None, dimensions=None, model=None)[source]
Create a _Text2VecAzureOpenAIConfigCreate object for use when vectorizing using the text2vec-azure-openai model.
See the documentation for detailed usage.
- Parameters:
resource_name (str) – The resource name to use, REQUIRED.
deployment_id (str) – The deployment ID to use, REQUIRED.
vectorize_collection_name (bool) – Whether to vectorize the collection name. Defaults to True.
base_url (AnyHttpUrl | None) – The base URL to use where API requests should go. Defaults to None, which uses the server-defined default.
dimensions (int | None) – The dimensionality of the vectors. Defaults to None, which uses the server-defined default.
model (str | None)
- Raises:
pydantic.ValidationError – If resource_name or deployment_id are not str.
- Return type:
- static text2vec_contextionary(vectorize_collection_name=True)[source]
Create a _Text2VecContextionaryConfigCreate object for use when vectorizing using the text2vec-contextionary model.
See the documentation for detailed usage.
- Parameters:
vectorize_collection_name (bool) – Whether to vectorize the collection name. Defaults to True.
- Raises:
pydantic.ValidationError – If vectorize_collection_name is not a bool.
- Return type:
- static custom(module_name, module_config=None)[source]
Create a _VectorizerCustomConfig object for use when vectorizing using a custom specification.
- Parameters:
module_name (str) – The name of the module to use, REQUIRED.
module_config (Dict[str, Any] | None) – The configuration to use for the module. Defaults to None, which uses the server-defined default.
- Return type:
- static text2vec_cohere(model=None, truncate=None, vectorize_collection_name=True, base_url=None)[source]
Create a _Text2VecCohereConfigCreate object for use when vectorizing using the text2vec-cohere model.
See the documentation for detailed usage.
- Parameters:
model (Literal['embed-v4.0', 'embed-multilingual-v2.0', 'embed-multilingual-v3.0', 'embed-multilingual-light-v3.0', 'small', 'medium', 'large', 'multilingual-22-12', 'embed-english-v2.0', 'embed-english-light-v2.0', 'embed-english-v3.0', 'embed-english-light-v3.0'] | str | None) – The model to use. Defaults to None, which uses the server-defined default.
truncate (Literal['NONE', 'START', 'END', 'LEFT', 'RIGHT'] | None) – The truncation strategy to use. Defaults to None, which uses the server-defined default.
vectorize_collection_name (bool) – Whether to vectorize the collection name. Defaults to True.
base_url (AnyHttpUrl | None) – The base URL to use where API requests should go. Defaults to None, which uses the server-defined default.
- Raises:
pydantic.ValidationError – If model is not a valid value from the CohereModel type or if truncate is not a valid value from the CohereTruncation type.
- Return type:
- static multi2vec_cohere(*, model=None, truncate=None, vectorize_collection_name=True, base_url=None, image_fields=None, text_fields=None)[source]
Create a _Multi2VecCohereConfig object for use when vectorizing using the multi2vec-cohere model.
See the documentation for detailed usage.
- Parameters:
model (Literal['embed-v4.0', 'embed-multilingual-v3.0', 'embed-multilingual-light-v3.0', 'embed-english-v3.0', 'embed-english-light-v3.0'] | str | None) – The model to use. Defaults to None, which uses the server-defined default.
truncate (Literal['NONE', 'START', 'END', 'LEFT', 'RIGHT'] | None) – The truncation strategy to use. Defaults to None, which uses the server-defined default.
vectorize_collection_name (bool) – Whether to vectorize the collection name. Defaults to True.
base_url (AnyHttpUrl | None) – The base URL to use where API requests should go. Defaults to None, which uses the server-defined default.
image_fields (List[str] | List[Multi2VecField] | None) – The image fields to use in vectorization.
text_fields (List[str] | List[Multi2VecField] | None) – The text fields to use in vectorization.
- Raises:
pydantic.ValidationError – If model is not a valid value from the CohereMultimodalModel type or if truncate is not a valid value from the CohereTruncation type.
- Return type:
- static multi2vec_voyageai(*, model=None, truncation=None, output_encoding, vectorize_collection_name=True, base_url=None, image_fields=None, text_fields=None)[source]
Create a _Multi2VecVoyageaiConfig object for use when vectorizing using the multi2vec-voyageai model.
See the documentation for detailed usage.
- Parameters:
model (Literal['voyage-multimodal-3', 'voyage-multimodal-3.5'] | str | None) – The model to use. Defaults to None, which uses the server-defined default.
truncation (bool | None) – The truncation strategy to use. Defaults to None, which uses the server-defined default.
output_encoding (str | None) – Deprecated, has no effect.
vectorize_collection_name (bool) – Deprecated, has no effect.
base_url (AnyHttpUrl | None) – The base URL to use where API requests should go. Defaults to None, which uses the server-defined default.
image_fields (List[str] | List[Multi2VecField] | None) – The image fields to use in vectorization.
text_fields (List[str] | List[Multi2VecField] | None) – The text fields to use in vectorization.
- Raises:
pydantic.ValidationError – If model is not a valid value from the VoyageMultimodalModel type.
- Return type:
- static multi2vec_nvidia(*, model=None, truncation=None, output_encoding=None, vectorize_collection_name=True, base_url=None, image_fields=None, text_fields=None)[source]
Create a _Multi2VecNvidiaConfig object for use when vectorizing using the multi2vec-nvidia model.
See the documentation for detailed usage.
- Parameters:
model (str | None) – The model to use. Defaults to None, which uses the server-defined default.
truncate – The truncation strategy to use. Defaults to None, which uses the server-defined default.
output_encoding (str | None) – Deprecated, has no effect.
vectorize_collection_name (bool) – Deprecated, has no effect.
base_url (AnyHttpUrl | None) – The base URL to use where API requests should go. Defaults to None, which uses the server-defined default.
image_fields (List[str] | List[Multi2VecField] | None) – The image fields to use in vectorization.
text_fields (List[str] | List[Multi2VecField] | None) – The text fields to use in vectorization.
truncation (bool | None)
- Raises:
pydantic.ValidationError – If model is not a valid value from the NvidiaMultimodalModel type or if truncate is not a valid value from the NvidiaTruncation type.
- Return type:
- static text2vec_databricks(*, endpoint, instruction=None, vectorize_collection_name=True)[source]
Create a _Text2VecDatabricksConfig object for use when vectorizing using the text2vec-databricks model.
See the documentation for detailed usage.
- Parameters:
endpoint (str) – The endpoint to use.
instruction (str | None) – The instruction strategy to use. Defaults to None, which uses the server-defined default.
vectorize_collection_name (bool) – Whether to vectorize the collection name. Defaults to True.
- Raises:
pydantic.ValidationError – If truncate is not a valid value from the CohereModel type.
- Return type:
- static text2vec_gpt4all(vectorize_collection_name=True)[source]
Create a _Text2VecGPT4AllConfigCreate object for use when vectorizing using the text2vec-gpt4all model.
See the documentation for detailed usage.
- Parameters:
vectorize_collection_name (bool) – Whether to vectorize the collection name. Defaults to True.
- Raises:
pydantic.ValidationError – If vectorize_collection_name is not a bool.
- Return type:
- static text2vec_huggingface(model=None, passage_model=None, query_model=None, endpoint_url=None, wait_for_model=None, use_gpu=None, use_cache=None, vectorize_collection_name=True)[source]
Create a _Text2VecHuggingFaceConfigCreate object for use when vectorizing using the text2vec-huggingface model.
See the documentation for detailed usage.
- Parameters:
model (str | None) – The model to use. Defaults to None, which uses the server-defined default.
passage_model (str | None) – The passage model to use. Defaults to None, which uses the server-defined default.
query_model (str | None) – The query model to use. Defaults to None, which uses the server-defined default.
endpoint_url (AnyHttpUrl | None) – The endpoint URL to use. Defaults to None, which uses the server-defined default.
wait_for_model (bool | None) – Whether to wait for the model to be loaded. Defaults to None, which uses the server-defined default.
use_gpu (bool | None) – Whether to use the GPU. Defaults to None, which uses the server-defined default.
use_cache (bool | None) – Whether to use the cache. Defaults to None, which uses the server-defined default.
vectorize_collection_name (bool) – Whether to vectorize the collection name. Defaults to True.
- Raises:
pydantic.ValidationError –
If the arguments passed to the function are invalid. It is important to note that some of these variables are mutually exclusive. See the documentation for more details.
- Return type:
- static text2vec_mistral(*, base_url=None, model=None, vectorize_collection_name=True)[source]
Create a _Text2VecMistralConfig object for use when vectorizing using the text2vec-mistral model.
See the documentation for detailed usage.
- Parameters:
base_url (AnyHttpUrl | None) – The base URL to use where API requests should go. Defaults to None, which uses the server-defined default.
model (str | None) – The model to use. Defaults to None, which uses the server-defined default.
vectorize_collection_name (bool) – Whether to vectorize the collection name. Defaults to True.
- Return type:
- static text2vec_ollama(*, api_endpoint=None, model=None, vectorize_collection_name=True)[source]
Create a _Text2VecOllamaConfig object for use when vectorizing using the text2vec-ollama model.
See the documentation for detailed usage.
- Parameters:
api_endpoint (str | None) – The base URL to use where API requests should go. Defaults to None, which uses the server-defined default. Docker users may need to specify an alias, such as http://host.docker.internal:11434 so that the container can access the host machine.
model (str | None) – The model to use. Defaults to None, which uses the server-defined default.
vectorize_collection_name (bool) – Whether to vectorize the collection name. Defaults to True.
- Return type:
- static text2vec_openai(model=None, model_version=None, type_=None, vectorize_collection_name=True, base_url=None, dimensions=None)[source]
Create a _Text2VecOpenAIConfigCreate object for use when vectorizing using the text2vec-openai model.
See the documentation for detailed usage.
- Parameters:
model (Literal['text-embedding-3-small', 'text-embedding-3-large', 'text-embedding-ada-002'] | str | None) – The model to use. Defaults to None, which uses the server-defined default.
model_version (str | None) – The model version to use. Defaults to None, which uses the server-defined default.
type – The type of model to use. Defaults to None, which uses the server-defined default.
vectorize_collection_name (bool) – Whether to vectorize the collection name. Defaults to True.
base_url (AnyHttpUrl | None) – The base URL to use where API requests should go. Defaults to None, which uses the server-defined default.
dimensions (int | None) – Number of dimensions. Applicable to v3 OpenAI models only. Defaults to None, which uses the server-defined default.
type_ (Literal['text', 'code'] | None)
- Raises:
pydantic.ValidationError – If type_ is not a valid value from the OpenAIType type.
- Return type:
- static text2vec_palm(project_id, api_endpoint=None, model_id=None, title_property=None, vectorize_collection_name=True)[source]
Deprecated since version 4.9.0.
This method is deprecated and will be removed in Q2 ‘25. Please use
text2vec_google()instead.Create a _Text2VecGoogleConfig object for use when vectorizing using the text2vec-palm model.
See the documentation for detailed usage.
- Args:
project_id: The project ID to use, REQUIRED. api_endpoint: The API endpoint to use without a leading scheme such as http://. Defaults to None, which uses the server-defined default model_id: The model ID to use. Defaults to None, which uses the server-defined default. title_property: The Weaviate property name for the gecko-002 or gecko-003 model to use as the title. vectorize_collection_name: Whether to vectorize the collection name. Defaults to True.
- Raises:
pydantic.ValidationError: If api_endpoint is not a valid URL.
- Parameters:
project_id (str)
api_endpoint (str | None)
model_id (str | None)
title_property (str | None)
vectorize_collection_name (bool)
- Return type:
- static text2vec_google_aistudio(model_id=None, title_property=None, vectorize_collection_name=True)[source]
Create a _Text2VecGoogleConfig object for use when vectorizing using the text2vec-google model.
See the documentation for detailed usage.
- Parameters:
model_id (str | None) – The model ID to use. Defaults to None, which uses the server-defined default.
title_property (str | None) – The Weaviate property name for the gecko-002 or gecko-003 model to use as the title.
vectorize_collection_name (bool) – Whether to vectorize the collection name. Defaults to True.
- Raises:
pydantic.ValidationError – If api_endpoint is not a valid URL.
- Return type:
- static text2vec_google(project_id, api_endpoint=None, model_id=None, title_property=None, vectorize_collection_name=True)[source]
Create a _Text2VecGoogleConfig object for use when vectorizing using the text2vec-google model.
See the documentation for detailed usage.
- Parameters:
project_id (str) – The project ID to use, REQUIRED.
api_endpoint (str | None) – The API endpoint to use without a leading scheme such as http://. Defaults to None, which uses the server-defined default
model_id (str | None) – The model ID to use. Defaults to None, which uses the server-defined default.
title_property (str | None) – The Weaviate property name for the gecko-002 or gecko-003 model to use as the title.
vectorize_collection_name (bool) – Whether to vectorize the collection name. Defaults to True.
dimensions – The dimensionality of the vectors. Defaults to None, which uses the server-defined default.
- Raises:
pydantic.ValidationError – If api_endpoint is not a valid URL.
- Return type:
- static multi2vec_palm(*, location, project_id, image_fields=None, text_fields=None, video_fields=None, dimensions=None, model_id=None, video_interval_seconds=None, vectorize_collection_name=True)[source]
Deprecated since version 4.9.0.
This method is deprecated and will be removed in Q2 ‘25. Please use
multi2vec_google()instead.Create a _Multi2VecPalmConfig object for use when vectorizing using the text2vec-palm model.
See the documentation for detailed usage.
- Args:
location: Where the model runs. REQUIRED. project_id: The project ID to use, REQUIRED. image_fields: The image fields to use in vectorization. text_fields: The text fields to use in vectorization. video_fields: The video fields to use in vectorization. dimensions: The number of dimensions to use. Defaults to None, which uses the server-defined default. model_id: The model ID to use. Defaults to None, which uses the server-defined default. video_interval_seconds: Length of a video interval. Defaults to None, which uses the server-defined default. vectorize_collection_name: Whether to vectorize the collection name. Defaults to True.
- Raises:
pydantic.ValidationError: If api_endpoint is not a valid URL.
- Parameters:
location (str)
project_id (str)
image_fields (List[str] | List[Multi2VecField] | None)
text_fields (List[str] | List[Multi2VecField] | None)
video_fields (List[str] | List[Multi2VecField] | None)
dimensions (int | None)
model_id (str | None)
video_interval_seconds (int | None)
vectorize_collection_name (bool)
- Return type:
- static multi2vec_google(*, location, project_id, image_fields=None, text_fields=None, video_fields=None, model_id=None, video_interval_seconds=None, vectorize_collection_name=True)[source]
Create a _Multi2VecGoogleConfig object for use when vectorizing using the text2vec-google model.
See the documentation for detailed usage.
- Parameters:
location (str) – Where the model runs. REQUIRED.
project_id (str) – The project ID to use, REQUIRED.
image_fields (List[str] | List[Multi2VecField] | None) – The image fields to use in vectorization.
text_fields (List[str] | List[Multi2VecField] | None) – The text fields to use in vectorization.
video_fields (List[str] | List[Multi2VecField] | None) – The video fields to use in vectorization.
model_id (str | None) – The model ID to use. Defaults to None, which uses the server-defined default.
video_interval_seconds (int | None) – Length of a video interval. Defaults to None, which uses the server-defined default.
vectorize_collection_name (bool) – Whether to vectorize the collection name. Defaults to True.
- Raises:
pydantic.ValidationError – If api_endpoint is not a valid URL.
- Return type:
- static text2vec_transformers(pooling_strategy='masked_mean', dimensions=None, vectorize_collection_name=True, inference_url=None, passage_inference_url=None, query_inference_url=None)[source]
Create a _Text2VecTransformersConfigCreate object for use when vectorizing using the text2vec-transformers model.
See the documentation for detailed usage.
- Parameters:
pooling_strategy (Literal['masked_mean', 'cls']) – The pooling strategy to use. Defaults to masked_mean.
dimensions (int | None) – The number of dimensions for the generated embeddings. Defaults to None, which uses the server-defined default.
vectorize_collection_name (bool) – Whether to vectorize the collection name. Defaults to True.
inference_url (str | None) – The inference url to use where API requests should go. You can use either this OR passage/query_inference_url. Defaults to None, which uses the server-defined default.
passage_inference_url (str | None) – The inference url to use where passage API requests should go. You can use either this and query_inference_url OR inference_url. Defaults to None, which uses the server-defined default.
query_inference_url (str | None) – The inference url to use where query API requests should go. You can use either this and passage_inference_url OR inference_url. Defaults to None, which uses the server-defined default.
- Raises:
pydantic.ValidationError – If pooling_strategy is not a valid value from the PoolingStrategy type.
- Return type:
- static text2vec_jinaai(model=None, vectorize_collection_name=True, base_url=None, dimensions=None)[source]
Create a _Text2VecJinaConfigCreate object for use when vectorizing using the text2vec-jinaai model.
See the documentation for detailed usage.
- Parameters:
model (Literal['jina-embeddings-v2-base-en', 'jina-embeddings-v2-small-en', 'jina-embeddings-v2-base-zh', 'jina-embeddings-v2-base-es', 'jina-embeddings-v2-base-code', 'jina-embeddings-v3', 'jina-embeddings-v4'] | str | None) –
The model to use. Defaults to None, which uses the server-defined default. See the documentation for more details.
vectorize_collection_name (bool) – Whether to vectorize the collection name. Defaults to True.
base_url (str | None) – The base URL to send the vectorization requests to. Defaults to None, which uses the server-defined default.
dimensions (int | None) – The number of dimensions for the generated embeddings. Defaults to None, which uses the server-defined default.
- Return type:
- static multi2vec_jinaai(*, model=None, vectorize_collection_name=True, base_url=None, dimensions=None, image_fields=None, text_fields=None)[source]
Create a _Multi2VecJinaConfig object for use when vectorizing using the multi2vec-jinaai model.
See the documentation for detailed usage.
- Parameters:
model (Literal['jina-clip-v1', 'jina-clip-v2', 'jina-embeddings-v4'] | str | None) – The model to use. Defaults to None, which uses the server-defined default.
vectorize_collection_name (bool) – Whether to vectorize the collection name. Defaults to True.
base_url (AnyHttpUrl | None) – The base URL to use where API requests should go. Defaults to None, which uses the server-defined default.
dimensions (int | None) – The number of dimensions for the generated embeddings (only available for some models). Defaults to None, which uses the server-defined default.
image_fields (List[str] | List[Multi2VecField] | None) – The image fields to use in vectorization.
text_fields (List[str] | List[Multi2VecField] | None) – The text fields to use in vectorization.
- Raises:
pydantic.ValidationError – If model is not a valid value from the JinaMultimodalModel type.
- Return type:
- static text2vec_voyageai(*, model=None, base_url=None, truncate=None, vectorize_collection_name=True)[source]
Create a _Text2VecVoyageConfigCreate object for use when vectorizing using the text2vec-voyageai model.
See the documentation for detailed usage.
- Parameters:
model (Literal['voyage-4', 'voyage-4-lite', 'voyage-4-large', 'voyage-3.5', 'voyage-3.5-lite', 'voyage-3-large', 'voyage-3', 'voyage-3-lite', 'voyage-context-3', 'voyage-large-2', 'voyage-code-2', 'voyage-2', 'voyage-law-2', 'voyage-large-2-instruct', 'voyage-finance-2', 'voyage-multilingual-2'] | str | None) –
The model to use. Defaults to None, which uses the server-defined default. See the documentation for more details.
base_url (str | None) – The base URL to use where API requests should go. Defaults to None, which uses the server-defined default.
truncate (bool | None) – Whether to truncate the input texts to fit within the context length. Defaults to None, which uses the server-defined default.
vectorize_collection_name (bool) – Whether to vectorize the collection name. Defaults to True.
- Return type:
- static text2vec_weaviate(*, model=None, base_url=None, vectorize_collection_name=True, dimensions=None)[source]
TODO: add docstrings when the documentation is available.
- Parameters:
model (Literal['Snowflake/snowflake-arctic-embed-l-v2.0', 'Snowflake/snowflake-arctic-embed-m-v1.5'] | str | None)
base_url (str | None)
vectorize_collection_name (bool)
dimensions (int | None)
- Return type:
- static text2vec_nvidia(*, model=None, base_url=None, truncate=None, vectorize_collection_name=True)[source]
Create a _Text2VecNvidiaConfigCreate object for use when vectorizing using the text2vec-nvidia model.
See the documentation for detailed usage.
- Parameters:
model (str | None) –
The model to use. Defaults to None, which uses the server-defined default. See the documentation for more details.
base_url (str | None) – The base URL to use where API requests should go. Defaults to None, which uses the server-defined default.
truncate (bool | None) – Whether to truncate the input texts to fit within the context length. Defaults to None, which uses the server-defined default.
vectorize_collection_name (bool) – Whether to vectorize the collection name. Defaults to True.
- Return type:
- static text2vec_model2vec(*, inference_url=None, vectorize_collection_name=True)[source]
Create a _Text2VecModel2VecConfigCreate object for use when vectorizing using the text2vec-model2vec model.
See the documentation for detailed usage.
- Parameters:
vectorize_collection_name (bool) – Whether to vectorize the collection name. Defaults to True.
inference_url (str | None) – The inference url to use where API requests should go. Defaults to None, which uses the server-defined default.
- Return type:
weaviate.collections.classes.data
- class weaviate.collections.classes.data.Error(message, code=None, original_uuid=None)[source]
Bases:
objectThis class represents an error that occurred when attempting to insert an object within a batch.
- Parameters:
message (str)
code (int | None)
original_uuid (str | UUID | None)
- message: str
- code: int | None = None
- original_uuid: str | UUID | None = None
- class weaviate.collections.classes.data.RefError(message)[source]
Bases:
objectThis class represents an error that occurred when attempting to insert a reference between objects within a batch.
- Parameters:
message (str)
- message: str
- class weaviate.collections.classes.data.DataObject(properties=None, uuid=None, vector=None, references=None)[source]
Bases:
Generic[P,R]This class represents an entire object within a collection to be used when batching.
- Parameters:
properties (P)
uuid (str | UUID | None)
vector (Mapping[str, Sequence[int | float] | Sequence[Sequence[int | float]]] | Sequence[int | float] | None)
references (R)
- properties: P = None
- uuid: str | UUID | None = None
- vector: Mapping[str, Sequence[int | float] | Sequence[Sequence[int | float]]] | Sequence[int | float] | None = None
- references: R = None
- class weaviate.collections.classes.data._DataReference(from_property: str, from_uuid: str | uuid.UUID, to_uuid: str | uuid.UUID | List[str | uuid.UUID])[source]
Bases:
object- Parameters:
from_property (str)
from_uuid (str | UUID)
to_uuid (str | UUID | List[str | UUID])
- from_property: str
- from_uuid: str | UUID
- to_uuid: str | UUID | List[str | UUID]
- class weaviate.collections.classes.data.DataReferenceMulti(from_property, from_uuid, to_uuid, target_collection)[source]
Bases:
_DataReferenceThis class represents a reference between objects within a collection to be used when batching.
- Parameters:
from_property (str)
from_uuid (str | UUID)
to_uuid (str | UUID | List[str | UUID])
target_collection (str)
- target_collection: str
- class weaviate.collections.classes.data.DataReference(from_property, from_uuid, to_uuid)[source]
Bases:
_DataReferenceThis class represents a reference between objects within a collection to be used when batching.
- Parameters:
from_property (str)
from_uuid (str | UUID)
to_uuid (str | UUID | List[str | UUID])
- MultiTarget
alias of
DataReferenceMulti
weaviate.collections.classes.filters
- class weaviate.collections.classes.filters._Operator(*values)[source]
Bases:
str,Enum- EQUAL = 'Equal'
- NOT_EQUAL = 'NotEqual'
- LESS_THAN = 'LessThan'
- LESS_THAN_EQUAL = 'LessThanEqual'
- GREATER_THAN = 'GreaterThan'
- GREATER_THAN_EQUAL = 'GreaterThanEqual'
- LIKE = 'Like'
- IS_NULL = 'IsNull'
- CONTAINS_ANY = 'ContainsAny'
- CONTAINS_ALL = 'ContainsAll'
- CONTAINS_NONE = 'ContainsNone'
- WITHIN_GEO_RANGE = 'WithinGeoRange'
- AND = 'And'
- OR = 'Or'
- NOT = 'Not'
- class weaviate.collections.classes.filters._FilterAnd(filters)[source]
Bases:
_Filters- Parameters:
filters (List[_Filters])
- class weaviate.collections.classes.filters._FilterOr(filters)[source]
Bases:
_Filters- Parameters:
filters (List[_Filters])
- class weaviate.collections.classes.filters._FilterNot(filter_)[source]
Bases:
_Filters- Parameters:
filter_ (_Filters)
- class weaviate.collections.classes.filters._GeoCoordinateFilter(*, latitude, longitude, distance)[source]
Bases:
GeoCoordinateCreate a new model by parsing and validating input data from keyword arguments.
Raises [ValidationError][pydantic_core.ValidationError] if the input data cannot be validated to form a valid model.
self is explicitly positional-only to allow self as a field name.
- Parameters:
latitude (Annotated[float, Ge(ge=-90), Le(le=90)])
longitude (Annotated[float, Ge(ge=-180), Le(le=180)])
distance (float)
- distance: float
- _abc_impl = <_abc._abc_data object>
- model_config = {'extra': 'forbid'}
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- class weaviate.collections.classes.filters._SingleTargetRef[source]
Bases:
_WeaviateInputCreate a new model by parsing and validating input data from keyword arguments.
Raises [ValidationError][pydantic_core.ValidationError] if the input data cannot be validated to form a valid model.
self is explicitly positional-only to allow self as a field name.
- link_on: str
- target: _FilterTargets | None
- _abc_impl = <_abc._abc_data object>
- model_config = {'extra': 'forbid'}
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- class weaviate.collections.classes.filters._MultiTargetRef[source]
Bases:
_WeaviateInputCreate a new model by parsing and validating input data from keyword arguments.
Raises [ValidationError][pydantic_core.ValidationError] if the input data cannot be validated to form a valid model.
self is explicitly positional-only to allow self as a field name.
- target_collection: str
- link_on: str
- target: _FilterTargets | None
- _abc_impl = <_abc._abc_data object>
- model_config = {'extra': 'forbid'}
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- class weaviate.collections.classes.filters._CountRef(*, link_on)[source]
Bases:
_WeaviateInputCreate a new model by parsing and validating input data from keyword arguments.
Raises [ValidationError][pydantic_core.ValidationError] if the input data cannot be validated to form a valid model.
self is explicitly positional-only to allow self as a field name.
- Parameters:
link_on (str)
- link_on: str
- _abc_impl = <_abc._abc_data object>
- model_config = {'extra': 'forbid'}
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- class weaviate.collections.classes.filters._FilterValue(*, value, operator, target)[source]
Bases:
_Filters,_WeaviateInputCreate a new model by parsing and validating input data from keyword arguments.
Raises [ValidationError][pydantic_core.ValidationError] if the input data cannot be validated to form a valid model.
self is explicitly positional-only to allow self as a field name.
- Parameters:
value (int | float | str | bool | datetime | UUID | _GeoCoordinateFilter | None | Sequence[str] | Sequence[bool] | Sequence[int] | Sequence[float] | Sequence[datetime] | Sequence[str | UUID])
operator (_Operator)
target (_SingleTargetRef | _MultiTargetRef | _CountRef | str)
- value: int | float | str | bool | datetime | UUID | _GeoCoordinateFilter | None | Sequence[str] | Sequence[bool] | Sequence[int] | Sequence[float] | Sequence[datetime] | Sequence[str | UUID]
- target: _SingleTargetRef | _MultiTargetRef | _CountRef | str
- _abc_impl = <_abc._abc_data object>
- model_config = {'extra': 'forbid'}
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- class weaviate.collections.classes.filters._FilterBase[source]
Bases:
object- _target: _SingleTargetRef | _MultiTargetRef | None = None
- _target_path()[source]
- Return type:
_SingleTargetRef | _MultiTargetRef | _CountRef | str
- class weaviate.collections.classes.filters._FilterByProperty(prop, length, target=None)[source]
Bases:
_FilterBase- Parameters:
prop (str)
length (bool)
target (_SingleTargetRef | _MultiTargetRef | None)
- contains_any(val)[source]
Filter on whether the property contains any of the given values.
- Parameters:
val (Sequence[str] | Sequence[bool] | Sequence[int] | Sequence[float] | Sequence[datetime] | Sequence[str | UUID])
- Return type:
- contains_all(val)[source]
Filter on whether the property contains all of the given values.
- Parameters:
val (Sequence[str] | Sequence[bool] | Sequence[int] | Sequence[float] | Sequence[datetime] | Sequence[str | UUID])
- Return type:
- contains_none(val)[source]
Filter on whether the property contains none of the given values.
- Parameters:
val (Sequence[str] | Sequence[bool] | Sequence[int] | Sequence[float] | Sequence[datetime] | Sequence[str | UUID])
- Return type:
- equal(val)[source]
Filter on whether the property is equal to the given value.
- Parameters:
val (int | float | str | bool | datetime | UUID | _GeoCoordinateFilter | None | Sequence[str] | Sequence[bool] | Sequence[int] | Sequence[float] | Sequence[datetime] | Sequence[str | UUID])
- Return type:
- not_equal(val)[source]
Filter on whether the property is not equal to the given value.
- Parameters:
val (int | float | str | bool | datetime | UUID | _GeoCoordinateFilter | None | Sequence[str] | Sequence[bool] | Sequence[int] | Sequence[float] | Sequence[datetime] | Sequence[str | UUID])
- Return type:
- less_than(val)[source]
Filter on whether the property is less than the given value.
- Parameters:
val (int | float | str | bool | datetime | UUID | _GeoCoordinateFilter | None | Sequence[str] | Sequence[bool] | Sequence[int] | Sequence[float] | Sequence[datetime] | Sequence[str | UUID])
- Return type:
- less_or_equal(val)[source]
Filter on whether the property is less than or equal to the given value.
- Parameters:
val (int | float | str | bool | datetime | UUID | _GeoCoordinateFilter | None | Sequence[str] | Sequence[bool] | Sequence[int] | Sequence[float] | Sequence[datetime] | Sequence[str | UUID])
- Return type:
- greater_than(val)[source]
Filter on whether the property is greater than the given value.
- Parameters:
val (int | float | str | bool | datetime | UUID | _GeoCoordinateFilter | None | Sequence[str] | Sequence[bool] | Sequence[int] | Sequence[float] | Sequence[datetime] | Sequence[str | UUID])
- Return type:
- greater_or_equal(val)[source]
Filter on whether the property is greater than or equal to the given value.
- Parameters:
val (int | float | str | bool | datetime | UUID | _GeoCoordinateFilter | None | Sequence[str] | Sequence[bool] | Sequence[int] | Sequence[float] | Sequence[datetime] | Sequence[str | UUID])
- Return type:
- like(val)[source]
Filter on whether the property is like the given value.
This filter can make use of * and ? as wildcards. See the docs for more details.
- Parameters:
val (str)
- Return type:
- within_geo_range(coordinate, distance)[source]
Filter on whether the property is within a given range of a geo-coordinate.
See the docs for more details.
- Parameters:
coordinate (GeoCoordinate)
distance (float)
- Return type:
- class weaviate.collections.classes.filters._FilterByTime[source]
Bases:
_FilterBase- contains_any(dates)[source]
Filter for objects with the given time.
- Parameters:
dates (List[datetime]) – List of dates to filter on.
- Return type:
- contains_none(dates)[source]
Filter for objects that contain none of the dates.
- Parameters:
dates (List[datetime]) – List of dates to filter on.
- Return type:
- equal(date)[source]
Filter on whether the creation time is equal to the given time.
- Parameters:
date (datetime) – date to filter on.
on_reference_path – If the filter is on a cross-ref property, the path to the property to be filtered on, example: on_reference_path=[“ref_property”, “target_collection”].
- Return type:
- not_equal(date)[source]
Filter on whether the creation time is not equal to the given time.
- Parameters:
date (datetime) – date to filter on.
on_reference_path – If the filter is on a cross-ref property, the path to the property to be filtered on, example: on_reference_path=[“ref_property”, “target_collection”].
- Return type:
- less_than(date)[source]
Filter on whether the creation time is less than the given time.
- Parameters:
date (datetime) – date to filter on.
on_reference_path – If the filter is on a cross-ref property, the path to the property to be filtered on, example: on_reference_path=[“ref_property”, “target_collection”].
- Return type:
- less_or_equal(date)[source]
Filter on whether the creation time is less than or equal to the given time.
- Parameters:
date (datetime) – date to filter on.
on_reference_path – If the filter is on a cross-ref property, the path to the property to be filtered on, example: on_reference_path=[“ref_property”, “target_collection”].
- Return type:
- greater_than(date)[source]
Filter on whether the creation time is greater than the given time.
- Parameters:
date (datetime) – date to filter on.
on_reference_path – If the filter is on a cross-ref property, the path to the property to be filtered on, example: on_reference_path=[“ref_property”, “target_collection”].
- Return type:
- greater_or_equal(date)[source]
Filter on whether the creation time is greater than or equal to the given time.
- Parameters:
date (datetime) – date to filter on.
on_reference_path – If the filter is on a cross-ref property, the path to the property to be filtered on, example: on_reference_path=[“ref_property”, “target_collection”].
- Return type:
- class weaviate.collections.classes.filters._FilterByUpdateTime(target=None)[source]
Bases:
_FilterByTime- Parameters:
target (_SingleTargetRef | _MultiTargetRef | None)
- class weaviate.collections.classes.filters._FilterByCreationTime(target=None)[source]
Bases:
_FilterByTime- Parameters:
target (_SingleTargetRef | _MultiTargetRef | None)
- class weaviate.collections.classes.filters._FilterById(target=None)[source]
Bases:
_FilterBase- Parameters:
target (_SingleTargetRef | _MultiTargetRef | None)
- contains_any(uuids)[source]
Filter for objects that has one of the given IDs.
- Parameters:
uuids (Sequence[str | UUID])
- Return type:
- contains_none(uuids)[source]
Filter for objects that has none of the given IDs.
- Parameters:
uuids (Sequence[str | UUID])
- Return type:
- class weaviate.collections.classes.filters._FilterByCount(link_on, target=None)[source]
Bases:
_FilterBase- Parameters:
link_on (str)
target (_SingleTargetRef | _MultiTargetRef | None)
- equal(count)[source]
Filter on whether the number of references is equal to the given integer.
- Parameters:
count (int) – count to filter on.
- Return type:
- not_equal(count)[source]
Filter on whether the number of references is equal to the given integer.
- Parameters:
count (int) – count to filter on.
- Return type:
- less_than(count)[source]
Filter on whether the number of references is equal to the given integer.
- Parameters:
count (int) – count to filter on.
- Return type:
- less_or_equal(count)[source]
Filter on whether the number of references is equal to the given integer.
- Parameters:
count (int) – count to filter on.
- Return type:
- class weaviate.collections.classes.filters._FilterByRef(target)[source]
Bases:
object- Parameters:
target (_SingleTargetRef | _MultiTargetRef)
- by_ref_multi_target(reference, target_collection)[source]
Filter on the given multi-target reference.
- Parameters:
reference (str)
target_collection (str)
- Return type:
- by_ref_count(link_on)[source]
Filter on the given reference.
- Parameters:
link_on (str)
- Return type:
- by_id()[source]
Define a filter based on the uuid to be used when querying and deleting from a collection.
- Return type:
- by_creation_time()[source]
Define a filter based on the creation time to be used when querying and deleting from a collection.
- Return type:
- by_update_time()[source]
Define a filter based on the update time to be used when querying and deleting from a collection.
- Return type:
- class weaviate.collections.classes.filters.Filter[source]
Bases:
objectThis class is used to define filters to be used when querying and deleting from a collection.
It forms the root of a method chaining hierarchy that allows you to iteratively define filters that can hop between objects through references in a formulaic way.
See the docs for more information.
- static by_ref(link_on)[source]
Define a filter based on a reference to be used when querying and deleting from a collection.
- Parameters:
link_on (str)
- Return type:
- static by_ref_multi_target(link_on, target_collection)[source]
Define a filter based on a reference to be used when querying and deleting from a collection.
- Parameters:
link_on (str)
target_collection (str)
- Return type:
- static by_ref_count(link_on)[source]
Define a filter based on the number of references to be used when querying and deleting from a collection.
- Parameters:
link_on (str)
- Return type:
- static by_id()[source]
Define a filter based on the uuid to be used when querying and deleting from a collection.
- Return type:
- static by_creation_time()[source]
Define a filter based on the creation time to be used when querying and deleting from a collection.
- Return type:
- static by_update_time()[source]
Define a filter based on the update time to be used when querying and deleting from a collection.
- Return type:
- static by_property(name, length=False)[source]
Define a filter based on a property to be used when querying and deleting from a collection.
- Parameters:
name (str)
length (bool)
- Return type:
- weaviate.collections.classes.filters.FilterByProperty
alias of
_FilterByProperty
- weaviate.collections.classes.filters.FilterById
alias of
_FilterById
- weaviate.collections.classes.filters.FilterByCreationTime
alias of
_FilterByCreationTime
- weaviate.collections.classes.filters.FilterByUpdateTime
alias of
_FilterByUpdateTime
- weaviate.collections.classes.filters.FilterByRef
alias of
_FilterByRef
weaviate.collections.classes.grpc
- class weaviate.collections.classes.grpc.HybridFusion(*values)[source]
Bases:
str,BaseEnumDefine how the query’s hybrid fusion operation should be performed.
- RANKED = 'FUSION_TYPE_RANKED'
- RELATIVE_SCORE = 'FUSION_TYPE_RELATIVE_SCORE'
- class weaviate.collections.classes.grpc.Move(force, objects=None, concepts=None)[source]
Bases:
objectDefine how the query’s move operation should be performed.
- Parameters:
force (float)
objects (List[str | UUID] | str | UUID | None)
concepts (List[str] | str | None)
- property _objects_list: List[str] | None
- property _concepts_list: List[str] | None
- class weaviate.collections.classes.grpc.MetadataQuery(*, creation_time=False, last_update_time=False, distance=False, certainty=False, score=False, explain_score=False, is_consistent=False)[source]
Bases:
_WeaviateInputDefine which metadata should be returned in the query’s results.
Create a new model by parsing and validating input data from keyword arguments.
Raises [ValidationError][pydantic_core.ValidationError] if the input data cannot be validated to form a valid model.
self is explicitly positional-only to allow self as a field name.
- Parameters:
creation_time (bool)
last_update_time (bool)
distance (bool)
certainty (bool)
score (bool)
explain_score (bool)
is_consistent (bool)
- creation_time: bool
- last_update_time: bool
- distance: bool
- certainty: bool
- score: bool
- explain_score: bool
- is_consistent: bool
- _abc_impl = <_abc._abc_data object>
- model_config = {'extra': 'forbid'}
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- class weaviate.collections.classes.grpc._MetadataQuery(vector: bool, uuid: bool = True, creation_time_unix: bool = False, last_update_time_unix: bool = False, distance: bool = False, certainty: bool = False, score: bool = False, explain_score: bool = False, is_consistent: bool = False, vectors: List[str] | None = None)[source]
Bases:
object- Parameters:
vector (bool)
uuid (bool)
creation_time_unix (bool)
last_update_time_unix (bool)
distance (bool)
certainty (bool)
score (bool)
explain_score (bool)
is_consistent (bool)
vectors (List[str] | None)
- vector: bool
- uuid: bool = True
- creation_time_unix: bool = False
- last_update_time_unix: bool = False
- distance: bool = False
- certainty: bool = False
- score: bool = False
- explain_score: bool = False
- is_consistent: bool = False
- vectors: List[str] | None = None
- classmethod from_public(public, include_vector)[source]
- Parameters:
public (MetadataQuery | None)
include_vector (bool | str | List[str])
- Return type:
- class weaviate.collections.classes.grpc.Generate(*, single_prompt=None, grouped_task=None, grouped_properties=None)[source]
Bases:
_WeaviateInputDefine how the query’s RAG capabilities should be performed.
Create a new model by parsing and validating input data from keyword arguments.
Raises [ValidationError][pydantic_core.ValidationError] if the input data cannot be validated to form a valid model.
self is explicitly positional-only to allow self as a field name.
- Parameters:
single_prompt (str | None)
grouped_task (str | None)
grouped_properties (List[str] | None)
- single_prompt: str | None
- grouped_task: str | None
- grouped_properties: List[str] | None
- _abc_impl = <_abc._abc_data object>
- model_config = {'extra': 'forbid'}
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- class weaviate.collections.classes.grpc.GroupBy(*, prop, objects_per_group, number_of_groups)[source]
Bases:
_WeaviateInputDefine how the query’s group-by operation should be performed.
Create a new model by parsing and validating input data from keyword arguments.
Raises [ValidationError][pydantic_core.ValidationError] if the input data cannot be validated to form a valid model.
self is explicitly positional-only to allow self as a field name.
- Parameters:
prop (str)
objects_per_group (int)
number_of_groups (int)
- prop: str
- objects_per_group: int
- number_of_groups: int
- _abc_impl = <_abc._abc_data object>
- model_config = {'extra': 'forbid'}
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- class weaviate.collections.classes.grpc._Sort(*, prop, ascending=True)[source]
Bases:
_WeaviateInputCreate a new model by parsing and validating input data from keyword arguments.
Raises [ValidationError][pydantic_core.ValidationError] if the input data cannot be validated to form a valid model.
self is explicitly positional-only to allow self as a field name.
- Parameters:
prop (str)
ascending (bool)
- prop: str
- ascending: bool
- _abc_impl = <_abc._abc_data object>
- model_config = {'extra': 'forbid'}
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- class weaviate.collections.classes.grpc._Sorting[source]
Bases:
object- by_property(name, ascending=True)[source]
Sort by an object property in the collection.
- Parameters:
name (str)
ascending (bool)
- Return type:
- by_id(ascending=True)[source]
Sort by an object’s ID in the collection.
- Parameters:
ascending (bool)
- Return type:
- weaviate.collections.classes.grpc.Sorting
The type returned by the Sort class to be used when defining programmatic sort chains.
- class weaviate.collections.classes.grpc.Sort[source]
Bases:
objectDefine how the query’s sort operation should be performed using the available static methods.
- static by_property(name, ascending=True)[source]
Sort by an object property in the collection.
- Parameters:
name (str)
ascending (bool)
- Return type:
- static by_id(ascending=True)[source]
Sort by an object’s ID in the collection.
- Parameters:
ascending (bool)
- Return type:
- class weaviate.collections.classes.grpc.Rerank(*, prop, query=None)[source]
Bases:
_WeaviateInputDefine how the query’s rerank operation should be performed.
Create a new model by parsing and validating input data from keyword arguments.
Raises [ValidationError][pydantic_core.ValidationError] if the input data cannot be validated to form a valid model.
self is explicitly positional-only to allow self as a field name.
- Parameters:
prop (str)
query (str | None)
- prop: str
- query: str | None
- _abc_impl = <_abc._abc_data object>
- model_config = {'extra': 'forbid'}
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- class weaviate.collections.classes.grpc.BM25OperatorOptions[source]
Bases:
object- operator: ClassVar[Any]
- class weaviate.collections.classes.grpc.BM25OperatorOr(minimum_should_match)[source]
Bases:
BM25OperatorOptionsDefine the ‘Or’ operator for keyword queries.
- Parameters:
minimum_should_match (int)
- operator: ClassVar[Any] = 1
- minimum_should_match: int
- class weaviate.collections.classes.grpc.BM25OperatorAnd[source]
Bases:
BM25OperatorOptionsDefine the ‘And’ operator for keyword queries.
- operator: ClassVar[Any] = 2
- class weaviate.collections.classes.grpc.BM25OperatorFactory[source]
Bases:
objectDefine how the BM25 query’s token matching should be performed.
- static or_(minimum_match)[source]
Use the ‘Or’ operator for keyword queries, where at least a minimum number of tokens must match.
Note that the query is tokenized using the respective tokenization method of each property.
- Parameters:
minimum_match (int) – The minimum number of keyword tokens (excluding stopwords) that must match for an object to be considered a match.
- Return type:
- weaviate.collections.classes.grpc.OneDimensionalVectorType
Represents a one-dimensional vector, e.g. one produced by the Configure.Vectors.text2vec_jinaai() module
alias of
Sequence[int|float]
- weaviate.collections.classes.grpc.TwoDimensionalVectorType
Represents a two-dimensional vector, e.g. one produced by the Configure.MultiVectors.text2vec_jinaai() module
alias of
Sequence[Sequence[int|float]]
- class weaviate.collections.classes.grpc._ListOfVectorsQuery(*, dimensionality, vectors)[source]
Bases:
_WeaviateInput,Generic[V]Create a new model by parsing and validating input data from keyword arguments.
Raises [ValidationError][pydantic_core.ValidationError] if the input data cannot be validated to form a valid model.
self is explicitly positional-only to allow self as a field name.
- Parameters:
dimensionality (Literal['1D', '2D'])
vectors (Sequence[V])
- dimensionality: Literal['1D', '2D']
- vectors: Sequence[V]
- static is_one_dimensional(self_)[source]
- Parameters:
self_ (_ListOfVectorsQuery)
- Return type:
TypeGuard[_ListOfVectorsQuery[Sequence[Union[int, float]]]]
- static is_two_dimensional(self_)[source]
- Parameters:
self_ (_ListOfVectorsQuery)
- Return type:
TypeGuard[_ListOfVectorsQuery[Sequence[Sequence[Union[int, float]]]]]
- _abc_impl = <_abc._abc_data object>
- model_config = {'extra': 'forbid'}
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- class weaviate.collections.classes.grpc._ListOfVectorsQuery(*, dimensionality, vectors)[source]
Bases:
_WeaviateInput,Generic[V]Create a new model by parsing and validating input data from keyword arguments.
Raises [ValidationError][pydantic_core.ValidationError] if the input data cannot be validated to form a valid model.
self is explicitly positional-only to allow self as a field name.
- Parameters:
dimensionality (Literal['1D', '2D'])
vectors (Sequence[V])
- dimensionality: Literal['1D', '2D']
- vectors: Sequence[V]
- static is_one_dimensional(self_)[source]
- Parameters:
self_ (_ListOfVectorsQuery)
- Return type:
TypeGuard[_ListOfVectorsQuery[Sequence[Union[int, float]]]]
- static is_two_dimensional(self_)[source]
- Parameters:
self_ (_ListOfVectorsQuery)
- Return type:
TypeGuard[_ListOfVectorsQuery[Sequence[Sequence[Union[int, float]]]]]
- _abc_impl = <_abc._abc_data object>
- model_config = {'extra': 'forbid'}
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- class weaviate.collections.classes.grpc._ListOfVectorsQuery(*, dimensionality, vectors)[source]
Bases:
_WeaviateInput,Generic[V]Create a new model by parsing and validating input data from keyword arguments.
Raises [ValidationError][pydantic_core.ValidationError] if the input data cannot be validated to form a valid model.
self is explicitly positional-only to allow self as a field name.
- Parameters:
dimensionality (Literal['1D', '2D'])
vectors (Sequence[V])
- dimensionality: Literal['1D', '2D']
- vectors: Sequence[V]
- static is_one_dimensional(self_)[source]
- Parameters:
self_ (_ListOfVectorsQuery)
- Return type:
TypeGuard[_ListOfVectorsQuery[Sequence[Union[int, float]]]]
- static is_two_dimensional(self_)[source]
- Parameters:
self_ (_ListOfVectorsQuery)
- Return type:
TypeGuard[_ListOfVectorsQuery[Sequence[Sequence[Union[int, float]]]]]
- _abc_impl = <_abc._abc_data object>
- model_config = {'extra': 'forbid'}
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- weaviate.collections.classes.grpc.ListOfVectorsQuery
Define a many-vectors query to be used within a near vector search, i.e. multiple vectors over a single-vector space.
- weaviate.collections.classes.grpc.NearVectorInputType
Define the input types that can be used in a near vector search
alias of
Sequence[int|float] |Sequence[Sequence[int|float]] |Mapping[str,Sequence[int|float] |Sequence[Sequence[int|float]] |_ListOfVectorsQuery[Sequence[Union[int, float]]]|_ListOfVectorsQuery[Sequence[Sequence[Union[int, float]]]]]
- class weaviate.collections.classes.grpc.NearVector[source]
Bases:
objectFactory class to use when defining near vector queries with multiple vectors in near_vector() and hybrid() methods.
- class weaviate.collections.classes.grpc._HybridNearBase(*, distance=None, certainty=None)[source]
Bases:
_WeaviateInputCreate a new model by parsing and validating input data from keyword arguments.
Raises [ValidationError][pydantic_core.ValidationError] if the input data cannot be validated to form a valid model.
self is explicitly positional-only to allow self as a field name.
- Parameters:
distance (float | None)
certainty (float | None)
- model_config = {'arbitrary_types_allowed': True, 'extra': 'forbid'}
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- distance: float | None
- certainty: float | None
- _abc_impl = <_abc._abc_data object>
- class weaviate.collections.classes.grpc._HybridNearText(*, distance=None, certainty=None, text, move_to=None, move_away=None)[source]
Bases:
_HybridNearBaseCreate a new model by parsing and validating input data from keyword arguments.
Raises [ValidationError][pydantic_core.ValidationError] if the input data cannot be validated to form a valid model.
self is explicitly positional-only to allow self as a field name.
- Parameters:
- text: str | List[str]
- _abc_impl = <_abc._abc_data object>
- model_config = {'arbitrary_types_allowed': True, 'extra': 'forbid'}
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- class weaviate.collections.classes.grpc._HybridNearVector(*, vector, distance=None, certainty=None)[source]
Bases:
object- Parameters:
vector (Sequence[int | float] | Sequence[Sequence[int | float]] | Mapping[str, Sequence[int | float] | Sequence[Sequence[int | float]] | _ListOfVectorsQuery[Sequence[Union[int, float]]] | _ListOfVectorsQuery[Sequence[Sequence[Union[int, float]]]]])
distance (float | None)
certainty (float | None)
- vector: Sequence[int | float] | Sequence[Sequence[int | float]] | Mapping[str, Sequence[int | float] | Sequence[Sequence[int | float]] | _ListOfVectorsQuery[Sequence[int | float]] | _ListOfVectorsQuery[Sequence[Sequence[int | float]]]]
- distance: float | None
- certainty: float | None
- class weaviate.collections.classes.grpc._MultiTargetVectorJoinEnum(*values)[source]
Bases:
BaseEnumDefine how multi target vector searches should be combined.
- SUM = 1
- AVERAGE = 2
- MINIMUM = 3
- RELATIVE_SCORE = 4
- MANUAL_WEIGHTS = 5
- class weaviate.collections.classes.grpc._MultiTargetVectorJoin(combination: weaviate.collections.classes.grpc._MultiTargetVectorJoinEnum, target_vectors: List[str], weights: Dict[str, float | List[float]] | None = None)[source]
Bases:
object- Parameters:
combination (_MultiTargetVectorJoinEnum)
target_vectors (List[str])
weights (Dict[str, float | List[float]] | None)
- combination: _MultiTargetVectorJoinEnum
- target_vectors: List[str]
- weights: Dict[str, float | List[float]] | None = None
- class weaviate.collections.classes.grpc.TargetVectors[source]
Bases:
objectDefine how the distances from different target vectors should be combined using the available methods.
- static sum(target_vectors)[source]
Combine the distance from different target vectors by summing them.
- Parameters:
target_vectors (List[str])
- Return type:
- static average(target_vectors)[source]
Combine the distance from different target vectors by averaging them.
- Parameters:
target_vectors (List[str])
- Return type:
- static minimum(target_vectors)[source]
Combine the distance from different target vectors by using the minimum distance.
- Parameters:
target_vectors (List[str])
- Return type:
- static manual_weights(weights)[source]
Combine the distance from different target vectors by summing them using manual weights.
- Parameters:
weights (Dict[str, float | List[float]])
- Return type:
- class weaviate.collections.classes.grpc.HybridVector[source]
Bases:
objectUse this factory class to define the appropriate classes needed when defining near text and near vector sub-searches in hybrid queries.
- static near_text(query, *, certainty=None, distance=None, move_to=None, move_away=None)[source]
Define a near text search to be used within a hybrid query.
- Parameters:
query (str | List[str]) – The text to search for as a string or a list of strings.
certainty (float | None) – The minimum similarity score to return. If not specified, the default certainty specified by the server is used.
distance (float | None) – The maximum distance to search. If not specified, the default distance specified by the server is used.
move_to (Move | None) – Define the concepts that should be moved towards in the vector space during the search.
move_away (Move | None) – Define the concepts that should be moved away from in the vector space during the search.
- Returns:
A _HybridNearText object to be used in the vector parameter of the query.hybrid and generate.hybrid search methods.
- Return type:
- static near_vector(vector, *, certainty=None, distance=None)[source]
Define a near vector search to be used within a hybrid query.
- Parameters:
certainty (float | None) – The minimum similarity score to return. If not specified, the default certainty specified by the server is used.
distance (float | None) – The maximum distance to search. If not specified, the default distance specified by the server is used.
vector (Sequence[int | float] | Sequence[Sequence[int | float]] | Mapping[str, Sequence[int | float] | Sequence[Sequence[int | float]] | _ListOfVectorsQuery[Sequence[Union[int, float]]] | _ListOfVectorsQuery[Sequence[Sequence[Union[int, float]]]]])
- Returns:
A _HybridNearVector object to be used in the vector parameter of the query.hybrid and generate.hybrid search methods.
- Return type:
- class weaviate.collections.classes.grpc._QueryReference[source]
Bases:
_WeaviateInputCreate a new model by parsing and validating input data from keyword arguments.
Raises [ValidationError][pydantic_core.ValidationError] if the input data cannot be validated to form a valid model.
self is explicitly positional-only to allow self as a field name.
- link_on: str
- include_vector: bool | str | List[str]
- return_metadata: MetadataQuery | None
- return_properties: PROPERTIES | bool | None
- return_references: REFERENCES | None
- property _return_metadata: _MetadataQuery
- _abc_impl = <_abc._abc_data object>
- model_config = {'extra': 'forbid'}
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- class weaviate.collections.classes.grpc._QueryReferenceMultiTarget[source]
Bases:
_QueryReferenceCreate a new model by parsing and validating input data from keyword arguments.
Raises [ValidationError][pydantic_core.ValidationError] if the input data cannot be validated to form a valid model.
self is explicitly positional-only to allow self as a field name.
- target_collection: str
- _abc_impl = <_abc._abc_data object>
- model_config = {'extra': 'forbid'}
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- class weaviate.collections.classes.grpc.QueryReference(*, link_on, include_vector=False, return_metadata=None, return_properties=None, return_references=None)[source]
Bases:
_QueryReferenceDefine a query-time reference to a single-target property when querying through cross-references.
Create a new model by parsing and validating input data from keyword arguments.
Raises [ValidationError][pydantic_core.ValidationError] if the input data cannot be validated to form a valid model.
self is explicitly positional-only to allow self as a field name.
- Parameters:
link_on (str)
include_vector (bool | str | List[str])
return_metadata (MetadataQuery | None)
return_properties (Sequence[str | QueryNested] | str | QueryNested | bool | None)
return_references (Sequence[_QueryReference | _QueryReferenceMultiTarget] | _QueryReference | _QueryReferenceMultiTarget | None)
- MultiTarget
Define a query-time reference to a multi-target property when querying through cross-references.
alias of
_QueryReferenceMultiTarget
- _abc_impl = <_abc._abc_data object>
- model_config = {'extra': 'forbid'}
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- class weaviate.collections.classes.grpc.QueryNested(*, name, properties)[source]
Bases:
_WeaviateInputDefine the query-time return properties of a nested property.
Create a new model by parsing and validating input data from keyword arguments.
Raises [ValidationError][pydantic_core.ValidationError] if the input data cannot be validated to form a valid model.
self is explicitly positional-only to allow self as a field name.
- Parameters:
name (str)
properties (Sequence[str | QueryNested] | str | QueryNested)
- name: str
- properties: PROPERTIES
- _abc_impl = <_abc._abc_data object>
- model_config = {'extra': 'forbid'}
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- class weaviate.collections.classes.grpc.NearMediaType(*values)[source]
Bases:
str,EnumThe different types of media that can be used in a near_media query to leverage the multi2vec-* modules.
All are available when using multi2vec-bind but only IMAGE is available when using multi2vec-clip.
- AUDIO = 'audio'
- DEPTH = 'depth'
- IMAGE = 'image'
- IMU = 'imu'
- THERMAL = 'thermal'
- VIDEO = 'video'
weaviate.collections.classes.internal
- class weaviate.collections.classes.internal.MetadataReturn(creation_time=None, last_update_time=None, distance=None, certainty=None, score=None, explain_score=None, is_consistent=None, rerank_score=None)[source]
Bases:
objectMetadata of an object returned by a query.
- Parameters:
creation_time (datetime | None)
last_update_time (datetime | None)
distance (float | None)
certainty (float | None)
score (float | None)
explain_score (str | None)
is_consistent (bool | None)
rerank_score (float | None)
- creation_time: datetime | None = None
- last_update_time: datetime | None = None
- distance: float | None = None
- certainty: float | None = None
- score: float | None = None
- explain_score: str | None = None
- is_consistent: bool | None = None
- rerank_score: float | None = None
- class weaviate.collections.classes.internal.GroupByMetadataReturn(distance=None)[source]
Bases:
objectMetadata of an object returned by a group by query.
- Parameters:
distance (float | None)
- distance: float | None = None
- class weaviate.collections.classes.internal._Object(uuid: uuid.UUID, metadata: M, properties: P, references: R, vector: Dict[str, List[float] | List[List[float]]], collection: str)[source]
-
- Parameters:
- uuid: UUID
- vector: Dict[str, List[float] | List[List[float]]]
- collection: str
- class weaviate.collections.classes.internal.Object(uuid, metadata, properties, references, vector, collection)[source]
Bases:
Generic[P,R],_Object[P,R,MetadataReturn]A single Weaviate object returned by a query within the .query namespace of a collection.
- class weaviate.collections.classes.internal.MetadataSingleObjectReturn(creation_time, last_update_time, is_consistent)[source]
Bases:
objectMetadata of an object returned by the fetch_object_by_id query.
- Parameters:
creation_time (datetime)
last_update_time (datetime)
is_consistent (bool | None)
- creation_time: datetime
- last_update_time: datetime
- is_consistent: bool | None
- class weaviate.collections.classes.internal.ObjectSingleReturn(uuid, metadata, properties, references, vector, collection)[source]
Bases:
Generic[P,R],_Object[P,R,MetadataSingleObjectReturn]A single Weaviate object returned by the fetch_object_by_id query.
- class weaviate.collections.classes.internal.GroupByObject(uuid, metadata, properties, references, vector, collection, belongs_to_group)[source]
Bases:
Generic[P,R],_Object[P,R,GroupByMetadataReturn]A single Weaviate object returned by a query with the group_by argument specified.
- Parameters:
- belongs_to_group: str
- class weaviate.collections.classes.internal.GenerativeSingle(debug, metadata, text)[source]
Bases:
objectThe generative data returned relevant to a single prompt generative query.
- Parameters:
debug (GenerativeDebug | None)
metadata (GenerativeAnthropicMetadata | GenerativeAnyscaleMetadata | GenerativeAWSMetadata | GenerativeCohereMetadata | GenerativeDatabricksMetadata | GenerativeDummyMetadata | GenerativeFriendliAIMetadata | GenerativeGoogleMetadata | GenerativeMistralMetadata | GenerativeNvidiaMetadata | GenerativeOllamaMetadata | GenerativeOpenAIMetadata | None)
text (str | None)
- debug: GenerativeDebug | None
- metadata: GenerativeAnthropicMetadata | GenerativeAnyscaleMetadata | GenerativeAWSMetadata | GenerativeCohereMetadata | GenerativeDatabricksMetadata | GenerativeDummyMetadata | GenerativeFriendliAIMetadata | GenerativeGoogleMetadata | GenerativeMistralMetadata | GenerativeNvidiaMetadata | GenerativeOllamaMetadata | GenerativeOpenAIMetadata | None
- text: str | None
- class weaviate.collections.classes.internal.GenerativeGrouped(metadata, text)[source]
Bases:
objectThe generative data returned relevant to a grouped prompt generative query.
- Parameters:
metadata (GenerativeAnthropicMetadata | GenerativeAnyscaleMetadata | GenerativeAWSMetadata | GenerativeCohereMetadata | GenerativeDatabricksMetadata | GenerativeDummyMetadata | GenerativeFriendliAIMetadata | GenerativeGoogleMetadata | GenerativeMistralMetadata | GenerativeNvidiaMetadata | GenerativeOllamaMetadata | GenerativeOpenAIMetadata | None)
text (str | None)
- metadata: GenerativeAnthropicMetadata | GenerativeAnyscaleMetadata | GenerativeAWSMetadata | GenerativeCohereMetadata | GenerativeDatabricksMetadata | GenerativeDummyMetadata | GenerativeFriendliAIMetadata | GenerativeGoogleMetadata | GenerativeMistralMetadata | GenerativeNvidiaMetadata | GenerativeOllamaMetadata | GenerativeOpenAIMetadata | None
- text: str | None
- class weaviate.collections.classes.internal.GenerativeObject(generated, generative, uuid, metadata, properties, references, vector, collection)[source]
Bases:
Generic[P,R],Object[P,R]A single Weaviate object returned by a query within the generate namespace of a collection.
- Parameters:
generated (str | None)
generative (GenerativeSingle | None)
uuid (UUID)
metadata (M)
properties (P)
references (R)
vector (Dict[str, List[float] | List[List[float]]])
collection (str)
- __generated: str | None
- generative: GenerativeSingle | None
- property generated: str | None
The single generated text of the object.
- class weaviate.collections.classes.internal.GenerativeReturn(generated, objects, generative)[source]
-
The return type of a query within the generate namespace of a collection.
- Parameters:
generated (str | None)
objects (List[GenerativeObject[P, R]])
generative (GenerativeGrouped | None)
- __generated: str | None
- objects: List[GenerativeObject[P, R]]
- generative: GenerativeGrouped | None
- property generated: str | None
The grouped generated text of the objects.
- class weaviate.collections.classes.internal.Group(name, min_distance, max_distance, number_of_objects, objects, rerank_score)[source]
-
A group of objects returned in a group by query.
- Parameters:
name (str)
min_distance (float)
max_distance (float)
number_of_objects (int)
objects (List[GroupByObject[P, R]])
rerank_score (float | None)
- name: str
- min_distance: float
- max_distance: float
- number_of_objects: int
- objects: List[GroupByObject[P, R]]
- rerank_score: float | None
- class weaviate.collections.classes.internal.GenerativeGroup(name, min_distance, max_distance, number_of_objects, objects, rerank_score, generated)[source]
Bases:
Generic[P,R],Group[P,R]A group of objects returned in a generative group by query.
- Parameters:
name (str)
min_distance (float)
max_distance (float)
number_of_objects (int)
objects (List[GroupByObject[P, R]])
rerank_score (float | None)
generated (str | None)
- generated: str | None
- class weaviate.collections.classes.internal.GenerativeGroupByReturn(objects, groups, generated)[source]
-
The return type of a query within the .generate namespace of a collection with the group_by argument specified.
- Parameters:
objects (List[GroupByObject[P, R]])
groups (Dict[str, GenerativeGroup[P, R]])
generated (str | None)
- objects: List[GroupByObject[P, R]]
- groups: Dict[str, GenerativeGroup[P, R]]
- generated: str | None
- class weaviate.collections.classes.internal.GroupByReturn(objects, groups)[source]
-
The return type of a query within the .query namespace of a collection with the group_by argument specified.
- objects: List[GroupByObject[P, R]]
- class weaviate.collections.classes.internal.QueryReturn(objects)[source]
-
The return type of a query within the .query namespace of a collection.
- class weaviate.collections.classes.internal._RawGQLReturn(aggregate: Dict[str, List[Dict[str, Any]]], explore: Dict[str, List[Dict[str, Any]]], get: Dict[str, List[Dict[str, Any]]], errors: Dict[str, Any] | None)[source]
Bases:
object- Parameters:
aggregate (Dict[str, List[Dict[str, Any]]])
explore (Dict[str, List[Dict[str, Any]]])
get (Dict[str, List[Dict[str, Any]]])
errors (Dict[str, Any] | None)
- aggregate: Dict[str, List[Dict[str, Any]]]
- explore: Dict[str, List[Dict[str, Any]]]
- get: Dict[str, List[Dict[str, Any]]]
- errors: Dict[str, Any] | None
- class weaviate.collections.classes.internal._Generative(single, grouped, grouped_properties, generative_provider=None)[source]
Bases:
object- Parameters:
single (str | _SinglePrompt | None)
grouped (str | _GroupedTask | None)
grouped_properties (List[str] | None)
generative_provider (_GenerativeConfigRuntime | None)
- single: str | _SinglePrompt | None
- grouped: str | _GroupedTask | None
- grouped_properties: List[str] | None
- generative_provider: _GenerativeConfigRuntime | None
- class weaviate.collections.classes.internal._GroupBy(prop, number_of_groups, objects_per_group)[source]
Bases:
object- Parameters:
prop (str)
number_of_groups (int)
objects_per_group (int)
- prop: str
- number_of_groups: int
- objects_per_group: int
- weaviate.collections.classes.internal.__is_nested(value)[source]
- Parameters:
value (Any)
- Return type:
bool
- weaviate.collections.classes.internal.__create_nested_property_from_nested(name, value)[source]
- Parameters:
name (str)
value (Any)
- Return type:
- class weaviate.collections.classes.internal._Reference(target_collection, uuids)[source]
Bases:
objectYou should not initialise this class directly. Use the .to_multi() class methods instead.
- Parameters:
target_collection (str | None)
uuids (Sequence[str | UUID] | str | UUID)
- property is_one_to_many: bool
Returns True if the reference is to a one-to-many references, i.e. points to more than one object.
- class weaviate.collections.classes.internal.ReferenceToMulti(*, target_collection, uuids)[source]
Bases:
_WeaviateInputUse this class when you want to insert a multi-target reference property.
Create a new model by parsing and validating input data from keyword arguments.
Raises [ValidationError][pydantic_core.ValidationError] if the input data cannot be validated to form a valid model.
self is explicitly positional-only to allow self as a field name.
- Parameters:
target_collection (str)
uuids (Sequence[str | UUID] | str | UUID)
- target_collection: str
- uuids: Sequence[str | UUID] | str | UUID
- property uuids_str: List[str]
Returns the UUIDs as strings.
- _abc_impl = <_abc._abc_data object>
- model_config = {'extra': 'forbid'}
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- class weaviate.collections.classes.internal._CrossReference(objects)[source]
Bases:
Generic[Properties,IReferences]- Parameters:
objects (List[Object[Properties, IReferences]] | None)
- classmethod _from(objects)[source]
- Parameters:
objects (List[Object[Properties, IReferences]])
- Return type:
_CrossReference[Properties, IReferences]
- property objects: List[Object[Properties, IReferences]]
Returns the objects of the cross reference.
- weaviate.collections.classes.internal.CrossReference
Use this TypeAlias when you want to type hint a cross reference within a generic data model.
If you want to define a reference property when creating your collection, use ReferenceProperty or ReferencePropertyMultiTarget instead.
If you want to create a reference when inserting an object, supply the UUIDs directly or use Reference.to_multi() instead.
Example
>>> import typing >>> import weaviate.classes as wvc >>> >>> class One(typing.TypedDict): ... prop: str >>> >>> class Two(typing.TypedDict): ... one: wvc.CrossReference[One]
alias of
_CrossReference[Properties,IReferences]
- weaviate.collections.classes.internal.ReferenceInput
This type alias is used when providing references as inputs within the .data namespace of a collection.
alias of
str|UUID|Sequence[str|UUID] |ReferenceToMulti
- weaviate.collections.classes.internal.ReferenceInputs
This type alias is used when providing references as inputs within the .data namespace of a collection.
alias of
Mapping[str,str|UUID|Sequence[str|UUID] |ReferenceToMulti]
- class weaviate.collections.classes.internal.CrossReferenceAnnotation(include_vector=False, metadata=None, target_collection=None)[source]
Bases:
objectDataclass to be used when annotating a generic cross reference property with options for retrieving data from the cross referenced object when querying.
Example
>>> import typing >>> import weaviate.classes as wvc >>> >>> class One(typing.TypedDict): ... prop: str >>> >>> class Two(typing.TypedDict): ... one: typing.Annotated[ ... wvc.CrossReference[One], ... wvc.CrossReferenceAnnotation(include_vector=True) ... ]
- Parameters:
include_vector (bool)
metadata (MetadataQuery | None)
target_collection (str | None)
- include_vector: bool = False
- metadata: MetadataQuery | None = None
- target_collection: str | None = None
- weaviate.collections.classes.internal._extract_types_from_reference(type_, field)[source]
Extract first inner type from CrossReference[Properties, References].
- Parameters:
type_ (_CrossReference[Properties, References])
field (str)
- Return type:
Tuple[Type[Properties], Type[References]]
- weaviate.collections.classes.internal._extract_types_from_annotated_reference(type_, field)[source]
Extract inner type from Annotated[CrossReference[Properties, References]].
- Parameters:
type_ (Annotated[_CrossReference[Properties, References], CrossReferenceAnnotation])
field (str)
- Return type:
Tuple[Type[Properties], Type[References]]
- weaviate.collections.classes.internal.__is_annotated_reference(value)[source]
- Parameters:
value (Any)
- Return type:
bool
- weaviate.collections.classes.internal.__create_link_to_from_annotated_reference(link_on, value)[source]
Create FromReference or FromReferenceMultiTarget from Annotated[CrossReference[Properties], ReferenceAnnotation].
- Parameters:
link_on (str)
value (Annotated[_CrossReference[Properties, References], CrossReferenceAnnotation])
- Return type:
- weaviate.collections.classes.internal.__create_link_to_from_reference(link_on, value)[source]
Create FromReference from CrossReference[Properties].
- Parameters:
link_on (str)
value (_CrossReference[Properties, References])
- Return type:
- weaviate.collections.classes.internal._extract_properties_from_data_model(type_)[source]
Extract properties of Properties recursively from Properties.
Checks to see if there is a _Reference[Properties], Annotated[_Reference[Properties]], or _Nested[Properties] in the data model and lists out the properties as classes readily consumable by the underlying API.
- Parameters:
type_ (Type[Properties])
- Return type:
Sequence[str | QueryNested] | str | QueryNested
- weaviate.collections.classes.internal._extract_references_from_data_model(type_)[source]
Extract references of References recursively from References.
Checks to see if there is a _Reference[References], Annotated[_Reference[References]], or _Nested[References] in the data model and lists out the references as classes readily consumable by the underlying API.
- Parameters:
type_ (Type[References])
- Return type:
Sequence[_QueryReference | _QueryReferenceMultiTarget] | _QueryReference | _QueryReferenceMultiTarget | None
- class weaviate.collections.classes.internal._QueryOptions(include_metadata: bool, include_properties: bool, include_references: bool, include_vector: bool, is_group_by: bool)[source]
Bases:
object- Parameters:
include_metadata (bool)
include_properties (bool)
include_references (bool)
include_vector (bool)
is_group_by (bool)
- include_metadata: bool
- include_properties: bool
- include_references: bool
- include_vector: bool
- is_group_by: bool
- classmethod from_input(return_metadata, return_properties, include_vector, collection_references, query_references, rerank=None, group_by=None)[source]
- Parameters:
return_metadata (List[Literal['creation_time', 'last_update_time', 'distance', 'certainty', 'score', 'explain_score', 'is_consistent']] | ~weaviate.collections.classes.grpc.MetadataQuery | None)
return_properties (Sequence[str | QueryNested] | str | QueryNested | bool | Type[Any] | None)
include_vector (bool | str | List[str])
collection_references (Type[Any] | None)
query_references (_QueryReference | Sequence[_QueryReference] | Type[Any] | None)
rerank (Rerank | None)
group_by (GroupBy | None)
- Return type:
- weaviate.collections.classes.internal.GenerativeNearMediaReturnType
Use GenerativeSearchReturnType instead.
- Type:
@Deprecated
alias of
GenerativeReturn[Properties,References] |GenerativeReturn[TProperties,TReferences] |GenerativeReturn[Properties,Mapping[str,_CrossReference[Mapping[str,None|str|bool|int|float|datetime|UUID|GeoCoordinate|PhoneNumber|_PhoneNumber|Mapping[str,WeaviateField] |Sequence[str] |Sequence[bool] |Sequence[int] |Sequence[float] |Sequence[datetime] |Sequence[UUID] |Sequence[Mapping[str,WeaviateField]]],CrossReferences]]] |GenerativeReturn[Properties,TReferences] |GenerativeReturn[TProperties,References] |GenerativeReturn[TProperties,Mapping[str,_CrossReference[Mapping[str,None|str|bool|int|float|datetime|UUID|GeoCoordinate|PhoneNumber|_PhoneNumber|Mapping[str,WeaviateField] |Sequence[str] |Sequence[bool] |Sequence[int] |Sequence[float] |Sequence[datetime] |Sequence[UUID] |Sequence[Mapping[str,WeaviateField]]],CrossReferences]]] |GenerativeGroupByReturn[Properties,References] |GenerativeGroupByReturn[TProperties,TReferences] |GenerativeGroupByReturn[Properties,Mapping[str,_CrossReference[Mapping[str,None|str|bool|int|float|datetime|UUID|GeoCoordinate|PhoneNumber|_PhoneNumber|Mapping[str,WeaviateField] |Sequence[str] |Sequence[bool] |Sequence[int] |Sequence[float] |Sequence[datetime] |Sequence[UUID] |Sequence[Mapping[str,WeaviateField]]],CrossReferences]]] |GenerativeGroupByReturn[Properties,TReferences] |GenerativeGroupByReturn[TProperties,References] |GenerativeGroupByReturn[TProperties,Mapping[str,_CrossReference[Mapping[str,None|str|bool|int|float|datetime|UUID|GeoCoordinate|PhoneNumber|_PhoneNumber|Mapping[str,WeaviateField] |Sequence[str] |Sequence[bool] |Sequence[int] |Sequence[float] |Sequence[datetime] |Sequence[UUID] |Sequence[Mapping[str,WeaviateField]]],CrossReferences]]]
- weaviate.collections.classes.internal.QueryNearMediaReturnType
Use QuerySearchReturnType instead.
- Type:
@Deprecated
alias of
QueryReturn[Properties,References] |QueryReturn[TProperties,TReferences] |QueryReturn[Properties,Mapping[str,_CrossReference[Mapping[str,None|str|bool|int|float|datetime|UUID|GeoCoordinate|PhoneNumber|_PhoneNumber|Mapping[str,WeaviateField] |Sequence[str] |Sequence[bool] |Sequence[int] |Sequence[float] |Sequence[datetime] |Sequence[UUID] |Sequence[Mapping[str,WeaviateField]]],CrossReferences]]] |QueryReturn[Properties,TReferences] |QueryReturn[TProperties,References] |QueryReturn[TProperties,Mapping[str,_CrossReference[Mapping[str,None|str|bool|int|float|datetime|UUID|GeoCoordinate|PhoneNumber|_PhoneNumber|Mapping[str,WeaviateField] |Sequence[str] |Sequence[bool] |Sequence[int] |Sequence[float] |Sequence[datetime] |Sequence[UUID] |Sequence[Mapping[str,WeaviateField]]],CrossReferences]]] |GroupByReturn[Properties,References] |GroupByReturn[TProperties,TReferences] |GroupByReturn[Properties,Mapping[str,_CrossReference[Mapping[str,None|str|bool|int|float|datetime|UUID|GeoCoordinate|PhoneNumber|_PhoneNumber|Mapping[str,WeaviateField] |Sequence[str] |Sequence[bool] |Sequence[int] |Sequence[float] |Sequence[datetime] |Sequence[UUID] |Sequence[Mapping[str,WeaviateField]]],CrossReferences]]] |GroupByReturn[Properties,TReferences] |GroupByReturn[TProperties,References] |GroupByReturn[TProperties,Mapping[str,_CrossReference[Mapping[str,None|str|bool|int|float|datetime|UUID|GeoCoordinate|PhoneNumber|_PhoneNumber|Mapping[str,WeaviateField] |Sequence[str] |Sequence[bool] |Sequence[int] |Sequence[float] |Sequence[datetime] |Sequence[UUID] |Sequence[Mapping[str,WeaviateField]]],CrossReferences]]]
weaviate.collections.classes.orm
weaviate.collections.classes.tenants
- class weaviate.collections.classes.tenants._TenantActivistatusServerValues(*values)[source]
Bases:
str,EnumValues to be used when sending tenants to weaviate. Needed for BC.
- HOT = 'HOT'
- COLD = 'COLD'
- FROZEN = 'FROZEN'
- OTHER = 'OTHER'
- class weaviate.collections.classes.tenants.TenantActivityStatus(*values)[source]
Bases:
str,EnumTenantActivityStatus class used to describe the activity status of a tenant in Weaviate.
- ACTIVE
The tenant is fully active and can be used.
- INACTIVE
The tenant is not active, files stored locally.
- OFFLOADED
The tenant is not active, files stored on the cloud.
- OFFLOADING
The tenant is in the process of being offloaded.
- ONLOADING
The tenant is in the process of being activated.
- HOT
DEPRECATED, please use ACTIVE. The tenant is fully active and can be used.
- COLD
DEPRECATED, please use INACTIVE. The tenant is not active, files stored locally.
- FROZEN
DEPRECATED, please use OFFLOADED. The tenant is not active, files stored on the cloud.
- ACTIVE = 'ACTIVE'
- INACTIVE = 'INACTIVE'
- OFFLOADED = 'OFFLOADED'
- OFFLOADING = 'OFFLOADING'
- ONLOADING = 'ONLOADING'
- HOT = 'HOT'
- COLD = 'COLD'
- FROZEN = 'FROZEN'
- class weaviate.collections.classes.tenants.Tenant(*, name, activity_status=TenantActivityStatus.ACTIVE, activityStatus=_TenantActivistatusServerValues.HOT)[source]
Bases:
BaseModelTenant class used to describe a tenant in Weaviate.
- Parameters:
name (str)
activity_status (TenantActivityStatus)
activityStatus (_TenantActivistatusServerValues)
- name
The name of the tenant.
- Type:
str
- activity_status
TenantActivityStatus, default: “HOT”
Create a new model by parsing and validating input data from keyword arguments.
Raises [ValidationError][pydantic_core.ValidationError] if the input data cannot be validated to form a valid model.
self is explicitly positional-only to allow self as a field name.
- model_config = {'populate_by_name': True, 'validate_by_alias': True, 'validate_by_name': True}
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- name: str
- activityStatusInternal: TenantActivityStatus
- activityStatus: _TenantActivistatusServerValues
- property activity_status: TenantActivityStatus
Getter for the activity status of the tenant.
- model_post_init(_Tenant__context)[source]
Override this method to perform additional initialization after __init__ and model_construct. This is useful if you want to do some validation that requires the entire model to be initialized.
- Parameters:
_Tenant__context (Any)
- Return type:
None
- _abc_impl = <_abc._abc_data object>
- class weaviate.collections.classes.tenants.TenantOutput(*, name, activity_status=TenantActivityStatus.ACTIVE, activityStatus=_TenantActivistatusServerValues.HOT)[source]
Bases:
TenantWrapper around Tenant for output purposes.
Create a new model by parsing and validating input data from keyword arguments.
Raises [ValidationError][pydantic_core.ValidationError] if the input data cannot be validated to form a valid model.
self is explicitly positional-only to allow self as a field name.
- Parameters:
name (str)
activity_status (TenantActivityStatus)
activityStatus (_TenantActivistatusServerValues)
- model_post_init(_TenantOutput__context)[source]
Override this method to perform additional initialization after __init__ and model_construct. This is useful if you want to do some validation that requires the entire model to be initialized.
- Parameters:
_TenantOutput__context (Any)
- Return type:
None
- _abc_impl = <_abc._abc_data object>
- model_config = {'populate_by_name': True, 'validate_by_alias': True, 'validate_by_name': True}
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- class weaviate.collections.classes.tenants.TenantCreateActivityStatus(*values)[source]
Bases:
str,EnumTenantActivityStatus class used to describe the activity status of a tenant to create in Weaviate.
- ACTIVE
The tenant is fully active and can be used.
- INACTIVE
The tenant is not active, files stored locally.
- HOT
DEPRECATED, please use ACTIVE. The tenant is fully active and can be used.
- COLD
DEPRECATED, please use INACTIVE. The tenant is not active, files stored locally.
- ACTIVE = 'ACTIVE'
- INACTIVE = 'INACTIVE'
- HOT = 'HOT'
- COLD = 'COLD'
- class weaviate.collections.classes.tenants.TenantUpdateActivityStatus(*values)[source]
Bases:
str,EnumTenantActivityStatus class used to describe the activity status of a tenant to update in Weaviate.
- ACTIVE
The tenant is fully active and can be used.
- INACTIVE
The tenant is not active, files stored locally.
- OFFLOADED
The tenant is not active, files stored on the cloud.
- HOT
DEPRECATED, please use ACTIVE. The tenant is fully active and can be used.
- COLD
DEPRECATED, please use INACTIVE. The tenant is not active, files stored locally.
- FROZEN
DEPRECATED, please use OFFLOADED. The tenant is not active, files stored on the cloud.
- ACTIVE = 'ACTIVE'
- INACTIVE = 'INACTIVE'
- OFFLOADED = 'OFFLOADED'
- HOT = 'HOT'
- COLD = 'COLD'
- FROZEN = 'FROZEN'
- class weaviate.collections.classes.tenants.TenantCreate(*, name, activity_status=TenantCreateActivityStatus.ACTIVE, activityStatus=_TenantActivistatusServerValues.HOT)[source]
Bases:
BaseModelTenant class used to describe a tenant to create in Weaviate.
- Parameters:
name (str)
activity_status (TenantCreateActivityStatus)
activityStatus (_TenantActivistatusServerValues)
- name
the name of the tenant.
- Type:
str
- activity_status
TenantCreateActivityStatus, default: “HOT”
Create a new model by parsing and validating input data from keyword arguments.
Raises [ValidationError][pydantic_core.ValidationError] if the input data cannot be validated to form a valid model.
self is explicitly positional-only to allow self as a field name.
- model_config = {'populate_by_name': True, 'validate_by_alias': True, 'validate_by_name': True}
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- name: str
- activityStatusInternal: TenantCreateActivityStatus
- activityStatus: _TenantActivistatusServerValues
- property activity_status: TenantCreateActivityStatus
Getter for the activity status of the tenant.
- model_post_init(_TenantCreate__context)[source]
Override this method to perform additional initialization after __init__ and model_construct. This is useful if you want to do some validation that requires the entire model to be initialized.
- Parameters:
_TenantCreate__context (Any)
- Return type:
None
- _abc_impl = <_abc._abc_data object>
- class weaviate.collections.classes.tenants.TenantUpdate(*, name, activity_status=TenantUpdateActivityStatus.ACTIVE, activityStatus=_TenantActivistatusServerValues.HOT)[source]
Bases:
BaseModelTenant class used to describe a tenant to create in Weaviate.
- Parameters:
name (str)
activity_status (TenantUpdateActivityStatus)
activityStatus (_TenantActivistatusServerValues)
- name
The name of the tenant.
- Type:
str
- activity_status
TenantUpdateActivityStatus, default: “HOT”
Create a new model by parsing and validating input data from keyword arguments.
Raises [ValidationError][pydantic_core.ValidationError] if the input data cannot be validated to form a valid model.
self is explicitly positional-only to allow self as a field name.
- model_config = {'populate_by_name': True, 'validate_by_alias': True, 'validate_by_name': True}
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- name: str
- activityStatusInternal: TenantUpdateActivityStatus
- activityStatus: _TenantActivistatusServerValues
- property activity_status: TenantUpdateActivityStatus
Getter for the activity status of the tenant.
- model_post_init(_TenantUpdate__context)[source]
Override this method to perform additional initialization after __init__ and model_construct. This is useful if you want to do some validation that requires the entire model to be initialized.
- Parameters:
_TenantUpdate__context (Any)
- Return type:
None
- _abc_impl = <_abc._abc_data object>
weaviate.collections.classes.types
- class weaviate.collections.classes.types._WeaviateInput[source]
Bases:
BaseModelCreate a new model by parsing and validating input data from keyword arguments.
Raises [ValidationError][pydantic_core.ValidationError] if the input data cannot be validated to form a valid model.
self is explicitly positional-only to allow self as a field name.
- model_config = {'extra': 'forbid'}
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- _abc_impl = <_abc._abc_data object>
- class weaviate.collections.classes.types.GeoCoordinate(*, latitude, longitude)[source]
Bases:
_WeaviateInputInput for the geo-coordinate datatype.
Create a new model by parsing and validating input data from keyword arguments.
Raises [ValidationError][pydantic_core.ValidationError] if the input data cannot be validated to form a valid model.
self is explicitly positional-only to allow self as a field name.
- Parameters:
latitude (Annotated[float, Ge(ge=-90), Le(le=90)])
longitude (Annotated[float, Ge(ge=-180), Le(le=180)])
- latitude: float
- longitude: float
- _abc_impl = <_abc._abc_data object>
- model_config = {'extra': 'forbid'}
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- class weaviate.collections.classes.types._PhoneNumberBase(*, number)[source]
Bases:
_WeaviateInputCreate a new model by parsing and validating input data from keyword arguments.
Raises [ValidationError][pydantic_core.ValidationError] if the input data cannot be validated to form a valid model.
self is explicitly positional-only to allow self as a field name.
- Parameters:
number (str)
- number: str
- _abc_impl = <_abc._abc_data object>
- model_config = {'extra': 'forbid'}
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- class weaviate.collections.classes.types.PhoneNumber(*, number, default_country=None)[source]
Bases:
_PhoneNumberBaseInput for the phone number datatype.
default_country should correspond to the ISO 3166-1 alpha-2 country code. This is used to figure out the correct countryCode and international format if only a national number (e.g. 0123 4567) is provided.
Create a new model by parsing and validating input data from keyword arguments.
Raises [ValidationError][pydantic_core.ValidationError] if the input data cannot be validated to form a valid model.
self is explicitly positional-only to allow self as a field name.
- Parameters:
number (str)
default_country (str | None)
- default_country: str | None
- _abc_impl = <_abc._abc_data object>
- model_config = {'extra': 'forbid'}
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- class weaviate.collections.classes.types._PhoneNumber(*, number, country_code, default_country, international_formatted, national, national_formatted, valid)[source]
Bases:
_PhoneNumberBaseOutput for the phone number datatype.
Create a new model by parsing and validating input data from keyword arguments.
Raises [ValidationError][pydantic_core.ValidationError] if the input data cannot be validated to form a valid model.
self is explicitly positional-only to allow self as a field name.
- Parameters:
number (str)
country_code (int)
default_country (str)
international_formatted (str)
national (int)
national_formatted (str)
valid (bool)
- country_code: int
- default_country: str
- international_formatted: str
- national: int
- national_formatted: str
- valid: bool
- _abc_impl = <_abc._abc_data object>
- model_config = {'extra': 'forbid'}
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- weaviate.collections.classes.types.PhoneNumberType
alias of
_PhoneNumber
- class weaviate.collections.classes.types.Properties
Properties is used wherever a single generic type is needed for properties
alias of TypeVar(‘Properties’, bound=
Mapping[str,Any], contravariant=True)
- class weaviate.collections.classes.types.TProperties
TProperties is used alongside Properties wherever there are two generic types needed
E.g., in _DataCollection, Properties is used when defining the generic of the class while TProperties is used when defining the generic to be supplied in .with_data_model to create a new instance of _DataCollection with a different Properties type.
To be clear: _DataCollection[Properties]().with_data_model(TProperties) -> _DataCollection[TProperties]()
alias of TypeVar(‘TProperties’, bound=
Mapping[str,Any])
- class weaviate.collections.classes.types.M
M is a completely general type that is used wherever generic metadata objects are defined that can be used
alias of TypeVar(‘M’)
- class weaviate.collections.classes.types.P
P is a completely general type that is used wherever generic properties objects are defined that can be used within the non-ORM and ORM APIs interchangeably
alias of TypeVar(‘P’)
- class weaviate.collections.classes.types.QP
QP is a completely general type that is used wherever generic properties objects are defined that can be used within the non-ORM and ORM APIs interchangeably
alias of TypeVar(‘QP’)
- class weaviate.collections.classes.types.R
R is a completely general type that is used wherever generic reference objects are defined that can be used within the non-ORM and ORM APIs interchangeably
alias of TypeVar(‘R’)
- class weaviate.collections.classes.types.QR
QR is a completely general type that is used wherever generic reference objects are defined that can be used within the non-ORM and ORM APIs interchangeably
alias of TypeVar(‘QR’)
- class weaviate.collections.classes.types.T
T is a completely general type that is used in any kind of generic
alias of TypeVar(‘T’)
- class weaviate.collections.classes.types.References
References is used wherever a single generic type is needed for references
alias of TypeVar(‘References’, bound=
Mapping[str,Any] |None)
- class weaviate.collections.classes.types.TReferences
TReferences is used alongside References wherever there are two generic types needed
alias of TypeVar(‘TReferences’, bound=
Mapping[str,Any] |None)
- weaviate.collections.classes.types._check_properties_generic(properties)[source]
- Parameters:
properties (Type[Properties] | None)
- Return type:
None
- weaviate.collections.classes.types._check_references_generic(references)[source]
- Parameters:
references (Type[References] | None)
- Return type:
None