weaviate.collections.classes
weaviate.collections.classes.aggregate
- class weaviate.collections.classes.aggregate.AggregateInteger(count, maximum, mean, median, minimum, mode, sum_)[source]
Bases:
object
The 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:
object
The 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:
object
The 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:
object
The 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:
object
The 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:
object
The 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:
object
The 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:
object
The 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:
object
The 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:
object
The 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:
object
The aggregation results for a collection grouped by a property.
- Parameters:
groups (List[AggregateGroup])
- groups: List[AggregateGroup]
- pydantic model weaviate.collections.classes.aggregate._MetricsBase[source]
Bases:
BaseModel
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.
- field count: bool [Required]
- field property_name: str [Required]
- _abc_impl = <_abc._abc_data object>
- pydantic model weaviate.collections.classes.aggregate._MetricsText[source]
Bases:
_MetricsBase
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.
- field min_occurrences: int | None [Required]
- field top_occurrences_count: bool [Required]
- field top_occurrences_value: bool [Required]
- _abc_impl = <_abc._abc_data object>
- pydantic model weaviate.collections.classes.aggregate._MetricsNum[source]
Bases:
_MetricsBase
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.
- field maximum: bool [Required]
- field mean: bool [Required]
- field median: bool [Required]
- field minimum: bool [Required]
- field mode: bool [Required]
- field sum_: bool [Required]
- _abc_impl = <_abc._abc_data object>
- pydantic model weaviate.collections.classes.aggregate._MetricsInteger[source]
Bases:
_MetricsNum
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.
- _abc_impl = <_abc._abc_data object>
- pydantic model weaviate.collections.classes.aggregate._MetricsNumber[source]
Bases:
_MetricsNum
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.
- _abc_impl = <_abc._abc_data object>
- pydantic model weaviate.collections.classes.aggregate._MetricsBoolean[source]
Bases:
_MetricsBase
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.
- field percentage_false: bool [Required]
- field percentage_true: bool [Required]
- field total_false: bool [Required]
- field total_true: bool [Required]
- _abc_impl = <_abc._abc_data object>
- pydantic model weaviate.collections.classes.aggregate._MetricsDate[source]
Bases:
_MetricsBase
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.
- field maximum: bool [Required]
- field median: bool [Required]
- field minimum: bool [Required]
- field mode: bool [Required]
- _abc_impl = <_abc._abc_data object>
- pydantic model weaviate.collections.classes.aggregate._MetricsReference[source]
Bases:
BaseModel
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.
- field pointing_to: bool [Required]
- field property_name: str [Required]
- _abc_impl = <_abc._abc_data object>
- pydantic model weaviate.collections.classes.aggregate.GroupByAggregate[source]
Bases:
_WeaviateInput
Define 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.
- field limit: int | None = None
- field prop: str [Required]
- _abc_impl = <_abc._abc_data object>
- class weaviate.collections.classes.aggregate.Metrics(property_)[source]
Bases:
object
Define 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=False, top_occurrences_count=False, top_occurrences_value=False, min_occurrences=None)[source]
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) – Only include entries with more occurrences than the given limit.
- 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)[source]
Bases:
object
- Parameters:
from_ (str)
to (str)
tenant (str | None)
from_uuid (str)
to_uuid (str | None)
- from_: str
- to: str
- tenant: str | None
- from_uuid: str
- to_uuid: str | None
- pydantic model weaviate.collections.classes.batch.BatchObject[source]
Bases:
BaseModel
A 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.
- field collection: str [Required]
- Constraints:
min_length = 1
- Validated by:
_validate_collection
- field index: int [Required]
- field properties: Dict[str, Any] | None = None
- field references: Mapping[str, str | UUID | Sequence[str | UUID] | ReferenceToMulti] | None = None
- field retry_count: int = 0
- field tenant: str | None = None
- field uuid: str | UUID | None = None
- field vector: Mapping[str, Sequence[int | float] | Sequence[Sequence[int | float]]] | Sequence[int | float] | None = None
- classmethod _from_internal(obj)[source]
- Parameters:
obj (_BatchObject)
- Return type:
- _abc_impl = <_abc._abc_data object>
- pydantic model weaviate.collections.classes.batch.Shard[source]
Bases:
BaseModel
Use 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.
- field collection: str [Required]
- field tenant: str | None = None
- _abc_impl = <_abc._abc_data object>
- pydantic model weaviate.collections.classes.batch.BatchReference[source]
Bases:
BaseModel
A 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.
- field from_object_collection: str [Required]
- Constraints:
min_length = 1
- Validated by:
_validate_from_object_collection
- field from_object_uuid: str | UUID [Required]
- Validated by:
_validate_uuids
- field from_property_name: str [Required]
- field tenant: str | None = None
- field to_object_collection: str | None = None
- Validated by:
_validate_to_object_collection
- field to_object_uuid: str | UUID [Required]
- Validated by:
_validate_uuids
- classmethod _from_internal(ref)[source]
- Parameters:
ref (_BatchReference)
- Return type:
- _abc_impl = <_abc._abc_data object>
- class weaviate.collections.classes.batch.ErrorObject(message, object_, original_uuid=None)[source]
Bases:
object
This 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:
object
This 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:
object
This 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
- class weaviate.collections.classes.batch.BatchReferenceReturn(elapsed_seconds=0.0, errors=<factory>, has_errors=False)[source]
Bases:
object
This 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
- class weaviate.collections.classes.batch.BatchResult[source]
Bases:
object
This 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.
- class weaviate.collections.classes.batch.DeleteManyObject(uuid, successful, error=None)[source]
Bases:
object
This 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:
object
The 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'])
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']
- vector_queue_length: int
- compressed: bool
- loaded: bool | None
- class weaviate.collections.classes.cluster.Stats(object_count, shard_count)[source]
Bases:
object
The 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
,BaseEnum
The 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
,BaseEnum
The 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
,BaseEnum
The 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).
- WORD = 'word'
- WHITESPACE = 'whitespace'
- LOWERCASE = 'lowercase'
- FIELD = 'field'
- GSE = 'gse'
- TRIGRAM = 'trigram'
- KAGOME_JA = 'kagome_ja'
- KAGOME_KR = 'kagome_kr'
- class weaviate.collections.classes.config.GenerativeSearches(*values)[source]
Bases:
str
,BaseEnum
The 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.
- 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'
- 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
,BaseEnum
The 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.
- 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'
- TRANSFORMERS = 'reranker-transformers'
- VOYAGEAI = 'reranker-voyageai'
- JINAAI = 'reranker-jinaai'
- NVIDIA = 'reranker-nvidia'
- class weaviate.collections.classes.config.StopwordsPreset(*values)[source]
Bases:
str
,BaseEnum
Preset 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
,BaseEnum
How 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.PQEncoderType(*values)[source]
Bases:
str
,BaseEnum
Type of the PQ encoder.
- KMEANS
K-means encoder.
- TILE
Tile encoder.
- KMEANS = 'kmeans'
- TILE = 'tile'
- class weaviate.collections.classes.config.PQEncoderDistribution(*values)[source]
Bases:
str
,BaseEnum
Distribution of the PQ encoder.
- LOG_NORMAL
Log-normal distribution.
- NORMAL
Normal distribution.
- LOG_NORMAL = 'log-normal'
- NORMAL = 'normal'
- class weaviate.collections.classes.config.MultiVectorAggregation(*values)[source]
Bases:
str
,BaseEnum
Aggregation type to use for multivector indices.
- MAX_SIM
Maximum similarity.
- MAX_SIM = 'maxSim'
- pydantic model weaviate.collections.classes.config._PQEncoderConfigCreate[source]
Bases:
_ConfigCreateModel
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.
- field distribution: PQEncoderDistribution | None [Required]
- field type_: PQEncoderType | None [Required]
- _abc_impl = <_abc._abc_data object>
- pydantic model weaviate.collections.classes.config._PQEncoderConfigUpdate[source]
Bases:
_ConfigUpdateModel
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.
- field distribution: PQEncoderDistribution | None [Required]
- field type_: PQEncoderType | None [Required]
- 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>
- pydantic model weaviate.collections.classes.config._PQConfigCreate[source]
Bases:
_QuantizerConfigCreate
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.
- field bitCompression: bool | None = None
- field centroids: int | None [Required]
- field encoder: _PQEncoderConfigCreate [Required]
- field segments: int | None [Required]
- field trainingLimit: int | None [Required]
- _abc_impl = <_abc._abc_data object>
- pydantic model weaviate.collections.classes.config._BQConfigCreate[source]
Bases:
_QuantizerConfigCreate
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.
- field cache: bool | None [Required]
- field rescoreLimit: int | None [Required]
- _abc_impl = <_abc._abc_data object>
- pydantic model weaviate.collections.classes.config._SQConfigCreate[source]
Bases:
_QuantizerConfigCreate
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.
- field cache: bool | None [Required]
- field rescoreLimit: int | None [Required]
- field trainingLimit: int | None [Required]
- _abc_impl = <_abc._abc_data object>
- pydantic model weaviate.collections.classes.config._PQConfigUpdate[source]
Bases:
_QuantizerConfigUpdate
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.
- field bitCompression: bool | None = None
- field centroids: int | None [Required]
- field enabled: bool | None [Required]
- field encoder: _PQEncoderConfigUpdate | None [Required]
- field segments: int | None [Required]
- field trainingLimit: int | None [Required]
- _abc_impl = <_abc._abc_data object>
- pydantic model weaviate.collections.classes.config._BQConfigUpdate[source]
Bases:
_QuantizerConfigUpdate
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.
- field enabled: bool | None [Required]
- field rescoreLimit: int | None [Required]
- _abc_impl = <_abc._abc_data object>
- pydantic model weaviate.collections.classes.config._SQConfigUpdate[source]
Bases:
_QuantizerConfigUpdate
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.
- field enabled: bool | None [Required]
- field rescoreLimit: int | None [Required]
- field trainingLimit: int | None [Required]
- _abc_impl = <_abc._abc_data object>
- pydantic model weaviate.collections.classes.config._ShardingConfigCreate[source]
Bases:
_ConfigCreateModel
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.
- field desiredCount: int | None [Required]
- field desiredVirtualCount: int | None [Required]
- field function: str = 'murmur3'
- field key: str = '_id'
- field strategy: str = 'hash'
- field virtualPerPhysical: int | None [Required]
- _abc_impl = <_abc._abc_data object>
- pydantic model weaviate.collections.classes.config._ReplicationConfigCreate[source]
Bases:
_ConfigCreateModel
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.
- field asyncEnabled: bool | None [Required]
- field deletionStrategy: ReplicationDeletionStrategy | None [Required]
- field factor: int | None [Required]
- _abc_impl = <_abc._abc_data object>
- pydantic model weaviate.collections.classes.config._ReplicationConfigUpdate[source]
Bases:
_ConfigUpdateModel
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.
- field asyncEnabled: bool | None [Required]
- field deletionStrategy: ReplicationDeletionStrategy | None [Required]
- field factor: int | None [Required]
- _abc_impl = <_abc._abc_data object>
- pydantic model weaviate.collections.classes.config._BM25ConfigCreate[source]
Bases:
_ConfigCreateModel
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.
- field b: float [Required]
- field k1: float [Required]
- _abc_impl = <_abc._abc_data object>
- pydantic model weaviate.collections.classes.config._BM25ConfigUpdate[source]
Bases:
_ConfigUpdateModel
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.
- field b: float | None [Required]
- field k1: float | None [Required]
- _abc_impl = <_abc._abc_data object>
- pydantic model weaviate.collections.classes.config._StopwordsCreate[source]
Bases:
_ConfigCreateModel
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.
- field additions: List[str] | None [Required]
- field preset: StopwordsPreset | None [Required]
- field removals: List[str] | None [Required]
- _abc_impl = <_abc._abc_data object>
- pydantic model weaviate.collections.classes.config._StopwordsUpdate[source]
Bases:
_ConfigUpdateModel
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.
- field additions: List[str] | None [Required]
- field preset: StopwordsPreset | None [Required]
- field removals: List[str] | None [Required]
- _abc_impl = <_abc._abc_data object>
- pydantic model weaviate.collections.classes.config._InvertedIndexConfigCreate[source]
Bases:
_ConfigCreateModel
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.
- field bm25: _BM25ConfigCreate | None [Required]
- field cleanupIntervalSeconds: int | None [Required]
- field indexNullState: bool | None [Required]
- field indexPropertyLength: bool | None [Required]
- field indexTimestamps: bool | None [Required]
- field stopwords: _StopwordsCreate [Required]
- _abc_impl = <_abc._abc_data object>
- pydantic model weaviate.collections.classes.config._InvertedIndexConfigUpdate[source]
Bases:
_ConfigUpdateModel
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.
- field bm25: _BM25ConfigUpdate | None [Required]
- field cleanupIntervalSeconds: int | None [Required]
- field stopwords: _StopwordsUpdate | None [Required]
- _abc_impl = <_abc._abc_data object>
- pydantic model weaviate.collections.classes.config._MultiTenancyConfigCreate[source]
Bases:
_ConfigCreateModel
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.
- field autoTenantActivation: bool | None [Required]
- field autoTenantCreation: bool | None [Required]
- field enabled: bool [Required]
- _abc_impl = <_abc._abc_data object>
- pydantic model weaviate.collections.classes.config._MultiTenancyConfigUpdate[source]
Bases:
_ConfigUpdateModel
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.
- field autoTenantActivation: bool | None [Required]
- field autoTenantCreation: bool | None [Required]
- _abc_impl = <_abc._abc_data object>
- pydantic model weaviate.collections.classes.config._GenerativeProvider[source]
Bases:
_ConfigCreateModel
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.
- field generative: GenerativeSearches | _EnumLikeStr [Required]
- _abc_impl = <_abc._abc_data object>
- pydantic model weaviate.collections.classes.config._GenerativeAnyscale[source]
Bases:
_GenerativeProvider
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.
- field baseURL: str | None [Required]
- field generative: GenerativeSearches | _EnumLikeStr = GenerativeSearches.ANYSCALE
- field model: str | None [Required]
- field temperature: float | None [Required]
- _abc_impl = <_abc._abc_data object>
- pydantic model weaviate.collections.classes.config._GenerativeCustom[source]
Bases:
_GenerativeProvider
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.
- field module_config: Dict[str, Any] | None [Required]
- _abc_impl = <_abc._abc_data object>
- pydantic model weaviate.collections.classes.config._GenerativeDatabricks[source]
Bases:
_GenerativeProvider
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.
- field endpoint: str [Required]
- field generative: GenerativeSearches | _EnumLikeStr = GenerativeSearches.DATABRICKS
- field maxTokens: int | None [Required]
- field temperature: float | None [Required]
- field topK: int | None [Required]
- field topP: float | None [Required]
- _abc_impl = <_abc._abc_data object>
- pydantic model weaviate.collections.classes.config._GenerativeMistral[source]
Bases:
_GenerativeProvider
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.
- field baseURL: str | None [Required]
- field generative: GenerativeSearches | _EnumLikeStr = GenerativeSearches.MISTRAL
- field maxTokens: int | None [Required]
- field model: str | None [Required]
- field temperature: float | None [Required]
- _abc_impl = <_abc._abc_data object>
- pydantic model weaviate.collections.classes.config._GenerativeNvidia[source]
Bases:
_GenerativeProvider
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.
- field baseURL: str | None [Required]
- field generative: GenerativeSearches | _EnumLikeStr = GenerativeSearches.NVIDIA
- field maxTokens: int | None [Required]
- field model: str | None [Required]
- field temperature: float | None [Required]
- _abc_impl = <_abc._abc_data object>
- pydantic model weaviate.collections.classes.config._GenerativeXai[source]
Bases:
_GenerativeProvider
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.
- field baseURL: str | None [Required]
- field generative: GenerativeSearches | _EnumLikeStr = GenerativeSearches.XAI
- field maxTokens: int | None [Required]
- field model: str | None [Required]
- field temperature: float | None [Required]
- _abc_impl = <_abc._abc_data object>
- pydantic model weaviate.collections.classes.config._GenerativeFriendliai[source]
Bases:
_GenerativeProvider
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.
- field baseURL: str | None [Required]
- field generative: GenerativeSearches | _EnumLikeStr = GenerativeSearches.FRIENDLIAI
- field maxTokens: int | None [Required]
- field model: str | None [Required]
- field temperature: float | None [Required]
- _abc_impl = <_abc._abc_data object>
- pydantic model weaviate.collections.classes.config._GenerativeOllama[source]
Bases:
_GenerativeProvider
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.
- field apiEndpoint: str | None [Required]
- field generative: GenerativeSearches | _EnumLikeStr = GenerativeSearches.OLLAMA
- field model: str | None [Required]
- _abc_impl = <_abc._abc_data object>
- pydantic model weaviate.collections.classes.config._GenerativeOpenAIConfigBase[source]
Bases:
_GenerativeProvider
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.
- field baseURL: Annotated[Url, UrlConstraints(max_length=None, allowed_schemes=['http', 'https'], host_required=None, default_host=None, default_port=None, default_path=None)] | None [Required]
- field frequencyPenaltyProperty: float | None [Required]
- field generative: GenerativeSearches | _EnumLikeStr = GenerativeSearches.OPENAI
- field maxTokensProperty: int | None [Required]
- field presencePenaltyProperty: float | None [Required]
- field temperatureProperty: float | None [Required]
- field topPProperty: float | None [Required]
- _abc_impl = <_abc._abc_data object>
- pydantic model weaviate.collections.classes.config._GenerativeOpenAIConfig[source]
Bases:
_GenerativeOpenAIConfigBase
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.
- field model: str | None [Required]
- _abc_impl = <_abc._abc_data object>
- pydantic model weaviate.collections.classes.config._GenerativeAzureOpenAIConfig[source]
Bases:
_GenerativeOpenAIConfigBase
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.
- field deploymentId: str [Required]
- field resourceName: str [Required]
- _abc_impl = <_abc._abc_data object>
- pydantic model weaviate.collections.classes.config._GenerativeCohereConfig[source]
Bases:
_GenerativeProvider
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.
- field baseURL: Annotated[Url, UrlConstraints(max_length=None, allowed_schemes=['http', 'https'], host_required=None, default_host=None, default_port=None, default_path=None)] | None [Required]
- field generative: GenerativeSearches | _EnumLikeStr = GenerativeSearches.COHERE
- field kProperty: int | None [Required]
- field maxTokensProperty: int | None [Required]
- field model: str | None [Required]
- field returnLikelihoodsProperty: str | None [Required]
- field stopSequencesProperty: List[str] | None [Required]
- field temperatureProperty: float | None [Required]
- _abc_impl = <_abc._abc_data object>
- pydantic model weaviate.collections.classes.config._GenerativeGoogleConfig[source]
Bases:
_GenerativeProvider
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.
- field apiEndpoint: str | None [Required]
- field generative: GenerativeSearches | _EnumLikeStr = GenerativeSearches.PALM
- field maxOutputTokens: int | None [Required]
- field modelId: str | None [Required]
- field projectId: str [Required]
- field temperature: float | None [Required]
- field topK: int | None [Required]
- field topP: float | None [Required]
- _abc_impl = <_abc._abc_data object>
- pydantic model weaviate.collections.classes.config._GenerativeAWSConfig[source]
Bases:
_GenerativeProvider
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.
- field endpoint: str | None [Required]
- field generative: GenerativeSearches | _EnumLikeStr = GenerativeSearches.AWS
- field model: str | None [Required]
- field region: str [Required]
- field service: str [Required]
- _abc_impl = <_abc._abc_data object>
- pydantic model weaviate.collections.classes.config._GenerativeAnthropicConfig[source]
Bases:
_GenerativeProvider
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.
- field generative: GenerativeSearches | _EnumLikeStr = GenerativeSearches.ANTHROPIC
- field maxTokens: int | None [Required]
- field model: str | None [Required]
- field stopSequences: List[str] | None [Required]
- field temperature: float | None [Required]
- field topK: int | None [Required]
- field topP: float | None [Required]
- _abc_impl = <_abc._abc_data object>
- pydantic model weaviate.collections.classes.config._RerankerProvider[source]
Bases:
_ConfigCreateModel
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.
- field reranker: Rerankers | _EnumLikeStr [Required]
- _abc_impl = <_abc._abc_data object>
- pydantic model weaviate.collections.classes.config._RerankerCohereConfig[source]
Bases:
_RerankerProvider
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.
- field model: Literal['rerank-english-v2.0', 'rerank-multilingual-v2.0'] | str | None = None
- field reranker: Rerankers | _EnumLikeStr = Rerankers.COHERE
- _abc_impl = <_abc._abc_data object>
- pydantic model weaviate.collections.classes.config._RerankerCustomConfig[source]
Bases:
_RerankerProvider
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.
- field module_config: Dict[str, Any] | None [Required]
- _abc_impl = <_abc._abc_data object>
- pydantic model weaviate.collections.classes.config._RerankerTransformersConfig[source]
Bases:
_RerankerProvider
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.
- field reranker: Rerankers | _EnumLikeStr = Rerankers.TRANSFORMERS
- _abc_impl = <_abc._abc_data object>
- pydantic model weaviate.collections.classes.config._RerankerJinaAIConfig[source]
Bases:
_RerankerProvider
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.
- field 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 = None
- field reranker: Rerankers | _EnumLikeStr = Rerankers.JINAAI
- _abc_impl = <_abc._abc_data object>
- pydantic model weaviate.collections.classes.config._RerankerVoyageAIConfig[source]
Bases:
_RerankerProvider
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.
- field model: Literal['rerank-2', 'rerank-2-lite', 'rerank-lite-1', 'rerank-1'] | str | None = None
- field reranker: Rerankers | _EnumLikeStr = Rerankers.VOYAGEAI
- _abc_impl = <_abc._abc_data object>
- pydantic model weaviate.collections.classes.config._RerankerNvidiaConfig[source]
Bases:
_RerankerProvider
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.
- field baseURL: Annotated[Url, UrlConstraints(max_length=None, allowed_schemes=['http', 'https'], host_required=None, default_host=None, default_port=None, default_path=None)] | None [Required]
- field model: str | None = None
- field reranker: Rerankers | _EnumLikeStr = Rerankers.NVIDIA
- _abc_impl = <_abc._abc_data object>
- class weaviate.collections.classes.config._Generative[source]
Bases:
object
Use 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)[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
- 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)[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 (Annotated[Url, UrlConstraints(max_length=None, allowed_schemes=['http', 'https'], host_required=None, default_host=None, default_port=None, default_path=None)] | None) – The base URL where the API request should go. Defaults to None, which uses the server-defined default
- 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 (Annotated[Url, UrlConstraints(max_length=None, allowed_schemes=['http', 'https'], host_required=None, default_host=None, default_port=None, default_path=None)] | 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 (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
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) – Whether to return the likelihoods. 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
base_url (Annotated[Url, UrlConstraints(max_length=None, allowed_schemes=['http', 'https'], host_required=None, default_host=None, default_port=None, default_path=None)] | None) – The base URL where the API request should go. 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]
Create a _GenerativePaLMConfig object for use when performing AI generation using the generative-palm 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:
Deprecated since version 4.9.0.
This method is deprecated and will be removed in Q2 ‘25. Please use
google()
instead.
- 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 aws(model=None, region='', endpoint=None, service='bedrock')[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”.
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 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:
object
Use 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)[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
- 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 (Annotated[Url, UrlConstraints(max_length=None, allowed_schemes=['http', 'https'], host_required=None, default_host=None, default_port=None, default_path=None)] | None) – The base URL to send the reranker requests to. Defaults to None, which uses the server-defined default.
- Return type:
- pydantic model weaviate.collections.classes.config._CollectionConfigCreateBase[source]
Bases:
_ConfigCreateModel
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.
- field description: str | None = None
- field generativeSearch: _GenerativeProvider | None = None (alias 'generative_config')
- field invertedIndexConfig: _InvertedIndexConfigCreate | None = None (alias 'inverted_index_config')
- field moduleConfig: _VectorizerConfigCreate = _VectorizerConfigCreate(vectorizer=<Vectorizers.NONE: 'none'>) (alias 'vectorizer_config')
- field multiTenancyConfig: _MultiTenancyConfigCreate | None = None (alias 'multi_tenancy_config')
- field replicationConfig: _ReplicationConfigCreate | None = None (alias 'replication_config')
- field rerankerConfig: _RerankerProvider | None = None (alias 'reranker_config')
- field shardingConfig: _ShardingConfigCreate | None = None (alias 'sharding_config')
- field vectorIndexConfig: _VectorIndexConfigCreate | None = None (alias 'vector_index_config')
- static _CollectionConfigCreateBase__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>
- pydantic model weaviate.collections.classes.config._CollectionConfigUpdate[source]
Bases:
_ConfigUpdateModel
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.
- field description: str | None = None
- field generativeConfig: _GenerativeProvider | None = None (alias 'generative_config')
- field invertedIndexConfig: _InvertedIndexConfigUpdate | None = None (alias 'inverted_index_config')
- field multiTenancyConfig: _MultiTenancyConfigUpdate | None = None (alias 'multi_tenancy_config')
- field property_descriptions: Dict[str, str] | None = None
- field replicationConfig: _ReplicationConfigUpdate | None = None (alias 'replication_config')
- field rerankerConfig: _RerankerProvider | None = None (alias 'reranker_config')
- field vectorIndexConfig: _VectorIndexConfigUpdate | None = None (alias 'vector_index_config')
- field vectorizerConfig: _VectorIndexConfigUpdate | List[_NamedVectorConfigUpdate] | None = None (alias 'vectorizer_config')
- 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
- 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._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._ReplicationConfig(factor: int, async_enabled: bool, deletion_strategy: weaviate.collections.classes.config.ReplicationDeletionStrategy)[source]
Bases:
_ConfigBase
- Parameters:
factor (int)
async_enabled (bool)
deletion_strategy (ReplicationDeletionStrategy)
- factor: int
- async_enabled: bool
- deletion_strategy: ReplicationDeletionStrategy
- 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.PQEncoderType, distribution: weaviate.collections.classes.config.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(cache: bool | None, rescore_limit: int, training_limit: int)[source]
Bases:
_ConfigBase
- Parameters:
cache (bool | None)
rescore_limit (int)
training_limit (int)
- cache: bool | None
- rescore_limit: int
- training_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 | NoneType)[source]
Bases:
_ConfigBase
- Parameters:
multi_vector (_MultiVectorConfig | 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 | 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)
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._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 | NoneType, distance_metric: weaviate.collections.classes.config_vectorizers.VectorDistances, vector_cache_max_objects: int)[source]
Bases:
_VectorIndexConfig
- Parameters:
multi_vector (_MultiVectorConfig | 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)[source]
Bases:
_ConfigBase
- Parameters:
vectorizer (_NamedVectorizerConfig)
vector_index_config (_VectorIndexConfigHNSW | _VectorIndexConfigFlat | _VectorIndexConfigDynamic)
- vectorizer: _NamedVectorizerConfig
- vector_index_config: _VectorIndexConfigHNSW | _VectorIndexConfigFlat | _VectorIndexConfigDynamic
- weaviate.collections.classes.config.NamedVectorConfig
alias of
_NamedVectorConfig
- 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, 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 | 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)
properties (List[_Property])
references (List[_ReferenceProperty])
replication_config (_ReplicationConfig)
reranker_config (_RerankerConfig | None)
sharding_config (_ShardingConfig | None)
vector_index_config (_VectorIndexConfigHNSW | _VectorIndexConfigFlat | _VectorIndexConfigDynamic | 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
- references: List[_ReferenceProperty]
- replication_config: _ReplicationConfig
- reranker_config: _RerankerConfig | None
- sharding_config: _ShardingConfig | None
- vector_index_config: _VectorIndexConfigHNSW | _VectorIndexConfigFlat | _VectorIndexConfigDynamic | 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)[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)
- 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
- 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
- pydantic model weaviate.collections.classes.config.Property[source]
Bases:
_ConfigCreateModel
This class defines the structure of a data property that a collection can have within Weaviate.
- name
The name of the property, REQUIRED.
- data_type
The data type of the property, REQUIRED.
- description
A description of the property.
- 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.
- tokenization
The tokenization method to use for the inverted index. Defaults to None.
- vectorize_property_name
Whether to vectorize the property name. Defaults to True.
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.
- field description: str | None = None
- field indexFilterable: bool | None = None (alias 'index_filterable')
- field indexRangeFilters: bool | None = None (alias 'index_range_filters')
- field indexSearchable: bool | None = None (alias 'index_searchable')
- field name: str [Required]
- Validated by:
_check_name
- field skip_vectorization: bool = False
- field tokenization: Tokenization | None = None
- field vectorize_property_name: bool = True
- _to_dict(vectorizers=None)[source]
- Parameters:
vectorizers (Sequence[Vectorizers | _EnumLikeStr] | None)
- Return type:
Dict[str, Any]
- _abc_impl = <_abc._abc_data object>
- pydantic model weaviate.collections.classes.config._ReferencePropertyBase[source]
Bases:
_ConfigCreateModel
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.
- field name: str [Required]
- Validated by:
check_name
- _abc_impl = <_abc._abc_data object>
- pydantic model weaviate.collections.classes.config._ReferencePropertyMultiTarget[source]
Bases:
_ReferencePropertyBase
This 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.
- name
The name of the property, REQUIRED.
- target_collections
The names of the target collections, REQUIRED.
- description
A description of the 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.
- field description: str | None = None
- field target_collections: List[str] [Required]
- _abc_impl = <_abc._abc_data object>
- pydantic model weaviate.collections.classes.config.ReferenceProperty[source]
Bases:
_ReferencePropertyBase
This 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.
- name
The name of the property, REQUIRED.
- target_collection
The name of the target collection, REQUIRED.
- description
A description of the 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.
- field description: str | None = None
- field name: str [Required]
- Validated by:
check_name
- field target_collection: str [Required]
- MultiTarget
alias of
_ReferencePropertyMultiTarget
- _abc_impl = <_abc._abc_data object>
- pydantic model weaviate.collections.classes.config._CollectionConfigCreate[source]
Bases:
_ConfigCreateModel
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.
- field description: str | None = None
- field generativeSearch: _GenerativeProvider | None = None (alias 'generative_config')
- field invertedIndexConfig: _InvertedIndexConfigCreate | None = None (alias 'inverted_index_config')
- field multiTenancyConfig: _MultiTenancyConfigCreate | None = None (alias 'multi_tenancy_config')
- field name: str [Required]
- field references: List[_ReferencePropertyBase] | None = None
- field replicationConfig: _ReplicationConfigCreate | None = None (alias 'replication_config')
- field rerankerConfig: _RerankerProvider | None = None (alias 'reranker_config')
- field shardingConfig: _ShardingConfigCreate | None = None (alias 'sharding_config')
- field vectorIndexConfig: _VectorIndexConfigCreate | None = None (alias 'vector_index_config')
- field vectorizerConfig: _VectorizerConfigCreate | List[_NamedVectorConfigCreate] | None = _VectorizerConfigCreate(vectorizer=<Vectorizers.NONE: 'none'>) (alias 'vectorizer_config')
- Validated by:
validate_vector_names
- 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
- _CollectionConfigCreate__add_props(props, ret_dict)
- Parameters:
props (Sequence[Property | _ReferencePropertyBase] | List[_ReferencePropertyBase] | None)
ret_dict (Dict[str, Any])
- Return type:
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
- _abc_impl = <_abc._abc_data object>
- class weaviate.collections.classes.config._VectorIndexMultivectorEncoding[source]
Bases:
object
- class weaviate.collections.classes.config._VectorIndexMultiVector[source]
Bases:
object
- Encoding
alias of
_VectorIndexMultivectorEncoding
- static multi_vector(encoding=None, aggregation=None)[source]
- Parameters:
encoding (_EncodingConfigCreate | None)
aggregation (MultiVectorAggregation | None)
- Return type:
- class weaviate.collections.classes.config._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=None, rescore_limit=None, training_limit=None)[source]
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:
- class weaviate.collections.classes.config._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=None, distance_metric=None, dynamic_ef_factor=None, dynamic_ef_max=None, dynamic_ef_min=None, ef=None, ef_construction=None, filter_strategy=None, flat_search_cutoff=None, max_connections=None, vector_cache_max_objects=None, quantizer=None, multi_vector=None)[source]
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 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 (_BQConfigCreate | 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:
- class weaviate.collections.classes.config.Configure[source]
Bases:
object
Use 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
- 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)[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.
- 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:
- 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 | 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 | 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:
- class weaviate.collections.classes.config.Reconfigure[source]
Bases:
object
Use 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
- VectorIndex
alias of
_VectorIndexUpdate
- Generative
alias of
_Generative
- 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)[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.
- 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
- pydantic model weaviate.collections.classes.config_base._ConfigCreateModel[source]
Bases:
BaseModel
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.
- _abc_impl = <_abc._abc_data object>
- pydantic model weaviate.collections.classes.config_base._ConfigUpdateModel[source]
Bases:
BaseModel
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.
- merge_with_existing(schema)[source]
- Parameters:
schema (Dict[str, Any])
- Return type:
Dict[str, Any]
- _abc_impl = <_abc._abc_data object>
- pydantic model weaviate.collections.classes.config_base._QuantizerConfigCreate[source]
Bases:
_ConfigCreateModel
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.
- field enabled: bool = True
- _abc_impl = <_abc._abc_data object>
- pydantic model weaviate.collections.classes.config_base._QuantizerConfigUpdate[source]
Bases:
_ConfigUpdateModel
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.
- _abc_impl = <_abc._abc_data object>
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_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 | 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._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
- pydantic model weaviate.collections.classes.config_named_vectors._NamedVectorizerConfigCreate[source]
Bases:
_ConfigCreateModel
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.
- field properties: List[str] | None = None (alias 'source_properties')
- Constraints:
min_length = 1
- field vectorizer: Vectorizers [Required]
- static _to_vectorizer_dict(vectorizer, values)[source]
- Parameters:
vectorizer (Vectorizers)
values (Dict[str, Any])
- Return type:
Dict[str, Any]
- _abc_impl = <_abc._abc_data object>
- pydantic model weaviate.collections.classes.config_named_vectors._NamedVectorConfigCreate[source]
Bases:
_ConfigCreateModel
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.
- field name: str [Required]
- field properties: List[str] | None = None (alias 'source_properties')
- Constraints:
min_length = 1
- field vectorIndexConfig: _VectorIndexConfigCreate | None = None (alias 'vector_index_config')
- field vectorIndexType: VectorIndexType = VectorIndexType.HNSW
- field vectorizer: _VectorizerConfigCreate [Required]
- _NamedVectorConfigCreate__parse_vectorizer()
- Return type:
Dict[str, Any]
- _abc_impl = <_abc._abc_data object>
- pydantic model weaviate.collections.classes.config_named_vectors._NamedVectorConfigUpdate[source]
Bases:
_ConfigUpdateModel
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.
- field name: str [Required]
- field vectorIndexConfig: _VectorIndexConfigUpdate [Required] (alias 'vector_index_config')
- _abc_impl = <_abc._abc_data object>
- 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 (Annotated[Url, UrlConstraints(max_length=None, allowed_schemes=['http', 'https'], host_required=None, default_host=None, default_port=None, default_path=None)] | 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 (Annotated[Url, UrlConstraints(max_length=None, allowed_schemes=['http', 'https'], host_required=None, default_host=None, default_port=None, default_path=None)] | 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 (Annotated[Url, UrlConstraints(max_length=None, allowed_schemes=['http', 'https'], host_required=None, default_host=None, default_port=None, default_path=None)] | 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 (Annotated[Url, UrlConstraints(max_length=None, allowed_schemes=['http', 'https'], host_required=None, default_host=None, default_port=None, default_path=None)] | 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]
Create a named vector using the multi2vec_palm 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.
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:
Deprecated since version 4.9.0.
This method is deprecated and will be removed in Q2 ‘25. Please use
multi2vec_google()
instead.
- static multi2vec_google(name, *, location, project_id, 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.
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'] | 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 (Annotated[Url, UrlConstraints(max_length=None, allowed_schemes=['http', 'https'], host_required=None, default_host=None, default_port=None, default_path=None)] | 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 (Annotated[Url, UrlConstraints(max_length=None, allowed_schemes=['http', 'https'], host_required=None, default_host=None, default_port=None, default_path=None)] | 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 (Annotated[Url, UrlConstraints(max_length=None, allowed_schemes=['http', 'https'], host_required=None, default_host=None, default_port=None, default_path=None)] | 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 (Annotated[Url, UrlConstraints(max_length=None, allowed_schemes=['http', 'https'], host_required=None, default_host=None, default_port=None, default_path=None)] | 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]
Create a named vector using the text2vec_palm 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.
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:
Deprecated since version 4.9.0.
This method is deprecated and will be removed in Q2 ‘25. Please use
text2vec_google()
instead.
- 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, *, 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.
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'] | 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'] | str | None) – The model to use. Defaults to None, which uses the server-defined default.
base_url (Annotated[Url, UrlConstraints(max_length=None, allowed_schemes=['http', 'https'], host_required=None, default_host=None, default_port=None, default_path=None)] | 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-3.5', 'voyage-3.5-lite', 'voyage-3', 'voyage-3-lite', '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:
- 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 | _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
,Enum
Set 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
,Enum
The available vector index types in Weaviate.
- HNSW
Hierarchical Navigable Small World (HNSW) index.
- FLAT
Flat index.
- HNSW = 'hnsw'
- FLAT = 'flat'
- DYNAMIC = 'dynamic'
- pydantic model weaviate.collections.classes.config_vector_index._MultiVectorConfigCreateBase[source]
Bases:
_ConfigCreateModel
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.
- field enabled: bool = True
- _abc_impl = <_abc._abc_data object>
- pydantic model weaviate.collections.classes.config_vector_index._EncodingConfigCreate[source]
Bases:
_MultiVectorConfigCreateBase
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.
- field enabled: bool = True
- _abc_impl = <_abc._abc_data object>
- pydantic model weaviate.collections.classes.config_vector_index._MuveraConfigCreate[source]
Bases:
_EncodingConfigCreate
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.
- field dprojections: int | None [Required]
- field ksim: int | None [Required]
- field repetitions: int | None [Required]
- _abc_impl = <_abc._abc_data object>
- pydantic model weaviate.collections.classes.config_vector_index._MultiVectorConfigCreate[source]
Bases:
_MultiVectorConfigCreateBase
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.
- field aggregation: str | None [Required]
- field encoding: _EncodingConfigCreate | None [Required]
- _abc_impl = <_abc._abc_data object>
- pydantic model weaviate.collections.classes.config_vector_index._VectorIndexConfigCreate[source]
Bases:
_ConfigCreateModel
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.
- field distance: VectorDistances | None [Required]
- field multivector: _MultiVectorConfigCreate | None [Required]
- field quantizer: _QuantizerConfigCreate | None [Required]
- _abc_impl = <_abc._abc_data object>
- pydantic model weaviate.collections.classes.config_vector_index._VectorIndexConfigUpdate[source]
Bases:
_ConfigUpdateModel
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.
- field quantizer: _QuantizerConfigUpdate | None [Required]
- _abc_impl = <_abc._abc_data object>
- pydantic model weaviate.collections.classes.config_vector_index._VectorIndexConfigSkipCreate[source]
Bases:
_VectorIndexConfigCreate
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.
- field skip: bool = True
- _abc_impl = <_abc._abc_data object>
- pydantic model weaviate.collections.classes.config_vector_index._VectorIndexConfigHNSWCreate[source]
Bases:
_VectorIndexConfigCreate
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.
- field cleanupIntervalSeconds: int | None [Required]
- field dynamicEfFactor: int | None [Required]
- field dynamicEfMax: int | None [Required]
- field dynamicEfMin: int | None [Required]
- field ef: int | None [Required]
- field efConstruction: int | None [Required]
- field filterStrategy: VectorFilterStrategy | None [Required]
- field flatSearchCutoff: int | None [Required]
- field maxConnections: int | None [Required]
- field vectorCacheMaxObjects: int | None [Required]
- _abc_impl = <_abc._abc_data object>
- pydantic model weaviate.collections.classes.config_vector_index._VectorIndexConfigFlatCreate[source]
Bases:
_VectorIndexConfigCreate
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.
- field vectorCacheMaxObjects: int | None [Required]
- _abc_impl = <_abc._abc_data object>
- pydantic model weaviate.collections.classes.config_vector_index._VectorIndexConfigHNSWUpdate[source]
Bases:
_VectorIndexConfigUpdate
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.
- field dynamicEfFactor: int | None [Required]
- field dynamicEfMax: int | None [Required]
- field dynamicEfMin: int | None [Required]
- field ef: int | None [Required]
- field filterStrategy: VectorFilterStrategy | None [Required]
- field flatSearchCutoff: int | None [Required]
- field vectorCacheMaxObjects: int | None [Required]
- _abc_impl = <_abc._abc_data object>
- pydantic model weaviate.collections.classes.config_vector_index._VectorIndexConfigFlatUpdate[source]
Bases:
_VectorIndexConfigUpdate
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.
- field vectorCacheMaxObjects: int | None [Required]
- _abc_impl = <_abc._abc_data object>
- pydantic model weaviate.collections.classes.config_vector_index._VectorIndexConfigDynamicCreate[source]
Bases:
_VectorIndexConfigCreate
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.
- field flat: _VectorIndexConfigFlatCreate | None [Required]
- field hnsw: _VectorIndexConfigHNSWCreate | None [Required]
- field threshold: int | None [Required]
- _abc_impl = <_abc._abc_data object>
- pydantic model weaviate.collections.classes.config_vector_index._VectorIndexConfigDynamicUpdate[source]
Bases:
_VectorIndexConfigUpdate
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.
- field flat: _VectorIndexConfigFlatUpdate | None [Required]
- field hnsw: _VectorIndexConfigHNSWUpdate | None [Required]
- field threshold: int | None [Required]
- _abc_impl = <_abc._abc_data object>
weaviate.collections.classes.config_vectorizers
- class weaviate.collections.classes.config_vectorizers.Vectorizers(*values)[source]
Bases:
str
,Enum
The 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_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_CLIP = 'multi2vec-clip'
- MULTI2VEC_COHERE = 'multi2vec-cohere'
- MULTI2VEC_JINAAI = 'multi2vec-jinaai'
- 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
,Enum
Vector 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'
- pydantic model weaviate.collections.classes.config_vectorizers._VectorizerConfigCreate[source]
Bases:
_ConfigCreateModel
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.
- field vectorizer: Vectorizers | _EnumLikeStr [Required]
- _abc_impl = <_abc._abc_data object>
- pydantic model weaviate.collections.classes.config_vectorizers._Text2ColbertJinaAIConfig[source]
Bases:
_VectorizerConfigCreate
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.
- field dimensions: int | None [Required]
- field model: str | None [Required]
- field vectorizeClassName: bool [Required]
- field vectorizer: Vectorizers | _EnumLikeStr = Vectorizers.TEXT2COLBERT_JINAAI
- _abc_impl = <_abc._abc_data object>
- pydantic model weaviate.collections.classes.config_vectorizers._Text2VecContextionaryConfig[source]
Bases:
_VectorizerConfigCreate
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.
- field vectorizeClassName: bool [Required]
- field vectorizer: Vectorizers | _EnumLikeStr = Vectorizers.TEXT2VEC_CONTEXTIONARY
- _abc_impl = <_abc._abc_data object>
- pydantic model weaviate.collections.classes.config_vectorizers._VectorizerCustomConfig[source]
Bases:
_VectorizerConfigCreate
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.
- field module_config: Dict[str, Any] | None [Required]
- _abc_impl = <_abc._abc_data object>
- pydantic model weaviate.collections.classes.config_vectorizers._Text2VecAWSConfig[source]
Bases:
_VectorizerConfigCreate
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.
- field endpoint: str | None [Required]
- field model: str | None [Required]
- field region: str [Required]
- Validated by:
_check_name
- field service: str [Required]
- field vectorizeClassName: bool [Required]
- field vectorizer: Vectorizers | _EnumLikeStr = Vectorizers.TEXT2VEC_AWS
- _abc_impl = <_abc._abc_data object>
- pydantic model weaviate.collections.classes.config_vectorizers._Text2VecAzureOpenAIConfig[source]
Bases:
_VectorizerConfigCreate
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.
- field baseURL: Annotated[Url, UrlConstraints(max_length=None, allowed_schemes=['http', 'https'], host_required=None, default_host=None, default_port=None, default_path=None)] | None [Required]
- field deploymentId: str [Required]
- field dimensions: int | None [Required]
- field model: str | None [Required]
- field resourceName: str [Required]
- field vectorizeClassName: bool [Required]
- field vectorizer: Vectorizers | _EnumLikeStr = Vectorizers.TEXT2VEC_OPENAI
- _abc_impl = <_abc._abc_data object>
- pydantic model weaviate.collections.classes.config_vectorizers._Text2VecHuggingFaceConfig[source]
Bases:
_VectorizerConfigCreate
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.
- field endpointURL: Annotated[Url, UrlConstraints(max_length=None, allowed_schemes=['http', 'https'], host_required=None, default_host=None, default_port=None, default_path=None)] | None [Required]
- field model: str | None [Required]
- field passageModel: str | None [Required]
- field queryModel: str | None [Required]
- field useCache: bool | None [Required]
- field useGPU: bool | None [Required]
- field vectorizeClassName: bool [Required]
- field vectorizer: Vectorizers | _EnumLikeStr = Vectorizers.TEXT2VEC_HUGGINGFACE
- field waitForModel: bool | None [Required]
- _abc_impl = <_abc._abc_data object>
- pydantic model weaviate.collections.classes.config_vectorizers._Text2VecMistralConfig[source]
Bases:
_VectorizerConfigCreate
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.
- field baseURL: Annotated[Url, UrlConstraints(max_length=None, allowed_schemes=['http', 'https'], host_required=None, default_host=None, default_port=None, default_path=None)] | None [Required]
- field model: str | None [Required]
- field vectorizeClassName: bool [Required]
- field vectorizer: Vectorizers | _EnumLikeStr = Vectorizers.TEXT2VEC_MISTRAL
- _abc_impl = <_abc._abc_data object>
- pydantic model weaviate.collections.classes.config_vectorizers._Text2VecDatabricksConfig[source]
Bases:
_VectorizerConfigCreate
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.
- field endpoint: str [Required]
- field instruction: str | None [Required]
- field vectorizeClassName: bool [Required]
- field vectorizer: Vectorizers | _EnumLikeStr = Vectorizers.TEXT2VEC_DATABRICKS
- _abc_impl = <_abc._abc_data object>
- pydantic model weaviate.collections.classes.config_vectorizers._Text2VecOpenAIConfig[source]
Bases:
_VectorizerConfigCreate
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.
- field baseURL: Annotated[Url, UrlConstraints(max_length=None, allowed_schemes=['http', 'https'], host_required=None, default_host=None, default_port=None, default_path=None)] | None [Required]
- field dimensions: int | None [Required]
- field model: str | None [Required]
- field modelVersion: str | None [Required]
- field type_: Literal['text', 'code'] | None [Required]
- field vectorizeClassName: bool [Required]
- field vectorizer: Vectorizers | _EnumLikeStr = Vectorizers.TEXT2VEC_OPENAI
- _abc_impl = <_abc._abc_data object>
- pydantic model weaviate.collections.classes.config_vectorizers._Text2VecCohereConfig[source]
Bases:
_VectorizerConfigCreate
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.
- field baseURL: Annotated[Url, UrlConstraints(max_length=None, allowed_schemes=['http', 'https'], host_required=None, default_host=None, default_port=None, default_path=None)] | None [Required]
- field model: str | None [Required]
- field truncate: Literal['NONE', 'START', 'END', 'LEFT', 'RIGHT'] | None [Required]
- field vectorizeClassName: bool [Required]
- field vectorizer: Vectorizers | _EnumLikeStr = Vectorizers.TEXT2VEC_COHERE
- _abc_impl = <_abc._abc_data object>
- pydantic model weaviate.collections.classes.config_vectorizers._Text2VecGoogleConfig[source]
Bases:
_VectorizerConfigCreate
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.
- field apiEndpoint: str | None [Required]
- field modelId: str | None [Required]
- field projectId: str | None [Required]
- field titleProperty: str | None [Required]
- field vectorizeClassName: bool [Required]
- field vectorizer: Vectorizers | _EnumLikeStr = Vectorizers.TEXT2VEC_PALM
- _abc_impl = <_abc._abc_data object>
- pydantic model weaviate.collections.classes.config_vectorizers._Text2VecTransformersConfig[source]
Bases:
_VectorizerConfigCreate
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.
- field inferenceUrl: str | None [Required]
- field passageInferenceUrl: str | None [Required]
- field poolingStrategy: Literal['masked_mean', 'cls'] [Required]
- field queryInferenceUrl: str | None [Required]
- field vectorizeClassName: bool [Required]
- field vectorizer: Vectorizers | _EnumLikeStr = Vectorizers.TEXT2VEC_TRANSFORMERS
- _abc_impl = <_abc._abc_data object>
- pydantic model weaviate.collections.classes.config_vectorizers._Text2VecGPT4AllConfig[source]
Bases:
_VectorizerConfigCreate
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.
- field vectorizeClassName: bool [Required]
- field vectorizer: Vectorizers | _EnumLikeStr = Vectorizers.TEXT2VEC_GPT4ALL
- _abc_impl = <_abc._abc_data object>
- pydantic model weaviate.collections.classes.config_vectorizers._Text2VecJinaConfig[source]
Bases:
_VectorizerConfigCreate
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.
- field baseURL: str | None [Required]
- field dimensions: int | None [Required]
- field model: str | None [Required]
- field vectorizeClassName: bool [Required]
- field vectorizer: Vectorizers | _EnumLikeStr = Vectorizers.TEXT2VEC_JINAAI
- _abc_impl = <_abc._abc_data object>
- pydantic model weaviate.collections.classes.config_vectorizers._Text2VecVoyageConfig[source]
Bases:
_VectorizerConfigCreate
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.
- field baseURL: str | None [Required]
- field model: str | None [Required]
- field truncate: bool | None [Required]
- field vectorizeClassName: bool [Required]
- field vectorizer: Vectorizers | _EnumLikeStr = Vectorizers.TEXT2VEC_VOYAGEAI
- _abc_impl = <_abc._abc_data object>
- pydantic model weaviate.collections.classes.config_vectorizers._Text2VecNvidiaConfig[source]
Bases:
_VectorizerConfigCreate
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.
- field baseURL: str | None [Required]
- field model: str | None [Required]
- field truncate: bool | None [Required]
- field vectorizeClassName: bool [Required]
- field vectorizer: Vectorizers | _EnumLikeStr = Vectorizers.TEXT2VEC_NVIDIA
- _abc_impl = <_abc._abc_data object>
- pydantic model weaviate.collections.classes.config_vectorizers._Text2VecWeaviateConfig[source]
Bases:
_VectorizerConfigCreate
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.
- field baseURL: str | None [Required]
- field dimensions: int | None [Required]
- field model: str | None [Required]
- field vectorizeClassName: bool [Required]
- field vectorizer: Vectorizers | _EnumLikeStr = Vectorizers.TEXT2VEC_WEAVIATE
- _abc_impl = <_abc._abc_data object>
- pydantic model weaviate.collections.classes.config_vectorizers._Text2VecOllamaConfig[source]
Bases:
_VectorizerConfigCreate
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.
- field apiEndpoint: str | None [Required]
- field model: str | None [Required]
- field vectorizeClassName: bool [Required]
- field vectorizer: Vectorizers | _EnumLikeStr = Vectorizers.TEXT2VEC_OLLAMA
- _abc_impl = <_abc._abc_data object>
- pydantic model weaviate.collections.classes.config_vectorizers._Img2VecNeuralConfig[source]
Bases:
_VectorizerConfigCreate
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.
- field imageFields: List[str] [Required]
- field vectorizer: Vectorizers | _EnumLikeStr = Vectorizers.IMG2VEC_NEURAL
- _abc_impl = <_abc._abc_data object>
- pydantic model weaviate.collections.classes.config_vectorizers.Multi2VecField[source]
Bases:
BaseModel
Use 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.
- field name: str [Required]
- field weight: float | None = None
- _abc_impl = <_abc._abc_data object>
- pydantic model weaviate.collections.classes.config_vectorizers._Multi2VecBase[source]
Bases:
_VectorizerConfigCreate
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.
- field imageFields: List[Multi2VecField] | None [Required]
- field textFields: List[Multi2VecField] | None [Required]
- field vectorizeClassName: bool [Required]
- _abc_impl = <_abc._abc_data object>
- pydantic model weaviate.collections.classes.config_vectorizers._Multi2VecCohereConfig[source]
Bases:
_Multi2VecBase
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.
- field baseURL: Annotated[Url, UrlConstraints(max_length=None, allowed_schemes=['http', 'https'], host_required=None, default_host=None, default_port=None, default_path=None)] | None [Required]
- field model: str | None [Required]
- field truncate: Literal['NONE', 'START', 'END', 'LEFT', 'RIGHT'] | None [Required]
- field vectorizer: Vectorizers | _EnumLikeStr = Vectorizers.MULTI2VEC_COHERE
- _abc_impl = <_abc._abc_data object>
- pydantic model weaviate.collections.classes.config_vectorizers._Multi2VecJinaConfig[source]
Bases:
_Multi2VecBase
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.
- field baseURL: Annotated[Url, UrlConstraints(max_length=None, allowed_schemes=['http', 'https'], host_required=None, default_host=None, default_port=None, default_path=None)] | None [Required]
- field dimensions: int | None [Required]
- field model: str | None [Required]
- field vectorizer: Vectorizers | _EnumLikeStr = Vectorizers.MULTI2VEC_JINAAI
- _abc_impl = <_abc._abc_data object>
- pydantic model weaviate.collections.classes.config_vectorizers._Multi2VecClipConfig[source]
Bases:
_Multi2VecBase
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.
- field inferenceUrl: str | None [Required]
- field vectorizer: Vectorizers | _EnumLikeStr = Vectorizers.MULTI2VEC_CLIP
- _abc_impl = <_abc._abc_data object>
- pydantic model weaviate.collections.classes.config_vectorizers._Multi2VecGoogleConfig[source]
Bases:
_Multi2VecBase
,_VectorizerConfigCreate
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.
- field dimensions: int | None [Required]
- field location: str | None [Required]
- field modelId: str | None [Required]
- field projectId: str [Required]
- field vectorizeClassName: bool [Required]
- field vectorizer: Vectorizers | _EnumLikeStr = Vectorizers.MULTI2VEC_PALM
- field videoFields: List[Multi2VecField] | None [Required]
- field videoIntervalSeconds: int | None [Required]
- _abc_impl = <_abc._abc_data object>
- pydantic model weaviate.collections.classes.config_vectorizers._Multi2VecBindConfig[source]
Bases:
_Multi2VecBase
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.
- field IMUFields: List[Multi2VecField] | None [Required]
- field audioFields: List[Multi2VecField] | None [Required]
- field depthFields: List[Multi2VecField] | None [Required]
- field thermalFields: List[Multi2VecField] | None [Required]
- field vectorizer: Vectorizers | _EnumLikeStr = Vectorizers.MULTI2VEC_BIND
- field videoFields: List[Multi2VecField] | None [Required]
- _abc_impl = <_abc._abc_data object>
- pydantic model weaviate.collections.classes.config_vectorizers._Multi2VecVoyageaiConfig[source]
Bases:
_Multi2VecBase
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.
- field baseURL: Annotated[Url, UrlConstraints(max_length=None, allowed_schemes=['http', 'https'], host_required=None, default_host=None, default_port=None, default_path=None)] | None [Required]
- field model: str | None [Required]
- field output_encoding: str | None [Required]
- field truncation: bool | None [Required]
- field vectorizer: Vectorizers | _EnumLikeStr = Vectorizers.MULTI2VEC_VOYAGEAI
- _abc_impl = <_abc._abc_data object>
- pydantic model weaviate.collections.classes.config_vectorizers._Multi2VecNvidiaConfig[source]
Bases:
_Multi2VecBase
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.
- field baseURL: Annotated[Url, UrlConstraints(max_length=None, allowed_schemes=['http', 'https'], host_required=None, default_host=None, default_port=None, default_path=None)] | None [Required]
- field model: str | None [Required]
- field output_encoding: str | None [Required]
- field truncation: bool | None [Required]
- field vectorizer: Vectorizers | _EnumLikeStr = Vectorizers.MULTI2VEC_NVIDIA
- _abc_impl = <_abc._abc_data object>
- pydantic model weaviate.collections.classes.config_vectorizers._Ref2VecCentroidConfig[source]
Bases:
_VectorizerConfigCreate
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.
- field method: Literal['mean'] [Required]
- field referenceProperties: List[str] [Required]
- field vectorizer: Vectorizers | _EnumLikeStr = Vectorizers.REF2VEC_CENTROID
- _abc_impl = <_abc._abc_data object>
- 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:
object
Use 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 (Annotated[Url, UrlConstraints(max_length=None, allowed_schemes=['http', 'https'], host_required=None, default_host=None, default_port=None, default_path=None)] | 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 (Annotated[Url, UrlConstraints(max_length=None, allowed_schemes=['http', 'https'], host_required=None, default_host=None, default_port=None, default_path=None)] | 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 (Annotated[Url, UrlConstraints(max_length=None, allowed_schemes=['http', 'https'], host_required=None, default_host=None, default_port=None, default_path=None)] | 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 _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 – The truncation strategy to use. Defaults to None, which uses the server-defined default.
output_encoding (str | None) – Format in which the embeddings are encoded. Defaults to None, so the embeddings are represented as a list of floating-point numbers.
vectorize_collection_name (bool) – Whether to vectorize the collection name. Defaults to True.
base_url (Annotated[Url, UrlConstraints(max_length=None, allowed_schemes=['http', 'https'], host_required=None, default_host=None, default_port=None, default_path=None)] | 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 CohereMultimodalModel type or if truncate is not a valid value from the CohereTruncation type.
- Return type:
- static multi2vec_nvidia(*, model=None, truncation=None, output_encoding, 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) – Format in which the embeddings are encoded. Defaults to None, so the embeddings are represented as a list of floating-point numbers.
vectorize_collection_name (bool) – Whether to vectorize the collection name. Defaults to True.
base_url (Annotated[Url, UrlConstraints(max_length=None, allowed_schemes=['http', 'https'], host_required=None, default_host=None, default_port=None, default_path=None)] | 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 (Annotated[Url, UrlConstraints(max_length=None, allowed_schemes=['http', 'https'], host_required=None, default_host=None, default_port=None, default_path=None)] | 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 (Annotated[Url, UrlConstraints(max_length=None, allowed_schemes=['http', 'https'], host_required=None, default_host=None, default_port=None, default_path=None)] | 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 (Annotated[Url, UrlConstraints(max_length=None, allowed_schemes=['http', 'https'], host_required=None, default_host=None, default_port=None, default_path=None)] | 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]
Create a _Text2VecGoogleConfig object for use when vectorizing using the text2vec-palm 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.
- Raises:
pydantic.ValidationError – If api_endpoint is not a valid URL.
- Return type:
Deprecated since version 4.9.0.
This method is deprecated and will be removed in Q2 ‘25. Please use
text2vec_google()
instead.
- 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.
- 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]
Create a _Multi2VecPalmConfig object for use when vectorizing using the text2vec-palm 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.
dimensions (int | None) – The number of dimensions to use. 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.
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:
Deprecated since version 4.9.0.
This method is deprecated and will be removed in Q2 ‘25. Please use
multi2vec_google()
instead.
- static multi2vec_google(*, 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]
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.
dimensions (int | None) – The number of dimensions to use. 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.
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', 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.
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'] | 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'] | 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 (Annotated[Url, UrlConstraints(max_length=None, allowed_schemes=['http', 'https'], host_required=None, default_host=None, default_port=None, default_path=None)] | 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-3.5', 'voyage-3.5-lite', 'voyage-3', 'voyage-3-lite', '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:
weaviate.collections.classes.data
- class weaviate.collections.classes.data.Error(message, code=None, original_uuid=None)[source]
Bases:
object
This 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:
object
This 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:
_DataReference
This 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:
_DataReference
This 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'
- WITHIN_GEO_RANGE = 'WithinGeoRange'
- AND = 'And'
- OR = 'Or'
- 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])
- pydantic model weaviate.collections.classes.filters._GeoCoordinateFilter[source]
Bases:
GeoCoordinate
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.
- field distance: float [Required]
- _abc_impl = <_abc._abc_data object>
- pydantic model weaviate.collections.classes.filters._SingleTargetRef[source]
Bases:
_WeaviateInput
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.
- field link_on: str [Required]
- field target: _FilterTargets | None = None
- _abc_impl = <_abc._abc_data object>
- pydantic model weaviate.collections.classes.filters._MultiTargetRef[source]
Bases:
_WeaviateInput
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.
- field link_on: str [Required]
- field target: _FilterTargets | None = None
- field target_collection: str [Required]
- _abc_impl = <_abc._abc_data object>
- pydantic model weaviate.collections.classes.filters._CountRef[source]
Bases:
_WeaviateInput
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.
- field link_on: str [Required]
- _abc_impl = <_abc._abc_data object>
- pydantic model weaviate.collections.classes.filters._FilterValue[source]
Bases:
_Filters
,_WeaviateInput
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.
- field target: _SingleTargetRef | _MultiTargetRef | _CountRef | str [Required]
- field value: int | float | str | bool | datetime | UUID | _GeoCoordinateFilter | None | Sequence[str] | Sequence[bool] | Sequence[int] | Sequence[float] | Sequence[datetime] | Sequence[str | UUID] [Required]
- _abc_impl = <_abc._abc_data object>
- 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:
- 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.
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:
- 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 ID.
- 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:
object
This 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
,BaseEnum
Define 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:
object
Define 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
- pydantic model weaviate.collections.classes.grpc.MetadataQuery[source]
Bases:
_WeaviateInput
Define 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.
- field certainty: bool = False
- field creation_time: bool = False
- field distance: bool = False
- field explain_score: bool = False
- field is_consistent: bool = False
- field last_update_time: bool = False
- field score: bool = False
- _abc_impl = <_abc._abc_data object>
- 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:
- pydantic model weaviate.collections.classes.grpc.Generate[source]
Bases:
_WeaviateInput
Define 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.
- field grouped_properties: List[str] | None = None
- field grouped_task: str | None = None
- field single_prompt: str | None = None
- _abc_impl = <_abc._abc_data object>
- pydantic model weaviate.collections.classes.grpc.GroupBy[source]
Bases:
_WeaviateInput
Define 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.
- field number_of_groups: int [Required]
- field objects_per_group: int [Required]
- field prop: str [Required]
- _abc_impl = <_abc._abc_data object>
- pydantic model weaviate.collections.classes.grpc._Sort[source]
Bases:
_WeaviateInput
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.
- field ascending: bool = True
- field prop: str [Required]
- _abc_impl = <_abc._abc_data object>
- 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:
object
Define 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:
- pydantic model weaviate.collections.classes.grpc.Rerank[source]
Bases:
_WeaviateInput
Define 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.
- field prop: str [Required]
- field query: str | None = None
- _abc_impl = <_abc._abc_data object>
- class weaviate.collections.classes.grpc.BM25OperatorOptions[source]
Bases:
object
- operator: ClassVar[Any]
- class weaviate.collections.classes.grpc.BM25OperatorOr(minimum_should_match)[source]
Bases:
BM25OperatorOptions
Define 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:
BM25OperatorOptions
Define the ‘And’ operator for keyword queries.
- operator: ClassVar[Any] = 2
- class weaviate.collections.classes.grpc.BM25OperatorFactory[source]
Bases:
object
Define 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 text2vec-jinaai
alias of
Sequence
[int
|float
]
- weaviate.collections.classes.grpc.TwoDimensionalVectorType
Represents a two-dimensional vector, e.g. one produced by `text2colbert-jinaai
alias of
Sequence
[Sequence
[int
|float
]]
- pydantic model weaviate.collections.classes.grpc._ListOfVectorsQuery[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.
- field dimensionality: Literal['1D', '2D'] [Required]
- field vectors: Sequence[V] [Required]
- 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>
- 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:
object
Factory class to use when defining near vector queries with multiple vectors in near_vector() and hybrid() methods.
- pydantic model weaviate.collections.classes.grpc._HybridNearBase[source]
Bases:
_WeaviateInput
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.
- field certainty: float | None = None
- field distance: float | None = None
- _abc_impl = <_abc._abc_data object>
- pydantic model weaviate.collections.classes.grpc._HybridNearText[source]
Bases:
_HybridNearBase
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.
- field text: str | List[str] [Required]
- _abc_impl = <_abc._abc_data object>
- 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:
BaseEnum
Define 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:
object
Define 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:
object
Use 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:
- pydantic model weaviate.collections.classes.grpc._QueryReference[source]
Bases:
_WeaviateInput
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.
- field include_vector: bool | str | List[str] = False
- field link_on: str [Required]
- field return_metadata: MetadataQuery | None = None
- field return_properties: PROPERTIES | bool | None = None
- field return_references: REFERENCES | None = None
- _abc_impl = <_abc._abc_data object>
- property _return_metadata: _MetadataQuery
- pydantic model weaviate.collections.classes.grpc._QueryReferenceMultiTarget[source]
Bases:
_QueryReference
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.
- field target_collection: str [Required]
- _abc_impl = <_abc._abc_data object>
- pydantic model weaviate.collections.classes.grpc.QueryReference[source]
Bases:
_QueryReference
Define 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.
- field include_vector: INCLUDE_VECTOR = False
- field link_on: str [Required]
- field return_metadata: MetadataQuery | None = None
- field return_properties: 'PROPERTIES' | bool | None = None
- field return_references: 'REFERENCES' | None = 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>
- pydantic model weaviate.collections.classes.grpc.QueryNested[source]
Bases:
_WeaviateInput
Define 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.
- field name: str [Required]
- field properties: PROPERTIES [Required]
- _abc_impl = <_abc._abc_data object>
- pydantic model weaviate.collections.classes.grpc._ListOfVectorsQuery[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.
- field dimensionality: Literal['1D', '2D'] [Required]
- field vectors: Sequence[V] [Required]
- 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>
- pydantic model weaviate.collections.classes.grpc._ListOfVectorsQuery[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.
- field dimensionality: Literal['1D', '2D'] [Required]
- field vectors: Sequence[V] [Required]
- 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>
- class weaviate.collections.classes.grpc.NearMediaType(*values)[source]
Bases:
str
,Enum
The 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:
object
Metadata 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:
object
Metadata 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:
object
Metadata 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:
object
The 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:
object
The 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:
object
You 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.
- pydantic model weaviate.collections.classes.internal.ReferenceToMulti[source]
Bases:
_WeaviateInput
Use 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.
- field target_collection: str [Required]
- field uuids: Sequence[str | UUID] | str | UUID [Required]
- _abc_impl = <_abc._abc_data object>
- property uuids_str: List[str]
Returns the UUIDs as strings.
- 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:
object
Dataclass 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
,Enum
Values 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
,Enum
TenantActivityStatus 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'
- pydantic model weaviate.collections.classes.tenants.Tenant[source]
Bases:
BaseModel
Tenant class used to describe a tenant in Weaviate.
- name
The name of the tenant.
- 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.
- field activityStatus: _TenantActivistatusServerValues = _TenantActivistatusServerValues.HOT
- field activityStatusInternal: TenantActivityStatus = TenantActivityStatus.ACTIVE (alias 'activity_status')
- field name: str [Required]
- 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>
- property activity_status: TenantActivityStatus
Getter for the activity status of the tenant.
- pydantic model weaviate.collections.classes.tenants.TenantOutput[source]
Bases:
Tenant
Wrapper 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.
- 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>
- class weaviate.collections.classes.tenants.TenantCreateActivityStatus(*values)[source]
Bases:
str
,Enum
TenantActivityStatus 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
,Enum
TenantActivityStatus 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'
- pydantic model weaviate.collections.classes.tenants.TenantCreate[source]
Bases:
BaseModel
Tenant class used to describe a tenant to create in Weaviate.
- name
the name of the tenant.
- 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.
- field activityStatus: _TenantActivistatusServerValues = _TenantActivistatusServerValues.HOT
- field activityStatusInternal: TenantCreateActivityStatus = TenantCreateActivityStatus.ACTIVE (alias 'activity_status')
- field name: str [Required]
- 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>
- property activity_status: TenantCreateActivityStatus
Getter for the activity status of the tenant.
- pydantic model weaviate.collections.classes.tenants.TenantUpdate[source]
Bases:
BaseModel
Tenant class used to describe a tenant to create in Weaviate.
- name
The name of the tenant.
- 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.
- field activityStatus: _TenantActivistatusServerValues = _TenantActivistatusServerValues.HOT
- field activityStatusInternal: TenantUpdateActivityStatus = TenantUpdateActivityStatus.ACTIVE (alias 'activity_status')
- field name: str [Required]
- 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>
- property activity_status: TenantUpdateActivityStatus
Getter for the activity status of the tenant.
weaviate.collections.classes.types
- pydantic model weaviate.collections.classes.types._WeaviateInput[source]
Bases:
BaseModel
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.
- _abc_impl = <_abc._abc_data object>
- pydantic model weaviate.collections.classes.types.GeoCoordinate[source]
Bases:
_WeaviateInput
Input 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.
- field latitude: float [Required]
- Constraints:
ge = -90
le = 90
- field longitude: float [Required]
- Constraints:
ge = -180
le = 180
- _abc_impl = <_abc._abc_data object>
- pydantic model weaviate.collections.classes.types._PhoneNumberBase[source]
Bases:
_WeaviateInput
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.
- field number: str [Required]
- _abc_impl = <_abc._abc_data object>
- pydantic model weaviate.collections.classes.types.PhoneNumber[source]
Bases:
_PhoneNumberBase
Input 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.
- field default_country: str | None = None
- field number: str [Required]
- _abc_impl = <_abc._abc_data object>
- pydantic model weaviate.collections.classes.types._PhoneNumber[source]
Bases:
_PhoneNumberBase
Output 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.
- field country_code: int [Required]
- field default_country: str [Required]
- field international_formatted: str [Required]
- field national: int [Required]
- field national_formatted: str [Required]
- field valid: bool [Required]
- _abc_impl = <_abc._abc_data object>
- 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
])
- 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