Releases: weaviate/weaviate-python-client
Add vector word boosting
client.create_thing
has a new optional argument vector_weights
, that allows the boosting of single words. See the official release notes for more information.
Allow querying the GraphQL endpoint
The client now offers a function query
to execute GraphQL queries on weaviate.
Support of vectorization masks
- Creation of schemas has changed to support the vectorization masks introduced in weaviate
0.21.11
. - Adding things or references in batch now returns a list containing the status for every thing/reference.
- The is_ready function now uses weaviates ready endpoint introduced in
0.21.2
- Authentication can now additionally be done using a user name and password
Contextual classification and filtered classifications
New Features:
- Contextual classification
- Filter on classifications
Breaking changes:
All logic connected to classification has been moved to Client.classification
.
Example:
Classify products according to their description into a category.
Only use products from the same country to classify.
# Create a configuration for a contextual classification
context_configuration = client.classification.get_contextual_config("Product", ["description"], ["hasCategory"])
# Create a filter (assumes that both the source and target class have a property inCountry)
country_filter = {
"operator": "Equal",
"path": ["inCountry"],
"valueString": "Germany"
}
# Add the filters
germany_config = client.classification.add_filter_to_config(
weaviate.SOURCE_WHERE_FILTER, country_filter, context_configuration)
germany_config = client.classification.add_filter_to_config(
weaviate.TARGET_WHERE_FILTER, data_filter, germany_config)
# Classify
classification_info = client.classification.start(germany_config)
while not client.classification.is_classification_complete(classification_info["id"]):
print("Classifying ...")
time.sleep(3.0)
# Change filter
country_filter["valueString"] = "Estonia"
# Add the filter
estonia_config = client.classification.add_filter_to_config(
weaviate.SOURCE_WHERE_FILTER, country_filter, context_configuration)
estonia_config = client.classification.add_filter_to_config(
weaviate.TARGET_WHERE_FILTER, data_filter, estonia_config)
# Classify
classification_info = client.classification.start(estonia_config)
while not client.classification.is_classification_complete(classification_info["id"]):
print("Classifying ...")
time.sleep(3.0)
0.1.3 Adding delete functionality
New features:
- Schemas specifying index can now be loaded.
- Things can now be deleted
0.1.3-rc-0 - Adding index to schema
The index keyword is now recognized by the client.
0.1.2 - Add contains_schema
Add function to know weather a schema was already loaded.
0.1.1 - Add patch
Adds the patch merge function to partially change a thing within weaviate.
Improves the execution of is_reachable
to also include testing for backend components running.