diff --git a/.github/workflows/main.yaml b/.github/workflows/main.yaml
index e3ab69d08..68128734a 100644
--- a/.github/workflows/main.yaml
+++ b/.github/workflows/main.yaml
@@ -18,11 +18,6 @@ concurrency:
cancel-in-progress: true
env:
- WEAVIATE_127: 1.27.27
- WEAVIATE_128: 1.28.16
- WEAVIATE_129: 1.29.11
- WEAVIATE_130: 1.30.23
- WEAVIATE_131: 1.31.22
WEAVIATE_132: 1.32.27
WEAVIATE_133: 1.33.18
WEAVIATE_134: 1.34.20
@@ -32,6 +27,7 @@ env:
WEAVIATE_138: 1.38.22
WEAVIATE_139: 1.39.13
WEAVIATE_140: 1.40.2
+ WEAVIATE_141: 1.41.0
jobs:
lint-and-format:
@@ -67,7 +63,7 @@ jobs:
strategy:
fail-fast: false
matrix:
- version: ["3.10", "3.11", "3.12", "3.13", "3.14"]
+ version: ["3.11", "3.12", "3.13", "3.14", "3.15"]
folder: ["weaviate", "integration", "integration_embedded"]
steps:
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6
@@ -88,7 +84,7 @@ jobs:
strategy:
fail-fast: false
matrix:
- version: ["3.10", "3.11", "3.12", "3.13", "3.14"]
+ version: ["3.11", "3.12", "3.13", "3.14", "3.15"]
folder: ["test", "mock_tests"]
steps:
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6
@@ -100,7 +96,7 @@ jobs:
- name: Run unittests
run: pytest --cov -v --cov-report=term-missing --cov=weaviate --cov-report xml:coverage-${{ matrix.folder }}.xml ${{ matrix.folder }}
- name: Archive code coverage results
- if: matrix.version == '3.10' && (github.ref_name != 'main')
+ if: matrix.version == '3.11' && (github.ref_name != 'main')
uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7
with:
name: coverage-report-${{ matrix.folder }}
@@ -172,8 +168,8 @@ jobs:
strategy:
fail-fast: false
matrix:
- grpc: ["1.59.5", "1.63.0", "1.65.0", "1.66.0", "1.68.0", "1.72.1", "1.73.0", "1.74.0"]
- protobuf: ["4.25.8", "5.26.0", "5.27.4", "5.28.3", "5.29.0", "6.30.0", "6.31.1", "6.32.0"]
+ grpc: ["1.59.5", "1.63.0", "1.65.0", "1.66.0", "1.68.0", "1.72.1", "1.73.0", "1.74.0", "1.83.0", "1.85.0"]
+ protobuf: ["4.25.8", "5.26.0", "5.27.4", "5.28.3", "5.29.0", "6.30.0", "6.31.1", "6.32.0", "6.33.6", "7.34.0", "7.36.2"]
steps:
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6
- uses: actions/setup-python@a26af69be951a213d495a4c3e4e4022e16d87065 # v5
@@ -192,7 +188,7 @@ jobs:
timeout-minutes: 30
strategy:
matrix:
- version: ["3.10", "3.11", "3.12", "3.13", "3.14"]
+ version: ["3.11", "3.12", "3.13", "3.14", "3.15"]
optional_dependencies: [false]
steps:
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6
@@ -210,7 +206,7 @@ jobs:
if: ${{ !github.event.pull_request.head.repo.fork }}
run: pytest -v --cov --cov-report=term-missing --cov=weaviate --cov-report xml:coverage-integration-embedded.xml integration_embedded
- name: Archive code coverage results
- if: matrix.version == '3.10' && (github.ref_name != 'main') && !github.event.pull_request.head.repo.fork
+ if: matrix.version == '3.11' && (github.ref_name != 'main') && !github.event.pull_request.head.repo.fork
uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7
with:
name: coverage-report-integration-embedded
@@ -224,11 +220,13 @@ jobs:
fail-fast: false
matrix:
versions: [
- { py: "3.10", weaviate: $WEAVIATE_140, grpc: "1.59.0"},
- { py: "3.11", weaviate: $WEAVIATE_140, grpc: "1.66.0"},
- { py: "3.12", weaviate: $WEAVIATE_140, grpc: "1.70.0"},
- { py: "3.13", weaviate: $WEAVIATE_140, grpc: "1.72.1"},
- { py: "3.14", weaviate: $WEAVIATE_140, grpc: "1.76.0"}
+ { py: "3.11", weaviate: $WEAVIATE_140, grpc: "1.59.5", protobuf: "4.25.9"},
+ { py: "3.12", weaviate: $WEAVIATE_140, grpc: "1.70.0", protobuf: "5.29.6"},
+ { py: "3.13", weaviate: $WEAVIATE_140, grpc: "1.72.1", protobuf: "6.33.6"},
+ { py: "3.14", weaviate: $WEAVIATE_140, grpc: "1.76.0", protobuf: "6.33.6"},
+ { py: "3.14", weaviate: $WEAVIATE_140, grpc: "1.85.0", protobuf: "6.33.6"},
+ { py: "3.14", weaviate: $WEAVIATE_140, grpc: "1.85.0", protobuf: "7.36.2"},
+ { py: "3.15", weaviate: $WEAVIATE_140, grpc: "1.85.0", protobuf: "7.36.2"}
]
optional_dependencies: [false]
steps:
@@ -248,7 +246,7 @@ jobs:
password: ${{secrets.DOCKER_PASSWORD}}
- run: |
pip install -r requirements-test.txt
- pip install grpcio==${{ matrix.versions.grpc }} grpcio-tools==${{ matrix.versions.grpc }} grpcio-health-checking==${{ matrix.versions.grpc }}
+ pip install grpcio==${{ matrix.versions.grpc }} protobuf==${{ matrix.versions.protobuf }}
pip install .
- name: start weaviate
run: /bin/bash ci/start_weaviate.sh ${{ matrix.versions.weaviate }}
@@ -263,7 +261,7 @@ jobs:
if: ${{ github.event.pull_request.head.repo.fork || github.triggering_actor == 'dependabot[bot]' }}
run: pytest -n auto --dist loadgroup -v --cov --cov-report=term-missing --cov=weaviate --cov-report xml:coverage-integration.xml integration
- name: Archive code coverage results
- if: matrix.versions.py == '3.10' && (github.ref_name != 'main')
+ if: matrix.versions.py == '3.11' && (github.ref_name != 'main')
uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7
with:
name: coverage-report-integration
@@ -279,18 +277,18 @@ jobs:
fail-fast: false
matrix:
versions: [
- { py: "3.10", weaviate: $WEAVIATE_140},
{ py: "3.11", weaviate: $WEAVIATE_140},
{ py: "3.12", weaviate: $WEAVIATE_140},
{ py: "3.13", weaviate: $WEAVIATE_140},
- { py: "3.14", weaviate: $WEAVIATE_140}
+ { py: "3.14", weaviate: $WEAVIATE_140},
+ { py: "3.15", weaviate: $WEAVIATE_140}
]
optional_dependencies: [false]
steps:
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6
- uses: actions/setup-python@a26af69be951a213d495a4c3e4e4022e16d87065 # v5
with:
- python-version: "3.11"
+ python-version: ${{ matrix.versions.py }}
cache: 'pip' # caching pip dependencies
- name: Login to Docker Hub
uses: docker/login-action@4907a6ddec9925e35a0a9e82d7399ccc52663121 # v4
@@ -373,11 +371,6 @@ jobs:
fail-fast: false
matrix:
version: [
- $WEAVIATE_127,
- $WEAVIATE_128,
- $WEAVIATE_129,
- $WEAVIATE_130,
- $WEAVIATE_131,
$WEAVIATE_132,
$WEAVIATE_133,
$WEAVIATE_134,
@@ -386,7 +379,8 @@ jobs:
$WEAVIATE_137,
$WEAVIATE_138,
$WEAVIATE_139,
- $WEAVIATE_140
+ $WEAVIATE_140,
+ $WEAVIATE_141
]
steps:
- name: Checkout
@@ -412,8 +406,14 @@ jobs:
pip install weaviate_client-*.whl
- run: rm -r weaviate
- name: start weaviate
+ env:
+ # ci/docker-compose-rbac.yml passes it to Weaviate as LICENSE_KEY.
+ WEAVIATE_LICENSE_KEY: ${{ secrets.WEAVIATE_LICENSE_KEY }}
run: /bin/bash ci/start_weaviate.sh ${{ matrix.version }}
- name: Run integration tests without auth secrets (auth tests ran in previous job)
+ env:
+ # The DB user expiration tests skip where it is empty, as on forks.
+ WEAVIATE_LICENSE_KEY: ${{ secrets.WEAVIATE_LICENSE_KEY }}
run: pytest -v -n auto --dist loadgroup integration
build-and-publish:
diff --git a/README.rst b/README.rst
index 3f45a3d3b..1f1fc366f 100644
--- a/README.rst
+++ b/README.rst
@@ -19,7 +19,7 @@ Weaviate python client
A python native client for easy interaction with a Weaviate instance.
-The client is tested for python 3.9 and higher.
+The client is tested for python 3.11 and higher.
Visit the official `Weaviate `_ website for more information about the Weaviate and how to use it in production.
diff --git a/ci/docker-compose-rbac.yml b/ci/docker-compose-rbac.yml
index 616400d3a..11934ddeb 100644
--- a/ci/docker-compose-rbac.yml
+++ b/ci/docker-compose-rbac.yml
@@ -33,6 +33,7 @@ services:
RAFT_BOOTSTRAP_EXPECT: "1"
AUTHORIZATION_ENABLE_RBAC: "true"
AUTHENTICATION_DB_USERS_ENABLED: "true"
+ LICENSE_KEY: ${WEAVIATE_LICENSE_KEY:-}
AUTHENTICATION_OIDC_ENABLED: 'true'
AUTHENTICATION_OIDC_CLIENT_ID: 'mock-oidc-test'
AUTHENTICATION_OIDC_ISSUER: 'http://mock-oidc:48001/oidc'
diff --git a/docs/changelog.rst b/docs/changelog.rst
index 9cbaa1884..ea8735ba2 100644
--- a/docs/changelog.rst
+++ b/docs/changelog.rst
@@ -1,6 +1,15 @@
Changelog
=========
+Version 4.25.0
+--------------
+This minor version includes:
+ - Remove support for Weaviate versions < 1.32.0. Connecting to an older server now raises ``WeaviateStartUpError`` even with ``skip_init_checks=True``. Please update your Weaviate instances
+ - Support ``protobuf`` 7
+ - Remove support for Python 3.10, which reached its end of life in October 2026. The client now requires Python 3.11 or newer
+ - Support Python 3.15
+ - Remove the legacy GraphQL aggregation path together with the ``weaviate.gql`` and ``weaviate.error_msgs`` modules, ``weaviate.util.is_weaviate_too_old`` and ``weaviate.util.MINIMUM_NO_WARNING_VERSION``, and the ``weaviate.AdditionalProperties`` and ``weaviate.LinkTo`` attributes (which already pointed at names that did not exist). Aggregations always use gRPC now. ``client.graphql_raw_query()`` is unchanged
+
Version 4.24.1
--------------
This patch version includes:
diff --git a/docs/index.rst b/docs/index.rst
index 2b004e62c..820a92c96 100644
--- a/docs/index.rst
+++ b/docs/index.rst
@@ -15,7 +15,7 @@ Welcome to Weaviate Python Client's documentation!
|build-status| |pypi-version|
-The Weaviate Python client makes it easy to work with `Weaviate `_, an AI Native vector database. The client is tested for Python 3.8 and higher.
+The Weaviate Python client makes it easy to work with `Weaviate `_, an AI Native vector database. The client is tested for Python 3.11 and higher.
The current major version is **v4** while the older **v3** client is deprecated and should be avoided. You can find further documentation for both versions:
diff --git a/docs/weaviate.gql.rst b/docs/weaviate.gql.rst
deleted file mode 100644
index f1aa2588e..000000000
--- a/docs/weaviate.gql.rst
+++ /dev/null
@@ -1,26 +0,0 @@
-weaviate.gql
-============
-
-.. automodule:: weaviate.gql
- :members:
- :undoc-members:
- :show-inheritance:
- :private-members:
-
-weaviate.gql.aggregate
-^^^^^^^^^^^^^^^^^^^^^^
-
-.. automodule:: weaviate.gql.aggregate
- :members:
- :undoc-members:
- :show-inheritance:
- :private-members:
-
-weaviate.gql.filter
-^^^^^^^^^^^^^^^^^^^
-
-.. automodule:: weaviate.gql.filter
- :members:
- :undoc-members:
- :show-inheritance:
- :private-members:
diff --git a/docs/weaviate.rst b/docs/weaviate.rst
index 54cda8552..6b7ea9f21 100644
--- a/docs/weaviate.rst
+++ b/docs/weaviate.rst
@@ -19,7 +19,6 @@ Subpackages
weaviate.collections
weaviate.connect
weaviate.debug
- weaviate.gql
weaviate.outputs
weaviate.rbac
weaviate.users
diff --git a/integration/test_alias.py b/integration/test_alias.py
index 64c7fec6a..39f9b240d 100644
--- a/integration/test_alias.py
+++ b/integration/test_alias.py
@@ -38,8 +38,6 @@ def client(client_factory: ClientFactory) -> Generator[weaviate.WeaviateClient,
def test_alias_creation_and_deletion(client: weaviate.WeaviateClient, request: SubRequest) -> None:
- if client._connection._weaviate_version.is_lower_than(1, 32, 0):
- pytest.skip("Aliases are not supported in Weaviate versions < 1.32.0")
name = _sanitize_collection_name(request.node.name)
name2 = _sanitize_collection_name(request.node.name + "_2")
alias1: str = "Alias" + _sanitize_collection_name(request.node.name)
@@ -98,9 +96,6 @@ def test_alias_creation_and_deletion(client: weaviate.WeaviateClient, request: S
def test_alias_creation_and_update(client: weaviate.WeaviateClient, request: SubRequest) -> None:
- if client._connection._weaviate_version.is_lower_than(1, 32, 0):
- pytest.skip("Aliases are not supported in Weaviate versions < 1.32.0")
-
name = _sanitize_collection_name(request.node.name)
name2 = _sanitize_collection_name(request.node.name + "_2")
alias1: str = "Alias" + _sanitize_collection_name(request.node.name)
@@ -138,9 +133,6 @@ def test_alias_creation_and_update(client: weaviate.WeaviateClient, request: Sub
def test_alias_get(client: weaviate.WeaviateClient, request: SubRequest) -> None:
- if client._connection._weaviate_version.is_lower_than(1, 32, 0):
- pytest.skip("Aliases are not supported in Weaviate versions < 1.32.0")
-
name = _sanitize_collection_name(request.node.name)
alias1: str = "Alias" + _sanitize_collection_name(request.node.name)
@@ -162,9 +154,6 @@ def test_alias_get(client: weaviate.WeaviateClient, request: SubRequest) -> None
def test_alias_exists(client: weaviate.WeaviateClient, request: SubRequest) -> None:
- if client._connection._weaviate_version.is_lower_than(1, 32, 0):
- pytest.skip("Aliases are not supported in Weaviate versions < 1.32.0")
-
name = _sanitize_collection_name(request.node.name)
alias1: str = "Alias" + _sanitize_collection_name(request.node.name)
diff --git a/integration/test_backup_v4.py b/integration/test_backup_v4.py
index 41f8dd293..b330f4729 100644
--- a/integration/test_backup_v4.py
+++ b/integration/test_backup_v4.py
@@ -402,9 +402,6 @@ def test_backup_and_restore_with_dynamic_location(
conf_restore: Optional[wvc.backup.BackupConfigRestore] = None
backup_location: Optional[wvc.backup.BackupLocationType] = None
if dynamic_backup_location:
- if client._connection._weaviate_version.is_lower_than(1, 27, 2):
- pytest.skip("Cancel backups is only supported from 1.27.2")
-
backup_location = wvc.backup.BackupLocation.FileSystem(path=str(tmp_path))
article = client.collections.use("Article")
@@ -451,9 +448,6 @@ def test_backup_and_restore_with_dynamic_location(
def test_backup_and_restore_with_collection_and_config_1_24_x(
client: weaviate.WeaviateClient, request: SubRequest
) -> None:
- if client._connection._weaviate_version.is_lower_than(1, 25, 0):
- pytest.skip("Backup config is only supported from Weaviate 1.25.0")
-
backup_id = unique_backup_id(request.node.name)
article = client.collections.use("Article")
@@ -505,14 +499,9 @@ def test_cancel_backup_create(
) -> None:
"""Cancel backup create without waiting."""
backup_id = unique_backup_id(request.node.name)
- if client._connection._weaviate_version.is_lower_than(1, 24, 25):
- pytest.skip("Cancel backups is only supported from 1.24.25")
backup_location: Optional[wvc.backup.BackupLocationType] = None
if dynamic_backup_location:
- if client._connection._weaviate_version.is_lower_than(1, 27, 2):
- pytest.skip("Cancel backups is only supported from 1.27.2")
-
backup_location = wvc.backup.BackupLocation.FileSystem(path=str(tmp_path))
resp = client.backup.create(
@@ -609,8 +598,6 @@ def test_backup_and_restore_with_roles_and_users(
) -> None:
backup_id = unique_backup_id(request.node.name)
client = client_factory(ports=RBAC_PORTS, auth_credentials=RBAC_AUTH_CREDS)
- if client._connection._weaviate_version.is_lower_than(1, 30, 10):
- pytest.skip("User and roles are only supported from Weaviate 1.30.10")
name = _sanitize_collection_name(request.node.fspath.basename + "_" + request.node.name)
client.collections.delete(name)
@@ -654,8 +641,6 @@ def test_backup_and_restore_with_roles_and_users(
def test_list_backup(client: weaviate.WeaviateClient, request: SubRequest) -> None:
"""List all backups."""
backup_id = unique_backup_id(request.node.name)
- if client._connection._weaviate_version.is_lower_than(1, 30, 0):
- pytest.skip("List backups is only supported from 1.30.0")
resp = client.backup.create(backup_id=backup_id, backend=BACKEND)
assert resp.status == BackupStatus.STARTED
@@ -709,9 +694,6 @@ def test_list_backup_ascending_order(client: weaviate.WeaviateClient, request: S
@pytest.fixture
def artist_alias(client: weaviate.WeaviateClient) -> Generator[str, None, None]:
- if client._connection._weaviate_version.is_lower_than(1, 32, 0):
- pytest.skip("overwriteAlias is only supported from 1.33.0 onwards")
-
client.alias.create(target_collection="Article", alias_name="Literature")
yield "Literature"
client.alias.delete(alias_name="Literature")
diff --git a/integration/test_collection.py b/integration/test_collection.py
index f4016f930..b750045c6 100644
--- a/integration/test_collection.py
+++ b/integration/test_collection.py
@@ -459,10 +459,7 @@ def test_replace_overwrites_vector(collection_factory: CollectionFactory) -> Non
collection.data.replace(properties={"name": "other name"}, uuid=uuid)
obj = collection.query.fetch_object_by_id(uuid, include_vector=True)
assert obj.properties["name"] == "other name"
- if collection._connection._weaviate_version.is_lower_than(1, 27, 0):
- assert len(obj.vector["default"]) == 0
- else:
- assert "default" not in obj.vector
+ assert "default" not in obj.vector
collection.data.replace(properties={"name": "real name"}, uuid=uuid, vector=[2, 3, 4])
obj = collection.query.fetch_object_by_id(uuid, include_vector=True)
@@ -1167,12 +1164,6 @@ def test_near_text_error(collection_factory: CollectionFactory) -> None:
def test_near_text_group_by_argument(collection_factory: CollectionFactory) -> None:
- dummy = collection_factory("dummy")
- if dummy._connection._weaviate_version.is_lower_than(1, 27, 0):
- pytest.skip(
- 'Vectors not passed to GroupByHit in servers for versions < 1.27.0. Therefore `assert "default" in ret.objects[i].vector` fails always.'
- )
-
collection = collection_factory(
vector_config=Configure.Vectors.text2vec_contextionary(vectorize_collection_name=False),
properties=[Property(name="value", data_type=DataType.TEXT)],
@@ -1745,9 +1736,6 @@ def test_bm25_operators(collection_factory: CollectionFactory) -> None:
vectorizer_config=Configure.Vectorizer.none(),
)
- if collection._connection._weaviate_version.is_lower_than(1, 31, 0):
- pytest.skip("bm25 operators are only supported in versions higher than 1.31.0")
-
uuid1 = collection.data.insert({"name": "banana one"})
uuid2 = collection.data.insert({"name": "banana two"})
uuid3 = collection.data.insert({"name": "banana three"})
diff --git a/integration/test_collection_aggregate.py b/integration/test_collection_aggregate.py
index 702e85ba0..d30d70597 100644
--- a/integration/test_collection_aggregate.py
+++ b/integration/test_collection_aggregate.py
@@ -28,8 +28,6 @@
from weaviate.collections.classes.tenants import Tenant
from weaviate.exceptions import (
WeaviateInvalidInputError,
- WeaviateQueryError,
- WeaviateUnsupportedFeatureError,
)
from weaviate.util import file_encoder_b64
@@ -239,26 +237,10 @@ def test_over_all_with_filters_ref(collection_factory: CollectionFactory) -> Non
filters=Filter.by_ref("ref").by_property("text").equal("one"),
return_metrics=[Metrics("text").text(count=True, top_occurrences_value=True)],
)
- if collection._connection._weaviate_version.is_lower_than(1, 29, 0):
- with pytest.raises(WeaviateInvalidInputError):
- query()
- else:
- res = query()
- assert isinstance(res.properties["text"], AggregateText)
- assert res.properties["text"].count == 1
- assert res.properties["text"].top_occurrences[0].value == "two"
-
-
-def test_wrong_aggregation(collection_factory: CollectionFactory) -> None:
- collection = collection_factory(properties=[Property(name="text", data_type=DataType.TEXT)])
- if collection._connection._weaviate_version.is_at_least(1, 29, 0):
- pytest.skip("GQL is only used for versions 1.28.4 and lower")
- with pytest.raises(WeaviateQueryError) as e:
- collection.aggregate.over_all(total_count=False)
- assert (
- e.value.message
- == "The query that you sent had no body so GraphQL was unable to parse it. You must provide at least one option to the aggregation method in order to build a valid query."
- )
+ res = query()
+ assert isinstance(res.properties["text"], AggregateText)
+ assert res.properties["text"].count == 1
+ assert res.properties["text"].top_occurrences[0].value == "two"
@pytest.mark.parametrize(
@@ -405,11 +387,6 @@ def test_hybrid_aggregation_group_by(
total_count=True,
object_limit=2, # has no effect due to alpha=0
)
- if collection._connection._weaviate_version.is_lower_than(1, 25, 0):
- with pytest.raises(WeaviateUnsupportedFeatureError):
- querier()
- return
-
res = querier()
assert res.groups[0].grouped_by.prop == "text"
assert res.groups[0].grouped_by.value == "some text"
@@ -443,11 +420,6 @@ def test_hybrid_aggregation_group_by_with_named_vectors(
object_limit=2, # has no effect due to alpha=0
target_vector="all",
)
- if collection._connection._weaviate_version.is_lower_than(1, 25, 0):
- with pytest.raises(WeaviateUnsupportedFeatureError):
- querier()
- return
-
res = querier()
assert res.groups[0].grouped_by.prop == "text"
assert res.groups[0].grouped_by.value == "some text"
@@ -693,19 +665,13 @@ def test_group_by_aggregation_argument(collection_factory: CollectionFactory) ->
groups = res.groups
assert len(groups) == 2
assert groups[0].grouped_by.prop == "int"
- if collection._connection._weaviate_version.is_lower_than(1, 29, 0):
- assert groups[0].grouped_by.value == "1" or groups[1].grouped_by.value == "1"
- else:
- assert groups[0].grouped_by.value == 1 or groups[1].grouped_by.value == 1
+ assert groups[0].grouped_by.value == 1 or groups[1].grouped_by.value == 1
assert isinstance(groups[0].properties["text"], AggregateText)
assert groups[0].properties["text"].count == 1
assert isinstance(groups[0].properties["int"], AggregateInteger)
assert groups[0].properties["int"].count == 1
assert groups[1].grouped_by.prop == "int"
- if collection._connection._weaviate_version.is_lower_than(1, 29, 0):
- assert groups[1].grouped_by.value == "2" or groups[0].grouped_by.value == "2"
- else:
- assert groups[1].grouped_by.value == 2 or groups[0].grouped_by.value == 2
+ assert groups[1].grouped_by.value == 2 or groups[0].grouped_by.value == 2
assert isinstance(groups[1].properties["text"], AggregateText)
assert groups[1].properties["text"].count == 1
assert isinstance(groups[1].properties["int"], AggregateInteger)
@@ -869,9 +835,6 @@ def test_hybrid_bm25_operators(collection_factory: CollectionFactory) -> None:
vectorizer_config=Configure.Vectorizer.none(),
)
- if collection._connection._weaviate_version.is_lower_than(1, 31, 0):
- pytest.skip("bm25 operators are only supported in versions higher than 1.31.0")
-
collection.data.insert({"name": "banana one"})
collection.data.insert({"name": "banana two"})
collection.data.insert({"name": "banana three"})
@@ -903,9 +866,6 @@ def test_aggregate_empty_result_none_values(collection_factory: CollectionFactor
inverted_index_config=Configure.inverted_index(index_null_state=True),
)
- if collection._connection._weaviate_version.is_lower_than(1, 29, 0):
- pytest.skip("gRPC aggregates are only supported in versions 1.29.0 and higher")
-
# Insert one object with bucket=0
collection.data.insert({"bucket": 0, "intVal": 123, "numberVal": 456.78})
diff --git a/integration/test_collection_config.py b/integration/test_collection_config.py
index 70f0af070..43d0da45a 100644
--- a/integration/test_collection_config.py
+++ b/integration/test_collection_config.py
@@ -1,6 +1,6 @@
import datetime
import time
-from typing import Any, Dict, Generator, List, Optional, Union
+from typing import Any, Callable, Dict, Generator, List, Optional, Union
import pytest as pytest
from _pytest.fixtures import SubRequest
@@ -64,7 +64,7 @@ def _expected_async_enabled(version: _ServerVersion, factor: int) -> bool:
"""
if version.is_at_least(1, 38, 9):
return factor > 1
- return version.is_at_least(1, 26, 0)
+ return True
@pytest.fixture(scope="module")
@@ -184,10 +184,7 @@ def test_collection_config_empty(collection_factory: CollectionFactory) -> None:
assert config.vector_index_config.ef == -1
assert config.vector_index_config.ef_construction == 128
assert config.vector_index_config.flat_search_cutoff == 40000
- if collection._connection._weaviate_version.is_lower_than(1, 26, 0):
- assert config.vector_index_config.max_connections == 64
- else:
- assert config.vector_index_config.max_connections == 32
+ assert config.vector_index_config.max_connections == 32
assert config.vector_index_config.quantizer is None
assert config.vector_index_config.skip is False
assert config.vector_index_config.vector_cache_max_objects == 1000000000000
@@ -241,10 +238,7 @@ def test_collection_config_defaults(collection_factory: CollectionFactory) -> No
assert config.vector_index_config.ef == -1
assert config.vector_index_config.ef_construction == 128
assert config.vector_index_config.flat_search_cutoff == 40000
- if collection._connection._weaviate_version.is_lower_than(1, 26, 0):
- assert config.vector_index_config.max_connections == 64
- else:
- assert config.vector_index_config.max_connections == 32
+ assert config.vector_index_config.max_connections == 32
assert config.vector_index_config.quantizer is None
assert config.vector_index_config.skip is False
assert config.vector_index_config.vector_cache_max_objects == 1000000000000
@@ -360,31 +354,18 @@ def test_collection_config_full(collection_factory: CollectionFactory) -> None:
assert config.inverted_index_config.stopwords.removals == ["the"]
assert config.multi_tenancy_config.enabled is True
- if collection._connection._weaviate_version.is_at_least(1, 25, 2):
- assert config.multi_tenancy_config.auto_tenant_activation is True
- else:
- assert config.multi_tenancy_config.auto_tenant_activation is False
- if collection._connection._weaviate_version.is_at_least(1, 25, 1):
- assert config.multi_tenancy_config.auto_tenant_creation is True
- else:
- assert config.multi_tenancy_config.auto_tenant_creation is False
+ assert config.multi_tenancy_config.auto_tenant_activation is True
+ assert config.multi_tenancy_config.auto_tenant_creation is True
assert config.replication_config.factor == 1
assert config.replication_config.async_enabled is _expected_async_enabled(
collection._connection._weaviate_version, factor=1
)
- if collection._connection._weaviate_version.is_at_least(1, 24, 25):
- assert (
- config.replication_config.deletion_strategy
- == wvc.config.ReplicationDeletionStrategy.DELETE_ON_CONFLICT
- )
- else:
- # default value if not present in schema
- assert (
- config.replication_config.deletion_strategy
- == wvc.config.ReplicationDeletionStrategy.NO_AUTOMATED_RESOLUTION
- )
+ assert (
+ config.replication_config.deletion_strategy
+ == wvc.config.ReplicationDeletionStrategy.DELETE_ON_CONFLICT
+ )
assert isinstance(config.vector_index_config, _VectorIndexConfigHNSW)
assert isinstance(config.vector_index_config.quantizer, _PQConfig)
@@ -405,13 +386,7 @@ def test_collection_config_full(collection_factory: CollectionFactory) -> None:
assert config.vector_index_config.quantizer.training_limit == 1000001
assert config.vector_index_config.skip is False
assert config.vector_index_config.vector_cache_max_objects == 100000
- if collection._connection._weaviate_version.is_at_least(1, 27, 0):
- assert config.vector_index_config.filter_strategy == wvc.config.VectorFilterStrategy.ACORN
- else:
- # default value if not present in schema
- assert (
- config.vector_index_config.filter_strategy == wvc.config.VectorFilterStrategy.SWEEPING
- )
+ assert config.vector_index_config.filter_strategy == wvc.config.VectorFilterStrategy.ACORN
assert config.vector_index_type == VectorIndexType.HNSW
@@ -478,12 +453,7 @@ def test_collection_config_update(collection_factory: CollectionFactory) -> None
config = collection.config.get()
- if collection._connection._weaviate_version.is_at_least(
- 1, 25, 2
- ) or collection._connection._weaviate_version.is_lower_than(1, 25, 0):
- assert config.description == "Test"
- else:
- assert config.description is None
+ assert config.description == "Test"
assert config.inverted_index_config.bm25.b == 0.8
assert config.inverted_index_config.bm25.k1 == 1.25
@@ -493,21 +463,11 @@ def test_collection_config_update(collection_factory: CollectionFactory) -> None
assert config.replication_config.factor == 2
- if collection._connection._weaviate_version.is_at_least(1, 26, 0):
- assert config.replication_config.async_enabled is True
- else:
- assert config.replication_config.async_enabled is False
- if collection._connection._weaviate_version.is_at_least(1, 24, 25):
- assert (
- config.replication_config.deletion_strategy
- == wvc.config.ReplicationDeletionStrategy.DELETE_ON_CONFLICT
- )
- else:
- # default value if not present in schema
- assert (
- config.replication_config.deletion_strategy
- == wvc.config.ReplicationDeletionStrategy.NO_AUTOMATED_RESOLUTION
- )
+ assert config.replication_config.async_enabled is True
+ assert (
+ config.replication_config.deletion_strategy
+ == wvc.config.ReplicationDeletionStrategy.DELETE_ON_CONFLICT
+ )
assert isinstance(config.vector_index_config, _VectorIndexConfigHNSW)
assert isinstance(config.vector_index_config.quantizer, _PQConfig)
@@ -519,10 +479,7 @@ def test_collection_config_update(collection_factory: CollectionFactory) -> None
assert config.vector_index_config.ef == -1
assert config.vector_index_config.ef_construction == 128
assert config.vector_index_config.flat_search_cutoff == 40000
- if collection._connection._weaviate_version.is_lower_than(1, 26, 0):
- assert config.vector_index_config.max_connections == 64
- else:
- assert config.vector_index_config.max_connections == 32
+ assert config.vector_index_config.max_connections == 32
assert config.vector_index_config.quantizer.bit_compression is False
assert config.vector_index_config.quantizer.centroids == 128
assert config.vector_index_config.quantizer.encoder.type_ == PQEncoderType.TILE
@@ -532,27 +489,15 @@ def test_collection_config_update(collection_factory: CollectionFactory) -> None
assert config.vector_index_config.skip is False
assert config.vector_index_config.vector_cache_max_objects == 2000000
- if collection._connection._weaviate_version.is_at_least(1, 27, 0):
- assert config.vector_index_config.filter_strategy == wvc.config.VectorFilterStrategy.ACORN
- else:
- # default value if not present in schema
- assert (
- config.vector_index_config.filter_strategy == wvc.config.VectorFilterStrategy.SWEEPING
- )
+ assert config.vector_index_config.filter_strategy == wvc.config.VectorFilterStrategy.ACORN
assert config.vector_index_type == VectorIndexType.HNSW
assert config.multi_tenancy_config.enabled is True
- if collection._connection._weaviate_version.is_at_least(1, 25, 2):
- assert config.multi_tenancy_config.auto_tenant_activation is True
- else:
- assert config.multi_tenancy_config.auto_tenant_activation is False
+ assert config.multi_tenancy_config.auto_tenant_activation is True
- if collection._connection._weaviate_version.is_at_least(1, 25, 1):
- assert config.multi_tenancy_config.auto_tenant_creation is True
- else:
- assert config.multi_tenancy_config.auto_tenant_creation is False
+ assert config.multi_tenancy_config.auto_tenant_creation is True
collection.config.update(
vectorizer_config=Reconfigure.VectorIndex.hnsw(
@@ -565,12 +510,7 @@ def test_collection_config_update(collection_factory: CollectionFactory) -> None
)
config = collection.config.get()
- if collection._connection._weaviate_version.is_at_least(
- 1, 25, 2
- ) or collection._connection._weaviate_version.is_lower_than(1, 25, 0):
- assert config.description == "Test"
- else:
- assert config.description is None
+ assert config.description == "Test"
assert config.inverted_index_config.bm25.b == 0.8
assert config.inverted_index_config.bm25.k1 == 1.25
@@ -584,10 +524,7 @@ def test_collection_config_update(collection_factory: CollectionFactory) -> None
== wvc.config.ReplicationDeletionStrategy.NO_AUTOMATED_RESOLUTION
)
- if collection._connection._weaviate_version.is_at_least(1, 26, 0):
- assert config.replication_config.async_enabled is True
- else:
- assert config.replication_config.async_enabled is False
+ assert config.replication_config.async_enabled is True
assert isinstance(config.vector_index_config, _VectorIndexConfigHNSW)
assert config.vector_index_config.cleanup_interval_seconds == 300
@@ -598,10 +535,7 @@ def test_collection_config_update(collection_factory: CollectionFactory) -> None
assert config.vector_index_config.ef == -1
assert config.vector_index_config.ef_construction == 128
assert config.vector_index_config.flat_search_cutoff == 40000
- if collection._connection._weaviate_version.is_lower_than(1, 26, 0):
- assert config.vector_index_config.max_connections == 64
- else:
- assert config.vector_index_config.max_connections == 32
+ assert config.vector_index_config.max_connections == 32
assert config.vector_index_config.quantizer is None
assert config.vector_index_config.skip is False
assert config.vector_index_config.vector_cache_max_objects == 2000000
@@ -626,10 +560,6 @@ def test_hnsw_with_bq(collection_factory: CollectionFactory) -> None:
def test_hnsw_with_sq(collection_factory: CollectionFactory) -> None:
- dummy = collection_factory("dummy")
- if dummy._connection._weaviate_version.is_lower_than(1, 26, 0):
- pytest.skip("SQ+HNSW is not supported in Weaviate versions lower than 1.26.0")
-
collection = collection_factory(
vector_index_config=Configure.VectorIndex.hnsw(
vector_cache_max_objects=5,
@@ -645,10 +575,6 @@ def test_hnsw_with_sq(collection_factory: CollectionFactory) -> None:
def test_hnsw_with_rq(collection_factory: CollectionFactory) -> None:
- dummy = collection_factory("dummy")
- if dummy._connection._weaviate_version.is_lower_than(1, 32, 0):
- pytest.skip("RQ+HNSW is not supported in Weaviate versions lower than 1.32.0")
-
collection = collection_factory(
vector_index_config=Configure.VectorIndex.hnsw(
vector_cache_max_objects=5,
@@ -706,6 +632,50 @@ def test_hnsw_with_rq4c(collection_factory: CollectionFactory) -> None:
assert config.vector_index_config.quantizer.training_limit == 10000
+@pytest.mark.parametrize(
+ "configure,reconfigure",
+ [
+ (Configure.VectorIndex.Quantizer.pq, Reconfigure.VectorIndex.Quantizer.pq),
+ (Configure.VectorIndex.Quantizer.bq, Reconfigure.VectorIndex.Quantizer.bq),
+ (Configure.VectorIndex.Quantizer.sq, Reconfigure.VectorIndex.Quantizer.sq),
+ (Configure.VectorIndex.Quantizer.rq, Reconfigure.VectorIndex.Quantizer.rq),
+ ],
+ ids=["pq", "bq", "sq", "rq"],
+)
+def test_hnsw_quantizer_rescore_factor(
+ collection_factory: CollectionFactory,
+ configure: Callable[..., Any],
+ reconfigure: Callable[..., Any],
+) -> None:
+ dummy = collection_factory("dummy")
+ if dummy._connection._weaviate_version.is_lower_than(1, 41, 0):
+ pytest.skip("rescoreFactor is not supported in Weaviate versions lower than 1.41.0")
+
+ collection = collection_factory(
+ vector_index_config=Configure.VectorIndex.hnsw(
+ quantizer=configure(rescore_limit=30, rescore_factor=2.5),
+ ),
+ )
+
+ config = collection.config.get()
+ assert isinstance(config.vector_index_config, _VectorIndexConfigHNSW)
+ assert config.vector_index_config.quantizer is not None
+ assert config.vector_index_config.quantizer.rescore_limit == 30
+ assert config.vector_index_config.quantizer.rescore_factor == 2.5
+
+ collection.config.update(
+ vector_index_config=Reconfigure.VectorIndex.hnsw(
+ quantizer=reconfigure(rescore_factor=4),
+ ),
+ )
+
+ config = collection.config.get()
+ assert isinstance(config.vector_index_config, _VectorIndexConfigHNSW)
+ assert config.vector_index_config.quantizer is not None
+ assert config.vector_index_config.quantizer.rescore_limit == 30
+ assert config.vector_index_config.quantizer.rescore_factor == 4
+
+
def test_hnsw_with_pathseer_filter_strategy(collection_factory: CollectionFactory) -> None:
dummy = collection_factory("dummy")
if dummy._connection._weaviate_version.is_lower_than(1, 40, 0):
@@ -968,9 +938,6 @@ def test_config_vector_index_flat_and_quantizer_rq(collection_factory: Collectio
def test_config_vector_index_hnsw_and_quantizer_rq(collection_factory: CollectionFactory) -> None:
- dummy = collection_factory("dummy")
- if dummy._connection._weaviate_version.is_lower_than(1, 32, 0):
- pytest.skip("RQ in HNSW index is not supported in Weaviate versions lower than 1.32.0")
collection = collection_factory(
vector_index_config=Configure.VectorIndex.hnsw(
vector_cache_max_objects=234,
@@ -1237,20 +1204,13 @@ def test_config_skip_vector_index(collection_factory: CollectionFactory) -> None
assert config.vector_index_config.ef == -1
assert config.vector_index_config.ef_construction == 128
assert config.vector_index_config.flat_search_cutoff == 40000
- if collection._connection._weaviate_version.is_lower_than(1, 26, 0):
- assert config.vector_index_config.max_connections == 64
- else:
- assert config.vector_index_config.max_connections == 32
+ assert config.vector_index_config.max_connections == 32
assert config.vector_index_config.quantizer is None
assert config.vector_index_config.skip is True
assert config.vector_index_config.vector_cache_max_objects == 1000000000000
def test_dynamic_collection(collection_factory: CollectionFactory) -> None:
- collection_dummy = collection_factory("dummy", ports=(8090, 50061))
- if collection_dummy._connection._weaviate_version.is_lower_than(1, 25, 0):
- pytest.skip("Dynamic index is not supported in Weaviate versions lower than 1.25.0")
-
collection = collection_factory(
vector_index_config=Configure.VectorIndex.dynamic(
distance_metric=VectorDistances.COSINE,
@@ -1444,14 +1404,13 @@ def test_create_custom_generative(collection_factory: CollectionFactory) -> None
assert config.generative_config.generative == "generative-anyscale"
assert config.generative_config.model == {"temperature": 0.5}
- if collection._connection._weaviate_version.is_at_least(1, 25, 24):
- collection.config.update(
- generative_config=Reconfigure.Generative.custom("generative-dummy"),
- )
- config = collection.config.get()
- assert config.generative_config is not None
- assert isinstance(config.generative_config.generative, str)
- assert config.generative_config.generative == "generative-dummy"
+ collection.config.update(
+ generative_config=Reconfigure.Generative.custom("generative-dummy"),
+ )
+ config = collection.config.get()
+ assert config.generative_config is not None
+ assert isinstance(config.generative_config.generative, str)
+ assert config.generative_config.generative == "generative-dummy"
def test_create_custom_reranker(collection_factory: CollectionFactory) -> None:
@@ -1473,14 +1432,13 @@ def test_create_custom_reranker(collection_factory: CollectionFactory) -> None:
assert config.reranker_config.reranker == "reranker-cohere"
assert config.reranker_config.model == {"model": "rerank-english-v2.0"}
- if collection._connection._weaviate_version.is_at_least(1, 25, 24):
- collection.config.update(
- reranker_config=Reconfigure.Reranker.custom("reranker-dummy"),
- )
- config = collection.config.get()
- assert config.reranker_config is not None
- assert isinstance(config.reranker_config.reranker, str)
- assert config.reranker_config.reranker == "reranker-dummy"
+ collection.config.update(
+ reranker_config=Reconfigure.Reranker.custom("reranker-dummy"),
+ )
+ config = collection.config.get()
+ assert config.reranker_config is not None
+ assert isinstance(config.reranker_config.reranker, str)
+ assert config.reranker_config.reranker == "reranker-dummy"
def test_create_custom_vectorizer(collection_factory: CollectionFactory) -> None:
@@ -1639,10 +1597,6 @@ def test_vectors_export_and_import_dict(
@pytest.mark.parametrize("index_range_filters", [True, False])
def test_range_filters(collection_factory: CollectionFactory, index_range_filters: bool) -> None:
- collection_dummy = collection_factory("dummy")
- if collection_dummy._connection._weaviate_version.is_lower_than(1, 26, 0):
- pytest.skip("range filters are not supported in Weaviate versions lower than 1.26.0")
-
collection = collection_factory(
properties=[
Property(name="text", data_type=DataType.INT, index_range_filters=index_range_filters)
@@ -1662,10 +1616,6 @@ def test_range_filters(collection_factory: CollectionFactory, index_range_filter
def test_replication_config(
collection_factory: CollectionFactory, deletion_strategy: wvc.config.ReplicationDeletionStrategy
) -> None:
- collection_dummy = collection_factory("dummy")
- if collection_dummy._connection._weaviate_version.is_lower_than(1, 24, 25):
- pytest.skip("deletion strategy is supported in Weaviate versions lower than 1.24, 25")
-
collection = collection_factory(
replication_config=wvc.config.Configure.replication(deletion_strategy=deletion_strategy),
)
@@ -1869,11 +1819,6 @@ def test_update_property_descriptions(collection_factory: CollectionFactory) ->
],
)
- if collection._connection._weaviate_version.is_lower_than(1, 27, 0):
- pytest.skip(
- "Property descriptions are not supported in currently released Weaviate versions lower than 1.27.0"
- )
-
config = collection.config.get()
assert config.properties[0].description is None
assert config.properties[1].description is None
@@ -1886,33 +1831,17 @@ def update():
}
)
- def is_supported():
- ver = collection._connection._weaviate_version
- return (
- (ver.is_at_least(1, 27, 15) and ver.is_lower_than(1, 28, 0))
- or (ver.is_at_least(1, 28, 9) and ver.is_lower_than(1, 29, 0))
- or (ver.is_at_least(1, 29, 1))
- )
-
- if is_supported():
- update()
+ update()
- config = collection.config.get()
- descriptions = [p.description for p in config.properties]
- assert "Age of the person" in descriptions
- assert "Name of the person" in descriptions
- else:
- with pytest.raises(UnexpectedStatusCodeError):
- update()
+ config = collection.config.get()
+ descriptions = [p.description for p in config.properties]
+ assert "Age of the person" in descriptions
+ assert "Name of the person" in descriptions
def test_config_multi_vector_enabled(
collection_factory: CollectionFactory,
) -> None:
- dummy = collection_factory("dummy", ports=(8086, 50057))
- if dummy._connection._weaviate_version.is_lower_than(1, 29, 0):
- pytest.skip("Multi vector is not supported in Weaviate versions lower than 1.29.0")
-
collection = collection_factory(
ports=(8086, 50057),
properties=[Property(name="name", data_type=DataType.TEXT)],
@@ -1927,10 +1856,7 @@ def test_config_multi_vector_enabled(
assert config.vector_config is not None
conf = config.vector_config["vec"].vector_index_config
assert isinstance(conf, _VectorIndexConfigHNSW)
- if collection._connection._weaviate_version.is_lower_than(1, 29, 0):
- assert conf.multi_vector is None
- else:
- assert conf.multi_vector is not None
+ assert conf.multi_vector is not None
def test_config_multi_vector_disabled(
@@ -1956,10 +1882,6 @@ def test_config_multi_vector_disabled(
def test_config_muvera_enabled(
collection_factory: CollectionFactory,
) -> None:
- dummy = collection_factory("dummy", ports=(8086, 50057))
- if dummy._connection._weaviate_version.is_lower_than(1, 31, 0):
- pytest.skip("Muvera is not supported in Weaviate versions lower than 1.31.0")
-
collection = collection_factory(
ports=(8086, 50057),
properties=[Property(name="name", data_type=DataType.TEXT)],
@@ -1975,20 +1897,13 @@ def test_config_muvera_enabled(
assert config.vector_config is not None
conf = config.vector_config["vec"].vector_index_config
assert isinstance(conf, _VectorIndexConfigHNSW)
- if collection._connection._weaviate_version.is_lower_than(1, 31, 0):
- assert conf.multi_vector is None
- else:
- assert conf.multi_vector is not None
- assert conf.multi_vector.encoding is not None
+ assert conf.multi_vector is not None
+ assert conf.multi_vector.encoding is not None
def test_config_muvera_disabled(
collection_factory: CollectionFactory,
) -> None:
- dummy = collection_factory("dummy", ports=(8086, 50057))
- if dummy._connection._weaviate_version.is_lower_than(1, 29, 0):
- pytest.skip("Multivector is not supported in Weaviate versions lower than 1.29.0")
-
collection = collection_factory(
ports=(8086, 50057),
properties=[Property(name="name", data_type=DataType.TEXT)],
@@ -2019,10 +1934,6 @@ def test_config_add_vector(
collection_factory: CollectionFactory,
existing_vectors: Union[_VectorizerConfigCreate, List[_NamedVectorConfigCreate], None],
) -> None:
- dummy = collection_factory("dummy")
- if dummy._connection._weaviate_version.is_lower_than(1, 31, 0):
- pytest.skip("Adding vectors is not supported in Weaviate versions lower than 1.31.0")
-
collection = collection_factory(
vectorizer_config=existing_vectors,
properties=[Property(name="name", data_type=DataType.TEXT)],
diff --git a/integration/test_collection_hybrid.py b/integration/test_collection_hybrid.py
index 696cf5b43..05fdf6a02 100644
--- a/integration/test_collection_hybrid.py
+++ b/integration/test_collection_hybrid.py
@@ -21,9 +21,6 @@
_HybridNearVector,
)
from weaviate.collections.classes.internal import Object
-from weaviate.exceptions import (
- WeaviateUnsupportedFeatureError,
-)
@pytest.mark.parametrize("fusion_type", [HybridFusion.RANKED, HybridFusion.RELATIVE_SCORE])
@@ -167,14 +164,6 @@ def test_hybrid_near_vector_search(collection_factory: CollectionFactory) -> Non
uuid_banana = collection.data.insert({"text": "banana"})
obj = collection.query.fetch_object_by_id(uuid_banana, include_vector=True)
- if collection._connection._weaviate_version.is_lower_than(1, 25, 0):
- with pytest.raises(WeaviateUnsupportedFeatureError):
- collection.query.hybrid(
- query=None,
- vector=wvc.query.HybridVector.near_vector(vector=obj.vector["default"]),
- ).objects
- return
-
collection.data.insert({"text": "dog"})
collection.data.insert({"text": "different concept"})
@@ -226,16 +215,7 @@ def test_hybrid_near_vector_search_named_vectors(collection_factory: CollectionF
obj = collection.query.fetch_object_by_id(uuid_banana, include_vector=True)
- if collection._connection._weaviate_version.is_lower_than(1, 25, 0):
- with pytest.raises(WeaviateUnsupportedFeatureError):
- hybrid_objs: List[Object[Any, Any]] = collection.query.hybrid(
- query=None,
- vector=wvc.query.HybridVector.near_vector(vector=obj.vector["text"]),
- target_vector="text",
- ).objects
- return
-
- hybrid_objs = collection.query.hybrid(
+ hybrid_objs: List[Object[Any, Any]] = collection.query.hybrid(
query=None,
vector=wvc.query.HybridVector.near_vector(vector=obj.vector["text"]),
target_vector="text",
@@ -274,14 +254,6 @@ def test_hybrid_near_text_search(collection_factory: CollectionFactory) -> None:
),
)
- if collection._connection._weaviate_version.is_lower_than(1, 25, 0):
- with pytest.raises(WeaviateUnsupportedFeatureError):
- collection.query.hybrid(
- query=None,
- vector=wvc.query.HybridVector.near_text(query="banana pudding"),
- ).objects
- return
-
uuid_banana_pudding = collection.data.insert({"text": "banana pudding"})
collection.data.insert({"text": "banana smoothie"})
collection.data.insert({"text": "different concept"})
@@ -327,16 +299,7 @@ def test_hybrid_near_text_search_named_vectors(collection_factory: CollectionFac
collection.data.insert({"text": "banana smoothie"})
collection.data.insert({"text": "different concept"})
- if collection._connection._weaviate_version.is_lower_than(1, 25, 0):
- with pytest.raises(WeaviateUnsupportedFeatureError):
- hybrid_objs: List[Object[Any, Any]] = collection.query.hybrid(
- query=None,
- vector=wvc.query.HybridVector.near_text(query="banana pudding"),
- target_vector="text",
- ).objects
- return
-
- hybrid_objs = collection.query.hybrid(
+ hybrid_objs: List[Object[Any, Any]] = collection.query.hybrid(
query=None,
vector=wvc.query.HybridVector.near_text(query="banana pudding"),
target_vector="text",
@@ -371,10 +334,6 @@ def test_hybrid_near_text_search_named_vectors(collection_factory: CollectionFac
def test_vector_per_target(
collection_factory: CollectionFactory, vector: NearVectorInputType
) -> None:
- dummy = collection_factory("dummy")
- if dummy._connection._weaviate_version.is_lower_than(1, 26, 0):
- pytest.skip("No multi target search below 1.26")
-
collection = collection_factory(
properties=[],
vectorizer_config=[
@@ -434,10 +393,6 @@ def test_same_target_vector_multiple_input_combinations(
near_vector: Union[List[float], _HybridNearVector],
target_vector: List[str],
) -> None:
- dummy = collection_factory("dummy")
- if dummy._connection._weaviate_version.is_lower_than(1, 27, 0):
- pytest.skip("Multi vector per target is not supported in versions lower than 1.27.0")
-
collection = collection_factory(
properties=[],
vectorizer_config=[
@@ -466,9 +421,6 @@ def test_vector_distance(collection_factory: CollectionFactory):
),
)
- if collection._connection._weaviate_version.is_lower_than(1, 26, 3):
- pytest.skip("Hybrid max vector distance is only supported in versions higher than 1.26.3")
-
uuid1 = collection.data.insert({}, vector=[1, 0, 0])
collection.data.insert({}, vector=[0, 1, 0])
collection.data.insert({}, vector=[0, 0, 1])
@@ -488,9 +440,6 @@ def test_aggregate_max_vector_distance(collection_factory: CollectionFactory) ->
vectorizer_config=Configure.Vectorizer.none(),
)
- if collection._connection._weaviate_version.is_lower_than(1, 26, 3):
- pytest.skip("Hybrid max vector distance is only supported in versions higher than 1.26.3")
-
collection.data.insert({"name": "banana one"}, vector=[1, 0, 0, 0])
collection.data.insert({"name": "banana two"}, vector=[0, 1, 0, 0])
collection.data.insert({"name": "banana three"}, vector=[0, 1, 0, 0])
@@ -511,9 +460,6 @@ def test_hybrid_bm25_operators(collection_factory: CollectionFactory) -> None:
vectorizer_config=Configure.Vectorizer.none(),
)
- if collection._connection._weaviate_version.is_lower_than(1, 31, 0):
- pytest.skip("bm25 operators are only supported in versions higher than 1.31.0")
-
uuid1 = collection.data.insert({"name": "banana one"}, vector=[1, 0, 0, 0])
uuid2 = collection.data.insert({"name": "banana two"}, vector=[0, 1, 0, 0])
uuid3 = collection.data.insert({"name": "banana three"}, vector=[0, 1, 0, 0])
diff --git a/integration/test_collection_near_vector.py b/integration/test_collection_near_vector.py
index a10f191ad..d7f7869df 100644
--- a/integration/test_collection_near_vector.py
+++ b/integration/test_collection_near_vector.py
@@ -156,10 +156,6 @@ def test_near_vector_with_other_input(
def test_near_vector_with_named_vector_other_input(
collection_factory: CollectionFactory, near_vector: Any
) -> None:
- dummy = collection_factory("dummy")
- if dummy._connection._weaviate_version.is_lower_than(1, 26, 0):
- pytest.skip("Named vectors are supported in versions higher than 1.26.0")
-
collection = collection_factory(
vectorizer_config=[
Configure.NamedVectors.none("first"),
@@ -176,10 +172,6 @@ def test_near_vector_with_named_vector_other_input(
def test_near_vector_with_extra_vectors(collection_factory: CollectionFactory):
- dummy = collection_factory("dummy")
- if dummy._connection._weaviate_version.is_lower_than(1, 26, 0):
- pytest.skip("Named vectors are supported in versions higher than 1.26.0")
-
collection = collection_factory(
vectorizer_config=[
Configure.NamedVectors.none("first"),
diff --git a/integration/test_collection_openai.py b/integration/test_collection_openai.py
index 0bd224f8e..8b301e4ad 100644
--- a/integration/test_collection_openai.py
+++ b/integration/test_collection_openai.py
@@ -21,7 +21,6 @@
from weaviate.collections.classes.grpc import GroupBy, Rerank
from weaviate.exceptions import WeaviateQueryError, WeaviateUnsupportedFeatureError
from weaviate.proto.v1 import generative_pb2
-from weaviate.util import _ServerVersion
@pytest.mark.parametrize("parameter,answer", [("text", "yes"), ("content", "no")])
@@ -594,9 +593,6 @@ def test_queries_with_rerank_and_generative(collection_factory: CollectionFactor
ports=(8086, 50057),
headers={"X-Cohere-Api-Key": api_key},
)
- if collection._connection._weaviate_version < _ServerVersion(1, 23, 1):
- pytest.skip("Generative reranking requires Weaviate 1.23.1 or higher")
-
insert = collection.data.insert_many(
[{"text": "This is a test"}, {"text": "This is another test"}]
)
@@ -705,41 +701,37 @@ def test_near_text_generate_with_dynamic_rag(
),
)
- if collection._connection._weaviate_version.is_lower_than(1, 30, 0):
- with pytest.raises(WeaviateUnsupportedFeatureError):
- res = query()
+ res = query()
+ # deprecated usage
+ assert res.generated == "bananas melons"
+ assert res.objects[0].generated is not None
+ assert res.objects[1].generated is not None
+
+ assert res.generative is not None
+ assert res.generative.text == "bananas melons"
+
+ if isinstance(grouped, _GroupedTask):
+ assert isinstance(res.generative.metadata, generative_pb2.GenerativeOpenAIMetadata)
+ else:
+ assert res.generative.metadata is None
+
+ g0 = res.objects[0].generative
+ g1 = res.objects[1].generative
+
+ assert g0 is not None
+ assert g0.text is not None
+ assert g1 is not None
+ assert g1.text is not None
+
+ if isinstance(single, _SinglePrompt):
+ assert g0.debug is not None
+ assert isinstance(g0.metadata, generative_pb2.GenerativeOpenAIMetadata)
+ assert g1.debug is not None
+ assert isinstance(g1.metadata, generative_pb2.GenerativeOpenAIMetadata)
else:
- res = query()
- # deprecated usage
- assert res.generated == "bananas melons"
- assert res.objects[0].generated is not None
- assert res.objects[1].generated is not None
-
- assert res.generative is not None
- assert res.generative.text == "bananas melons"
-
- if isinstance(grouped, _GroupedTask):
- assert isinstance(res.generative.metadata, generative_pb2.GenerativeOpenAIMetadata)
- else:
- assert res.generative.metadata is None
-
- g0 = res.objects[0].generative
- g1 = res.objects[1].generative
-
- assert g0 is not None
- assert g0.text is not None
- assert g1 is not None
- assert g1.text is not None
-
- if isinstance(single, _SinglePrompt):
- assert g0.debug is not None
- assert isinstance(g0.metadata, generative_pb2.GenerativeOpenAIMetadata)
- assert g1.debug is not None
- assert isinstance(g1.metadata, generative_pb2.GenerativeOpenAIMetadata)
- else:
- assert g0.debug is None
- assert g0.metadata is None
- assert g1.metadata is None
+ assert g0.debug is None
+ assert g0.metadata is None
+ assert g1.metadata is None
@pytest.mark.parametrize("parameter,answer", [("text", "yes"), ("content", "no")])
@@ -768,8 +760,6 @@ def test_contextualai_generative_search_single(
headers={"X-Contextual-Api-Key": api_key},
ports=(8086, 50057),
)
- if collection._connection._weaviate_version.is_lower_than(1, 23, 1):
- pytest.skip("Generative search requires Weaviate 1.23.1 or higher")
collection.data.insert_many(
[
@@ -811,8 +801,6 @@ def test_contextualai_generative_with_knowledge_parameter(
headers={"X-Contextual-Api-Key": api_key},
ports=(8086, 50057),
)
- if collection._connection._weaviate_version.is_lower_than(1, 23, 1):
- pytest.skip("Generative search requires Weaviate 1.23.1 or higher")
collection.data.insert_many(
[
@@ -856,9 +844,6 @@ def test_contextualai_generative_and_rerank_combined(collection_factory: Collect
headers={"X-Contextual-Api-Key": contextual_api_key},
ports=(8086, 50057),
)
- if collection._connection._weaviate_version < _ServerVersion(1, 23, 1):
- pytest.skip("Generative reranking requires Weaviate 1.23.1 or higher")
-
insert = collection.data.insert_many(
[{"text": "This is a test"}, {"text": "This is another test"}]
)
diff --git a/integration/test_collection_rerank.py b/integration/test_collection_rerank.py
index 61f6bade0..64d1d94e2 100644
--- a/integration/test_collection_rerank.py
+++ b/integration/test_collection_rerank.py
@@ -7,26 +7,6 @@
from .conftest import CollectionFactory
-def test_query_using_rerank_with_old_server(collection_factory: CollectionFactory) -> None:
- collection = collection_factory(
- reranker_config=wvc.config.Configure.Reranker.custom("reranker-dummy"),
- vectorizer_config=wvc.config.Configure.Vectorizer.none(),
- properties=[wvc.config.Property(name="text", data_type=wvc.config.DataType.TEXT)],
- )
- if collection._connection._weaviate_version.is_at_least(1, 23, 1):
- pytest.skip("Reranking works with 1.23.1 or higher so no need to test this")
-
- collection.data.insert_many([{"text": "This is a test"}, {"text": "This is another test"}])
-
- with pytest.warns(UserWarning):
- objs = collection.query.bm25(
- "test", rerank=wvc.query.Rerank(prop="text", query="another")
- ).objects
- assert len(objs) == 2
- assert objs[0].metadata.rerank_score is None
- assert objs[1].metadata.rerank_score is None
-
-
def test_queries_with_rerank(collection_factory: CollectionFactory) -> None:
api_key = os.environ.get("COHERE_APIKEY")
if api_key is None:
@@ -40,8 +20,6 @@ def test_queries_with_rerank(collection_factory: CollectionFactory) -> None:
headers={"X-Cohere-Api-Key": api_key},
ports=(8086, 50057),
)
- if collection._connection._weaviate_version.is_lower_than(1, 23, 1):
- pytest.skip("Reranking requires Weaviate 1.23.1 or higher")
insert = collection.data.insert_many(
[{"text": "This is a test"}, {"text": "This is another test"}]
@@ -96,8 +74,6 @@ def test_queries_with_rerank_and_group_by(collection_factory: CollectionFactory)
headers={"X-Cohere-Api-Key": api_key},
ports=(8086, 50057),
)
- if collection._connection._weaviate_version.is_lower_than(1, 23, 1):
- pytest.skip("Reranking requires Weaviate 1.23.1 or higher")
insert = collection.data.insert_many(
[{"text": "This is a test"}, {"text": "This is another test"}]
@@ -157,8 +133,6 @@ def test_queries_with_rerank_contextualai(collection_factory: CollectionFactory)
headers={"X-Contextual-Api-Key": api_key},
ports=(8086, 50057),
)
- if collection._connection._weaviate_version.is_lower_than(1, 23, 1):
- pytest.skip("Reranking requires Weaviate 1.23.1 or higher")
insert = collection.data.insert_many(
[{"text": "This is a test"}, {"text": "This is another test"}]
diff --git a/integration/test_groups.py b/integration/test_groups.py
index 92ee95d2a..fd83e33b9 100644
--- a/integration/test_groups.py
+++ b/integration/test_groups.py
@@ -1,5 +1,3 @@
-import pytest
-
from integration.conftest import ClientFactory
from weaviate.auth import Auth
from weaviate.rbac.models import GroupTypes, Role
@@ -10,9 +8,6 @@
def test_assign_and_get_group_roles_oidc(client_factory: ClientFactory) -> None:
with client_factory(ports=RBAC_PORTS, auth_credentials=RBAC_AUTH_CREDS) as client:
- if client._connection._weaviate_version.is_lower_than(1, 32, 0):
- pytest.skip("This test requires Weaviate 1.32.0 or higher")
-
roles_to_assign = ["viewer", "admin"]
group_id = "/assign-group"
client.groups.oidc.revoke_roles(group_id=group_id, role_names=roles_to_assign)
@@ -40,9 +35,6 @@ def test_assign_and_get_group_roles_oidc(client_factory: ClientFactory) -> None:
def test_known_groups(client_factory: ClientFactory) -> None:
with client_factory(ports=RBAC_PORTS, auth_credentials=RBAC_AUTH_CREDS) as client:
- if client._connection._weaviate_version.is_lower_than(1, 32, 0):
- pytest.skip("This test requires Weaviate 1.32.0 or higher")
-
group1 = "/known-group1"
group2 = "/known-group2"
client.groups.oidc.assign_roles(group_id=group1, role_names="viewer")
@@ -64,9 +56,6 @@ def test_known_groups(client_factory: ClientFactory) -> None:
def test_get_group_assignments(client_factory: ClientFactory) -> None:
with client_factory(ports=RBAC_PORTS, auth_credentials=RBAC_AUTH_CREDS) as client:
- if client._connection._weaviate_version.is_lower_than(1, 32, 0):
- pytest.skip("This test requires Weaviate 1.32.0 or higher")
-
role_name = "test_group_assignments_role"
client.roles.delete(role_name=role_name)
client.roles.create(role_name=role_name, permissions=[])
diff --git a/integration/test_rbac.py b/integration/test_rbac.py
index 7f805195a..0c8b05639 100644
--- a/integration/test_rbac.py
+++ b/integration/test_rbac.py
@@ -371,7 +371,7 @@
],
groups_permissions=[],
),
- 32,
+ None,
),
(
Permissions.alias(alias="*", collection="*", read=True, delete=True),
@@ -396,7 +396,7 @@
replicate_permissions=[],
groups_permissions=[],
),
- 32, # Minimum version for alias permissions
+ None,
),
(
Permissions.alias(alias="myCAR", collection="*", read=True, delete=True),
@@ -421,7 +421,7 @@
replicate_permissions=[],
groups_permissions=[],
),
- 32, # Minimum version for alias permissions
+ None,
),
(
Permissions.mcp(create=True, read=True, update=True),
@@ -488,7 +488,7 @@
)
],
),
- 32, # Minimum version for group permissions
+ None,
),
],
)
@@ -499,8 +499,6 @@ def test_create_role(
min_version: Optional[int],
) -> None:
with client_factory(ports=RBAC_PORTS, auth_credentials=RBAC_AUTH_CREDS) as client:
- if client._connection._weaviate_version.is_lower_than(1, 28, 0):
- pytest.skip("This test requires Weaviate 1.28.0 or higher")
if min_version is not None and client._connection._weaviate_version.is_lower_than(
1, min_version, 0
):
@@ -522,9 +520,6 @@ def test_create_role(
def test_create_role_with_empty_alias(client_factory: ClientFactory) -> None:
with client_factory(ports=RBAC_PORTS, auth_credentials=RBAC_AUTH_CREDS) as client:
version = client._connection._weaviate_version
- if version.is_lower_than(1, 32, 0):
- pytest.skip("Alias permissions require Weaviate 1.32.0 or higher")
-
role_name = "AlliasRole2"
permissions = Permissions.alias(alias="", collection="*", read=True, delete=True)
try:
@@ -568,8 +563,6 @@ def test_create_role_with_empty_alias(client_factory: ClientFactory) -> None:
def test_add_permissions_to_existing(client_factory: ClientFactory) -> None:
with client_factory(ports=RBAC_PORTS, auth_credentials=RBAC_AUTH_CREDS) as client:
- if client._connection._weaviate_version.is_lower_than(1, 28, 0):
- pytest.skip("This test requires Weaviate 1.28.0 or higher")
role_name = "ExistingRolePermissionsAdd"
client.roles.delete(role_name)
try:
@@ -607,8 +600,6 @@ def test_add_permissions_to_existing(client_factory: ClientFactory) -> None:
def test_remove_permissions_from_existing(client_factory: ClientFactory) -> None:
with client_factory(ports=RBAC_PORTS, auth_credentials=RBAC_AUTH_CREDS) as client:
- if client._connection._weaviate_version.is_lower_than(1, 28, 0):
- pytest.skip("This test requires Weaviate 1.28.0 or higher")
role_name = "ExistingRolePermissionsRemove"
client.roles.delete(role_name)
try:
@@ -645,8 +636,6 @@ def test_remove_permissions_from_existing(client_factory: ClientFactory) -> None
def test_multiple_permissions(client_factory: ClientFactory) -> None:
with client_factory(ports=RBAC_PORTS, auth_credentials=RBAC_AUTH_CREDS) as client:
- if client._connection._weaviate_version.is_lower_than(1, 28, 0):
- pytest.skip("This test requires Weaviate 1.28.0 or higher")
role_name = "MultiplePermissions"
try:
required_permissions = [
@@ -690,8 +679,6 @@ def test_multiple_permissions(client_factory: ClientFactory) -> None:
@pytest.mark.parametrize("scope", [RoleScope.ALL, RoleScope.MATCH])
def test_role_scope(client_factory: ClientFactory, scope: RoleScope, request: SubRequest) -> None:
with client_factory(ports=RBAC_PORTS, auth_credentials=RBAC_AUTH_CREDS) as client:
- if client._connection._weaviate_version.is_lower_than(1, 28, 4):
- pytest.skip("This test requires Weaviate 1.28.4 or higher")
role_name = _sanitize_collection_name(request.node.name) + "_scope"
try:
client.roles.delete(role_name)
@@ -710,8 +697,6 @@ def test_role_scope(client_factory: ClientFactory, scope: RoleScope, request: Su
def test_get_assigned_users(client_factory: ClientFactory) -> None:
with client_factory(ports=RBAC_PORTS, auth_credentials=RBAC_AUTH_CREDS) as client:
- if client._connection._weaviate_version.is_lower_than(1, 28, 0):
- pytest.skip("This test requires Weaviate 1.28.0 or higher")
client.users.assign_roles(user_id="admin-user", role_names="viewer")
assigned_users = client.roles.get_assigned_user_ids("viewer")
assert len(assigned_users) == 1
@@ -720,9 +705,6 @@ def test_get_assigned_users(client_factory: ClientFactory) -> None:
def test_get_assigned_users_db(client_factory: ClientFactory, request: SubRequest) -> None:
with client_factory(ports=RBAC_PORTS, auth_credentials=RBAC_AUTH_CREDS) as client:
- if client._connection._weaviate_version.is_lower_than(1, 30, 0):
- pytest.skip("This test requires Weaviate 1.30.0 or higher")
-
names = _sanitize_collection_name(request.node.name)
client.roles.delete(names)
client.roles.create(
@@ -752,9 +734,6 @@ def test_get_assigned_users_db(client_factory: ClientFactory, request: SubReques
def test_get_assigned_oidc_db(client_factory: ClientFactory, request: SubRequest) -> None:
with client_factory(ports=RBAC_PORTS, auth_credentials=RBAC_AUTH_CREDS) as client:
- if client._connection._weaviate_version.is_lower_than(1, 30, 0):
- pytest.skip("This test requires Weaviate 1.30.0 or higher")
-
names = _sanitize_collection_name(request.node.name)
client.roles.delete(names)
client.roles.create(
@@ -773,8 +752,6 @@ def test_get_assigned_oidc_db(client_factory: ClientFactory, request: SubRequest
def test_permission_output_as_input(client_factory: ClientFactory) -> None:
with client_factory(ports=RBAC_PORTS, auth_credentials=RBAC_AUTH_CREDS) as client:
- if client._connection._weaviate_version.is_lower_than(1, 28, 0):
- pytest.skip("This test requires Weaviate 1.28.0 or higher")
role_name = "PermissionOutputAsInput"
try:
client.roles.create(
@@ -802,8 +779,6 @@ def test_permission_output_as_input(client_factory: ClientFactory) -> None:
def test_permission_joining(client_factory: ClientFactory) -> None:
with client_factory(ports=RBAC_PORTS, auth_credentials=RBAC_AUTH_CREDS) as client:
- if client._connection._weaviate_version.is_lower_than(1, 28, 0):
- pytest.skip("This test requires Weaviate 1.28.0 or higher")
role_name = "PermissionJoining"
try:
client.roles.create(
diff --git a/integration/test_replicate.py b/integration/test_replicate.py
index 94adf5be5..6bb1de860 100644
--- a/integration/test_replicate.py
+++ b/integration/test_replicate.py
@@ -16,10 +16,6 @@
def replicate_collection(collection_factory: CollectionFactory):
- dummy = collection_factory("dummy", ports=PORTS)
- if dummy._connection._weaviate_version.is_lower_than(1, 32, 0):
- pytest.skip("Replication operations require Weaviate 1.32.0 or higher")
-
collection = collection_factory(
properties=[
weaviate.classes.config.Property(
diff --git a/integration/test_tenants.py b/integration/test_tenants.py
index 9810b3924..a892be40f 100644
--- a/integration/test_tenants.py
+++ b/integration/test_tenants.py
@@ -21,7 +21,6 @@
from weaviate.collections.tenants import TenantCreateInputType
from weaviate.exceptions import (
WeaviateInvalidInputError,
- WeaviateUnsupportedFeatureError,
)
@@ -144,15 +143,10 @@ def test_tenants(collection_factory: CollectionFactory) -> None:
assert tenants["tenant1"].name == "tenant1"
assert tenants["tenant2"].name == "tenant2"
- if collection._connection._weaviate_version.supports_tenants_get_grpc:
- tenants = collection.tenants.get_by_names(tenants=["tenant2"])
- assert len(tenants) == 1
- assert isinstance(tenants["tenant2"], Tenant)
- assert tenants["tenant2"].name == "tenant2"
- else:
- pytest.raises(
- WeaviateUnsupportedFeatureError, collection.tenants.get_by_names, tenants=["tenant2"]
- )
+ tenants = collection.tenants.get_by_names(tenants=["tenant2"])
+ assert len(tenants) == 1
+ assert isinstance(tenants["tenant2"], Tenant)
+ assert tenants["tenant2"].name == "tenant2"
collection.tenants.remove(["tenant1", "tenant2"])
@@ -309,23 +303,17 @@ def test_tenant_exists(collection_factory: CollectionFactory) -> None:
tenant = Tenant(name="1")
collection.tenants.create([tenant])
- if collection._connection._weaviate_version.is_lower_than(1, 25, 0):
- with pytest.raises(WeaviateUnsupportedFeatureError):
- collection.tenants.exists(tenant.name)
- else:
- assert collection.tenants.exists(tenant.name)
- assert collection.tenants.exists(tenant)
- assert not collection.tenants.exists("2")
+ assert collection.tenants.exists(tenant.name)
+ assert collection.tenants.exists(tenant)
+ assert not collection.tenants.exists("2")
@pytest.mark.parametrize("tenant1", ["tenant1", Tenant(name="tenant1")])
@pytest.mark.parametrize("tenant2", ["tenant2", Tenant(name="tenant2")])
-@pytest.mark.parametrize("tenant3", ["tenant3", Tenant(name="tenant3")])
def test_tenant_get_by_name(
collection_factory: CollectionFactory,
tenant1: Union[str, Tenant],
tenant2: Union[str, Tenant],
- tenant3: Union[str, Tenant],
) -> None:
collection = collection_factory(
vectorizer_config=Configure.Vectorizer.none(),
@@ -334,15 +322,12 @@ def test_tenant_get_by_name(
collection.tenants.create([Tenant(name="tenant1")])
- if collection._connection._weaviate_version.supports_tenants_get_grpc:
- tenant = collection.tenants.get_by_name(tenant1)
- assert tenant is not None
- assert tenant.name == "tenant1"
+ tenant = collection.tenants.get_by_name(tenant1)
+ assert tenant is not None
+ assert tenant.name == "tenant1"
- tenant = collection.tenants.get_by_name(tenant2)
- assert tenant is None
- else:
- pytest.raises(WeaviateUnsupportedFeatureError, collection.tenants.get_by_name, tenant3)
+ tenant = collection.tenants.get_by_name(tenant2)
+ assert tenant is None
def test_autotenant_toggling(collection_factory: CollectionFactory) -> None:
@@ -350,8 +335,6 @@ def test_autotenant_toggling(collection_factory: CollectionFactory) -> None:
vectorizer_config=Configure.Vectorizer.none(),
multi_tenancy_config=Configure.multi_tenancy(enabled=True),
)
- if collection._connection._weaviate_version.is_lower_than(1, 25, 0):
- pytest.skip("Auto-tenant creation is not supported in this version")
assert not collection.config.get().multi_tenancy_config.auto_tenant_creation
@@ -486,10 +469,6 @@ def test_tenants_create_and_update_1001_tenants(
def test_tenants_auto_tenant_creation(
client_factory: ClientFactory, collection_factory: CollectionFactory
) -> None:
- dummy = collection_factory("dummy")
- if dummy._connection._weaviate_version.is_lower_than(1, 25, 0):
- pytest.skip("Auto-tenant creation is not supported in this version")
-
collection = collection_factory(
properties=[Property(name="name", data_type=DataType.TEXT)],
vectorizer_config=Configure.Vectorizer.none(),
diff --git a/integration/test_users.py b/integration/test_users.py
index 2c1f51c4f..bdf705c62 100644
--- a/integration/test_users.py
+++ b/integration/test_users.py
@@ -1,3 +1,7 @@
+import os
+from datetime import datetime, timedelta, timezone
+from typing import Callable, Union
+
import pytest
from _pytest.fixtures import SubRequest
@@ -5,6 +9,7 @@
from integration.conftest import ClientFactory, _sanitize_collection_name
from weaviate.auth import Auth
from weaviate.rbac.models import Role, RoleBase, UserTypes
+from weaviate.users.sync import _UsersDB
RBAC_PORTS = (8092, 50063)
RBAC_AUTH_CREDS = Auth.api_key("admin-key")
@@ -16,8 +21,6 @@ def _unique_user_id(name: str) -> str:
def test_own_user(client_factory: ClientFactory) -> None:
with client_factory(ports=RBAC_PORTS, auth_credentials=RBAC_AUTH_CREDS) as client:
- if client._connection._weaviate_version.is_lower_than(1, 28, 0):
- pytest.skip("This test requires Weaviate 1.28.0 or higher")
user = client.users.get_my_user()
assert len(user.roles) > 0
assert user.user_id == "admin-user"
@@ -25,16 +28,12 @@ def test_own_user(client_factory: ClientFactory) -> None:
def test_get_user_roles_deprecated(client_factory: ClientFactory) -> None:
with client_factory(ports=RBAC_PORTS, auth_credentials=RBAC_AUTH_CREDS) as client:
- if client._connection._weaviate_version.is_lower_than(1, 28, 0):
- pytest.skip("This test requires Weaviate 1.28.0 or higher")
roles = client.users.get_assigned_roles("admin-user")
assert len(roles) > 0
def test_get_user_roles_db(client_factory: ClientFactory) -> None:
with client_factory(ports=RBAC_PORTS, auth_credentials=RBAC_AUTH_CREDS) as client:
- if client._connection._weaviate_version.is_lower_than(1, 30, 0):
- pytest.skip("This test requires Weaviate 1.30.0 or higher")
roles_base = client.users.db.get_assigned_roles(user_id="admin-user")
names = list(roles_base.keys())
assert len(roles_base) > 0
@@ -47,8 +46,6 @@ def test_get_user_roles_db(client_factory: ClientFactory) -> None:
def test_get_user_roles_oidc(client_factory: ClientFactory) -> None:
with client_factory(ports=RBAC_PORTS, auth_credentials=RBAC_AUTH_CREDS) as client:
- if client._connection._weaviate_version.is_lower_than(1, 30, 0):
- pytest.skip("This test requires Weaviate 1.30.0 or higher")
roles_base = client.users.oidc.get_assigned_roles(user_id="admin-user")
names = list(roles_base.keys())
assert len(roles_base) > 0
@@ -61,16 +58,12 @@ def test_get_user_roles_oidc(client_factory: ClientFactory) -> None:
def test_get_user_with_no_roles(client_factory: ClientFactory) -> None:
with client_factory(ports=RBAC_PORTS, auth_credentials=Auth.api_key("custom-key")) as client:
- if client._connection._weaviate_version.is_lower_than(1, 28, 0):
- pytest.skip("This test requires Weaviate 1.28.0 or higher")
user = client.users.get_my_user()
assert len(user.roles) == 0
def test_get_static_db_user(client_factory: ClientFactory) -> None:
with client_factory(ports=RBAC_PORTS, auth_credentials=RBAC_AUTH_CREDS) as client:
- if client._connection._weaviate_version.is_lower_than(1, 30, 0):
- pytest.skip("This test requires Weaviate 1.30.0 or higher")
user = client.users.db.get(user_id="admin-user")
assert len(user.role_names) > 0
assert user.user_id == "admin-user"
@@ -81,9 +74,6 @@ def test_get_static_db_user(client_factory: ClientFactory) -> None:
def test_create_user_and_get(client_factory: ClientFactory, request: SubRequest) -> None:
with client_factory(ports=(RBAC_PORTS), auth_credentials=Auth.api_key("admin-key")) as client:
- if client._connection._weaviate_version.is_lower_than(1, 30, 0):
- pytest.skip("This test requires Weaviate 1.30.0 or higher")
-
user_id = _unique_user_id(request.node.name)
api_key = client.users.db.create(user_id=user_id)
with weaviate.connect_to_local(
@@ -100,9 +90,6 @@ def test_create_user_and_get(client_factory: ClientFactory, request: SubRequest)
def test_delete_user(client_factory: ClientFactory, request: SubRequest) -> None:
with client_factory(ports=RBAC_PORTS, auth_credentials=Auth.api_key("admin-key")) as client:
- if client._connection._weaviate_version.is_lower_than(1, 30, 0):
- pytest.skip("This test requires Weaviate 1.30.0 or higher")
-
user_id = _unique_user_id(request.node.name)
client.users.db.create(user_id=user_id)
assert client.users.db.delete(user_id=user_id)
@@ -112,9 +99,6 @@ def test_delete_user(client_factory: ClientFactory, request: SubRequest) -> None
def test_rotate_user_key(client_factory: ClientFactory, request: SubRequest) -> None:
with client_factory(ports=RBAC_PORTS, auth_credentials=Auth.api_key("admin-key")) as client:
- if client._connection._weaviate_version.is_lower_than(1, 30, 0):
- pytest.skip("This test requires Weaviate 1.30.0 or higher")
-
user_id = _unique_user_id(request.node.name)
api_key = client.users.db.create(user_id=user_id)
with weaviate.connect_to_local(
@@ -135,9 +119,6 @@ def test_rotate_user_key(client_factory: ClientFactory, request: SubRequest) ->
def test_de_activate(client_factory: ClientFactory, request: SubRequest) -> None:
with client_factory(ports=RBAC_PORTS, auth_credentials=Auth.api_key("admin-key")) as client:
- if client._connection._weaviate_version.is_lower_than(1, 30, 0):
- pytest.skip("This test requires Weaviate 1.30.0 or higher")
-
user_id = _unique_user_id(request.node.name)
client.users.db.create(user_id=user_id)
@@ -159,9 +140,6 @@ def test_de_activate(client_factory: ClientFactory, request: SubRequest) -> None
def test_deactivate_and_revoke(client_factory: ClientFactory, request: SubRequest) -> None:
with client_factory(ports=RBAC_PORTS, auth_credentials=Auth.api_key("admin-key")) as client:
- if client._connection._weaviate_version.is_lower_than(1, 30, 0):
- pytest.skip("This test requires Weaviate 1.30.0 or higher")
-
user_id = _unique_user_id(request.node.name)
api_key_old = client.users.db.create(user_id=user_id)
assert client.users.db.deactivate(user_id=user_id, revoke_key=True)
@@ -195,8 +173,6 @@ def test_deactivate_and_revoke(client_factory: ClientFactory, request: SubReques
def test_deprecated_syntax(client_factory: ClientFactory, request: SubRequest) -> None:
with client_factory(ports=RBAC_PORTS, auth_credentials=Auth.api_key("admin-key")) as client:
- if client._connection._weaviate_version.is_lower_than(1, 30, 0):
- pytest.skip("This test requires Weaviate 1.30.0 or higher")
user_id = _unique_user_id(request.node.name)
client.users.db.create(user_id=user_id)
roles = client.users.db.get_assigned_roles(user_id=user_id)
@@ -206,9 +182,6 @@ def test_deprecated_syntax(client_factory: ClientFactory, request: SubRequest) -
def test_list_all_users(client_factory: ClientFactory) -> None:
with client_factory(ports=RBAC_PORTS, auth_credentials=Auth.api_key("admin-key")) as client:
- if client._connection._weaviate_version.is_lower_than(1, 30, 0):
- pytest.skip("This test requires Weaviate 1.30.0 or higher")
-
for i in range(5):
client.users.db.delete(user_id=f"list-all-user-{i}")
client.users.db.create(user_id=f"list-all-user-{i}")
@@ -227,9 +200,6 @@ def test_get_user_created_at_and_api_key_first_letters(
client_factory: ClientFactory, request: SubRequest
) -> None:
with client_factory(ports=RBAC_PORTS, auth_credentials=Auth.api_key("admin-key")) as client:
- if client._connection._weaviate_version.is_lower_than(1, 30, 0):
- pytest.skip("This test requires Weaviate 1.30.0 or higher")
-
user_id = _unique_user_id(request.node.name)
client.users.db.create(user_id=user_id)
try:
@@ -246,9 +216,6 @@ def test_get_user_include_last_used_time(
client_factory: ClientFactory, request: SubRequest
) -> None:
with client_factory(ports=RBAC_PORTS, auth_credentials=Auth.api_key("admin-key")) as client:
- if client._connection._weaviate_version.is_lower_than(1, 30, 0):
- pytest.skip("This test requires Weaviate 1.30.0 or higher")
-
user_id = _unique_user_id(request.node.name)
api_key = client.users.db.create(user_id=user_id)
try:
@@ -277,9 +244,6 @@ def test_list_all_include_last_used_time(
client_factory: ClientFactory, request: SubRequest
) -> None:
with client_factory(ports=RBAC_PORTS, auth_credentials=Auth.api_key("admin-key")) as client:
- if client._connection._weaviate_version.is_lower_than(1, 30, 0):
- pytest.skip("This test requires Weaviate 1.30.0 or higher")
-
user_id = _unique_user_id(request.node.name)
api_key = client.users.db.create(user_id=user_id)
try:
@@ -306,3 +270,156 @@ def test_list_all_include_last_used_time(
assert target.last_used_time is not None
finally:
client.users.db.delete(user_id=user_id)
+
+
+def _skip_unless_user_expiration(
+ client: Union[weaviate.WeaviateClient, weaviate.WeaviateAsyncClient],
+) -> None:
+ if client._connection._weaviate_version.is_lower_than(1, 41, 0):
+ pytest.skip("This test requires Weaviate 1.41.0 or higher")
+ if not os.environ.get("WEAVIATE_LICENSE_KEY"):
+ pytest.skip("This test requires WEAVIATE_LICENSE_KEY, the server's license key")
+
+
+def _in_days(days: int) -> datetime:
+ # _in_days drops the microseconds the server does not keep, and uses a non-UTC
+ # zone so a round trip shows that the client sends the offset.
+ return (datetime.now(timezone(timedelta(hours=2))) + timedelta(days=days)).replace(
+ microsecond=0
+ )
+
+
+def test_user_expiration(client_factory: ClientFactory, request: SubRequest) -> None:
+ with client_factory(ports=RBAC_PORTS, auth_credentials=RBAC_AUTH_CREDS) as client:
+ _skip_unless_user_expiration(client)
+ # admin-user is a static user from the server's env config, whose key never expires.
+ assert client.users.get_my_user().user_expires_at is None
+
+ user_id = _unique_user_id(request.node.name)
+ in_one_day = _in_days(1)
+ api_key = client.users.db.create(user_id=user_id, user_expires_at=in_one_day)
+ try:
+ user = client.users.db.get(user_id=user_id)
+ assert user is not None
+ assert user.user_expires_at == in_one_day
+ listed = next(u for u in client.users.db.list_all() if u.user_id == user_id)
+ assert listed.user_expires_at == in_one_day
+ with weaviate.connect_to_local(
+ port=RBAC_PORTS[0], grpc_port=RBAC_PORTS[1], auth_credentials=Auth.api_key(api_key)
+ ) as client2:
+ assert client2.users.get_my_user().user_expires_at == in_one_day
+
+ in_two_days = _in_days(2)
+ client.users.db.update_user_expiration(user_id=user_id, user_expires_at=in_two_days)
+ user = client.users.db.get(user_id=user_id)
+ assert user is not None
+ assert user.user_expires_at == in_two_days
+
+ client.users.db.update_user_expiration(user_id=user_id, user_expires_at=None)
+ user = client.users.db.get(user_id=user_id)
+ assert user is not None
+ assert user.user_expires_at is None
+ listed = next(u for u in client.users.db.list_all() if u.user_id == user_id)
+ assert listed.user_expires_at is None
+ finally:
+ client.users.db.delete(user_id=user_id)
+
+
+@pytest.mark.asyncio
+async def test_user_expiration_async(request: SubRequest) -> None:
+ async with weaviate.use_async_with_local(
+ port=RBAC_PORTS[0], grpc_port=RBAC_PORTS[1], auth_credentials=RBAC_AUTH_CREDS
+ ) as client:
+ _skip_unless_user_expiration(client)
+
+ user_id = _unique_user_id(request.node.name)
+ in_one_day = _in_days(1)
+ await client.users.db.create(user_id=user_id, user_expires_at=in_one_day)
+ try:
+ user = await client.users.db.get(user_id=user_id)
+ assert user is not None
+ assert user.user_expires_at == in_one_day
+
+ in_two_days = _in_days(2)
+ await client.users.db.update_user_expiration(
+ user_id=user_id, user_expires_at=in_two_days
+ )
+ user = await client.users.db.get(user_id=user_id)
+ assert user is not None
+ assert user.user_expires_at == in_two_days
+
+ await client.users.db.update_user_expiration(user_id=user_id, user_expires_at=None)
+ user = await client.users.db.get(user_id=user_id)
+ assert user is not None
+ assert user.user_expires_at is None
+ finally:
+ await client.users.db.delete(user_id=user_id)
+
+
+def test_update_user_expiration_on_never_expiring_user(
+ client_factory: ClientFactory, request: SubRequest
+) -> None:
+ with client_factory(ports=RBAC_PORTS, auth_credentials=RBAC_AUTH_CREDS) as client:
+ _skip_unless_user_expiration(client)
+
+ user_id = _unique_user_id(request.node.name)
+ api_key = client.users.db.create(user_id=user_id)
+ try:
+ user = client.users.db.get(user_id=user_id)
+ assert user is not None
+ assert user.user_expires_at is None
+ with weaviate.connect_to_local(
+ port=RBAC_PORTS[0], grpc_port=RBAC_PORTS[1], auth_credentials=Auth.api_key(api_key)
+ ) as client2:
+ assert client2.users.get_my_user().user_expires_at is None
+
+ in_one_day = _in_days(1)
+ client.users.db.update_user_expiration(user_id=user_id, user_expires_at=in_one_day)
+ user = client.users.db.get(user_id=user_id)
+ assert user is not None
+ assert user.user_expires_at == in_one_day
+ with weaviate.connect_to_local(
+ port=RBAC_PORTS[0], grpc_port=RBAC_PORTS[1], auth_credentials=Auth.api_key(api_key)
+ ) as client2:
+ assert client2.users.get_my_user().user_expires_at == in_one_day
+
+ new_api_key = client.users.db.rotate_key(user_id=user_id)
+ with weaviate.connect_to_local(
+ port=RBAC_PORTS[0],
+ grpc_port=RBAC_PORTS[1],
+ auth_credentials=Auth.api_key(new_api_key),
+ ) as client2:
+ assert client2.users.get_my_user().user_expires_at == in_one_day
+ finally:
+ client.users.db.delete(user_id=user_id)
+
+
+def test_update_user_expiration_of_missing_user(client_factory: ClientFactory) -> None:
+ with client_factory(ports=RBAC_PORTS, auth_credentials=RBAC_AUTH_CREDS) as client:
+ _skip_unless_user_expiration(client)
+
+ with pytest.raises(weaviate.exceptions.UnexpectedStatusCodeError):
+ client.users.db.update_user_expiration(
+ user_id="I-do-not-exist", user_expires_at=_in_days(1)
+ )
+
+
+@pytest.mark.parametrize(
+ "call",
+ [
+ lambda db: db.create(user_id="expiry-unsupported", user_expires_at=_in_days(1)),
+ lambda db: db.update_user_expiration(
+ user_id="expiry-unsupported", user_expires_at=_in_days(1)
+ ),
+ ],
+ ids=["create", "update_user_expiration"],
+)
+def test_user_expiration_unsupported_version(
+ client_factory: ClientFactory, call: Callable[[_UsersDB], object]
+) -> None:
+ with client_factory(ports=RBAC_PORTS, auth_credentials=RBAC_AUTH_CREDS) as client:
+ if not client._connection._weaviate_version.is_lower_than(1, 41, 0):
+ pytest.skip("This test requires a Weaviate version below 1.41.0")
+
+ with pytest.raises(weaviate.exceptions.WeaviateUnsupportedFeatureError):
+ call(client.users.db)
diff --git a/integration/test_vectors.py b/integration/test_vectors.py
index 35538ad30..ade3fd628 100644
--- a/integration/test_vectors.py
+++ b/integration/test_vectors.py
@@ -203,8 +203,6 @@ def test_query(collection_factory: CollectionFactory) -> None:
def test_generate(openai_collection: OpenAICollection) -> None:
collection = openai_collection("dummy")
- if collection._connection._weaviate_version.is_lower_than(1, 24, 0):
- pytest.skip("Named vectors are not supported in versions lower than 1.24.0")
collection = openai_collection(
vector_config=[
wvc.config.Configure.Vectors.text2vec_openai(
@@ -450,8 +448,6 @@ def test_update_to_enable_quantizer_on_specific_named_vector(
# collection_factory: CollectionFactory,
# ) -> None:
# collection = collection_factory("dummy")
-# if collection._connection._weaviate_version.is_lower_than(1, 24, 0):
-# pytest.skip("Named vectors are not supported in versions lower than 1.24.0")
# collection = collection_factory(
# properties=[
# wvc.config.Property(name="first", data_type=wvc.config.DataType.TEXT),
@@ -522,10 +518,6 @@ def test_duplicate_named_vectors(collection_factory: CollectionFactory) -> None:
def test_named_vector_multi_target(
collection_factory: CollectionFactory, target_vector: Union[List[str], _MultiTargetVectorJoin]
) -> None:
- dummy = collection_factory("dummy")
- if dummy._connection._weaviate_version.is_lower_than(1, 26, 0):
- pytest.skip("Named vectors are not supported in versions lower than 1.26.0")
-
collection = collection_factory(
properties=[],
vector_config=[
@@ -542,10 +534,6 @@ def test_named_vector_multi_target(
def test_named_vector_multi_target_vector_per_target(collection_factory: CollectionFactory) -> None:
- dummy = collection_factory("dummy")
- if dummy._connection._weaviate_version.is_lower_than(1, 26, 0):
- pytest.skip("Named vectors are not supported in versions lower than 1.26.0")
-
collection = collection_factory(
properties=[],
vector_config=[
@@ -564,10 +552,6 @@ def test_named_vector_multi_target_vector_per_target(collection_factory: Collect
def test_multi_query_error_no_target_vector(collection_factory: CollectionFactory) -> None:
- dummy = collection_factory("dummy")
- if dummy._connection._weaviate_version.is_lower_than(1, 26, 0):
- pytest.skip("Named vectors are not supported in versions lower than 1.26.0")
-
collection = collection_factory(
properties=[],
vector_config=[
@@ -576,16 +560,9 @@ def test_multi_query_error_no_target_vector(collection_factory: CollectionFactor
],
)
- if dummy._connection._weaviate_version.is_lower_than(1, 29, 0):
- # gets checked in the client for validity
- with pytest.raises(WeaviateInvalidInputError):
- collection.query.near_vector([[1.0, 0.0], [1.0, 0.0, 0.0]])
- with pytest.raises(WeaviateInvalidInputError):
- collection.query.near_vector([[[1.0, 0.0], [1.0, 0.0]], [1.0, 0.0, 0.0]]) # type: ignore
- else:
- # throws an error in the server instead as implicit multi vector is understood now as using multi-vectors
- with pytest.raises(WeaviateQueryError):
- collection.query.near_vector([[1.0, 0.0], [1.0, 0.0, 0.0]])
+ # throws an error in the server instead as implicit multi vector is understood now as using multi-vectors
+ with pytest.raises(WeaviateQueryError):
+ collection.query.near_vector([[1.0, 0.0], [1.0, 0.0, 0.0]])
with pytest.raises(WeaviateInvalidInputError):
collection.query.near_vector({"first": [1.0, 0.0], "second": [1.0, 0.0, 0.0]})
@@ -611,10 +588,6 @@ def test_same_target_vector_multiple_input(
target_vector: Union[List[str], _MultiTargetVectorJoin],
distances: List[float],
) -> None:
- dummy = collection_factory("dummy")
- if dummy._connection._weaviate_version.is_lower_than(1, 27, 0):
- pytest.skip("Multi vector per target is not supported in versions lower than 1.27.0")
-
collection = collection_factory(
properties=[],
vector_config=[
@@ -663,10 +636,6 @@ def test_same_target_vector_multiple_input_combinations(
near_vector: Dict[str, Union[Sequence[float], Sequence[Sequence[float]], _ListOfVectorsQuery]],
target_vector: List[str],
) -> None:
- dummy = collection_factory("dummy")
- if dummy._connection._weaviate_version.is_lower_than(1, 27, 0):
- pytest.skip("Multi vector per target is not supported in versions lower than 1.27.0")
-
collection = collection_factory(
properties=[],
vector_config=[
@@ -684,43 +653,6 @@ def test_same_target_vector_multiple_input_combinations(
assert sorted([obj.uuid for obj in objs]) == sorted([uuid2, uuid1])
-def test_deprecated_syntax(collection_factory: CollectionFactory):
- dummy = collection_factory("dummy")
- if dummy._connection._weaviate_version.is_at_least(
- 1, 29, 0
- ) or dummy._connection._weaviate_version.is_lower_than(1, 27, 0):
- pytest.skip(
- "Syntax was deprecated between 1.27 and 1.29. Now it's allowed for multivector (colbert) searches"
- )
-
- collection = collection_factory(
- properties=[],
- vector_config=[
- wvc.config.Configure.Vectors.self_provided(name="first"),
- wvc.config.Configure.Vectors.self_provided(name="second"),
- ],
- )
-
- collection.data.insert({}, vector={"first": [1, 0], "second": [0, 1, 0]})
- collection.data.insert({}, vector={"first": [0, 1], "second": [1, 0, 0]})
-
- with pytest.raises(WeaviateInvalidInputError) as e:
- collection.query.near_vector(
- [[0.0, 1.0], [[1.0, 0.0, 0.0], [0.0, 0.0, 1.0]]], # # type: ignore
- target_vector=["first", "second", "second"],
- return_metadata=wvc.query.MetadataQuery.full(),
- )
- assert "This input appears to be a nested list of embeddings." in str(e)
-
- with pytest.raises(WeaviateInvalidInputError) as e:
- collection.query.near_vector(
- [[0.0, 1.0], [1.0, 0.0, 0.0]],
- target_vector=["first", "second"],
- return_metadata=wvc.query.MetadataQuery.full(),
- )
- assert "This input appears to be a nested list of embeddings." in str(e)
-
-
@pytest.mark.parametrize(
"include_vector, expected",
[
@@ -733,12 +665,6 @@ def test_include_vector_on_references(
collection_factory: CollectionFactory, include_vector: INCLUDE_VECTOR, expected: dict
) -> None:
"""Test include vector on reference."""
- dummy = collection_factory()
- if dummy._connection._weaviate_version.is_lower_than(1, 26, 0):
- pytest.skip(
- "https://github.com/weaviate/weaviate/issues/6279 was resolved in >1.26.0 only."
- )
-
ref_collection = collection_factory(
name="Target",
vectorizer_config=[
@@ -766,10 +692,6 @@ def test_include_vector_on_references(
def test_colbert_vectors_byov(collection_factory: CollectionFactory) -> None:
- dummy = collection_factory()
- if dummy._connection._weaviate_version.is_lower_than(1, 29, 0):
- pytest.skip("ColBERT vectors are only supported in Weaviate v1.29.0 and higher.")
-
collection = collection_factory(
properties=[
wvc.config.Property(
@@ -867,11 +789,9 @@ def test_colbert_vectors_jinaai(collection_factory: CollectionFactory) -> None:
if api_key is None:
pytest.skip("No JinaAI API key found.")
- dummy = collection_factory(ports=(8086, 50057), headers={"X-Jinaai-Api-Key": api_key})
- if dummy._connection._weaviate_version.is_lower_than(1, 29, 0):
- pytest.skip("ColBERT vectors are only supported in Weaviate v1.29.0 and higher.")
-
collection = collection_factory(
+ ports=(8086, 50057),
+ headers={"X-Jinaai-Api-Key": api_key},
properties=[
wvc.config.Property(
name="title",
diff --git a/mock_tests/test_collection.py b/mock_tests/test_collection.py
index ad36a86f1..e1ef5c9c8 100644
--- a/mock_tests/test_collection.py
+++ b/mock_tests/test_collection.py
@@ -72,10 +72,45 @@ def test_insufficient_permissions(
weaviate_mock.check_assertions()
-def test_old_version(ready_mock: HTTPServer, start_grpc_server: grpc.Server) -> None:
- ready_mock.expect_request("/v1/meta").respond_with_json({"version": "1.23.4"})
- with pytest.raises(WeaviateStartUpError):
- weaviate.connect_to_local(port=MOCK_PORT, host=MOCK_IP, skip_init_checks=True)
+@pytest.mark.parametrize("version,supported", [("1.31.0", False), ("1.32.0", True)])
+def test_min_version(
+ ready_mock: HTTPServer, start_grpc_server: grpc.Server, version: str, supported: bool
+) -> None:
+ ready_mock.expect_request("/v1/meta").respond_with_json({"version": version})
+ if supported:
+ client = weaviate.connect_to_local(
+ port=MOCK_PORT, host=MOCK_IP, grpc_port=MOCK_PORT_GRPC, skip_init_checks=True
+ )
+ assert client.is_connected()
+ client.close()
+ else:
+ with pytest.raises(WeaviateStartUpError) as e:
+ weaviate.connect_to_local(
+ port=MOCK_PORT, host=MOCK_IP, grpc_port=MOCK_PORT_GRPC, skip_init_checks=True
+ )
+ assert "1.32.0 or higher" in e.value.message
+ ready_mock.check_assertions()
+
+
+@pytest.mark.asyncio
+@pytest.mark.parametrize("version,supported", [("1.31.0", False), ("1.32.0", True)])
+async def test_min_version_async(
+ ready_mock: HTTPServer, start_grpc_server: grpc.Server, version: str, supported: bool
+) -> None:
+ ready_mock.expect_request("/v1/meta").respond_with_json({"version": version})
+ client = weaviate.use_async_with_local(
+ port=MOCK_PORT, host=MOCK_IP, grpc_port=MOCK_PORT_GRPC, skip_init_checks=True
+ )
+ try:
+ if supported:
+ await client.connect()
+ assert client.is_connected()
+ else:
+ with pytest.raises(WeaviateStartUpError) as e:
+ await client.connect()
+ assert "1.32.0 or higher" in e.value.message
+ finally:
+ await client.close()
ready_mock.check_assertions()
diff --git a/packages/web/pyproject.toml b/packages/web/pyproject.toml
index 0f4872e18..e9520377e 100644
--- a/packages/web/pyproject.toml
+++ b/packages/web/pyproject.toml
@@ -6,7 +6,7 @@ build-backend = "setuptools.build_meta"
name = "weaviate-client-web"
description = "grpc-web / WASM (Pyodide) transport for the Weaviate Python client"
readme = "README.md"
-requires-python = ">=3.10"
+requires-python = ">=3.11"
license = { text = "BSD-3-Clause" }
authors = [{ name = "Weaviate", email = "hello@weaviate.io" }]
keywords = ["weaviate", "grpc-web", "pyodide", "wasm", "emscripten"]
diff --git a/packages/web/src/weaviate_client_web/_shim.py b/packages/web/src/weaviate_client_web/_shim.py
index e8c7aa768..3636e06c8 100644
--- a/packages/web/src/weaviate_client_web/_shim.py
+++ b/packages/web/src/weaviate_client_web/_shim.py
@@ -10,7 +10,7 @@
from typing import Any, Optional
# grpc.__version__ under the shim; kept equal to weaviate.proto.v1._GRPCIO_FALLBACK_VERSION.
-FAKE_GRPC_VERSION = "1.72.1"
+FAKE_GRPC_VERSION = "1.83.0"
_SHIM_MARKER = "__weaviate_client_web_shim__"
diff --git a/packages/web/tests/test_shim_install.py b/packages/web/tests/test_shim_install.py
index 710d4f164..fff04560c 100644
--- a/packages/web/tests/test_shim_install.py
+++ b/packages/web/tests/test_shim_install.py
@@ -20,7 +20,7 @@ def test_import_weaviate_under_shim():
assert weaviate_client_web.is_installed()
assert weaviate_client_web.install() is True # idempotent, reports the shim in place
assert getattr(grpc, "__weaviate_client_web_shim__", False) is True
- assert grpc.__version__ == "1.72.1"
+ assert grpc.__version__ == "1.83.0"
assert grpc._utilities.first_version_is_lower("1.0.0", "2.0.0") is False # type: ignore[attr-defined]
from grpc.aio._typing import ChannelArgumentType # noqa: F401
diff --git a/profiling/__init__.py b/profiling_tests/__init__.py
similarity index 100%
rename from profiling/__init__.py
rename to profiling_tests/__init__.py
diff --git a/profiling/conftest.py b/profiling_tests/conftest.py
similarity index 97%
rename from profiling/conftest.py
rename to profiling_tests/conftest.py
index f99cf6bc1..5681355f8 100644
--- a/profiling/conftest.py
+++ b/profiling_tests/conftest.py
@@ -20,10 +20,10 @@
def get_file_path(file_name: str) -> str:
- if not os.path.exists(file_name) and not os.path.exists("profiling/" + file_name):
+ if not os.path.exists(file_name) and not os.path.exists("profiling_tests/" + file_name):
pytest.skip("data does not exist")
- if os.path.exists("profiling/" + file_name):
- file_name = "profiling/" + file_name
+ if os.path.exists("profiling_tests/" + file_name):
+ file_name = "profiling_tests/" + file_name
return file_name
diff --git a/profiling/constants.py b/profiling_tests/constants.py
similarity index 100%
rename from profiling/constants.py
rename to profiling_tests/constants.py
diff --git a/profiling/pyspy.py b/profiling_tests/pyspy.py
similarity index 100%
rename from profiling/pyspy.py
rename to profiling_tests/pyspy.py
diff --git a/profiling/test_import_and_query.py b/profiling_tests/test_import_and_query.py
similarity index 100%
rename from profiling/test_import_and_query.py
rename to profiling_tests/test_import_and_query.py
diff --git a/profiling/test_profiling.py b/profiling_tests/test_profiling.py
similarity index 98%
rename from profiling/test_profiling.py
rename to profiling_tests/test_profiling.py
index 4c4d7cb9e..526ec2e00 100644
--- a/profiling/test_profiling.py
+++ b/profiling_tests/test_profiling.py
@@ -1,6 +1,6 @@
# run:
-# - profiling: pytest -m profiling profiling/test_profiling.py --profile-svg
-# - benchmark: pytest profiling/test_profiling.py --benchmark-only --benchmark-disable-gc
+# - profiling: pytest -m profiling profiling_tests/test_profiling.py --profile-svg
+# - benchmark: pytest profiling_tests/test_profiling.py --benchmark-only --benchmark-disable-gc
import concurrent.futures
import math
import uuid
diff --git a/profiling/test_refs.py b/profiling_tests/test_refs.py
similarity index 100%
rename from profiling/test_refs.py
rename to profiling_tests/test_refs.py
diff --git a/profiling/test_shutdown.py b/profiling_tests/test_shutdown.py
similarity index 100%
rename from profiling/test_shutdown.py
rename to profiling_tests/test_shutdown.py
diff --git a/profiling/test_sphere.py b/profiling_tests/test_sphere.py
similarity index 100%
rename from profiling/test_sphere.py
rename to profiling_tests/test_sphere.py
diff --git a/proto_test/test_proto.py b/proto_test/test_proto.py
index e7f1a28b0..933e70c3f 100644
--- a/proto_test/test_proto.py
+++ b/proto_test/test_proto.py
@@ -30,11 +30,7 @@ def _versions_incompatible() -> bool:
def test_proto_import():
- grpc_ver = version.parse(metadata_version("grpcio"))
- pb_ver = version.parse(metadata_version("protobuf"))
- if (pb_ver >= version.parse("6.30.0") and grpc_ver < version.parse("1.72.0")) or (
- pb_ver >= version.parse("5.26.1") and grpc_ver < version.parse("1.63.0")
- ):
+ if _versions_incompatible():
with pytest.raises(Exception) as e:
import weaviate
@@ -60,7 +56,7 @@ def raises(pkg: str) -> str:
monkeypatch.setattr(mod, "metadata_version", raises)
monkeypatch.setattr("sys.platform", "emscripten")
- assert str(mod.get_version("grpcio")) == "1.72.1"
+ assert str(mod.get_version("grpcio")) == "1.83.0"
with pytest.raises(PackageNotFoundError):
mod.get_version("protobuf")
diff --git a/requirements-devel.txt b/requirements-devel.txt
index 48a3ae3e5..6e4e5c520 100644
--- a/requirements-devel.txt
+++ b/requirements-devel.txt
@@ -1,10 +1,15 @@
httpx==0.26.0
validators==0.34.0
authlib==1.9.1
-grpcio==1.75.1
-grpcio-tools==1.75.1
-grpcio-health-checking==1.75.1
-pydantic==2.12.0
+# Python 3.15 needs the first releases with cp315 wheels; older ones build from source.
+grpcio==1.75.1; python_version < "3.15"
+grpcio-tools==1.75.1; python_version < "3.15"
+grpcio-health-checking==1.75.1; python_version < "3.15"
+pydantic==2.12.0; python_version < "3.15"
+grpcio==1.84.0; python_version >= "3.15"
+grpcio-tools==1.84.0; python_version >= "3.15"
+grpcio-health-checking==1.84.0; python_version >= "3.15"
+pydantic==2.14.0; python_version >= "3.15"
packaging==26.2
build
@@ -20,7 +25,7 @@ importlib_metadata==8.7.0
tomli==2.4.0
types-protobuf==6.30.2.20250703
types-urllib3==1.26.25.14
-typing_extensions==4.15.0
+typing_extensions==4.16.0
pre-commit
flake8
diff --git a/setup.cfg b/setup.cfg
index b964b7ef3..6b3daa241 100644
--- a/setup.cfg
+++ b/setup.cfg
@@ -24,7 +24,6 @@ packages =
weaviate.collections
weaviate.connect
weaviate.debug
- weaviate.gql
weaviate.outputs
weaviate.proto
weaviate.proto.v1
@@ -41,10 +40,10 @@ install_requires =
validators>=0.34.0,<1.0.0
authlib>=1.7.1,<2.0.0
pydantic>=2.12.0,<3.0.0
- grpcio>=1.59.5,<1.80.0; sys_platform != "emscripten"
- protobuf>=4.21.6,<7.0.0
+ grpcio>=1.59.5,<2.0.0; sys_platform != "emscripten"
+ protobuf>=4.21.6,<8.0.0
packaging>=21.0
-python_requires = >=3.10
+python_requires = >=3.11
[options.extras_require]
agents =
diff --git a/test/collection/test_aggregates.py b/test/collection/test_aggregates.py
index 76bdb9568..fdff1bfc6 100644
--- a/test/collection/test_aggregates.py
+++ b/test/collection/test_aggregates.py
@@ -3,6 +3,7 @@
import pytest
from weaviate.collections.aggregate import _AggregateCollectionAsync
+from weaviate.collections.classes.aggregate import Metrics
from weaviate.connect import ConnectionV4
from weaviate.exceptions import WeaviateInvalidInputError
@@ -14,26 +15,35 @@ async def _test_aggregate(aggregate: Callable[[], Awaitable]) -> None:
@pytest.mark.asyncio
async def test_bad_aggregate_inputs(connection: ConnectionV4) -> None:
- aggregate = _AggregateCollectionAsync(connection, "dummy", None, None, False)
- # over_all
- await _test_aggregate(lambda: aggregate.over_all(filters="wrong"))
- await _test_aggregate(lambda: aggregate.over_all(group_by=42))
- await _test_aggregate(lambda: aggregate.over_all(total_count="wrong"))
- await _test_aggregate(lambda: aggregate.over_all(return_metrics="wrong"))
-
+ aggregate = _AggregateCollectionAsync(connection, "dummy", None, None, True)
# near text
- await _test_aggregate(lambda: aggregate.near_text(42))
+ await _test_aggregate(lambda: aggregate.near_text(42, object_limit=10))
await _test_aggregate(lambda: aggregate.near_text("hi", certainty="wrong"))
await _test_aggregate(lambda: aggregate.near_text("hi", distance="wrong"))
- await _test_aggregate(lambda: aggregate.near_text("hi", move_to="wrong"))
- await _test_aggregate(lambda: aggregate.near_text("hi", move_away="wrong"))
- await _test_aggregate(lambda: aggregate.near_text("hi", object_limit="wrong"))
+ await _test_aggregate(lambda: aggregate.near_text("hi", move_to="wrong", object_limit=10))
+ await _test_aggregate(lambda: aggregate.near_text("hi", move_away="wrong", object_limit=10))
# near object
- await _test_aggregate(lambda: aggregate.near_object(42))
+ await _test_aggregate(lambda: aggregate.near_object(42, object_limit=10))
# near vector
- await _test_aggregate(lambda: aggregate.near_vector(42))
+ await _test_aggregate(lambda: aggregate.near_vector(42, object_limit=10))
# near image
await _test_aggregate(lambda: aggregate.near_image(42))
+
+
+@pytest.mark.parametrize(
+ "kwargs,top_occurences",
+ [
+ ({}, True),
+ ({"count": True}, False),
+ ({"top_occurrences_count": True}, True),
+ ({"top_occurrences_value": True}, True),
+ ({"count": True, "top_occurrences_value": True}, True),
+ ({"top_occurrences_count": True, "top_occurrences_value": True}, True),
+ ],
+)
+def test_text_metrics_request_top_occurrences(kwargs: dict, top_occurences: bool) -> None:
+ text = Metrics("text").text(**kwargs).to_grpc().text
+ assert text.top_occurences is top_occurences
diff --git a/test/collection/test_bm25_operator.py b/test/collection/test_bm25_operator.py
index 9fa188b22..511ee044d 100644
--- a/test/collection/test_bm25_operator.py
+++ b/test/collection/test_bm25_operator.py
@@ -16,8 +16,6 @@ def _builder(version: str = "1.39.0") -> _QueryGRPC:
tenant=None,
consistency_level=None,
validate_arguments=True,
- uses_125_api=True,
- uses_127_api=True,
)
diff --git a/test/collection/test_config.py b/test/collection/test_config.py
index 5a79110a0..af9e1095e 100644
--- a/test/collection/test_config.py
+++ b/test/collection/test_config.py
@@ -1,5 +1,5 @@
import warnings
-from typing import List, Union
+from typing import Any, List, Union
import pytest
from pydantic import ValidationError
@@ -1342,6 +1342,36 @@ def test_config_with_generative(
},
},
),
+ (
+ Configure.Reranker.typesafeai(),
+ {
+ "reranker-typesafeai": {},
+ },
+ ),
+ (
+ Configure.Reranker.typesafeai(model="jev-latest", base_url="https://api.typesafe.ai"),
+ {
+ "reranker-typesafeai": {
+ "model": "jev-latest",
+ "baseURL": "https://api.typesafe.ai/",
+ },
+ },
+ ),
+ (
+ Configure.Reranker.openai(),
+ {
+ "reranker-openai": {},
+ },
+ ),
+ (
+ Configure.Reranker.openai(model="gpt-6-luna", base_url="https://api.openai.com"),
+ {
+ "reranker-openai": {
+ "model": "gpt-6-luna",
+ "baseURL": "https://api.openai.com/",
+ },
+ },
+ ),
(
Configure.Reranker.transformers(),
{
@@ -3447,3 +3477,26 @@ def test_reconfigure_inverted_index_without_stopword_presets_leaves_existing(sel
}
merged = rc.merge_with_existing(existing)
assert merged["stopwordPresets"] == {"fr": ["le", "la"]}
+
+
+@pytest.mark.parametrize(
+ "quantizer,name",
+ [
+ (Configure.VectorIndex.Quantizer.pq(rescore_limit=123, rescore_factor=2.5), "pq"),
+ (Configure.VectorIndex.Quantizer.bq(rescore_limit=123, rescore_factor=2.5), "bq"),
+ (Configure.VectorIndex.Quantizer.sq(rescore_limit=123, rescore_factor=2.5), "sq"),
+ (Configure.VectorIndex.Quantizer.rq(rescore_limit=123, rescore_factor=2.5), "rq"),
+ ],
+)
+def test_vector_config_hnsw_quantizer_rescore_factor(quantizer: Any, name: str) -> None:
+ vi_dict = Configure.VectorIndex.hnsw(quantizer=quantizer)._to_dict()
+
+ assert vi_dict[name]["rescoreLimit"] == 123
+ assert vi_dict[name]["rescoreFactor"] == 2.5
+
+
+def test_vector_config_hnsw_quantizer_rescore_factor_omitted_by_default() -> None:
+ vi_dict = Configure.VectorIndex.hnsw(quantizer=Configure.VectorIndex.Quantizer.pq())._to_dict()
+
+ assert "rescoreLimit" not in vi_dict["pq"]
+ assert "rescoreFactor" not in vi_dict["pq"]
diff --git a/test/collection/test_config_methods.py b/test/collection/test_config_methods.py
index 053199dec..f39672274 100644
--- a/test/collection/test_config_methods.py
+++ b/test/collection/test_config_methods.py
@@ -3,6 +3,7 @@
import pytest
from weaviate.collections.classes.config import (
+ Rerankers,
VectorIndexType,
_MultiVectorConfig,
_MuveraConfig,
@@ -507,3 +508,52 @@ def test_collection_config_stopword_presets_absent() -> None:
schema = _full_schema("TestNoStopwordPresets")
full = _collection_config_from_json(schema)
assert full.inverted_index_config.stopword_presets is None
+
+
+@pytest.mark.parametrize("rescore_factor", [None, -1, 2.5])
+def test_collection_config_from_json_quantizer_rescore_factor(
+ rescore_factor: Optional[float],
+) -> None:
+ index_config = dict(HFRESH_CONFIG)
+ if rescore_factor is not None:
+ index_config["rq"] = {**HFRESH_CONFIG["rq"], "rescoreFactor": rescore_factor}
+ schema = _schema_with_vector_config(
+ {
+ "vec": {
+ "vectorizer": {"none": {}},
+ "vectorIndexType": "hfresh",
+ "vectorIndexConfig": index_config,
+ }
+ }
+ )
+
+ config = _collection_config_from_json(schema)
+
+ assert config.vector_config is not None
+ quantizer = config.vector_config["vec"].vector_index_config.quantizer
+ assert quantizer is not None
+ assert quantizer.rescore_limit == 350
+ assert quantizer.rescore_factor == rescore_factor
+
+
+@pytest.mark.parametrize(
+ "parser", [_collection_config_from_json, _collection_config_simple_from_json]
+)
+@pytest.mark.parametrize(
+ "module,expected,model",
+ [
+ ("reranker-typesafeai", Rerankers.TYPESAFEAI, "jev-latest"),
+ ("reranker-openai", Rerankers.OPENAI, "gpt-6-luna"),
+ ],
+)
+def test_collection_config_from_json_with_decision_rerankers(
+ parser: Any, module: str, expected: Rerankers, model: str
+) -> None:
+ """The typesafeai and openai reranker modules parse to their `Rerankers` member and keep the model."""
+ schema = _full_schema("TestDecisionRerankers")
+ schema["moduleConfig"] = {module: {"model": model}}
+
+ parsed = parser(schema)
+
+ assert parsed.reranker_config.reranker is expected
+ assert parsed.reranker_config.model == {"model": model}
diff --git a/test/collection/test_config_update.py b/test/collection/test_config_update.py
index 2ed2053c3..cf92eb577 100644
--- a/test/collection/test_config_update.py
+++ b/test/collection/test_config_update.py
@@ -1,5 +1,5 @@
from datetime import timedelta
-from typing import Optional, Union
+from typing import Callable, Optional, Union
import pytest
@@ -7,6 +7,7 @@
from weaviate.collections.classes.config import (
ObjectTTLConfigUpdate,
Reconfigure,
+ RerankerProvider,
_CollectionConfigUpdate,
)
from weaviate.exceptions import WeaviateInvalidInputError
@@ -365,3 +366,55 @@ def test_updating_vector_when_none_left() -> None:
with pytest.raises(WeaviateInvalidInputError, match="does not exist"):
update.merge_with_existing({"class": "Test", "properties": []})
+
+
+def test_updating_rq_rescore_factor() -> None:
+ schema = _hfresh_schema()
+ update = _CollectionConfigUpdate(
+ vector_config=Reconfigure.Vectors.update(
+ name="boi",
+ vector_index_config=Reconfigure.VectorIndex.hfresh(
+ quantizer=Reconfigure.VectorIndex.Quantizer.rq(rescore_factor=3.5)
+ ),
+ )
+ )
+
+ new_schema = update.merge_with_existing(schema)
+
+ rq = new_schema["vectorConfig"]["boi"]["vectorIndexConfig"]["rq"]
+ assert rq["rescoreFactor"] == 3.5
+ assert rq["rescoreLimit"] == 20
+
+
+DECISION_RERANKERS = [
+ (Reconfigure.Reranker.typesafeai, "reranker-typesafeai"),
+ (Reconfigure.Reranker.openai, "reranker-openai"),
+]
+
+
+@pytest.mark.parametrize("factory,module", DECISION_RERANKERS)
+def test_reranker_update_replaces_existing_reranker(
+ factory: Callable[[], RerankerProvider], module: str
+) -> None:
+ update = _CollectionConfigUpdate(reranker_config=factory())
+ merged = update.merge_with_existing({"moduleConfig": {"reranker-cohere": {"model": "m"}}})
+ assert merged["moduleConfig"] == {module: {}}
+
+
+@pytest.mark.parametrize("factory,module", DECISION_RERANKERS)
+def test_reranker_update_without_existing_module_config(
+ factory: Callable[[], RerankerProvider], module: str
+) -> None:
+ update = _CollectionConfigUpdate(reranker_config=factory())
+ assert update.merge_with_existing({})["moduleConfig"] == {module: {}}
+
+
+@pytest.mark.parametrize("factory,module", DECISION_RERANKERS)
+def test_reranker_update_keeps_generative_module(
+ factory: Callable[[], RerankerProvider], module: str
+) -> None:
+ update = _CollectionConfigUpdate(reranker_config=factory())
+ merged = update.merge_with_existing(
+ {"moduleConfig": {"generative-openai": {"model": "m"}, "reranker-cohere": {"model": "r"}}}
+ )
+ assert merged["moduleConfig"] == {"generative-openai": {"model": "m"}, module: {}}
diff --git a/test/collection/test_filter.py b/test/collection/test_filter.py
index 760e4e46f..276a0da97 100644
--- a/test/collection/test_filter.py
+++ b/test/collection/test_filter.py
@@ -14,7 +14,7 @@
_FilterValue,
_Operator,
)
-from weaviate.collections.filters import _FilterToGRPC, _FilterToREST
+from weaviate.collections.filters import _FilterToGRPC
from weaviate.proto.v1 import base_pb2
@@ -212,32 +212,27 @@ def test_operator_to_grpc(operator: _Operator, want: base_pb2.Filters.Operator)
assert operator._to_grpc() == want, "wrong pb operator"
-# (values, gRPC array field, REST array key) for each supported filter value type
+# (values, gRPC array field) for each supported filter value type
SEQUENCE_FILTER_VALUES = [
- (["a", "b"], "value_text_array", "valueTextArray"),
- ([1, 2], "value_int_array", "valueIntArray"),
- ([1.5, 2.5], "value_number_array", "valueNumberArray"),
- ([True, False], "value_boolean_array", "valueBooleanArray"),
- ([uuid.UUID(int=1), uuid.UUID(int=2)], "value_text_array", "valueTextArray"),
+ (["a", "b"], "value_text_array"),
+ ([1, 2], "value_int_array"),
+ ([1.5, 2.5], "value_number_array"),
+ ([True, False], "value_boolean_array"),
+ ([uuid.UUID(int=1), uuid.UUID(int=2)], "value_text_array"),
(
[
datetime.datetime(2023, 1, 1, tzinfo=datetime.timezone.utc),
datetime.datetime(2024, 1, 1, tzinfo=datetime.timezone.utc),
],
"value_text_array",
- "valueDateArray",
),
]
SEQUENCE_FILTER_IDS = ["text", "int", "float", "bool", "uuid", "date"]
@pytest.mark.parametrize("method", ["contains_any", "contains_all", "contains_none"])
-@pytest.mark.parametrize(
- "values,grpc_field,_rest_key", SEQUENCE_FILTER_VALUES, ids=SEQUENCE_FILTER_IDS
-)
-def test_sequence_filter_values_to_grpc(
- method: str, values: List[Any], grpc_field: str, _rest_key: str
-) -> None:
+@pytest.mark.parametrize("values,grpc_field", SEQUENCE_FILTER_VALUES, ids=SEQUENCE_FILTER_IDS)
+def test_sequence_filter_values_to_grpc(method: str, values: List[Any], grpc_field: str) -> None:
from_list = getattr(wvc.query.Filter.by_property("test"), method)(values)
from_tuple = getattr(wvc.query.Filter.by_property("test"), method)(tuple(values))
@@ -248,34 +243,11 @@ def test_sequence_filter_values_to_grpc(
assert as_tuple == as_list, "a tuple must serialise like the equivalent list"
-@pytest.mark.parametrize("method", ["contains_any", "contains_all", "contains_none"])
-@pytest.mark.parametrize(
- "values,_grpc_field,rest_key", SEQUENCE_FILTER_VALUES, ids=SEQUENCE_FILTER_IDS
-)
-def test_sequence_filter_values_to_rest(
- method: str, values: List[Any], _grpc_field: str, rest_key: str
-) -> None:
- from_list = getattr(wvc.query.Filter.by_property("test"), method)(values)
- from_tuple = getattr(wvc.query.Filter.by_property("test"), method)(tuple(values))
-
- as_list = _FilterToREST.convert(from_list)
-
- assert rest_key in as_list, "the list form must send the values"
- assert _FilterToREST.convert(from_tuple) == as_list, (
- "a tuple must serialise like the equivalent list"
- )
-
-
@pytest.mark.parametrize("value", ["test", ""])
def test_string_filter_values_are_not_sequences(value: str) -> None:
filter_ = wvc.query.Filter.by_property("test").equal(value)
assert _FilterToGRPC.convert(filter_).value_text == value
- assert _FilterToREST.convert(filter_) == {
- "operator": "Equal",
- "path": ["test"],
- "valueText": value,
- }
def test_empty_tuple_grpc_conversion() -> None:
@@ -285,13 +257,6 @@ def test_empty_tuple_grpc_conversion() -> None:
_FilterToGRPC.convert(fv)
-def test_empty_tuple_rest_conversion() -> None:
- """Ensure the REST converter treats an empty tuple like an empty list."""
- fv = _FilterValue(target="test", value=(), operator=_Operator.EQUAL)
- with pytest.raises(weaviate.exceptions.WeaviateInvalidInputError):
- _FilterToREST.convert(fv)
-
-
@pytest.mark.parametrize("method", ["contains_any", "contains_all", "contains_none"])
def test_empty_tuple_input(method: str) -> None:
with pytest.raises(weaviate.exceptions.WeaviateInvalidInputError):
diff --git a/test/collection/test_hybrid_diversity.py b/test/collection/test_hybrid_diversity.py
index 510b4df23..5ebdad950 100644
--- a/test/collection/test_hybrid_diversity.py
+++ b/test/collection/test_hybrid_diversity.py
@@ -21,8 +21,6 @@ def _builder(version: _ServerVersion = _DEFAULT_VERSION) -> _QueryGRPC:
tenant=None,
consistency_level=None,
validate_arguments=True,
- uses_125_api=True,
- uses_127_api=True,
)
diff --git a/test/collection/test_target_vectors.py b/test/collection/test_target_vectors.py
index 07b4ee74e..faed1fee7 100644
--- a/test/collection/test_target_vectors.py
+++ b/test/collection/test_target_vectors.py
@@ -10,80 +10,68 @@
from weaviate.util import _ServerVersion
-def _query(version: str) -> _QueryGRPC:
- weaviate_version = _ServerVersion.from_string(version)
+def _query() -> _QueryGRPC:
return _QueryGRPC(
- weaviate_version=weaviate_version,
+ weaviate_version=_ServerVersion.from_string("1.32.0"),
name="Documents",
tenant=None,
consistency_level=None,
validate_arguments=True,
- uses_125_api=weaviate_version.is_at_least(1, 25, 0),
- uses_127_api=weaviate_version.is_at_least(1, 27, 0),
)
def _near_vector(
- version: str, vector: NearVectorInputType, target_vector: TargetVectorJoinType
+ vector: NearVectorInputType, target_vector: TargetVectorJoinType
) -> base_search_pb2.Targets:
- request = _query(version).near_vector(near_vector=vector, target_vector=target_vector)
+ request = _query().near_vector(near_vector=vector, target_vector=target_vector)
return request.near_vector.targets
def _hybrid(
- version: str, vector: NearVectorInputType, target_vector: TargetVectorJoinType
+ vector: NearVectorInputType, target_vector: TargetVectorJoinType
) -> base_search_pb2.Targets:
- request = _query(version).hybrid(query="example", vector=vector, target_vector=target_vector)
+ request = _query().hybrid(query="example", vector=vector, target_vector=target_vector)
return request.hybrid_search.targets
def _hybrid_near_vector(
- version: str, vector: NearVectorInputType, target_vector: TargetVectorJoinType
+ vector: NearVectorInputType, target_vector: TargetVectorJoinType
) -> base_search_pb2.Targets:
- request = _query(version).hybrid(
+ request = _query().hybrid(
query="example", vector=HybridVector.near_vector(vector), target_vector=target_vector
)
return request.hybrid_search.targets
-Search = Callable[[str, NearVectorInputType, TargetVectorJoinType], base_search_pb2.Targets]
+Search = Callable[[NearVectorInputType, TargetVectorJoinType], base_search_pb2.Targets]
SEARCHES = [_near_vector, _hybrid, _hybrid_near_vector]
-VERSIONS = ["1.26.0", "1.27.0", "1.29.0"]
@pytest.mark.parametrize("search", SEARCHES)
-@pytest.mark.parametrize("version", VERSIONS)
@pytest.mark.parametrize(
"target_vector",
[["title", "summary"], TargetVectors.manual_weights({"title": 1.0, "summary": 2.0})],
ids=["list", "weights"],
)
-def test_mismatched_vector_names(
- search: Search, version: str, target_vector: TargetVectorJoinType
-) -> None:
+def test_mismatched_vector_names(search: Search, target_vector: TargetVectorJoinType) -> None:
with pytest.raises(WeaviateInvalidInputError, match="must match the target vectors"):
- search(version, {"title": [1.0, 0.0], "body": [0.0, 1.0]}, target_vector)
+ search({"title": [1.0, 0.0], "body": [0.0, 1.0]}, target_vector)
@pytest.mark.parametrize("search", SEARCHES)
-@pytest.mark.parametrize("version", VERSIONS)
-def test_vector_names_in_a_different_order(search: Search, version: str) -> None:
+def test_vector_names_in_a_different_order(search: Search) -> None:
targets = search(
- version,
{"summary": [0.0, 1.0], "title": [1.0, 0.0]},
TargetVectors.manual_weights({"title": 1.0, "summary": 2.0}),
)
weights = {weight.target: weight.weight for weight in targets.weights_for_targets}
assert weights == {"title": 1.0, "summary": 2.0}
- if version != "1.26.0":
- assert list(targets.target_vectors) == ["summary", "title"]
+ assert list(targets.target_vectors) == ["summary", "title"]
@pytest.mark.parametrize("search", SEARCHES)
-@pytest.mark.parametrize("version", ["1.27.0", "1.29.0"])
-def test_repeated_target_vector_names_with_multiple_weights(search: Search, version: str) -> None:
+def test_repeated_target_vector_names_with_multiple_weights(search: Search) -> None:
targets = search(
- version,
{"title": NearVector.list_of_vectors([1.0, 0.0], [0.0, 1.0])},
TargetVectors.manual_weights({"title": [1.0, 2.0]}),
)
diff --git a/test/test_util.py b/test/test_util.py
index e09b52e40..e7dcf7f34 100644
--- a/test/test_util.py
+++ b/test/test_util.py
@@ -10,10 +10,8 @@
from test.util import check_error_message
from weaviate.exceptions import SchemaValidationException
from weaviate.util import (
- MINIMUM_NO_WARNING_VERSION,
_datetime_from_weaviate_str,
_is_sub_schema,
- _sanitize_str,
generate_uuid5,
get_domain_from_weaviate_url,
get_valid_uuid,
@@ -23,7 +21,6 @@
is_object_url,
is_weaviate_client_too_old,
is_weaviate_object_url,
- is_weaviate_too_old,
parse_version_string,
)
@@ -405,35 +402,6 @@ def test_parse_version_string(self):
assert parse_version_string("v2.05.5") == (2, 5)
-MINIMUM_NO_WARNING_VERSION_MAJOR, MINIMUM_NO_WARNING_VERSION_MINOR = parse_version_string(
- MINIMUM_NO_WARNING_VERSION
-)
-MINIMUM_NO_WARNING_VERSION_MAJOR = int(MINIMUM_NO_WARNING_VERSION_MAJOR)
-MINIMUM_NO_WARNING_VERSION_MINOR = int(MINIMUM_NO_WARNING_VERSION_MINOR)
-
-
-@pytest.mark.parametrize(
- "version,too_old",
- [
- (f"v{MINIMUM_NO_WARNING_VERSION_MAJOR - 1}.{MINIMUM_NO_WARNING_VERSION_MINOR - 1}.1", True),
- (f"v{MINIMUM_NO_WARNING_VERSION_MAJOR - 1}.{MINIMUM_NO_WARNING_VERSION_MINOR + 1}.2", True),
- (f"v{MINIMUM_NO_WARNING_VERSION_MAJOR}.{MINIMUM_NO_WARNING_VERSION_MINOR - 1}.3", True),
- (MINIMUM_NO_WARNING_VERSION, False),
- (f"v{MINIMUM_NO_WARNING_VERSION_MAJOR}.{MINIMUM_NO_WARNING_VERSION_MINOR + 1}.0", False),
- (
- f"v{MINIMUM_NO_WARNING_VERSION_MAJOR + 1}.{MINIMUM_NO_WARNING_VERSION_MINOR - 1}.0",
- False,
- ),
- (
- f"v{MINIMUM_NO_WARNING_VERSION_MAJOR + 1}.{MINIMUM_NO_WARNING_VERSION_MINOR + 1}.0",
- False,
- ),
- ],
-)
-def test_is_weaviate_too_old(version: str, too_old: bool):
- assert is_weaviate_too_old(version) is too_old
-
-
@pytest.mark.parametrize(
"input_str,expected",
[
@@ -487,19 +455,3 @@ def test_datetime_from_weaviate_str_empty_string_warns() -> None:
)
def test_is_weaviate_client_too_old(current_version: str, latest_version: str, too_old: bool):
assert is_weaviate_client_too_old(current_version, latest_version) is too_old
-
-
-@pytest.mark.parametrize(
- "in_str, out_str",
- [
- ('"', '\\"'),
- ('"', '\\"'),
- ('\\"', '\\"'),
- ('\\"', '\\"'),
- ('\\\\"', '\\\\\\"'),
- ('\\\\"', '\\\\\\"'),
- ('\\\\\\"', '\\\\\\"'),
- ],
-)
-def test_sanitize_str(in_str: str, out_str: str) -> None:
- assert _sanitize_str(in_str) == f'"{out_str}"'
diff --git a/weaviate/__init__.py b/weaviate/__init__.py
index 5537a3e3a..f513cc938 100644
--- a/weaviate/__init__.py
+++ b/weaviate/__init__.py
@@ -128,8 +128,6 @@
"ConnectionConfig",
"ConnectionParams",
"ProtocolParams",
- "AdditionalProperties",
- "LinkTo",
"Shard",
"Tenant",
"TenantActivityStatus",
@@ -155,8 +153,6 @@
"ConnectionConfig": "config",
"ConnectionParams": "connect",
"ProtocolParams": "connect",
- "AdditionalProperties": "gql",
- "LinkTo": "gql",
"Shard": "batch",
"Tenant": "schema",
"TenantActivityStatus": "schema",
diff --git a/weaviate/aliases/executor.py b/weaviate/aliases/executor.py
index e08b80ca2..3bdb24533 100644
--- a/weaviate/aliases/executor.py
+++ b/weaviate/aliases/executor.py
@@ -16,8 +16,6 @@ def list_all(
self, *, collection: Optional[str] = None
) -> executor.Result[Dict[str, AliasReturn]]:
"""Get the alias for a given alias name."""
- self._connection._weaviate_version.check_is_at_least_1_32_0("alias")
-
error_msg = "list all aliases"
if collection is not None:
error_msg += f" for collection {collection}"
@@ -46,7 +44,6 @@ def resp(res: Response) -> Dict[str, AliasReturn]:
def get(self, *, alias_name: str) -> executor.Result[Optional[AliasReturn]]:
"""Get the given alias."""
- self._connection._weaviate_version.check_is_at_least_1_32_0("alias")
def resp(res: Response) -> Optional[AliasReturn]:
if res.status_code == 404:
@@ -69,7 +66,6 @@ def resp(res: Response) -> Optional[AliasReturn]:
def create(self, *, alias_name: str, target_collection: str) -> executor.Result[None]:
"""Create an alias for a given collection."""
- self._connection._weaviate_version.check_is_at_least_1_32_0("alias")
def resp(res: Response) -> None:
return None
@@ -88,7 +84,6 @@ def resp(res: Response) -> None:
def delete(self, *, alias_name: str) -> executor.Result[bool]:
"""Create an alias."""
- self._connection._weaviate_version.check_is_at_least_1_32_0("alias")
def resp(res: Response) -> bool:
return res.status_code == 204
@@ -106,7 +101,6 @@ def resp(res: Response) -> bool:
def update(self, *, alias_name: str, new_target_collection: str) -> executor.Result[bool]:
"""Replace an alias."""
- self._connection._weaviate_version.check_is_at_least_1_32_0("alias")
def resp(res: Response) -> bool:
return res.status_code == 200
@@ -132,7 +126,6 @@ def exists(self, *, alias_name: str) -> executor.Result[bool]:
Returns:
`True` if the alias exists, `False` otherwise.
"""
- self._connection._weaviate_version.check_is_at_least_1_32_0("alias")
def resp(res: Response) -> bool:
return res.status_code == 200
diff --git a/weaviate/backup/executor.py b/weaviate/backup/executor.py
index da7005143..6ffa9c648 100644
--- a/weaviate/backup/executor.py
+++ b/weaviate/backup/executor.py
@@ -137,12 +137,6 @@ def create(
payload["config"] = config._to_dict()
if backup_location is not None:
- if self._connection._weaviate_version.is_lower_than(1, 27, 2):
- raise WeaviateUnsupportedFeatureError(
- "BackupConfigCreate dynamic backup location",
- str(self._connection._weaviate_version),
- "1.27.2",
- )
if "config" not in payload:
payload["config"] = {}
payload["config"].update(backup_location._to_dict())
@@ -242,13 +236,6 @@ def get_create_status(
path = f"/backups/{backend.value}/{backup_id}"
params: Dict[str, str] = {}
if backup_location is not None:
- if self._connection._weaviate_version.is_lower_than(1, 27, 2):
- raise WeaviateUnsupportedFeatureError(
- "BackupConfigCreateStatus dynamic backup location",
- str(self._connection._weaviate_version),
- "1.27.2",
- )
-
params.update(backup_location._to_dict())
def resp(res: Response) -> BackupStatusReturn:
@@ -324,13 +311,6 @@ def restore(
configPayload = config._to_dict()
if backup_location is not None:
- if self._connection._weaviate_version.is_lower_than(1, 27, 2):
- raise WeaviateUnsupportedFeatureError(
- "BackupConfigRestore dynamic backup location",
- str(self._connection._weaviate_version),
- "1.27.2",
- )
-
if "config" not in payload:
payload["config"] = {}
configPayload.update(backup_location._to_dict())
@@ -441,12 +421,6 @@ def get_restore_status(
params: Dict[str, str] = {}
if backup_location is not None:
- if self._connection._weaviate_version.is_lower_than(1, 27, 2):
- raise WeaviateUnsupportedFeatureError(
- "BackupConfigRestore status dynamic backup location",
- str(self._connection._weaviate_version),
- "1.27.2",
- )
params.update(backup_location._to_dict())
def resp(res: Response) -> BackupStatusReturn:
@@ -493,12 +467,6 @@ def cancel(
params: Dict[str, str] = {}
if backup_location is not None:
- if self._connection._weaviate_version.is_lower_than(1, 27, 2):
- raise WeaviateUnsupportedFeatureError(
- "BackupConfigCancel dynamic backup location",
- str(self._connection._weaviate_version),
- "1.27.2",
- )
params.update(backup_location._to_dict())
def resp(res: Response) -> bool:
diff --git a/weaviate/client.py b/weaviate/client.py
index fe5ad17fe..e06fa4970 100644
--- a/weaviate/client.py
+++ b/weaviate/client.py
@@ -34,7 +34,7 @@
class WeaviateAsyncClient(_WeaviateClientExecutor[ConnectionAsync]):
"""The v4 Python-native Weaviate Client class that encapsulates Weaviate functionalities in one object.
- WARNING: This client is only compatible with Weaviate v1.23.6 and higher!
+ WARNING: This client is only compatible with Weaviate v1.32.0 and higher!
A Client instance creates all the needed objects to interact with Weaviate, and connects all of
them to the same Weaviate instance. See below the Attributes of the Client instance. For the
@@ -100,7 +100,7 @@ async def __aexit__(self, exc_type: Any, exc_value: Any, traceback: Any) -> None
class WeaviateClient(_WeaviateClientExecutor[ConnectionSync]):
"""The v4 Python-native Weaviate Client class that encapsulates Weaviate functionalities in one object.
- WARNING: This client is only compatible with Weaviate v1.23.6 and higher!
+ WARNING: This client is only compatible with Weaviate v1.32.0 and higher!
A Client instance creates all the needed objects to interact with Weaviate, and connects all of
them to the same Weaviate instance. See below the Attributes of the Client instance. For the
diff --git a/weaviate/collections/aggregations/base_executor.py b/weaviate/collections/aggregations/base_executor.py
index 90cc72089..e4e20699b 100644
--- a/weaviate/collections/aggregations/base_executor.py
+++ b/weaviate/collections/aggregations/base_executor.py
@@ -1,9 +1,5 @@
-import io
-import json
-import pathlib
-from typing import Generic, List, Optional, TypeVar, Union, cast
+from typing import Generic, List, Optional, TypeVar, Union
-from httpx import Response
from typing_extensions import ParamSpec
from weaviate.collections.classes.aggregate import (
@@ -17,32 +13,14 @@
AggregateResult,
AggregateReturn,
AggregateText,
- AProperties,
- GroupByAggregate,
GroupedBy,
TopOccurrence,
- _Metrics,
- _MetricsBoolean,
- _MetricsDate,
- _MetricsInteger,
- _MetricsNumber,
- _MetricsReference,
- _MetricsText,
)
from weaviate.collections.classes.config import ConsistencyLevel
-from weaviate.collections.classes.filters import FilterReturn
-from weaviate.collections.classes.grpc import Move
from weaviate.collections.classes.types import GeoCoordinate
-from weaviate.collections.filters import _FilterToREST
from weaviate.collections.grpc.aggregate import _AggregateGRPC
-from weaviate.connect import executor
from weaviate.connect.v4 import ConnectionType
-from weaviate.exceptions import WeaviateInvalidInputError, WeaviateQueryError
-from weaviate.gql.aggregate import AggregateBuilder
from weaviate.proto.v1 import aggregate_pb2
-from weaviate.types import NUMBER, UUID
-from weaviate.util import _decode_json_response_dict, parse_blob
-from weaviate.validator import _validate_input, _ValidateArgument
from weaviate.warnings import _Warnings
P = ParamSpec("P")
@@ -70,27 +48,6 @@ def __init__(
validate_arguments=validate_arguments,
)
- def _query(self) -> AggregateBuilder:
- return AggregateBuilder(
- self._name,
- )
-
- def _to_aggregate_result(
- self, response: dict, metrics: Optional[List[_Metrics]]
- ) -> AggregateReturn:
- try:
- result: dict = response["data"]["Aggregate"][self._name][0]
- return AggregateReturn(
- properties=(
- self.__parse_properties(result, metrics) if metrics is not None else {}
- ),
- total_count=(result["meta"]["count"] if result.get("meta") is not None else None),
- )
- except KeyError as e:
- raise ValueError(
- f"There was an error accessing the {e} key when parsing the GraphQL response: {response}"
- )
-
def _to_result(
self, is_groupby: bool, response: aggregate_pb2.AggregateReply
) -> Union[AggregateReturn, AggregateGroupByReturn]:
@@ -159,98 +116,6 @@ def __parse_grouped_by_value(
_Warnings.unknown_type_encountered(grouped_by.WhichOneof("value"))
return GroupedBy(prop=grouped_by.path[0], value=value)
- def _to_group_by_result(
- self, response: dict, metrics: Optional[List[_Metrics]]
- ) -> AggregateGroupByReturn:
- try:
- results: dict = response["data"]["Aggregate"][self._name]
- return AggregateGroupByReturn(
- groups=[
- AggregateGroup(
- grouped_by=GroupedBy(
- prop=result["groupedBy"]["path"][0],
- value=result["groupedBy"]["value"],
- ),
- properties=(
- self.__parse_properties(result, metrics) if metrics is not None else {}
- ),
- total_count=(
- result["meta"]["count"] if result.get("meta") is not None else None
- ),
- )
- for result in results
- ]
- )
- except KeyError as e:
- raise ValueError(
- f"There was an error accessing the {e} key when parsing the GraphQL response: {response}"
- )
-
- def __parse_properties(self, result: dict, metrics: List[_Metrics]) -> AProperties:
- props: AProperties = {}
- for metric in metrics:
- if metric.property_name in result:
- props[metric.property_name] = self.__parse_property_gql(
- result[metric.property_name], metric
- )
- return props
-
- @staticmethod
- def __parse_property_gql(property_: dict, metric: _Metrics) -> AggregateResult:
- if isinstance(metric, _MetricsText):
- return AggregateText(
- count=property_.get("count"),
- top_occurrences=[
- TopOccurrence(
- count=cast(dict, top_occurrence).get("occurs"),
- value=cast(dict, top_occurrence).get("value"),
- )
- for top_occurrence in property_.get("topOccurrences", [])
- ],
- )
- elif isinstance(metric, _MetricsInteger):
- return AggregateInteger(
- count=property_.get("count"),
- maximum=property_.get("maximum"),
- mean=property_.get("mean"),
- median=property_.get("median"),
- minimum=property_.get("minimum"),
- mode=property_.get("mode"),
- sum_=property_.get("sum"),
- )
- elif isinstance(metric, _MetricsNumber):
- return AggregateNumber(
- count=property_.get("count"),
- maximum=property_.get("maximum"),
- mean=property_.get("mean"),
- median=property_.get("median"),
- minimum=property_.get("minimum"),
- mode=property_.get("mode"),
- sum_=property_.get("sum"),
- )
- elif isinstance(metric, _MetricsBoolean):
- return AggregateBoolean(
- count=property_.get("count"),
- percentage_false=property_.get("percentageFalse"),
- percentage_true=property_.get("percentageTrue"),
- total_false=property_.get("totalFalse"),
- total_true=property_.get("totalTrue"),
- )
- elif isinstance(metric, _MetricsDate):
- return AggregateDate(
- count=property_.get("count"),
- maximum=property_.get("maximum"),
- median=property_.get("median"),
- minimum=property_.get("minimum"),
- mode=property_.get("mode"),
- )
- elif isinstance(metric, _MetricsReference):
- return AggregateReference(pointing_to=property_.get("pointingTo"))
- else:
- raise ValueError(
- f"Unknown aggregation type {metric} encountered in _Aggregate.__parse_property() for property {property_}"
- )
-
@staticmethod
def __parse_property_grpc(
aggregation: aggregate_pb2.AggregateReply.Aggregations.Aggregation,
@@ -320,234 +185,3 @@ def __parse_property_grpc(
raise ValueError(
f"Unknown aggregation type {aggregation} encountered in _Aggregate.__parse_property_grpc()"
)
-
- @staticmethod
- def _add_groupby_to_builder(
- builder: AggregateBuilder, group_by: Union[str, GroupByAggregate, None]
- ) -> AggregateBuilder:
- _validate_input(_ValidateArgument([str, GroupByAggregate, None], "group_by", group_by))
- if group_by is None:
- return builder
- if isinstance(group_by, str):
- group_by = GroupByAggregate(prop=group_by)
- builder = builder.with_group_by_filter([group_by.prop])
- if group_by.limit is not None:
- builder = builder.with_limit(group_by.limit)
- return builder.with_fields(" groupedBy { path value } ")
-
- def _base(
- self,
- return_metrics: Optional[List[_Metrics]],
- filters: Optional[FilterReturn],
- total_count: bool,
- ) -> AggregateBuilder:
- _validate_input(
- [
- _ValidateArgument([List[_Metrics], None], "return_metrics", return_metrics),
- _ValidateArgument([FilterReturn, None], "filters", filters),
- _ValidateArgument([bool], "total_count", total_count),
- ]
- )
- builder = self._query()
- if return_metrics is not None:
- builder = builder.with_fields(" ".join([metric.to_gql() for metric in return_metrics]))
- if filters is not None:
- builder = builder.with_where(_FilterToREST.convert(filters))
- if total_count:
- builder = builder.with_meta_count()
- if self._tenant is not None:
- builder = builder.with_tenant(self._tenant)
- return builder
-
- def _do(self, query: AggregateBuilder) -> executor.Result[dict]:
- def resp(res: Response) -> dict:
- data = _decode_json_response_dict(res, "Query was not successful")
- assert data is not None
- if (errs := data.get("errors")) is not None:
- if "Unexpected empty IN" in errs[0]["message"]:
- raise WeaviateQueryError(
- "The query that you sent had no body so GraphQL was unable to parse it. You must provide at least one option to the aggregation method in order to build a valid query.",
- "GQL Aggregate",
- )
- raise WeaviateQueryError(
- f"Error in GraphQL response: {json.dumps(errs, indent=2)}, for the following query: {query.build()}",
- "GQL Aggregate",
- )
- return data
-
- return executor.execute(
- response_callback=resp,
- method=self._connection.post,
- path="/graphql",
- weaviate_object={"query": query.build()},
- )
-
- @staticmethod
- def _parse_near_options(
- certainty: Optional[NUMBER],
- distance: Optional[NUMBER],
- object_limit: Optional[int],
- ) -> None:
- _validate_input(
- [
- _ValidateArgument([int, float, None], "certainty", certainty),
- _ValidateArgument([int, float, None], "distance", distance),
- _ValidateArgument([int, None], "object_limit", object_limit),
- ]
- )
-
- @staticmethod
- def _add_hybrid_to_builder(
- builder: AggregateBuilder,
- query: Optional[str],
- alpha: Optional[NUMBER],
- vector: Optional[List[float]],
- query_properties: Optional[List[str]],
- object_limit: Optional[int],
- target_vector: Optional[str],
- max_vector_distance: Optional[NUMBER],
- ) -> AggregateBuilder:
- payload: dict = {}
- if query is not None:
- payload["query"] = query
- if alpha is not None:
- payload["alpha"] = alpha
- if vector is not None:
- payload["vector"] = vector
- if query_properties is not None:
- payload["properties"] = query_properties
- if target_vector is not None:
- payload["targetVectors"] = [target_vector]
- if max_vector_distance is not None:
- payload["maxVectorDistance"] = max_vector_distance
- builder = builder.with_hybrid(payload)
- if object_limit is not None:
- builder = builder.with_object_limit(object_limit)
- return builder
-
- @staticmethod
- def _add_near_image_to_builder(
- builder: AggregateBuilder,
- near_image: Union[str, pathlib.Path, io.BufferedReader],
- certainty: Optional[NUMBER],
- distance: Optional[NUMBER],
- object_limit: Optional[int],
- target_vector: Optional[str],
- ) -> AggregateBuilder:
- if all([certainty is None, distance is None, object_limit is None]):
- raise WeaviateInvalidInputError(
- "You must provide at least one of the following arguments: certainty, distance, object_limit when vector searching"
- )
- _validate_input(
- _ValidateArgument([str, pathlib.Path, io.BufferedReader], "near_image", near_image)
- )
- _BaseExecutor._parse_near_options(certainty, distance, object_limit)
- payload: dict = {}
- payload["image"] = parse_blob(near_image)
- if certainty is not None:
- payload["certainty"] = certainty
- if distance is not None:
- payload["distance"] = distance
- if target_vector is not None:
- payload["targetVector"] = target_vector
- builder = builder.with_near_image(payload, encode=False)
- if object_limit is not None:
- builder = builder.with_object_limit(object_limit)
- return builder
-
- @staticmethod
- def _add_near_object_to_builder(
- builder: AggregateBuilder,
- near_object: UUID,
- certainty: Optional[NUMBER],
- distance: Optional[NUMBER],
- object_limit: Optional[int],
- target_vector: Optional[str],
- ) -> AggregateBuilder:
- if all([certainty is None, distance is None, object_limit is None]):
- raise WeaviateInvalidInputError(
- "You must provide at least one of the following arguments: certainty, distance, object_limit when vector searching"
- )
- _validate_input(_ValidateArgument([UUID], "near_object", near_object))
- _BaseExecutor._parse_near_options(certainty, distance, object_limit)
- payload: dict = {}
- payload["id"] = str(near_object)
- if certainty is not None:
- payload["certainty"] = certainty
- if distance is not None:
- payload["distance"] = distance
- if target_vector is not None:
- payload["targetVector"] = target_vector
- builder = builder.with_near_object(payload)
- if object_limit is not None:
- builder = builder.with_object_limit(object_limit)
- return builder
-
- @staticmethod
- def _add_near_text_to_builder(
- builder: AggregateBuilder,
- query: Union[List[str], str],
- certainty: Optional[NUMBER],
- distance: Optional[NUMBER],
- move_to: Optional[Move],
- move_away: Optional[Move],
- object_limit: Optional[int],
- target_vector: Optional[str],
- ) -> AggregateBuilder:
- if all([certainty is None, distance is None, object_limit is None]):
- raise WeaviateInvalidInputError(
- "You must provide at least one of the following arguments: certainty, distance, object_limit when vector searching"
- )
- _validate_input(
- [
- _ValidateArgument([List[str], str], "query", query),
- _ValidateArgument([Move, None], "move_to", move_to),
- _ValidateArgument([Move, None], "move_away", move_away),
- _ValidateArgument([str, None], "target_vector", target_vector),
- ]
- )
- _BaseExecutor._parse_near_options(certainty, distance, object_limit)
- payload: dict = {}
- payload["concepts"] = query if isinstance(query, list) else [query]
- if certainty is not None:
- payload["certainty"] = certainty
- if distance is not None:
- payload["distance"] = distance
- if move_to is not None:
- payload["moveTo"] = move_to._to_gql_payload()
- if move_away is not None:
- payload["moveAwayFrom"] = move_away._to_gql_payload()
- if target_vector is not None:
- payload["targetVector"] = target_vector
- builder = builder.with_near_text(payload)
- if object_limit is not None:
- builder = builder.with_object_limit(object_limit)
- return builder
-
- @staticmethod
- def _add_near_vector_to_builder(
- builder: AggregateBuilder,
- near_vector: List[float],
- certainty: Optional[NUMBER],
- distance: Optional[NUMBER],
- object_limit: Optional[int],
- target_vector: Optional[str],
- ) -> AggregateBuilder:
- if all([certainty is None, distance is None, object_limit is None]):
- raise WeaviateInvalidInputError(
- "You must provide at least one of the following arguments: certainty, distance, object_limit when vector searching"
- )
- _validate_input(_ValidateArgument([list], "near_vector", near_vector))
- _BaseExecutor._parse_near_options(certainty, distance, object_limit)
- payload: dict = {}
- payload["vector"] = near_vector
- if certainty is not None:
- payload["certainty"] = certainty
- if distance is not None:
- payload["distance"] = distance
- if target_vector is not None:
- payload["targetVector"] = target_vector
- builder = builder.with_near_vector(payload)
- if object_limit is not None:
- builder = builder.with_object_limit(object_limit)
- return builder
diff --git a/weaviate/collections/aggregations/hybrid/executor.py b/weaviate/collections/aggregations/hybrid/executor.py
index 4c3f882e6..035e4b09a 100644
--- a/weaviate/collections/aggregations/hybrid/executor.py
+++ b/weaviate/collections/aggregations/hybrid/executor.py
@@ -116,61 +116,33 @@ def hybrid(
if isinstance(group_by, str):
group_by = GroupByAggregate(prop=group_by)
- if self._connection._weaviate_version.is_lower_than(1, 29, 0):
- # use gql, remove once 1.29 is the minimum supported version
- def resp(res: dict) -> Union[AggregateReturn, AggregateGroupByReturn]:
- return (
- self._to_aggregate_result(res, return_metrics)
- if group_by is None
- else self._to_group_by_result(res, return_metrics)
- )
-
- builder = self._base(return_metrics, filters, total_count)
- builder = self._add_hybrid_to_builder(
- builder,
- query,
- alpha,
- vector,
- query_properties,
- object_limit,
- target_vector,
- max_vector_distance,
- )
- builder = self._add_groupby_to_builder(builder, group_by)
- return executor.execute(
- response_callback=resp,
- method=self._do,
- query=builder,
- )
- else:
- # use grpc
- request = self._grpc.hybrid(
- query=query,
- alpha=alpha,
- vector=vector,
- properties=query_properties,
- object_limit=object_limit,
- bm25_operator=bm25_operator,
- target_vector=target_vector,
- distance=max_vector_distance,
- aggregations=(
- [metric.to_grpc() for metric in return_metrics]
- if return_metrics is not None
- else []
- ),
- filters=_FilterToGRPC.convert(filters) if filters is not None else None,
- group_by=group_by._to_grpc() if group_by is not None else None,
- limit=group_by.limit if group_by is not None else None,
- objects_count=total_count,
- )
+ request = self._grpc.hybrid(
+ query=query,
+ alpha=alpha,
+ vector=vector,
+ properties=query_properties,
+ object_limit=object_limit,
+ bm25_operator=bm25_operator,
+ target_vector=target_vector,
+ distance=max_vector_distance,
+ aggregations=(
+ [metric.to_grpc() for metric in return_metrics]
+ if return_metrics is not None
+ else []
+ ),
+ filters=_FilterToGRPC.convert(filters) if filters is not None else None,
+ group_by=group_by._to_grpc() if group_by is not None else None,
+ limit=group_by.limit if group_by is not None else None,
+ objects_count=total_count,
+ )
- def respGrpc(
- res: aggregate_pb2.AggregateReply,
- ) -> Union[AggregateReturn, AggregateGroupByReturn]:
- return self._to_result(group_by is not None, res)
+ def respGrpc(
+ res: aggregate_pb2.AggregateReply,
+ ) -> Union[AggregateReturn, AggregateGroupByReturn]:
+ return self._to_result(group_by is not None, res)
- return executor.execute(
- response_callback=respGrpc,
- method=self._connection.grpc_aggregate,
- request=request,
- )
+ return executor.execute(
+ response_callback=respGrpc,
+ method=self._connection.grpc_aggregate,
+ request=request,
+ )
diff --git a/weaviate/collections/aggregations/near_image/executor.py b/weaviate/collections/aggregations/near_image/executor.py
index 0363795ab..bd4245353 100644
--- a/weaviate/collections/aggregations/near_image/executor.py
+++ b/weaviate/collections/aggregations/near_image/executor.py
@@ -107,52 +107,31 @@ def near_image(
if isinstance(group_by, str):
group_by = GroupByAggregate(prop=group_by)
- if self._connection._weaviate_version.is_lower_than(1, 29, 0):
- # use gql, remove once 1.29 is the minimum supported version
- def resp(res: dict) -> Union[AggregateReturn, AggregateGroupByReturn]:
- return (
- self._to_aggregate_result(res, return_metrics)
- if group_by is None
- else self._to_group_by_result(res, return_metrics)
- )
-
- builder = self._base(return_metrics, filters, total_count)
- builder = self._add_groupby_to_builder(builder, group_by)
- builder = self._add_near_image_to_builder(
- builder, near_image, certainty, distance, object_limit, target_vector
- )
- return executor.execute(
- response_callback=resp,
- method=self._do,
- query=builder,
- )
- else:
- # use grpc
- request = self._grpc.near_media(
- media=parse_blob(near_image),
- type_="image",
- certainty=certainty,
- distance=distance,
- target_vector=target_vector,
- aggregations=(
- [metric.to_grpc() for metric in return_metrics]
- if return_metrics is not None
- else []
- ),
- filters=_FilterToGRPC.convert(filters) if filters is not None else None,
- group_by=group_by._to_grpc() if group_by is not None else None,
- limit=group_by.limit if group_by is not None else None,
- objects_count=total_count,
- object_limit=object_limit,
- )
+ request = self._grpc.near_media(
+ media=parse_blob(near_image),
+ type_="image",
+ certainty=certainty,
+ distance=distance,
+ target_vector=target_vector,
+ aggregations=(
+ [metric.to_grpc() for metric in return_metrics]
+ if return_metrics is not None
+ else []
+ ),
+ filters=_FilterToGRPC.convert(filters) if filters is not None else None,
+ group_by=group_by._to_grpc() if group_by is not None else None,
+ limit=group_by.limit if group_by is not None else None,
+ objects_count=total_count,
+ object_limit=object_limit,
+ )
- def respGrpc(
- res: aggregate_pb2.AggregateReply,
- ) -> Union[AggregateReturn, AggregateGroupByReturn]:
- return self._to_result(group_by is not None, res)
+ def respGrpc(
+ res: aggregate_pb2.AggregateReply,
+ ) -> Union[AggregateReturn, AggregateGroupByReturn]:
+ return self._to_result(group_by is not None, res)
- return executor.execute(
- response_callback=respGrpc,
- method=self._connection.grpc_aggregate,
- request=request,
- )
+ return executor.execute(
+ response_callback=respGrpc,
+ method=self._connection.grpc_aggregate,
+ request=request,
+ )
diff --git a/weaviate/collections/aggregations/near_object/executor.py b/weaviate/collections/aggregations/near_object/executor.py
index 2ac5b5668..c0c321d6b 100644
--- a/weaviate/collections/aggregations/near_object/executor.py
+++ b/weaviate/collections/aggregations/near_object/executor.py
@@ -106,51 +106,30 @@ def near_object(
if isinstance(group_by, str):
group_by = GroupByAggregate(prop=group_by)
- if self._connection._weaviate_version.is_lower_than(1, 29, 0):
- # use gql, remove once 1.29 is the minimum supported version
- def resp(res: dict) -> Union[AggregateReturn, AggregateGroupByReturn]:
- return (
- self._to_aggregate_result(res, return_metrics)
- if group_by is None
- else self._to_group_by_result(res, return_metrics)
- )
-
- builder = self._base(return_metrics, filters, total_count)
- builder = self._add_groupby_to_builder(builder, group_by)
- builder = self._add_near_object_to_builder(
- builder, near_object, certainty, distance, object_limit, target_vector
- )
- return executor.execute(
- response_callback=resp,
- method=self._do,
- query=builder,
- )
- else:
- # use grpc
- request = self._grpc.near_object(
- near_object=near_object,
- certainty=certainty,
- distance=distance,
- target_vector=target_vector,
- aggregations=(
- [metric.to_grpc() for metric in return_metrics]
- if return_metrics is not None
- else []
- ),
- filters=_FilterToGRPC.convert(filters) if filters is not None else None,
- group_by=group_by._to_grpc() if group_by is not None else None,
- limit=group_by.limit if group_by is not None else None,
- objects_count=total_count,
- object_limit=object_limit,
- )
+ request = self._grpc.near_object(
+ near_object=near_object,
+ certainty=certainty,
+ distance=distance,
+ target_vector=target_vector,
+ aggregations=(
+ [metric.to_grpc() for metric in return_metrics]
+ if return_metrics is not None
+ else []
+ ),
+ filters=_FilterToGRPC.convert(filters) if filters is not None else None,
+ group_by=group_by._to_grpc() if group_by is not None else None,
+ limit=group_by.limit if group_by is not None else None,
+ objects_count=total_count,
+ object_limit=object_limit,
+ )
- def respGrpc(
- res: aggregate_pb2.AggregateReply,
- ) -> Union[AggregateReturn, AggregateGroupByReturn]:
- return self._to_result(group_by is not None, res)
+ def respGrpc(
+ res: aggregate_pb2.AggregateReply,
+ ) -> Union[AggregateReturn, AggregateGroupByReturn]:
+ return self._to_result(group_by is not None, res)
- return executor.execute(
- response_callback=respGrpc,
- method=self._connection.grpc_aggregate,
- request=request,
- )
+ return executor.execute(
+ response_callback=respGrpc,
+ method=self._connection.grpc_aggregate,
+ request=request,
+ )
diff --git a/weaviate/collections/aggregations/near_text/executor.py b/weaviate/collections/aggregations/near_text/executor.py
index 07b2ec841..8b3dfe1ec 100644
--- a/weaviate/collections/aggregations/near_text/executor.py
+++ b/weaviate/collections/aggregations/near_text/executor.py
@@ -117,60 +117,32 @@ def near_text(
if isinstance(group_by, str):
group_by = GroupByAggregate(prop=group_by)
- if self._connection._weaviate_version.is_lower_than(1, 29, 0):
- # use gql, remove once 1.29 is the minimum supported version
- def resp(res: dict) -> Union[AggregateReturn, AggregateGroupByReturn]:
- return (
- self._to_aggregate_result(res, return_metrics)
- if group_by is None
- else self._to_group_by_result(res, return_metrics)
- )
-
- builder = self._base(return_metrics, filters, total_count)
- builder = self._add_groupby_to_builder(builder, group_by)
- builder = self._add_near_text_to_builder(
- builder=builder,
- query=query,
- certainty=certainty,
- distance=distance,
- move_to=move_to,
- move_away=move_away,
- object_limit=object_limit,
- target_vector=target_vector,
- )
- return executor.execute(
- response_callback=resp,
- method=self._do,
- query=builder,
- )
- else:
- # use grpc
- request = self._grpc.near_text(
- near_text=query,
- certainty=certainty,
- distance=distance,
- move_away=move_away,
- move_to=move_to,
- target_vector=target_vector,
- aggregations=(
- [metric.to_grpc() for metric in return_metrics]
- if return_metrics is not None
- else []
- ),
- filters=_FilterToGRPC.convert(filters) if filters is not None else None,
- group_by=group_by._to_grpc() if group_by is not None else None,
- limit=group_by.limit if group_by is not None else None,
- objects_count=total_count,
- object_limit=object_limit,
- )
+ request = self._grpc.near_text(
+ near_text=query,
+ certainty=certainty,
+ distance=distance,
+ move_away=move_away,
+ move_to=move_to,
+ target_vector=target_vector,
+ aggregations=(
+ [metric.to_grpc() for metric in return_metrics]
+ if return_metrics is not None
+ else []
+ ),
+ filters=_FilterToGRPC.convert(filters) if filters is not None else None,
+ group_by=group_by._to_grpc() if group_by is not None else None,
+ limit=group_by.limit if group_by is not None else None,
+ objects_count=total_count,
+ object_limit=object_limit,
+ )
- def respGrpc(
- res: aggregate_pb2.AggregateReply,
- ) -> Union[AggregateReturn, AggregateGroupByReturn]:
- return self._to_result(group_by is not None, res)
+ def respGrpc(
+ res: aggregate_pb2.AggregateReply,
+ ) -> Union[AggregateReturn, AggregateGroupByReturn]:
+ return self._to_result(group_by is not None, res)
- return executor.execute(
- response_callback=respGrpc,
- method=self._connection.grpc_aggregate,
- request=request,
- )
+ return executor.execute(
+ response_callback=respGrpc,
+ method=self._connection.grpc_aggregate,
+ request=request,
+ )
diff --git a/weaviate/collections/aggregations/near_vector/executor.py b/weaviate/collections/aggregations/near_vector/executor.py
index c53062749..a1c93abb6 100644
--- a/weaviate/collections/aggregations/near_vector/executor.py
+++ b/weaviate/collections/aggregations/near_vector/executor.py
@@ -1,4 +1,4 @@
-from typing import Generic, List, Literal, Optional, Union, cast, overload
+from typing import Generic, Literal, Optional, Union, overload
from weaviate.collections.aggregations.base_executor import _BaseExecutor
from weaviate.collections.classes.aggregate import (
@@ -15,7 +15,6 @@
from weaviate.collections.filters import _FilterToGRPC
from weaviate.connect import executor
from weaviate.connect.v4 import ConnectionType
-from weaviate.exceptions import WeaviateInvalidInputError
from weaviate.proto.v1 import aggregate_pb2
from weaviate.types import NUMBER
@@ -110,68 +109,30 @@ def near_vector(
if isinstance(group_by, str):
group_by = GroupByAggregate(prop=group_by)
- if self._connection._weaviate_version.is_lower_than(1, 29, 0):
- # use gql, remove once 1.29 is the minimum supported version
-
- if not isinstance(near_vector, list):
- raise WeaviateInvalidInputError(
- "A `near_vector` argument other than a list of float is not supported in Union[AggregateReturn, AggregateGroupByReturn]:
- return (
- self._to_aggregate_result(res, return_metrics)
- if group_by is None
- else self._to_group_by_result(res, return_metrics)
- )
-
- builder = self._base(return_metrics, filters, total_count)
- builder = self._add_groupby_to_builder(builder, group_by)
- builder = self._add_near_vector_to_builder(
- builder, near_vector, certainty, distance, object_limit, target_vector
- )
- return executor.execute(
- response_callback=resp,
- method=self._do,
- query=builder,
- )
- else:
- # use grpc
- request = self._grpc.near_vector(
- near_vector=near_vector,
- certainty=certainty,
- distance=distance,
- target_vector=target_vector,
- aggregations=(
- [metric.to_grpc() for metric in return_metrics]
- if return_metrics is not None
- else []
- ),
- filters=_FilterToGRPC.convert(filters) if filters is not None else None,
- group_by=group_by._to_grpc() if group_by is not None else None,
- limit=group_by.limit if group_by is not None else None,
- objects_count=total_count,
- object_limit=object_limit,
- )
+ request = self._grpc.near_vector(
+ near_vector=near_vector,
+ certainty=certainty,
+ distance=distance,
+ target_vector=target_vector,
+ aggregations=(
+ [metric.to_grpc() for metric in return_metrics]
+ if return_metrics is not None
+ else []
+ ),
+ filters=_FilterToGRPC.convert(filters) if filters is not None else None,
+ group_by=group_by._to_grpc() if group_by is not None else None,
+ limit=group_by.limit if group_by is not None else None,
+ objects_count=total_count,
+ object_limit=object_limit,
+ )
- def respGrpc(
- res: aggregate_pb2.AggregateReply,
- ) -> Union[AggregateReturn, AggregateGroupByReturn]:
- return self._to_result(group_by is not None, res)
+ def respGrpc(
+ res: aggregate_pb2.AggregateReply,
+ ) -> Union[AggregateReturn, AggregateGroupByReturn]:
+ return self._to_result(group_by is not None, res)
- return executor.execute(
- response_callback=respGrpc,
- method=self._connection.grpc_aggregate,
- request=request,
- )
+ return executor.execute(
+ response_callback=respGrpc,
+ method=self._connection.grpc_aggregate,
+ request=request,
+ )
diff --git a/weaviate/collections/aggregations/over_all/executor.py b/weaviate/collections/aggregations/over_all/executor.py
index 343fb3463..e9245443f 100644
--- a/weaviate/collections/aggregations/over_all/executor.py
+++ b/weaviate/collections/aggregations/over_all/executor.py
@@ -76,44 +76,25 @@ def over_all(
if isinstance(group_by, str):
group_by = GroupByAggregate(prop=group_by)
- if self._connection._weaviate_version.is_lower_than(1, 29, 0):
- # use gql, remove once 1.29 is the minimum supported version
- def resp(res: dict) -> Union[AggregateReturn, AggregateGroupByReturn]:
- return (
- self._to_aggregate_result(res, return_metrics)
- if group_by is None
- else self._to_group_by_result(res, return_metrics)
- )
-
- builder = self._base(return_metrics, filters, total_count)
- builder = self._add_groupby_to_builder(builder, group_by)
- return executor.execute(
- response_callback=resp,
- method=self._do,
- query=builder,
- )
-
- else:
- # use grpc
- request = self._grpc.over_all(
- aggregations=(
- [metric.to_grpc() for metric in return_metrics]
- if return_metrics is not None
- else []
- ),
- filters=_FilterToGRPC.convert(filters) if filters is not None else None,
- group_by=group_by._to_grpc() if group_by is not None else None,
- limit=group_by.limit if group_by is not None else None,
- objects_count=total_count,
- )
+ request = self._grpc.over_all(
+ aggregations=(
+ [metric.to_grpc() for metric in return_metrics]
+ if return_metrics is not None
+ else []
+ ),
+ filters=_FilterToGRPC.convert(filters) if filters is not None else None,
+ group_by=group_by._to_grpc() if group_by is not None else None,
+ limit=group_by.limit if group_by is not None else None,
+ objects_count=total_count,
+ )
- def respGrpc(
- res: aggregate_pb2.AggregateReply,
- ) -> Union[AggregateReturn, AggregateGroupByReturn]:
- return self._to_result(group_by is not None, res)
+ def respGrpc(
+ res: aggregate_pb2.AggregateReply,
+ ) -> Union[AggregateReturn, AggregateGroupByReturn]:
+ return self._to_result(group_by is not None, res)
- return executor.execute(
- response_callback=respGrpc,
- method=self._connection.grpc_aggregate,
- request=request,
- )
+ return executor.execute(
+ response_callback=respGrpc,
+ method=self._connection.grpc_aggregate,
+ request=request,
+ )
diff --git a/weaviate/collections/classes/aggregate.py b/weaviate/collections/classes/aggregate.py
index a1e7596c3..93a5ac4f8 100644
--- a/weaviate/collections/classes/aggregate.py
+++ b/weaviate/collections/classes/aggregate.py
@@ -141,9 +141,6 @@ class _MetricsBase(BaseModel):
property_name: str
count: bool
- def to_gql(self) -> str:
- raise NotImplementedError
-
def to_grpc(self) -> aggregate_pb2.AggregateRequest.Aggregation:
raise NotImplementedError
@@ -153,29 +150,12 @@ class _MetricsText(_MetricsBase):
top_occurrences_value: bool
limit: Optional[int]
- def to_gql(self) -> str:
- limit = f"(limit: {self.limit})" if self.limit is not None else ""
- body = " ".join(
- [
- "count" if self.count else "",
- (
- "topOccurrences" + limit + " {"
- if self.top_occurrences_count or self.top_occurrences_value
- else ""
- ),
- "occurs" if self.top_occurrences_count else "",
- "value" if self.top_occurrences_value else "",
- "}" if self.top_occurrences_count or self.top_occurrences_value else "",
- ]
- )
- return f"{self.property_name} {{ {body} }}"
-
def to_grpc(self) -> aggregate_pb2.AggregateRequest.Aggregation:
return aggregate_pb2.AggregateRequest.Aggregation(
property=self.property_name,
text=aggregate_pb2.AggregateRequest.Aggregation.Text(
count=self.count,
- top_occurences=self.top_occurrences_count,
+ top_occurences=self.top_occurrences_count or self.top_occurrences_value,
top_occurences_limit=self.limit,
),
)
@@ -189,20 +169,6 @@ class _MetricsNum(_MetricsBase):
mode: bool
sum_: bool
- def to_gql(self) -> str:
- body = " ".join(
- [
- "count" if self.count else "",
- "maximum" if self.maximum else "",
- "mean" if self.mean else "",
- "median" if self.median else "",
- "minimum" if self.minimum else "",
- "mode" if self.mode else "",
- "sum" if self.sum_ else "",
- ]
- )
- return f"{self.property_name} {{ {body} }}"
-
class _MetricsInteger(_MetricsNum):
def to_grpc(self) -> aggregate_pb2.AggregateRequest.Aggregation:
@@ -242,18 +208,6 @@ class _MetricsBoolean(_MetricsBase):
total_false: bool
total_true: bool
- def to_gql(self) -> str:
- body = " ".join(
- [
- "count" if self.count else "",
- "percentageFalse" if self.percentage_false else "",
- "percentageTrue" if self.percentage_true else "",
- "totalFalse" if self.total_false else "",
- "totalTrue" if self.total_true else "",
- ]
- )
- return f"{self.property_name} {{ {body} }}"
-
def to_grpc(self) -> aggregate_pb2.AggregateRequest.Aggregation:
return aggregate_pb2.AggregateRequest.Aggregation(
property=self.property_name,
@@ -273,18 +227,6 @@ class _MetricsDate(_MetricsBase):
minimum: bool
mode: bool
- def to_gql(self) -> str:
- body = " ".join(
- [
- "count" if self.count else "",
- "maximum" if self.maximum else "",
- "median" if self.median else "",
- "minimum" if self.minimum else "",
- "mode" if self.mode else "",
- ]
- )
- return f"{self.property_name} {{ {body} }}"
-
def to_grpc(self) -> aggregate_pb2.AggregateRequest.Aggregation:
return aggregate_pb2.AggregateRequest.Aggregation(
property=self.property_name,
@@ -302,14 +244,6 @@ class _MetricsReference(BaseModel):
property_name: str
pointing_to: bool
- def to_gql(self) -> str:
- body = " ".join(
- [
- "pointingTo" if self.pointing_to else "",
- ]
- )
- return f"{self.property_name} {{ {body} }}"
-
def to_grpc(self) -> aggregate_pb2.AggregateRequest.Aggregation:
return aggregate_pb2.AggregateRequest.Aggregation(
property=self.property_name,
diff --git a/weaviate/collections/classes/config.py b/weaviate/collections/classes/config.py
index 3750cbcf1..3d584e5db 100644
--- a/weaviate/collections/classes/config.py
+++ b/weaviate/collections/classes/config.py
@@ -267,6 +267,8 @@ class Rerankers(str, BaseEnum):
VOYAGEAI: Weaviate module backed by VoyageAI reranking models.
JINAAI: Weaviate module backed by JinaAI reranking models.
NVIDIA: Weaviate module backed by NVIDIA reranking models.
+ TYPESAFEAI: Weaviate module backed by TypeSafe AI decision models.
+ OPENAI: Weaviate module backed by OpenAI decision models.
"""
NONE = "none"
@@ -276,6 +278,8 @@ class Rerankers(str, BaseEnum):
VOYAGEAI = "reranker-voyageai"
JINAAI = "reranker-jinaai"
NVIDIA = "reranker-nvidia"
+ TYPESAFEAI = "reranker-typesafeai"
+ OPENAI = "reranker-openai"
class StopwordsPreset(str, BaseEnum):
@@ -735,6 +739,34 @@ def _to_dict(self) -> Dict[str, Any]:
return ret_dict
+class _RerankerTypeSafeAIConfig(RerankerProvider):
+ reranker: Union[Rerankers, _EnumLikeStr] = Field(
+ default=Rerankers.TYPESAFEAI, frozen=True, exclude=True
+ )
+ model: Optional[str] = Field(default=None)
+ baseURL: Optional[AnyHttpUrl]
+
+ def _to_dict(self) -> Dict[str, Any]:
+ ret_dict = super()._to_dict()
+ if self.baseURL is not None:
+ ret_dict["baseURL"] = self.baseURL.unicode_string()
+ return ret_dict
+
+
+class _RerankerOpenAIConfig(RerankerProvider):
+ reranker: Union[Rerankers, _EnumLikeStr] = Field(
+ default=Rerankers.OPENAI, frozen=True, exclude=True
+ )
+ model: Optional[str] = Field(default=None)
+ baseURL: Optional[AnyHttpUrl]
+
+ def _to_dict(self) -> Dict[str, Any]:
+ ret_dict = super()._to_dict()
+ if self.baseURL is not None:
+ ret_dict["baseURL"] = self.baseURL.unicode_string()
+ return ret_dict
+
+
RerankerContextualAIModel = Literal[
"ctxl-rerank-v2-instruct-multilingual",
"ctxl-rerank-v2-instruct-multilingual-mini",
@@ -1541,6 +1573,38 @@ def nvidia(
"""
return _RerankerNvidiaConfig(model=model, baseURL=base_url)
+ @staticmethod
+ def typesafeai(
+ model: Optional[str] = None,
+ base_url: Optional[AnyHttpUrl] = None,
+ ) -> RerankerProvider:
+ """Create a `_RerankerTypeSafeAIConfig` object for use when reranking using the `reranker-typesafeai` module.
+
+ The rerank query is a condition that the model judges about each object, for example
+ "The customer is about to churn". `rerank_score` is the probability that the condition holds.
+
+ Args:
+ model: The model to use. Defaults to `None`, which uses the server-defined default (`jev-latest`).
+ base_url: The host to send the reranker requests to, without a path: the server appends `/v1/systemone`. Defaults to `None`, which uses the server-defined default (`https://api.typesafe.ai`).
+ """
+ return _RerankerTypeSafeAIConfig(model=model, baseURL=base_url)
+
+ @staticmethod
+ def openai(
+ model: Optional[str] = None,
+ base_url: Optional[AnyHttpUrl] = None,
+ ) -> RerankerProvider:
+ """Create a `_RerankerOpenAIConfig` object for use when reranking using the `reranker-openai` module.
+
+ The rerank query is a condition that the model judges about each object, for example
+ "The customer is about to churn". `rerank_score` is the probability that the condition holds.
+
+ Args:
+ model: The model to use. Defaults to `None`, which uses the server-defined default (`gpt-6-luna`).
+ base_url: The host to send the reranker requests to, without a path: the server appends `/v1/decisions`, so a URL ending in `/v1` fails. Defaults to `None`, which uses the server-defined default (`https://api.openai.com`).
+ """
+ return _RerankerOpenAIConfig(model=model, baseURL=base_url)
+
@staticmethod
def contextualai(
model: Optional[str] = None,
@@ -2016,6 +2080,8 @@ class _PQConfig(_ConfigBase):
centroids: int
training_limit: int
encoder: PQEncoderConfig
+ rescore_limit: Optional[int]
+ rescore_factor: Optional[float]
@property
def bit_compression(self) -> bool:
@@ -2030,11 +2096,13 @@ def bit_compression(self) -> bool:
class _BQConfig(_ConfigBase):
cache: Optional[bool]
rescore_limit: int
+ rescore_factor: Optional[float]
@dataclass
class _SQConfig(_ConfigBase):
rescore_limit: int
+ rescore_factor: Optional[float]
training_limit: int
@@ -2043,6 +2111,7 @@ class _RQConfig(_ConfigBase):
cache: Optional[bool]
bits: Optional[int]
rescore_limit: int
+ rescore_factor: Optional[float]
centering: Optional[bool]
training_limit: Optional[int]
@@ -3056,6 +3125,8 @@ def pq(
segments: Optional[int] = None,
training_limit: Optional[int] = None,
enabled: bool = True,
+ rescore_limit: Optional[int] = None,
+ rescore_factor: Optional[float] = None,
) -> _PQConfigUpdate:
"""Create a `_PQConfigUpdate` object to be used when updating the product quantization (PQ) configuration of Weaviate.
@@ -3077,10 +3148,16 @@ def pq(
if encoder_type is not None or encoder_distribution is not None
else None
),
+ rescoreLimit=rescore_limit,
+ rescoreFactor=rescore_factor,
)
@staticmethod
- def bq(rescore_limit: Optional[int] = None, enabled: bool = True) -> _BQConfigUpdate:
+ def bq(
+ rescore_limit: Optional[int] = None,
+ enabled: bool = True,
+ rescore_factor: Optional[float] = None,
+ ) -> _BQConfigUpdate:
"""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()`.
@@ -3088,13 +3165,16 @@ def bq(rescore_limit: Optional[int] = None, enabled: bool = True) -> _BQConfigUp
Args:
See [the docs](https://weaviate.io/developers/weaviate/concepts/vector-index#hnsw-with-compression) for a more detailed view!
""" # noqa: D417 (missing argument descriptions in the docstring)
- return _BQConfigUpdate(rescoreLimit=rescore_limit, enabled=enabled)
+ return _BQConfigUpdate(
+ rescoreLimit=rescore_limit, rescoreFactor=rescore_factor, enabled=enabled
+ )
@staticmethod
def sq(
rescore_limit: Optional[int] = None,
training_limit: Optional[int] = None,
enabled: bool = True,
+ rescore_factor: Optional[float] = None,
) -> _SQConfigUpdate:
"""Create a `_SQConfigUpdate` object to be used when updating the scalar quantization (SQ) configuration of Weaviate.
@@ -3104,7 +3184,10 @@ def sq(
See [the docs](https://weaviate.io/developers/weaviate/concepts/vector-index#hnsw-with-compression) for a more detailed view!
""" # noqa: D417 (missing argument descriptions in the docstring)
return _SQConfigUpdate(
- enabled=enabled, rescoreLimit=rescore_limit, trainingLimit=training_limit
+ enabled=enabled,
+ rescoreLimit=rescore_limit,
+ rescoreFactor=rescore_factor,
+ trainingLimit=training_limit,
)
@staticmethod
@@ -3114,6 +3197,7 @@ def rq(
bits: Optional[int] = None,
centering: Optional[bool] = None,
training_limit: Optional[int] = None,
+ rescore_factor: Optional[float] = None,
) -> _RQConfigUpdate:
"""Create a `_RQConfigUpdate` object to be used when updating the Rotational quantization (RQ) configuration of Weaviate.
@@ -3125,6 +3209,7 @@ def rq(
return _RQConfigUpdate(
enabled=enabled,
rescoreLimit=rescore_limit,
+ rescoreFactor=rescore_factor,
bits=bits,
centering=centering,
trainingLimit=training_limit,
diff --git a/weaviate/collections/classes/config_methods.py b/weaviate/collections/classes/config_methods.py
index 846c06fd5..62d20cc39 100644
--- a/weaviate/collections/classes/config_methods.py
+++ b/weaviate/collections/classes/config_methods.py
@@ -134,11 +134,13 @@ def __get_quantizer_config(
quantizer = _BQConfig(
cache=config["bq"].get("cache"),
rescore_limit=config["bq"].get("rescoreLimit"),
+ rescore_factor=config["bq"].get("rescoreFactor"),
)
elif "sq" in config and config["sq"]["enabled"]:
# values are not present for bq+hnsw
quantizer = _SQConfig(
rescore_limit=config["sq"].get("rescoreLimit"),
+ rescore_factor=config["sq"].get("rescoreFactor"),
training_limit=config["sq"].get("trainingLimit"),
)
elif "pq" in config and config["pq"].get("enabled"):
@@ -153,12 +155,15 @@ def __get_quantizer_config(
config["pq"].get("encoder", {}).get("distribution")
),
),
+ rescore_limit=config["pq"].get("rescoreLimit"),
+ rescore_factor=config["pq"].get("rescoreFactor"),
)
elif "rq" in config and config["rq"].get("enabled"):
quantizer = _RQConfig(
cache=config["rq"].get("cache"),
bits=config["rq"].get("bits"),
rescore_limit=config["rq"].get("rescoreLimit"),
+ rescore_factor=config["rq"].get("rescoreFactor"),
centering=config["rq"].get("centering"),
training_limit=config["rq"].get("trainingLimit"),
)
diff --git a/weaviate/collections/classes/config_vector_index.py b/weaviate/collections/classes/config_vector_index.py
index 8cb995e1d..682139929 100644
--- a/weaviate/collections/classes/config_vector_index.py
+++ b/weaviate/collections/classes/config_vector_index.py
@@ -278,6 +278,8 @@ class _PQConfigCreate(_QuantizerConfigCreate):
encoder: _PQEncoderConfigCreate
segments: Optional[int]
trainingLimit: Optional[int]
+ rescoreLimit: Optional[int]
+ rescoreFactor: Optional[float]
@staticmethod
def quantizer_name() -> str:
@@ -287,6 +289,7 @@ def quantizer_name() -> str:
class _BQConfigCreate(_QuantizerConfigCreate):
cache: Optional[bool]
rescoreLimit: Optional[int]
+ rescoreFactor: Optional[float]
@staticmethod
def quantizer_name() -> str:
@@ -295,6 +298,7 @@ def quantizer_name() -> str:
class _SQConfigCreate(_QuantizerConfigCreate):
rescoreLimit: Optional[int]
+ rescoreFactor: Optional[float]
trainingLimit: Optional[int]
@staticmethod
@@ -306,6 +310,7 @@ class _RQConfigCreate(_QuantizerConfigCreate):
cache: Optional[bool]
bits: Optional[int]
rescoreLimit: Optional[int]
+ rescoreFactor: Optional[float]
centering: Optional[bool]
trainingLimit: Optional[int]
@@ -327,6 +332,8 @@ class _PQConfigUpdate(_QuantizerConfigUpdate):
segments: Optional[int]
trainingLimit: Optional[int]
encoder: Optional[_PQEncoderConfigUpdate]
+ rescoreLimit: Optional[int]
+ rescoreFactor: Optional[float]
@staticmethod
def quantizer_name() -> str:
@@ -336,6 +343,7 @@ def quantizer_name() -> str:
class _BQConfigUpdate(_QuantizerConfigUpdate):
enabled: Optional[bool]
rescoreLimit: Optional[int]
+ rescoreFactor: Optional[float]
@staticmethod
def quantizer_name() -> str:
@@ -345,6 +353,7 @@ def quantizer_name() -> str:
class _RQConfigUpdate(_QuantizerConfigUpdate):
enabled: Optional[bool]
rescoreLimit: Optional[int]
+ rescoreFactor: Optional[float]
bits: Optional[int]
centering: Optional[bool]
trainingLimit: Optional[int]
@@ -357,6 +366,7 @@ def quantizer_name() -> str:
class _SQConfigUpdate(_QuantizerConfigUpdate):
enabled: Optional[bool]
rescoreLimit: Optional[int]
+ rescoreFactor: Optional[float]
trainingLimit: Optional[int]
@staticmethod
@@ -421,6 +431,8 @@ def pq(
encoder_type: Optional[PQEncoderType] = None,
segments: Optional[int] = None,
training_limit: Optional[int] = None,
+ rescore_limit: Optional[int] = None,
+ rescore_factor: Optional[float] = None,
) -> _PQConfigCreate:
"""Create a `_PQConfigCreate` object to be used when defining the product quantization (PQ) configuration of Weaviate.
@@ -436,12 +448,15 @@ def pq(
segments=segments,
trainingLimit=training_limit,
encoder=_PQEncoderConfigCreate(type_=encoder_type, distribution=encoder_distribution),
+ rescoreLimit=rescore_limit,
+ rescoreFactor=rescore_factor,
)
@staticmethod
def bq(
cache: Optional[bool] = None,
rescore_limit: Optional[int] = None,
+ rescore_factor: Optional[float] = None,
) -> _BQConfigCreate:
"""Create a `_BQConfigCreate` object to be used when defining the binary quantization (BQ) configuration of Weaviate.
@@ -453,6 +468,7 @@ def bq(
return _BQConfigCreate(
cache=cache,
rescoreLimit=rescore_limit,
+ rescoreFactor=rescore_factor,
)
@deprecated(
@@ -464,6 +480,7 @@ def sq(
cache: bool,
rescore_limit: Optional[int] = None,
training_limit: Optional[int] = None,
+ rescore_factor: Optional[float] = None,
) -> _SQConfigCreate: ...
@overload
@@ -472,6 +489,7 @@ def sq(
cache: Literal[None] = None,
rescore_limit: Optional[int] = None,
training_limit: Optional[int] = None,
+ rescore_factor: Optional[float] = None,
) -> _SQConfigCreate: ...
@staticmethod
@@ -479,6 +497,7 @@ def sq(
cache: Optional[bool] = None,
rescore_limit: Optional[int] = None,
training_limit: Optional[int] = None,
+ rescore_factor: Optional[float] = None,
) -> _SQConfigCreate:
"""Create a `_SQConfigCreate` object to be used when defining the scalar quantization (SQ) configuration of Weaviate.
@@ -489,6 +508,7 @@ def sq(
""" # noqa: D417 (missing argument descriptions in the docstring)
return _SQConfigCreate(
rescoreLimit=rescore_limit,
+ rescoreFactor=rescore_factor,
trainingLimit=training_limit,
)
@@ -499,6 +519,7 @@ def rq(
rescore_limit: Optional[int] = None,
centering: Optional[bool] = None,
training_limit: Optional[int] = None,
+ rescore_factor: Optional[float] = None,
) -> _RQConfigCreate:
"""Create a `_RQConfigCreate` object to be used when defining the Rotational quantization (RQ) configuration of Weaviate.
@@ -513,6 +534,7 @@ def rq(
rescoreLimit=rescore_limit,
centering=centering,
trainingLimit=training_limit,
+ rescoreFactor=rescore_factor,
)
@staticmethod
diff --git a/weaviate/collections/classes/grpc.py b/weaviate/collections/classes/grpc.py
index 5cba315f7..d3b701d2b 100644
--- a/weaviate/collections/classes/grpc.py
+++ b/weaviate/collections/classes/grpc.py
@@ -2,7 +2,6 @@
from datetime import datetime, timedelta, timezone
from enum import Enum, auto
from typing import (
- Any,
Dict,
Generic,
List,
@@ -24,7 +23,6 @@
from weaviate.proto.v1 import base_search_pb2
from weaviate.str_enum import BaseEnum
from weaviate.types import INCLUDE_VECTOR, NUMBER, UUID
-from weaviate.util import _ServerVersion
class HybridFusion(str, BaseEnum):
@@ -73,14 +71,6 @@ def _objects_list(self) -> Optional[List[str]]:
def _concepts_list(self) -> Optional[List[str]]:
return self.__concepts
- def _to_gql_payload(self) -> dict:
- payload: dict = {"force": self.force}
- if self.__objects is not None:
- payload["objects"] = [{"id": obj} for obj in self.__objects]
- if self.__concepts is not None:
- payload["concepts"] = self.__concepts
- return payload
-
class MetadataQuery(_WeaviateInput):
"""Define which metadata should be returned in the query's results."""
@@ -653,8 +643,7 @@ def mmr(limit: Optional[int] = None, balance: Optional[float] = None) -> MMR:
@dataclass
class BM25OperatorOptions:
- # replace with ClassVar[base_search_pb2.SearchOperatorOptions.Operator] once python 3.10 is removed
- operator: ClassVar[Any]
+ operator: ClassVar[base_search_pb2.SearchOperatorOptions.Operator]
@dataclass
@@ -833,7 +822,7 @@ class _MultiTargetVectorJoin:
target_vectors: List[str]
weights: Optional[Dict[str, Union[float, List[float]]]] = None
- def to_grpc_target_vector(self, version: _ServerVersion) -> base_search_pb2.Targets:
+ def to_grpc_target_vector(self) -> base_search_pb2.Targets:
combination = self.combination
if combination == _MultiTargetVectorJoinEnum.AVERAGE:
combination_grpc = base_search_pb2.COMBINATION_METHOD_TYPE_AVERAGE
diff --git a/weaviate/collections/classes/internal.py b/weaviate/collections/classes/internal.py
index 72847ff94..6fd63732b 100644
--- a/weaviate/collections/classes/internal.py
+++ b/weaviate/collections/classes/internal.py
@@ -1,8 +1,8 @@
import datetime
-import sys
import uuid as uuid_package
from dataclasses import dataclass, field
from typing import (
+ Annotated,
Any,
Dict,
Generic,
@@ -14,15 +14,13 @@
Type,
Union,
cast,
+ get_args,
+ get_origin,
+ get_type_hints,
)
from typing_extensions import TypeAlias, deprecated
-if sys.version_info < (3, 9):
- from typing_extensions import Annotated, get_args, get_origin, get_type_hints
-else:
- from typing import Annotated, get_args, get_origin, get_type_hints
-
from weaviate.collections.classes.generative import (
_GenerativeConfigRuntime,
_GenerativeConfigRuntimeOptions,
@@ -55,11 +53,10 @@
)
from weaviate.exceptions import (
WeaviateInvalidInputError,
- WeaviateUnsupportedFeatureError,
)
from weaviate.proto.v1 import generative_pb2, search_get_pb2
from weaviate.types import INCLUDE_VECTOR, UUID, UUIDS
-from weaviate.util import _ServerVersion, _to_beacons
+from weaviate.util import _to_beacons
@dataclass
@@ -334,97 +331,75 @@ def __init__(
self.grouped_properties = grouped_properties
self.generative_provider = generative_provider
- def to_grpc(self, server_version: _ServerVersion) -> generative_pb2.GenerativeSearch:
- if server_version.is_lower_than(1, 27, 14):
- if self.generative_provider is not None:
- raise WeaviateUnsupportedFeatureError("Dynamic RAG", str(server_version), "1.27.14")
-
- if isinstance(self.single, _SinglePrompt):
- single_prompt: Optional[str] = self.single.prompt
- else:
- single_prompt = self.single
-
- if isinstance(self.grouped, _GroupedTask):
- grouped_task: Optional[str] = self.grouped.prompt
- grouped_properties = self.grouped.non_blob_properties
- else:
- grouped_task = self.grouped
- grouped_properties = self.grouped_properties
-
- return generative_pb2.GenerativeSearch(
- single_response_prompt=single_prompt,
- grouped_response_task=grouped_task,
- grouped_properties=grouped_properties,
- )
- else:
- single: Optional[generative_pb2.GenerativeSearch.Single] = None
- if isinstance(self.single, _SinglePrompt):
- single = generative_pb2.GenerativeSearch.Single(
- prompt=self.single.prompt,
- queries=(
- [
- self.generative_provider._to_grpc(
- _GenerativeConfigRuntimeOptions(
- self.single.metadata,
- self.single.images,
- self.single.image_properties,
- )
+ def to_grpc(self) -> generative_pb2.GenerativeSearch:
+ single: Optional[generative_pb2.GenerativeSearch.Single] = None
+ if isinstance(self.single, _SinglePrompt):
+ single = generative_pb2.GenerativeSearch.Single(
+ prompt=self.single.prompt,
+ queries=(
+ [
+ self.generative_provider._to_grpc(
+ _GenerativeConfigRuntimeOptions(
+ self.single.metadata,
+ self.single.images,
+ self.single.image_properties,
)
- ]
- if self.generative_provider is not None
- else None
- ),
- debug=self.single.debug,
- )
- if isinstance(self.single, str):
- single = generative_pb2.GenerativeSearch.Single(
- prompt=self.single,
- queries=(
- [self.generative_provider._to_grpc(_GenerativeConfigRuntimeOptions())]
- if self.generative_provider is not None
- else None
- ),
- )
-
- grouped: Optional[generative_pb2.GenerativeSearch.Grouped] = None
- if isinstance(self.grouped, _GroupedTask):
- grouped = generative_pb2.GenerativeSearch.Grouped(
- task=self.grouped.prompt,
- properties=_to_text_array(self.grouped.non_blob_properties),
- queries=(
- [
- self.generative_provider._to_grpc(
- _GenerativeConfigRuntimeOptions(
- self.grouped.metadata,
- self.grouped.images,
- self.grouped.image_properties,
- )
+ )
+ ]
+ if self.generative_provider is not None
+ else None
+ ),
+ debug=self.single.debug,
+ )
+ if isinstance(self.single, str):
+ single = generative_pb2.GenerativeSearch.Single(
+ prompt=self.single,
+ queries=(
+ [self.generative_provider._to_grpc(_GenerativeConfigRuntimeOptions())]
+ if self.generative_provider is not None
+ else None
+ ),
+ )
+
+ grouped: Optional[generative_pb2.GenerativeSearch.Grouped] = None
+ if isinstance(self.grouped, _GroupedTask):
+ grouped = generative_pb2.GenerativeSearch.Grouped(
+ task=self.grouped.prompt,
+ properties=_to_text_array(self.grouped.non_blob_properties),
+ queries=(
+ [
+ self.generative_provider._to_grpc(
+ _GenerativeConfigRuntimeOptions(
+ self.grouped.metadata,
+ self.grouped.images,
+ self.grouped.image_properties,
)
- ]
- if self.generative_provider is not None
- else None
- ),
- )
- if isinstance(self.grouped, str):
- grouped = generative_pb2.GenerativeSearch.Grouped(
- task=self.grouped,
- properties=(
- _to_text_array(self.grouped_properties)
- if self.grouped_properties is not None
- else None
- ),
- queries=(
- [self.generative_provider._to_grpc(_GenerativeConfigRuntimeOptions())]
- if self.generative_provider is not None
- else None
- ),
- )
-
- return generative_pb2.GenerativeSearch(
- single=single,
- grouped=grouped,
+ )
+ ]
+ if self.generative_provider is not None
+ else None
+ ),
+ )
+ if isinstance(self.grouped, str):
+ grouped = generative_pb2.GenerativeSearch.Grouped(
+ task=self.grouped,
+ properties=(
+ _to_text_array(self.grouped_properties)
+ if self.grouped_properties is not None
+ else None
+ ),
+ queries=(
+ [self.generative_provider._to_grpc(_GenerativeConfigRuntimeOptions())]
+ if self.generative_provider is not None
+ else None
+ ),
)
+ return generative_pb2.GenerativeSearch(
+ single=single,
+ grouped=grouped,
+ )
+
class _GroupBy:
prop: str
diff --git a/weaviate/collections/collections/executor.py b/weaviate/collections/collections/executor.py
index da8b3ca17..6c07a7539 100644
--- a/weaviate/collections/collections/executor.py
+++ b/weaviate/collections/collections/executor.py
@@ -245,7 +245,7 @@ def create(
Raises:
weaviate.exceptions.WeaviateInvalidInputError: If the input parameters are invalid.
- weaviate.exceptions.WeaviateUnsupportedFeatureError: If the Weaviate version is lower than 1.24.0 and named vectorizers are provided.
+ weaviate.exceptions.WeaviateUnsupportedFeatureError: If the Weaviate version is lower than 1.37.0 and property text analyzers or stopword presets are provided.
weaviate.exceptions.WeaviateConnectionError: If the network connection to Weaviate fails.
weaviate.exceptions.UnexpectedStatusCodeError: If Weaviate reports a non-OK status.
"""
diff --git a/weaviate/collections/filters.py b/weaviate/collections/filters.py
index e35069802..242916b34 100644
--- a/weaviate/collections/filters.py
+++ b/weaviate/collections/filters.py
@@ -1,5 +1,5 @@
import uuid as uuid_lib
-from typing import Any, Dict, List, Literal, Optional, Sequence, cast, overload
+from typing import Any, List, Literal, Optional, Sequence, cast, overload
from weaviate.collections.classes.filters import (
FilterReturn,
@@ -201,89 +201,3 @@ def __and_or_not_filter(weav_filter: FilterReturn) -> Optional[base_pb2.Filters]
if (filter_ := _FilterToGRPC.convert(single_filter)) is not None
],
)
-
-
-class _FilterToREST:
- @staticmethod
- def convert(weav_filter: FilterReturn) -> Dict[str, Any]:
- if isinstance(weav_filter, _FilterValue):
- return _FilterToREST.__value_filter(weav_filter)
- else:
- return _FilterToREST.__and_or_not_filter(weav_filter)
-
- @staticmethod
- def __value_filter(weav_filter: _FilterValue) -> Dict[str, Any]:
- return {
- "operator": weav_filter.operator.value,
- "path": _FilterToREST.__to_path(weav_filter.target),
- **_FilterToREST.__parse_filter(weav_filter.value),
- }
-
- @staticmethod
- def __to_path(target: _FilterTargets) -> List[str]:
- if isinstance(target, str):
- return [target]
- elif isinstance(target, _SingleTargetRef):
- raise WeaviateInvalidInputError(
- "Cannot use Filter.by_ref() in the aggregate API currently. Instead use Filter.by_ref_multi_target() and specify the target collection explicitly."
- )
- else:
- assert isinstance(target, _MultiTargetRef)
- assert target.target is not None
- return [
- target.link_on,
- target.target_collection,
- *_FilterToREST.__to_path(target.target),
- ]
-
- @staticmethod
- def __parse_filter(value: FilterValues) -> Dict[str, Any]:
- if isinstance(value, str):
- return {"valueText": value}
- if isinstance(value, uuid_lib.UUID):
- return {"valueText": str(value)}
- if isinstance(value, TIME):
- return {"valueDate": _datetime_to_string(value)}
- if isinstance(value, bool):
- return {"valueBoolean": value}
- if isinstance(value, int):
- return {"valueInt": value}
- if isinstance(value, float):
- return {"valueNumber": value}
- values = _to_value_list(value)
- if values is not None:
- if len(values) == 0:
- raise WeaviateInvalidInputError(
- "Filtering on empty lists is not supported by Weaviate. "
- "To filter by property length, use "
- "Filter.by_property('prop', length=True).equal(0)"
- )
- if isinstance(values[0], str):
- return {"valueTextArray": values}
- if isinstance(values[0], uuid_lib.UUID):
- return {"valueTextArray": [str(val) for val in values]}
- if isinstance(values[0], TIME):
- return {"valueDateArray": [_datetime_to_string(cast(TIME, val)) for val in values]}
- if isinstance(values[0], bool):
- return {"valueBooleanArray": values}
- if isinstance(values[0], int):
- return {"valueIntArray": values}
- if isinstance(values[0], float):
- return {"valueNumberArray": values}
- raise ValueError(f"Unknown filter value type: {type(value)}")
-
- @staticmethod
- def __and_or_not_filter(weav_filter: FilterReturn) -> Dict[str, Any]:
- assert (
- isinstance(weav_filter, _FilterAnd)
- or isinstance(weav_filter, _FilterOr)
- or isinstance(weav_filter, _FilterNot)
- )
- return {
- "operator": weav_filter.operator.value,
- "operands": [
- filter_
- for single_filter in weav_filter.filters
- if (filter_ := _FilterToREST.convert(single_filter)) is not None
- ],
- }
diff --git a/weaviate/collections/grpc/query.py b/weaviate/collections/grpc/query.py
index 281da6e2d..a23933cbd 100644
--- a/weaviate/collections/grpc/query.py
+++ b/weaviate/collections/grpc/query.py
@@ -84,15 +84,11 @@ def __init__(
tenant: Optional[str],
consistency_level: Optional[ConsistencyLevel],
validate_arguments: bool,
- uses_125_api: bool,
- uses_127_api: bool,
):
super().__init__(weaviate_version, consistency_level, validate_arguments)
self._name: str = name
self._tenant = tenant
self._validate_arguments = validate_arguments
- self.__uses_125_api = uses_125_api
- self.__uses_127_api = uses_127_api
def __parse_near_options(
self,
@@ -501,8 +497,8 @@ def __create_request(
return search_get_pb2.SearchRequest(
uses_123_api=True,
- uses_125_api=self.__uses_125_api,
- uses_127_api=self.__uses_127_api,
+ uses_125_api=True,
+ uses_127_api=True,
collection=self._name,
limit=limit,
offset=offset,
@@ -515,9 +511,7 @@ def __create_request(
consistency_level=self._consistency_level,
tenant=self._tenant,
filters=_FilterToGRPC.convert(filters),
- generative=(
- generative.to_grpc(self._weaviate_version) if generative is not None else None
- ),
+ generative=(generative.to_grpc() if generative is not None else None),
group_by=group_by.to_grpc() if group_by is not None else None,
rerank=(
search_get_pb2.Rerank(property=rerank.prop, query=rerank.query)
diff --git a/weaviate/collections/grpc/shared.py b/weaviate/collections/grpc/shared.py
index dcfa31fb7..bac01b0a4 100644
--- a/weaviate/collections/grpc/shared.py
+++ b/weaviate/collections/grpc/shared.py
@@ -145,58 +145,7 @@ def __target_vector_to_grpc(
elif isinstance(target_vector, list):
return base_search_pb2.Targets(target_vectors=target_vector), None
else:
- return target_vector.to_grpc_target_vector(self._weaviate_version), None
-
- def _vector_per_target(
- self,
- vector: NearVectorInputType,
- targets: Optional[base_search_pb2.Targets],
- argument_name: str,
- ) -> Tuple[Optional[Dict[str, bytes]], Optional[bytes]]:
- """@deprecated in 1.27.0, included for BC until 1.27.0 is no longer supported.""" # noqa: D401
- invalid_nv_exception = WeaviateInvalidInputError(
- f"""{argument_name} argument can be:
- - a list of numbers
- - a dictionary with target names as keys and lists of numbers as values
- received: {vector}"""
- )
- if isinstance(vector, dict):
- if targets is None or len(targets.target_vectors) != len(vector):
- raise WeaviateInvalidInputError(
- "The number of target vectors must be equal to the number of vectors."
- )
- self.__check_vector_keys(vector, targets, argument_name)
-
- vector_per_target: Dict[str, bytes] = {}
- for key, value in vector.items():
- nv = _get_vector_v4(value)
-
- if (
- not isinstance(nv, list)
- or len(nv) == 0
- or not isinstance(nv[0], get_args(NUMBER))
- ):
- raise invalid_nv_exception
-
- vector_per_target[key] = struct.pack("{}f".format(len(nv)), *nv)
-
- return vector_per_target, None
- else:
- if isinstance(vector, _ListOfVectorsQuery) or len(vector) == 0:
- raise invalid_nv_exception
-
- if _is_1d_vector(vector):
- near_vector = _get_vector_v4(vector)
- if not isinstance(near_vector, list):
- raise invalid_nv_exception
- return None, struct.pack("{}f".format(len(near_vector)), *near_vector)
- else:
- raise WeaviateInvalidInputError(
- """This input appears to be a nested list of embeddings.
- If you are trying to search with a multi-vector embedding, check the shape of your input.
- If you are trying to provide multiple target vectors,
- provide a dictionary with target names as keys and embeddings as values."""
- )
+ return target_vector.to_grpc_target_vector(), None
def _vector_for_target(
self,
@@ -228,30 +177,21 @@ def add_1d_vector(val: OneDimensionalVectorType, key: str) -> None:
):
raise invalid_nv_exception
- if self._weaviate_version.is_lower_than(1, 29, 0):
- vector_for_target.append(
- base_search_pb2.VectorForTarget(name=key, vector_bytes=_Pack.single(vec))
- )
- else:
- vector_for_target.append(
- base_search_pb2.VectorForTarget(
- name=key,
- vectors=[
- base_pb2.Vectors(
- name=key,
- vector_bytes=_Pack.single(vec),
- type=base_pb2.Vectors.VECTOR_TYPE_SINGLE_FP32,
- )
- ],
- )
+ vector_for_target.append(
+ base_search_pb2.VectorForTarget(
+ name=key,
+ vectors=[
+ base_pb2.Vectors(
+ name=key,
+ vector_bytes=_Pack.single(vec),
+ type=base_pb2.Vectors.VECTOR_TYPE_SINGLE_FP32,
+ )
+ ],
)
+ )
target_vectors.append(key)
def add_2d_vector(value: TwoDimensionalVectorType, key: str) -> None:
- if self._weaviate_version.is_lower_than(1, 29, 0):
- for v in value:
- add_1d_vector(v, key)
- return
vector_for_target.append(
base_search_pb2.VectorForTarget(
name=key,
@@ -267,15 +207,7 @@ def add_2d_vector(value: TwoDimensionalVectorType, key: str) -> None:
target_vectors.append(key)
def add_list_of_vectors(value: _ListOfVectorsQuery, key: str) -> None:
- if _ListOfVectorsQuery.is_one_dimensional(
- value
- ) and self._weaviate_version.is_lower_than(1, 29, 0):
- for v in value.vectors:
- add_1d_vector(v, key)
- return
- elif _ListOfVectorsQuery.is_one_dimensional(
- value
- ) and self._weaviate_version.is_at_least(1, 29, 0):
+ if _ListOfVectorsQuery.is_one_dimensional(value):
vectors = [
base_pb2.Vectors(
name=key,
@@ -401,27 +333,17 @@ def _parse_near_vector(
if _is_1d_vector(near_vector) and len(near_vector) > 0:
# fast path for simple single-vector
- if self._weaviate_version.is_lower_than(1, 29, 0):
- near_vector_grpc: Optional[bytes] = struct.pack(
- "{}f".format(len(near_vector)), *near_vector
+ near_vector_grpc: Optional[bytes] = None
+ vector_for_targets = None
+ vectors = [
+ base_pb2.Vectors(
+ vector_bytes=_Pack.single(near_vector),
+ type=base_pb2.Vectors.VECTOR_TYPE_SINGLE_FP32,
)
- vector_per_target_tmp = None
- vector_for_targets = None
- vectors = None
- else:
- near_vector_grpc = None
- vector_per_target_tmp = None
- vector_for_targets = None
- vectors = [
- base_pb2.Vectors(
- vector_bytes=_Pack.single(near_vector),
- type=base_pb2.Vectors.VECTOR_TYPE_SINGLE_FP32,
- )
- ]
- elif _is_2d_vector(near_vector) and self._weaviate_version.is_at_least(1, 29, 0):
+ ]
+ elif _is_2d_vector(near_vector):
# fast path for simple multi-vector
near_vector_grpc = None
- vector_per_target_tmp = None
vector_for_targets = None
vectors = [
base_pb2.Vectors(
@@ -430,20 +352,13 @@ def _parse_near_vector(
)
]
else:
- if self._weaviate_version.is_lower_than(1, 27, 0):
- vector_per_target_tmp, near_vector_grpc = self._vector_per_target(
- near_vector, targets, "near_vector"
- )
- vector_for_targets = None
- else:
- vector_for_targets, near_vector_grpc, target_vectors_tmp = self._vector_for_target(
- near_vector, targets, "near_vector"
+ vector_for_targets, near_vector_grpc, target_vectors_tmp = self._vector_for_target(
+ near_vector, targets, "near_vector"
+ )
+ if target_vectors_tmp is not None:
+ targets, target_vectors = self._recompute_target_vector_to_grpc(
+ target_vector, target_vectors_tmp
)
- vector_per_target_tmp = None
- if target_vectors_tmp is not None:
- targets, target_vectors = self._recompute_target_vector_to_grpc(
- target_vector, target_vectors_tmp
- )
vectors = None
return base_search_pb2.NearVector(
vector_bytes=near_vector_grpc,
@@ -451,7 +366,6 @@ def _parse_near_vector(
distance=distance,
targets=targets,
target_vectors=target_vectors,
- vector_per_target=vector_per_target_tmp,
vector_for_targets=vector_for_targets,
vectors=vectors,
selection=self._diversity_selection_to_grpc(diversity_selection),
@@ -685,7 +599,7 @@ def _parse_hybrid(
elif isinstance(vector, list) and len(vector) > 0 and isinstance(vector[0], float):
# fast path for simple vector
vector_bytes = struct.pack("{}f".format(len(vector)), *vector)
- elif _is_2d_vector(vector) and self._weaviate_version.is_at_least(1, 29, 0):
+ elif _is_2d_vector(vector):
# fast path for simple multi-vector
vectors = [
base_pb2.Vectors(
@@ -702,62 +616,44 @@ def _parse_hybrid(
move_to=self.__parse_move(vector.move_to),
)
elif isinstance(vector, _HybridNearVector):
- if self._weaviate_version.is_lower_than(1, 27, 0):
- vector_per_target_tmp, vector_bytes_tmp = self._vector_per_target(
- vector.vector, targets, "vector"
+ (
+ vector_for_targets_tmp,
+ vector_bytes_tmp,
+ target_vectors_tmp,
+ ) = self._vector_for_target(vector.vector, targets, "vector")
+ if target_vectors_tmp is not None:
+ targets, target_vectors = self._recompute_target_vector_to_grpc(
+ target_vector, target_vectors_tmp
)
- vector_for_targets_tmp = None
- else:
- (
- vector_for_targets_tmp,
- vector_bytes_tmp,
- target_vectors_tmp,
- ) = self._vector_for_target(vector.vector, targets, "vector")
- vector_per_target_tmp = None
- if target_vectors_tmp is not None:
- targets, target_vectors = self._recompute_target_vector_to_grpc(
- target_vector, target_vectors_tmp
- )
near_vector = base_search_pb2.NearVector(
vector_bytes=vector_bytes_tmp,
certainty=vector.certainty,
distance=vector.distance,
- vector_per_target=vector_per_target_tmp,
vector_for_targets=vector_for_targets_tmp,
)
else:
- if self._weaviate_version.is_lower_than(1, 27, 0):
- vector_per_target_tmp, vector_bytes_tmp = self._vector_per_target(
- vector, targets, "vector"
+ (
+ vector_for_targets_tmp,
+ vector_bytes_tmp,
+ target_vectors_tmp,
+ ) = self._vector_for_target(vector, targets, "vector")
+ if target_vectors_tmp is not None:
+ targets, target_vectors = self._recompute_target_vector_to_grpc(
+ target_vector, target_vectors_tmp
)
- vector_for_targets_tmp = None
else:
- (
- vector_for_targets_tmp,
- vector_bytes_tmp,
- target_vectors_tmp,
- ) = self._vector_for_target(vector, targets, "vector")
- vector_per_target_tmp = None
- if target_vectors_tmp is not None:
- targets, target_vectors = self._recompute_target_vector_to_grpc(
- target_vector, target_vectors_tmp
- )
- else:
- targets, target_vectors = self.__target_vector_to_grpc(target_vector)
+ targets, target_vectors = self.__target_vector_to_grpc(target_vector)
- if vector_per_target_tmp is not None or vector_for_targets_tmp is not None:
+ if vector_for_targets_tmp is not None:
near_vector = base_search_pb2.NearVector(
vector_bytes=vector_bytes_tmp,
- vector_per_target=vector_per_target_tmp,
vector_for_targets=vector_for_targets_tmp,
)
else:
vector_bytes = vector_bytes_tmp
- use_alpha_param = self._weaviate_version.is_at_least(
- 1, 36, 6
- ) # TODO: change to 1.36.7 once it's released
+ use_alpha_param = self._weaviate_version.is_at_least(1, 36, 7)
return (
base_search_pb2.Hybrid(
properties=properties,
diff --git a/weaviate/collections/queries/base_executor.py b/weaviate/collections/queries/base_executor.py
index 1851d0dc1..7e175105f 100644
--- a/weaviate/collections/queries/base_executor.py
+++ b/weaviate/collections/queries/base_executor.py
@@ -86,16 +86,12 @@ def __init__(
self._references = references
self._validate_arguments = validate_arguments
- self.__uses_125_api = connection._weaviate_version.is_at_least(1, 25, 0)
- self.__uses_127_api = connection._weaviate_version.is_at_least(1, 27, 0)
self._query = _QueryGRPC(
connection._weaviate_version,
self._name,
self.__tenant,
self.__consistency_level,
validate_arguments=self._validate_arguments,
- uses_125_api=self.__uses_125_api,
- uses_127_api=self.__uses_127_api,
)
def __retrieve_timestamp(
@@ -172,12 +168,6 @@ def __extract_vector_for_object(
vecs[vec.name] = _Unpack.single(vec.vector_bytes)
return vecs
- def __extract_generated_from_metadata(
- self,
- add_props: search_get_pb2.MetadataResult,
- ) -> Optional[str]:
- return add_props.generative if add_props.generative_present else None
-
def __extract_generated_from_generative(
self, generative: generative_pb2.GenerativeResult
) -> Optional[str]:
@@ -389,11 +379,7 @@ def __result_to_generative_object(
),
uuid=self.__extract_id_for_object(meta),
vector=(self.__extract_vector_for_object(meta) if options.include_vector else {}),
- generated=(
- self.__extract_generated_from_generative(gen)
- if self.__uses_127_api
- else self.__extract_generated_from_metadata(meta)
- ),
+ generated=self.__extract_generated_from_generative(gen),
generative=self.__extract_generative_single_from_generative(gen),
)
diff --git a/weaviate/collections/queries/bm25/generate/executor.py b/weaviate/collections/queries/bm25/generate/executor.py
index 77bfbf045..94b4267d5 100644
--- a/weaviate/collections/queries/bm25/generate/executor.py
+++ b/weaviate/collections/queries/bm25/generate/executor.py
@@ -415,7 +415,6 @@ def bm25(
Raises:
weaviate.exceptions.WeaviateQueryError: If the network connection to Weaviate fails.
- weaviate.exceptions.WeaviateUnsupportedFeatureError: If a group by is provided and the Weaviate server version is lower than 1.25.0.
"""
def resp(
diff --git a/weaviate/collections/queries/bm25/query/executor.py b/weaviate/collections/queries/bm25/query/executor.py
index 9cb3ec773..57437f639 100644
--- a/weaviate/collections/queries/bm25/query/executor.py
+++ b/weaviate/collections/queries/bm25/query/executor.py
@@ -347,7 +347,6 @@ def bm25(
Raises:
weaviate.exceptions.WeaviateQueryError: If the network connection to Weaviate fails.
- weaviate.exceptions.WeaviateNotImplementedError: If a group by is provided and the Weaviate server version is lower than 1.25.0.
"""
def resp(
diff --git a/weaviate/collections/queries/hybrid/generate/executor.py b/weaviate/collections/queries/hybrid/generate/executor.py
index 62a44b3ec..57c28aa83 100644
--- a/weaviate/collections/queries/hybrid/generate/executor.py
+++ b/weaviate/collections/queries/hybrid/generate/executor.py
@@ -511,7 +511,6 @@ def hybrid(
Raises:
weaviate.exceptions.WeaviateQueryError: If the network connection to Weaviate fails.
- weaviate.exceptions.WeaviateNotImplementedError: If a group by is provided and the Weaviate server version is lower than 1.25.0.
"""
def resp(
diff --git a/weaviate/collections/queries/hybrid/query/executor.py b/weaviate/collections/queries/hybrid/query/executor.py
index f3bd7af62..d386396d1 100644
--- a/weaviate/collections/queries/hybrid/query/executor.py
+++ b/weaviate/collections/queries/hybrid/query/executor.py
@@ -445,7 +445,6 @@ def hybrid(
Raises:
weaviate.exceptions.WeaviateQueryError: If the network connection to Weaviate fails.
- weaviate.exceptions.WeaviateNotImplementedError: If a group by is provided and the Weaviate server version is lower than 1.25.0.
"""
def resp(
diff --git a/weaviate/collections/tenants/executor.py b/weaviate/collections/tenants/executor.py
index 7feb2124b..7b4e764ee 100644
--- a/weaviate/collections/tenants/executor.py
+++ b/weaviate/collections/tenants/executor.py
@@ -1,6 +1,6 @@
import asyncio
from math import ceil
-from typing import Any, Dict, Generic, List, Optional, Sequence, Union
+from typing import Dict, Generic, List, Optional, Sequence, Union
from httpx import Response
@@ -148,28 +148,6 @@ def resp(res: Response) -> None:
),
)
- def __get_with_rest(
- self,
- ) -> executor.Result[Dict[str, TenantOutputType]]:
- path = "/schema/" + self._name + "/tenants"
-
- def resp(res: Response) -> Dict[str, TenantOutputType]:
- tenant_resp: List[Dict[str, Any]] = res.json()
- for tenant in tenant_resp:
- tenant["activityStatusInternal"] = tenant["activityStatus"]
- del tenant["activityStatus"]
- return {tenant["name"]: TenantOutput(**tenant) for tenant in tenant_resp}
-
- return executor.execute(
- response_callback=resp,
- method=self._connection.get,
- path=path,
- error_msg=f"Could not get collection tenants for {self._name}",
- status_codes=_ExpectedStatusCodes(
- ok_in=200, error=f"Get collection tenants for {self._name}"
- ),
- )
-
def __get_with_grpc(
self, *, tenants: Optional[Sequence[TenantInputType]] = None
) -> executor.Result[Dict[str, TenantOutputType]]:
@@ -269,18 +247,7 @@ def get(self) -> executor.Result[Dict[str, TenantOutputType]]:
weaviate.exceptions.WeaviateConnectionError: If the network connection to Weaviate fails.
weaviate.exceptions.UnexpectedStatusCodeError: If Weaviate reports a non-OK status.
"""
-
- def resp(res: Dict[str, TenantOutputType]) -> Dict[str, TenantOutputType]:
- return res
-
- return executor.execute(
- response_callback=resp,
- method=(
- self.__get_with_grpc
- if self._connection._weaviate_version.supports_tenants_get_grpc
- else self.__get_with_rest
- ),
- )
+ return self.__get_with_grpc()
def get_by_names(
self, tenants: Sequence[TenantInputType]
@@ -298,7 +265,6 @@ def get_by_names(
weaviate.exceptions.WeaviateConnectionError: If the network connection to Weaviate fails.
weaviate.exceptions.UnexpectedStatusCodeError: If Weaviate reports a non-OK status.
"""
- self._connection._weaviate_version.check_is_at_least_1_25_0("The 'get_by_names' method")
if self._validate_arguments:
_validate_input(
_ValidateArgument(
@@ -323,27 +289,14 @@ def get_by_name(self, tenant: TenantInputType) -> executor.Result[Optional[Tenan
weaviate.exceptions.WeaviateConnectionError: If the network connection to Weaviate fails.
weaviate.exceptions.UnexpectedStatusCodeError: If Weaviate reports a non-OK status.
"""
- self._connection._weaviate_version.check_is_at_least_1_25_0("The 'get_by_name' method")
if self._validate_arguments:
_validate_input(
_ValidateArgument(expected=[Union[str, Tenant]], name="tenant", value=tenant)
)
tenant_name = tenant.name if isinstance(tenant, Tenant) else tenant
- if self._connection._weaviate_version.is_lower_than(1, 28, 0):
- # For Weaviate versions < 1.28.0, we need to use the gRPC API
- # such versions don't have RBAC so the filtering issue doesn't exist therein
- def resp_grpc(res: Dict[str, TenantOutputType]) -> Optional[TenantOutputType]:
- return res.get(tenant_name)
-
- return executor.execute(
- response_callback=resp_grpc,
- method=self.__get_with_grpc,
- tenants=[tenant_name],
- )
- # For Weaviate versions >= 1.28.0, we need to use the REST API
- # as the gRPC API filters out tenants that are not accessible to the user
- # due to RBAC requirements
+ # Use REST rather than gRPC, as the gRPC API filters out tenants that the user
+ # cannot access due to RBAC
def resp_rest(res: Response) -> Optional[TenantOutputType]:
if res.status_code == 404:
return None
@@ -446,7 +399,6 @@ def exists(self, tenant: TenantInputType) -> executor.Result[bool]:
weaviate.exceptions.WeaviateConnectionError: If the network connection to Weaviate fails.
weaviate.exceptions.UnexpectedStatusCodeError: If Weaviate reports a non-OK status.
"""
- self._connection._weaviate_version.check_is_at_least_1_25_0("The 'exists' method")
if self._validate_arguments:
_validate_input(
_ValidateArgument(
diff --git a/weaviate/connect/v4.py b/weaviate/connect/v4.py
index 2aceb3d3e..cf7bcb62f 100644
--- a/weaviate/connect/v4.py
+++ b/weaviate/connect/v4.py
@@ -988,10 +988,10 @@ def connect(self, force: bool = False) -> None:
raise WeaviateStartUpError(f"{e.message} {hint}") from e
# do it after all other init checks so as not to break all the tests
- if self._weaviate_version.is_lower_than(1, 27, patch=0):
+ if self._weaviate_version.is_lower_than(1, 32, 0):
self._connected = False
raise WeaviateStartUpError(
- f"Weaviate version {self._weaviate_version} is not supported. Please use Weaviate version 1.27.0 or higher."
+ f"Weaviate version {self._weaviate_version} is not supported. Please use Weaviate version 1.32.0 or higher."
)
if not self._skip_init_checks:
@@ -1195,10 +1195,10 @@ async def connect(self, force: bool = False) -> None:
raise WeaviateStartUpError(f"{e.message} {hint}") from e
# do it after all other init checks so as not to break all the tests
- if self._weaviate_version.is_lower_than(1, 27, 0):
+ if self._weaviate_version.is_lower_than(1, 32, 0):
self._connected = False
raise WeaviateStartUpError(
- f"Weaviate version {self._weaviate_version} is not supported. Please use Weaviate version 1.27.0 or higher."
+ f"Weaviate version {self._weaviate_version} is not supported. Please use Weaviate version 1.32.0 or higher."
)
if not self._skip_init_checks:
diff --git a/weaviate/error_msgs.py b/weaviate/error_msgs.py
deleted file mode 100644
index 192e190e1..000000000
--- a/weaviate/error_msgs.py
+++ /dev/null
@@ -1,88 +0,0 @@
-"""Error and Warning messages that are reused throughout the code."""
-
-FILTER_BEACON_V14_CLS_NS_W = (
- "Based on the number of '/' in the beacon it seems that the beacon is not "
- "class namespaced. Weaviate version >= 1.14.0 STRONGLY recommends using class "
- "namespaced beacons. Non-class namespaced beacons will be removed in future "
- "versions. Class namespaced beacons look like this: "
- "'weaviate://localhost/{CLASS_NAME}/{UUID}'"
-)
-
-
-BATCH_MANUAL_USE_W = (
- "Manually batching means this code is NOT using the client's built-in "
- "multi-threading. To enable built-in multi-threading, set `batch_size` in "
- " `client.batch.configure()` to an integer value . See also:"
- "https://weaviate.io/developers/weaviate/current/restful-api-references/"
-)
-
-
-BATCH_REF_DEPRECATION_NEW_V14_CLS_NS_W = (
- "Weaviate Server version >= 1.14.x STRONGLY recommends using class namespaced "
- "beacons. To use class namespaced beacons, specify the `to_object_class_name` "
- "argument. Non-class namespaced beacons (None value for `to_object_class_name`) "
- "will be removed in future versions of the Weaviate Server and Weaviate "
- "Python Client."
-)
-
-
-BATCH_REF_DEPRECATION_OLD_V14_CLS_NS_W = (
- "Weaviate Server version < 1.14.x does not support class namespaced APIs. The "
- "non-class namespaced APIs calls are going to be made instead (None value for "
- "`class_name`). The non-class namespaced APIs are going to be removed in "
- "future versions of the Weaviate Server and Weaviate Python Client. "
- "Please upgrade your Weaviate Server version."
-)
-
-
-DATA_DEPRECATION_NEW_V14_CLS_NS_W = (
- "Weaviate Server version >= 1.14.x STRONGLY recommends using class namespaced "
- "APIs. To use class namespaced APIs, specify the `class_name` argument. "
- "Non-class namespaced APIs (None value for `to_object_class_name`) will be "
- "removed in future versions of the Weaviate Server and Weaviate Python Client."
-)
-
-
-DATA_DEPRECATION_OLD_V14_CLS_NS_W = (
- "Weaviate Server version < 1.14.x does not support class namespaced APIs. "
- "Non-class namespaced APIs calls will be made instead (None value for "
- "`class_name`). Non-class namespaced APIs will be removed in future versions "
- "of the Weaviate Server and Weaviate Python Client. Please upgrade your "
- "Weaviate Server version."
-)
-
-
-REF_DEPRECATION_NEW_V14_CLS_NS_W = ( # del
- "Weaviate Server version >= 1.14.x STRONGLY recommends using class namespaced "
- "APIs and beacons. To use class namespaced APIs and beacons, specify, the "
- "`from_class_name` AND `to_class_name` arguments. Non-class namespaced APIs "
- "and beacons (None value for `from_class_name` AND `to_class_name`) will be "
- "removed in future versions of the Weaviate Server and Weaviate Python Client."
-)
-
-
-REF_DEPRECATION_OLD_V14_FROM_CLS_NS_W = (
- "Weaviate Server version < 1.14.x does not support class namespaced APIs. "
- "Non-class namespaced APIs calls will to be made instead (None value for "
- "`from_class_name`). Non-class namespaced APIs and beacons will be removed "
- "in future versions of the Weaviate Server and Weaviate Python Client. Please "
- "upgrade your Weaviate Server version."
-)
-
-
-REF_DEPRECATION_OLD_V14_TO_CLS_NS_W = (
- "Weaviate Server version < 1.14.x does not support class namespaced beacons. "
- "Non-class namespaced beacons will be constructed instead (None value for "
- "`to_class_name`). Non-class namespaced APIs and beacons will be removed in "
- "future versions of the Weaviate Server and Weaviate Python Client. Please "
- "upgrade your Weaviate Server version."
-)
-
-
-BATCH_EXECUTOR_SHUTDOWN_W = (
- "The BatchExecutor was shutdown, most probably when it exited the `with` statement. "
- "The BatchExecutor will be reinitialized. If you are not `batch` in "
- "`with client.batch as batch`, be sure to shut the BatchExecutor down when "
- "your data import finishes: `client.batch.shutdown()`. To restart the "
- "BatchExecutor, use `client.batch.start()`."
-)
diff --git a/weaviate/gql/__init__.py b/weaviate/gql/__init__.py
deleted file mode 100644
index a3cc2f1c2..000000000
--- a/weaviate/gql/__init__.py
+++ /dev/null
@@ -1 +0,0 @@
-"""GraphQL module used to create `get` and/or `aggregate` GraphQL requests from Weaviate."""
diff --git a/weaviate/gql/aggregate.py b/weaviate/gql/aggregate.py
deleted file mode 100644
index ccaf55bb0..000000000
--- a/weaviate/gql/aggregate.py
+++ /dev/null
@@ -1,461 +0,0 @@
-"""GraphQL `Aggregate` command."""
-
-import json
-from dataclasses import dataclass
-from typing import List, Optional
-
-from weaviate.util import _capitalize_first_letter, _sanitize_str, file_encoder_b64
-
-from .filter import (
- Filter,
- GraphQL,
- MediaType,
- NearAudio,
- NearDepth,
- NearImage,
- NearIMU,
- NearObject,
- NearText,
- NearThermal,
- NearVector,
- NearVideo,
- Where,
-)
-
-
-@dataclass
-class Hybrid:
- query: Optional[str]
- alpha: Optional[float]
- vector: Optional[List[float]]
- properties: Optional[List[str]]
- target_vectors: Optional[List[str]]
- max_vector_distance: Optional[List[str]]
-
- def __init__(self, content: dict) -> None:
- self.query = content.get("query")
- self.alpha = content.get("alpha")
- self.vector = content.get("vector")
- self.properties = content.get("properties")
- self.target_vectors = content.get("targetVectors")
- self.max_vector_distance = content.get("maxVectorDistance")
-
- def __str__(self) -> str:
- ret = ""
- if self.query is not None:
- ret += f"query: {_sanitize_str(self.query)}"
- if self.vector is not None:
- ret += f", vector: {self.vector}"
- if self.alpha is not None:
- ret += f", alpha: {self.alpha}"
- if self.properties is not None and len(self.properties) > 0:
- props = '","'.join(self.properties)
- ret += f', properties: ["{props}"]'
- if self.target_vectors is not None:
- target_vectors = '","'.join(self.target_vectors)
- ret += f', targetVectors: ["{target_vectors}"]'
- if self.max_vector_distance is not None:
- ret += f", maxVectorDistance:{self.max_vector_distance}"
- return "hybrid:{" + ret + "}"
-
-
-class AggregateBuilder(GraphQL):
- """AggregateBuilder class used to aggregate Weaviate objects."""
-
- def __init__(self, class_name: str):
- """Initialize a AggregateBuilder class instance.
-
- Args:
- class_name: Class name of the objects to be aggregated.
- """
- self._class_name: str = _capitalize_first_letter(class_name)
- self._object_limit: Optional[int] = None
- self._with_meta_count: bool = False
- self._fields: List[str] = []
- self._where: Optional[Where] = None
- self._group_by_properties: Optional[List[str]] = None
- self._uses_filter: bool = False
- self._near: Optional[Filter] = None
- self._tenant: Optional[str] = None
- self._limit: Optional[int] = None
- self._hybrid: Optional[Hybrid] = None
-
- def with_tenant(self, tenant: str) -> "AggregateBuilder":
- """Sets a tenant for the query."""
- if not isinstance(tenant, str):
- raise TypeError("tenant must be of type str")
-
- self._tenant = tenant
- self._uses_filter = True
- return self
-
- def with_meta_count(self) -> "AggregateBuilder":
- """Set Meta Count to True.
-
- Returns:
- Updated AggregateBuilder.
- """
- self._with_meta_count = True
- return self
-
- def with_object_limit(self, limit: int) -> "AggregateBuilder":
- """Set objectLimit to limit vector search results used within the aggregation query only when with near filter.
-
- Args:
- limit: The object limit.
-
- Returns:
- Updated AggregateBuilder.
- """
- self._object_limit = limit
- return self
-
- def with_limit(self, limit: int) -> "AggregateBuilder":
- """Set limit to limit the number of returned results from the aggregation query.
-
- Args:
- limit: The limit.
-
- Returns:
- Updated AggregateBuilder.
- """
- self._limit = limit
- return self
-
- def with_fields(self, field: str) -> "AggregateBuilder":
- """Include a field in the aggregate query.
-
- Args:
- field: Field to include in the aggregate query. e.g. ' { count }'
-
- Returns:
- Updated AggregateBuilder.
- """
- self._fields.append(field)
- return self
-
- def with_where(self, content: dict) -> "AggregateBuilder":
- """Set 'where' filter.
-
- Args:
- content: The where filter to include in the aggregate query. See examples below.
-
- Returns:
- Updated AggregateBuilder.
- """
- self._where = Where(content)
- self._uses_filter = True
- return self
-
- def with_hybrid(self, content: dict) -> "AggregateBuilder":
- """Get objects using bm25 and vector, then combine the results using a reciprocal ranking algorithm.
-
- Args:
- content: The content of the `hybrid` filter to set.
-
- Returns:
- Updated AggregateBuilder.
- """
- if self._near is not None:
- raise AttributeError("Cannot use 'hybrid' and 'near' filters simultaneously.")
- self._hybrid = Hybrid(content)
- self._uses_filter = True
- return self
-
- def with_group_by_filter(self, properties: List[str]) -> "AggregateBuilder":
- """Add a group by filter to the query. Might requires the user to set an additional group by clause using `with_fields(..)`.
-
- Args:
- properties: The list of properties that are included in the group by filter.
- Generates a filter like: 'groupBy: ["property1", "property2"]'
- from a list ["property1", "property2"]
-
- Returns:
- Updated AggregateBuilder.
- """
- self._group_by_properties = properties
- self._uses_filter = True
- return self
-
- def with_near_text(self, content: dict) -> "AggregateBuilder":
- """Set `nearText` filter.
-
- This filter can be used with text modules (text2vec).
- E.g.: text2vec-contextionary, text2vec-transformers.
- NOTE: The 'autocorrect' field is enabled only with the `text-spellcheck` Weaviate module.
-
- Args:
- content: The content of the `nearText` filter to set. See examples below.
-
- Returns:
- Updated AggregateBuilder.
-
- Raises:
- AttributeError: If another 'near' filter was already set.
- """
- if self._near is not None:
- raise AttributeError("Cannot use multiple 'near' filters.")
- if self._hybrid is not None:
- raise AttributeError("Cannot use 'near' and 'hybrid' filters simultaneously.")
- self._near = NearText(content)
- self._uses_filter = True
- return self
-
- def with_near_vector(self, content: dict) -> "AggregateBuilder":
- """Set `nearVector` filter.
-
- Args:
- content: The content of the `nearVector` filter to set. See examples below.
-
- Returns:
- Updated AggregateBuilder.
-
- Raises:
- AttributeError: If another 'near' filter was already set.
- """
- if self._near is not None:
- raise AttributeError("Cannot use multiple 'near' filters.")
- if self._hybrid is not None:
- raise AttributeError("Cannot use 'near' and 'hybrid' filters simultaneously.")
- self._near = NearVector(content)
- self._uses_filter = True
- return self
-
- def with_near_object(self, content: dict) -> "AggregateBuilder":
- """Set `nearObject` filter.
-
- Args:
- content: The content of the `nearObject` filter to set. See examples below.
-
- Returns:
- Updated AggregateBuilder.
-
- Raises:
- AttributeError: If another 'near' filter was already set.
- """
- if self._near is not None:
- raise AttributeError("Cannot use multiple 'near' filters.")
- if self._hybrid is not None:
- raise AttributeError("Cannot use 'near' and 'hybrid' filters simultaneously.")
- self._near = NearObject(content, True)
- self._uses_filter = True
- return self
-
- def with_near_image(self, content: dict, encode: bool = True) -> "AggregateBuilder":
- """Set `nearImage` filter.
-
- Args:
- content: The content of the `nearImage` filter to set. See examples below.
- encode: Whether to encode the `content["image"]` to base64 and convert to string. If True, the
- `content["image"]` can be an image path or a file opened in binary read mode. If False,
- the `content["image"]` MUST be a base64 encoded string (NOT bytes, i.e. NOT binary
- string that looks like this: b'BASE64ENCODED' but simple 'BASE64ENCODED').
- By default True.
-
- Returns:
- Updated AggregateBuilder.
-
- Raises:
- AttributeError: If another 'near' filter was already set.
- """
- self._media_type = MediaType.IMAGE
- if self._near is not None:
- raise AttributeError(
- "Cannot use multiple 'near' filters, or a 'near' filter along with a 'ask' filter!"
- )
- if self._hybrid is not None:
- raise AttributeError("Cannot use 'near' and 'hybrid' filters simultaneously.")
- if encode:
- content["image"] = file_encoder_b64(content["image"])
- self._near = NearImage(content)
- self._uses_filter = True
- return self
-
- def with_near_audio(self, content: dict, encode: bool = True) -> "AggregateBuilder":
- """Set `nearAudio` filter.
-
- Args:
- content: The content of the `nearAudio` filter to set. See examples below.
- encode: Whether to encode the `content["audio"]` to base64 and convert to string. If True, the
- `content["audio"]` can be an audio path or a file opened in binary read mode. If False,
- the `content["audio"]` MUST be a base64 encoded string (NOT bytes, i.e. NOT binary
- string that looks like this: b'BASE64ENCODED' but simple 'BASE64ENCODED').
- By default True.
-
- Returns:
- Updated AggregateBuilder.
-
- Raises:
- AttributeError: If another 'near' filter was already set.
- """
- self._media_type = MediaType.AUDIO
- if self._near is not None:
- raise AttributeError(
- "Cannot use multiple 'near' filters, or a 'near' filter along with a 'ask' filter!"
- )
- if self._hybrid is not None:
- raise AttributeError("Cannot use 'near' and 'hybrid' filters simultaneously.")
- if encode:
- content[self._media_type.value] = file_encoder_b64(content[self._media_type.value])
- self._near = NearAudio(content)
- self._uses_filter = True
- return self
-
- def with_near_video(self, content: dict, encode: bool = True) -> "AggregateBuilder":
- """Set `nearVideo` filter.
-
- Args:
- content: The content of the `nearVideo` filter to set. See examples below.
- encode: Whether to encode the `content["video"]` to base64 and convert to string. If True, the
- `content["video"]` can be an video path or a file opened in binary read mode. If False,
- the `content["video"]` MUST be a base64 encoded string (NOT bytes, i.e. NOT binary
- string that looks like this: b'BASE64ENCODED' but simple 'BASE64ENCODED').
- By default True.
-
- Returns:
- Updated AggregateBuilder.
-
- Raises:
- AttributeError: If another 'near' filter was already set.
- """
- self._media_type = MediaType.VIDEO
- if self._near is not None:
- raise AttributeError(
- "Cannot use multiple 'near' filters, or a 'near' filter along with a 'ask' filter!"
- )
- if self._hybrid is not None:
- raise AttributeError("Cannot use 'near' and 'hybrid' filters simultaneously.")
- if encode:
- content[self._media_type.value] = file_encoder_b64(content[self._media_type.value])
- self._near = NearVideo(content)
- self._uses_filter = True
- return self
-
- def with_near_depth(self, content: dict, encode: bool = True) -> "AggregateBuilder":
- """Set `nearDepth` filter.
-
- Args:
- content: The content of the `nearDepth` filter to set. See examples below.
- encode: Whether to encode the `content["depth"]` to base64 and convert to string. If True, the
- `content["depth"]` can be an depth path or a file opened in binary read mode. If False,
- the `content["depth"]` MUST be a base64 encoded string (NOT bytes, i.e. NOT binary
- string that looks like this: b'BASE64ENCODED' but simple 'BASE64ENCODED').
- By default True.
-
- Returns:
- Updated AggregateBuilder.
-
- Raises:
- AttributeError: If another 'near' filter was already set.
- """
- self._media_type = MediaType.DEPTH
- if self._near is not None:
- raise AttributeError(
- "Cannot use multiple 'near' filters, or a 'near' filter along with a 'ask' filter!"
- )
- if self._hybrid is not None:
- raise AttributeError("Cannot use 'near' and 'hybrid' filters simultaneously.")
- if encode:
- content[self._media_type.value] = file_encoder_b64(content[self._media_type.value])
- self._near = NearDepth(content)
- self._uses_filter = True
- return self
-
- def with_near_thermal(self, content: dict, encode: bool = True) -> "AggregateBuilder":
- """Set `nearThermal` filter.
-
- Args:
- content: The content of the `nearThermal` filter to set. See examples below.
- encode: Whether to encode the `content["thermal"]` to base64 and convert to string. If True, the
- `content["thermal"]` can be an thermal path or a file opened in binary read mode. If False,
- the `content["thermal"]` MUST be a base64 encoded string (NOT bytes, i.e. NOT binary
- string that looks like this: b'BASE64ENCODED' but simple 'BASE64ENCODED').
- By default True.
-
- Returns:
- Updated AggregateBuilder.
-
- Raises:
- AttributeError: If another 'near' filter was already set.
- """
- self._media_type = MediaType.THERMAL
- if self._near is not None:
- raise AttributeError(
- "Cannot use multiple 'near' filters, or a 'near' filter along with a 'ask' filter!"
- )
- if self._hybrid is not None:
- raise AttributeError("Cannot use 'near' and 'hybrid' filters simultaneously.")
- if encode:
- content[self._media_type.value] = file_encoder_b64(content[self._media_type.value])
- self._near = NearThermal(content)
- self._uses_filter = True
- return self
-
- def with_near_imu(self, content: dict, encode: bool = True) -> "AggregateBuilder":
- """Set `nearIMU` filter.
-
- Args:
- content: The content of the `nearIMU` filter to set. See examples below.
- encode: Whether to encode the `content["thermal"]` to base64 and convert to string. If True, the
- `content["thermal"]` can be an thermal path or a file opened in binary read mode. If False,
- the `content["thermal"]` MUST be a base64 encoded string (NOT bytes, i.e. NOT binary
- string that looks like this: b'BASE64ENCODED' but simple 'BASE64ENCODED').
- By default True.
-
- Returns:
- Updated AggregateBuilder.
-
- Raises:
- AttributeError: If another 'near' filter was already set.
- """
- self._media_type = MediaType.IMU
- if self._near is not None:
- raise AttributeError(
- "Cannot use multiple 'near' filters, or a 'near' filter along with a 'ask' filter!"
- )
- if self._hybrid is not None:
- raise AttributeError("Cannot use 'near' and 'hybrid' filters simultaneously.")
- if encode:
- content[self._media_type.value] = file_encoder_b64(content[self._media_type.value])
- self._near = NearIMU(content)
- self._uses_filter = True
- return self
-
- def build(self) -> str:
- """Build the query and return the string.
-
- Returns:
- The GraphQL query as a string.
- """
- # Path
- query = f"{{Aggregate{{{self._class_name}"
-
- # Filter
- if self._uses_filter:
- query += "("
- if self._where is not None:
- query += str(self._where)
- if self._group_by_properties is not None:
- query += f"groupBy: {json.dumps(self._group_by_properties)}"
- if self._near is not None:
- query += str(self._near)
- if self._object_limit:
- query += f"objectLimit: {self._object_limit}"
- if self._tenant is not None:
- query += f'tenant: "{self._tenant}"'
- if self._limit is not None:
- query += f"limit: {self._limit}"
- if self._hybrid is not None:
- query += str(self._hybrid)
- query += ")"
-
- # Body
- query += "{"
- if self._with_meta_count:
- query += "meta{count}"
- for field in self._fields:
- query += field
-
- # close
- query += "}}}"
- return query
diff --git a/weaviate/gql/filter.py b/weaviate/gql/filter.py
deleted file mode 100644
index 99435edfd..000000000
--- a/weaviate/gql/filter.py
+++ /dev/null
@@ -1,961 +0,0 @@
-"""GraphQL filters for `Get` and `Aggregate` commands. GraphQL abstract class for GraphQL commands to inherit from."""
-
-import warnings
-from abc import ABC, abstractmethod
-from copy import deepcopy
-from enum import Enum
-from json import dumps
-from typing import Any, Tuple, Union
-
-from weaviate.error_msgs import FILTER_BEACON_V14_CLS_NS_W
-from weaviate.util import _sanitize_str, get_vector
-
-VALUE_LIST_TYPES = {
- "valueStringList",
- "valueTextList",
- "valueIntList",
- "valueNumberList",
- "valueBooleanList",
- "valueDateList",
-}
-
-VALUE_ARRAY_TYPES = {
- "valueStringArray",
- "valueTextArray",
- "valueIntArray",
- "valueNumberArray",
- "valueBooleanArray",
- "valueDateArray",
-}
-
-VALUE_PRIMITIVE_TYPES = {
- "valueString",
- "valueText",
- "valueInt",
- "valueNumber",
- "valueDate",
- "valueBoolean",
- "valueGeoRange",
-}
-
-ALL_VALUE_TYPES = VALUE_LIST_TYPES.union(VALUE_ARRAY_TYPES).union(VALUE_PRIMITIVE_TYPES)
-VALUE_TYPES = VALUE_ARRAY_TYPES.union(VALUE_PRIMITIVE_TYPES)
-
-WHERE_OPERATORS = [
- "And",
- "ContainsAll",
- "ContainsAny",
- "ContainsNone",
- "Equal",
- "GreaterThan",
- "GreaterThanEqual",
- "IsNull",
- "LessThan",
- "LessThanEqual",
- "Like",
- "NotEqual",
- "Or",
- "WithinGeoRange",
- "Not",
-]
-
-
-class MediaType(Enum):
- IMAGE = "image"
- AUDIO = "audio"
- VIDEO = "video"
- THERMAL = "thermal"
- DEPTH = "depth"
- IMU = "imu"
-
-
-class GraphQL(ABC):
- """A base abstract class for GraphQL commands, such as Get, Aggregate."""
-
- @abstractmethod
- def build(self) -> str:
- """Build method to be overloaded by the child classes. It should return the GraphQL query as a str.
-
- Returns:
- The query.
- """
-
-
-class Filter(ABC):
- """A base abstract class for all filters."""
-
- def __init__(self, content: dict):
- """Initialize a Filter class instance.
-
- Args:
- content: The content of the `Filter` clause.
- """
- if not isinstance(content, dict):
- raise TypeError(
- f"{self.__class__.__name__} filter is expected to "
- f"be type dict but is {type(content)}"
- )
- self._content = deepcopy(content)
-
- @abstractmethod
- def __str__(self) -> str:
- """Should be implemented in each inheriting class."""
-
- @property
- def content(self) -> dict:
- return self._content
-
-
-class NearText(Filter):
- """NearText class used to filter weaviate objects.
-
- Can be used with text models only (text2vec), e.g.: text2vec-contextionary, text2vec-transformers.
- """
-
- def __init__(self, content: dict):
- """Initialize a NearText class instance.
-
- Args:
- content: The content of the `nearText` clause.
-
- Raises:
- TypeError: If 'content' is not of type dict.
- ValueError: If 'content' has key "certainty"/"distance" but the value is not float.
- """
- super().__init__(content)
-
- _check_concept(self._content)
-
- if "certainty" in self._content:
- if "distance" in self._content:
- raise ValueError(
- "Cannot have both 'certainty' and 'distance' at the same time. "
- "Only one is accepted."
- )
- _check_type(var_name="certainty", value=self._content["certainty"], dtype=float)
- if "distance" in self._content:
- _check_type(var_name="distance", value=self._content["distance"], dtype=float)
-
- if "moveTo" in self._content:
- _check_direction_clause(self._content["moveTo"])
-
- if "moveAwayFrom" in self._content:
- _check_direction_clause(self._content["moveAwayFrom"])
-
- if "autocorrect" in self._content:
- _check_type(var_name="autocorrect", value=self._content["autocorrect"], dtype=bool)
-
- def __str__(self) -> str:
- near_text = f"nearText: {{concepts: {dumps(self._content['concepts'])}"
- if "certainty" in self._content:
- near_text += f" certainty: {self._content['certainty']}"
- if "distance" in self._content:
- near_text += f" distance: {self._content['distance']}"
- if "moveTo" in self._content:
- move_to = self._content["moveTo"]
- near_text += f" moveTo: {{force: {move_to['force']}"
- if "concepts" in move_to:
- near_text += f" concepts: {dumps(move_to['concepts'])}"
- if "objects" in move_to:
- near_text += _move_clause_objects_to_str(move_to["objects"])
- near_text += "}"
- if "moveAwayFrom" in self._content:
- move_away_from = self._content["moveAwayFrom"]
- near_text += f" moveAwayFrom: {{force: {move_away_from['force']}"
- if "concepts" in move_away_from:
- near_text += f" concepts: {dumps(move_away_from['concepts'])}"
- if "objects" in move_away_from:
- near_text += _move_clause_objects_to_str(move_away_from["objects"])
- near_text += "}"
- if "autocorrect" in self._content:
- near_text += f" autocorrect: {_bool_to_str(self._content['autocorrect'])}"
- if "targetVector" in self._content:
- near_text += f' targetVectors: "{self._content["targetVector"]}"'
- return near_text + "} "
-
-
-class NearVector(Filter):
- """NearVector class used to filter weaviate objects."""
-
- def __init__(self, content: dict):
- """Initialize a NearVector class instance.
-
- Args:
- content: The content of the `nearVector` clause.
-
- Raises:
- TypeError: If 'content' is not of type dict.
- KeyError: If 'content' does not contain "vector".
- TypeError: If 'content["vector"]' is not of type list.
- AttributeError: If invalid 'content' keys are provided.
- ValueError: If 'content' has key "certainty"/"distance" but the value is not float.
- """
- super().__init__(content)
-
- if "vector" not in self._content:
- raise KeyError("No 'vector' key in `content` argument.")
-
- # Check optional fields
- if "certainty" in self._content:
- if "distance" in self._content:
- raise ValueError(
- "Cannot have both 'certainty' and 'distance' at the same time. "
- "Only one is accepted."
- )
- _check_type(var_name="certainty", value=self._content["certainty"], dtype=float)
- if "distance" in self._content:
- _check_type(var_name="distance", value=self._content["distance"], dtype=float)
-
- self._content["vector"] = get_vector(self._content["vector"])
-
- def __str__(self) -> str:
- near_vector = f"nearVector: {{vector: {dumps(self._content['vector'])}"
- if "certainty" in self._content:
- near_vector += f" certainty: {self._content['certainty']}"
- if "distance" in self._content:
- near_vector += f" distance: {self._content['distance']}"
- if "targetVector" in self._content:
- near_vector += f' targetVectors: "{self._content["targetVector"]}"'
- return near_vector + "} "
-
-
-class NearObject(Filter):
- """NearObject class used to filter weaviate objects."""
-
- def __init__(self, content: dict, is_server_version_14: bool):
- """Initialize a NearVector class instance.
-
- Args:
- content: The content of the `nearVector` clause.
- is_server_version_14: Whether the Server version is >= 1.14.0.
-
- Raises:
- TypeError: If 'content' is not of type dict.
- ValueError: If 'content' has key "certainty"/"distance" but the value is not float.
- TypeError: If 'id'/'beacon' key does not have a value of type str!
- """
- super().__init__(content)
-
- if ("id" in self._content) and ("beacon" in self._content):
- raise ValueError("The 'content' argument should contain EITHER `id` OR `beacon`!")
-
- if "id" in self._content:
- self.obj_id = "id"
- else:
- self.obj_id = "beacon"
- if is_server_version_14 and len(self._content["beacon"].strip("/").split("/")) == 4:
- warnings.warn(
- message=FILTER_BEACON_V14_CLS_NS_W,
- category=DeprecationWarning,
- stacklevel=1,
- )
-
- _check_type(var_name=self.obj_id, value=self._content[self.obj_id], dtype=str)
-
- if "certainty" in self._content:
- if "distance" in self._content:
- raise ValueError(
- "Cannot have both 'certainty' and 'distance' at the same time. "
- "Only one is accepted."
- )
- _check_type(var_name="certainty", value=self._content["certainty"], dtype=float)
- if "distance" in self._content:
- _check_type(var_name="distance", value=self._content["distance"], dtype=float)
-
- def __str__(self) -> str:
- near_object = f'nearObject: {{{self.obj_id}: "{self._content[self.obj_id]}"'
- if "certainty" in self._content:
- near_object += f" certainty: {self._content['certainty']}"
- if "distance" in self._content:
- near_object += f" distance: {self._content['distance']}"
- if "targetVector" in self._content:
- near_object += f' targetVectors: "{self._content["targetVector"]}"'
- return near_object + "} "
-
-
-class Ask(Filter):
- """Ask class used to filter weaviate objects by asking a question."""
-
- def __init__(self, content: dict):
- """Initialize a Ask class instance.
-
- Args:
- content: The content of the `ask` clause.
-
- Raises:
- TypeError: If 'content' is not of type dict.
- ValueError: If 'content' has key "certainty"/"distance" but the value is not float.
- TypeError: If 'content' has key "properties" but the type is not list or str.
- """
- super().__init__(content)
-
- if "question" not in self._content:
- raise ValueError('Mandatory "question" key not present in the "content"!')
-
- _check_type(var_name="question", value=self._content["question"], dtype=str)
- if "certainty" in self._content:
- if "distance" in self._content:
- raise ValueError(
- "Cannot have both 'certainty' and 'distance' at the same time. "
- "Only one is accepted."
- )
- _check_type(var_name="certainty", value=self._content["certainty"], dtype=float)
- if "distance" in self._content:
- _check_type(var_name="distance", value=self._content["distance"], dtype=float)
-
- if "autocorrect" in self._content:
- _check_type(var_name="autocorrect", value=self._content["autocorrect"], dtype=bool)
-
- if "rerank" in self._content:
- _check_type(var_name="rerank", value=self._content["rerank"], dtype=bool)
-
- if "properties" in self._content:
- _check_type(
- var_name="properties",
- value=self._content["properties"],
- dtype=(list, str),
- )
- if isinstance(self._content["properties"], str):
- self._content["properties"] = [self._content["properties"]]
-
- def __str__(self) -> str:
- ask = f"ask: {{question: {dumps(self._content['question'])}"
- if "certainty" in self._content:
- ask += f" certainty: {self._content['certainty']}"
- if "distance" in self._content:
- ask += f" distance: {self._content['distance']}"
- if "properties" in self._content:
- ask += f" properties: {dumps(self._content['properties'])}"
- if "autocorrect" in self._content:
- ask += f" autocorrect: {_bool_to_str(self._content['autocorrect'])}"
- if "rerank" in self._content:
- ask += f" rerank: {_bool_to_str(self._content['rerank'])}"
- return ask + "} "
-
-
-class NearMedia(Filter):
- def __init__(
- self,
- content: dict,
- media_type: MediaType,
- ):
- """Initialize a NearMedia class instance.
-
- Args:
- content: The content of the `near` clause.
-
- Raises:
- TypeError: If 'content' is not of type dict.
- TypeError: If 'content[""]' is not of type str.
- ValueError: If 'content' has key "certainty"/"distance" but the value is not float.
- """
- super().__init__(content)
-
- self._media_type = media_type
-
- if self._media_type.value not in self._content:
- raise ValueError(f'"content" is missing the mandatory key "{self._media_type.value}"!')
-
- _check_type(
- var_name=self._media_type.value,
- value=self._content[self._media_type.value],
- dtype=str,
- )
- if "certainty" in self._content:
- if "distance" in self._content:
- raise ValueError(
- "Cannot have both 'certainty' and 'distance' at the same time. "
- "Only one is accepted."
- )
- _check_type(var_name="certainty", value=self._content["certainty"], dtype=float)
- if "distance" in self._content:
- _check_type(var_name="distance", value=self._content["distance"], dtype=float)
-
- def __str__(self) -> str:
- media = self._media_type.value.capitalize()
- if self._media_type == MediaType.IMU:
- media = self._media_type.value.upper()
- near_media = (
- f'near{media}: {{{self._media_type.value}: "{self._content[self._media_type.value]}"'
- )
- if "certainty" in self._content:
- near_media += f" certainty: {self._content['certainty']}"
- if "distance" in self._content:
- near_media += f" distance: {self._content['distance']}"
- if "targetVector" in self._content:
- near_media += f' targetVectors: "{self._content["targetVector"]}"'
- return near_media + "} "
-
-
-class NearImage(NearMedia):
- """NearImage class used to filter weaviate objects."""
-
- def __init__(
- self,
- content: dict,
- ):
- """Initialize a NearImage class instance.
-
- Args:
- content: The content of the `nearImage` clause.
-
- Raises:
- TypeError: If 'content' is not of type dict.
- TypeError: If 'content["image"]' is not of type str.
- ValueError: If 'content' has key "certainty"/"distance" but the value is not float.
- """
- super().__init__(content, MediaType.IMAGE)
-
-
-class NearVideo(NearMedia):
- """NearVideo class used to filter weaviate objects."""
-
- def __init__(
- self,
- content: dict,
- ):
- """Initialize a NearVideo class instance.
-
- Args:
- content: The content of the `nearVideo` clause.
-
- Raises:
- TypeError: If 'content' is not of type dict.
- TypeError: If 'content["video"]' is not of type str.
- ValueError: If 'content' has key "certainty"/"distance" but the value is not float.
- """
- super().__init__(content, MediaType.VIDEO)
-
-
-class NearAudio(NearMedia):
- """NearAudio class used to filter weaviate objects."""
-
- def __init__(
- self,
- content: dict,
- ):
- """Initialize a NearAudio class instance.
-
- Args:
- content: The content of the `nearAudio` clause.
-
- Raises:
- TypeError: If 'content' is not of type dict.
- TypeError: If 'content["audio"]' is not of type str.
- ValueError: If 'content' has key "certainty"/"distance" but the value is not float.
- """
- super().__init__(content, MediaType.AUDIO)
-
-
-class NearDepth(NearMedia):
- """NearDepth class used to filter weaviate objects."""
-
- def __init__(
- self,
- content: dict,
- ):
- """Initialize a NearDepth class instance.
-
- Args:
- content: The content of the `nearDepth` clause.
-
- Raises:
- TypeError: If 'content' is not of type dict.
- TypeError: If 'content["depth"]' is not of type str.
- ValueError: If 'content' has key "certainty"/"distance" but the value is not float.
- """
- super().__init__(content, MediaType.DEPTH)
-
-
-class NearThermal(NearMedia):
- """NearThermal class used to filter weaviate objects."""
-
- def __init__(
- self,
- content: dict,
- ):
- """Initialize a NearThermal class instance.
-
- Args:
- content: The content of the `nearThermal` clause.
-
- Raises:
- TypeError: If 'content' is not of type dict.
- TypeError: If 'content["thermal"]' is not of type str.
- ValueError: If 'content' has key "certainty"/"distance" but the value is not float.
- """
- super().__init__(content, MediaType.THERMAL)
-
-
-class NearIMU(NearMedia):
- """NearIMU class used to filter weaviate objects."""
-
- def __init__(
- self,
- content: dict,
- ):
- """Initialize a NearIMU class instance.
-
- Args:
- content: The content of the `nearIMU` clause.
-
- Raises:
- TypeError: If 'content' is not of type dict.
- TypeError: If 'content["imu"]' is not of type str.
- ValueError: If 'content' has key "certainty"/"distance" but the value is not float.
- """
- super().__init__(content, MediaType.IMU)
-
-
-class Sort(Filter):
- """Sort filter class used to sort weaviate objects."""
-
- def __init__(self, content: Union[dict, list]):
- """Initialize a Where filter class instance.
-
- Args:
- content: The content of the `sort` filter clause or a single clause.
-
- Raises:
- TypeError: If 'content' is not of type dict.
- ValueError: If a mandatory key is missing in the filter content.
- """
- # content is a empty list because it is going to the the list with sort clauses.
-
- super().__init__(content={"sort": []})
-
- self.add(content=content)
-
- def add(self, content: Union[dict, list]) -> None:
- """Add more sort clauses to the already existing sort clauses.
-
- Args:
- content: The content of the `sort` filter clause or a single clause to be added to the already
- existing ones.
-
- Raises:
- TypeError: If 'content' is not of type dict.
- ValueError: If a mandatory key is missing in the filter content.
- """
- if isinstance(content, dict):
- content = [content]
-
- if not isinstance(content, list):
- raise TypeError(f"'content' must be of type dict or list. Given type: {type(content)}.")
-
- if len(content) == 0:
- raise ValueError("'content' cannot be an empty list.")
-
- for clause in content:
- if "path" not in clause or "order" not in clause:
- raise ValueError(
- "One of the sort clause is missing required fields: 'path' and/or 'order'."
- )
-
- _check_type(
- var_name="path",
- value=clause["path"],
- dtype=list,
- )
- _check_type(
- var_name="order",
- value=clause["order"],
- dtype=str,
- )
-
- self._content["sort"].append(
- {
- "path": clause["path"],
- "order": clause["order"],
- }
- )
-
- def __str__(self) -> str:
- sort = "sort: ["
- for clause in self._content["sort"]:
- sort += f"{{ path: {dumps(clause['path'])} order: {clause['order']} }} "
-
- sort += "]"
- return sort
-
-
-class Where(Filter):
- """Where filter class used to filter weaviate objects."""
-
- def __init__(self, content: dict):
- """Initialize a Where filter class instance.
-
- Args:
- content: The content of the `where` filter clause.
-
- Raises:
- TypeError: If 'content' is not of type dict.
- ValueError: If a mandatory key is missing in the filter content.
- """
- super().__init__(content)
-
- if "path" in self._content:
- self.is_filter = True
- self._parse_filter(self._content)
- elif "operands" in self._content:
- self.is_filter = False
- self._parse_operator(self._content)
- else:
- raise ValueError(
- f"Filter is missing required fields `path` or `operands`. Given: {self._content}"
- )
-
- def _parse_filter(self, content: dict) -> None:
- """Set filter fields for the Where filter.
-
- Args:
- content: The content of the `where` filter clause.
-
- Raises:
- ValueError: If 'content' is missing required fields.
- """
- if "operator" not in content:
- raise ValueError(f"Filter is missing required field `operator`. Given: {content}")
- if content["operator"] not in WHERE_OPERATORS:
- raise ValueError(
- f"Operator {content['operator']} is not allowed. "
- f"Allowed operators are: {', '.join(WHERE_OPERATORS)}"
- )
- self.path = dumps(content["path"])
- self.operator = content["operator"]
- self.value_type = _find_value_type(content)
- self.value = content[self.value_type]
-
- if self.operator == "WithinGeoRange" and self.value_type != "valueGeoRange":
- raise ValueError(
- f"Operator {self.operator} requires a value of type valueGeoRange. "
- f"Given value type: {self.value_type}"
- )
-
- def _parse_operator(self, content: dict) -> None:
- """Set operator fields for the Where filter.
-
- Args:
- content: The content of the `where` filter clause.
-
- Raises:
- ValueError: If 'content' is missing required fields.
- """
- if "operator" not in content:
- raise ValueError(f"Filter is missing required field `operator`. Given: {content}")
- if content["operator"] not in WHERE_OPERATORS:
- raise ValueError(
- f"Operator {content['operator']} is not allowed. "
- f"Allowed operators are: {WHERE_OPERATORS}"
- )
- _content = deepcopy(content)
- self.operator = _content["operator"]
- self.operands = []
- for operand in _content["operands"]:
- self.operands.append(Where(operand))
-
- def __str__(self) -> str:
- if self.is_filter:
- gql = f"where: {{path: {self.path} operator: {self.operator} {_convert_value_type(self.value_type)}: "
- if self.value_type in [
- "valueInt",
- "valueNumber",
- "valueIntArray",
- "valueNumberArray",
- "valueIntList",
- "valueNumberList",
- ]:
- if self.value_type in [
- "valueIntList",
- "valueNumberList",
- "valueIntList",
- "valueNumberList",
- ]:
- _check_is_list(self.value, self.value_type)
- gql += f"{self.value}}}"
- elif self.value_type in [
- "valueText",
- "valueString",
- "valueTextList",
- "valueStringList",
- "valueTextArray",
- "valueStringArray",
- ]:
- if self.value_type in [
- "valueTextList",
- "valueStringList",
- "valueTextArray",
- "valueStringArray",
- ]:
- _check_is_list(self.value, self.value_type)
- if isinstance(self.value, list):
- val = [_sanitize_str(v) for v in self.value]
- gql += f"{_render_list(val)}}}"
- else:
- gql += f"{_sanitize_str(self.value)}}}"
- elif self.value_type in [
- "valueBoolean",
- "valueBooleanArray",
- "valueBooleanList",
- ]:
- if self.value_type in ["valueBooleanArray", "valueBooleanList"]:
- _check_is_list(self.value, self.value_type)
- if isinstance(self.value, list):
- gql += f"{_render_list(self.value)}}}"
- else:
- gql += f"{_bool_to_str(self.value)}}}"
- elif self.value_type in ["valueDateArray", "valueDateList"]:
- _check_is_list(self.value, self.value_type)
- gql += f"{_render_list_date(self.value)}}}"
- elif self.value_type == "valueGeoRange":
- _check_is_not_list(self.value, self.value_type)
- gql += f"{_geo_range_to_str(self.value)}}}"
- else:
- gql += f'"{self.value}"}}'
- return gql + " "
-
- operands_str = []
- for operand in self.operands:
- # remove the `where: ` from the operands and the last space
- operands_str.append(str(operand)[7:-1])
- operands = ", ".join(operands_str)
- return f"where: {{operator: {self.operator} operands: [{operands}]}} "
-
-
-def _convert_value_type(_type: str) -> str:
- """Convert the value type to match `json` formatting required by the Weaviate-defined GraphQL endpoints.
-
- NOTE: This is crucially different to the Batch REST endpoints wherein
- the where filter is also used.
-
- Args:
- _type: The Python-defined type to be converted.
-
- Returns:
- The string interpretation of the type in Weaviate-defined `json` format.
- """
- if _type == "valueTextArray" or _type == "valueTextList":
- return "valueText"
- elif _type == "valueStringArray" or _type == "valueStringList":
- return "valueString"
- elif _type == "valueIntArray" or _type == "valueIntList":
- return "valueInt"
- elif _type == "valueNumberArray" or _type == "valueNumberList":
- return "valueNumber"
- elif _type == "valueBooleanArray" or _type == "valueBooleanList":
- return "valueBoolean"
- elif _type == "valueDateArray" or _type == "valueDateList":
- return "valueDate"
- else:
- return _type
-
-
-def _render_list(input_list: list) -> str:
- """Convert a list of values to string (lowercased) to match `json` formatting.
-
- Args:
- input_list: The value to be converted
-
- Returns:
- The string interpretation of the value in `json` format.
- """
- str_list = ",".join(str(item) for item in input_list)
- return f"[{str_list}]"
-
-
-def _render_list_date(input_list: list) -> str:
- str_list = ",".join('"' + str(item) + '"' for item in input_list)
- return f"[{str_list}]"
-
-
-def _check_is_list(value: Any, _type: str) -> None:
- """Checks whether the provided value is a list to match the given `value_type`.
-
- Args:
- value: The value to be checked.
- _type: The type to be checked against.
-
- Raises:
- TypeError: If the value is not a list.
- """
- if not isinstance(value, list):
- raise TypeError(
- f"Must provide a list when constructing where filter for {_type} with {value}"
- )
-
-
-def _check_is_not_list(value: Any, _type: str) -> None:
- """Checks whether the provided value is a list to match the given `value_type`.
-
- Args:
- value: The value to be checked.
- _type: The type to be checked against.
-
- Raises:
- TypeError: If the value is a list.
- """
- if isinstance(value, list):
- raise TypeError(
- f"Cannot provide a list when constructing where filter for {_type} with {value}"
- )
-
-
-def _geo_range_to_str(value: dict) -> str:
- """Convert the valueGeoRange object to match `json` formatting.
-
- Args:
- value: The value to be converted.
-
- Returns:
- The string interpretation of the value in `json` format.
- """
- latitude = value["geoCoordinates"]["latitude"]
- longitude = value["geoCoordinates"]["longitude"]
- distance = value["distance"]["max"]
- return f"{{ geoCoordinates: {{ latitude: {latitude} longitude: {longitude} }} distance: {{ max: {distance} }}}}"
-
-
-def _bool_to_str(value: bool) -> str:
- """Convert a bool value to string (lowercased) to match `json` formatting.
-
- Args:
- value: The value to be converted
-
- Returns:
- The string interpretation of the value in `json` format.
- """
- if value is True:
- return "true"
- return "false"
-
-
-def _check_direction_clause(direction: dict) -> None:
- """Validate the direction sub clause.
-
- Args:
- direction: A sub clause of the Explore filter.
-
- Raises:
- TypeError: If 'direction' is not a dict.
- TypeError: If the value of the "force" key is not float.
- ValueError: If no "force" key in the 'direction'.
- """
- _check_type(var_name="moveXXX", value=direction, dtype=dict)
-
- if ("concepts" not in direction) and ("objects" not in direction):
- raise ValueError("The 'move' clause should contain `concepts` OR/AND `objects`!")
-
- if "concepts" in direction:
- _check_concept(direction)
- if "objects" in direction:
- _check_objects(direction)
- if "force" not in direction:
- raise ValueError("'move' clause needs to state a 'force'")
- _check_type(var_name="force", value=direction["force"], dtype=float)
-
-
-def _check_concept(content: dict) -> None:
- """Validate the concept sub clause.
-
- Args:
- content: An Explore (sub) clause to check for 'concepts'.
-
- Raises:
- ValueError: If no "concepts" key in the 'content' dict.
- TypeError: If the value of the "concepts" is of wrong type.
- """
- if "concepts" not in content:
- raise ValueError("No concepts in content")
-
- _check_type(
- var_name="concepts",
- value=content["concepts"],
- dtype=(list, str),
- )
- if isinstance(content["concepts"], str):
- content["concepts"] = [content["concepts"]]
-
-
-def _check_objects(content: dict) -> None:
- """Validate the `objects` sub clause of the `move` clause.
-
- Args:
- content: An Explore (sub) clause to check for 'objects'.
-
- Raises:
- ValueError: If no "concepts" key in the 'content' dict.
- TypeError: If the value of the "concepts" is of wrong type.
- """
- _check_type(var_name="objects", value=content["objects"], dtype=(list, dict))
- if isinstance(content["objects"], dict):
- content["objects"] = [content["objects"]]
-
- if len(content["objects"]) == 0:
- raise ValueError("'moveXXX' clause specifies 'objects' but no value provided.")
-
- for obj in content["objects"]:
- if len(obj) != 1 or ("id" not in obj and "beacon" not in obj):
- raise ValueError(
- "Each object from the `move` clause should have ONLY `id` OR `beacon`!"
- )
-
-
-def _check_type(var_name: str, value: Any, dtype: Union[Tuple[type, type], type]) -> None:
- """Check key-value type.
-
- Args:
- var_name: The variable name for which to check the type (used for error message)!
- value: The value for which to check the type.
- dtype: The expected data type of the `value`.
-
- Raises:
- TypeError: If the `value` type does not match the expected `dtype`.
- """
- if not isinstance(value, dtype):
- raise TypeError(
- f"'{var_name}' key-value is expected to be of type {dtype} but is {type(value)}!"
- )
-
-
-def _find_value_type(content: dict) -> str:
- """Find the correct type of the content.
-
- Args:
- content: The content for which to find the appropriate data type.
-
- Returns:
- The correct data type.
-
- Raises:
- ValueError: If missing required fields.
- """
- value_type = ALL_VALUE_TYPES & set(content.keys())
-
- if len(value_type) == 0:
- raise ValueError(
- f"'value' field is either missing or incorrect: {content}. Valid values are: {VALUE_TYPES}."
- )
- if len(value_type) != 1:
- raise ValueError(f"Multiple fields 'value' are not supported: {content}")
-
- return value_type.pop()
-
-
-def _move_clause_objects_to_str(objects: list) -> str:
- """Creates the Weaviate `moveTo`/`moveAwayFrom` clause given the list of objects.
-
- Args:
- objects: The list of objects to be used for the `moveTo`/`moveAwayFrom` clause.
-
- Returns:
- The `moveTo`/`moveAwayFrom` clause as a string.
- """
- to_return = " objects: ["
- for obj in objects:
- if "id" in obj:
- id_beacon = "id"
- else:
- id_beacon = "beacon"
- to_return += f"{{{id_beacon}: {dumps(obj[id_beacon])}}} "
-
- return to_return + "]"
diff --git a/weaviate/proto/v1/__init__.py b/weaviate/proto/v1/__init__.py
index 92297b8b9..a7a74fb0c 100644
--- a/weaviate/proto/v1/__init__.py
+++ b/weaviate/proto/v1/__init__.py
@@ -16,9 +16,10 @@
from weaviate.exceptions import WeaviateProtobufIncompatibility
-# grpcio version assumed under Emscripten, where weaviate-client-web provides grpc; must be
-# >= 1.72.0, or the protobuf >= 6.30 check below raises.
-_GRPCIO_FALLBACK_VERSION = "1.72.1"
+# grpcio version assumed under Emscripten, where weaviate-client-web provides grpc. The shim's
+# stub version check always passes, so this only steers the selector below: 1.83.0 picks v7351
+# on protobuf 7.35.1+, and anything under 1.72.0 raises on protobuf 6.30+.
+_GRPCIO_FALLBACK_VERSION = "1.83.0"
def get_version(pkg: str) -> version.Version:
try:
@@ -29,7 +30,12 @@ def get_version(pkg: str) -> version.Version:
raise
pb_version, grpc_version = get_version("protobuf"), get_version("grpcio")
-if pb_version >= version.parse("6.30.0"):
+# The v7351 stubs refuse grpcio < 1.83.0, the grpcio-tools version that generated them. Every
+# other protobuf 7 (7.34.x, or 7.35.1+ on an older grpcio) falls through to the v6300 gencode,
+# which a protobuf 7 runtime still accepts.
+if pb_version >= version.parse("7.35.1") and grpc_version >= version.parse("1.83.0"):
+ from weaviate.proto.v1.v7351.v1 import weaviate_pb2_grpc, aggregate_pb2, base_pb2, base_search_pb2, batch_delete_pb2, batch_pb2, generative_pb2, health_weaviate_pb2, health_weaviate_pb2_grpc, properties_pb2, search_get_pb2, tenants_pb2
+elif pb_version >= version.parse("6.30.0"):
if grpc_version < version.parse("1.72.0"):
raise WeaviateProtobufIncompatibility(pb_version, grpc_version)
from weaviate.proto.v1.v6300.v1 import weaviate_pb2_grpc, aggregate_pb2, base_pb2, base_search_pb2, batch_delete_pb2, batch_pb2, generative_pb2, health_weaviate_pb2, health_weaviate_pb2_grpc, properties_pb2, search_get_pb2, tenants_pb2
diff --git a/weaviate/proto/v1/regen.sh b/weaviate/proto/v1/regen.sh
index 8cd011fac..9c47c3d94 100755
--- a/weaviate/proto/v1/regen.sh
+++ b/weaviate/proto/v1/regen.sh
@@ -2,7 +2,7 @@
set -e # Exit on any error
-echo "This script compiles protos for Protobuf 4, 5, and 6 versions."
+echo "This script compiles protos for Protobuf 4, 5, 6, and 7 versions."
# Get script directory and navigate to project root
SCRIPT_DIR="${0%/*}"
@@ -75,6 +75,7 @@ compile_protos() {
compile_protos "4.21.6" "1.59.5"
compile_protos "5.26.1" "1.63.0"
compile_protos "6.30.0" "1.72.1" # .0 was yanked
+compile_protos "7.35.1" "1.83.0" # sets the grpcio floor __init__.py checks for v7351
deactivate
rm -rf "$PROTO_VENV"
diff --git a/weaviate/proto/v1/v7351/__init__.py b/weaviate/proto/v1/v7351/__init__.py
new file mode 100644
index 000000000..e69de29bb
diff --git a/weaviate/proto/v1/v7351/v1/__init__.py b/weaviate/proto/v1/v7351/v1/__init__.py
new file mode 100644
index 000000000..e69de29bb
diff --git a/weaviate/proto/v1/v7351/v1/aggregate_pb2.py b/weaviate/proto/v1/v7351/v1/aggregate_pb2.py
new file mode 100644
index 000000000..eaa352847
--- /dev/null
+++ b/weaviate/proto/v1/v7351/v1/aggregate_pb2.py
@@ -0,0 +1,85 @@
+# -*- coding: utf-8 -*-
+# Generated by the protocol buffer compiler. DO NOT EDIT!
+# NO CHECKED-IN PROTOBUF GENCODE
+# source: v1/aggregate.proto
+# Protobuf Python Version: 7.35.1
+"""Generated protocol buffer code."""
+from google.protobuf import descriptor as _descriptor
+from google.protobuf import descriptor_pool as _descriptor_pool
+from google.protobuf import runtime_version as _runtime_version
+from google.protobuf import symbol_database as _symbol_database
+from google.protobuf.internal import builder as _builder
+_runtime_version.ValidateProtobufRuntimeVersion(
+ _runtime_version.Domain.PUBLIC,
+ 7,
+ 35,
+ 1,
+ '',
+ 'v1/aggregate.proto'
+)
+# @@protoc_insertion_point(imports)
+
+_sym_db = _symbol_database.Default()
+
+
+from weaviate.proto.v1.v7351.v1 import base_pb2 as v1_dot_base__pb2
+from weaviate.proto.v1.v7351.v1 import base_search_pb2 as v1_dot_base__search__pb2
+
+
+DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n\x12v1/aggregate.proto\x12\x0bweaviate.v1\x1a\rv1/base.proto\x1a\x14v1/base_search.proto\"\xe8\x0f\n\x10\x41ggregateRequest\x12\x12\n\ncollection\x18\x01 \x01(\t\x12\x0e\n\x06tenant\x18\n \x01(\t\x12\x15\n\robjects_count\x18\x14 \x01(\x08\x12?\n\x0c\x61ggregations\x18\x15 \x03(\x0b\x32).weaviate.v1.AggregateRequest.Aggregation\x12\x19\n\x0cobject_limit\x18\x1e \x01(\rH\x01\x88\x01\x01\x12<\n\x08group_by\x18\x1f \x01(\x0b\x32%.weaviate.v1.AggregateRequest.GroupByH\x02\x88\x01\x01\x12\x12\n\x05limit\x18 \x01(\rH\x03\x88\x01\x01\x12*\n\x07\x66ilters\x18( \x01(\x0b\x32\x14.weaviate.v1.FiltersH\x04\x88\x01\x01\x12%\n\x06hybrid\x18) \x01(\x0b\x32\x13.weaviate.v1.HybridH\x00\x12.\n\x0bnear_vector\x18* \x01(\x0b\x32\x17.weaviate.v1.NearVectorH\x00\x12.\n\x0bnear_object\x18+ \x01(\x0b\x32\x17.weaviate.v1.NearObjectH\x00\x12\x30\n\tnear_text\x18, \x01(\x0b\x32\x1b.weaviate.v1.NearTextSearchH\x00\x12\x32\n\nnear_image\x18- \x01(\x0b\x32\x1c.weaviate.v1.NearImageSearchH\x00\x12\x32\n\nnear_audio\x18. \x01(\x0b\x32\x1c.weaviate.v1.NearAudioSearchH\x00\x12\x32\n\nnear_video\x18/ \x01(\x0b\x32\x1c.weaviate.v1.NearVideoSearchH\x00\x12\x32\n\nnear_depth\x18\x30 \x01(\x0b\x32\x1c.weaviate.v1.NearDepthSearchH\x00\x12\x36\n\x0cnear_thermal\x18\x31 \x01(\x0b\x32\x1e.weaviate.v1.NearThermalSearchH\x00\x12.\n\x08near_imu\x18\x32 \x01(\x0b\x32\x1a.weaviate.v1.NearIMUSearchH\x00\x1a\xde\x08\n\x0b\x41ggregation\x12\x10\n\x08property\x18\x01 \x01(\t\x12@\n\x03int\x18\x02 \x01(\x0b\x32\x31.weaviate.v1.AggregateRequest.Aggregation.IntegerH\x00\x12\x42\n\x06number\x18\x03 \x01(\x0b\x32\x30.weaviate.v1.AggregateRequest.Aggregation.NumberH\x00\x12>\n\x04text\x18\x04 \x01(\x0b\x32..weaviate.v1.AggregateRequest.Aggregation.TextH\x00\x12\x44\n\x07\x62oolean\x18\x05 \x01(\x0b\x32\x31.weaviate.v1.AggregateRequest.Aggregation.BooleanH\x00\x12>\n\x04\x64\x61te\x18\x06 \x01(\x0b\x32..weaviate.v1.AggregateRequest.Aggregation.DateH\x00\x12H\n\treference\x18\x07 \x01(\x0b\x32\x33.weaviate.v1.AggregateRequest.Aggregation.ReferenceH\x00\x1a\x81\x01\n\x07Integer\x12\r\n\x05\x63ount\x18\x01 \x01(\x08\x12\x0c\n\x04type\x18\x02 \x01(\x08\x12\x0b\n\x03sum\x18\x03 \x01(\x08\x12\x0c\n\x04mean\x18\x04 \x01(\x08\x12\x0c\n\x04mode\x18\x05 \x01(\x08\x12\x0e\n\x06median\x18\x06 \x01(\x08\x12\x0f\n\x07maximum\x18\x07 \x01(\x08\x12\x0f\n\x07minimum\x18\x08 \x01(\x08\x1a\x80\x01\n\x06Number\x12\r\n\x05\x63ount\x18\x01 \x01(\x08\x12\x0c\n\x04type\x18\x02 \x01(\x08\x12\x0b\n\x03sum\x18\x03 \x01(\x08\x12\x0c\n\x04mean\x18\x04 \x01(\x08\x12\x0c\n\x04mode\x18\x05 \x01(\x08\x12\x0e\n\x06median\x18\x06 \x01(\x08\x12\x0f\n\x07maximum\x18\x07 \x01(\x08\x12\x0f\n\x07minimum\x18\x08 \x01(\x08\x1aw\n\x04Text\x12\r\n\x05\x63ount\x18\x01 \x01(\x08\x12\x0c\n\x04type\x18\x02 \x01(\x08\x12\x16\n\x0etop_occurences\x18\x03 \x01(\x08\x12!\n\x14top_occurences_limit\x18\x04 \x01(\rH\x00\x88\x01\x01\x42\x17\n\x15_top_occurences_limit\x1a\x82\x01\n\x07\x42oolean\x12\r\n\x05\x63ount\x18\x01 \x01(\x08\x12\x0c\n\x04type\x18\x02 \x01(\x08\x12\x12\n\ntotal_true\x18\x03 \x01(\x08\x12\x13\n\x0btotal_false\x18\x04 \x01(\x08\x12\x17\n\x0fpercentage_true\x18\x05 \x01(\x08\x12\x18\n\x10percentage_false\x18\x06 \x01(\x08\x1a\x63\n\x04\x44\x61te\x12\r\n\x05\x63ount\x18\x01 \x01(\x08\x12\x0c\n\x04type\x18\x02 \x01(\x08\x12\x0e\n\x06median\x18\x03 \x01(\x08\x12\x0c\n\x04mode\x18\x04 \x01(\x08\x12\x0f\n\x07maximum\x18\x05 \x01(\x08\x12\x0f\n\x07minimum\x18\x06 \x01(\x08\x1a.\n\tReference\x12\x0c\n\x04type\x18\x01 \x01(\x08\x12\x13\n\x0bpointing_to\x18\x02 \x01(\x08\x42\r\n\x0b\x61ggregation\x1a/\n\x07GroupBy\x12\x12\n\ncollection\x18\x01 \x01(\t\x12\x10\n\x08property\x18\x02 \x01(\tB\x08\n\x06searchB\x0f\n\r_object_limitB\x0b\n\t_group_byB\x08\n\x06_limitB\n\n\x08_filters\"\xdf\x16\n\x0e\x41ggregateReply\x12\x0c\n\x04took\x18\x01 \x01(\x02\x12;\n\rsingle_result\x18\x02 \x01(\x0b\x32\".weaviate.v1.AggregateReply.SingleH\x00\x12>\n\x0fgrouped_results\x18\x03 \x01(\x0b\x32#.weaviate.v1.AggregateReply.GroupedH\x00\x1a\xc0\x0f\n\x0c\x41ggregations\x12J\n\x0c\x61ggregations\x18\x01 \x03(\x0b\x32\x34.weaviate.v1.AggregateReply.Aggregations.Aggregation\x1a\xe3\x0e\n\x0b\x41ggregation\x12\x10\n\x08property\x18\x01 \x01(\t\x12K\n\x03int\x18\x02 \x01(\x0b\x32<.weaviate.v1.AggregateReply.Aggregations.Aggregation.IntegerH\x00\x12M\n\x06number\x18\x03 \x01(\x0b\x32;.weaviate.v1.AggregateReply.Aggregations.Aggregation.NumberH\x00\x12I\n\x04text\x18\x04 \x01(\x0b\x32\x39.weaviate.v1.AggregateReply.Aggregations.Aggregation.TextH\x00\x12O\n\x07\x62oolean\x18\x05 \x01(\x0b\x32<.weaviate.v1.AggregateReply.Aggregations.Aggregation.BooleanH\x00\x12I\n\x04\x64\x61te\x18\x06 \x01(\x0b\x32\x39.weaviate.v1.AggregateReply.Aggregations.Aggregation.DateH\x00\x12S\n\treference\x18\x07 \x01(\x0b\x32>.weaviate.v1.AggregateReply.Aggregations.Aggregation.ReferenceH\x00\x1a\xf9\x01\n\x07Integer\x12\x12\n\x05\x63ount\x18\x01 \x01(\x03H\x00\x88\x01\x01\x12\x11\n\x04type\x18\x02 \x01(\tH\x01\x88\x01\x01\x12\x11\n\x04mean\x18\x03 \x01(\x01H\x02\x88\x01\x01\x12\x13\n\x06median\x18\x04 \x01(\x01H\x03\x88\x01\x01\x12\x11\n\x04mode\x18\x05 \x01(\x03H\x04\x88\x01\x01\x12\x14\n\x07maximum\x18\x06 \x01(\x03H\x05\x88\x01\x01\x12\x14\n\x07minimum\x18\x07 \x01(\x03H\x06\x88\x01\x01\x12\x10\n\x03sum\x18\x08 \x01(\x03H\x07\x88\x01\x01\x42\x08\n\x06_countB\x07\n\x05_typeB\x07\n\x05_meanB\t\n\x07_medianB\x07\n\x05_modeB\n\n\x08_maximumB\n\n\x08_minimumB\x06\n\x04_sum\x1a\xf8\x01\n\x06Number\x12\x12\n\x05\x63ount\x18\x01 \x01(\x03H\x00\x88\x01\x01\x12\x11\n\x04type\x18\x02 \x01(\tH\x01\x88\x01\x01\x12\x11\n\x04mean\x18\x03 \x01(\x01H\x02\x88\x01\x01\x12\x13\n\x06median\x18\x04 \x01(\x01H\x03\x88\x01\x01\x12\x11\n\x04mode\x18\x05 \x01(\x01H\x04\x88\x01\x01\x12\x14\n\x07maximum\x18\x06 \x01(\x01H\x05\x88\x01\x01\x12\x14\n\x07minimum\x18\x07 \x01(\x01H\x06\x88\x01\x01\x12\x10\n\x03sum\x18\x08 \x01(\x01H\x07\x88\x01\x01\x42\x08\n\x06_countB\x07\n\x05_typeB\x07\n\x05_meanB\t\n\x07_medianB\x07\n\x05_modeB\n\n\x08_maximumB\n\n\x08_minimumB\x06\n\x04_sum\x1a\xe4\x02\n\x04Text\x12\x12\n\x05\x63ount\x18\x01 \x01(\x03H\x00\x88\x01\x01\x12\x11\n\x04type\x18\x02 \x01(\tH\x01\x88\x01\x01\x12\x65\n\x0etop_occurences\x18\x03 \x01(\x0b\x32H.weaviate.v1.AggregateReply.Aggregations.Aggregation.Text.TopOccurrencesH\x02\x88\x01\x01\x1a\xa7\x01\n\x0eTopOccurrences\x12\x65\n\x05items\x18\x01 \x03(\x0b\x32V.weaviate.v1.AggregateReply.Aggregations.Aggregation.Text.TopOccurrences.TopOccurrence\x1a.\n\rTopOccurrence\x12\r\n\x05value\x18\x01 \x01(\t\x12\x0e\n\x06occurs\x18\x02 \x01(\x03\x42\x08\n\x06_countB\x07\n\x05_typeB\x11\n\x0f_top_occurences\x1a\xfb\x01\n\x07\x42oolean\x12\x12\n\x05\x63ount\x18\x01 \x01(\x03H\x00\x88\x01\x01\x12\x11\n\x04type\x18\x02 \x01(\tH\x01\x88\x01\x01\x12\x17\n\ntotal_true\x18\x03 \x01(\x03H\x02\x88\x01\x01\x12\x18\n\x0btotal_false\x18\x04 \x01(\x03H\x03\x88\x01\x01\x12\x1c\n\x0fpercentage_true\x18\x05 \x01(\x01H\x04\x88\x01\x01\x12\x1d\n\x10percentage_false\x18\x06 \x01(\x01H\x05\x88\x01\x01\x42\x08\n\x06_countB\x07\n\x05_typeB\r\n\x0b_total_trueB\x0e\n\x0c_total_falseB\x12\n\x10_percentage_trueB\x13\n\x11_percentage_false\x1a\xc0\x01\n\x04\x44\x61te\x12\x12\n\x05\x63ount\x18\x01 \x01(\x03H\x00\x88\x01\x01\x12\x11\n\x04type\x18\x02 \x01(\tH\x01\x88\x01\x01\x12\x13\n\x06median\x18\x03 \x01(\tH\x02\x88\x01\x01\x12\x11\n\x04mode\x18\x04 \x01(\tH\x03\x88\x01\x01\x12\x14\n\x07maximum\x18\x05 \x01(\tH\x04\x88\x01\x01\x12\x14\n\x07minimum\x18\x06 \x01(\tH\x05\x88\x01\x01\x42\x08\n\x06_countB\x07\n\x05_typeB\t\n\x07_medianB\x07\n\x05_modeB\n\n\x08_maximumB\n\n\x08_minimum\x1a<\n\tReference\x12\x11\n\x04type\x18\x01 \x01(\tH\x00\x88\x01\x01\x12\x13\n\x0bpointing_to\x18\x02 \x03(\tB\x07\n\x05_typeB\r\n\x0b\x61ggregation\x1a\x8c\x01\n\x06Single\x12\x1a\n\robjects_count\x18\x01 \x01(\x03H\x00\x88\x01\x01\x12\x43\n\x0c\x61ggregations\x18\x02 \x01(\x0b\x32(.weaviate.v1.AggregateReply.AggregationsH\x01\x88\x01\x01\x42\x10\n\x0e_objects_countB\x0f\n\r_aggregations\x1a\xa7\x04\n\x05Group\x12\x1a\n\robjects_count\x18\x01 \x01(\x03H\x00\x88\x01\x01\x12\x43\n\x0c\x61ggregations\x18\x02 \x01(\x0b\x32(.weaviate.v1.AggregateReply.AggregationsH\x01\x88\x01\x01\x12\x44\n\ngrouped_by\x18\x03 \x01(\x0b\x32+.weaviate.v1.AggregateReply.Group.GroupedByH\x02\x88\x01\x01\x1a\xc4\x02\n\tGroupedBy\x12\x0c\n\x04path\x18\x01 \x03(\t\x12\x0e\n\x04text\x18\x02 \x01(\tH\x00\x12\r\n\x03int\x18\x03 \x01(\x03H\x00\x12\x11\n\x07\x62oolean\x18\x04 \x01(\x08H\x00\x12\x10\n\x06number\x18\x05 \x01(\x01H\x00\x12\'\n\x05texts\x18\x06 \x01(\x0b\x32\x16.weaviate.v1.TextArrayH\x00\x12%\n\x04ints\x18\x07 \x01(\x0b\x32\x15.weaviate.v1.IntArrayH\x00\x12-\n\x08\x62ooleans\x18\x08 \x01(\x0b\x32\x19.weaviate.v1.BooleanArrayH\x00\x12+\n\x07numbers\x18\t \x01(\x0b\x32\x18.weaviate.v1.NumberArrayH\x00\x12\x30\n\x03geo\x18\n \x01(\x0b\x32!.weaviate.v1.GeoCoordinatesFilterH\x00\x42\x07\n\x05valueB\x10\n\x0e_objects_countB\x0f\n\r_aggregationsB\r\n\x0b_grouped_by\x1a<\n\x07Grouped\x12\x31\n\x06groups\x18\x01 \x03(\x0b\x32!.weaviate.v1.AggregateReply.GroupB\x08\n\x06resultBs\n#io.weaviate.client.grpc.protocol.v1B\x16WeaviateProtoAggregateZ4github.com/weaviate/weaviate/grpc/generated;protocolb\x06proto3')
+
+_globals = globals()
+_builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, _globals)
+_builder.BuildTopDescriptorsAndMessages(DESCRIPTOR, 'v1.aggregate_pb2', _globals)
+if not _descriptor._USE_C_DESCRIPTORS:
+ _globals['DESCRIPTOR']._loaded_options = None
+ _globals['DESCRIPTOR']._serialized_options = b'\n#io.weaviate.client.grpc.protocol.v1B\026WeaviateProtoAggregateZ4github.com/weaviate/weaviate/grpc/generated;protocol'
+ _globals['_AGGREGATEREQUEST']._serialized_start=73
+ _globals['_AGGREGATEREQUEST']._serialized_end=2097
+ _globals['_AGGREGATEREQUEST_AGGREGATION']._serialized_start=868
+ _globals['_AGGREGATEREQUEST_AGGREGATION']._serialized_end=1986
+ _globals['_AGGREGATEREQUEST_AGGREGATION_INTEGER']._serialized_start=1308
+ _globals['_AGGREGATEREQUEST_AGGREGATION_INTEGER']._serialized_end=1437
+ _globals['_AGGREGATEREQUEST_AGGREGATION_NUMBER']._serialized_start=1440
+ _globals['_AGGREGATEREQUEST_AGGREGATION_NUMBER']._serialized_end=1568
+ _globals['_AGGREGATEREQUEST_AGGREGATION_TEXT']._serialized_start=1570
+ _globals['_AGGREGATEREQUEST_AGGREGATION_TEXT']._serialized_end=1689
+ _globals['_AGGREGATEREQUEST_AGGREGATION_BOOLEAN']._serialized_start=1692
+ _globals['_AGGREGATEREQUEST_AGGREGATION_BOOLEAN']._serialized_end=1822
+ _globals['_AGGREGATEREQUEST_AGGREGATION_DATE']._serialized_start=1824
+ _globals['_AGGREGATEREQUEST_AGGREGATION_DATE']._serialized_end=1923
+ _globals['_AGGREGATEREQUEST_AGGREGATION_REFERENCE']._serialized_start=1925
+ _globals['_AGGREGATEREQUEST_AGGREGATION_REFERENCE']._serialized_end=1971
+ _globals['_AGGREGATEREQUEST_GROUPBY']._serialized_start=1988
+ _globals['_AGGREGATEREQUEST_GROUPBY']._serialized_end=2035
+ _globals['_AGGREGATEREPLY']._serialized_start=2100
+ _globals['_AGGREGATEREPLY']._serialized_end=5011
+ _globals['_AGGREGATEREPLY_AGGREGATIONS']._serialized_start=2258
+ _globals['_AGGREGATEREPLY_AGGREGATIONS']._serialized_end=4242
+ _globals['_AGGREGATEREPLY_AGGREGATIONS_AGGREGATION']._serialized_start=2351
+ _globals['_AGGREGATEREPLY_AGGREGATIONS_AGGREGATION']._serialized_end=4242
+ _globals['_AGGREGATEREPLY_AGGREGATIONS_AGGREGATION_INTEGER']._serialized_start=2857
+ _globals['_AGGREGATEREPLY_AGGREGATIONS_AGGREGATION_INTEGER']._serialized_end=3106
+ _globals['_AGGREGATEREPLY_AGGREGATIONS_AGGREGATION_NUMBER']._serialized_start=3109
+ _globals['_AGGREGATEREPLY_AGGREGATIONS_AGGREGATION_NUMBER']._serialized_end=3357
+ _globals['_AGGREGATEREPLY_AGGREGATIONS_AGGREGATION_TEXT']._serialized_start=3360
+ _globals['_AGGREGATEREPLY_AGGREGATIONS_AGGREGATION_TEXT']._serialized_end=3716
+ _globals['_AGGREGATEREPLY_AGGREGATIONS_AGGREGATION_TEXT_TOPOCCURRENCES']._serialized_start=3511
+ _globals['_AGGREGATEREPLY_AGGREGATIONS_AGGREGATION_TEXT_TOPOCCURRENCES']._serialized_end=3678
+ _globals['_AGGREGATEREPLY_AGGREGATIONS_AGGREGATION_TEXT_TOPOCCURRENCES_TOPOCCURRENCE']._serialized_start=3632
+ _globals['_AGGREGATEREPLY_AGGREGATIONS_AGGREGATION_TEXT_TOPOCCURRENCES_TOPOCCURRENCE']._serialized_end=3678
+ _globals['_AGGREGATEREPLY_AGGREGATIONS_AGGREGATION_BOOLEAN']._serialized_start=3719
+ _globals['_AGGREGATEREPLY_AGGREGATIONS_AGGREGATION_BOOLEAN']._serialized_end=3970
+ _globals['_AGGREGATEREPLY_AGGREGATIONS_AGGREGATION_DATE']._serialized_start=3973
+ _globals['_AGGREGATEREPLY_AGGREGATIONS_AGGREGATION_DATE']._serialized_end=4165
+ _globals['_AGGREGATEREPLY_AGGREGATIONS_AGGREGATION_REFERENCE']._serialized_start=4167
+ _globals['_AGGREGATEREPLY_AGGREGATIONS_AGGREGATION_REFERENCE']._serialized_end=4227
+ _globals['_AGGREGATEREPLY_SINGLE']._serialized_start=4245
+ _globals['_AGGREGATEREPLY_SINGLE']._serialized_end=4385
+ _globals['_AGGREGATEREPLY_GROUP']._serialized_start=4388
+ _globals['_AGGREGATEREPLY_GROUP']._serialized_end=4939
+ _globals['_AGGREGATEREPLY_GROUP_GROUPEDBY']._serialized_start=4565
+ _globals['_AGGREGATEREPLY_GROUP_GROUPEDBY']._serialized_end=4889
+ _globals['_AGGREGATEREPLY_GROUPED']._serialized_start=4941
+ _globals['_AGGREGATEREPLY_GROUPED']._serialized_end=5001
+# @@protoc_insertion_point(module_scope)
diff --git a/weaviate/proto/v1/v7351/v1/aggregate_pb2.pyi b/weaviate/proto/v1/v7351/v1/aggregate_pb2.pyi
new file mode 100644
index 000000000..0b392edf8
--- /dev/null
+++ b/weaviate/proto/v1/v7351/v1/aggregate_pb2.pyi
@@ -0,0 +1,331 @@
+from weaviate.proto.v1.v7351.v1 import base_pb2 as _base_pb2
+from weaviate.proto.v1.v7351.v1 import base_search_pb2 as _base_search_pb2
+from google.protobuf.internal import containers as _containers
+from google.protobuf import descriptor as _descriptor
+from google.protobuf import message as _message
+from collections.abc import Iterable as _Iterable, Mapping as _Mapping
+from typing import ClassVar as _ClassVar, Optional as _Optional, Union as _Union
+
+DESCRIPTOR: _descriptor.FileDescriptor
+
+class AggregateRequest(_message.Message):
+ __slots__ = ("collection", "tenant", "objects_count", "aggregations", "object_limit", "group_by", "limit", "filters", "hybrid", "near_vector", "near_object", "near_text", "near_image", "near_audio", "near_video", "near_depth", "near_thermal", "near_imu")
+ class Aggregation(_message.Message):
+ __slots__ = ("property", "int", "number", "text", "boolean", "date", "reference")
+ class Integer(_message.Message):
+ __slots__ = ("count", "type", "sum", "mean", "mode", "median", "maximum", "minimum")
+ COUNT_FIELD_NUMBER: _ClassVar[int]
+ TYPE_FIELD_NUMBER: _ClassVar[int]
+ SUM_FIELD_NUMBER: _ClassVar[int]
+ MEAN_FIELD_NUMBER: _ClassVar[int]
+ MODE_FIELD_NUMBER: _ClassVar[int]
+ MEDIAN_FIELD_NUMBER: _ClassVar[int]
+ MAXIMUM_FIELD_NUMBER: _ClassVar[int]
+ MINIMUM_FIELD_NUMBER: _ClassVar[int]
+ count: bool
+ type: bool
+ sum: bool
+ mean: bool
+ mode: bool
+ median: bool
+ maximum: bool
+ minimum: bool
+ def __init__(self, count: _Optional[bool] = ..., type: _Optional[bool] = ..., sum: _Optional[bool] = ..., mean: _Optional[bool] = ..., mode: _Optional[bool] = ..., median: _Optional[bool] = ..., maximum: _Optional[bool] = ..., minimum: _Optional[bool] = ...) -> None: ...
+ class Number(_message.Message):
+ __slots__ = ("count", "type", "sum", "mean", "mode", "median", "maximum", "minimum")
+ COUNT_FIELD_NUMBER: _ClassVar[int]
+ TYPE_FIELD_NUMBER: _ClassVar[int]
+ SUM_FIELD_NUMBER: _ClassVar[int]
+ MEAN_FIELD_NUMBER: _ClassVar[int]
+ MODE_FIELD_NUMBER: _ClassVar[int]
+ MEDIAN_FIELD_NUMBER: _ClassVar[int]
+ MAXIMUM_FIELD_NUMBER: _ClassVar[int]
+ MINIMUM_FIELD_NUMBER: _ClassVar[int]
+ count: bool
+ type: bool
+ sum: bool
+ mean: bool
+ mode: bool
+ median: bool
+ maximum: bool
+ minimum: bool
+ def __init__(self, count: _Optional[bool] = ..., type: _Optional[bool] = ..., sum: _Optional[bool] = ..., mean: _Optional[bool] = ..., mode: _Optional[bool] = ..., median: _Optional[bool] = ..., maximum: _Optional[bool] = ..., minimum: _Optional[bool] = ...) -> None: ...
+ class Text(_message.Message):
+ __slots__ = ("count", "type", "top_occurences", "top_occurences_limit")
+ COUNT_FIELD_NUMBER: _ClassVar[int]
+ TYPE_FIELD_NUMBER: _ClassVar[int]
+ TOP_OCCURENCES_FIELD_NUMBER: _ClassVar[int]
+ TOP_OCCURENCES_LIMIT_FIELD_NUMBER: _ClassVar[int]
+ count: bool
+ type: bool
+ top_occurences: bool
+ top_occurences_limit: int
+ def __init__(self, count: _Optional[bool] = ..., type: _Optional[bool] = ..., top_occurences: _Optional[bool] = ..., top_occurences_limit: _Optional[int] = ...) -> None: ...
+ class Boolean(_message.Message):
+ __slots__ = ("count", "type", "total_true", "total_false", "percentage_true", "percentage_false")
+ COUNT_FIELD_NUMBER: _ClassVar[int]
+ TYPE_FIELD_NUMBER: _ClassVar[int]
+ TOTAL_TRUE_FIELD_NUMBER: _ClassVar[int]
+ TOTAL_FALSE_FIELD_NUMBER: _ClassVar[int]
+ PERCENTAGE_TRUE_FIELD_NUMBER: _ClassVar[int]
+ PERCENTAGE_FALSE_FIELD_NUMBER: _ClassVar[int]
+ count: bool
+ type: bool
+ total_true: bool
+ total_false: bool
+ percentage_true: bool
+ percentage_false: bool
+ def __init__(self, count: _Optional[bool] = ..., type: _Optional[bool] = ..., total_true: _Optional[bool] = ..., total_false: _Optional[bool] = ..., percentage_true: _Optional[bool] = ..., percentage_false: _Optional[bool] = ...) -> None: ...
+ class Date(_message.Message):
+ __slots__ = ("count", "type", "median", "mode", "maximum", "minimum")
+ COUNT_FIELD_NUMBER: _ClassVar[int]
+ TYPE_FIELD_NUMBER: _ClassVar[int]
+ MEDIAN_FIELD_NUMBER: _ClassVar[int]
+ MODE_FIELD_NUMBER: _ClassVar[int]
+ MAXIMUM_FIELD_NUMBER: _ClassVar[int]
+ MINIMUM_FIELD_NUMBER: _ClassVar[int]
+ count: bool
+ type: bool
+ median: bool
+ mode: bool
+ maximum: bool
+ minimum: bool
+ def __init__(self, count: _Optional[bool] = ..., type: _Optional[bool] = ..., median: _Optional[bool] = ..., mode: _Optional[bool] = ..., maximum: _Optional[bool] = ..., minimum: _Optional[bool] = ...) -> None: ...
+ class Reference(_message.Message):
+ __slots__ = ("type", "pointing_to")
+ TYPE_FIELD_NUMBER: _ClassVar[int]
+ POINTING_TO_FIELD_NUMBER: _ClassVar[int]
+ type: bool
+ pointing_to: bool
+ def __init__(self, type: _Optional[bool] = ..., pointing_to: _Optional[bool] = ...) -> None: ...
+ PROPERTY_FIELD_NUMBER: _ClassVar[int]
+ INT_FIELD_NUMBER: _ClassVar[int]
+ NUMBER_FIELD_NUMBER: _ClassVar[int]
+ TEXT_FIELD_NUMBER: _ClassVar[int]
+ BOOLEAN_FIELD_NUMBER: _ClassVar[int]
+ DATE_FIELD_NUMBER: _ClassVar[int]
+ REFERENCE_FIELD_NUMBER: _ClassVar[int]
+ property: str
+ int: AggregateRequest.Aggregation.Integer
+ number: AggregateRequest.Aggregation.Number
+ text: AggregateRequest.Aggregation.Text
+ boolean: AggregateRequest.Aggregation.Boolean
+ date: AggregateRequest.Aggregation.Date
+ reference: AggregateRequest.Aggregation.Reference
+ def __init__(self, property: _Optional[str] = ..., int: _Optional[_Union[AggregateRequest.Aggregation.Integer, _Mapping]] = ..., number: _Optional[_Union[AggregateRequest.Aggregation.Number, _Mapping]] = ..., text: _Optional[_Union[AggregateRequest.Aggregation.Text, _Mapping]] = ..., boolean: _Optional[_Union[AggregateRequest.Aggregation.Boolean, _Mapping]] = ..., date: _Optional[_Union[AggregateRequest.Aggregation.Date, _Mapping]] = ..., reference: _Optional[_Union[AggregateRequest.Aggregation.Reference, _Mapping]] = ...) -> None: ...
+ class GroupBy(_message.Message):
+ __slots__ = ("collection", "property")
+ COLLECTION_FIELD_NUMBER: _ClassVar[int]
+ PROPERTY_FIELD_NUMBER: _ClassVar[int]
+ collection: str
+ property: str
+ def __init__(self, collection: _Optional[str] = ..., property: _Optional[str] = ...) -> None: ...
+ COLLECTION_FIELD_NUMBER: _ClassVar[int]
+ TENANT_FIELD_NUMBER: _ClassVar[int]
+ OBJECTS_COUNT_FIELD_NUMBER: _ClassVar[int]
+ AGGREGATIONS_FIELD_NUMBER: _ClassVar[int]
+ OBJECT_LIMIT_FIELD_NUMBER: _ClassVar[int]
+ GROUP_BY_FIELD_NUMBER: _ClassVar[int]
+ LIMIT_FIELD_NUMBER: _ClassVar[int]
+ FILTERS_FIELD_NUMBER: _ClassVar[int]
+ HYBRID_FIELD_NUMBER: _ClassVar[int]
+ NEAR_VECTOR_FIELD_NUMBER: _ClassVar[int]
+ NEAR_OBJECT_FIELD_NUMBER: _ClassVar[int]
+ NEAR_TEXT_FIELD_NUMBER: _ClassVar[int]
+ NEAR_IMAGE_FIELD_NUMBER: _ClassVar[int]
+ NEAR_AUDIO_FIELD_NUMBER: _ClassVar[int]
+ NEAR_VIDEO_FIELD_NUMBER: _ClassVar[int]
+ NEAR_DEPTH_FIELD_NUMBER: _ClassVar[int]
+ NEAR_THERMAL_FIELD_NUMBER: _ClassVar[int]
+ NEAR_IMU_FIELD_NUMBER: _ClassVar[int]
+ collection: str
+ tenant: str
+ objects_count: bool
+ aggregations: _containers.RepeatedCompositeFieldContainer[AggregateRequest.Aggregation]
+ object_limit: int
+ group_by: AggregateRequest.GroupBy
+ limit: int
+ filters: _base_pb2.Filters
+ hybrid: _base_search_pb2.Hybrid
+ near_vector: _base_search_pb2.NearVector
+ near_object: _base_search_pb2.NearObject
+ near_text: _base_search_pb2.NearTextSearch
+ near_image: _base_search_pb2.NearImageSearch
+ near_audio: _base_search_pb2.NearAudioSearch
+ near_video: _base_search_pb2.NearVideoSearch
+ near_depth: _base_search_pb2.NearDepthSearch
+ near_thermal: _base_search_pb2.NearThermalSearch
+ near_imu: _base_search_pb2.NearIMUSearch
+ def __init__(self, collection: _Optional[str] = ..., tenant: _Optional[str] = ..., objects_count: _Optional[bool] = ..., aggregations: _Optional[_Iterable[_Union[AggregateRequest.Aggregation, _Mapping]]] = ..., object_limit: _Optional[int] = ..., group_by: _Optional[_Union[AggregateRequest.GroupBy, _Mapping]] = ..., limit: _Optional[int] = ..., filters: _Optional[_Union[_base_pb2.Filters, _Mapping]] = ..., hybrid: _Optional[_Union[_base_search_pb2.Hybrid, _Mapping]] = ..., near_vector: _Optional[_Union[_base_search_pb2.NearVector, _Mapping]] = ..., near_object: _Optional[_Union[_base_search_pb2.NearObject, _Mapping]] = ..., near_text: _Optional[_Union[_base_search_pb2.NearTextSearch, _Mapping]] = ..., near_image: _Optional[_Union[_base_search_pb2.NearImageSearch, _Mapping]] = ..., near_audio: _Optional[_Union[_base_search_pb2.NearAudioSearch, _Mapping]] = ..., near_video: _Optional[_Union[_base_search_pb2.NearVideoSearch, _Mapping]] = ..., near_depth: _Optional[_Union[_base_search_pb2.NearDepthSearch, _Mapping]] = ..., near_thermal: _Optional[_Union[_base_search_pb2.NearThermalSearch, _Mapping]] = ..., near_imu: _Optional[_Union[_base_search_pb2.NearIMUSearch, _Mapping]] = ...) -> None: ...
+
+class AggregateReply(_message.Message):
+ __slots__ = ("took", "single_result", "grouped_results")
+ class Aggregations(_message.Message):
+ __slots__ = ("aggregations",)
+ class Aggregation(_message.Message):
+ __slots__ = ("property", "int", "number", "text", "boolean", "date", "reference")
+ class Integer(_message.Message):
+ __slots__ = ("count", "type", "mean", "median", "mode", "maximum", "minimum", "sum")
+ COUNT_FIELD_NUMBER: _ClassVar[int]
+ TYPE_FIELD_NUMBER: _ClassVar[int]
+ MEAN_FIELD_NUMBER: _ClassVar[int]
+ MEDIAN_FIELD_NUMBER: _ClassVar[int]
+ MODE_FIELD_NUMBER: _ClassVar[int]
+ MAXIMUM_FIELD_NUMBER: _ClassVar[int]
+ MINIMUM_FIELD_NUMBER: _ClassVar[int]
+ SUM_FIELD_NUMBER: _ClassVar[int]
+ count: int
+ type: str
+ mean: float
+ median: float
+ mode: int
+ maximum: int
+ minimum: int
+ sum: int
+ def __init__(self, count: _Optional[int] = ..., type: _Optional[str] = ..., mean: _Optional[float] = ..., median: _Optional[float] = ..., mode: _Optional[int] = ..., maximum: _Optional[int] = ..., minimum: _Optional[int] = ..., sum: _Optional[int] = ...) -> None: ...
+ class Number(_message.Message):
+ __slots__ = ("count", "type", "mean", "median", "mode", "maximum", "minimum", "sum")
+ COUNT_FIELD_NUMBER: _ClassVar[int]
+ TYPE_FIELD_NUMBER: _ClassVar[int]
+ MEAN_FIELD_NUMBER: _ClassVar[int]
+ MEDIAN_FIELD_NUMBER: _ClassVar[int]
+ MODE_FIELD_NUMBER: _ClassVar[int]
+ MAXIMUM_FIELD_NUMBER: _ClassVar[int]
+ MINIMUM_FIELD_NUMBER: _ClassVar[int]
+ SUM_FIELD_NUMBER: _ClassVar[int]
+ count: int
+ type: str
+ mean: float
+ median: float
+ mode: float
+ maximum: float
+ minimum: float
+ sum: float
+ def __init__(self, count: _Optional[int] = ..., type: _Optional[str] = ..., mean: _Optional[float] = ..., median: _Optional[float] = ..., mode: _Optional[float] = ..., maximum: _Optional[float] = ..., minimum: _Optional[float] = ..., sum: _Optional[float] = ...) -> None: ...
+ class Text(_message.Message):
+ __slots__ = ("count", "type", "top_occurences")
+ class TopOccurrences(_message.Message):
+ __slots__ = ("items",)
+ class TopOccurrence(_message.Message):
+ __slots__ = ("value", "occurs")
+ VALUE_FIELD_NUMBER: _ClassVar[int]
+ OCCURS_FIELD_NUMBER: _ClassVar[int]
+ value: str
+ occurs: int
+ def __init__(self, value: _Optional[str] = ..., occurs: _Optional[int] = ...) -> None: ...
+ ITEMS_FIELD_NUMBER: _ClassVar[int]
+ items: _containers.RepeatedCompositeFieldContainer[AggregateReply.Aggregations.Aggregation.Text.TopOccurrences.TopOccurrence]
+ def __init__(self, items: _Optional[_Iterable[_Union[AggregateReply.Aggregations.Aggregation.Text.TopOccurrences.TopOccurrence, _Mapping]]] = ...) -> None: ...
+ COUNT_FIELD_NUMBER: _ClassVar[int]
+ TYPE_FIELD_NUMBER: _ClassVar[int]
+ TOP_OCCURENCES_FIELD_NUMBER: _ClassVar[int]
+ count: int
+ type: str
+ top_occurences: AggregateReply.Aggregations.Aggregation.Text.TopOccurrences
+ def __init__(self, count: _Optional[int] = ..., type: _Optional[str] = ..., top_occurences: _Optional[_Union[AggregateReply.Aggregations.Aggregation.Text.TopOccurrences, _Mapping]] = ...) -> None: ...
+ class Boolean(_message.Message):
+ __slots__ = ("count", "type", "total_true", "total_false", "percentage_true", "percentage_false")
+ COUNT_FIELD_NUMBER: _ClassVar[int]
+ TYPE_FIELD_NUMBER: _ClassVar[int]
+ TOTAL_TRUE_FIELD_NUMBER: _ClassVar[int]
+ TOTAL_FALSE_FIELD_NUMBER: _ClassVar[int]
+ PERCENTAGE_TRUE_FIELD_NUMBER: _ClassVar[int]
+ PERCENTAGE_FALSE_FIELD_NUMBER: _ClassVar[int]
+ count: int
+ type: str
+ total_true: int
+ total_false: int
+ percentage_true: float
+ percentage_false: float
+ def __init__(self, count: _Optional[int] = ..., type: _Optional[str] = ..., total_true: _Optional[int] = ..., total_false: _Optional[int] = ..., percentage_true: _Optional[float] = ..., percentage_false: _Optional[float] = ...) -> None: ...
+ class Date(_message.Message):
+ __slots__ = ("count", "type", "median", "mode", "maximum", "minimum")
+ COUNT_FIELD_NUMBER: _ClassVar[int]
+ TYPE_FIELD_NUMBER: _ClassVar[int]
+ MEDIAN_FIELD_NUMBER: _ClassVar[int]
+ MODE_FIELD_NUMBER: _ClassVar[int]
+ MAXIMUM_FIELD_NUMBER: _ClassVar[int]
+ MINIMUM_FIELD_NUMBER: _ClassVar[int]
+ count: int
+ type: str
+ median: str
+ mode: str
+ maximum: str
+ minimum: str
+ def __init__(self, count: _Optional[int] = ..., type: _Optional[str] = ..., median: _Optional[str] = ..., mode: _Optional[str] = ..., maximum: _Optional[str] = ..., minimum: _Optional[str] = ...) -> None: ...
+ class Reference(_message.Message):
+ __slots__ = ("type", "pointing_to")
+ TYPE_FIELD_NUMBER: _ClassVar[int]
+ POINTING_TO_FIELD_NUMBER: _ClassVar[int]
+ type: str
+ pointing_to: _containers.RepeatedScalarFieldContainer[str]
+ def __init__(self, type: _Optional[str] = ..., pointing_to: _Optional[_Iterable[str]] = ...) -> None: ...
+ PROPERTY_FIELD_NUMBER: _ClassVar[int]
+ INT_FIELD_NUMBER: _ClassVar[int]
+ NUMBER_FIELD_NUMBER: _ClassVar[int]
+ TEXT_FIELD_NUMBER: _ClassVar[int]
+ BOOLEAN_FIELD_NUMBER: _ClassVar[int]
+ DATE_FIELD_NUMBER: _ClassVar[int]
+ REFERENCE_FIELD_NUMBER: _ClassVar[int]
+ property: str
+ int: AggregateReply.Aggregations.Aggregation.Integer
+ number: AggregateReply.Aggregations.Aggregation.Number
+ text: AggregateReply.Aggregations.Aggregation.Text
+ boolean: AggregateReply.Aggregations.Aggregation.Boolean
+ date: AggregateReply.Aggregations.Aggregation.Date
+ reference: AggregateReply.Aggregations.Aggregation.Reference
+ def __init__(self, property: _Optional[str] = ..., int: _Optional[_Union[AggregateReply.Aggregations.Aggregation.Integer, _Mapping]] = ..., number: _Optional[_Union[AggregateReply.Aggregations.Aggregation.Number, _Mapping]] = ..., text: _Optional[_Union[AggregateReply.Aggregations.Aggregation.Text, _Mapping]] = ..., boolean: _Optional[_Union[AggregateReply.Aggregations.Aggregation.Boolean, _Mapping]] = ..., date: _Optional[_Union[AggregateReply.Aggregations.Aggregation.Date, _Mapping]] = ..., reference: _Optional[_Union[AggregateReply.Aggregations.Aggregation.Reference, _Mapping]] = ...) -> None: ...
+ AGGREGATIONS_FIELD_NUMBER: _ClassVar[int]
+ aggregations: _containers.RepeatedCompositeFieldContainer[AggregateReply.Aggregations.Aggregation]
+ def __init__(self, aggregations: _Optional[_Iterable[_Union[AggregateReply.Aggregations.Aggregation, _Mapping]]] = ...) -> None: ...
+ class Single(_message.Message):
+ __slots__ = ("objects_count", "aggregations")
+ OBJECTS_COUNT_FIELD_NUMBER: _ClassVar[int]
+ AGGREGATIONS_FIELD_NUMBER: _ClassVar[int]
+ objects_count: int
+ aggregations: AggregateReply.Aggregations
+ def __init__(self, objects_count: _Optional[int] = ..., aggregations: _Optional[_Union[AggregateReply.Aggregations, _Mapping]] = ...) -> None: ...
+ class Group(_message.Message):
+ __slots__ = ("objects_count", "aggregations", "grouped_by")
+ class GroupedBy(_message.Message):
+ __slots__ = ("path", "text", "int", "boolean", "number", "texts", "ints", "booleans", "numbers", "geo")
+ PATH_FIELD_NUMBER: _ClassVar[int]
+ TEXT_FIELD_NUMBER: _ClassVar[int]
+ INT_FIELD_NUMBER: _ClassVar[int]
+ BOOLEAN_FIELD_NUMBER: _ClassVar[int]
+ NUMBER_FIELD_NUMBER: _ClassVar[int]
+ TEXTS_FIELD_NUMBER: _ClassVar[int]
+ INTS_FIELD_NUMBER: _ClassVar[int]
+ BOOLEANS_FIELD_NUMBER: _ClassVar[int]
+ NUMBERS_FIELD_NUMBER: _ClassVar[int]
+ GEO_FIELD_NUMBER: _ClassVar[int]
+ path: _containers.RepeatedScalarFieldContainer[str]
+ text: str
+ int: int
+ boolean: bool
+ number: float
+ texts: _base_pb2.TextArray
+ ints: _base_pb2.IntArray
+ booleans: _base_pb2.BooleanArray
+ numbers: _base_pb2.NumberArray
+ geo: _base_pb2.GeoCoordinatesFilter
+ def __init__(self, path: _Optional[_Iterable[str]] = ..., text: _Optional[str] = ..., int: _Optional[int] = ..., boolean: _Optional[bool] = ..., number: _Optional[float] = ..., texts: _Optional[_Union[_base_pb2.TextArray, _Mapping]] = ..., ints: _Optional[_Union[_base_pb2.IntArray, _Mapping]] = ..., booleans: _Optional[_Union[_base_pb2.BooleanArray, _Mapping]] = ..., numbers: _Optional[_Union[_base_pb2.NumberArray, _Mapping]] = ..., geo: _Optional[_Union[_base_pb2.GeoCoordinatesFilter, _Mapping]] = ...) -> None: ...
+ OBJECTS_COUNT_FIELD_NUMBER: _ClassVar[int]
+ AGGREGATIONS_FIELD_NUMBER: _ClassVar[int]
+ GROUPED_BY_FIELD_NUMBER: _ClassVar[int]
+ objects_count: int
+ aggregations: AggregateReply.Aggregations
+ grouped_by: AggregateReply.Group.GroupedBy
+ def __init__(self, objects_count: _Optional[int] = ..., aggregations: _Optional[_Union[AggregateReply.Aggregations, _Mapping]] = ..., grouped_by: _Optional[_Union[AggregateReply.Group.GroupedBy, _Mapping]] = ...) -> None: ...
+ class Grouped(_message.Message):
+ __slots__ = ("groups",)
+ GROUPS_FIELD_NUMBER: _ClassVar[int]
+ groups: _containers.RepeatedCompositeFieldContainer[AggregateReply.Group]
+ def __init__(self, groups: _Optional[_Iterable[_Union[AggregateReply.Group, _Mapping]]] = ...) -> None: ...
+ TOOK_FIELD_NUMBER: _ClassVar[int]
+ SINGLE_RESULT_FIELD_NUMBER: _ClassVar[int]
+ GROUPED_RESULTS_FIELD_NUMBER: _ClassVar[int]
+ took: float
+ single_result: AggregateReply.Single
+ grouped_results: AggregateReply.Grouped
+ def __init__(self, took: _Optional[float] = ..., single_result: _Optional[_Union[AggregateReply.Single, _Mapping]] = ..., grouped_results: _Optional[_Union[AggregateReply.Grouped, _Mapping]] = ...) -> None: ...
diff --git a/weaviate/proto/v1/v7351/v1/aggregate_pb2_grpc.py b/weaviate/proto/v1/v7351/v1/aggregate_pb2_grpc.py
new file mode 100644
index 000000000..1c0e64f7e
--- /dev/null
+++ b/weaviate/proto/v1/v7351/v1/aggregate_pb2_grpc.py
@@ -0,0 +1,24 @@
+# Generated by the gRPC Python protocol compiler plugin. DO NOT EDIT!
+"""Client and server classes corresponding to protobuf-defined services."""
+import grpc
+import warnings
+
+
+GRPC_GENERATED_VERSION = '1.83.0'
+GRPC_VERSION = grpc.__version__
+_version_not_supported = False
+
+try:
+ from grpc._utilities import first_version_is_lower
+ _version_not_supported = first_version_is_lower(GRPC_VERSION, GRPC_GENERATED_VERSION)
+except ImportError:
+ _version_not_supported = True
+
+if _version_not_supported:
+ raise RuntimeError(
+ f'The grpc package installed is at version {GRPC_VERSION},'
+ + ' but the generated code in v1/aggregate_pb2_grpc.py depends on'
+ + f' grpcio>={GRPC_GENERATED_VERSION}.'
+ + f' Please upgrade your grpc module to grpcio>={GRPC_GENERATED_VERSION}'
+ + f' or downgrade your generated code using grpcio-tools<={GRPC_VERSION}.'
+ )
diff --git a/weaviate/proto/v1/v7351/v1/base_pb2.py b/weaviate/proto/v1/v7351/v1/base_pb2.py
new file mode 100644
index 000000000..7169fcb45
--- /dev/null
+++ b/weaviate/proto/v1/v7351/v1/base_pb2.py
@@ -0,0 +1,84 @@
+# -*- coding: utf-8 -*-
+# Generated by the protocol buffer compiler. DO NOT EDIT!
+# NO CHECKED-IN PROTOBUF GENCODE
+# source: v1/base.proto
+# Protobuf Python Version: 7.35.1
+"""Generated protocol buffer code."""
+from google.protobuf import descriptor as _descriptor
+from google.protobuf import descriptor_pool as _descriptor_pool
+from google.protobuf import runtime_version as _runtime_version
+from google.protobuf import symbol_database as _symbol_database
+from google.protobuf.internal import builder as _builder
+_runtime_version.ValidateProtobufRuntimeVersion(
+ _runtime_version.Domain.PUBLIC,
+ 7,
+ 35,
+ 1,
+ '',
+ 'v1/base.proto'
+)
+# @@protoc_insertion_point(imports)
+
+_sym_db = _symbol_database.Default()
+
+
+from google.protobuf import struct_pb2 as google_dot_protobuf_dot_struct__pb2
+
+
+DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n\rv1/base.proto\x12\x0bweaviate.v1\x1a\x1cgoogle/protobuf/struct.proto\"T\n\x15NumberArrayProperties\x12\x12\n\x06values\x18\x01 \x03(\x01\x42\x02\x18\x01\x12\x11\n\tprop_name\x18\x02 \x01(\t\x12\x14\n\x0cvalues_bytes\x18\x03 \x01(\x0c\"7\n\x12IntArrayProperties\x12\x0e\n\x06values\x18\x01 \x03(\x03\x12\x11\n\tprop_name\x18\x02 \x01(\t\"8\n\x13TextArrayProperties\x12\x0e\n\x06values\x18\x01 \x03(\t\x12\x11\n\tprop_name\x18\x02 \x01(\t\";\n\x16\x42ooleanArrayProperties\x12\x0e\n\x06values\x18\x01 \x03(\x08\x12\x11\n\tprop_name\x18\x02 \x01(\t\"\xf1\x03\n\x15ObjectPropertiesValue\x12\x33\n\x12non_ref_properties\x18\x01 \x01(\x0b\x32\x17.google.protobuf.Struct\x12\x43\n\x17number_array_properties\x18\x02 \x03(\x0b\x32\".weaviate.v1.NumberArrayProperties\x12=\n\x14int_array_properties\x18\x03 \x03(\x0b\x32\x1f.weaviate.v1.IntArrayProperties\x12?\n\x15text_array_properties\x18\x04 \x03(\x0b\x32 .weaviate.v1.TextArrayProperties\x12\x45\n\x18\x62oolean_array_properties\x18\x05 \x03(\x0b\x32#.weaviate.v1.BooleanArrayProperties\x12\x38\n\x11object_properties\x18\x06 \x03(\x0b\x32\x1d.weaviate.v1.ObjectProperties\x12\x43\n\x17object_array_properties\x18\x07 \x03(\x0b\x32\".weaviate.v1.ObjectArrayProperties\x12\x18\n\x10\x65mpty_list_props\x18\n \x03(\t\"^\n\x15ObjectArrayProperties\x12\x32\n\x06values\x18\x01 \x03(\x0b\x32\".weaviate.v1.ObjectPropertiesValue\x12\x11\n\tprop_name\x18\x02 \x01(\t\"X\n\x10ObjectProperties\x12\x31\n\x05value\x18\x01 \x01(\x0b\x32\".weaviate.v1.ObjectPropertiesValue\x12\x11\n\tprop_name\x18\x02 \x01(\t\"\x1b\n\tTextArray\x12\x0e\n\x06values\x18\x01 \x03(\t\"\x1a\n\x08IntArray\x12\x0e\n\x06values\x18\x01 \x03(\x03\"\x1d\n\x0bNumberArray\x12\x0e\n\x06values\x18\x01 \x03(\x01\"\x1e\n\x0c\x42ooleanArray\x12\x0e\n\x06values\x18\x01 \x03(\x08\"\xaa\x07\n\x07\x46ilters\x12/\n\x08operator\x18\x01 \x01(\x0e\x32\x1d.weaviate.v1.Filters.Operator\x12\x0e\n\x02on\x18\x02 \x03(\tB\x02\x18\x01\x12%\n\x07\x66ilters\x18\x03 \x03(\x0b\x32\x14.weaviate.v1.Filters\x12\x14\n\nvalue_text\x18\x04 \x01(\tH\x00\x12\x13\n\tvalue_int\x18\x05 \x01(\x03H\x00\x12\x17\n\rvalue_boolean\x18\x06 \x01(\x08H\x00\x12\x16\n\x0cvalue_number\x18\x07 \x01(\x01H\x00\x12\x32\n\x10value_text_array\x18\t \x01(\x0b\x32\x16.weaviate.v1.TextArrayH\x00\x12\x30\n\x0fvalue_int_array\x18\n \x01(\x0b\x32\x15.weaviate.v1.IntArrayH\x00\x12\x38\n\x13value_boolean_array\x18\x0b \x01(\x0b\x32\x19.weaviate.v1.BooleanArrayH\x00\x12\x36\n\x12value_number_array\x18\x0c \x01(\x0b\x32\x18.weaviate.v1.NumberArrayH\x00\x12\x36\n\tvalue_geo\x18\r \x01(\x0b\x32!.weaviate.v1.GeoCoordinatesFilterH\x00\x12)\n\x06target\x18\x14 \x01(\x0b\x32\x19.weaviate.v1.FilterTarget\"\x91\x03\n\x08Operator\x12\x18\n\x14OPERATOR_UNSPECIFIED\x10\x00\x12\x12\n\x0eOPERATOR_EQUAL\x10\x01\x12\x16\n\x12OPERATOR_NOT_EQUAL\x10\x02\x12\x19\n\x15OPERATOR_GREATER_THAN\x10\x03\x12\x1f\n\x1bOPERATOR_GREATER_THAN_EQUAL\x10\x04\x12\x16\n\x12OPERATOR_LESS_THAN\x10\x05\x12\x1c\n\x18OPERATOR_LESS_THAN_EQUAL\x10\x06\x12\x10\n\x0cOPERATOR_AND\x10\x07\x12\x0f\n\x0bOPERATOR_OR\x10\x08\x12\x1d\n\x19OPERATOR_WITHIN_GEO_RANGE\x10\t\x12\x11\n\rOPERATOR_LIKE\x10\n\x12\x14\n\x10OPERATOR_IS_NULL\x10\x0b\x12\x19\n\x15OPERATOR_CONTAINS_ANY\x10\x0c\x12\x19\n\x15OPERATOR_CONTAINS_ALL\x10\r\x12\x1a\n\x16OPERATOR_CONTAINS_NONE\x10\x0e\x12\x10\n\x0cOPERATOR_NOT\x10\x0f\x42\x0c\n\ntest_value\"T\n\x1b\x46ilterReferenceSingleTarget\x12\n\n\x02on\x18\x01 \x01(\t\x12)\n\x06target\x18\x02 \x01(\x0b\x32\x19.weaviate.v1.FilterTarget\"n\n\x1a\x46ilterReferenceMultiTarget\x12\n\n\x02on\x18\x01 \x01(\t\x12)\n\x06target\x18\x02 \x01(\x0b\x32\x19.weaviate.v1.FilterTarget\x12\x19\n\x11target_collection\x18\x03 \x01(\t\"\"\n\x14\x46ilterReferenceCount\x12\n\n\x02on\x18\x01 \x01(\t\"\xe4\x01\n\x0c\x46ilterTarget\x12\x12\n\x08property\x18\x01 \x01(\tH\x00\x12\x41\n\rsingle_target\x18\x02 \x01(\x0b\x32(.weaviate.v1.FilterReferenceSingleTargetH\x00\x12?\n\x0cmulti_target\x18\x03 \x01(\x0b\x32\'.weaviate.v1.FilterReferenceMultiTargetH\x00\x12\x32\n\x05\x63ount\x18\x04 \x01(\x0b\x32!.weaviate.v1.FilterReferenceCountH\x00\x42\x08\n\x06target\"M\n\x14GeoCoordinatesFilter\x12\x10\n\x08latitude\x18\x01 \x01(\x02\x12\x11\n\tlongitude\x18\x02 \x01(\x02\x12\x10\n\x08\x64istance\x18\x03 \x01(\x02\"\xd3\x01\n\x07Vectors\x12\x0c\n\x04name\x18\x01 \x01(\t\x12\x11\n\x05index\x18\x02 \x01(\x04\x42\x02\x18\x01\x12\x14\n\x0cvector_bytes\x18\x03 \x01(\x0c\x12-\n\x04type\x18\x04 \x01(\x0e\x32\x1f.weaviate.v1.Vectors.VectorType\"b\n\nVectorType\x12\x1b\n\x17VECTOR_TYPE_UNSPECIFIED\x10\x00\x12\x1b\n\x17VECTOR_TYPE_SINGLE_FP32\x10\x01\x12\x1a\n\x16VECTOR_TYPE_MULTI_FP32\x10\x02*\x89\x01\n\x10\x43onsistencyLevel\x12!\n\x1d\x43ONSISTENCY_LEVEL_UNSPECIFIED\x10\x00\x12\x19\n\x15\x43ONSISTENCY_LEVEL_ONE\x10\x01\x12\x1c\n\x18\x43ONSISTENCY_LEVEL_QUORUM\x10\x02\x12\x19\n\x15\x43ONSISTENCY_LEVEL_ALL\x10\x03\x42n\n#io.weaviate.client.grpc.protocol.v1B\x11WeaviateProtoBaseZ4github.com/weaviate/weaviate/grpc/generated;protocolb\x06proto3')
+
+_globals = globals()
+_builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, _globals)
+_builder.BuildTopDescriptorsAndMessages(DESCRIPTOR, 'v1.base_pb2', _globals)
+if not _descriptor._USE_C_DESCRIPTORS:
+ _globals['DESCRIPTOR']._loaded_options = None
+ _globals['DESCRIPTOR']._serialized_options = b'\n#io.weaviate.client.grpc.protocol.v1B\021WeaviateProtoBaseZ4github.com/weaviate/weaviate/grpc/generated;protocol'
+ _globals['_NUMBERARRAYPROPERTIES'].fields_by_name['values']._loaded_options = None
+ _globals['_NUMBERARRAYPROPERTIES'].fields_by_name['values']._serialized_options = b'\030\001'
+ _globals['_FILTERS'].fields_by_name['on']._loaded_options = None
+ _globals['_FILTERS'].fields_by_name['on']._serialized_options = b'\030\001'
+ _globals['_VECTORS'].fields_by_name['index']._loaded_options = None
+ _globals['_VECTORS'].fields_by_name['index']._serialized_options = b'\030\001'
+ _globals['_CONSISTENCYLEVEL']._serialized_start=2828
+ _globals['_CONSISTENCYLEVEL']._serialized_end=2965
+ _globals['_NUMBERARRAYPROPERTIES']._serialized_start=60
+ _globals['_NUMBERARRAYPROPERTIES']._serialized_end=144
+ _globals['_INTARRAYPROPERTIES']._serialized_start=146
+ _globals['_INTARRAYPROPERTIES']._serialized_end=201
+ _globals['_TEXTARRAYPROPERTIES']._serialized_start=203
+ _globals['_TEXTARRAYPROPERTIES']._serialized_end=259
+ _globals['_BOOLEANARRAYPROPERTIES']._serialized_start=261
+ _globals['_BOOLEANARRAYPROPERTIES']._serialized_end=320
+ _globals['_OBJECTPROPERTIESVALUE']._serialized_start=323
+ _globals['_OBJECTPROPERTIESVALUE']._serialized_end=820
+ _globals['_OBJECTARRAYPROPERTIES']._serialized_start=822
+ _globals['_OBJECTARRAYPROPERTIES']._serialized_end=916
+ _globals['_OBJECTPROPERTIES']._serialized_start=918
+ _globals['_OBJECTPROPERTIES']._serialized_end=1006
+ _globals['_TEXTARRAY']._serialized_start=1008
+ _globals['_TEXTARRAY']._serialized_end=1035
+ _globals['_INTARRAY']._serialized_start=1037
+ _globals['_INTARRAY']._serialized_end=1063
+ _globals['_NUMBERARRAY']._serialized_start=1065
+ _globals['_NUMBERARRAY']._serialized_end=1094
+ _globals['_BOOLEANARRAY']._serialized_start=1096
+ _globals['_BOOLEANARRAY']._serialized_end=1126
+ _globals['_FILTERS']._serialized_start=1129
+ _globals['_FILTERS']._serialized_end=2067
+ _globals['_FILTERS_OPERATOR']._serialized_start=1652
+ _globals['_FILTERS_OPERATOR']._serialized_end=2053
+ _globals['_FILTERREFERENCESINGLETARGET']._serialized_start=2069
+ _globals['_FILTERREFERENCESINGLETARGET']._serialized_end=2153
+ _globals['_FILTERREFERENCEMULTITARGET']._serialized_start=2155
+ _globals['_FILTERREFERENCEMULTITARGET']._serialized_end=2265
+ _globals['_FILTERREFERENCECOUNT']._serialized_start=2267
+ _globals['_FILTERREFERENCECOUNT']._serialized_end=2301
+ _globals['_FILTERTARGET']._serialized_start=2304
+ _globals['_FILTERTARGET']._serialized_end=2532
+ _globals['_GEOCOORDINATESFILTER']._serialized_start=2534
+ _globals['_GEOCOORDINATESFILTER']._serialized_end=2611
+ _globals['_VECTORS']._serialized_start=2614
+ _globals['_VECTORS']._serialized_end=2825
+ _globals['_VECTORS_VECTORTYPE']._serialized_start=2727
+ _globals['_VECTORS_VECTORTYPE']._serialized_end=2825
+# @@protoc_insertion_point(module_scope)
diff --git a/weaviate/proto/v1/v7351/v1/base_pb2.pyi b/weaviate/proto/v1/v7351/v1/base_pb2.pyi
new file mode 100644
index 000000000..cc818ede5
--- /dev/null
+++ b/weaviate/proto/v1/v7351/v1/base_pb2.pyi
@@ -0,0 +1,244 @@
+from google.protobuf import struct_pb2 as _struct_pb2
+from google.protobuf.internal import containers as _containers
+from google.protobuf.internal import enum_type_wrapper as _enum_type_wrapper
+from google.protobuf import descriptor as _descriptor
+from google.protobuf import message as _message
+from collections.abc import Iterable as _Iterable, Mapping as _Mapping
+from typing import ClassVar as _ClassVar, Optional as _Optional, Union as _Union
+
+DESCRIPTOR: _descriptor.FileDescriptor
+
+class ConsistencyLevel(int, metaclass=_enum_type_wrapper.EnumTypeWrapper):
+ __slots__ = ()
+ CONSISTENCY_LEVEL_UNSPECIFIED: _ClassVar[ConsistencyLevel]
+ CONSISTENCY_LEVEL_ONE: _ClassVar[ConsistencyLevel]
+ CONSISTENCY_LEVEL_QUORUM: _ClassVar[ConsistencyLevel]
+ CONSISTENCY_LEVEL_ALL: _ClassVar[ConsistencyLevel]
+CONSISTENCY_LEVEL_UNSPECIFIED: ConsistencyLevel
+CONSISTENCY_LEVEL_ONE: ConsistencyLevel
+CONSISTENCY_LEVEL_QUORUM: ConsistencyLevel
+CONSISTENCY_LEVEL_ALL: ConsistencyLevel
+
+class NumberArrayProperties(_message.Message):
+ __slots__ = ("values", "prop_name", "values_bytes")
+ VALUES_FIELD_NUMBER: _ClassVar[int]
+ PROP_NAME_FIELD_NUMBER: _ClassVar[int]
+ VALUES_BYTES_FIELD_NUMBER: _ClassVar[int]
+ values: _containers.RepeatedScalarFieldContainer[float]
+ prop_name: str
+ values_bytes: bytes
+ def __init__(self, values: _Optional[_Iterable[float]] = ..., prop_name: _Optional[str] = ..., values_bytes: _Optional[bytes] = ...) -> None: ...
+
+class IntArrayProperties(_message.Message):
+ __slots__ = ("values", "prop_name")
+ VALUES_FIELD_NUMBER: _ClassVar[int]
+ PROP_NAME_FIELD_NUMBER: _ClassVar[int]
+ values: _containers.RepeatedScalarFieldContainer[int]
+ prop_name: str
+ def __init__(self, values: _Optional[_Iterable[int]] = ..., prop_name: _Optional[str] = ...) -> None: ...
+
+class TextArrayProperties(_message.Message):
+ __slots__ = ("values", "prop_name")
+ VALUES_FIELD_NUMBER: _ClassVar[int]
+ PROP_NAME_FIELD_NUMBER: _ClassVar[int]
+ values: _containers.RepeatedScalarFieldContainer[str]
+ prop_name: str
+ def __init__(self, values: _Optional[_Iterable[str]] = ..., prop_name: _Optional[str] = ...) -> None: ...
+
+class BooleanArrayProperties(_message.Message):
+ __slots__ = ("values", "prop_name")
+ VALUES_FIELD_NUMBER: _ClassVar[int]
+ PROP_NAME_FIELD_NUMBER: _ClassVar[int]
+ values: _containers.RepeatedScalarFieldContainer[bool]
+ prop_name: str
+ def __init__(self, values: _Optional[_Iterable[bool]] = ..., prop_name: _Optional[str] = ...) -> None: ...
+
+class ObjectPropertiesValue(_message.Message):
+ __slots__ = ("non_ref_properties", "number_array_properties", "int_array_properties", "text_array_properties", "boolean_array_properties", "object_properties", "object_array_properties", "empty_list_props")
+ NON_REF_PROPERTIES_FIELD_NUMBER: _ClassVar[int]
+ NUMBER_ARRAY_PROPERTIES_FIELD_NUMBER: _ClassVar[int]
+ INT_ARRAY_PROPERTIES_FIELD_NUMBER: _ClassVar[int]
+ TEXT_ARRAY_PROPERTIES_FIELD_NUMBER: _ClassVar[int]
+ BOOLEAN_ARRAY_PROPERTIES_FIELD_NUMBER: _ClassVar[int]
+ OBJECT_PROPERTIES_FIELD_NUMBER: _ClassVar[int]
+ OBJECT_ARRAY_PROPERTIES_FIELD_NUMBER: _ClassVar[int]
+ EMPTY_LIST_PROPS_FIELD_NUMBER: _ClassVar[int]
+ non_ref_properties: _struct_pb2.Struct
+ number_array_properties: _containers.RepeatedCompositeFieldContainer[NumberArrayProperties]
+ int_array_properties: _containers.RepeatedCompositeFieldContainer[IntArrayProperties]
+ text_array_properties: _containers.RepeatedCompositeFieldContainer[TextArrayProperties]
+ boolean_array_properties: _containers.RepeatedCompositeFieldContainer[BooleanArrayProperties]
+ object_properties: _containers.RepeatedCompositeFieldContainer[ObjectProperties]
+ object_array_properties: _containers.RepeatedCompositeFieldContainer[ObjectArrayProperties]
+ empty_list_props: _containers.RepeatedScalarFieldContainer[str]
+ def __init__(self, non_ref_properties: _Optional[_Union[_struct_pb2.Struct, _Mapping]] = ..., number_array_properties: _Optional[_Iterable[_Union[NumberArrayProperties, _Mapping]]] = ..., int_array_properties: _Optional[_Iterable[_Union[IntArrayProperties, _Mapping]]] = ..., text_array_properties: _Optional[_Iterable[_Union[TextArrayProperties, _Mapping]]] = ..., boolean_array_properties: _Optional[_Iterable[_Union[BooleanArrayProperties, _Mapping]]] = ..., object_properties: _Optional[_Iterable[_Union[ObjectProperties, _Mapping]]] = ..., object_array_properties: _Optional[_Iterable[_Union[ObjectArrayProperties, _Mapping]]] = ..., empty_list_props: _Optional[_Iterable[str]] = ...) -> None: ...
+
+class ObjectArrayProperties(_message.Message):
+ __slots__ = ("values", "prop_name")
+ VALUES_FIELD_NUMBER: _ClassVar[int]
+ PROP_NAME_FIELD_NUMBER: _ClassVar[int]
+ values: _containers.RepeatedCompositeFieldContainer[ObjectPropertiesValue]
+ prop_name: str
+ def __init__(self, values: _Optional[_Iterable[_Union[ObjectPropertiesValue, _Mapping]]] = ..., prop_name: _Optional[str] = ...) -> None: ...
+
+class ObjectProperties(_message.Message):
+ __slots__ = ("value", "prop_name")
+ VALUE_FIELD_NUMBER: _ClassVar[int]
+ PROP_NAME_FIELD_NUMBER: _ClassVar[int]
+ value: ObjectPropertiesValue
+ prop_name: str
+ def __init__(self, value: _Optional[_Union[ObjectPropertiesValue, _Mapping]] = ..., prop_name: _Optional[str] = ...) -> None: ...
+
+class TextArray(_message.Message):
+ __slots__ = ("values",)
+ VALUES_FIELD_NUMBER: _ClassVar[int]
+ values: _containers.RepeatedScalarFieldContainer[str]
+ def __init__(self, values: _Optional[_Iterable[str]] = ...) -> None: ...
+
+class IntArray(_message.Message):
+ __slots__ = ("values",)
+ VALUES_FIELD_NUMBER: _ClassVar[int]
+ values: _containers.RepeatedScalarFieldContainer[int]
+ def __init__(self, values: _Optional[_Iterable[int]] = ...) -> None: ...
+
+class NumberArray(_message.Message):
+ __slots__ = ("values",)
+ VALUES_FIELD_NUMBER: _ClassVar[int]
+ values: _containers.RepeatedScalarFieldContainer[float]
+ def __init__(self, values: _Optional[_Iterable[float]] = ...) -> None: ...
+
+class BooleanArray(_message.Message):
+ __slots__ = ("values",)
+ VALUES_FIELD_NUMBER: _ClassVar[int]
+ values: _containers.RepeatedScalarFieldContainer[bool]
+ def __init__(self, values: _Optional[_Iterable[bool]] = ...) -> None: ...
+
+class Filters(_message.Message):
+ __slots__ = ("operator", "on", "filters", "value_text", "value_int", "value_boolean", "value_number", "value_text_array", "value_int_array", "value_boolean_array", "value_number_array", "value_geo", "target")
+ class Operator(int, metaclass=_enum_type_wrapper.EnumTypeWrapper):
+ __slots__ = ()
+ OPERATOR_UNSPECIFIED: _ClassVar[Filters.Operator]
+ OPERATOR_EQUAL: _ClassVar[Filters.Operator]
+ OPERATOR_NOT_EQUAL: _ClassVar[Filters.Operator]
+ OPERATOR_GREATER_THAN: _ClassVar[Filters.Operator]
+ OPERATOR_GREATER_THAN_EQUAL: _ClassVar[Filters.Operator]
+ OPERATOR_LESS_THAN: _ClassVar[Filters.Operator]
+ OPERATOR_LESS_THAN_EQUAL: _ClassVar[Filters.Operator]
+ OPERATOR_AND: _ClassVar[Filters.Operator]
+ OPERATOR_OR: _ClassVar[Filters.Operator]
+ OPERATOR_WITHIN_GEO_RANGE: _ClassVar[Filters.Operator]
+ OPERATOR_LIKE: _ClassVar[Filters.Operator]
+ OPERATOR_IS_NULL: _ClassVar[Filters.Operator]
+ OPERATOR_CONTAINS_ANY: _ClassVar[Filters.Operator]
+ OPERATOR_CONTAINS_ALL: _ClassVar[Filters.Operator]
+ OPERATOR_CONTAINS_NONE: _ClassVar[Filters.Operator]
+ OPERATOR_NOT: _ClassVar[Filters.Operator]
+ OPERATOR_UNSPECIFIED: Filters.Operator
+ OPERATOR_EQUAL: Filters.Operator
+ OPERATOR_NOT_EQUAL: Filters.Operator
+ OPERATOR_GREATER_THAN: Filters.Operator
+ OPERATOR_GREATER_THAN_EQUAL: Filters.Operator
+ OPERATOR_LESS_THAN: Filters.Operator
+ OPERATOR_LESS_THAN_EQUAL: Filters.Operator
+ OPERATOR_AND: Filters.Operator
+ OPERATOR_OR: Filters.Operator
+ OPERATOR_WITHIN_GEO_RANGE: Filters.Operator
+ OPERATOR_LIKE: Filters.Operator
+ OPERATOR_IS_NULL: Filters.Operator
+ OPERATOR_CONTAINS_ANY: Filters.Operator
+ OPERATOR_CONTAINS_ALL: Filters.Operator
+ OPERATOR_CONTAINS_NONE: Filters.Operator
+ OPERATOR_NOT: Filters.Operator
+ OPERATOR_FIELD_NUMBER: _ClassVar[int]
+ ON_FIELD_NUMBER: _ClassVar[int]
+ FILTERS_FIELD_NUMBER: _ClassVar[int]
+ VALUE_TEXT_FIELD_NUMBER: _ClassVar[int]
+ VALUE_INT_FIELD_NUMBER: _ClassVar[int]
+ VALUE_BOOLEAN_FIELD_NUMBER: _ClassVar[int]
+ VALUE_NUMBER_FIELD_NUMBER: _ClassVar[int]
+ VALUE_TEXT_ARRAY_FIELD_NUMBER: _ClassVar[int]
+ VALUE_INT_ARRAY_FIELD_NUMBER: _ClassVar[int]
+ VALUE_BOOLEAN_ARRAY_FIELD_NUMBER: _ClassVar[int]
+ VALUE_NUMBER_ARRAY_FIELD_NUMBER: _ClassVar[int]
+ VALUE_GEO_FIELD_NUMBER: _ClassVar[int]
+ TARGET_FIELD_NUMBER: _ClassVar[int]
+ operator: Filters.Operator
+ on: _containers.RepeatedScalarFieldContainer[str]
+ filters: _containers.RepeatedCompositeFieldContainer[Filters]
+ value_text: str
+ value_int: int
+ value_boolean: bool
+ value_number: float
+ value_text_array: TextArray
+ value_int_array: IntArray
+ value_boolean_array: BooleanArray
+ value_number_array: NumberArray
+ value_geo: GeoCoordinatesFilter
+ target: FilterTarget
+ def __init__(self, operator: _Optional[_Union[Filters.Operator, str]] = ..., on: _Optional[_Iterable[str]] = ..., filters: _Optional[_Iterable[_Union[Filters, _Mapping]]] = ..., value_text: _Optional[str] = ..., value_int: _Optional[int] = ..., value_boolean: _Optional[bool] = ..., value_number: _Optional[float] = ..., value_text_array: _Optional[_Union[TextArray, _Mapping]] = ..., value_int_array: _Optional[_Union[IntArray, _Mapping]] = ..., value_boolean_array: _Optional[_Union[BooleanArray, _Mapping]] = ..., value_number_array: _Optional[_Union[NumberArray, _Mapping]] = ..., value_geo: _Optional[_Union[GeoCoordinatesFilter, _Mapping]] = ..., target: _Optional[_Union[FilterTarget, _Mapping]] = ...) -> None: ...
+
+class FilterReferenceSingleTarget(_message.Message):
+ __slots__ = ("on", "target")
+ ON_FIELD_NUMBER: _ClassVar[int]
+ TARGET_FIELD_NUMBER: _ClassVar[int]
+ on: str
+ target: FilterTarget
+ def __init__(self, on: _Optional[str] = ..., target: _Optional[_Union[FilterTarget, _Mapping]] = ...) -> None: ...
+
+class FilterReferenceMultiTarget(_message.Message):
+ __slots__ = ("on", "target", "target_collection")
+ ON_FIELD_NUMBER: _ClassVar[int]
+ TARGET_FIELD_NUMBER: _ClassVar[int]
+ TARGET_COLLECTION_FIELD_NUMBER: _ClassVar[int]
+ on: str
+ target: FilterTarget
+ target_collection: str
+ def __init__(self, on: _Optional[str] = ..., target: _Optional[_Union[FilterTarget, _Mapping]] = ..., target_collection: _Optional[str] = ...) -> None: ...
+
+class FilterReferenceCount(_message.Message):
+ __slots__ = ("on",)
+ ON_FIELD_NUMBER: _ClassVar[int]
+ on: str
+ def __init__(self, on: _Optional[str] = ...) -> None: ...
+
+class FilterTarget(_message.Message):
+ __slots__ = ("property", "single_target", "multi_target", "count")
+ PROPERTY_FIELD_NUMBER: _ClassVar[int]
+ SINGLE_TARGET_FIELD_NUMBER: _ClassVar[int]
+ MULTI_TARGET_FIELD_NUMBER: _ClassVar[int]
+ COUNT_FIELD_NUMBER: _ClassVar[int]
+ property: str
+ single_target: FilterReferenceSingleTarget
+ multi_target: FilterReferenceMultiTarget
+ count: FilterReferenceCount
+ def __init__(self, property: _Optional[str] = ..., single_target: _Optional[_Union[FilterReferenceSingleTarget, _Mapping]] = ..., multi_target: _Optional[_Union[FilterReferenceMultiTarget, _Mapping]] = ..., count: _Optional[_Union[FilterReferenceCount, _Mapping]] = ...) -> None: ...
+
+class GeoCoordinatesFilter(_message.Message):
+ __slots__ = ("latitude", "longitude", "distance")
+ LATITUDE_FIELD_NUMBER: _ClassVar[int]
+ LONGITUDE_FIELD_NUMBER: _ClassVar[int]
+ DISTANCE_FIELD_NUMBER: _ClassVar[int]
+ latitude: float
+ longitude: float
+ distance: float
+ def __init__(self, latitude: _Optional[float] = ..., longitude: _Optional[float] = ..., distance: _Optional[float] = ...) -> None: ...
+
+class Vectors(_message.Message):
+ __slots__ = ("name", "index", "vector_bytes", "type")
+ class VectorType(int, metaclass=_enum_type_wrapper.EnumTypeWrapper):
+ __slots__ = ()
+ VECTOR_TYPE_UNSPECIFIED: _ClassVar[Vectors.VectorType]
+ VECTOR_TYPE_SINGLE_FP32: _ClassVar[Vectors.VectorType]
+ VECTOR_TYPE_MULTI_FP32: _ClassVar[Vectors.VectorType]
+ VECTOR_TYPE_UNSPECIFIED: Vectors.VectorType
+ VECTOR_TYPE_SINGLE_FP32: Vectors.VectorType
+ VECTOR_TYPE_MULTI_FP32: Vectors.VectorType
+ NAME_FIELD_NUMBER: _ClassVar[int]
+ INDEX_FIELD_NUMBER: _ClassVar[int]
+ VECTOR_BYTES_FIELD_NUMBER: _ClassVar[int]
+ TYPE_FIELD_NUMBER: _ClassVar[int]
+ name: str
+ index: int
+ vector_bytes: bytes
+ type: Vectors.VectorType
+ def __init__(self, name: _Optional[str] = ..., index: _Optional[int] = ..., vector_bytes: _Optional[bytes] = ..., type: _Optional[_Union[Vectors.VectorType, str]] = ...) -> None: ...
diff --git a/weaviate/proto/v1/v7351/v1/base_pb2_grpc.py b/weaviate/proto/v1/v7351/v1/base_pb2_grpc.py
new file mode 100644
index 000000000..ec30e8248
--- /dev/null
+++ b/weaviate/proto/v1/v7351/v1/base_pb2_grpc.py
@@ -0,0 +1,24 @@
+# Generated by the gRPC Python protocol compiler plugin. DO NOT EDIT!
+"""Client and server classes corresponding to protobuf-defined services."""
+import grpc
+import warnings
+
+
+GRPC_GENERATED_VERSION = '1.83.0'
+GRPC_VERSION = grpc.__version__
+_version_not_supported = False
+
+try:
+ from grpc._utilities import first_version_is_lower
+ _version_not_supported = first_version_is_lower(GRPC_VERSION, GRPC_GENERATED_VERSION)
+except ImportError:
+ _version_not_supported = True
+
+if _version_not_supported:
+ raise RuntimeError(
+ f'The grpc package installed is at version {GRPC_VERSION},'
+ + ' but the generated code in v1/base_pb2_grpc.py depends on'
+ + f' grpcio>={GRPC_GENERATED_VERSION}.'
+ + f' Please upgrade your grpc module to grpcio>={GRPC_GENERATED_VERSION}'
+ + f' or downgrade your generated code using grpcio-tools<={GRPC_VERSION}.'
+ )
diff --git a/weaviate/proto/v1/v7351/v1/base_search_pb2.py b/weaviate/proto/v1/v7351/v1/base_search_pb2.py
new file mode 100644
index 000000000..3d11d4656
--- /dev/null
+++ b/weaviate/proto/v1/v7351/v1/base_search_pb2.py
@@ -0,0 +1,116 @@
+# -*- coding: utf-8 -*-
+# Generated by the protocol buffer compiler. DO NOT EDIT!
+# NO CHECKED-IN PROTOBUF GENCODE
+# source: v1/base_search.proto
+# Protobuf Python Version: 7.35.1
+"""Generated protocol buffer code."""
+from google.protobuf import descriptor as _descriptor
+from google.protobuf import descriptor_pool as _descriptor_pool
+from google.protobuf import runtime_version as _runtime_version
+from google.protobuf import symbol_database as _symbol_database
+from google.protobuf.internal import builder as _builder
+_runtime_version.ValidateProtobufRuntimeVersion(
+ _runtime_version.Domain.PUBLIC,
+ 7,
+ 35,
+ 1,
+ '',
+ 'v1/base_search.proto'
+)
+# @@protoc_insertion_point(imports)
+
+_sym_db = _symbol_database.Default()
+
+
+from weaviate.proto.v1.v7351.v1 import base_pb2 as v1_dot_base__pb2
+
+
+DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n\x14v1/base_search.proto\x12\x0bweaviate.v1\x1a\rv1/base.proto\"2\n\x10WeightsForTarget\x12\x0e\n\x06target\x18\x01 \x01(\t\x12\x0e\n\x06weight\x18\x02 \x01(\x02\"\x98\x01\n\x07Targets\x12\x16\n\x0etarget_vectors\x18\x01 \x03(\t\x12\x33\n\x0b\x63ombination\x18\x02 \x01(\x0e\x32\x1e.weaviate.v1.CombinationMethod\x12:\n\x13weights_for_targets\x18\x04 \x03(\x0b\x32\x1d.weaviate.v1.WeightsForTargetJ\x04\x08\x03\x10\x04\"`\n\x0fVectorForTarget\x12\x0c\n\x04name\x18\x01 \x01(\t\x12\x18\n\x0cvector_bytes\x18\x02 \x01(\x0c\x42\x02\x18\x01\x12%\n\x07vectors\x18\x03 \x03(\x0b\x32\x14.weaviate.v1.Vectors\"\x8a\x01\n\tSelection\x12)\n\x03mmr\x18\x01 \x01(\x0b\x32\x1a.weaviate.v1.Selection.MMRH\x00\x1a\x45\n\x03MMR\x12\x12\n\x05limit\x18\x01 \x01(\rH\x00\x88\x01\x01\x12\x14\n\x07\x62\x61lance\x18\x02 \x01(\x02H\x01\x88\x01\x01\x42\x08\n\x06_limitB\n\n\x08_balanceB\x0b\n\tselection\"\xf9\x01\n\x15SearchOperatorOptions\x12=\n\x08operator\x18\x01 \x01(\x0e\x32+.weaviate.v1.SearchOperatorOptions.Operator\x12$\n\x17minimum_or_tokens_match\x18\x02 \x01(\x05H\x00\x88\x01\x01\"_\n\x08Operator\x12\x18\n\x14OPERATOR_UNSPECIFIED\x10\x00\x12\x0f\n\x0bOPERATOR_OR\x10\x01\x12\x10\n\x0cOPERATOR_AND\x10\x02\x12\x16\n\x12OPERATOR_AND_CROSS\x10\x03\x42\x1a\n\x18_minimum_or_tokens_match\"\xd5\x05\n\x06Hybrid\x12\r\n\x05query\x18\x01 \x01(\t\x12\x12\n\nproperties\x18\x02 \x03(\t\x12\x12\n\x06vector\x18\x03 \x03(\x02\x42\x02\x18\x01\x12\x11\n\x05\x61lpha\x18\x04 \x01(\x02\x42\x02\x18\x01\x12\x33\n\x0b\x66usion_type\x18\x05 \x01(\x0e\x32\x1e.weaviate.v1.Hybrid.FusionType\x12\x18\n\x0cvector_bytes\x18\x06 \x01(\x0c\x42\x02\x18\x01\x12\x1a\n\x0etarget_vectors\x18\x07 \x03(\tB\x02\x18\x01\x12.\n\tnear_text\x18\x08 \x01(\x0b\x32\x1b.weaviate.v1.NearTextSearch\x12,\n\x0bnear_vector\x18\t \x01(\x0b\x32\x17.weaviate.v1.NearVector\x12%\n\x07targets\x18\n \x01(\x0b\x32\x14.weaviate.v1.Targets\x12\x45\n\x14\x62m25_search_operator\x18\x0b \x01(\x0b\x32\".weaviate.v1.SearchOperatorOptionsH\x01\x88\x01\x01\x12\x18\n\x0b\x61lpha_param\x18\x0c \x01(\x02H\x02\x88\x01\x01\x12\x17\n\x0fuse_alpha_param\x18\r \x01(\x08\x12.\n\tselection\x18\x0e \x01(\x0b\x32\x16.weaviate.v1.SelectionH\x03\x88\x01\x01\x12\x19\n\x0fvector_distance\x18\x14 \x01(\x02H\x00\x12%\n\x07vectors\x18\x15 \x03(\x0b\x32\x14.weaviate.v1.Vectors\"a\n\nFusionType\x12\x1b\n\x17\x46USION_TYPE_UNSPECIFIED\x10\x00\x12\x16\n\x12\x46USION_TYPE_RANKED\x10\x01\x12\x1e\n\x1a\x46USION_TYPE_RELATIVE_SCORE\x10\x02\x42\x0b\n\tthresholdB\x17\n\x15_bm25_search_operatorB\x0e\n\x0c_alpha_paramB\x0c\n\n_selection\"\xeb\x03\n\nNearVector\x12\x12\n\x06vector\x18\x01 \x03(\x02\x42\x02\x18\x01\x12\x16\n\tcertainty\x18\x02 \x01(\x01H\x00\x88\x01\x01\x12\x15\n\x08\x64istance\x18\x03 \x01(\x01H\x01\x88\x01\x01\x12\x18\n\x0cvector_bytes\x18\x04 \x01(\x0c\x42\x02\x18\x01\x12\x1a\n\x0etarget_vectors\x18\x05 \x03(\tB\x02\x18\x01\x12%\n\x07targets\x18\x06 \x01(\x0b\x32\x14.weaviate.v1.Targets\x12K\n\x11vector_per_target\x18\x07 \x03(\x0b\x32,.weaviate.v1.NearVector.VectorPerTargetEntryB\x02\x18\x01\x12\x38\n\x12vector_for_targets\x18\x08 \x03(\x0b\x32\x1c.weaviate.v1.VectorForTarget\x12%\n\x07vectors\x18\t \x03(\x0b\x32\x14.weaviate.v1.Vectors\x12.\n\tselection\x18\n \x01(\x0b\x32\x16.weaviate.v1.SelectionH\x02\x88\x01\x01\x1a\x36\n\x14VectorPerTargetEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\x0c:\x02\x38\x01\x42\x0c\n\n_certaintyB\x0b\n\t_distanceB\x0c\n\n_selection\"\xe3\x01\n\nNearObject\x12\n\n\x02id\x18\x01 \x01(\t\x12\x16\n\tcertainty\x18\x02 \x01(\x01H\x00\x88\x01\x01\x12\x15\n\x08\x64istance\x18\x03 \x01(\x01H\x01\x88\x01\x01\x12\x1a\n\x0etarget_vectors\x18\x04 \x03(\tB\x02\x18\x01\x12%\n\x07targets\x18\x05 \x01(\x0b\x32\x14.weaviate.v1.Targets\x12.\n\tselection\x18\x06 \x01(\x0b\x32\x16.weaviate.v1.SelectionH\x02\x88\x01\x01\x42\x0c\n\n_certaintyB\x0b\n\t_distanceB\x0c\n\n_selection\"\xae\x03\n\x0eNearTextSearch\x12\r\n\x05query\x18\x01 \x03(\t\x12\x16\n\tcertainty\x18\x02 \x01(\x01H\x00\x88\x01\x01\x12\x15\n\x08\x64istance\x18\x03 \x01(\x01H\x01\x88\x01\x01\x12\x36\n\x07move_to\x18\x04 \x01(\x0b\x32 .weaviate.v1.NearTextSearch.MoveH\x02\x88\x01\x01\x12\x38\n\tmove_away\x18\x05 \x01(\x0b\x32 .weaviate.v1.NearTextSearch.MoveH\x03\x88\x01\x01\x12\x1a\n\x0etarget_vectors\x18\x06 \x03(\tB\x02\x18\x01\x12%\n\x07targets\x18\x07 \x01(\x0b\x32\x14.weaviate.v1.Targets\x12.\n\tselection\x18\x08 \x01(\x0b\x32\x16.weaviate.v1.SelectionH\x04\x88\x01\x01\x1a\x36\n\x04Move\x12\r\n\x05\x66orce\x18\x01 \x01(\x02\x12\x10\n\x08\x63oncepts\x18\x02 \x03(\t\x12\r\n\x05uuids\x18\x03 \x03(\tB\x0c\n\n_certaintyB\x0b\n\t_distanceB\n\n\x08_move_toB\x0c\n\n_move_awayB\x0c\n\n_selection\"\xeb\x01\n\x0fNearImageSearch\x12\r\n\x05image\x18\x01 \x01(\t\x12\x16\n\tcertainty\x18\x02 \x01(\x01H\x00\x88\x01\x01\x12\x15\n\x08\x64istance\x18\x03 \x01(\x01H\x01\x88\x01\x01\x12\x1a\n\x0etarget_vectors\x18\x04 \x03(\tB\x02\x18\x01\x12%\n\x07targets\x18\x05 \x01(\x0b\x32\x14.weaviate.v1.Targets\x12.\n\tselection\x18\x06 \x01(\x0b\x32\x16.weaviate.v1.SelectionH\x02\x88\x01\x01\x42\x0c\n\n_certaintyB\x0b\n\t_distanceB\x0c\n\n_selection\"\xeb\x01\n\x0fNearAudioSearch\x12\r\n\x05\x61udio\x18\x01 \x01(\t\x12\x16\n\tcertainty\x18\x02 \x01(\x01H\x00\x88\x01\x01\x12\x15\n\x08\x64istance\x18\x03 \x01(\x01H\x01\x88\x01\x01\x12\x1a\n\x0etarget_vectors\x18\x04 \x03(\tB\x02\x18\x01\x12%\n\x07targets\x18\x05 \x01(\x0b\x32\x14.weaviate.v1.Targets\x12.\n\tselection\x18\x06 \x01(\x0b\x32\x16.weaviate.v1.SelectionH\x02\x88\x01\x01\x42\x0c\n\n_certaintyB\x0b\n\t_distanceB\x0c\n\n_selection\"\xeb\x01\n\x0fNearVideoSearch\x12\r\n\x05video\x18\x01 \x01(\t\x12\x16\n\tcertainty\x18\x02 \x01(\x01H\x00\x88\x01\x01\x12\x15\n\x08\x64istance\x18\x03 \x01(\x01H\x01\x88\x01\x01\x12\x1a\n\x0etarget_vectors\x18\x04 \x03(\tB\x02\x18\x01\x12%\n\x07targets\x18\x05 \x01(\x0b\x32\x14.weaviate.v1.Targets\x12.\n\tselection\x18\x06 \x01(\x0b\x32\x16.weaviate.v1.SelectionH\x02\x88\x01\x01\x42\x0c\n\n_certaintyB\x0b\n\t_distanceB\x0c\n\n_selection\"\xeb\x01\n\x0fNearDepthSearch\x12\r\n\x05\x64\x65pth\x18\x01 \x01(\t\x12\x16\n\tcertainty\x18\x02 \x01(\x01H\x00\x88\x01\x01\x12\x15\n\x08\x64istance\x18\x03 \x01(\x01H\x01\x88\x01\x01\x12\x1a\n\x0etarget_vectors\x18\x04 \x03(\tB\x02\x18\x01\x12%\n\x07targets\x18\x05 \x01(\x0b\x32\x14.weaviate.v1.Targets\x12.\n\tselection\x18\x06 \x01(\x0b\x32\x16.weaviate.v1.SelectionH\x02\x88\x01\x01\x42\x0c\n\n_certaintyB\x0b\n\t_distanceB\x0c\n\n_selection\"\xef\x01\n\x11NearThermalSearch\x12\x0f\n\x07thermal\x18\x01 \x01(\t\x12\x16\n\tcertainty\x18\x02 \x01(\x01H\x00\x88\x01\x01\x12\x15\n\x08\x64istance\x18\x03 \x01(\x01H\x01\x88\x01\x01\x12\x1a\n\x0etarget_vectors\x18\x04 \x03(\tB\x02\x18\x01\x12%\n\x07targets\x18\x05 \x01(\x0b\x32\x14.weaviate.v1.Targets\x12.\n\tselection\x18\x06 \x01(\x0b\x32\x16.weaviate.v1.SelectionH\x02\x88\x01\x01\x42\x0c\n\n_certaintyB\x0b\n\t_distanceB\x0c\n\n_selection\"\xe7\x01\n\rNearIMUSearch\x12\x0b\n\x03imu\x18\x01 \x01(\t\x12\x16\n\tcertainty\x18\x02 \x01(\x01H\x00\x88\x01\x01\x12\x15\n\x08\x64istance\x18\x03 \x01(\x01H\x01\x88\x01\x01\x12\x1a\n\x0etarget_vectors\x18\x04 \x03(\tB\x02\x18\x01\x12%\n\x07targets\x18\x05 \x01(\x0b\x32\x14.weaviate.v1.Targets\x12.\n\tselection\x18\x06 \x01(\x0b\x32\x16.weaviate.v1.SelectionH\x02\x88\x01\x01\x42\x0c\n\n_certaintyB\x0b\n\t_distanceB\x0c\n\n_selection\"\x7f\n\x04\x42M25\x12\r\n\x05query\x18\x01 \x01(\t\x12\x12\n\nproperties\x18\x02 \x03(\t\x12@\n\x0fsearch_operator\x18\x03 \x01(\x0b\x32\".weaviate.v1.SearchOperatorOptionsH\x00\x88\x01\x01\x42\x12\n\x10_search_operator*\xee\x01\n\x11\x43ombinationMethod\x12\"\n\x1e\x43OMBINATION_METHOD_UNSPECIFIED\x10\x00\x12\x1f\n\x1b\x43OMBINATION_METHOD_TYPE_SUM\x10\x01\x12\x1f\n\x1b\x43OMBINATION_METHOD_TYPE_MIN\x10\x02\x12#\n\x1f\x43OMBINATION_METHOD_TYPE_AVERAGE\x10\x03\x12*\n&COMBINATION_METHOD_TYPE_RELATIVE_SCORE\x10\x04\x12\"\n\x1e\x43OMBINATION_METHOD_TYPE_MANUAL\x10\x05\x42t\n#io.weaviate.client.grpc.protocol.v1B\x17WeaviateProtoBaseSearchZ4github.com/weaviate/weaviate/grpc/generated;protocolb\x06proto3')
+
+_globals = globals()
+_builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, _globals)
+_builder.BuildTopDescriptorsAndMessages(DESCRIPTOR, 'v1.base_search_pb2', _globals)
+if not _descriptor._USE_C_DESCRIPTORS:
+ _globals['DESCRIPTOR']._loaded_options = None
+ _globals['DESCRIPTOR']._serialized_options = b'\n#io.weaviate.client.grpc.protocol.v1B\027WeaviateProtoBaseSearchZ4github.com/weaviate/weaviate/grpc/generated;protocol'
+ _globals['_VECTORFORTARGET'].fields_by_name['vector_bytes']._loaded_options = None
+ _globals['_VECTORFORTARGET'].fields_by_name['vector_bytes']._serialized_options = b'\030\001'
+ _globals['_HYBRID'].fields_by_name['vector']._loaded_options = None
+ _globals['_HYBRID'].fields_by_name['vector']._serialized_options = b'\030\001'
+ _globals['_HYBRID'].fields_by_name['alpha']._loaded_options = None
+ _globals['_HYBRID'].fields_by_name['alpha']._serialized_options = b'\030\001'
+ _globals['_HYBRID'].fields_by_name['vector_bytes']._loaded_options = None
+ _globals['_HYBRID'].fields_by_name['vector_bytes']._serialized_options = b'\030\001'
+ _globals['_HYBRID'].fields_by_name['target_vectors']._loaded_options = None
+ _globals['_HYBRID'].fields_by_name['target_vectors']._serialized_options = b'\030\001'
+ _globals['_NEARVECTOR_VECTORPERTARGETENTRY']._loaded_options = None
+ _globals['_NEARVECTOR_VECTORPERTARGETENTRY']._serialized_options = b'8\001'
+ _globals['_NEARVECTOR'].fields_by_name['vector']._loaded_options = None
+ _globals['_NEARVECTOR'].fields_by_name['vector']._serialized_options = b'\030\001'
+ _globals['_NEARVECTOR'].fields_by_name['vector_bytes']._loaded_options = None
+ _globals['_NEARVECTOR'].fields_by_name['vector_bytes']._serialized_options = b'\030\001'
+ _globals['_NEARVECTOR'].fields_by_name['target_vectors']._loaded_options = None
+ _globals['_NEARVECTOR'].fields_by_name['target_vectors']._serialized_options = b'\030\001'
+ _globals['_NEARVECTOR'].fields_by_name['vector_per_target']._loaded_options = None
+ _globals['_NEARVECTOR'].fields_by_name['vector_per_target']._serialized_options = b'\030\001'
+ _globals['_NEAROBJECT'].fields_by_name['target_vectors']._loaded_options = None
+ _globals['_NEAROBJECT'].fields_by_name['target_vectors']._serialized_options = b'\030\001'
+ _globals['_NEARTEXTSEARCH'].fields_by_name['target_vectors']._loaded_options = None
+ _globals['_NEARTEXTSEARCH'].fields_by_name['target_vectors']._serialized_options = b'\030\001'
+ _globals['_NEARIMAGESEARCH'].fields_by_name['target_vectors']._loaded_options = None
+ _globals['_NEARIMAGESEARCH'].fields_by_name['target_vectors']._serialized_options = b'\030\001'
+ _globals['_NEARAUDIOSEARCH'].fields_by_name['target_vectors']._loaded_options = None
+ _globals['_NEARAUDIOSEARCH'].fields_by_name['target_vectors']._serialized_options = b'\030\001'
+ _globals['_NEARVIDEOSEARCH'].fields_by_name['target_vectors']._loaded_options = None
+ _globals['_NEARVIDEOSEARCH'].fields_by_name['target_vectors']._serialized_options = b'\030\001'
+ _globals['_NEARDEPTHSEARCH'].fields_by_name['target_vectors']._loaded_options = None
+ _globals['_NEARDEPTHSEARCH'].fields_by_name['target_vectors']._serialized_options = b'\030\001'
+ _globals['_NEARTHERMALSEARCH'].fields_by_name['target_vectors']._loaded_options = None
+ _globals['_NEARTHERMALSEARCH'].fields_by_name['target_vectors']._serialized_options = b'\030\001'
+ _globals['_NEARIMUSEARCH'].fields_by_name['target_vectors']._loaded_options = None
+ _globals['_NEARIMUSEARCH'].fields_by_name['target_vectors']._serialized_options = b'\030\001'
+ _globals['_COMBINATIONMETHOD']._serialized_start=4193
+ _globals['_COMBINATIONMETHOD']._serialized_end=4431
+ _globals['_WEIGHTSFORTARGET']._serialized_start=52
+ _globals['_WEIGHTSFORTARGET']._serialized_end=102
+ _globals['_TARGETS']._serialized_start=105
+ _globals['_TARGETS']._serialized_end=257
+ _globals['_VECTORFORTARGET']._serialized_start=259
+ _globals['_VECTORFORTARGET']._serialized_end=355
+ _globals['_SELECTION']._serialized_start=358
+ _globals['_SELECTION']._serialized_end=496
+ _globals['_SELECTION_MMR']._serialized_start=414
+ _globals['_SELECTION_MMR']._serialized_end=483
+ _globals['_SEARCHOPERATOROPTIONS']._serialized_start=499
+ _globals['_SEARCHOPERATOROPTIONS']._serialized_end=748
+ _globals['_SEARCHOPERATOROPTIONS_OPERATOR']._serialized_start=625
+ _globals['_SEARCHOPERATOROPTIONS_OPERATOR']._serialized_end=720
+ _globals['_HYBRID']._serialized_start=751
+ _globals['_HYBRID']._serialized_end=1476
+ _globals['_HYBRID_FUSIONTYPE']._serialized_start=1311
+ _globals['_HYBRID_FUSIONTYPE']._serialized_end=1408
+ _globals['_NEARVECTOR']._serialized_start=1479
+ _globals['_NEARVECTOR']._serialized_end=1970
+ _globals['_NEARVECTOR_VECTORPERTARGETENTRY']._serialized_start=1875
+ _globals['_NEARVECTOR_VECTORPERTARGETENTRY']._serialized_end=1929
+ _globals['_NEAROBJECT']._serialized_start=1973
+ _globals['_NEAROBJECT']._serialized_end=2200
+ _globals['_NEARTEXTSEARCH']._serialized_start=2203
+ _globals['_NEARTEXTSEARCH']._serialized_end=2633
+ _globals['_NEARTEXTSEARCH_MOVE']._serialized_start=2512
+ _globals['_NEARTEXTSEARCH_MOVE']._serialized_end=2566
+ _globals['_NEARIMAGESEARCH']._serialized_start=2636
+ _globals['_NEARIMAGESEARCH']._serialized_end=2871
+ _globals['_NEARAUDIOSEARCH']._serialized_start=2874
+ _globals['_NEARAUDIOSEARCH']._serialized_end=3109
+ _globals['_NEARVIDEOSEARCH']._serialized_start=3112
+ _globals['_NEARVIDEOSEARCH']._serialized_end=3347
+ _globals['_NEARDEPTHSEARCH']._serialized_start=3350
+ _globals['_NEARDEPTHSEARCH']._serialized_end=3585
+ _globals['_NEARTHERMALSEARCH']._serialized_start=3588
+ _globals['_NEARTHERMALSEARCH']._serialized_end=3827
+ _globals['_NEARIMUSEARCH']._serialized_start=3830
+ _globals['_NEARIMUSEARCH']._serialized_end=4061
+ _globals['_BM25']._serialized_start=4063
+ _globals['_BM25']._serialized_end=4190
+# @@protoc_insertion_point(module_scope)
diff --git a/weaviate/proto/v1/v7351/v1/base_search_pb2.pyi b/weaviate/proto/v1/v7351/v1/base_search_pb2.pyi
new file mode 100644
index 000000000..ad83886d5
--- /dev/null
+++ b/weaviate/proto/v1/v7351/v1/base_search_pb2.pyi
@@ -0,0 +1,309 @@
+from weaviate.proto.v1.v7351.v1 import base_pb2 as _base_pb2
+from google.protobuf.internal import containers as _containers
+from google.protobuf.internal import enum_type_wrapper as _enum_type_wrapper
+from google.protobuf import descriptor as _descriptor
+from google.protobuf import message as _message
+from collections.abc import Iterable as _Iterable, Mapping as _Mapping
+from typing import ClassVar as _ClassVar, Optional as _Optional, Union as _Union
+
+DESCRIPTOR: _descriptor.FileDescriptor
+
+class CombinationMethod(int, metaclass=_enum_type_wrapper.EnumTypeWrapper):
+ __slots__ = ()
+ COMBINATION_METHOD_UNSPECIFIED: _ClassVar[CombinationMethod]
+ COMBINATION_METHOD_TYPE_SUM: _ClassVar[CombinationMethod]
+ COMBINATION_METHOD_TYPE_MIN: _ClassVar[CombinationMethod]
+ COMBINATION_METHOD_TYPE_AVERAGE: _ClassVar[CombinationMethod]
+ COMBINATION_METHOD_TYPE_RELATIVE_SCORE: _ClassVar[CombinationMethod]
+ COMBINATION_METHOD_TYPE_MANUAL: _ClassVar[CombinationMethod]
+COMBINATION_METHOD_UNSPECIFIED: CombinationMethod
+COMBINATION_METHOD_TYPE_SUM: CombinationMethod
+COMBINATION_METHOD_TYPE_MIN: CombinationMethod
+COMBINATION_METHOD_TYPE_AVERAGE: CombinationMethod
+COMBINATION_METHOD_TYPE_RELATIVE_SCORE: CombinationMethod
+COMBINATION_METHOD_TYPE_MANUAL: CombinationMethod
+
+class WeightsForTarget(_message.Message):
+ __slots__ = ("target", "weight")
+ TARGET_FIELD_NUMBER: _ClassVar[int]
+ WEIGHT_FIELD_NUMBER: _ClassVar[int]
+ target: str
+ weight: float
+ def __init__(self, target: _Optional[str] = ..., weight: _Optional[float] = ...) -> None: ...
+
+class Targets(_message.Message):
+ __slots__ = ("target_vectors", "combination", "weights_for_targets")
+ TARGET_VECTORS_FIELD_NUMBER: _ClassVar[int]
+ COMBINATION_FIELD_NUMBER: _ClassVar[int]
+ WEIGHTS_FOR_TARGETS_FIELD_NUMBER: _ClassVar[int]
+ target_vectors: _containers.RepeatedScalarFieldContainer[str]
+ combination: CombinationMethod
+ weights_for_targets: _containers.RepeatedCompositeFieldContainer[WeightsForTarget]
+ def __init__(self, target_vectors: _Optional[_Iterable[str]] = ..., combination: _Optional[_Union[CombinationMethod, str]] = ..., weights_for_targets: _Optional[_Iterable[_Union[WeightsForTarget, _Mapping]]] = ...) -> None: ...
+
+class VectorForTarget(_message.Message):
+ __slots__ = ("name", "vector_bytes", "vectors")
+ NAME_FIELD_NUMBER: _ClassVar[int]
+ VECTOR_BYTES_FIELD_NUMBER: _ClassVar[int]
+ VECTORS_FIELD_NUMBER: _ClassVar[int]
+ name: str
+ vector_bytes: bytes
+ vectors: _containers.RepeatedCompositeFieldContainer[_base_pb2.Vectors]
+ def __init__(self, name: _Optional[str] = ..., vector_bytes: _Optional[bytes] = ..., vectors: _Optional[_Iterable[_Union[_base_pb2.Vectors, _Mapping]]] = ...) -> None: ...
+
+class Selection(_message.Message):
+ __slots__ = ("mmr",)
+ class MMR(_message.Message):
+ __slots__ = ("limit", "balance")
+ LIMIT_FIELD_NUMBER: _ClassVar[int]
+ BALANCE_FIELD_NUMBER: _ClassVar[int]
+ limit: int
+ balance: float
+ def __init__(self, limit: _Optional[int] = ..., balance: _Optional[float] = ...) -> None: ...
+ MMR_FIELD_NUMBER: _ClassVar[int]
+ mmr: Selection.MMR
+ def __init__(self, mmr: _Optional[_Union[Selection.MMR, _Mapping]] = ...) -> None: ...
+
+class SearchOperatorOptions(_message.Message):
+ __slots__ = ("operator", "minimum_or_tokens_match")
+ class Operator(int, metaclass=_enum_type_wrapper.EnumTypeWrapper):
+ __slots__ = ()
+ OPERATOR_UNSPECIFIED: _ClassVar[SearchOperatorOptions.Operator]
+ OPERATOR_OR: _ClassVar[SearchOperatorOptions.Operator]
+ OPERATOR_AND: _ClassVar[SearchOperatorOptions.Operator]
+ OPERATOR_AND_CROSS: _ClassVar[SearchOperatorOptions.Operator]
+ OPERATOR_UNSPECIFIED: SearchOperatorOptions.Operator
+ OPERATOR_OR: SearchOperatorOptions.Operator
+ OPERATOR_AND: SearchOperatorOptions.Operator
+ OPERATOR_AND_CROSS: SearchOperatorOptions.Operator
+ OPERATOR_FIELD_NUMBER: _ClassVar[int]
+ MINIMUM_OR_TOKENS_MATCH_FIELD_NUMBER: _ClassVar[int]
+ operator: SearchOperatorOptions.Operator
+ minimum_or_tokens_match: int
+ def __init__(self, operator: _Optional[_Union[SearchOperatorOptions.Operator, str]] = ..., minimum_or_tokens_match: _Optional[int] = ...) -> None: ...
+
+class Hybrid(_message.Message):
+ __slots__ = ("query", "properties", "vector", "alpha", "fusion_type", "vector_bytes", "target_vectors", "near_text", "near_vector", "targets", "bm25_search_operator", "alpha_param", "use_alpha_param", "selection", "vector_distance", "vectors")
+ class FusionType(int, metaclass=_enum_type_wrapper.EnumTypeWrapper):
+ __slots__ = ()
+ FUSION_TYPE_UNSPECIFIED: _ClassVar[Hybrid.FusionType]
+ FUSION_TYPE_RANKED: _ClassVar[Hybrid.FusionType]
+ FUSION_TYPE_RELATIVE_SCORE: _ClassVar[Hybrid.FusionType]
+ FUSION_TYPE_UNSPECIFIED: Hybrid.FusionType
+ FUSION_TYPE_RANKED: Hybrid.FusionType
+ FUSION_TYPE_RELATIVE_SCORE: Hybrid.FusionType
+ QUERY_FIELD_NUMBER: _ClassVar[int]
+ PROPERTIES_FIELD_NUMBER: _ClassVar[int]
+ VECTOR_FIELD_NUMBER: _ClassVar[int]
+ ALPHA_FIELD_NUMBER: _ClassVar[int]
+ FUSION_TYPE_FIELD_NUMBER: _ClassVar[int]
+ VECTOR_BYTES_FIELD_NUMBER: _ClassVar[int]
+ TARGET_VECTORS_FIELD_NUMBER: _ClassVar[int]
+ NEAR_TEXT_FIELD_NUMBER: _ClassVar[int]
+ NEAR_VECTOR_FIELD_NUMBER: _ClassVar[int]
+ TARGETS_FIELD_NUMBER: _ClassVar[int]
+ BM25_SEARCH_OPERATOR_FIELD_NUMBER: _ClassVar[int]
+ ALPHA_PARAM_FIELD_NUMBER: _ClassVar[int]
+ USE_ALPHA_PARAM_FIELD_NUMBER: _ClassVar[int]
+ SELECTION_FIELD_NUMBER: _ClassVar[int]
+ VECTOR_DISTANCE_FIELD_NUMBER: _ClassVar[int]
+ VECTORS_FIELD_NUMBER: _ClassVar[int]
+ query: str
+ properties: _containers.RepeatedScalarFieldContainer[str]
+ vector: _containers.RepeatedScalarFieldContainer[float]
+ alpha: float
+ fusion_type: Hybrid.FusionType
+ vector_bytes: bytes
+ target_vectors: _containers.RepeatedScalarFieldContainer[str]
+ near_text: NearTextSearch
+ near_vector: NearVector
+ targets: Targets
+ bm25_search_operator: SearchOperatorOptions
+ alpha_param: float
+ use_alpha_param: bool
+ selection: Selection
+ vector_distance: float
+ vectors: _containers.RepeatedCompositeFieldContainer[_base_pb2.Vectors]
+ def __init__(self, query: _Optional[str] = ..., properties: _Optional[_Iterable[str]] = ..., vector: _Optional[_Iterable[float]] = ..., alpha: _Optional[float] = ..., fusion_type: _Optional[_Union[Hybrid.FusionType, str]] = ..., vector_bytes: _Optional[bytes] = ..., target_vectors: _Optional[_Iterable[str]] = ..., near_text: _Optional[_Union[NearTextSearch, _Mapping]] = ..., near_vector: _Optional[_Union[NearVector, _Mapping]] = ..., targets: _Optional[_Union[Targets, _Mapping]] = ..., bm25_search_operator: _Optional[_Union[SearchOperatorOptions, _Mapping]] = ..., alpha_param: _Optional[float] = ..., use_alpha_param: _Optional[bool] = ..., selection: _Optional[_Union[Selection, _Mapping]] = ..., vector_distance: _Optional[float] = ..., vectors: _Optional[_Iterable[_Union[_base_pb2.Vectors, _Mapping]]] = ...) -> None: ...
+
+class NearVector(_message.Message):
+ __slots__ = ("vector", "certainty", "distance", "vector_bytes", "target_vectors", "targets", "vector_per_target", "vector_for_targets", "vectors", "selection")
+ class VectorPerTargetEntry(_message.Message):
+ __slots__ = ("key", "value")
+ KEY_FIELD_NUMBER: _ClassVar[int]
+ VALUE_FIELD_NUMBER: _ClassVar[int]
+ key: str
+ value: bytes
+ def __init__(self, key: _Optional[str] = ..., value: _Optional[bytes] = ...) -> None: ...
+ VECTOR_FIELD_NUMBER: _ClassVar[int]
+ CERTAINTY_FIELD_NUMBER: _ClassVar[int]
+ DISTANCE_FIELD_NUMBER: _ClassVar[int]
+ VECTOR_BYTES_FIELD_NUMBER: _ClassVar[int]
+ TARGET_VECTORS_FIELD_NUMBER: _ClassVar[int]
+ TARGETS_FIELD_NUMBER: _ClassVar[int]
+ VECTOR_PER_TARGET_FIELD_NUMBER: _ClassVar[int]
+ VECTOR_FOR_TARGETS_FIELD_NUMBER: _ClassVar[int]
+ VECTORS_FIELD_NUMBER: _ClassVar[int]
+ SELECTION_FIELD_NUMBER: _ClassVar[int]
+ vector: _containers.RepeatedScalarFieldContainer[float]
+ certainty: float
+ distance: float
+ vector_bytes: bytes
+ target_vectors: _containers.RepeatedScalarFieldContainer[str]
+ targets: Targets
+ vector_per_target: _containers.ScalarMap[str, bytes]
+ vector_for_targets: _containers.RepeatedCompositeFieldContainer[VectorForTarget]
+ vectors: _containers.RepeatedCompositeFieldContainer[_base_pb2.Vectors]
+ selection: Selection
+ def __init__(self, vector: _Optional[_Iterable[float]] = ..., certainty: _Optional[float] = ..., distance: _Optional[float] = ..., vector_bytes: _Optional[bytes] = ..., target_vectors: _Optional[_Iterable[str]] = ..., targets: _Optional[_Union[Targets, _Mapping]] = ..., vector_per_target: _Optional[_Mapping[str, bytes]] = ..., vector_for_targets: _Optional[_Iterable[_Union[VectorForTarget, _Mapping]]] = ..., vectors: _Optional[_Iterable[_Union[_base_pb2.Vectors, _Mapping]]] = ..., selection: _Optional[_Union[Selection, _Mapping]] = ...) -> None: ...
+
+class NearObject(_message.Message):
+ __slots__ = ("id", "certainty", "distance", "target_vectors", "targets", "selection")
+ ID_FIELD_NUMBER: _ClassVar[int]
+ CERTAINTY_FIELD_NUMBER: _ClassVar[int]
+ DISTANCE_FIELD_NUMBER: _ClassVar[int]
+ TARGET_VECTORS_FIELD_NUMBER: _ClassVar[int]
+ TARGETS_FIELD_NUMBER: _ClassVar[int]
+ SELECTION_FIELD_NUMBER: _ClassVar[int]
+ id: str
+ certainty: float
+ distance: float
+ target_vectors: _containers.RepeatedScalarFieldContainer[str]
+ targets: Targets
+ selection: Selection
+ def __init__(self, id: _Optional[str] = ..., certainty: _Optional[float] = ..., distance: _Optional[float] = ..., target_vectors: _Optional[_Iterable[str]] = ..., targets: _Optional[_Union[Targets, _Mapping]] = ..., selection: _Optional[_Union[Selection, _Mapping]] = ...) -> None: ...
+
+class NearTextSearch(_message.Message):
+ __slots__ = ("query", "certainty", "distance", "move_to", "move_away", "target_vectors", "targets", "selection")
+ class Move(_message.Message):
+ __slots__ = ("force", "concepts", "uuids")
+ FORCE_FIELD_NUMBER: _ClassVar[int]
+ CONCEPTS_FIELD_NUMBER: _ClassVar[int]
+ UUIDS_FIELD_NUMBER: _ClassVar[int]
+ force: float
+ concepts: _containers.RepeatedScalarFieldContainer[str]
+ uuids: _containers.RepeatedScalarFieldContainer[str]
+ def __init__(self, force: _Optional[float] = ..., concepts: _Optional[_Iterable[str]] = ..., uuids: _Optional[_Iterable[str]] = ...) -> None: ...
+ QUERY_FIELD_NUMBER: _ClassVar[int]
+ CERTAINTY_FIELD_NUMBER: _ClassVar[int]
+ DISTANCE_FIELD_NUMBER: _ClassVar[int]
+ MOVE_TO_FIELD_NUMBER: _ClassVar[int]
+ MOVE_AWAY_FIELD_NUMBER: _ClassVar[int]
+ TARGET_VECTORS_FIELD_NUMBER: _ClassVar[int]
+ TARGETS_FIELD_NUMBER: _ClassVar[int]
+ SELECTION_FIELD_NUMBER: _ClassVar[int]
+ query: _containers.RepeatedScalarFieldContainer[str]
+ certainty: float
+ distance: float
+ move_to: NearTextSearch.Move
+ move_away: NearTextSearch.Move
+ target_vectors: _containers.RepeatedScalarFieldContainer[str]
+ targets: Targets
+ selection: Selection
+ def __init__(self, query: _Optional[_Iterable[str]] = ..., certainty: _Optional[float] = ..., distance: _Optional[float] = ..., move_to: _Optional[_Union[NearTextSearch.Move, _Mapping]] = ..., move_away: _Optional[_Union[NearTextSearch.Move, _Mapping]] = ..., target_vectors: _Optional[_Iterable[str]] = ..., targets: _Optional[_Union[Targets, _Mapping]] = ..., selection: _Optional[_Union[Selection, _Mapping]] = ...) -> None: ...
+
+class NearImageSearch(_message.Message):
+ __slots__ = ("image", "certainty", "distance", "target_vectors", "targets", "selection")
+ IMAGE_FIELD_NUMBER: _ClassVar[int]
+ CERTAINTY_FIELD_NUMBER: _ClassVar[int]
+ DISTANCE_FIELD_NUMBER: _ClassVar[int]
+ TARGET_VECTORS_FIELD_NUMBER: _ClassVar[int]
+ TARGETS_FIELD_NUMBER: _ClassVar[int]
+ SELECTION_FIELD_NUMBER: _ClassVar[int]
+ image: str
+ certainty: float
+ distance: float
+ target_vectors: _containers.RepeatedScalarFieldContainer[str]
+ targets: Targets
+ selection: Selection
+ def __init__(self, image: _Optional[str] = ..., certainty: _Optional[float] = ..., distance: _Optional[float] = ..., target_vectors: _Optional[_Iterable[str]] = ..., targets: _Optional[_Union[Targets, _Mapping]] = ..., selection: _Optional[_Union[Selection, _Mapping]] = ...) -> None: ...
+
+class NearAudioSearch(_message.Message):
+ __slots__ = ("audio", "certainty", "distance", "target_vectors", "targets", "selection")
+ AUDIO_FIELD_NUMBER: _ClassVar[int]
+ CERTAINTY_FIELD_NUMBER: _ClassVar[int]
+ DISTANCE_FIELD_NUMBER: _ClassVar[int]
+ TARGET_VECTORS_FIELD_NUMBER: _ClassVar[int]
+ TARGETS_FIELD_NUMBER: _ClassVar[int]
+ SELECTION_FIELD_NUMBER: _ClassVar[int]
+ audio: str
+ certainty: float
+ distance: float
+ target_vectors: _containers.RepeatedScalarFieldContainer[str]
+ targets: Targets
+ selection: Selection
+ def __init__(self, audio: _Optional[str] = ..., certainty: _Optional[float] = ..., distance: _Optional[float] = ..., target_vectors: _Optional[_Iterable[str]] = ..., targets: _Optional[_Union[Targets, _Mapping]] = ..., selection: _Optional[_Union[Selection, _Mapping]] = ...) -> None: ...
+
+class NearVideoSearch(_message.Message):
+ __slots__ = ("video", "certainty", "distance", "target_vectors", "targets", "selection")
+ VIDEO_FIELD_NUMBER: _ClassVar[int]
+ CERTAINTY_FIELD_NUMBER: _ClassVar[int]
+ DISTANCE_FIELD_NUMBER: _ClassVar[int]
+ TARGET_VECTORS_FIELD_NUMBER: _ClassVar[int]
+ TARGETS_FIELD_NUMBER: _ClassVar[int]
+ SELECTION_FIELD_NUMBER: _ClassVar[int]
+ video: str
+ certainty: float
+ distance: float
+ target_vectors: _containers.RepeatedScalarFieldContainer[str]
+ targets: Targets
+ selection: Selection
+ def __init__(self, video: _Optional[str] = ..., certainty: _Optional[float] = ..., distance: _Optional[float] = ..., target_vectors: _Optional[_Iterable[str]] = ..., targets: _Optional[_Union[Targets, _Mapping]] = ..., selection: _Optional[_Union[Selection, _Mapping]] = ...) -> None: ...
+
+class NearDepthSearch(_message.Message):
+ __slots__ = ("depth", "certainty", "distance", "target_vectors", "targets", "selection")
+ DEPTH_FIELD_NUMBER: _ClassVar[int]
+ CERTAINTY_FIELD_NUMBER: _ClassVar[int]
+ DISTANCE_FIELD_NUMBER: _ClassVar[int]
+ TARGET_VECTORS_FIELD_NUMBER: _ClassVar[int]
+ TARGETS_FIELD_NUMBER: _ClassVar[int]
+ SELECTION_FIELD_NUMBER: _ClassVar[int]
+ depth: str
+ certainty: float
+ distance: float
+ target_vectors: _containers.RepeatedScalarFieldContainer[str]
+ targets: Targets
+ selection: Selection
+ def __init__(self, depth: _Optional[str] = ..., certainty: _Optional[float] = ..., distance: _Optional[float] = ..., target_vectors: _Optional[_Iterable[str]] = ..., targets: _Optional[_Union[Targets, _Mapping]] = ..., selection: _Optional[_Union[Selection, _Mapping]] = ...) -> None: ...
+
+class NearThermalSearch(_message.Message):
+ __slots__ = ("thermal", "certainty", "distance", "target_vectors", "targets", "selection")
+ THERMAL_FIELD_NUMBER: _ClassVar[int]
+ CERTAINTY_FIELD_NUMBER: _ClassVar[int]
+ DISTANCE_FIELD_NUMBER: _ClassVar[int]
+ TARGET_VECTORS_FIELD_NUMBER: _ClassVar[int]
+ TARGETS_FIELD_NUMBER: _ClassVar[int]
+ SELECTION_FIELD_NUMBER: _ClassVar[int]
+ thermal: str
+ certainty: float
+ distance: float
+ target_vectors: _containers.RepeatedScalarFieldContainer[str]
+ targets: Targets
+ selection: Selection
+ def __init__(self, thermal: _Optional[str] = ..., certainty: _Optional[float] = ..., distance: _Optional[float] = ..., target_vectors: _Optional[_Iterable[str]] = ..., targets: _Optional[_Union[Targets, _Mapping]] = ..., selection: _Optional[_Union[Selection, _Mapping]] = ...) -> None: ...
+
+class NearIMUSearch(_message.Message):
+ __slots__ = ("imu", "certainty", "distance", "target_vectors", "targets", "selection")
+ IMU_FIELD_NUMBER: _ClassVar[int]
+ CERTAINTY_FIELD_NUMBER: _ClassVar[int]
+ DISTANCE_FIELD_NUMBER: _ClassVar[int]
+ TARGET_VECTORS_FIELD_NUMBER: _ClassVar[int]
+ TARGETS_FIELD_NUMBER: _ClassVar[int]
+ SELECTION_FIELD_NUMBER: _ClassVar[int]
+ imu: str
+ certainty: float
+ distance: float
+ target_vectors: _containers.RepeatedScalarFieldContainer[str]
+ targets: Targets
+ selection: Selection
+ def __init__(self, imu: _Optional[str] = ..., certainty: _Optional[float] = ..., distance: _Optional[float] = ..., target_vectors: _Optional[_Iterable[str]] = ..., targets: _Optional[_Union[Targets, _Mapping]] = ..., selection: _Optional[_Union[Selection, _Mapping]] = ...) -> None: ...
+
+class BM25(_message.Message):
+ __slots__ = ("query", "properties", "search_operator")
+ QUERY_FIELD_NUMBER: _ClassVar[int]
+ PROPERTIES_FIELD_NUMBER: _ClassVar[int]
+ SEARCH_OPERATOR_FIELD_NUMBER: _ClassVar[int]
+ query: str
+ properties: _containers.RepeatedScalarFieldContainer[str]
+ search_operator: SearchOperatorOptions
+ def __init__(self, query: _Optional[str] = ..., properties: _Optional[_Iterable[str]] = ..., search_operator: _Optional[_Union[SearchOperatorOptions, _Mapping]] = ...) -> None: ...
diff --git a/weaviate/proto/v1/v7351/v1/base_search_pb2_grpc.py b/weaviate/proto/v1/v7351/v1/base_search_pb2_grpc.py
new file mode 100644
index 000000000..50426f3ef
--- /dev/null
+++ b/weaviate/proto/v1/v7351/v1/base_search_pb2_grpc.py
@@ -0,0 +1,24 @@
+# Generated by the gRPC Python protocol compiler plugin. DO NOT EDIT!
+"""Client and server classes corresponding to protobuf-defined services."""
+import grpc
+import warnings
+
+
+GRPC_GENERATED_VERSION = '1.83.0'
+GRPC_VERSION = grpc.__version__
+_version_not_supported = False
+
+try:
+ from grpc._utilities import first_version_is_lower
+ _version_not_supported = first_version_is_lower(GRPC_VERSION, GRPC_GENERATED_VERSION)
+except ImportError:
+ _version_not_supported = True
+
+if _version_not_supported:
+ raise RuntimeError(
+ f'The grpc package installed is at version {GRPC_VERSION},'
+ + ' but the generated code in v1/base_search_pb2_grpc.py depends on'
+ + f' grpcio>={GRPC_GENERATED_VERSION}.'
+ + f' Please upgrade your grpc module to grpcio>={GRPC_GENERATED_VERSION}'
+ + f' or downgrade your generated code using grpcio-tools<={GRPC_VERSION}.'
+ )
diff --git a/weaviate/proto/v1/v7351/v1/batch_delete_pb2.py b/weaviate/proto/v1/v7351/v1/batch_delete_pb2.py
new file mode 100644
index 000000000..b9423aae7
--- /dev/null
+++ b/weaviate/proto/v1/v7351/v1/batch_delete_pb2.py
@@ -0,0 +1,42 @@
+# -*- coding: utf-8 -*-
+# Generated by the protocol buffer compiler. DO NOT EDIT!
+# NO CHECKED-IN PROTOBUF GENCODE
+# source: v1/batch_delete.proto
+# Protobuf Python Version: 7.35.1
+"""Generated protocol buffer code."""
+from google.protobuf import descriptor as _descriptor
+from google.protobuf import descriptor_pool as _descriptor_pool
+from google.protobuf import runtime_version as _runtime_version
+from google.protobuf import symbol_database as _symbol_database
+from google.protobuf.internal import builder as _builder
+_runtime_version.ValidateProtobufRuntimeVersion(
+ _runtime_version.Domain.PUBLIC,
+ 7,
+ 35,
+ 1,
+ '',
+ 'v1/batch_delete.proto'
+)
+# @@protoc_insertion_point(imports)
+
+_sym_db = _symbol_database.Default()
+
+
+from weaviate.proto.v1.v7351.v1 import base_pb2 as v1_dot_base__pb2
+
+
+DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n\x15v1/batch_delete.proto\x12\x0bweaviate.v1\x1a\rv1/base.proto\"\xe6\x01\n\x12\x42\x61tchDeleteRequest\x12\x12\n\ncollection\x18\x01 \x01(\t\x12%\n\x07\x66ilters\x18\x02 \x01(\x0b\x32\x14.weaviate.v1.Filters\x12\x0f\n\x07verbose\x18\x03 \x01(\x08\x12\x0f\n\x07\x64ry_run\x18\x04 \x01(\x08\x12=\n\x11\x63onsistency_level\x18\x05 \x01(\x0e\x32\x1d.weaviate.v1.ConsistencyLevelH\x00\x88\x01\x01\x12\x13\n\x06tenant\x18\x06 \x01(\tH\x01\x88\x01\x01\x42\x14\n\x12_consistency_levelB\t\n\x07_tenant\"\x86\x01\n\x10\x42\x61tchDeleteReply\x12\x0c\n\x04took\x18\x01 \x01(\x02\x12\x0e\n\x06\x66\x61iled\x18\x02 \x01(\x03\x12\x0f\n\x07matches\x18\x03 \x01(\x03\x12\x12\n\nsuccessful\x18\x04 \x01(\x03\x12/\n\x07objects\x18\x05 \x03(\x0b\x32\x1e.weaviate.v1.BatchDeleteObject\"S\n\x11\x42\x61tchDeleteObject\x12\x0c\n\x04uuid\x18\x01 \x01(\x0c\x12\x12\n\nsuccessful\x18\x02 \x01(\x08\x12\x12\n\x05\x65rror\x18\x03 \x01(\tH\x00\x88\x01\x01\x42\x08\n\x06_errorBu\n#io.weaviate.client.grpc.protocol.v1B\x18WeaviateProtoBatchDeleteZ4github.com/weaviate/weaviate/grpc/generated;protocolb\x06proto3')
+
+_globals = globals()
+_builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, _globals)
+_builder.BuildTopDescriptorsAndMessages(DESCRIPTOR, 'v1.batch_delete_pb2', _globals)
+if not _descriptor._USE_C_DESCRIPTORS:
+ _globals['DESCRIPTOR']._loaded_options = None
+ _globals['DESCRIPTOR']._serialized_options = b'\n#io.weaviate.client.grpc.protocol.v1B\030WeaviateProtoBatchDeleteZ4github.com/weaviate/weaviate/grpc/generated;protocol'
+ _globals['_BATCHDELETEREQUEST']._serialized_start=54
+ _globals['_BATCHDELETEREQUEST']._serialized_end=284
+ _globals['_BATCHDELETEREPLY']._serialized_start=287
+ _globals['_BATCHDELETEREPLY']._serialized_end=421
+ _globals['_BATCHDELETEOBJECT']._serialized_start=423
+ _globals['_BATCHDELETEOBJECT']._serialized_end=506
+# @@protoc_insertion_point(module_scope)
diff --git a/weaviate/proto/v1/v7351/v1/batch_delete_pb2.pyi b/weaviate/proto/v1/v7351/v1/batch_delete_pb2.pyi
new file mode 100644
index 000000000..1cd297e0c
--- /dev/null
+++ b/weaviate/proto/v1/v7351/v1/batch_delete_pb2.pyi
@@ -0,0 +1,48 @@
+from weaviate.proto.v1.v7351.v1 import base_pb2 as _base_pb2
+from google.protobuf.internal import containers as _containers
+from google.protobuf import descriptor as _descriptor
+from google.protobuf import message as _message
+from collections.abc import Iterable as _Iterable, Mapping as _Mapping
+from typing import ClassVar as _ClassVar, Optional as _Optional, Union as _Union
+
+DESCRIPTOR: _descriptor.FileDescriptor
+
+class BatchDeleteRequest(_message.Message):
+ __slots__ = ("collection", "filters", "verbose", "dry_run", "consistency_level", "tenant")
+ COLLECTION_FIELD_NUMBER: _ClassVar[int]
+ FILTERS_FIELD_NUMBER: _ClassVar[int]
+ VERBOSE_FIELD_NUMBER: _ClassVar[int]
+ DRY_RUN_FIELD_NUMBER: _ClassVar[int]
+ CONSISTENCY_LEVEL_FIELD_NUMBER: _ClassVar[int]
+ TENANT_FIELD_NUMBER: _ClassVar[int]
+ collection: str
+ filters: _base_pb2.Filters
+ verbose: bool
+ dry_run: bool
+ consistency_level: _base_pb2.ConsistencyLevel
+ tenant: str
+ def __init__(self, collection: _Optional[str] = ..., filters: _Optional[_Union[_base_pb2.Filters, _Mapping]] = ..., verbose: _Optional[bool] = ..., dry_run: _Optional[bool] = ..., consistency_level: _Optional[_Union[_base_pb2.ConsistencyLevel, str]] = ..., tenant: _Optional[str] = ...) -> None: ...
+
+class BatchDeleteReply(_message.Message):
+ __slots__ = ("took", "failed", "matches", "successful", "objects")
+ TOOK_FIELD_NUMBER: _ClassVar[int]
+ FAILED_FIELD_NUMBER: _ClassVar[int]
+ MATCHES_FIELD_NUMBER: _ClassVar[int]
+ SUCCESSFUL_FIELD_NUMBER: _ClassVar[int]
+ OBJECTS_FIELD_NUMBER: _ClassVar[int]
+ took: float
+ failed: int
+ matches: int
+ successful: int
+ objects: _containers.RepeatedCompositeFieldContainer[BatchDeleteObject]
+ def __init__(self, took: _Optional[float] = ..., failed: _Optional[int] = ..., matches: _Optional[int] = ..., successful: _Optional[int] = ..., objects: _Optional[_Iterable[_Union[BatchDeleteObject, _Mapping]]] = ...) -> None: ...
+
+class BatchDeleteObject(_message.Message):
+ __slots__ = ("uuid", "successful", "error")
+ UUID_FIELD_NUMBER: _ClassVar[int]
+ SUCCESSFUL_FIELD_NUMBER: _ClassVar[int]
+ ERROR_FIELD_NUMBER: _ClassVar[int]
+ uuid: bytes
+ successful: bool
+ error: str
+ def __init__(self, uuid: _Optional[bytes] = ..., successful: _Optional[bool] = ..., error: _Optional[str] = ...) -> None: ...
diff --git a/weaviate/proto/v1/v7351/v1/batch_delete_pb2_grpc.py b/weaviate/proto/v1/v7351/v1/batch_delete_pb2_grpc.py
new file mode 100644
index 000000000..58453b67a
--- /dev/null
+++ b/weaviate/proto/v1/v7351/v1/batch_delete_pb2_grpc.py
@@ -0,0 +1,24 @@
+# Generated by the gRPC Python protocol compiler plugin. DO NOT EDIT!
+"""Client and server classes corresponding to protobuf-defined services."""
+import grpc
+import warnings
+
+
+GRPC_GENERATED_VERSION = '1.83.0'
+GRPC_VERSION = grpc.__version__
+_version_not_supported = False
+
+try:
+ from grpc._utilities import first_version_is_lower
+ _version_not_supported = first_version_is_lower(GRPC_VERSION, GRPC_GENERATED_VERSION)
+except ImportError:
+ _version_not_supported = True
+
+if _version_not_supported:
+ raise RuntimeError(
+ f'The grpc package installed is at version {GRPC_VERSION},'
+ + ' but the generated code in v1/batch_delete_pb2_grpc.py depends on'
+ + f' grpcio>={GRPC_GENERATED_VERSION}.'
+ + f' Please upgrade your grpc module to grpcio>={GRPC_GENERATED_VERSION}'
+ + f' or downgrade your generated code using grpcio-tools<={GRPC_VERSION}.'
+ )
diff --git a/weaviate/proto/v1/v7351/v1/batch_pb2.py b/weaviate/proto/v1/v7351/v1/batch_pb2.py
new file mode 100644
index 000000000..b9348e6ee
--- /dev/null
+++ b/weaviate/proto/v1/v7351/v1/batch_pb2.py
@@ -0,0 +1,91 @@
+# -*- coding: utf-8 -*-
+# Generated by the protocol buffer compiler. DO NOT EDIT!
+# NO CHECKED-IN PROTOBUF GENCODE
+# source: v1/batch.proto
+# Protobuf Python Version: 7.35.1
+"""Generated protocol buffer code."""
+from google.protobuf import descriptor as _descriptor
+from google.protobuf import descriptor_pool as _descriptor_pool
+from google.protobuf import runtime_version as _runtime_version
+from google.protobuf import symbol_database as _symbol_database
+from google.protobuf.internal import builder as _builder
+_runtime_version.ValidateProtobufRuntimeVersion(
+ _runtime_version.Domain.PUBLIC,
+ 7,
+ 35,
+ 1,
+ '',
+ 'v1/batch.proto'
+)
+# @@protoc_insertion_point(imports)
+
+_sym_db = _symbol_database.Default()
+
+
+from google.protobuf import struct_pb2 as google_dot_protobuf_dot_struct__pb2
+from weaviate.proto.v1.v7351.v1 import base_pb2 as v1_dot_base__pb2
+
+
+DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n\x0ev1/batch.proto\x12\x0bweaviate.v1\x1a\x1cgoogle/protobuf/struct.proto\x1a\rv1/base.proto\"\x95\x01\n\x13\x42\x61tchObjectsRequest\x12)\n\x07objects\x18\x01 \x03(\x0b\x32\x18.weaviate.v1.BatchObject\x12=\n\x11\x63onsistency_level\x18\x02 \x01(\x0e\x32\x1d.weaviate.v1.ConsistencyLevelH\x00\x88\x01\x01\x42\x14\n\x12_consistency_level\"\x9e\x01\n\x16\x42\x61tchReferencesRequest\x12/\n\nreferences\x18\x01 \x03(\x0b\x32\x1b.weaviate.v1.BatchReference\x12=\n\x11\x63onsistency_level\x18\x02 \x01(\x0e\x32\x1d.weaviate.v1.ConsistencyLevelH\x00\x88\x01\x01\x42\x14\n\x12_consistency_level\"\xa6\x04\n\x12\x42\x61tchStreamRequest\x12\x36\n\x05start\x18\x01 \x01(\x0b\x32%.weaviate.v1.BatchStreamRequest.StartH\x00\x12\x34\n\x04\x64\x61ta\x18\x02 \x01(\x0b\x32$.weaviate.v1.BatchStreamRequest.DataH\x00\x12\x34\n\x04stop\x18\x03 \x01(\x0b\x32$.weaviate.v1.BatchStreamRequest.StopH\x00\x1a\\\n\x05Start\x12=\n\x11\x63onsistency_level\x18\x01 \x01(\x0e\x32\x1d.weaviate.v1.ConsistencyLevelH\x00\x88\x01\x01\x42\x14\n\x12_consistency_level\x1a\x06\n\x04Stop\x1a\xfa\x01\n\x04\x44\x61ta\x12=\n\x07objects\x18\x01 \x01(\x0b\x32,.weaviate.v1.BatchStreamRequest.Data.Objects\x12\x43\n\nreferences\x18\x02 \x01(\x0b\x32/.weaviate.v1.BatchStreamRequest.Data.References\x1a\x33\n\x07Objects\x12(\n\x06values\x18\x01 \x03(\x0b\x32\x18.weaviate.v1.BatchObject\x1a\x39\n\nReferences\x12+\n\x06values\x18\x01 \x03(\x0b\x32\x1b.weaviate.v1.BatchReferenceB\t\n\x07message\"\xc2\x06\n\x10\x42\x61tchStreamReply\x12\x38\n\x07results\x18\x01 \x01(\x0b\x32%.weaviate.v1.BatchStreamReply.ResultsH\x00\x12\x43\n\rshutting_down\x18\x02 \x01(\x0b\x32*.weaviate.v1.BatchStreamReply.ShuttingDownH\x00\x12\x38\n\x07started\x18\x04 \x01(\x0b\x32%.weaviate.v1.BatchStreamReply.StartedH\x00\x12\x38\n\x07\x62\x61\x63koff\x18\x05 \x01(\x0b\x32%.weaviate.v1.BatchStreamReply.BackoffH\x00\x12\x32\n\x04\x61\x63ks\x18\x06 \x01(\x0b\x32\".weaviate.v1.BatchStreamReply.AcksH\x00\x12\x42\n\rout_of_memory\x18\x07 \x01(\x0b\x32).weaviate.v1.BatchStreamReply.OutOfMemoryH\x00\x1a\t\n\x07Started\x1a\x0e\n\x0cShuttingDown\x1a@\n\x0bOutOfMemory\x12\r\n\x05uuids\x18\x01 \x03(\t\x12\x0f\n\x07\x62\x65\x61\x63ons\x18\x02 \x03(\t\x12\x11\n\twait_time\x18\x03 \x01(\x05\x1a\x1d\n\x07\x42\x61\x63koff\x12\x12\n\nbatch_size\x18\x01 \x01(\x05\x1a&\n\x04\x41\x63ks\x12\r\n\x05uuids\x18\x01 \x03(\t\x12\x0f\n\x07\x62\x65\x61\x63ons\x18\x02 \x03(\t\x1a\x83\x02\n\x07Results\x12;\n\x06\x65rrors\x18\x01 \x03(\x0b\x32+.weaviate.v1.BatchStreamReply.Results.Error\x12@\n\tsuccesses\x18\x02 \x03(\x0b\x32-.weaviate.v1.BatchStreamReply.Results.Success\x1a\x42\n\x05\x45rror\x12\r\n\x05\x65rror\x18\x01 \x01(\t\x12\x0e\n\x04uuid\x18\x02 \x01(\tH\x00\x12\x10\n\x06\x62\x65\x61\x63on\x18\x03 \x01(\tH\x00\x42\x08\n\x06\x64\x65tail\x1a\x35\n\x07Success\x12\x0e\n\x04uuid\x18\x02 \x01(\tH\x00\x12\x10\n\x06\x62\x65\x61\x63on\x18\x03 \x01(\tH\x00\x42\x08\n\x06\x64\x65tailB\t\n\x07messageJ\x04\x08\x03\x10\x04R\x08shutdown\"\xde\x07\n\x0b\x42\x61tchObject\x12\x0c\n\x04uuid\x18\x01 \x01(\t\x12\x12\n\x06vector\x18\x02 \x03(\x02\x42\x02\x18\x01\x12\x37\n\nproperties\x18\x03 \x01(\x0b\x32#.weaviate.v1.BatchObject.Properties\x12\x12\n\ncollection\x18\x04 \x01(\t\x12\x0e\n\x06tenant\x18\x05 \x01(\t\x12\x14\n\x0cvector_bytes\x18\x06 \x01(\x0c\x12%\n\x07vectors\x18\x17 \x03(\x0b\x32\x14.weaviate.v1.Vectors\x1a\x84\x05\n\nProperties\x12\x33\n\x12non_ref_properties\x18\x01 \x01(\x0b\x32\x17.google.protobuf.Struct\x12N\n\x17single_target_ref_props\x18\x02 \x03(\x0b\x32-.weaviate.v1.BatchObject.SingleTargetRefProps\x12L\n\x16multi_target_ref_props\x18\x03 \x03(\x0b\x32,.weaviate.v1.BatchObject.MultiTargetRefProps\x12\x43\n\x17number_array_properties\x18\x04 \x03(\x0b\x32\".weaviate.v1.NumberArrayProperties\x12=\n\x14int_array_properties\x18\x05 \x03(\x0b\x32\x1f.weaviate.v1.IntArrayProperties\x12?\n\x15text_array_properties\x18\x06 \x03(\x0b\x32 .weaviate.v1.TextArrayProperties\x12\x45\n\x18\x62oolean_array_properties\x18\x07 \x03(\x0b\x32#.weaviate.v1.BooleanArrayProperties\x12\x38\n\x11object_properties\x18\x08 \x03(\x0b\x32\x1d.weaviate.v1.ObjectProperties\x12\x43\n\x17object_array_properties\x18\t \x03(\x0b\x32\".weaviate.v1.ObjectArrayProperties\x12\x18\n\x10\x65mpty_list_props\x18\n \x03(\t\x1a\x38\n\x14SingleTargetRefProps\x12\r\n\x05uuids\x18\x01 \x03(\t\x12\x11\n\tprop_name\x18\x02 \x01(\t\x1aR\n\x13MultiTargetRefProps\x12\r\n\x05uuids\x18\x01 \x03(\t\x12\x11\n\tprop_name\x18\x02 \x01(\t\x12\x19\n\x11target_collection\x18\x03 \x01(\t\"\x99\x01\n\x0e\x42\x61tchReference\x12\x0c\n\x04name\x18\x01 \x01(\t\x12\x17\n\x0f\x66rom_collection\x18\x02 \x01(\t\x12\x11\n\tfrom_uuid\x18\x03 \x01(\t\x12\x1a\n\rto_collection\x18\x04 \x01(\tH\x00\x88\x01\x01\x12\x0f\n\x07to_uuid\x18\x05 \x01(\t\x12\x0e\n\x06tenant\x18\x06 \x01(\tB\x10\n\x0e_to_collection\"\x88\x01\n\x11\x42\x61tchObjectsReply\x12\x0c\n\x04took\x18\x01 \x01(\x02\x12\x39\n\x06\x65rrors\x18\x02 \x03(\x0b\x32).weaviate.v1.BatchObjectsReply.BatchError\x1a*\n\nBatchError\x12\r\n\x05index\x18\x01 \x01(\x05\x12\r\n\x05\x65rror\x18\x02 \x01(\t\"\x8e\x01\n\x14\x42\x61tchReferencesReply\x12\x0c\n\x04took\x18\x01 \x01(\x02\x12<\n\x06\x65rrors\x18\x02 \x03(\x0b\x32,.weaviate.v1.BatchReferencesReply.BatchError\x1a*\n\nBatchError\x12\r\n\x05index\x18\x01 \x01(\x05\x12\r\n\x05\x65rror\x18\x02 \x01(\tBo\n#io.weaviate.client.grpc.protocol.v1B\x12WeaviateProtoBatchZ4github.com/weaviate/weaviate/grpc/generated;protocolb\x06proto3')
+
+_globals = globals()
+_builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, _globals)
+_builder.BuildTopDescriptorsAndMessages(DESCRIPTOR, 'v1.batch_pb2', _globals)
+if not _descriptor._USE_C_DESCRIPTORS:
+ _globals['DESCRIPTOR']._loaded_options = None
+ _globals['DESCRIPTOR']._serialized_options = b'\n#io.weaviate.client.grpc.protocol.v1B\022WeaviateProtoBatchZ4github.com/weaviate/weaviate/grpc/generated;protocol'
+ _globals['_BATCHOBJECT'].fields_by_name['vector']._loaded_options = None
+ _globals['_BATCHOBJECT'].fields_by_name['vector']._serialized_options = b'\030\001'
+ _globals['_BATCHOBJECTSREQUEST']._serialized_start=77
+ _globals['_BATCHOBJECTSREQUEST']._serialized_end=226
+ _globals['_BATCHREFERENCESREQUEST']._serialized_start=229
+ _globals['_BATCHREFERENCESREQUEST']._serialized_end=387
+ _globals['_BATCHSTREAMREQUEST']._serialized_start=390
+ _globals['_BATCHSTREAMREQUEST']._serialized_end=940
+ _globals['_BATCHSTREAMREQUEST_START']._serialized_start=576
+ _globals['_BATCHSTREAMREQUEST_START']._serialized_end=668
+ _globals['_BATCHSTREAMREQUEST_STOP']._serialized_start=670
+ _globals['_BATCHSTREAMREQUEST_STOP']._serialized_end=676
+ _globals['_BATCHSTREAMREQUEST_DATA']._serialized_start=679
+ _globals['_BATCHSTREAMREQUEST_DATA']._serialized_end=929
+ _globals['_BATCHSTREAMREQUEST_DATA_OBJECTS']._serialized_start=819
+ _globals['_BATCHSTREAMREQUEST_DATA_OBJECTS']._serialized_end=870
+ _globals['_BATCHSTREAMREQUEST_DATA_REFERENCES']._serialized_start=872
+ _globals['_BATCHSTREAMREQUEST_DATA_REFERENCES']._serialized_end=929
+ _globals['_BATCHSTREAMREPLY']._serialized_start=943
+ _globals['_BATCHSTREAMREPLY']._serialized_end=1777
+ _globals['_BATCHSTREAMREPLY_STARTED']._serialized_start=1326
+ _globals['_BATCHSTREAMREPLY_STARTED']._serialized_end=1335
+ _globals['_BATCHSTREAMREPLY_SHUTTINGDOWN']._serialized_start=1337
+ _globals['_BATCHSTREAMREPLY_SHUTTINGDOWN']._serialized_end=1351
+ _globals['_BATCHSTREAMREPLY_OUTOFMEMORY']._serialized_start=1353
+ _globals['_BATCHSTREAMREPLY_OUTOFMEMORY']._serialized_end=1417
+ _globals['_BATCHSTREAMREPLY_BACKOFF']._serialized_start=1419
+ _globals['_BATCHSTREAMREPLY_BACKOFF']._serialized_end=1448
+ _globals['_BATCHSTREAMREPLY_ACKS']._serialized_start=1450
+ _globals['_BATCHSTREAMREPLY_ACKS']._serialized_end=1488
+ _globals['_BATCHSTREAMREPLY_RESULTS']._serialized_start=1491
+ _globals['_BATCHSTREAMREPLY_RESULTS']._serialized_end=1750
+ _globals['_BATCHSTREAMREPLY_RESULTS_ERROR']._serialized_start=1629
+ _globals['_BATCHSTREAMREPLY_RESULTS_ERROR']._serialized_end=1695
+ _globals['_BATCHSTREAMREPLY_RESULTS_SUCCESS']._serialized_start=1697
+ _globals['_BATCHSTREAMREPLY_RESULTS_SUCCESS']._serialized_end=1750
+ _globals['_BATCHOBJECT']._serialized_start=1780
+ _globals['_BATCHOBJECT']._serialized_end=2770
+ _globals['_BATCHOBJECT_PROPERTIES']._serialized_start=1984
+ _globals['_BATCHOBJECT_PROPERTIES']._serialized_end=2628
+ _globals['_BATCHOBJECT_SINGLETARGETREFPROPS']._serialized_start=2630
+ _globals['_BATCHOBJECT_SINGLETARGETREFPROPS']._serialized_end=2686
+ _globals['_BATCHOBJECT_MULTITARGETREFPROPS']._serialized_start=2688
+ _globals['_BATCHOBJECT_MULTITARGETREFPROPS']._serialized_end=2770
+ _globals['_BATCHREFERENCE']._serialized_start=2773
+ _globals['_BATCHREFERENCE']._serialized_end=2926
+ _globals['_BATCHOBJECTSREPLY']._serialized_start=2929
+ _globals['_BATCHOBJECTSREPLY']._serialized_end=3065
+ _globals['_BATCHOBJECTSREPLY_BATCHERROR']._serialized_start=3023
+ _globals['_BATCHOBJECTSREPLY_BATCHERROR']._serialized_end=3065
+ _globals['_BATCHREFERENCESREPLY']._serialized_start=3068
+ _globals['_BATCHREFERENCESREPLY']._serialized_end=3210
+ _globals['_BATCHREFERENCESREPLY_BATCHERROR']._serialized_start=3023
+ _globals['_BATCHREFERENCESREPLY_BATCHERROR']._serialized_end=3065
+# @@protoc_insertion_point(module_scope)
diff --git a/weaviate/proto/v1/v7351/v1/batch_pb2.pyi b/weaviate/proto/v1/v7351/v1/batch_pb2.pyi
new file mode 100644
index 000000000..da615b007
--- /dev/null
+++ b/weaviate/proto/v1/v7351/v1/batch_pb2.pyi
@@ -0,0 +1,229 @@
+from google.protobuf import struct_pb2 as _struct_pb2
+from weaviate.proto.v1.v7351.v1 import base_pb2 as _base_pb2
+from google.protobuf.internal import containers as _containers
+from google.protobuf import descriptor as _descriptor
+from google.protobuf import message as _message
+from collections.abc import Iterable as _Iterable, Mapping as _Mapping
+from typing import ClassVar as _ClassVar, Optional as _Optional, Union as _Union
+
+DESCRIPTOR: _descriptor.FileDescriptor
+
+class BatchObjectsRequest(_message.Message):
+ __slots__ = ("objects", "consistency_level")
+ OBJECTS_FIELD_NUMBER: _ClassVar[int]
+ CONSISTENCY_LEVEL_FIELD_NUMBER: _ClassVar[int]
+ objects: _containers.RepeatedCompositeFieldContainer[BatchObject]
+ consistency_level: _base_pb2.ConsistencyLevel
+ def __init__(self, objects: _Optional[_Iterable[_Union[BatchObject, _Mapping]]] = ..., consistency_level: _Optional[_Union[_base_pb2.ConsistencyLevel, str]] = ...) -> None: ...
+
+class BatchReferencesRequest(_message.Message):
+ __slots__ = ("references", "consistency_level")
+ REFERENCES_FIELD_NUMBER: _ClassVar[int]
+ CONSISTENCY_LEVEL_FIELD_NUMBER: _ClassVar[int]
+ references: _containers.RepeatedCompositeFieldContainer[BatchReference]
+ consistency_level: _base_pb2.ConsistencyLevel
+ def __init__(self, references: _Optional[_Iterable[_Union[BatchReference, _Mapping]]] = ..., consistency_level: _Optional[_Union[_base_pb2.ConsistencyLevel, str]] = ...) -> None: ...
+
+class BatchStreamRequest(_message.Message):
+ __slots__ = ("start", "data", "stop")
+ class Start(_message.Message):
+ __slots__ = ("consistency_level",)
+ CONSISTENCY_LEVEL_FIELD_NUMBER: _ClassVar[int]
+ consistency_level: _base_pb2.ConsistencyLevel
+ def __init__(self, consistency_level: _Optional[_Union[_base_pb2.ConsistencyLevel, str]] = ...) -> None: ...
+ class Stop(_message.Message):
+ __slots__ = ()
+ def __init__(self) -> None: ...
+ class Data(_message.Message):
+ __slots__ = ("objects", "references")
+ class Objects(_message.Message):
+ __slots__ = ("values",)
+ VALUES_FIELD_NUMBER: _ClassVar[int]
+ values: _containers.RepeatedCompositeFieldContainer[BatchObject]
+ def __init__(self, values: _Optional[_Iterable[_Union[BatchObject, _Mapping]]] = ...) -> None: ...
+ class References(_message.Message):
+ __slots__ = ("values",)
+ VALUES_FIELD_NUMBER: _ClassVar[int]
+ values: _containers.RepeatedCompositeFieldContainer[BatchReference]
+ def __init__(self, values: _Optional[_Iterable[_Union[BatchReference, _Mapping]]] = ...) -> None: ...
+ OBJECTS_FIELD_NUMBER: _ClassVar[int]
+ REFERENCES_FIELD_NUMBER: _ClassVar[int]
+ objects: BatchStreamRequest.Data.Objects
+ references: BatchStreamRequest.Data.References
+ def __init__(self, objects: _Optional[_Union[BatchStreamRequest.Data.Objects, _Mapping]] = ..., references: _Optional[_Union[BatchStreamRequest.Data.References, _Mapping]] = ...) -> None: ...
+ START_FIELD_NUMBER: _ClassVar[int]
+ DATA_FIELD_NUMBER: _ClassVar[int]
+ STOP_FIELD_NUMBER: _ClassVar[int]
+ start: BatchStreamRequest.Start
+ data: BatchStreamRequest.Data
+ stop: BatchStreamRequest.Stop
+ def __init__(self, start: _Optional[_Union[BatchStreamRequest.Start, _Mapping]] = ..., data: _Optional[_Union[BatchStreamRequest.Data, _Mapping]] = ..., stop: _Optional[_Union[BatchStreamRequest.Stop, _Mapping]] = ...) -> None: ...
+
+class BatchStreamReply(_message.Message):
+ __slots__ = ("results", "shutting_down", "started", "backoff", "acks", "out_of_memory")
+ class Started(_message.Message):
+ __slots__ = ()
+ def __init__(self) -> None: ...
+ class ShuttingDown(_message.Message):
+ __slots__ = ()
+ def __init__(self) -> None: ...
+ class OutOfMemory(_message.Message):
+ __slots__ = ("uuids", "beacons", "wait_time")
+ UUIDS_FIELD_NUMBER: _ClassVar[int]
+ BEACONS_FIELD_NUMBER: _ClassVar[int]
+ WAIT_TIME_FIELD_NUMBER: _ClassVar[int]
+ uuids: _containers.RepeatedScalarFieldContainer[str]
+ beacons: _containers.RepeatedScalarFieldContainer[str]
+ wait_time: int
+ def __init__(self, uuids: _Optional[_Iterable[str]] = ..., beacons: _Optional[_Iterable[str]] = ..., wait_time: _Optional[int] = ...) -> None: ...
+ class Backoff(_message.Message):
+ __slots__ = ("batch_size",)
+ BATCH_SIZE_FIELD_NUMBER: _ClassVar[int]
+ batch_size: int
+ def __init__(self, batch_size: _Optional[int] = ...) -> None: ...
+ class Acks(_message.Message):
+ __slots__ = ("uuids", "beacons")
+ UUIDS_FIELD_NUMBER: _ClassVar[int]
+ BEACONS_FIELD_NUMBER: _ClassVar[int]
+ uuids: _containers.RepeatedScalarFieldContainer[str]
+ beacons: _containers.RepeatedScalarFieldContainer[str]
+ def __init__(self, uuids: _Optional[_Iterable[str]] = ..., beacons: _Optional[_Iterable[str]] = ...) -> None: ...
+ class Results(_message.Message):
+ __slots__ = ("errors", "successes")
+ class Error(_message.Message):
+ __slots__ = ("error", "uuid", "beacon")
+ ERROR_FIELD_NUMBER: _ClassVar[int]
+ UUID_FIELD_NUMBER: _ClassVar[int]
+ BEACON_FIELD_NUMBER: _ClassVar[int]
+ error: str
+ uuid: str
+ beacon: str
+ def __init__(self, error: _Optional[str] = ..., uuid: _Optional[str] = ..., beacon: _Optional[str] = ...) -> None: ...
+ class Success(_message.Message):
+ __slots__ = ("uuid", "beacon")
+ UUID_FIELD_NUMBER: _ClassVar[int]
+ BEACON_FIELD_NUMBER: _ClassVar[int]
+ uuid: str
+ beacon: str
+ def __init__(self, uuid: _Optional[str] = ..., beacon: _Optional[str] = ...) -> None: ...
+ ERRORS_FIELD_NUMBER: _ClassVar[int]
+ SUCCESSES_FIELD_NUMBER: _ClassVar[int]
+ errors: _containers.RepeatedCompositeFieldContainer[BatchStreamReply.Results.Error]
+ successes: _containers.RepeatedCompositeFieldContainer[BatchStreamReply.Results.Success]
+ def __init__(self, errors: _Optional[_Iterable[_Union[BatchStreamReply.Results.Error, _Mapping]]] = ..., successes: _Optional[_Iterable[_Union[BatchStreamReply.Results.Success, _Mapping]]] = ...) -> None: ...
+ RESULTS_FIELD_NUMBER: _ClassVar[int]
+ SHUTTING_DOWN_FIELD_NUMBER: _ClassVar[int]
+ STARTED_FIELD_NUMBER: _ClassVar[int]
+ BACKOFF_FIELD_NUMBER: _ClassVar[int]
+ ACKS_FIELD_NUMBER: _ClassVar[int]
+ OUT_OF_MEMORY_FIELD_NUMBER: _ClassVar[int]
+ results: BatchStreamReply.Results
+ shutting_down: BatchStreamReply.ShuttingDown
+ started: BatchStreamReply.Started
+ backoff: BatchStreamReply.Backoff
+ acks: BatchStreamReply.Acks
+ out_of_memory: BatchStreamReply.OutOfMemory
+ def __init__(self, results: _Optional[_Union[BatchStreamReply.Results, _Mapping]] = ..., shutting_down: _Optional[_Union[BatchStreamReply.ShuttingDown, _Mapping]] = ..., started: _Optional[_Union[BatchStreamReply.Started, _Mapping]] = ..., backoff: _Optional[_Union[BatchStreamReply.Backoff, _Mapping]] = ..., acks: _Optional[_Union[BatchStreamReply.Acks, _Mapping]] = ..., out_of_memory: _Optional[_Union[BatchStreamReply.OutOfMemory, _Mapping]] = ...) -> None: ...
+
+class BatchObject(_message.Message):
+ __slots__ = ("uuid", "vector", "properties", "collection", "tenant", "vector_bytes", "vectors")
+ class Properties(_message.Message):
+ __slots__ = ("non_ref_properties", "single_target_ref_props", "multi_target_ref_props", "number_array_properties", "int_array_properties", "text_array_properties", "boolean_array_properties", "object_properties", "object_array_properties", "empty_list_props")
+ NON_REF_PROPERTIES_FIELD_NUMBER: _ClassVar[int]
+ SINGLE_TARGET_REF_PROPS_FIELD_NUMBER: _ClassVar[int]
+ MULTI_TARGET_REF_PROPS_FIELD_NUMBER: _ClassVar[int]
+ NUMBER_ARRAY_PROPERTIES_FIELD_NUMBER: _ClassVar[int]
+ INT_ARRAY_PROPERTIES_FIELD_NUMBER: _ClassVar[int]
+ TEXT_ARRAY_PROPERTIES_FIELD_NUMBER: _ClassVar[int]
+ BOOLEAN_ARRAY_PROPERTIES_FIELD_NUMBER: _ClassVar[int]
+ OBJECT_PROPERTIES_FIELD_NUMBER: _ClassVar[int]
+ OBJECT_ARRAY_PROPERTIES_FIELD_NUMBER: _ClassVar[int]
+ EMPTY_LIST_PROPS_FIELD_NUMBER: _ClassVar[int]
+ non_ref_properties: _struct_pb2.Struct
+ single_target_ref_props: _containers.RepeatedCompositeFieldContainer[BatchObject.SingleTargetRefProps]
+ multi_target_ref_props: _containers.RepeatedCompositeFieldContainer[BatchObject.MultiTargetRefProps]
+ number_array_properties: _containers.RepeatedCompositeFieldContainer[_base_pb2.NumberArrayProperties]
+ int_array_properties: _containers.RepeatedCompositeFieldContainer[_base_pb2.IntArrayProperties]
+ text_array_properties: _containers.RepeatedCompositeFieldContainer[_base_pb2.TextArrayProperties]
+ boolean_array_properties: _containers.RepeatedCompositeFieldContainer[_base_pb2.BooleanArrayProperties]
+ object_properties: _containers.RepeatedCompositeFieldContainer[_base_pb2.ObjectProperties]
+ object_array_properties: _containers.RepeatedCompositeFieldContainer[_base_pb2.ObjectArrayProperties]
+ empty_list_props: _containers.RepeatedScalarFieldContainer[str]
+ def __init__(self, non_ref_properties: _Optional[_Union[_struct_pb2.Struct, _Mapping]] = ..., single_target_ref_props: _Optional[_Iterable[_Union[BatchObject.SingleTargetRefProps, _Mapping]]] = ..., multi_target_ref_props: _Optional[_Iterable[_Union[BatchObject.MultiTargetRefProps, _Mapping]]] = ..., number_array_properties: _Optional[_Iterable[_Union[_base_pb2.NumberArrayProperties, _Mapping]]] = ..., int_array_properties: _Optional[_Iterable[_Union[_base_pb2.IntArrayProperties, _Mapping]]] = ..., text_array_properties: _Optional[_Iterable[_Union[_base_pb2.TextArrayProperties, _Mapping]]] = ..., boolean_array_properties: _Optional[_Iterable[_Union[_base_pb2.BooleanArrayProperties, _Mapping]]] = ..., object_properties: _Optional[_Iterable[_Union[_base_pb2.ObjectProperties, _Mapping]]] = ..., object_array_properties: _Optional[_Iterable[_Union[_base_pb2.ObjectArrayProperties, _Mapping]]] = ..., empty_list_props: _Optional[_Iterable[str]] = ...) -> None: ...
+ class SingleTargetRefProps(_message.Message):
+ __slots__ = ("uuids", "prop_name")
+ UUIDS_FIELD_NUMBER: _ClassVar[int]
+ PROP_NAME_FIELD_NUMBER: _ClassVar[int]
+ uuids: _containers.RepeatedScalarFieldContainer[str]
+ prop_name: str
+ def __init__(self, uuids: _Optional[_Iterable[str]] = ..., prop_name: _Optional[str] = ...) -> None: ...
+ class MultiTargetRefProps(_message.Message):
+ __slots__ = ("uuids", "prop_name", "target_collection")
+ UUIDS_FIELD_NUMBER: _ClassVar[int]
+ PROP_NAME_FIELD_NUMBER: _ClassVar[int]
+ TARGET_COLLECTION_FIELD_NUMBER: _ClassVar[int]
+ uuids: _containers.RepeatedScalarFieldContainer[str]
+ prop_name: str
+ target_collection: str
+ def __init__(self, uuids: _Optional[_Iterable[str]] = ..., prop_name: _Optional[str] = ..., target_collection: _Optional[str] = ...) -> None: ...
+ UUID_FIELD_NUMBER: _ClassVar[int]
+ VECTOR_FIELD_NUMBER: _ClassVar[int]
+ PROPERTIES_FIELD_NUMBER: _ClassVar[int]
+ COLLECTION_FIELD_NUMBER: _ClassVar[int]
+ TENANT_FIELD_NUMBER: _ClassVar[int]
+ VECTOR_BYTES_FIELD_NUMBER: _ClassVar[int]
+ VECTORS_FIELD_NUMBER: _ClassVar[int]
+ uuid: str
+ vector: _containers.RepeatedScalarFieldContainer[float]
+ properties: BatchObject.Properties
+ collection: str
+ tenant: str
+ vector_bytes: bytes
+ vectors: _containers.RepeatedCompositeFieldContainer[_base_pb2.Vectors]
+ def __init__(self, uuid: _Optional[str] = ..., vector: _Optional[_Iterable[float]] = ..., properties: _Optional[_Union[BatchObject.Properties, _Mapping]] = ..., collection: _Optional[str] = ..., tenant: _Optional[str] = ..., vector_bytes: _Optional[bytes] = ..., vectors: _Optional[_Iterable[_Union[_base_pb2.Vectors, _Mapping]]] = ...) -> None: ...
+
+class BatchReference(_message.Message):
+ __slots__ = ("name", "from_collection", "from_uuid", "to_collection", "to_uuid", "tenant")
+ NAME_FIELD_NUMBER: _ClassVar[int]
+ FROM_COLLECTION_FIELD_NUMBER: _ClassVar[int]
+ FROM_UUID_FIELD_NUMBER: _ClassVar[int]
+ TO_COLLECTION_FIELD_NUMBER: _ClassVar[int]
+ TO_UUID_FIELD_NUMBER: _ClassVar[int]
+ TENANT_FIELD_NUMBER: _ClassVar[int]
+ name: str
+ from_collection: str
+ from_uuid: str
+ to_collection: str
+ to_uuid: str
+ tenant: str
+ def __init__(self, name: _Optional[str] = ..., from_collection: _Optional[str] = ..., from_uuid: _Optional[str] = ..., to_collection: _Optional[str] = ..., to_uuid: _Optional[str] = ..., tenant: _Optional[str] = ...) -> None: ...
+
+class BatchObjectsReply(_message.Message):
+ __slots__ = ("took", "errors")
+ class BatchError(_message.Message):
+ __slots__ = ("index", "error")
+ INDEX_FIELD_NUMBER: _ClassVar[int]
+ ERROR_FIELD_NUMBER: _ClassVar[int]
+ index: int
+ error: str
+ def __init__(self, index: _Optional[int] = ..., error: _Optional[str] = ...) -> None: ...
+ TOOK_FIELD_NUMBER: _ClassVar[int]
+ ERRORS_FIELD_NUMBER: _ClassVar[int]
+ took: float
+ errors: _containers.RepeatedCompositeFieldContainer[BatchObjectsReply.BatchError]
+ def __init__(self, took: _Optional[float] = ..., errors: _Optional[_Iterable[_Union[BatchObjectsReply.BatchError, _Mapping]]] = ...) -> None: ...
+
+class BatchReferencesReply(_message.Message):
+ __slots__ = ("took", "errors")
+ class BatchError(_message.Message):
+ __slots__ = ("index", "error")
+ INDEX_FIELD_NUMBER: _ClassVar[int]
+ ERROR_FIELD_NUMBER: _ClassVar[int]
+ index: int
+ error: str
+ def __init__(self, index: _Optional[int] = ..., error: _Optional[str] = ...) -> None: ...
+ TOOK_FIELD_NUMBER: _ClassVar[int]
+ ERRORS_FIELD_NUMBER: _ClassVar[int]
+ took: float
+ errors: _containers.RepeatedCompositeFieldContainer[BatchReferencesReply.BatchError]
+ def __init__(self, took: _Optional[float] = ..., errors: _Optional[_Iterable[_Union[BatchReferencesReply.BatchError, _Mapping]]] = ...) -> None: ...
diff --git a/weaviate/proto/v1/v7351/v1/batch_pb2_grpc.py b/weaviate/proto/v1/v7351/v1/batch_pb2_grpc.py
new file mode 100644
index 000000000..4c70a5020
--- /dev/null
+++ b/weaviate/proto/v1/v7351/v1/batch_pb2_grpc.py
@@ -0,0 +1,24 @@
+# Generated by the gRPC Python protocol compiler plugin. DO NOT EDIT!
+"""Client and server classes corresponding to protobuf-defined services."""
+import grpc
+import warnings
+
+
+GRPC_GENERATED_VERSION = '1.83.0'
+GRPC_VERSION = grpc.__version__
+_version_not_supported = False
+
+try:
+ from grpc._utilities import first_version_is_lower
+ _version_not_supported = first_version_is_lower(GRPC_VERSION, GRPC_GENERATED_VERSION)
+except ImportError:
+ _version_not_supported = True
+
+if _version_not_supported:
+ raise RuntimeError(
+ f'The grpc package installed is at version {GRPC_VERSION},'
+ + ' but the generated code in v1/batch_pb2_grpc.py depends on'
+ + f' grpcio>={GRPC_GENERATED_VERSION}.'
+ + f' Please upgrade your grpc module to grpcio>={GRPC_GENERATED_VERSION}'
+ + f' or downgrade your generated code using grpcio-tools<={GRPC_VERSION}.'
+ )
diff --git a/weaviate/proto/v1/v7351/v1/generative_pb2.py b/weaviate/proto/v1/v7351/v1/generative_pb2.py
new file mode 100644
index 000000000..5cd21a6ad
--- /dev/null
+++ b/weaviate/proto/v1/v7351/v1/generative_pb2.py
@@ -0,0 +1,164 @@
+# -*- coding: utf-8 -*-
+# Generated by the protocol buffer compiler. DO NOT EDIT!
+# NO CHECKED-IN PROTOBUF GENCODE
+# source: v1/generative.proto
+# Protobuf Python Version: 7.35.1
+"""Generated protocol buffer code."""
+from google.protobuf import descriptor as _descriptor
+from google.protobuf import descriptor_pool as _descriptor_pool
+from google.protobuf import runtime_version as _runtime_version
+from google.protobuf import symbol_database as _symbol_database
+from google.protobuf.internal import builder as _builder
+_runtime_version.ValidateProtobufRuntimeVersion(
+ _runtime_version.Domain.PUBLIC,
+ 7,
+ 35,
+ 1,
+ '',
+ 'v1/generative.proto'
+)
+# @@protoc_insertion_point(imports)
+
+_sym_db = _symbol_database.Default()
+
+
+from weaviate.proto.v1.v7351.v1 import base_pb2 as v1_dot_base__pb2
+
+
+DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n\x13v1/generative.proto\x12\x0bweaviate.v1\x1a\rv1/base.proto\"\xdd\x03\n\x10GenerativeSearch\x12\"\n\x16single_response_prompt\x18\x01 \x01(\tB\x02\x18\x01\x12!\n\x15grouped_response_task\x18\x02 \x01(\tB\x02\x18\x01\x12\x1e\n\x12grouped_properties\x18\x03 \x03(\tB\x02\x18\x01\x12\x34\n\x06single\x18\x04 \x01(\x0b\x32$.weaviate.v1.GenerativeSearch.Single\x12\x36\n\x07grouped\x18\x05 \x01(\x0b\x32%.weaviate.v1.GenerativeSearch.Grouped\x1aY\n\x06Single\x12\x0e\n\x06prompt\x18\x01 \x01(\t\x12\r\n\x05\x64\x65\x62ug\x18\x02 \x01(\x08\x12\x30\n\x07queries\x18\x03 \x03(\x0b\x32\x1f.weaviate.v1.GenerativeProvider\x1a\x98\x01\n\x07Grouped\x12\x0c\n\x04task\x18\x01 \x01(\t\x12/\n\nproperties\x18\x02 \x01(\x0b\x32\x16.weaviate.v1.TextArrayH\x00\x88\x01\x01\x12\x30\n\x07queries\x18\x03 \x03(\x0b\x32\x1f.weaviate.v1.GenerativeProvider\x12\r\n\x05\x64\x65\x62ug\x18\x04 \x01(\x08\x42\r\n\x0b_properties\"\x9c\x07\n\x12GenerativeProvider\x12\x17\n\x0freturn_metadata\x18\x01 \x01(\x08\x12\x35\n\tanthropic\x18\x02 \x01(\x0b\x32 .weaviate.v1.GenerativeAnthropicH\x00\x12\x33\n\x08\x61nyscale\x18\x03 \x01(\x0b\x32\x1f.weaviate.v1.GenerativeAnyscaleH\x00\x12)\n\x03\x61ws\x18\x04 \x01(\x0b\x32\x1a.weaviate.v1.GenerativeAWSH\x00\x12/\n\x06\x63ohere\x18\x05 \x01(\x0b\x32\x1d.weaviate.v1.GenerativeCohereH\x00\x12-\n\x05\x64ummy\x18\x06 \x01(\x0b\x32\x1c.weaviate.v1.GenerativeDummyH\x00\x12\x31\n\x07mistral\x18\x07 \x01(\x0b\x32\x1e.weaviate.v1.GenerativeMistralH\x00\x12/\n\x06ollama\x18\x08 \x01(\x0b\x32\x1d.weaviate.v1.GenerativeOllamaH\x00\x12/\n\x06openai\x18\t \x01(\x0b\x32\x1d.weaviate.v1.GenerativeOpenAIH\x00\x12/\n\x06google\x18\n \x01(\x0b\x32\x1d.weaviate.v1.GenerativeGoogleH\x00\x12\x37\n\ndatabricks\x18\x0b \x01(\x0b\x32!.weaviate.v1.GenerativeDatabricksH\x00\x12\x37\n\nfriendliai\x18\x0c \x01(\x0b\x32!.weaviate.v1.GenerativeFriendliAIH\x00\x12/\n\x06nvidia\x18\r \x01(\x0b\x32\x1d.weaviate.v1.GenerativeNvidiaH\x00\x12)\n\x03xai\x18\x0e \x01(\x0b\x32\x1a.weaviate.v1.GenerativeXAIH\x00\x12;\n\x0c\x63ontextualai\x18\x0f \x01(\x0b\x32#.weaviate.v1.GenerativeContextualAIH\x00\x12\x33\n\x08\x64\x65\x65pseek\x18\x10 \x01(\x0b\x32\x1f.weaviate.v1.GenerativeDeepseekH\x00\x12;\n\x0c\x64igitalocean\x18\x11 \x01(\x0b\x32#.weaviate.v1.GenerativeDigitalOceanH\x00\x12+\n\x04meta\x18\x12 \x01(\x0b\x32\x1b.weaviate.v1.GenerativeMetaH\x00\x42\x06\n\x04kind\"\xb1\x03\n\x13GenerativeAnthropic\x12\x15\n\x08\x62\x61se_url\x18\x01 \x01(\tH\x00\x88\x01\x01\x12\x17\n\nmax_tokens\x18\x02 \x01(\x03H\x01\x88\x01\x01\x12\x12\n\x05model\x18\x03 \x01(\tH\x02\x88\x01\x01\x12\x18\n\x0btemperature\x18\x04 \x01(\x01H\x03\x88\x01\x01\x12\x12\n\x05top_k\x18\x05 \x01(\x03H\x04\x88\x01\x01\x12\x12\n\x05top_p\x18\x06 \x01(\x01H\x05\x88\x01\x01\x12\x33\n\x0estop_sequences\x18\x07 \x01(\x0b\x32\x16.weaviate.v1.TextArrayH\x06\x88\x01\x01\x12+\n\x06images\x18\x08 \x01(\x0b\x32\x16.weaviate.v1.TextArrayH\x07\x88\x01\x01\x12\x35\n\x10image_properties\x18\t \x01(\x0b\x32\x16.weaviate.v1.TextArrayH\x08\x88\x01\x01\x42\x0b\n\t_base_urlB\r\n\x0b_max_tokensB\x08\n\x06_modelB\x0e\n\x0c_temperatureB\x08\n\x06_top_kB\x08\n\x06_top_pB\x11\n\x0f_stop_sequencesB\t\n\x07_imagesB\x13\n\x11_image_properties\"\x80\x01\n\x12GenerativeAnyscale\x12\x15\n\x08\x62\x61se_url\x18\x01 \x01(\tH\x00\x88\x01\x01\x12\x12\n\x05model\x18\x02 \x01(\tH\x01\x88\x01\x01\x12\x18\n\x0btemperature\x18\x03 \x01(\x01H\x02\x88\x01\x01\x42\x0b\n\t_base_urlB\x08\n\x06_modelB\x0e\n\x0c_temperature\"\x8d\x04\n\rGenerativeAWS\x12\x12\n\x05model\x18\x03 \x01(\tH\x00\x88\x01\x01\x12\x18\n\x0btemperature\x18\x08 \x01(\x01H\x01\x88\x01\x01\x12\x14\n\x07service\x18\t \x01(\tH\x02\x88\x01\x01\x12\x13\n\x06region\x18\n \x01(\tH\x03\x88\x01\x01\x12\x15\n\x08\x65ndpoint\x18\x0b \x01(\tH\x04\x88\x01\x01\x12\x19\n\x0ctarget_model\x18\x0c \x01(\tH\x05\x88\x01\x01\x12\x1b\n\x0etarget_variant\x18\r \x01(\tH\x06\x88\x01\x01\x12+\n\x06images\x18\x0e \x01(\x0b\x32\x16.weaviate.v1.TextArrayH\x07\x88\x01\x01\x12\x35\n\x10image_properties\x18\x0f \x01(\x0b\x32\x16.weaviate.v1.TextArrayH\x08\x88\x01\x01\x12\x17\n\nmax_tokens\x18\x10 \x01(\x03H\t\x88\x01\x01\x12\x33\n\x0estop_sequences\x18\x11 \x01(\x0b\x32\x16.weaviate.v1.TextArrayH\n\x88\x01\x01\x42\x08\n\x06_modelB\x0e\n\x0c_temperatureB\n\n\x08_serviceB\t\n\x07_regionB\x0b\n\t_endpointB\x0f\n\r_target_modelB\x11\n\x0f_target_variantB\t\n\x07_imagesB\x13\n\x11_image_propertiesB\r\n\x0b_max_tokensB\x11\n\x0f_stop_sequences\"\x88\x04\n\x10GenerativeCohere\x12\x15\n\x08\x62\x61se_url\x18\x01 \x01(\tH\x00\x88\x01\x01\x12\x1e\n\x11\x66requency_penalty\x18\x02 \x01(\x01H\x01\x88\x01\x01\x12\x17\n\nmax_tokens\x18\x03 \x01(\x03H\x02\x88\x01\x01\x12\x12\n\x05model\x18\x04 \x01(\tH\x03\x88\x01\x01\x12\x0e\n\x01k\x18\x05 \x01(\x03H\x04\x88\x01\x01\x12\x0e\n\x01p\x18\x06 \x01(\x01H\x05\x88\x01\x01\x12\x1d\n\x10presence_penalty\x18\x07 \x01(\x01H\x06\x88\x01\x01\x12\x33\n\x0estop_sequences\x18\x08 \x01(\x0b\x32\x16.weaviate.v1.TextArrayH\x07\x88\x01\x01\x12\x18\n\x0btemperature\x18\t \x01(\x01H\x08\x88\x01\x01\x12+\n\x06images\x18\n \x01(\x0b\x32\x16.weaviate.v1.TextArrayH\t\x88\x01\x01\x12\x35\n\x10image_properties\x18\x0b \x01(\x0b\x32\x16.weaviate.v1.TextArrayH\n\x88\x01\x01\x42\x0b\n\t_base_urlB\x14\n\x12_frequency_penaltyB\r\n\x0b_max_tokensB\x08\n\x06_modelB\x04\n\x02_kB\x04\n\x02_pB\x13\n\x11_presence_penaltyB\x11\n\x0f_stop_sequencesB\x0e\n\x0c_temperatureB\t\n\x07_imagesB\x13\n\x11_image_properties\"\x11\n\x0fGenerativeDummy\"\xc5\x01\n\x11GenerativeMistral\x12\x15\n\x08\x62\x61se_url\x18\x01 \x01(\tH\x00\x88\x01\x01\x12\x17\n\nmax_tokens\x18\x02 \x01(\x03H\x01\x88\x01\x01\x12\x12\n\x05model\x18\x03 \x01(\tH\x02\x88\x01\x01\x12\x18\n\x0btemperature\x18\x04 \x01(\x01H\x03\x88\x01\x01\x12\x12\n\x05top_p\x18\x05 \x01(\x01H\x04\x88\x01\x01\x42\x0b\n\t_base_urlB\r\n\x0b_max_tokensB\x08\n\x06_modelB\x0e\n\x0c_temperatureB\x08\n\x06_top_p\"\x8a\x02\n\x10GenerativeOllama\x12\x19\n\x0c\x61pi_endpoint\x18\x01 \x01(\tH\x00\x88\x01\x01\x12\x12\n\x05model\x18\x02 \x01(\tH\x01\x88\x01\x01\x12\x18\n\x0btemperature\x18\x03 \x01(\x01H\x02\x88\x01\x01\x12+\n\x06images\x18\x04 \x01(\x0b\x32\x16.weaviate.v1.TextArrayH\x03\x88\x01\x01\x12\x35\n\x10image_properties\x18\x05 \x01(\x0b\x32\x16.weaviate.v1.TextArrayH\x04\x88\x01\x01\x42\x0f\n\r_api_endpointB\x08\n\x06_modelB\x0e\n\x0c_temperatureB\t\n\x07_imagesB\x13\n\x11_image_properties\"\xe3\x08\n\x10GenerativeOpenAI\x12\x1e\n\x11\x66requency_penalty\x18\x01 \x01(\x01H\x00\x88\x01\x01\x12\x17\n\nmax_tokens\x18\x02 \x01(\x03H\x01\x88\x01\x01\x12\x12\n\x05model\x18\x03 \x01(\tH\x02\x88\x01\x01\x12\x0e\n\x01n\x18\x04 \x01(\x03H\x03\x88\x01\x01\x12\x1d\n\x10presence_penalty\x18\x05 \x01(\x01H\x04\x88\x01\x01\x12)\n\x04stop\x18\x06 \x01(\x0b\x32\x16.weaviate.v1.TextArrayH\x05\x88\x01\x01\x12\x18\n\x0btemperature\x18\x07 \x01(\x01H\x06\x88\x01\x01\x12\x12\n\x05top_p\x18\x08 \x01(\x01H\x07\x88\x01\x01\x12\x15\n\x08\x62\x61se_url\x18\t \x01(\tH\x08\x88\x01\x01\x12\x18\n\x0b\x61pi_version\x18\n \x01(\tH\t\x88\x01\x01\x12\x1a\n\rresource_name\x18\x0b \x01(\tH\n\x88\x01\x01\x12\x1a\n\rdeployment_id\x18\x0c \x01(\tH\x0b\x88\x01\x01\x12\x15\n\x08is_azure\x18\r \x01(\x08H\x0c\x88\x01\x01\x12+\n\x06images\x18\x0e \x01(\x0b\x32\x16.weaviate.v1.TextArrayH\r\x88\x01\x01\x12\x35\n\x10image_properties\x18\x0f \x01(\x0b\x32\x16.weaviate.v1.TextArrayH\x0e\x88\x01\x01\x12L\n\x10reasoning_effort\x18\x10 \x01(\x0e\x32-.weaviate.v1.GenerativeOpenAI.ReasoningEffortH\x0f\x88\x01\x01\x12?\n\tverbosity\x18\x11 \x01(\x0e\x32\'.weaviate.v1.GenerativeOpenAI.VerbosityH\x10\x88\x01\x01\"\xa3\x01\n\x0fReasoningEffort\x12 \n\x1cREASONING_EFFORT_UNSPECIFIED\x10\x00\x12\x1c\n\x18REASONING_EFFORT_MINIMAL\x10\x01\x12\x18\n\x14REASONING_EFFORT_LOW\x10\x02\x12\x1b\n\x17REASONING_EFFORT_MEDIUM\x10\x03\x12\x19\n\x15REASONING_EFFORT_HIGH\x10\x04\"c\n\tVerbosity\x12\x19\n\x15VERBOSITY_UNSPECIFIED\x10\x00\x12\x11\n\rVERBOSITY_LOW\x10\x01\x12\x14\n\x10VERBOSITY_MEDIUM\x10\x02\x12\x12\n\x0eVERBOSITY_HIGH\x10\x03\x42\x14\n\x12_frequency_penaltyB\r\n\x0b_max_tokensB\x08\n\x06_modelB\x04\n\x02_nB\x13\n\x11_presence_penaltyB\x07\n\x05_stopB\x0e\n\x0c_temperatureB\x08\n\x06_top_pB\x0b\n\t_base_urlB\x0e\n\x0c_api_versionB\x10\n\x0e_resource_nameB\x10\n\x0e_deployment_idB\x0b\n\t_is_azureB\t\n\x07_imagesB\x13\n\x11_image_propertiesB\x13\n\x11_reasoning_effortB\x0c\n\n_verbosity\"\xb6\x05\n\x10GenerativeGoogle\x12\x1e\n\x11\x66requency_penalty\x18\x01 \x01(\x01H\x00\x88\x01\x01\x12\x17\n\nmax_tokens\x18\x02 \x01(\x03H\x01\x88\x01\x01\x12\x12\n\x05model\x18\x03 \x01(\tH\x02\x88\x01\x01\x12\x1d\n\x10presence_penalty\x18\x04 \x01(\x01H\x03\x88\x01\x01\x12\x18\n\x0btemperature\x18\x05 \x01(\x01H\x04\x88\x01\x01\x12\x12\n\x05top_k\x18\x06 \x01(\x03H\x05\x88\x01\x01\x12\x12\n\x05top_p\x18\x07 \x01(\x01H\x06\x88\x01\x01\x12\x33\n\x0estop_sequences\x18\x08 \x01(\x0b\x32\x16.weaviate.v1.TextArrayH\x07\x88\x01\x01\x12\x19\n\x0c\x61pi_endpoint\x18\t \x01(\tH\x08\x88\x01\x01\x12\x17\n\nproject_id\x18\n \x01(\tH\t\x88\x01\x01\x12\x18\n\x0b\x65ndpoint_id\x18\x0b \x01(\tH\n\x88\x01\x01\x12\x13\n\x06region\x18\x0c \x01(\tH\x0b\x88\x01\x01\x12+\n\x06images\x18\r \x01(\x0b\x32\x16.weaviate.v1.TextArrayH\x0c\x88\x01\x01\x12\x35\n\x10image_properties\x18\x0e \x01(\x0b\x32\x16.weaviate.v1.TextArrayH\r\x88\x01\x01\x12\x15\n\x08location\x18\x0f \x01(\tH\x0e\x88\x01\x01\x42\x14\n\x12_frequency_penaltyB\r\n\x0b_max_tokensB\x08\n\x06_modelB\x13\n\x11_presence_penaltyB\x0e\n\x0c_temperatureB\x08\n\x06_top_kB\x08\n\x06_top_pB\x11\n\x0f_stop_sequencesB\x0f\n\r_api_endpointB\r\n\x0b_project_idB\x0e\n\x0c_endpoint_idB\t\n\x07_regionB\t\n\x07_imagesB\x13\n\x11_image_propertiesB\x0b\n\t_location\"\xd0\x03\n\x14GenerativeDatabricks\x12\x15\n\x08\x65ndpoint\x18\x01 \x01(\tH\x00\x88\x01\x01\x12\x12\n\x05model\x18\x02 \x01(\tH\x01\x88\x01\x01\x12\x1e\n\x11\x66requency_penalty\x18\x03 \x01(\x01H\x02\x88\x01\x01\x12\x16\n\tlog_probs\x18\x04 \x01(\x08H\x03\x88\x01\x01\x12\x1a\n\rtop_log_probs\x18\x05 \x01(\x03H\x04\x88\x01\x01\x12\x17\n\nmax_tokens\x18\x06 \x01(\x03H\x05\x88\x01\x01\x12\x0e\n\x01n\x18\x07 \x01(\x03H\x06\x88\x01\x01\x12\x1d\n\x10presence_penalty\x18\x08 \x01(\x01H\x07\x88\x01\x01\x12)\n\x04stop\x18\t \x01(\x0b\x32\x16.weaviate.v1.TextArrayH\x08\x88\x01\x01\x12\x18\n\x0btemperature\x18\n \x01(\x01H\t\x88\x01\x01\x12\x12\n\x05top_p\x18\x0b \x01(\x01H\n\x88\x01\x01\x42\x0b\n\t_endpointB\x08\n\x06_modelB\x14\n\x12_frequency_penaltyB\x0c\n\n_log_probsB\x10\n\x0e_top_log_probsB\r\n\x0b_max_tokensB\x04\n\x02_nB\x13\n\x11_presence_penaltyB\x07\n\x05_stopB\x0e\n\x0c_temperatureB\x08\n\x06_top_p\"\xde\x01\n\x14GenerativeFriendliAI\x12\x15\n\x08\x62\x61se_url\x18\x01 \x01(\tH\x00\x88\x01\x01\x12\x12\n\x05model\x18\x02 \x01(\tH\x01\x88\x01\x01\x12\x17\n\nmax_tokens\x18\x03 \x01(\x03H\x02\x88\x01\x01\x12\x18\n\x0btemperature\x18\x04 \x01(\x01H\x03\x88\x01\x01\x12\x0e\n\x01n\x18\x05 \x01(\x03H\x04\x88\x01\x01\x12\x12\n\x05top_p\x18\x06 \x01(\x01H\x05\x88\x01\x01\x42\x0b\n\t_base_urlB\x08\n\x06_modelB\r\n\x0b_max_tokensB\x0e\n\x0c_temperatureB\x04\n\x02_nB\x08\n\x06_top_p\"\xc4\x01\n\x10GenerativeNvidia\x12\x15\n\x08\x62\x61se_url\x18\x01 \x01(\tH\x00\x88\x01\x01\x12\x12\n\x05model\x18\x02 \x01(\tH\x01\x88\x01\x01\x12\x18\n\x0btemperature\x18\x03 \x01(\x01H\x02\x88\x01\x01\x12\x12\n\x05top_p\x18\x04 \x01(\x01H\x03\x88\x01\x01\x12\x17\n\nmax_tokens\x18\x05 \x01(\x03H\x04\x88\x01\x01\x42\x0b\n\t_base_urlB\x08\n\x06_modelB\x0e\n\x0c_temperatureB\x08\n\x06_top_pB\r\n\x0b_max_tokens\"\xc5\x02\n\rGenerativeXAI\x12\x15\n\x08\x62\x61se_url\x18\x01 \x01(\tH\x00\x88\x01\x01\x12\x12\n\x05model\x18\x02 \x01(\tH\x01\x88\x01\x01\x12\x18\n\x0btemperature\x18\x03 \x01(\x01H\x02\x88\x01\x01\x12\x12\n\x05top_p\x18\x04 \x01(\x01H\x03\x88\x01\x01\x12\x17\n\nmax_tokens\x18\x05 \x01(\x03H\x04\x88\x01\x01\x12+\n\x06images\x18\x06 \x01(\x0b\x32\x16.weaviate.v1.TextArrayH\x05\x88\x01\x01\x12\x35\n\x10image_properties\x18\x07 \x01(\x0b\x32\x16.weaviate.v1.TextArrayH\x06\x88\x01\x01\x42\x0b\n\t_base_urlB\x08\n\x06_modelB\x0e\n\x0c_temperatureB\x08\n\x06_top_pB\r\n\x0b_max_tokensB\t\n\x07_imagesB\x13\n\x11_image_properties\"\xce\x02\n\x16GenerativeContextualAI\x12\x12\n\x05model\x18\x01 \x01(\tH\x00\x88\x01\x01\x12\x18\n\x0btemperature\x18\x02 \x01(\x01H\x01\x88\x01\x01\x12\x12\n\x05top_p\x18\x03 \x01(\x01H\x02\x88\x01\x01\x12\x1b\n\x0emax_new_tokens\x18\x04 \x01(\x03H\x03\x88\x01\x01\x12\x1a\n\rsystem_prompt\x18\x05 \x01(\tH\x04\x88\x01\x01\x12\x1d\n\x10\x61void_commentary\x18\x06 \x01(\x08H\x05\x88\x01\x01\x12.\n\tknowledge\x18\x07 \x01(\x0b\x32\x16.weaviate.v1.TextArrayH\x06\x88\x01\x01\x42\x08\n\x06_modelB\x0e\n\x0c_temperatureB\x08\n\x06_top_pB\x11\n\x0f_max_new_tokensB\x10\n\x0e_system_promptB\x13\n\x11_avoid_commentaryB\x0c\n\n_knowledge\"\xe4\x02\n\x12GenerativeDeepseek\x12\x15\n\x08\x62\x61se_url\x18\x01 \x01(\tH\x00\x88\x01\x01\x12\x12\n\x05model\x18\x02 \x01(\tH\x01\x88\x01\x01\x12\x18\n\x0btemperature\x18\x03 \x01(\x01H\x02\x88\x01\x01\x12\x17\n\nmax_tokens\x18\x04 \x01(\x03H\x03\x88\x01\x01\x12\x1e\n\x11\x66requency_penalty\x18\x05 \x01(\x01H\x04\x88\x01\x01\x12\x1d\n\x10presence_penalty\x18\x06 \x01(\x01H\x05\x88\x01\x01\x12\x12\n\x05top_p\x18\x07 \x01(\x01H\x06\x88\x01\x01\x12)\n\x04stop\x18\x08 \x01(\x0b\x32\x16.weaviate.v1.TextArrayH\x07\x88\x01\x01\x42\x0b\n\t_base_urlB\x08\n\x06_modelB\x0e\n\x0c_temperatureB\r\n\x0b_max_tokensB\x14\n\x12_frequency_penaltyB\x13\n\x11_presence_penaltyB\x08\n\x06_top_pB\x07\n\x05_stop\"\xe8\x02\n\x16GenerativeDigitalOcean\x12\x15\n\x08\x62\x61se_url\x18\x01 \x01(\tH\x00\x88\x01\x01\x12\x12\n\x05model\x18\x02 \x01(\tH\x01\x88\x01\x01\x12\x18\n\x0btemperature\x18\x03 \x01(\x01H\x02\x88\x01\x01\x12\x12\n\x05top_p\x18\x04 \x01(\x01H\x03\x88\x01\x01\x12\x17\n\nmax_tokens\x18\x05 \x01(\x03H\x04\x88\x01\x01\x12\x1e\n\x11\x66requency_penalty\x18\x06 \x01(\x01H\x05\x88\x01\x01\x12\x1d\n\x10presence_penalty\x18\x07 \x01(\x01H\x06\x88\x01\x01\x12)\n\x04stop\x18\x08 \x01(\x0b\x32\x16.weaviate.v1.TextArrayH\x07\x88\x01\x01\x42\x0b\n\t_base_urlB\x08\n\x06_modelB\x0e\n\x0c_temperatureB\x08\n\x06_top_pB\r\n\x0b_max_tokensB\x14\n\x12_frequency_penaltyB\x13\n\x11_presence_penaltyB\x07\n\x05_stop\"\xee\x05\n\x0eGenerativeMeta\x12\x15\n\x08\x62\x61se_url\x18\x01 \x01(\tH\x00\x88\x01\x01\x12\x12\n\x05model\x18\x02 \x01(\tH\x01\x88\x01\x01\x12\x18\n\x0btemperature\x18\x03 \x01(\x01H\x02\x88\x01\x01\x12\x12\n\x05top_p\x18\x04 \x01(\x01H\x03\x88\x01\x01\x12\x17\n\nmax_tokens\x18\x05 \x01(\x03H\x04\x88\x01\x01\x12\x1e\n\x11\x66requency_penalty\x18\x06 \x01(\x01H\x05\x88\x01\x01\x12\x1d\n\x10presence_penalty\x18\x07 \x01(\x01H\x06\x88\x01\x01\x12J\n\x10reasoning_effort\x18\x08 \x01(\x0e\x32+.weaviate.v1.GenerativeMeta.ReasoningEffortH\x07\x88\x01\x01\x12+\n\x06images\x18\t \x01(\x0b\x32\x16.weaviate.v1.TextArrayH\x08\x88\x01\x01\x12\x35\n\x10image_properties\x18\n \x01(\x0b\x32\x16.weaviate.v1.TextArrayH\t\x88\x01\x01\"\xda\x01\n\x0fReasoningEffort\x12 \n\x1cREASONING_EFFORT_UNSPECIFIED\x10\x00\x12\x19\n\x15REASONING_EFFORT_NONE\x10\x01\x12\x1c\n\x18REASONING_EFFORT_MINIMAL\x10\x02\x12\x18\n\x14REASONING_EFFORT_LOW\x10\x03\x12\x1b\n\x17REASONING_EFFORT_MEDIUM\x10\x04\x12\x19\n\x15REASONING_EFFORT_HIGH\x10\x05\x12\x1a\n\x16REASONING_EFFORT_XHIGH\x10\x06\x42\x0b\n\t_base_urlB\x08\n\x06_modelB\x0e\n\x0c_temperatureB\x08\n\x06_top_pB\r\n\x0b_max_tokensB\x14\n\x12_frequency_penaltyB\x13\n\x11_presence_penaltyB\x13\n\x11_reasoning_effortB\t\n\x07_imagesB\x13\n\x11_image_properties\"\x92\x01\n\x1bGenerativeAnthropicMetadata\x12=\n\x05usage\x18\x01 \x01(\x0b\x32..weaviate.v1.GenerativeAnthropicMetadata.Usage\x1a\x34\n\x05Usage\x12\x14\n\x0cinput_tokens\x18\x01 \x01(\x03\x12\x15\n\routput_tokens\x18\x02 \x01(\x03\"\x1c\n\x1aGenerativeAnyscaleMetadata\"\x17\n\x15GenerativeAWSMetadata\"\x9c\x06\n\x18GenerativeCohereMetadata\x12J\n\x0b\x61pi_version\x18\x01 \x01(\x0b\x32\x30.weaviate.v1.GenerativeCohereMetadata.ApiVersionH\x00\x88\x01\x01\x12L\n\x0c\x62illed_units\x18\x02 \x01(\x0b\x32\x31.weaviate.v1.GenerativeCohereMetadata.BilledUnitsH\x01\x88\x01\x01\x12\x41\n\x06tokens\x18\x03 \x01(\x0b\x32,.weaviate.v1.GenerativeCohereMetadata.TokensH\x02\x88\x01\x01\x12-\n\x08warnings\x18\x04 \x01(\x0b\x32\x16.weaviate.v1.TextArrayH\x03\x88\x01\x01\x1a\x8e\x01\n\nApiVersion\x12\x14\n\x07version\x18\x01 \x01(\tH\x00\x88\x01\x01\x12\x1a\n\ris_deprecated\x18\x02 \x01(\x08H\x01\x88\x01\x01\x12\x1c\n\x0fis_experimental\x18\x03 \x01(\x08H\x02\x88\x01\x01\x42\n\n\x08_versionB\x10\n\x0e_is_deprecatedB\x12\n\x10_is_experimental\x1a\xc5\x01\n\x0b\x42illedUnits\x12\x19\n\x0cinput_tokens\x18\x01 \x01(\x01H\x00\x88\x01\x01\x12\x1a\n\routput_tokens\x18\x02 \x01(\x01H\x01\x88\x01\x01\x12\x19\n\x0csearch_units\x18\x03 \x01(\x01H\x02\x88\x01\x01\x12\x1c\n\x0f\x63lassifications\x18\x04 \x01(\x01H\x03\x88\x01\x01\x42\x0f\n\r_input_tokensB\x10\n\x0e_output_tokensB\x0f\n\r_search_unitsB\x12\n\x10_classifications\x1a\x62\n\x06Tokens\x12\x19\n\x0cinput_tokens\x18\x01 \x01(\x01H\x00\x88\x01\x01\x12\x1a\n\routput_tokens\x18\x02 \x01(\x01H\x01\x88\x01\x01\x42\x0f\n\r_input_tokensB\x10\n\x0e_output_tokensB\x0e\n\x0c_api_versionB\x0f\n\r_billed_unitsB\t\n\x07_tokensB\x0b\n\t_warnings\"\x19\n\x17GenerativeDummyMetadata\"\x81\x02\n\x19GenerativeMistralMetadata\x12@\n\x05usage\x18\x01 \x01(\x0b\x32,.weaviate.v1.GenerativeMistralMetadata.UsageH\x00\x88\x01\x01\x1a\x97\x01\n\x05Usage\x12\x1a\n\rprompt_tokens\x18\x01 \x01(\x03H\x00\x88\x01\x01\x12\x1e\n\x11\x63ompletion_tokens\x18\x02 \x01(\x03H\x01\x88\x01\x01\x12\x19\n\x0ctotal_tokens\x18\x03 \x01(\x03H\x02\x88\x01\x01\x42\x10\n\x0e_prompt_tokensB\x14\n\x12_completion_tokensB\x0f\n\r_total_tokensB\x08\n\x06_usage\"\x1a\n\x18GenerativeOllamaMetadata\"\xff\x01\n\x18GenerativeOpenAIMetadata\x12?\n\x05usage\x18\x01 \x01(\x0b\x32+.weaviate.v1.GenerativeOpenAIMetadata.UsageH\x00\x88\x01\x01\x1a\x97\x01\n\x05Usage\x12\x1a\n\rprompt_tokens\x18\x01 \x01(\x03H\x00\x88\x01\x01\x12\x1e\n\x11\x63ompletion_tokens\x18\x02 \x01(\x03H\x01\x88\x01\x01\x12\x19\n\x0ctotal_tokens\x18\x03 \x01(\x03H\x02\x88\x01\x01\x42\x10\n\x0e_prompt_tokensB\x14\n\x12_completion_tokensB\x0f\n\r_total_tokensB\x08\n\x06_usage\"\xe8\x06\n\x18GenerativeGoogleMetadata\x12\x45\n\x08metadata\x18\x01 \x01(\x0b\x32..weaviate.v1.GenerativeGoogleMetadata.MetadataH\x00\x88\x01\x01\x12P\n\x0eusage_metadata\x18\x02 \x01(\x0b\x32\x33.weaviate.v1.GenerativeGoogleMetadata.UsageMetadataH\x01\x88\x01\x01\x1a~\n\nTokenCount\x12&\n\x19total_billable_characters\x18\x01 \x01(\x03H\x00\x88\x01\x01\x12\x19\n\x0ctotal_tokens\x18\x02 \x01(\x03H\x01\x88\x01\x01\x42\x1c\n\x1a_total_billable_charactersB\x0f\n\r_total_tokens\x1a\xe1\x01\n\rTokenMetadata\x12P\n\x11input_token_count\x18\x01 \x01(\x0b\x32\x30.weaviate.v1.GenerativeGoogleMetadata.TokenCountH\x00\x88\x01\x01\x12Q\n\x12output_token_count\x18\x02 \x01(\x0b\x32\x30.weaviate.v1.GenerativeGoogleMetadata.TokenCountH\x01\x88\x01\x01\x42\x14\n\x12_input_token_countB\x15\n\x13_output_token_count\x1ao\n\x08Metadata\x12P\n\x0etoken_metadata\x18\x01 \x01(\x0b\x32\x33.weaviate.v1.GenerativeGoogleMetadata.TokenMetadataH\x00\x88\x01\x01\x42\x11\n\x0f_token_metadata\x1a\xbd\x01\n\rUsageMetadata\x12\x1f\n\x12prompt_token_count\x18\x01 \x01(\x03H\x00\x88\x01\x01\x12#\n\x16\x63\x61ndidates_token_count\x18\x02 \x01(\x03H\x01\x88\x01\x01\x12\x1e\n\x11total_token_count\x18\x03 \x01(\x03H\x02\x88\x01\x01\x42\x15\n\x13_prompt_token_countB\x19\n\x17_candidates_token_countB\x14\n\x12_total_token_countB\x0b\n\t_metadataB\x11\n\x0f_usage_metadata\"\x87\x02\n\x1cGenerativeDatabricksMetadata\x12\x43\n\x05usage\x18\x01 \x01(\x0b\x32/.weaviate.v1.GenerativeDatabricksMetadata.UsageH\x00\x88\x01\x01\x1a\x97\x01\n\x05Usage\x12\x1a\n\rprompt_tokens\x18\x01 \x01(\x03H\x00\x88\x01\x01\x12\x1e\n\x11\x63ompletion_tokens\x18\x02 \x01(\x03H\x01\x88\x01\x01\x12\x19\n\x0ctotal_tokens\x18\x03 \x01(\x03H\x02\x88\x01\x01\x42\x10\n\x0e_prompt_tokensB\x14\n\x12_completion_tokensB\x0f\n\r_total_tokensB\x08\n\x06_usage\"\x87\x02\n\x1cGenerativeFriendliAIMetadata\x12\x43\n\x05usage\x18\x01 \x01(\x0b\x32/.weaviate.v1.GenerativeFriendliAIMetadata.UsageH\x00\x88\x01\x01\x1a\x97\x01\n\x05Usage\x12\x1a\n\rprompt_tokens\x18\x01 \x01(\x03H\x00\x88\x01\x01\x12\x1e\n\x11\x63ompletion_tokens\x18\x02 \x01(\x03H\x01\x88\x01\x01\x12\x19\n\x0ctotal_tokens\x18\x03 \x01(\x03H\x02\x88\x01\x01\x42\x10\n\x0e_prompt_tokensB\x14\n\x12_completion_tokensB\x0f\n\r_total_tokensB\x08\n\x06_usage\"\xff\x01\n\x18GenerativeNvidiaMetadata\x12?\n\x05usage\x18\x01 \x01(\x0b\x32+.weaviate.v1.GenerativeNvidiaMetadata.UsageH\x00\x88\x01\x01\x1a\x97\x01\n\x05Usage\x12\x1a\n\rprompt_tokens\x18\x01 \x01(\x03H\x00\x88\x01\x01\x12\x1e\n\x11\x63ompletion_tokens\x18\x02 \x01(\x03H\x01\x88\x01\x01\x12\x19\n\x0ctotal_tokens\x18\x03 \x01(\x03H\x02\x88\x01\x01\x42\x10\n\x0e_prompt_tokensB\x14\n\x12_completion_tokensB\x0f\n\r_total_tokensB\x08\n\x06_usage\"\xf9\x01\n\x15GenerativeXAIMetadata\x12<\n\x05usage\x18\x01 \x01(\x0b\x32(.weaviate.v1.GenerativeXAIMetadata.UsageH\x00\x88\x01\x01\x1a\x97\x01\n\x05Usage\x12\x1a\n\rprompt_tokens\x18\x01 \x01(\x03H\x00\x88\x01\x01\x12\x1e\n\x11\x63ompletion_tokens\x18\x02 \x01(\x03H\x01\x88\x01\x01\x12\x19\n\x0ctotal_tokens\x18\x03 \x01(\x03H\x02\x88\x01\x01\x42\x10\n\x0e_prompt_tokensB\x14\n\x12_completion_tokensB\x0f\n\r_total_tokensB\x08\n\x06_usage\"\x83\x02\n\x1aGenerativeDeepseekMetadata\x12\x41\n\x05usage\x18\x01 \x01(\x0b\x32-.weaviate.v1.GenerativeDeepseekMetadata.UsageH\x00\x88\x01\x01\x1a\x97\x01\n\x05Usage\x12\x1a\n\rprompt_tokens\x18\x01 \x01(\x03H\x00\x88\x01\x01\x12\x1e\n\x11\x63ompletion_tokens\x18\x02 \x01(\x03H\x01\x88\x01\x01\x12\x19\n\x0ctotal_tokens\x18\x03 \x01(\x03H\x02\x88\x01\x01\x42\x10\n\x0e_prompt_tokensB\x14\n\x12_completion_tokensB\x0f\n\r_total_tokensB\x08\n\x06_usage\"\x8b\x02\n\x1eGenerativeDigitalOceanMetadata\x12\x45\n\x05usage\x18\x01 \x01(\x0b\x32\x31.weaviate.v1.GenerativeDigitalOceanMetadata.UsageH\x00\x88\x01\x01\x1a\x97\x01\n\x05Usage\x12\x1a\n\rprompt_tokens\x18\x01 \x01(\x03H\x00\x88\x01\x01\x12\x1e\n\x11\x63ompletion_tokens\x18\x02 \x01(\x03H\x01\x88\x01\x01\x12\x19\n\x0ctotal_tokens\x18\x03 \x01(\x03H\x02\x88\x01\x01\x42\x10\n\x0e_prompt_tokensB\x14\n\x12_completion_tokensB\x0f\n\r_total_tokensB\x08\n\x06_usage\"\xfb\x01\n\x16GenerativeMetaMetadata\x12=\n\x05usage\x18\x01 \x01(\x0b\x32).weaviate.v1.GenerativeMetaMetadata.UsageH\x00\x88\x01\x01\x1a\x97\x01\n\x05Usage\x12\x1a\n\rprompt_tokens\x18\x01 \x01(\x03H\x00\x88\x01\x01\x12\x1e\n\x11\x63ompletion_tokens\x18\x02 \x01(\x03H\x01\x88\x01\x01\x12\x19\n\x0ctotal_tokens\x18\x03 \x01(\x03H\x02\x88\x01\x01\x42\x10\n\x0e_prompt_tokensB\x14\n\x12_completion_tokensB\x0f\n\r_total_tokensB\x08\n\x06_usage\"\xc6\x07\n\x12GenerativeMetadata\x12=\n\tanthropic\x18\x01 \x01(\x0b\x32(.weaviate.v1.GenerativeAnthropicMetadataH\x00\x12;\n\x08\x61nyscale\x18\x02 \x01(\x0b\x32\'.weaviate.v1.GenerativeAnyscaleMetadataH\x00\x12\x31\n\x03\x61ws\x18\x03 \x01(\x0b\x32\".weaviate.v1.GenerativeAWSMetadataH\x00\x12\x37\n\x06\x63ohere\x18\x04 \x01(\x0b\x32%.weaviate.v1.GenerativeCohereMetadataH\x00\x12\x35\n\x05\x64ummy\x18\x05 \x01(\x0b\x32$.weaviate.v1.GenerativeDummyMetadataH\x00\x12\x39\n\x07mistral\x18\x06 \x01(\x0b\x32&.weaviate.v1.GenerativeMistralMetadataH\x00\x12\x37\n\x06ollama\x18\x07 \x01(\x0b\x32%.weaviate.v1.GenerativeOllamaMetadataH\x00\x12\x37\n\x06openai\x18\x08 \x01(\x0b\x32%.weaviate.v1.GenerativeOpenAIMetadataH\x00\x12\x37\n\x06google\x18\t \x01(\x0b\x32%.weaviate.v1.GenerativeGoogleMetadataH\x00\x12?\n\ndatabricks\x18\n \x01(\x0b\x32).weaviate.v1.GenerativeDatabricksMetadataH\x00\x12?\n\nfriendliai\x18\x0b \x01(\x0b\x32).weaviate.v1.GenerativeFriendliAIMetadataH\x00\x12\x37\n\x06nvidia\x18\x0c \x01(\x0b\x32%.weaviate.v1.GenerativeNvidiaMetadataH\x00\x12\x31\n\x03xai\x18\r \x01(\x0b\x32\".weaviate.v1.GenerativeXAIMetadataH\x00\x12;\n\x08\x64\x65\x65pseek\x18\x0e \x01(\x0b\x32\'.weaviate.v1.GenerativeDeepseekMetadataH\x00\x12\x43\n\x0c\x64igitalocean\x18\x0f \x01(\x0b\x32+.weaviate.v1.GenerativeDigitalOceanMetadataH\x00\x12\x33\n\x04meta\x18\x10 \x01(\x0b\x32#.weaviate.v1.GenerativeMetaMetadataH\x00\x42\x06\n\x04kind\"\xa2\x01\n\x0fGenerativeReply\x12\x0e\n\x06result\x18\x01 \x01(\t\x12\x30\n\x05\x64\x65\x62ug\x18\x02 \x01(\x0b\x32\x1c.weaviate.v1.GenerativeDebugH\x00\x88\x01\x01\x12\x36\n\x08metadata\x18\x03 \x01(\x0b\x32\x1f.weaviate.v1.GenerativeMetadataH\x01\x88\x01\x01\x42\x08\n\x06_debugB\x0b\n\t_metadata\"@\n\x10GenerativeResult\x12,\n\x06values\x18\x01 \x03(\x0b\x32\x1c.weaviate.v1.GenerativeReply\";\n\x0fGenerativeDebug\x12\x18\n\x0b\x66ull_prompt\x18\x01 \x01(\tH\x00\x88\x01\x01\x42\x0e\n\x0c_full_promptBt\n#io.weaviate.client.grpc.protocol.v1B\x17WeaviateProtoGenerativeZ4github.com/weaviate/weaviate/grpc/generated;protocolb\x06proto3')
+
+_globals = globals()
+_builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, _globals)
+_builder.BuildTopDescriptorsAndMessages(DESCRIPTOR, 'v1.generative_pb2', _globals)
+if not _descriptor._USE_C_DESCRIPTORS:
+ _globals['DESCRIPTOR']._loaded_options = None
+ _globals['DESCRIPTOR']._serialized_options = b'\n#io.weaviate.client.grpc.protocol.v1B\027WeaviateProtoGenerativeZ4github.com/weaviate/weaviate/grpc/generated;protocol'
+ _globals['_GENERATIVESEARCH'].fields_by_name['single_response_prompt']._loaded_options = None
+ _globals['_GENERATIVESEARCH'].fields_by_name['single_response_prompt']._serialized_options = b'\030\001'
+ _globals['_GENERATIVESEARCH'].fields_by_name['grouped_response_task']._loaded_options = None
+ _globals['_GENERATIVESEARCH'].fields_by_name['grouped_response_task']._serialized_options = b'\030\001'
+ _globals['_GENERATIVESEARCH'].fields_by_name['grouped_properties']._loaded_options = None
+ _globals['_GENERATIVESEARCH'].fields_by_name['grouped_properties']._serialized_options = b'\030\001'
+ _globals['_GENERATIVESEARCH']._serialized_start=52
+ _globals['_GENERATIVESEARCH']._serialized_end=529
+ _globals['_GENERATIVESEARCH_SINGLE']._serialized_start=285
+ _globals['_GENERATIVESEARCH_SINGLE']._serialized_end=374
+ _globals['_GENERATIVESEARCH_GROUPED']._serialized_start=377
+ _globals['_GENERATIVESEARCH_GROUPED']._serialized_end=529
+ _globals['_GENERATIVEPROVIDER']._serialized_start=532
+ _globals['_GENERATIVEPROVIDER']._serialized_end=1456
+ _globals['_GENERATIVEANTHROPIC']._serialized_start=1459
+ _globals['_GENERATIVEANTHROPIC']._serialized_end=1892
+ _globals['_GENERATIVEANYSCALE']._serialized_start=1895
+ _globals['_GENERATIVEANYSCALE']._serialized_end=2023
+ _globals['_GENERATIVEAWS']._serialized_start=2026
+ _globals['_GENERATIVEAWS']._serialized_end=2551
+ _globals['_GENERATIVECOHERE']._serialized_start=2554
+ _globals['_GENERATIVECOHERE']._serialized_end=3074
+ _globals['_GENERATIVEDUMMY']._serialized_start=3076
+ _globals['_GENERATIVEDUMMY']._serialized_end=3093
+ _globals['_GENERATIVEMISTRAL']._serialized_start=3096
+ _globals['_GENERATIVEMISTRAL']._serialized_end=3293
+ _globals['_GENERATIVEOLLAMA']._serialized_start=3296
+ _globals['_GENERATIVEOLLAMA']._serialized_end=3562
+ _globals['_GENERATIVEOPENAI']._serialized_start=3565
+ _globals['_GENERATIVEOPENAI']._serialized_end=4688
+ _globals['_GENERATIVEOPENAI_REASONINGEFFORT']._serialized_start=4170
+ _globals['_GENERATIVEOPENAI_REASONINGEFFORT']._serialized_end=4333
+ _globals['_GENERATIVEOPENAI_VERBOSITY']._serialized_start=4335
+ _globals['_GENERATIVEOPENAI_VERBOSITY']._serialized_end=4434
+ _globals['_GENERATIVEGOOGLE']._serialized_start=4691
+ _globals['_GENERATIVEGOOGLE']._serialized_end=5385
+ _globals['_GENERATIVEDATABRICKS']._serialized_start=5388
+ _globals['_GENERATIVEDATABRICKS']._serialized_end=5852
+ _globals['_GENERATIVEFRIENDLIAI']._serialized_start=5855
+ _globals['_GENERATIVEFRIENDLIAI']._serialized_end=6077
+ _globals['_GENERATIVENVIDIA']._serialized_start=6080
+ _globals['_GENERATIVENVIDIA']._serialized_end=6276
+ _globals['_GENERATIVEXAI']._serialized_start=6279
+ _globals['_GENERATIVEXAI']._serialized_end=6604
+ _globals['_GENERATIVECONTEXTUALAI']._serialized_start=6607
+ _globals['_GENERATIVECONTEXTUALAI']._serialized_end=6941
+ _globals['_GENERATIVEDEEPSEEK']._serialized_start=6944
+ _globals['_GENERATIVEDEEPSEEK']._serialized_end=7300
+ _globals['_GENERATIVEDIGITALOCEAN']._serialized_start=7303
+ _globals['_GENERATIVEDIGITALOCEAN']._serialized_end=7663
+ _globals['_GENERATIVEMETA']._serialized_start=7666
+ _globals['_GENERATIVEMETA']._serialized_end=8416
+ _globals['_GENERATIVEMETA_REASONINGEFFORT']._serialized_start=8038
+ _globals['_GENERATIVEMETA_REASONINGEFFORT']._serialized_end=8256
+ _globals['_GENERATIVEANTHROPICMETADATA']._serialized_start=8419
+ _globals['_GENERATIVEANTHROPICMETADATA']._serialized_end=8565
+ _globals['_GENERATIVEANTHROPICMETADATA_USAGE']._serialized_start=8513
+ _globals['_GENERATIVEANTHROPICMETADATA_USAGE']._serialized_end=8565
+ _globals['_GENERATIVEANYSCALEMETADATA']._serialized_start=8567
+ _globals['_GENERATIVEANYSCALEMETADATA']._serialized_end=8595
+ _globals['_GENERATIVEAWSMETADATA']._serialized_start=8597
+ _globals['_GENERATIVEAWSMETADATA']._serialized_end=8620
+ _globals['_GENERATIVECOHEREMETADATA']._serialized_start=8623
+ _globals['_GENERATIVECOHEREMETADATA']._serialized_end=9419
+ _globals['_GENERATIVECOHEREMETADATA_APIVERSION']._serialized_start=8920
+ _globals['_GENERATIVECOHEREMETADATA_APIVERSION']._serialized_end=9062
+ _globals['_GENERATIVECOHEREMETADATA_BILLEDUNITS']._serialized_start=9065
+ _globals['_GENERATIVECOHEREMETADATA_BILLEDUNITS']._serialized_end=9262
+ _globals['_GENERATIVECOHEREMETADATA_TOKENS']._serialized_start=9264
+ _globals['_GENERATIVECOHEREMETADATA_TOKENS']._serialized_end=9362
+ _globals['_GENERATIVEDUMMYMETADATA']._serialized_start=9421
+ _globals['_GENERATIVEDUMMYMETADATA']._serialized_end=9446
+ _globals['_GENERATIVEMISTRALMETADATA']._serialized_start=9449
+ _globals['_GENERATIVEMISTRALMETADATA']._serialized_end=9706
+ _globals['_GENERATIVEMISTRALMETADATA_USAGE']._serialized_start=9545
+ _globals['_GENERATIVEMISTRALMETADATA_USAGE']._serialized_end=9696
+ _globals['_GENERATIVEOLLAMAMETADATA']._serialized_start=9708
+ _globals['_GENERATIVEOLLAMAMETADATA']._serialized_end=9734
+ _globals['_GENERATIVEOPENAIMETADATA']._serialized_start=9737
+ _globals['_GENERATIVEOPENAIMETADATA']._serialized_end=9992
+ _globals['_GENERATIVEOPENAIMETADATA_USAGE']._serialized_start=9545
+ _globals['_GENERATIVEOPENAIMETADATA_USAGE']._serialized_end=9696
+ _globals['_GENERATIVEGOOGLEMETADATA']._serialized_start=9995
+ _globals['_GENERATIVEGOOGLEMETADATA']._serialized_end=10867
+ _globals['_GENERATIVEGOOGLEMETADATA_TOKENCOUNT']._serialized_start=10176
+ _globals['_GENERATIVEGOOGLEMETADATA_TOKENCOUNT']._serialized_end=10302
+ _globals['_GENERATIVEGOOGLEMETADATA_TOKENMETADATA']._serialized_start=10305
+ _globals['_GENERATIVEGOOGLEMETADATA_TOKENMETADATA']._serialized_end=10530
+ _globals['_GENERATIVEGOOGLEMETADATA_METADATA']._serialized_start=10532
+ _globals['_GENERATIVEGOOGLEMETADATA_METADATA']._serialized_end=10643
+ _globals['_GENERATIVEGOOGLEMETADATA_USAGEMETADATA']._serialized_start=10646
+ _globals['_GENERATIVEGOOGLEMETADATA_USAGEMETADATA']._serialized_end=10835
+ _globals['_GENERATIVEDATABRICKSMETADATA']._serialized_start=10870
+ _globals['_GENERATIVEDATABRICKSMETADATA']._serialized_end=11133
+ _globals['_GENERATIVEDATABRICKSMETADATA_USAGE']._serialized_start=9545
+ _globals['_GENERATIVEDATABRICKSMETADATA_USAGE']._serialized_end=9696
+ _globals['_GENERATIVEFRIENDLIAIMETADATA']._serialized_start=11136
+ _globals['_GENERATIVEFRIENDLIAIMETADATA']._serialized_end=11399
+ _globals['_GENERATIVEFRIENDLIAIMETADATA_USAGE']._serialized_start=9545
+ _globals['_GENERATIVEFRIENDLIAIMETADATA_USAGE']._serialized_end=9696
+ _globals['_GENERATIVENVIDIAMETADATA']._serialized_start=11402
+ _globals['_GENERATIVENVIDIAMETADATA']._serialized_end=11657
+ _globals['_GENERATIVENVIDIAMETADATA_USAGE']._serialized_start=9545
+ _globals['_GENERATIVENVIDIAMETADATA_USAGE']._serialized_end=9696
+ _globals['_GENERATIVEXAIMETADATA']._serialized_start=11660
+ _globals['_GENERATIVEXAIMETADATA']._serialized_end=11909
+ _globals['_GENERATIVEXAIMETADATA_USAGE']._serialized_start=9545
+ _globals['_GENERATIVEXAIMETADATA_USAGE']._serialized_end=9696
+ _globals['_GENERATIVEDEEPSEEKMETADATA']._serialized_start=11912
+ _globals['_GENERATIVEDEEPSEEKMETADATA']._serialized_end=12171
+ _globals['_GENERATIVEDEEPSEEKMETADATA_USAGE']._serialized_start=9545
+ _globals['_GENERATIVEDEEPSEEKMETADATA_USAGE']._serialized_end=9696
+ _globals['_GENERATIVEDIGITALOCEANMETADATA']._serialized_start=12174
+ _globals['_GENERATIVEDIGITALOCEANMETADATA']._serialized_end=12441
+ _globals['_GENERATIVEDIGITALOCEANMETADATA_USAGE']._serialized_start=9545
+ _globals['_GENERATIVEDIGITALOCEANMETADATA_USAGE']._serialized_end=9696
+ _globals['_GENERATIVEMETAMETADATA']._serialized_start=12444
+ _globals['_GENERATIVEMETAMETADATA']._serialized_end=12695
+ _globals['_GENERATIVEMETAMETADATA_USAGE']._serialized_start=9545
+ _globals['_GENERATIVEMETAMETADATA_USAGE']._serialized_end=9696
+ _globals['_GENERATIVEMETADATA']._serialized_start=12698
+ _globals['_GENERATIVEMETADATA']._serialized_end=13664
+ _globals['_GENERATIVEREPLY']._serialized_start=13667
+ _globals['_GENERATIVEREPLY']._serialized_end=13829
+ _globals['_GENERATIVERESULT']._serialized_start=13831
+ _globals['_GENERATIVERESULT']._serialized_end=13895
+ _globals['_GENERATIVEDEBUG']._serialized_start=13897
+ _globals['_GENERATIVEDEBUG']._serialized_end=13956
+# @@protoc_insertion_point(module_scope)
diff --git a/weaviate/proto/v1/v7351/v1/generative_pb2.pyi b/weaviate/proto/v1/v7351/v1/generative_pb2.pyi
new file mode 100644
index 000000000..c7ad7fc77
--- /dev/null
+++ b/weaviate/proto/v1/v7351/v1/generative_pb2.pyi
@@ -0,0 +1,762 @@
+from weaviate.proto.v1.v7351.v1 import base_pb2 as _base_pb2
+from google.protobuf.internal import containers as _containers
+from google.protobuf.internal import enum_type_wrapper as _enum_type_wrapper
+from google.protobuf import descriptor as _descriptor
+from google.protobuf import message as _message
+from collections.abc import Iterable as _Iterable, Mapping as _Mapping
+from typing import ClassVar as _ClassVar, Optional as _Optional, Union as _Union
+
+DESCRIPTOR: _descriptor.FileDescriptor
+
+class GenerativeSearch(_message.Message):
+ __slots__ = ("single_response_prompt", "grouped_response_task", "grouped_properties", "single", "grouped")
+ class Single(_message.Message):
+ __slots__ = ("prompt", "debug", "queries")
+ PROMPT_FIELD_NUMBER: _ClassVar[int]
+ DEBUG_FIELD_NUMBER: _ClassVar[int]
+ QUERIES_FIELD_NUMBER: _ClassVar[int]
+ prompt: str
+ debug: bool
+ queries: _containers.RepeatedCompositeFieldContainer[GenerativeProvider]
+ def __init__(self, prompt: _Optional[str] = ..., debug: _Optional[bool] = ..., queries: _Optional[_Iterable[_Union[GenerativeProvider, _Mapping]]] = ...) -> None: ...
+ class Grouped(_message.Message):
+ __slots__ = ("task", "properties", "queries", "debug")
+ TASK_FIELD_NUMBER: _ClassVar[int]
+ PROPERTIES_FIELD_NUMBER: _ClassVar[int]
+ QUERIES_FIELD_NUMBER: _ClassVar[int]
+ DEBUG_FIELD_NUMBER: _ClassVar[int]
+ task: str
+ properties: _base_pb2.TextArray
+ queries: _containers.RepeatedCompositeFieldContainer[GenerativeProvider]
+ debug: bool
+ def __init__(self, task: _Optional[str] = ..., properties: _Optional[_Union[_base_pb2.TextArray, _Mapping]] = ..., queries: _Optional[_Iterable[_Union[GenerativeProvider, _Mapping]]] = ..., debug: _Optional[bool] = ...) -> None: ...
+ SINGLE_RESPONSE_PROMPT_FIELD_NUMBER: _ClassVar[int]
+ GROUPED_RESPONSE_TASK_FIELD_NUMBER: _ClassVar[int]
+ GROUPED_PROPERTIES_FIELD_NUMBER: _ClassVar[int]
+ SINGLE_FIELD_NUMBER: _ClassVar[int]
+ GROUPED_FIELD_NUMBER: _ClassVar[int]
+ single_response_prompt: str
+ grouped_response_task: str
+ grouped_properties: _containers.RepeatedScalarFieldContainer[str]
+ single: GenerativeSearch.Single
+ grouped: GenerativeSearch.Grouped
+ def __init__(self, single_response_prompt: _Optional[str] = ..., grouped_response_task: _Optional[str] = ..., grouped_properties: _Optional[_Iterable[str]] = ..., single: _Optional[_Union[GenerativeSearch.Single, _Mapping]] = ..., grouped: _Optional[_Union[GenerativeSearch.Grouped, _Mapping]] = ...) -> None: ...
+
+class GenerativeProvider(_message.Message):
+ __slots__ = ("return_metadata", "anthropic", "anyscale", "aws", "cohere", "dummy", "mistral", "ollama", "openai", "google", "databricks", "friendliai", "nvidia", "xai", "contextualai", "deepseek", "digitalocean", "meta")
+ RETURN_METADATA_FIELD_NUMBER: _ClassVar[int]
+ ANTHROPIC_FIELD_NUMBER: _ClassVar[int]
+ ANYSCALE_FIELD_NUMBER: _ClassVar[int]
+ AWS_FIELD_NUMBER: _ClassVar[int]
+ COHERE_FIELD_NUMBER: _ClassVar[int]
+ DUMMY_FIELD_NUMBER: _ClassVar[int]
+ MISTRAL_FIELD_NUMBER: _ClassVar[int]
+ OLLAMA_FIELD_NUMBER: _ClassVar[int]
+ OPENAI_FIELD_NUMBER: _ClassVar[int]
+ GOOGLE_FIELD_NUMBER: _ClassVar[int]
+ DATABRICKS_FIELD_NUMBER: _ClassVar[int]
+ FRIENDLIAI_FIELD_NUMBER: _ClassVar[int]
+ NVIDIA_FIELD_NUMBER: _ClassVar[int]
+ XAI_FIELD_NUMBER: _ClassVar[int]
+ CONTEXTUALAI_FIELD_NUMBER: _ClassVar[int]
+ DEEPSEEK_FIELD_NUMBER: _ClassVar[int]
+ DIGITALOCEAN_FIELD_NUMBER: _ClassVar[int]
+ META_FIELD_NUMBER: _ClassVar[int]
+ return_metadata: bool
+ anthropic: GenerativeAnthropic
+ anyscale: GenerativeAnyscale
+ aws: GenerativeAWS
+ cohere: GenerativeCohere
+ dummy: GenerativeDummy
+ mistral: GenerativeMistral
+ ollama: GenerativeOllama
+ openai: GenerativeOpenAI
+ google: GenerativeGoogle
+ databricks: GenerativeDatabricks
+ friendliai: GenerativeFriendliAI
+ nvidia: GenerativeNvidia
+ xai: GenerativeXAI
+ contextualai: GenerativeContextualAI
+ deepseek: GenerativeDeepseek
+ digitalocean: GenerativeDigitalOcean
+ meta: GenerativeMeta
+ def __init__(self, return_metadata: _Optional[bool] = ..., anthropic: _Optional[_Union[GenerativeAnthropic, _Mapping]] = ..., anyscale: _Optional[_Union[GenerativeAnyscale, _Mapping]] = ..., aws: _Optional[_Union[GenerativeAWS, _Mapping]] = ..., cohere: _Optional[_Union[GenerativeCohere, _Mapping]] = ..., dummy: _Optional[_Union[GenerativeDummy, _Mapping]] = ..., mistral: _Optional[_Union[GenerativeMistral, _Mapping]] = ..., ollama: _Optional[_Union[GenerativeOllama, _Mapping]] = ..., openai: _Optional[_Union[GenerativeOpenAI, _Mapping]] = ..., google: _Optional[_Union[GenerativeGoogle, _Mapping]] = ..., databricks: _Optional[_Union[GenerativeDatabricks, _Mapping]] = ..., friendliai: _Optional[_Union[GenerativeFriendliAI, _Mapping]] = ..., nvidia: _Optional[_Union[GenerativeNvidia, _Mapping]] = ..., xai: _Optional[_Union[GenerativeXAI, _Mapping]] = ..., contextualai: _Optional[_Union[GenerativeContextualAI, _Mapping]] = ..., deepseek: _Optional[_Union[GenerativeDeepseek, _Mapping]] = ..., digitalocean: _Optional[_Union[GenerativeDigitalOcean, _Mapping]] = ..., meta: _Optional[_Union[GenerativeMeta, _Mapping]] = ...) -> None: ...
+
+class GenerativeAnthropic(_message.Message):
+ __slots__ = ("base_url", "max_tokens", "model", "temperature", "top_k", "top_p", "stop_sequences", "images", "image_properties")
+ BASE_URL_FIELD_NUMBER: _ClassVar[int]
+ MAX_TOKENS_FIELD_NUMBER: _ClassVar[int]
+ MODEL_FIELD_NUMBER: _ClassVar[int]
+ TEMPERATURE_FIELD_NUMBER: _ClassVar[int]
+ TOP_K_FIELD_NUMBER: _ClassVar[int]
+ TOP_P_FIELD_NUMBER: _ClassVar[int]
+ STOP_SEQUENCES_FIELD_NUMBER: _ClassVar[int]
+ IMAGES_FIELD_NUMBER: _ClassVar[int]
+ IMAGE_PROPERTIES_FIELD_NUMBER: _ClassVar[int]
+ base_url: str
+ max_tokens: int
+ model: str
+ temperature: float
+ top_k: int
+ top_p: float
+ stop_sequences: _base_pb2.TextArray
+ images: _base_pb2.TextArray
+ image_properties: _base_pb2.TextArray
+ def __init__(self, base_url: _Optional[str] = ..., max_tokens: _Optional[int] = ..., model: _Optional[str] = ..., temperature: _Optional[float] = ..., top_k: _Optional[int] = ..., top_p: _Optional[float] = ..., stop_sequences: _Optional[_Union[_base_pb2.TextArray, _Mapping]] = ..., images: _Optional[_Union[_base_pb2.TextArray, _Mapping]] = ..., image_properties: _Optional[_Union[_base_pb2.TextArray, _Mapping]] = ...) -> None: ...
+
+class GenerativeAnyscale(_message.Message):
+ __slots__ = ("base_url", "model", "temperature")
+ BASE_URL_FIELD_NUMBER: _ClassVar[int]
+ MODEL_FIELD_NUMBER: _ClassVar[int]
+ TEMPERATURE_FIELD_NUMBER: _ClassVar[int]
+ base_url: str
+ model: str
+ temperature: float
+ def __init__(self, base_url: _Optional[str] = ..., model: _Optional[str] = ..., temperature: _Optional[float] = ...) -> None: ...
+
+class GenerativeAWS(_message.Message):
+ __slots__ = ("model", "temperature", "service", "region", "endpoint", "target_model", "target_variant", "images", "image_properties", "max_tokens", "stop_sequences")
+ MODEL_FIELD_NUMBER: _ClassVar[int]
+ TEMPERATURE_FIELD_NUMBER: _ClassVar[int]
+ SERVICE_FIELD_NUMBER: _ClassVar[int]
+ REGION_FIELD_NUMBER: _ClassVar[int]
+ ENDPOINT_FIELD_NUMBER: _ClassVar[int]
+ TARGET_MODEL_FIELD_NUMBER: _ClassVar[int]
+ TARGET_VARIANT_FIELD_NUMBER: _ClassVar[int]
+ IMAGES_FIELD_NUMBER: _ClassVar[int]
+ IMAGE_PROPERTIES_FIELD_NUMBER: _ClassVar[int]
+ MAX_TOKENS_FIELD_NUMBER: _ClassVar[int]
+ STOP_SEQUENCES_FIELD_NUMBER: _ClassVar[int]
+ model: str
+ temperature: float
+ service: str
+ region: str
+ endpoint: str
+ target_model: str
+ target_variant: str
+ images: _base_pb2.TextArray
+ image_properties: _base_pb2.TextArray
+ max_tokens: int
+ stop_sequences: _base_pb2.TextArray
+ def __init__(self, model: _Optional[str] = ..., temperature: _Optional[float] = ..., service: _Optional[str] = ..., region: _Optional[str] = ..., endpoint: _Optional[str] = ..., target_model: _Optional[str] = ..., target_variant: _Optional[str] = ..., images: _Optional[_Union[_base_pb2.TextArray, _Mapping]] = ..., image_properties: _Optional[_Union[_base_pb2.TextArray, _Mapping]] = ..., max_tokens: _Optional[int] = ..., stop_sequences: _Optional[_Union[_base_pb2.TextArray, _Mapping]] = ...) -> None: ...
+
+class GenerativeCohere(_message.Message):
+ __slots__ = ("base_url", "frequency_penalty", "max_tokens", "model", "k", "p", "presence_penalty", "stop_sequences", "temperature", "images", "image_properties")
+ BASE_URL_FIELD_NUMBER: _ClassVar[int]
+ FREQUENCY_PENALTY_FIELD_NUMBER: _ClassVar[int]
+ MAX_TOKENS_FIELD_NUMBER: _ClassVar[int]
+ MODEL_FIELD_NUMBER: _ClassVar[int]
+ K_FIELD_NUMBER: _ClassVar[int]
+ P_FIELD_NUMBER: _ClassVar[int]
+ PRESENCE_PENALTY_FIELD_NUMBER: _ClassVar[int]
+ STOP_SEQUENCES_FIELD_NUMBER: _ClassVar[int]
+ TEMPERATURE_FIELD_NUMBER: _ClassVar[int]
+ IMAGES_FIELD_NUMBER: _ClassVar[int]
+ IMAGE_PROPERTIES_FIELD_NUMBER: _ClassVar[int]
+ base_url: str
+ frequency_penalty: float
+ max_tokens: int
+ model: str
+ k: int
+ p: float
+ presence_penalty: float
+ stop_sequences: _base_pb2.TextArray
+ temperature: float
+ images: _base_pb2.TextArray
+ image_properties: _base_pb2.TextArray
+ def __init__(self, base_url: _Optional[str] = ..., frequency_penalty: _Optional[float] = ..., max_tokens: _Optional[int] = ..., model: _Optional[str] = ..., k: _Optional[int] = ..., p: _Optional[float] = ..., presence_penalty: _Optional[float] = ..., stop_sequences: _Optional[_Union[_base_pb2.TextArray, _Mapping]] = ..., temperature: _Optional[float] = ..., images: _Optional[_Union[_base_pb2.TextArray, _Mapping]] = ..., image_properties: _Optional[_Union[_base_pb2.TextArray, _Mapping]] = ...) -> None: ...
+
+class GenerativeDummy(_message.Message):
+ __slots__ = ()
+ def __init__(self) -> None: ...
+
+class GenerativeMistral(_message.Message):
+ __slots__ = ("base_url", "max_tokens", "model", "temperature", "top_p")
+ BASE_URL_FIELD_NUMBER: _ClassVar[int]
+ MAX_TOKENS_FIELD_NUMBER: _ClassVar[int]
+ MODEL_FIELD_NUMBER: _ClassVar[int]
+ TEMPERATURE_FIELD_NUMBER: _ClassVar[int]
+ TOP_P_FIELD_NUMBER: _ClassVar[int]
+ base_url: str
+ max_tokens: int
+ model: str
+ temperature: float
+ top_p: float
+ def __init__(self, base_url: _Optional[str] = ..., max_tokens: _Optional[int] = ..., model: _Optional[str] = ..., temperature: _Optional[float] = ..., top_p: _Optional[float] = ...) -> None: ...
+
+class GenerativeOllama(_message.Message):
+ __slots__ = ("api_endpoint", "model", "temperature", "images", "image_properties")
+ API_ENDPOINT_FIELD_NUMBER: _ClassVar[int]
+ MODEL_FIELD_NUMBER: _ClassVar[int]
+ TEMPERATURE_FIELD_NUMBER: _ClassVar[int]
+ IMAGES_FIELD_NUMBER: _ClassVar[int]
+ IMAGE_PROPERTIES_FIELD_NUMBER: _ClassVar[int]
+ api_endpoint: str
+ model: str
+ temperature: float
+ images: _base_pb2.TextArray
+ image_properties: _base_pb2.TextArray
+ def __init__(self, api_endpoint: _Optional[str] = ..., model: _Optional[str] = ..., temperature: _Optional[float] = ..., images: _Optional[_Union[_base_pb2.TextArray, _Mapping]] = ..., image_properties: _Optional[_Union[_base_pb2.TextArray, _Mapping]] = ...) -> None: ...
+
+class GenerativeOpenAI(_message.Message):
+ __slots__ = ("frequency_penalty", "max_tokens", "model", "n", "presence_penalty", "stop", "temperature", "top_p", "base_url", "api_version", "resource_name", "deployment_id", "is_azure", "images", "image_properties", "reasoning_effort", "verbosity")
+ class ReasoningEffort(int, metaclass=_enum_type_wrapper.EnumTypeWrapper):
+ __slots__ = ()
+ REASONING_EFFORT_UNSPECIFIED: _ClassVar[GenerativeOpenAI.ReasoningEffort]
+ REASONING_EFFORT_MINIMAL: _ClassVar[GenerativeOpenAI.ReasoningEffort]
+ REASONING_EFFORT_LOW: _ClassVar[GenerativeOpenAI.ReasoningEffort]
+ REASONING_EFFORT_MEDIUM: _ClassVar[GenerativeOpenAI.ReasoningEffort]
+ REASONING_EFFORT_HIGH: _ClassVar[GenerativeOpenAI.ReasoningEffort]
+ REASONING_EFFORT_UNSPECIFIED: GenerativeOpenAI.ReasoningEffort
+ REASONING_EFFORT_MINIMAL: GenerativeOpenAI.ReasoningEffort
+ REASONING_EFFORT_LOW: GenerativeOpenAI.ReasoningEffort
+ REASONING_EFFORT_MEDIUM: GenerativeOpenAI.ReasoningEffort
+ REASONING_EFFORT_HIGH: GenerativeOpenAI.ReasoningEffort
+ class Verbosity(int, metaclass=_enum_type_wrapper.EnumTypeWrapper):
+ __slots__ = ()
+ VERBOSITY_UNSPECIFIED: _ClassVar[GenerativeOpenAI.Verbosity]
+ VERBOSITY_LOW: _ClassVar[GenerativeOpenAI.Verbosity]
+ VERBOSITY_MEDIUM: _ClassVar[GenerativeOpenAI.Verbosity]
+ VERBOSITY_HIGH: _ClassVar[GenerativeOpenAI.Verbosity]
+ VERBOSITY_UNSPECIFIED: GenerativeOpenAI.Verbosity
+ VERBOSITY_LOW: GenerativeOpenAI.Verbosity
+ VERBOSITY_MEDIUM: GenerativeOpenAI.Verbosity
+ VERBOSITY_HIGH: GenerativeOpenAI.Verbosity
+ FREQUENCY_PENALTY_FIELD_NUMBER: _ClassVar[int]
+ MAX_TOKENS_FIELD_NUMBER: _ClassVar[int]
+ MODEL_FIELD_NUMBER: _ClassVar[int]
+ N_FIELD_NUMBER: _ClassVar[int]
+ PRESENCE_PENALTY_FIELD_NUMBER: _ClassVar[int]
+ STOP_FIELD_NUMBER: _ClassVar[int]
+ TEMPERATURE_FIELD_NUMBER: _ClassVar[int]
+ TOP_P_FIELD_NUMBER: _ClassVar[int]
+ BASE_URL_FIELD_NUMBER: _ClassVar[int]
+ API_VERSION_FIELD_NUMBER: _ClassVar[int]
+ RESOURCE_NAME_FIELD_NUMBER: _ClassVar[int]
+ DEPLOYMENT_ID_FIELD_NUMBER: _ClassVar[int]
+ IS_AZURE_FIELD_NUMBER: _ClassVar[int]
+ IMAGES_FIELD_NUMBER: _ClassVar[int]
+ IMAGE_PROPERTIES_FIELD_NUMBER: _ClassVar[int]
+ REASONING_EFFORT_FIELD_NUMBER: _ClassVar[int]
+ VERBOSITY_FIELD_NUMBER: _ClassVar[int]
+ frequency_penalty: float
+ max_tokens: int
+ model: str
+ n: int
+ presence_penalty: float
+ stop: _base_pb2.TextArray
+ temperature: float
+ top_p: float
+ base_url: str
+ api_version: str
+ resource_name: str
+ deployment_id: str
+ is_azure: bool
+ images: _base_pb2.TextArray
+ image_properties: _base_pb2.TextArray
+ reasoning_effort: GenerativeOpenAI.ReasoningEffort
+ verbosity: GenerativeOpenAI.Verbosity
+ def __init__(self, frequency_penalty: _Optional[float] = ..., max_tokens: _Optional[int] = ..., model: _Optional[str] = ..., n: _Optional[int] = ..., presence_penalty: _Optional[float] = ..., stop: _Optional[_Union[_base_pb2.TextArray, _Mapping]] = ..., temperature: _Optional[float] = ..., top_p: _Optional[float] = ..., base_url: _Optional[str] = ..., api_version: _Optional[str] = ..., resource_name: _Optional[str] = ..., deployment_id: _Optional[str] = ..., is_azure: _Optional[bool] = ..., images: _Optional[_Union[_base_pb2.TextArray, _Mapping]] = ..., image_properties: _Optional[_Union[_base_pb2.TextArray, _Mapping]] = ..., reasoning_effort: _Optional[_Union[GenerativeOpenAI.ReasoningEffort, str]] = ..., verbosity: _Optional[_Union[GenerativeOpenAI.Verbosity, str]] = ...) -> None: ...
+
+class GenerativeGoogle(_message.Message):
+ __slots__ = ("frequency_penalty", "max_tokens", "model", "presence_penalty", "temperature", "top_k", "top_p", "stop_sequences", "api_endpoint", "project_id", "endpoint_id", "region", "images", "image_properties", "location")
+ FREQUENCY_PENALTY_FIELD_NUMBER: _ClassVar[int]
+ MAX_TOKENS_FIELD_NUMBER: _ClassVar[int]
+ MODEL_FIELD_NUMBER: _ClassVar[int]
+ PRESENCE_PENALTY_FIELD_NUMBER: _ClassVar[int]
+ TEMPERATURE_FIELD_NUMBER: _ClassVar[int]
+ TOP_K_FIELD_NUMBER: _ClassVar[int]
+ TOP_P_FIELD_NUMBER: _ClassVar[int]
+ STOP_SEQUENCES_FIELD_NUMBER: _ClassVar[int]
+ API_ENDPOINT_FIELD_NUMBER: _ClassVar[int]
+ PROJECT_ID_FIELD_NUMBER: _ClassVar[int]
+ ENDPOINT_ID_FIELD_NUMBER: _ClassVar[int]
+ REGION_FIELD_NUMBER: _ClassVar[int]
+ IMAGES_FIELD_NUMBER: _ClassVar[int]
+ IMAGE_PROPERTIES_FIELD_NUMBER: _ClassVar[int]
+ LOCATION_FIELD_NUMBER: _ClassVar[int]
+ frequency_penalty: float
+ max_tokens: int
+ model: str
+ presence_penalty: float
+ temperature: float
+ top_k: int
+ top_p: float
+ stop_sequences: _base_pb2.TextArray
+ api_endpoint: str
+ project_id: str
+ endpoint_id: str
+ region: str
+ images: _base_pb2.TextArray
+ image_properties: _base_pb2.TextArray
+ location: str
+ def __init__(self, frequency_penalty: _Optional[float] = ..., max_tokens: _Optional[int] = ..., model: _Optional[str] = ..., presence_penalty: _Optional[float] = ..., temperature: _Optional[float] = ..., top_k: _Optional[int] = ..., top_p: _Optional[float] = ..., stop_sequences: _Optional[_Union[_base_pb2.TextArray, _Mapping]] = ..., api_endpoint: _Optional[str] = ..., project_id: _Optional[str] = ..., endpoint_id: _Optional[str] = ..., region: _Optional[str] = ..., images: _Optional[_Union[_base_pb2.TextArray, _Mapping]] = ..., image_properties: _Optional[_Union[_base_pb2.TextArray, _Mapping]] = ..., location: _Optional[str] = ...) -> None: ...
+
+class GenerativeDatabricks(_message.Message):
+ __slots__ = ("endpoint", "model", "frequency_penalty", "log_probs", "top_log_probs", "max_tokens", "n", "presence_penalty", "stop", "temperature", "top_p")
+ ENDPOINT_FIELD_NUMBER: _ClassVar[int]
+ MODEL_FIELD_NUMBER: _ClassVar[int]
+ FREQUENCY_PENALTY_FIELD_NUMBER: _ClassVar[int]
+ LOG_PROBS_FIELD_NUMBER: _ClassVar[int]
+ TOP_LOG_PROBS_FIELD_NUMBER: _ClassVar[int]
+ MAX_TOKENS_FIELD_NUMBER: _ClassVar[int]
+ N_FIELD_NUMBER: _ClassVar[int]
+ PRESENCE_PENALTY_FIELD_NUMBER: _ClassVar[int]
+ STOP_FIELD_NUMBER: _ClassVar[int]
+ TEMPERATURE_FIELD_NUMBER: _ClassVar[int]
+ TOP_P_FIELD_NUMBER: _ClassVar[int]
+ endpoint: str
+ model: str
+ frequency_penalty: float
+ log_probs: bool
+ top_log_probs: int
+ max_tokens: int
+ n: int
+ presence_penalty: float
+ stop: _base_pb2.TextArray
+ temperature: float
+ top_p: float
+ def __init__(self, endpoint: _Optional[str] = ..., model: _Optional[str] = ..., frequency_penalty: _Optional[float] = ..., log_probs: _Optional[bool] = ..., top_log_probs: _Optional[int] = ..., max_tokens: _Optional[int] = ..., n: _Optional[int] = ..., presence_penalty: _Optional[float] = ..., stop: _Optional[_Union[_base_pb2.TextArray, _Mapping]] = ..., temperature: _Optional[float] = ..., top_p: _Optional[float] = ...) -> None: ...
+
+class GenerativeFriendliAI(_message.Message):
+ __slots__ = ("base_url", "model", "max_tokens", "temperature", "n", "top_p")
+ BASE_URL_FIELD_NUMBER: _ClassVar[int]
+ MODEL_FIELD_NUMBER: _ClassVar[int]
+ MAX_TOKENS_FIELD_NUMBER: _ClassVar[int]
+ TEMPERATURE_FIELD_NUMBER: _ClassVar[int]
+ N_FIELD_NUMBER: _ClassVar[int]
+ TOP_P_FIELD_NUMBER: _ClassVar[int]
+ base_url: str
+ model: str
+ max_tokens: int
+ temperature: float
+ n: int
+ top_p: float
+ def __init__(self, base_url: _Optional[str] = ..., model: _Optional[str] = ..., max_tokens: _Optional[int] = ..., temperature: _Optional[float] = ..., n: _Optional[int] = ..., top_p: _Optional[float] = ...) -> None: ...
+
+class GenerativeNvidia(_message.Message):
+ __slots__ = ("base_url", "model", "temperature", "top_p", "max_tokens")
+ BASE_URL_FIELD_NUMBER: _ClassVar[int]
+ MODEL_FIELD_NUMBER: _ClassVar[int]
+ TEMPERATURE_FIELD_NUMBER: _ClassVar[int]
+ TOP_P_FIELD_NUMBER: _ClassVar[int]
+ MAX_TOKENS_FIELD_NUMBER: _ClassVar[int]
+ base_url: str
+ model: str
+ temperature: float
+ top_p: float
+ max_tokens: int
+ def __init__(self, base_url: _Optional[str] = ..., model: _Optional[str] = ..., temperature: _Optional[float] = ..., top_p: _Optional[float] = ..., max_tokens: _Optional[int] = ...) -> None: ...
+
+class GenerativeXAI(_message.Message):
+ __slots__ = ("base_url", "model", "temperature", "top_p", "max_tokens", "images", "image_properties")
+ BASE_URL_FIELD_NUMBER: _ClassVar[int]
+ MODEL_FIELD_NUMBER: _ClassVar[int]
+ TEMPERATURE_FIELD_NUMBER: _ClassVar[int]
+ TOP_P_FIELD_NUMBER: _ClassVar[int]
+ MAX_TOKENS_FIELD_NUMBER: _ClassVar[int]
+ IMAGES_FIELD_NUMBER: _ClassVar[int]
+ IMAGE_PROPERTIES_FIELD_NUMBER: _ClassVar[int]
+ base_url: str
+ model: str
+ temperature: float
+ top_p: float
+ max_tokens: int
+ images: _base_pb2.TextArray
+ image_properties: _base_pb2.TextArray
+ def __init__(self, base_url: _Optional[str] = ..., model: _Optional[str] = ..., temperature: _Optional[float] = ..., top_p: _Optional[float] = ..., max_tokens: _Optional[int] = ..., images: _Optional[_Union[_base_pb2.TextArray, _Mapping]] = ..., image_properties: _Optional[_Union[_base_pb2.TextArray, _Mapping]] = ...) -> None: ...
+
+class GenerativeContextualAI(_message.Message):
+ __slots__ = ("model", "temperature", "top_p", "max_new_tokens", "system_prompt", "avoid_commentary", "knowledge")
+ MODEL_FIELD_NUMBER: _ClassVar[int]
+ TEMPERATURE_FIELD_NUMBER: _ClassVar[int]
+ TOP_P_FIELD_NUMBER: _ClassVar[int]
+ MAX_NEW_TOKENS_FIELD_NUMBER: _ClassVar[int]
+ SYSTEM_PROMPT_FIELD_NUMBER: _ClassVar[int]
+ AVOID_COMMENTARY_FIELD_NUMBER: _ClassVar[int]
+ KNOWLEDGE_FIELD_NUMBER: _ClassVar[int]
+ model: str
+ temperature: float
+ top_p: float
+ max_new_tokens: int
+ system_prompt: str
+ avoid_commentary: bool
+ knowledge: _base_pb2.TextArray
+ def __init__(self, model: _Optional[str] = ..., temperature: _Optional[float] = ..., top_p: _Optional[float] = ..., max_new_tokens: _Optional[int] = ..., system_prompt: _Optional[str] = ..., avoid_commentary: _Optional[bool] = ..., knowledge: _Optional[_Union[_base_pb2.TextArray, _Mapping]] = ...) -> None: ...
+
+class GenerativeDeepseek(_message.Message):
+ __slots__ = ("base_url", "model", "temperature", "max_tokens", "frequency_penalty", "presence_penalty", "top_p", "stop")
+ BASE_URL_FIELD_NUMBER: _ClassVar[int]
+ MODEL_FIELD_NUMBER: _ClassVar[int]
+ TEMPERATURE_FIELD_NUMBER: _ClassVar[int]
+ MAX_TOKENS_FIELD_NUMBER: _ClassVar[int]
+ FREQUENCY_PENALTY_FIELD_NUMBER: _ClassVar[int]
+ PRESENCE_PENALTY_FIELD_NUMBER: _ClassVar[int]
+ TOP_P_FIELD_NUMBER: _ClassVar[int]
+ STOP_FIELD_NUMBER: _ClassVar[int]
+ base_url: str
+ model: str
+ temperature: float
+ max_tokens: int
+ frequency_penalty: float
+ presence_penalty: float
+ top_p: float
+ stop: _base_pb2.TextArray
+ def __init__(self, base_url: _Optional[str] = ..., model: _Optional[str] = ..., temperature: _Optional[float] = ..., max_tokens: _Optional[int] = ..., frequency_penalty: _Optional[float] = ..., presence_penalty: _Optional[float] = ..., top_p: _Optional[float] = ..., stop: _Optional[_Union[_base_pb2.TextArray, _Mapping]] = ...) -> None: ...
+
+class GenerativeDigitalOcean(_message.Message):
+ __slots__ = ("base_url", "model", "temperature", "top_p", "max_tokens", "frequency_penalty", "presence_penalty", "stop")
+ BASE_URL_FIELD_NUMBER: _ClassVar[int]
+ MODEL_FIELD_NUMBER: _ClassVar[int]
+ TEMPERATURE_FIELD_NUMBER: _ClassVar[int]
+ TOP_P_FIELD_NUMBER: _ClassVar[int]
+ MAX_TOKENS_FIELD_NUMBER: _ClassVar[int]
+ FREQUENCY_PENALTY_FIELD_NUMBER: _ClassVar[int]
+ PRESENCE_PENALTY_FIELD_NUMBER: _ClassVar[int]
+ STOP_FIELD_NUMBER: _ClassVar[int]
+ base_url: str
+ model: str
+ temperature: float
+ top_p: float
+ max_tokens: int
+ frequency_penalty: float
+ presence_penalty: float
+ stop: _base_pb2.TextArray
+ def __init__(self, base_url: _Optional[str] = ..., model: _Optional[str] = ..., temperature: _Optional[float] = ..., top_p: _Optional[float] = ..., max_tokens: _Optional[int] = ..., frequency_penalty: _Optional[float] = ..., presence_penalty: _Optional[float] = ..., stop: _Optional[_Union[_base_pb2.TextArray, _Mapping]] = ...) -> None: ...
+
+class GenerativeMeta(_message.Message):
+ __slots__ = ("base_url", "model", "temperature", "top_p", "max_tokens", "frequency_penalty", "presence_penalty", "reasoning_effort", "images", "image_properties")
+ class ReasoningEffort(int, metaclass=_enum_type_wrapper.EnumTypeWrapper):
+ __slots__ = ()
+ REASONING_EFFORT_UNSPECIFIED: _ClassVar[GenerativeMeta.ReasoningEffort]
+ REASONING_EFFORT_NONE: _ClassVar[GenerativeMeta.ReasoningEffort]
+ REASONING_EFFORT_MINIMAL: _ClassVar[GenerativeMeta.ReasoningEffort]
+ REASONING_EFFORT_LOW: _ClassVar[GenerativeMeta.ReasoningEffort]
+ REASONING_EFFORT_MEDIUM: _ClassVar[GenerativeMeta.ReasoningEffort]
+ REASONING_EFFORT_HIGH: _ClassVar[GenerativeMeta.ReasoningEffort]
+ REASONING_EFFORT_XHIGH: _ClassVar[GenerativeMeta.ReasoningEffort]
+ REASONING_EFFORT_UNSPECIFIED: GenerativeMeta.ReasoningEffort
+ REASONING_EFFORT_NONE: GenerativeMeta.ReasoningEffort
+ REASONING_EFFORT_MINIMAL: GenerativeMeta.ReasoningEffort
+ REASONING_EFFORT_LOW: GenerativeMeta.ReasoningEffort
+ REASONING_EFFORT_MEDIUM: GenerativeMeta.ReasoningEffort
+ REASONING_EFFORT_HIGH: GenerativeMeta.ReasoningEffort
+ REASONING_EFFORT_XHIGH: GenerativeMeta.ReasoningEffort
+ BASE_URL_FIELD_NUMBER: _ClassVar[int]
+ MODEL_FIELD_NUMBER: _ClassVar[int]
+ TEMPERATURE_FIELD_NUMBER: _ClassVar[int]
+ TOP_P_FIELD_NUMBER: _ClassVar[int]
+ MAX_TOKENS_FIELD_NUMBER: _ClassVar[int]
+ FREQUENCY_PENALTY_FIELD_NUMBER: _ClassVar[int]
+ PRESENCE_PENALTY_FIELD_NUMBER: _ClassVar[int]
+ REASONING_EFFORT_FIELD_NUMBER: _ClassVar[int]
+ IMAGES_FIELD_NUMBER: _ClassVar[int]
+ IMAGE_PROPERTIES_FIELD_NUMBER: _ClassVar[int]
+ base_url: str
+ model: str
+ temperature: float
+ top_p: float
+ max_tokens: int
+ frequency_penalty: float
+ presence_penalty: float
+ reasoning_effort: GenerativeMeta.ReasoningEffort
+ images: _base_pb2.TextArray
+ image_properties: _base_pb2.TextArray
+ def __init__(self, base_url: _Optional[str] = ..., model: _Optional[str] = ..., temperature: _Optional[float] = ..., top_p: _Optional[float] = ..., max_tokens: _Optional[int] = ..., frequency_penalty: _Optional[float] = ..., presence_penalty: _Optional[float] = ..., reasoning_effort: _Optional[_Union[GenerativeMeta.ReasoningEffort, str]] = ..., images: _Optional[_Union[_base_pb2.TextArray, _Mapping]] = ..., image_properties: _Optional[_Union[_base_pb2.TextArray, _Mapping]] = ...) -> None: ...
+
+class GenerativeAnthropicMetadata(_message.Message):
+ __slots__ = ("usage",)
+ class Usage(_message.Message):
+ __slots__ = ("input_tokens", "output_tokens")
+ INPUT_TOKENS_FIELD_NUMBER: _ClassVar[int]
+ OUTPUT_TOKENS_FIELD_NUMBER: _ClassVar[int]
+ input_tokens: int
+ output_tokens: int
+ def __init__(self, input_tokens: _Optional[int] = ..., output_tokens: _Optional[int] = ...) -> None: ...
+ USAGE_FIELD_NUMBER: _ClassVar[int]
+ usage: GenerativeAnthropicMetadata.Usage
+ def __init__(self, usage: _Optional[_Union[GenerativeAnthropicMetadata.Usage, _Mapping]] = ...) -> None: ...
+
+class GenerativeAnyscaleMetadata(_message.Message):
+ __slots__ = ()
+ def __init__(self) -> None: ...
+
+class GenerativeAWSMetadata(_message.Message):
+ __slots__ = ()
+ def __init__(self) -> None: ...
+
+class GenerativeCohereMetadata(_message.Message):
+ __slots__ = ("api_version", "billed_units", "tokens", "warnings")
+ class ApiVersion(_message.Message):
+ __slots__ = ("version", "is_deprecated", "is_experimental")
+ VERSION_FIELD_NUMBER: _ClassVar[int]
+ IS_DEPRECATED_FIELD_NUMBER: _ClassVar[int]
+ IS_EXPERIMENTAL_FIELD_NUMBER: _ClassVar[int]
+ version: str
+ is_deprecated: bool
+ is_experimental: bool
+ def __init__(self, version: _Optional[str] = ..., is_deprecated: _Optional[bool] = ..., is_experimental: _Optional[bool] = ...) -> None: ...
+ class BilledUnits(_message.Message):
+ __slots__ = ("input_tokens", "output_tokens", "search_units", "classifications")
+ INPUT_TOKENS_FIELD_NUMBER: _ClassVar[int]
+ OUTPUT_TOKENS_FIELD_NUMBER: _ClassVar[int]
+ SEARCH_UNITS_FIELD_NUMBER: _ClassVar[int]
+ CLASSIFICATIONS_FIELD_NUMBER: _ClassVar[int]
+ input_tokens: float
+ output_tokens: float
+ search_units: float
+ classifications: float
+ def __init__(self, input_tokens: _Optional[float] = ..., output_tokens: _Optional[float] = ..., search_units: _Optional[float] = ..., classifications: _Optional[float] = ...) -> None: ...
+ class Tokens(_message.Message):
+ __slots__ = ("input_tokens", "output_tokens")
+ INPUT_TOKENS_FIELD_NUMBER: _ClassVar[int]
+ OUTPUT_TOKENS_FIELD_NUMBER: _ClassVar[int]
+ input_tokens: float
+ output_tokens: float
+ def __init__(self, input_tokens: _Optional[float] = ..., output_tokens: _Optional[float] = ...) -> None: ...
+ API_VERSION_FIELD_NUMBER: _ClassVar[int]
+ BILLED_UNITS_FIELD_NUMBER: _ClassVar[int]
+ TOKENS_FIELD_NUMBER: _ClassVar[int]
+ WARNINGS_FIELD_NUMBER: _ClassVar[int]
+ api_version: GenerativeCohereMetadata.ApiVersion
+ billed_units: GenerativeCohereMetadata.BilledUnits
+ tokens: GenerativeCohereMetadata.Tokens
+ warnings: _base_pb2.TextArray
+ def __init__(self, api_version: _Optional[_Union[GenerativeCohereMetadata.ApiVersion, _Mapping]] = ..., billed_units: _Optional[_Union[GenerativeCohereMetadata.BilledUnits, _Mapping]] = ..., tokens: _Optional[_Union[GenerativeCohereMetadata.Tokens, _Mapping]] = ..., warnings: _Optional[_Union[_base_pb2.TextArray, _Mapping]] = ...) -> None: ...
+
+class GenerativeDummyMetadata(_message.Message):
+ __slots__ = ()
+ def __init__(self) -> None: ...
+
+class GenerativeMistralMetadata(_message.Message):
+ __slots__ = ("usage",)
+ class Usage(_message.Message):
+ __slots__ = ("prompt_tokens", "completion_tokens", "total_tokens")
+ PROMPT_TOKENS_FIELD_NUMBER: _ClassVar[int]
+ COMPLETION_TOKENS_FIELD_NUMBER: _ClassVar[int]
+ TOTAL_TOKENS_FIELD_NUMBER: _ClassVar[int]
+ prompt_tokens: int
+ completion_tokens: int
+ total_tokens: int
+ def __init__(self, prompt_tokens: _Optional[int] = ..., completion_tokens: _Optional[int] = ..., total_tokens: _Optional[int] = ...) -> None: ...
+ USAGE_FIELD_NUMBER: _ClassVar[int]
+ usage: GenerativeMistralMetadata.Usage
+ def __init__(self, usage: _Optional[_Union[GenerativeMistralMetadata.Usage, _Mapping]] = ...) -> None: ...
+
+class GenerativeOllamaMetadata(_message.Message):
+ __slots__ = ()
+ def __init__(self) -> None: ...
+
+class GenerativeOpenAIMetadata(_message.Message):
+ __slots__ = ("usage",)
+ class Usage(_message.Message):
+ __slots__ = ("prompt_tokens", "completion_tokens", "total_tokens")
+ PROMPT_TOKENS_FIELD_NUMBER: _ClassVar[int]
+ COMPLETION_TOKENS_FIELD_NUMBER: _ClassVar[int]
+ TOTAL_TOKENS_FIELD_NUMBER: _ClassVar[int]
+ prompt_tokens: int
+ completion_tokens: int
+ total_tokens: int
+ def __init__(self, prompt_tokens: _Optional[int] = ..., completion_tokens: _Optional[int] = ..., total_tokens: _Optional[int] = ...) -> None: ...
+ USAGE_FIELD_NUMBER: _ClassVar[int]
+ usage: GenerativeOpenAIMetadata.Usage
+ def __init__(self, usage: _Optional[_Union[GenerativeOpenAIMetadata.Usage, _Mapping]] = ...) -> None: ...
+
+class GenerativeGoogleMetadata(_message.Message):
+ __slots__ = ("metadata", "usage_metadata")
+ class TokenCount(_message.Message):
+ __slots__ = ("total_billable_characters", "total_tokens")
+ TOTAL_BILLABLE_CHARACTERS_FIELD_NUMBER: _ClassVar[int]
+ TOTAL_TOKENS_FIELD_NUMBER: _ClassVar[int]
+ total_billable_characters: int
+ total_tokens: int
+ def __init__(self, total_billable_characters: _Optional[int] = ..., total_tokens: _Optional[int] = ...) -> None: ...
+ class TokenMetadata(_message.Message):
+ __slots__ = ("input_token_count", "output_token_count")
+ INPUT_TOKEN_COUNT_FIELD_NUMBER: _ClassVar[int]
+ OUTPUT_TOKEN_COUNT_FIELD_NUMBER: _ClassVar[int]
+ input_token_count: GenerativeGoogleMetadata.TokenCount
+ output_token_count: GenerativeGoogleMetadata.TokenCount
+ def __init__(self, input_token_count: _Optional[_Union[GenerativeGoogleMetadata.TokenCount, _Mapping]] = ..., output_token_count: _Optional[_Union[GenerativeGoogleMetadata.TokenCount, _Mapping]] = ...) -> None: ...
+ class Metadata(_message.Message):
+ __slots__ = ("token_metadata",)
+ TOKEN_METADATA_FIELD_NUMBER: _ClassVar[int]
+ token_metadata: GenerativeGoogleMetadata.TokenMetadata
+ def __init__(self, token_metadata: _Optional[_Union[GenerativeGoogleMetadata.TokenMetadata, _Mapping]] = ...) -> None: ...
+ class UsageMetadata(_message.Message):
+ __slots__ = ("prompt_token_count", "candidates_token_count", "total_token_count")
+ PROMPT_TOKEN_COUNT_FIELD_NUMBER: _ClassVar[int]
+ CANDIDATES_TOKEN_COUNT_FIELD_NUMBER: _ClassVar[int]
+ TOTAL_TOKEN_COUNT_FIELD_NUMBER: _ClassVar[int]
+ prompt_token_count: int
+ candidates_token_count: int
+ total_token_count: int
+ def __init__(self, prompt_token_count: _Optional[int] = ..., candidates_token_count: _Optional[int] = ..., total_token_count: _Optional[int] = ...) -> None: ...
+ METADATA_FIELD_NUMBER: _ClassVar[int]
+ USAGE_METADATA_FIELD_NUMBER: _ClassVar[int]
+ metadata: GenerativeGoogleMetadata.Metadata
+ usage_metadata: GenerativeGoogleMetadata.UsageMetadata
+ def __init__(self, metadata: _Optional[_Union[GenerativeGoogleMetadata.Metadata, _Mapping]] = ..., usage_metadata: _Optional[_Union[GenerativeGoogleMetadata.UsageMetadata, _Mapping]] = ...) -> None: ...
+
+class GenerativeDatabricksMetadata(_message.Message):
+ __slots__ = ("usage",)
+ class Usage(_message.Message):
+ __slots__ = ("prompt_tokens", "completion_tokens", "total_tokens")
+ PROMPT_TOKENS_FIELD_NUMBER: _ClassVar[int]
+ COMPLETION_TOKENS_FIELD_NUMBER: _ClassVar[int]
+ TOTAL_TOKENS_FIELD_NUMBER: _ClassVar[int]
+ prompt_tokens: int
+ completion_tokens: int
+ total_tokens: int
+ def __init__(self, prompt_tokens: _Optional[int] = ..., completion_tokens: _Optional[int] = ..., total_tokens: _Optional[int] = ...) -> None: ...
+ USAGE_FIELD_NUMBER: _ClassVar[int]
+ usage: GenerativeDatabricksMetadata.Usage
+ def __init__(self, usage: _Optional[_Union[GenerativeDatabricksMetadata.Usage, _Mapping]] = ...) -> None: ...
+
+class GenerativeFriendliAIMetadata(_message.Message):
+ __slots__ = ("usage",)
+ class Usage(_message.Message):
+ __slots__ = ("prompt_tokens", "completion_tokens", "total_tokens")
+ PROMPT_TOKENS_FIELD_NUMBER: _ClassVar[int]
+ COMPLETION_TOKENS_FIELD_NUMBER: _ClassVar[int]
+ TOTAL_TOKENS_FIELD_NUMBER: _ClassVar[int]
+ prompt_tokens: int
+ completion_tokens: int
+ total_tokens: int
+ def __init__(self, prompt_tokens: _Optional[int] = ..., completion_tokens: _Optional[int] = ..., total_tokens: _Optional[int] = ...) -> None: ...
+ USAGE_FIELD_NUMBER: _ClassVar[int]
+ usage: GenerativeFriendliAIMetadata.Usage
+ def __init__(self, usage: _Optional[_Union[GenerativeFriendliAIMetadata.Usage, _Mapping]] = ...) -> None: ...
+
+class GenerativeNvidiaMetadata(_message.Message):
+ __slots__ = ("usage",)
+ class Usage(_message.Message):
+ __slots__ = ("prompt_tokens", "completion_tokens", "total_tokens")
+ PROMPT_TOKENS_FIELD_NUMBER: _ClassVar[int]
+ COMPLETION_TOKENS_FIELD_NUMBER: _ClassVar[int]
+ TOTAL_TOKENS_FIELD_NUMBER: _ClassVar[int]
+ prompt_tokens: int
+ completion_tokens: int
+ total_tokens: int
+ def __init__(self, prompt_tokens: _Optional[int] = ..., completion_tokens: _Optional[int] = ..., total_tokens: _Optional[int] = ...) -> None: ...
+ USAGE_FIELD_NUMBER: _ClassVar[int]
+ usage: GenerativeNvidiaMetadata.Usage
+ def __init__(self, usage: _Optional[_Union[GenerativeNvidiaMetadata.Usage, _Mapping]] = ...) -> None: ...
+
+class GenerativeXAIMetadata(_message.Message):
+ __slots__ = ("usage",)
+ class Usage(_message.Message):
+ __slots__ = ("prompt_tokens", "completion_tokens", "total_tokens")
+ PROMPT_TOKENS_FIELD_NUMBER: _ClassVar[int]
+ COMPLETION_TOKENS_FIELD_NUMBER: _ClassVar[int]
+ TOTAL_TOKENS_FIELD_NUMBER: _ClassVar[int]
+ prompt_tokens: int
+ completion_tokens: int
+ total_tokens: int
+ def __init__(self, prompt_tokens: _Optional[int] = ..., completion_tokens: _Optional[int] = ..., total_tokens: _Optional[int] = ...) -> None: ...
+ USAGE_FIELD_NUMBER: _ClassVar[int]
+ usage: GenerativeXAIMetadata.Usage
+ def __init__(self, usage: _Optional[_Union[GenerativeXAIMetadata.Usage, _Mapping]] = ...) -> None: ...
+
+class GenerativeDeepseekMetadata(_message.Message):
+ __slots__ = ("usage",)
+ class Usage(_message.Message):
+ __slots__ = ("prompt_tokens", "completion_tokens", "total_tokens")
+ PROMPT_TOKENS_FIELD_NUMBER: _ClassVar[int]
+ COMPLETION_TOKENS_FIELD_NUMBER: _ClassVar[int]
+ TOTAL_TOKENS_FIELD_NUMBER: _ClassVar[int]
+ prompt_tokens: int
+ completion_tokens: int
+ total_tokens: int
+ def __init__(self, prompt_tokens: _Optional[int] = ..., completion_tokens: _Optional[int] = ..., total_tokens: _Optional[int] = ...) -> None: ...
+ USAGE_FIELD_NUMBER: _ClassVar[int]
+ usage: GenerativeDeepseekMetadata.Usage
+ def __init__(self, usage: _Optional[_Union[GenerativeDeepseekMetadata.Usage, _Mapping]] = ...) -> None: ...
+
+class GenerativeDigitalOceanMetadata(_message.Message):
+ __slots__ = ("usage",)
+ class Usage(_message.Message):
+ __slots__ = ("prompt_tokens", "completion_tokens", "total_tokens")
+ PROMPT_TOKENS_FIELD_NUMBER: _ClassVar[int]
+ COMPLETION_TOKENS_FIELD_NUMBER: _ClassVar[int]
+ TOTAL_TOKENS_FIELD_NUMBER: _ClassVar[int]
+ prompt_tokens: int
+ completion_tokens: int
+ total_tokens: int
+ def __init__(self, prompt_tokens: _Optional[int] = ..., completion_tokens: _Optional[int] = ..., total_tokens: _Optional[int] = ...) -> None: ...
+ USAGE_FIELD_NUMBER: _ClassVar[int]
+ usage: GenerativeDigitalOceanMetadata.Usage
+ def __init__(self, usage: _Optional[_Union[GenerativeDigitalOceanMetadata.Usage, _Mapping]] = ...) -> None: ...
+
+class GenerativeMetaMetadata(_message.Message):
+ __slots__ = ("usage",)
+ class Usage(_message.Message):
+ __slots__ = ("prompt_tokens", "completion_tokens", "total_tokens")
+ PROMPT_TOKENS_FIELD_NUMBER: _ClassVar[int]
+ COMPLETION_TOKENS_FIELD_NUMBER: _ClassVar[int]
+ TOTAL_TOKENS_FIELD_NUMBER: _ClassVar[int]
+ prompt_tokens: int
+ completion_tokens: int
+ total_tokens: int
+ def __init__(self, prompt_tokens: _Optional[int] = ..., completion_tokens: _Optional[int] = ..., total_tokens: _Optional[int] = ...) -> None: ...
+ USAGE_FIELD_NUMBER: _ClassVar[int]
+ usage: GenerativeMetaMetadata.Usage
+ def __init__(self, usage: _Optional[_Union[GenerativeMetaMetadata.Usage, _Mapping]] = ...) -> None: ...
+
+class GenerativeMetadata(_message.Message):
+ __slots__ = ("anthropic", "anyscale", "aws", "cohere", "dummy", "mistral", "ollama", "openai", "google", "databricks", "friendliai", "nvidia", "xai", "deepseek", "digitalocean", "meta")
+ ANTHROPIC_FIELD_NUMBER: _ClassVar[int]
+ ANYSCALE_FIELD_NUMBER: _ClassVar[int]
+ AWS_FIELD_NUMBER: _ClassVar[int]
+ COHERE_FIELD_NUMBER: _ClassVar[int]
+ DUMMY_FIELD_NUMBER: _ClassVar[int]
+ MISTRAL_FIELD_NUMBER: _ClassVar[int]
+ OLLAMA_FIELD_NUMBER: _ClassVar[int]
+ OPENAI_FIELD_NUMBER: _ClassVar[int]
+ GOOGLE_FIELD_NUMBER: _ClassVar[int]
+ DATABRICKS_FIELD_NUMBER: _ClassVar[int]
+ FRIENDLIAI_FIELD_NUMBER: _ClassVar[int]
+ NVIDIA_FIELD_NUMBER: _ClassVar[int]
+ XAI_FIELD_NUMBER: _ClassVar[int]
+ DEEPSEEK_FIELD_NUMBER: _ClassVar[int]
+ DIGITALOCEAN_FIELD_NUMBER: _ClassVar[int]
+ META_FIELD_NUMBER: _ClassVar[int]
+ anthropic: GenerativeAnthropicMetadata
+ anyscale: GenerativeAnyscaleMetadata
+ aws: GenerativeAWSMetadata
+ cohere: GenerativeCohereMetadata
+ dummy: GenerativeDummyMetadata
+ mistral: GenerativeMistralMetadata
+ ollama: GenerativeOllamaMetadata
+ openai: GenerativeOpenAIMetadata
+ google: GenerativeGoogleMetadata
+ databricks: GenerativeDatabricksMetadata
+ friendliai: GenerativeFriendliAIMetadata
+ nvidia: GenerativeNvidiaMetadata
+ xai: GenerativeXAIMetadata
+ deepseek: GenerativeDeepseekMetadata
+ digitalocean: GenerativeDigitalOceanMetadata
+ meta: GenerativeMetaMetadata
+ def __init__(self, anthropic: _Optional[_Union[GenerativeAnthropicMetadata, _Mapping]] = ..., anyscale: _Optional[_Union[GenerativeAnyscaleMetadata, _Mapping]] = ..., aws: _Optional[_Union[GenerativeAWSMetadata, _Mapping]] = ..., cohere: _Optional[_Union[GenerativeCohereMetadata, _Mapping]] = ..., dummy: _Optional[_Union[GenerativeDummyMetadata, _Mapping]] = ..., mistral: _Optional[_Union[GenerativeMistralMetadata, _Mapping]] = ..., ollama: _Optional[_Union[GenerativeOllamaMetadata, _Mapping]] = ..., openai: _Optional[_Union[GenerativeOpenAIMetadata, _Mapping]] = ..., google: _Optional[_Union[GenerativeGoogleMetadata, _Mapping]] = ..., databricks: _Optional[_Union[GenerativeDatabricksMetadata, _Mapping]] = ..., friendliai: _Optional[_Union[GenerativeFriendliAIMetadata, _Mapping]] = ..., nvidia: _Optional[_Union[GenerativeNvidiaMetadata, _Mapping]] = ..., xai: _Optional[_Union[GenerativeXAIMetadata, _Mapping]] = ..., deepseek: _Optional[_Union[GenerativeDeepseekMetadata, _Mapping]] = ..., digitalocean: _Optional[_Union[GenerativeDigitalOceanMetadata, _Mapping]] = ..., meta: _Optional[_Union[GenerativeMetaMetadata, _Mapping]] = ...) -> None: ...
+
+class GenerativeReply(_message.Message):
+ __slots__ = ("result", "debug", "metadata")
+ RESULT_FIELD_NUMBER: _ClassVar[int]
+ DEBUG_FIELD_NUMBER: _ClassVar[int]
+ METADATA_FIELD_NUMBER: _ClassVar[int]
+ result: str
+ debug: GenerativeDebug
+ metadata: GenerativeMetadata
+ def __init__(self, result: _Optional[str] = ..., debug: _Optional[_Union[GenerativeDebug, _Mapping]] = ..., metadata: _Optional[_Union[GenerativeMetadata, _Mapping]] = ...) -> None: ...
+
+class GenerativeResult(_message.Message):
+ __slots__ = ("values",)
+ VALUES_FIELD_NUMBER: _ClassVar[int]
+ values: _containers.RepeatedCompositeFieldContainer[GenerativeReply]
+ def __init__(self, values: _Optional[_Iterable[_Union[GenerativeReply, _Mapping]]] = ...) -> None: ...
+
+class GenerativeDebug(_message.Message):
+ __slots__ = ("full_prompt",)
+ FULL_PROMPT_FIELD_NUMBER: _ClassVar[int]
+ full_prompt: str
+ def __init__(self, full_prompt: _Optional[str] = ...) -> None: ...
diff --git a/weaviate/proto/v1/v7351/v1/generative_pb2_grpc.py b/weaviate/proto/v1/v7351/v1/generative_pb2_grpc.py
new file mode 100644
index 000000000..338870015
--- /dev/null
+++ b/weaviate/proto/v1/v7351/v1/generative_pb2_grpc.py
@@ -0,0 +1,24 @@
+# Generated by the gRPC Python protocol compiler plugin. DO NOT EDIT!
+"""Client and server classes corresponding to protobuf-defined services."""
+import grpc
+import warnings
+
+
+GRPC_GENERATED_VERSION = '1.83.0'
+GRPC_VERSION = grpc.__version__
+_version_not_supported = False
+
+try:
+ from grpc._utilities import first_version_is_lower
+ _version_not_supported = first_version_is_lower(GRPC_VERSION, GRPC_GENERATED_VERSION)
+except ImportError:
+ _version_not_supported = True
+
+if _version_not_supported:
+ raise RuntimeError(
+ f'The grpc package installed is at version {GRPC_VERSION},'
+ + ' but the generated code in v1/generative_pb2_grpc.py depends on'
+ + f' grpcio>={GRPC_GENERATED_VERSION}.'
+ + f' Please upgrade your grpc module to grpcio>={GRPC_GENERATED_VERSION}'
+ + f' or downgrade your generated code using grpcio-tools<={GRPC_VERSION}.'
+ )
diff --git a/weaviate/proto/v1/v7351/v1/health_weaviate_pb2.py b/weaviate/proto/v1/v7351/v1/health_weaviate_pb2.py
new file mode 100644
index 000000000..304d279a6
--- /dev/null
+++ b/weaviate/proto/v1/v7351/v1/health_weaviate_pb2.py
@@ -0,0 +1,41 @@
+# -*- coding: utf-8 -*-
+# Generated by the protocol buffer compiler. DO NOT EDIT!
+# NO CHECKED-IN PROTOBUF GENCODE
+# source: v1/health_weaviate.proto
+# Protobuf Python Version: 7.35.1
+"""Generated protocol buffer code."""
+from google.protobuf import descriptor as _descriptor
+from google.protobuf import descriptor_pool as _descriptor_pool
+from google.protobuf import runtime_version as _runtime_version
+from google.protobuf import symbol_database as _symbol_database
+from google.protobuf.internal import builder as _builder
+_runtime_version.ValidateProtobufRuntimeVersion(
+ _runtime_version.Domain.PUBLIC,
+ 7,
+ 35,
+ 1,
+ '',
+ 'v1/health_weaviate.proto'
+)
+# @@protoc_insertion_point(imports)
+
+_sym_db = _symbol_database.Default()
+
+
+
+
+DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n\x18v1/health_weaviate.proto\x12\x0bweaviate.v1\"-\n\x1aWeaviateHealthCheckRequest\x12\x0f\n\x07service\x18\x01 \x01(\t\"\xa1\x01\n\x1bWeaviateHealthCheckResponse\x12\x46\n\x06status\x18\x01 \x01(\x0e\x32\x36.weaviate.v1.WeaviateHealthCheckResponse.ServingStatus\":\n\rServingStatus\x12\x0b\n\x07UNKNOWN\x10\x00\x12\x0b\n\x07SERVING\x10\x01\x12\x0f\n\x0bNOT_SERVING\x10\x02\x42k\n#io.weaviate.client.grpc.protocol.v1B\x0eWeaviateHealthZ4github.com/weaviate/weaviate/grpc/generated;protocolb\x06proto3')
+
+_globals = globals()
+_builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, _globals)
+_builder.BuildTopDescriptorsAndMessages(DESCRIPTOR, 'v1.health_weaviate_pb2', _globals)
+if not _descriptor._USE_C_DESCRIPTORS:
+ _globals['DESCRIPTOR']._loaded_options = None
+ _globals['DESCRIPTOR']._serialized_options = b'\n#io.weaviate.client.grpc.protocol.v1B\016WeaviateHealthZ4github.com/weaviate/weaviate/grpc/generated;protocol'
+ _globals['_WEAVIATEHEALTHCHECKREQUEST']._serialized_start=41
+ _globals['_WEAVIATEHEALTHCHECKREQUEST']._serialized_end=86
+ _globals['_WEAVIATEHEALTHCHECKRESPONSE']._serialized_start=89
+ _globals['_WEAVIATEHEALTHCHECKRESPONSE']._serialized_end=250
+ _globals['_WEAVIATEHEALTHCHECKRESPONSE_SERVINGSTATUS']._serialized_start=192
+ _globals['_WEAVIATEHEALTHCHECKRESPONSE_SERVINGSTATUS']._serialized_end=250
+# @@protoc_insertion_point(module_scope)
diff --git a/weaviate/proto/v1/v7351/v1/health_weaviate_pb2.pyi b/weaviate/proto/v1/v7351/v1/health_weaviate_pb2.pyi
new file mode 100644
index 000000000..cafb46dc2
--- /dev/null
+++ b/weaviate/proto/v1/v7351/v1/health_weaviate_pb2.pyi
@@ -0,0 +1,26 @@
+from google.protobuf.internal import enum_type_wrapper as _enum_type_wrapper
+from google.protobuf import descriptor as _descriptor
+from google.protobuf import message as _message
+from typing import ClassVar as _ClassVar, Optional as _Optional, Union as _Union
+
+DESCRIPTOR: _descriptor.FileDescriptor
+
+class WeaviateHealthCheckRequest(_message.Message):
+ __slots__ = ("service",)
+ SERVICE_FIELD_NUMBER: _ClassVar[int]
+ service: str
+ def __init__(self, service: _Optional[str] = ...) -> None: ...
+
+class WeaviateHealthCheckResponse(_message.Message):
+ __slots__ = ("status",)
+ class ServingStatus(int, metaclass=_enum_type_wrapper.EnumTypeWrapper):
+ __slots__ = ()
+ UNKNOWN: _ClassVar[WeaviateHealthCheckResponse.ServingStatus]
+ SERVING: _ClassVar[WeaviateHealthCheckResponse.ServingStatus]
+ NOT_SERVING: _ClassVar[WeaviateHealthCheckResponse.ServingStatus]
+ UNKNOWN: WeaviateHealthCheckResponse.ServingStatus
+ SERVING: WeaviateHealthCheckResponse.ServingStatus
+ NOT_SERVING: WeaviateHealthCheckResponse.ServingStatus
+ STATUS_FIELD_NUMBER: _ClassVar[int]
+ status: WeaviateHealthCheckResponse.ServingStatus
+ def __init__(self, status: _Optional[_Union[WeaviateHealthCheckResponse.ServingStatus, str]] = ...) -> None: ...
diff --git a/weaviate/proto/v1/v7351/v1/health_weaviate_pb2_grpc.py b/weaviate/proto/v1/v7351/v1/health_weaviate_pb2_grpc.py
new file mode 100644
index 000000000..6407828dd
--- /dev/null
+++ b/weaviate/proto/v1/v7351/v1/health_weaviate_pb2_grpc.py
@@ -0,0 +1,24 @@
+# Generated by the gRPC Python protocol compiler plugin. DO NOT EDIT!
+"""Client and server classes corresponding to protobuf-defined services."""
+import grpc
+import warnings
+
+
+GRPC_GENERATED_VERSION = '1.83.0'
+GRPC_VERSION = grpc.__version__
+_version_not_supported = False
+
+try:
+ from grpc._utilities import first_version_is_lower
+ _version_not_supported = first_version_is_lower(GRPC_VERSION, GRPC_GENERATED_VERSION)
+except ImportError:
+ _version_not_supported = True
+
+if _version_not_supported:
+ raise RuntimeError(
+ f'The grpc package installed is at version {GRPC_VERSION},'
+ + ' but the generated code in v1/health_weaviate_pb2_grpc.py depends on'
+ + f' grpcio>={GRPC_GENERATED_VERSION}.'
+ + f' Please upgrade your grpc module to grpcio>={GRPC_GENERATED_VERSION}'
+ + f' or downgrade your generated code using grpcio-tools<={GRPC_VERSION}.'
+ )
diff --git a/weaviate/proto/v1/v7351/v1/properties_pb2.py b/weaviate/proto/v1/v7351/v1/properties_pb2.py
new file mode 100644
index 000000000..39b1ba646
--- /dev/null
+++ b/weaviate/proto/v1/v7351/v1/properties_pb2.py
@@ -0,0 +1,64 @@
+# -*- coding: utf-8 -*-
+# Generated by the protocol buffer compiler. DO NOT EDIT!
+# NO CHECKED-IN PROTOBUF GENCODE
+# source: v1/properties.proto
+# Protobuf Python Version: 7.35.1
+"""Generated protocol buffer code."""
+from google.protobuf import descriptor as _descriptor
+from google.protobuf import descriptor_pool as _descriptor_pool
+from google.protobuf import runtime_version as _runtime_version
+from google.protobuf import symbol_database as _symbol_database
+from google.protobuf.internal import builder as _builder
+_runtime_version.ValidateProtobufRuntimeVersion(
+ _runtime_version.Domain.PUBLIC,
+ 7,
+ 35,
+ 1,
+ '',
+ 'v1/properties.proto'
+)
+# @@protoc_insertion_point(imports)
+
+_sym_db = _symbol_database.Default()
+
+
+from google.protobuf import struct_pb2 as google_dot_protobuf_dot_struct__pb2
+
+
+DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n\x13v1/properties.proto\x12\x0bweaviate.v1\x1a\x1cgoogle/protobuf/struct.proto\"\x84\x01\n\nProperties\x12\x33\n\x06\x66ields\x18\x01 \x03(\x0b\x32#.weaviate.v1.Properties.FieldsEntry\x1a\x41\n\x0b\x46ieldsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12!\n\x05value\x18\x02 \x01(\x0b\x32\x12.weaviate.v1.Value:\x02\x38\x01\"\x9d\x03\n\x05Value\x12\x16\n\x0cnumber_value\x18\x01 \x01(\x01H\x00\x12\x14\n\nbool_value\x18\x03 \x01(\x08H\x00\x12/\n\x0cobject_value\x18\x04 \x01(\x0b\x32\x17.weaviate.v1.PropertiesH\x00\x12,\n\nlist_value\x18\x05 \x01(\x0b\x32\x16.weaviate.v1.ListValueH\x00\x12\x14\n\ndate_value\x18\x06 \x01(\tH\x00\x12\x14\n\nuuid_value\x18\x07 \x01(\tH\x00\x12\x13\n\tint_value\x18\x08 \x01(\x03H\x00\x12/\n\tgeo_value\x18\t \x01(\x0b\x32\x1a.weaviate.v1.GeoCoordinateH\x00\x12\x14\n\nblob_value\x18\n \x01(\tH\x00\x12/\n\x0bphone_value\x18\x0b \x01(\x0b\x32\x18.weaviate.v1.PhoneNumberH\x00\x12\x30\n\nnull_value\x18\x0c \x01(\x0e\x32\x1a.google.protobuf.NullValueH\x00\x12\x14\n\ntext_value\x18\r \x01(\tH\x00\x42\x06\n\x04kind\"\xef\x02\n\tListValue\x12\x32\n\rnumber_values\x18\x02 \x01(\x0b\x32\x19.weaviate.v1.NumberValuesH\x00\x12.\n\x0b\x62ool_values\x18\x03 \x01(\x0b\x32\x17.weaviate.v1.BoolValuesH\x00\x12\x32\n\robject_values\x18\x04 \x01(\x0b\x32\x19.weaviate.v1.ObjectValuesH\x00\x12.\n\x0b\x64\x61te_values\x18\x05 \x01(\x0b\x32\x17.weaviate.v1.DateValuesH\x00\x12.\n\x0buuid_values\x18\x06 \x01(\x0b\x32\x17.weaviate.v1.UuidValuesH\x00\x12,\n\nint_values\x18\x07 \x01(\x0b\x32\x16.weaviate.v1.IntValuesH\x00\x12.\n\x0btext_values\x18\x08 \x01(\x0b\x32\x17.weaviate.v1.TextValuesH\x00\x42\x06\n\x04kindJ\x04\x08\x01\x10\x02\"\x1e\n\x0cNumberValues\x12\x0e\n\x06values\x18\x01 \x01(\x0c\"\x1c\n\nTextValues\x12\x0e\n\x06values\x18\x01 \x03(\t\"\x1c\n\nBoolValues\x12\x0e\n\x06values\x18\x01 \x03(\x08\"7\n\x0cObjectValues\x12\'\n\x06values\x18\x01 \x03(\x0b\x32\x17.weaviate.v1.Properties\"\x1c\n\nDateValues\x12\x0e\n\x06values\x18\x01 \x03(\t\"\x1c\n\nUuidValues\x12\x0e\n\x06values\x18\x01 \x03(\t\"\x1b\n\tIntValues\x12\x0e\n\x06values\x18\x01 \x01(\x0c\"4\n\rGeoCoordinate\x12\x11\n\tlongitude\x18\x01 \x01(\x02\x12\x10\n\x08latitude\x18\x02 \x01(\x02\"\xa9\x01\n\x0bPhoneNumber\x12\x14\n\x0c\x63ountry_code\x18\x01 \x01(\x04\x12\x17\n\x0f\x64\x65\x66\x61ult_country\x18\x02 \x01(\t\x12\r\n\x05input\x18\x03 \x01(\t\x12\x1f\n\x17international_formatted\x18\x04 \x01(\t\x12\x10\n\x08national\x18\x05 \x01(\x04\x12\x1a\n\x12national_formatted\x18\x06 \x01(\t\x12\r\n\x05valid\x18\x07 \x01(\x08\x42t\n#io.weaviate.client.grpc.protocol.v1B\x17WeaviateProtoPropertiesZ4github.com/weaviate/weaviate/grpc/generated;protocolb\x06proto3')
+
+_globals = globals()
+_builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, _globals)
+_builder.BuildTopDescriptorsAndMessages(DESCRIPTOR, 'v1.properties_pb2', _globals)
+if not _descriptor._USE_C_DESCRIPTORS:
+ _globals['DESCRIPTOR']._loaded_options = None
+ _globals['DESCRIPTOR']._serialized_options = b'\n#io.weaviate.client.grpc.protocol.v1B\027WeaviateProtoPropertiesZ4github.com/weaviate/weaviate/grpc/generated;protocol'
+ _globals['_PROPERTIES_FIELDSENTRY']._loaded_options = None
+ _globals['_PROPERTIES_FIELDSENTRY']._serialized_options = b'8\001'
+ _globals['_PROPERTIES']._serialized_start=67
+ _globals['_PROPERTIES']._serialized_end=199
+ _globals['_PROPERTIES_FIELDSENTRY']._serialized_start=134
+ _globals['_PROPERTIES_FIELDSENTRY']._serialized_end=199
+ _globals['_VALUE']._serialized_start=202
+ _globals['_VALUE']._serialized_end=615
+ _globals['_LISTVALUE']._serialized_start=618
+ _globals['_LISTVALUE']._serialized_end=985
+ _globals['_NUMBERVALUES']._serialized_start=987
+ _globals['_NUMBERVALUES']._serialized_end=1017
+ _globals['_TEXTVALUES']._serialized_start=1019
+ _globals['_TEXTVALUES']._serialized_end=1047
+ _globals['_BOOLVALUES']._serialized_start=1049
+ _globals['_BOOLVALUES']._serialized_end=1077
+ _globals['_OBJECTVALUES']._serialized_start=1079
+ _globals['_OBJECTVALUES']._serialized_end=1134
+ _globals['_DATEVALUES']._serialized_start=1136
+ _globals['_DATEVALUES']._serialized_end=1164
+ _globals['_UUIDVALUES']._serialized_start=1166
+ _globals['_UUIDVALUES']._serialized_end=1194
+ _globals['_INTVALUES']._serialized_start=1196
+ _globals['_INTVALUES']._serialized_end=1223
+ _globals['_GEOCOORDINATE']._serialized_start=1225
+ _globals['_GEOCOORDINATE']._serialized_end=1277
+ _globals['_PHONENUMBER']._serialized_start=1280
+ _globals['_PHONENUMBER']._serialized_end=1449
+# @@protoc_insertion_point(module_scope)
diff --git a/weaviate/proto/v1/v7351/v1/properties_pb2.pyi b/weaviate/proto/v1/v7351/v1/properties_pb2.pyi
new file mode 100644
index 000000000..fba775b56
--- /dev/null
+++ b/weaviate/proto/v1/v7351/v1/properties_pb2.pyi
@@ -0,0 +1,135 @@
+from google.protobuf import struct_pb2 as _struct_pb2
+from google.protobuf.internal import containers as _containers
+from google.protobuf import descriptor as _descriptor
+from google.protobuf import message as _message
+from collections.abc import Iterable as _Iterable, Mapping as _Mapping
+from typing import ClassVar as _ClassVar, Optional as _Optional, Union as _Union
+
+DESCRIPTOR: _descriptor.FileDescriptor
+
+class Properties(_message.Message):
+ __slots__ = ("fields",)
+ class FieldsEntry(_message.Message):
+ __slots__ = ("key", "value")
+ KEY_FIELD_NUMBER: _ClassVar[int]
+ VALUE_FIELD_NUMBER: _ClassVar[int]
+ key: str
+ value: Value
+ def __init__(self, key: _Optional[str] = ..., value: _Optional[_Union[Value, _Mapping]] = ...) -> None: ...
+ FIELDS_FIELD_NUMBER: _ClassVar[int]
+ fields: _containers.MessageMap[str, Value]
+ def __init__(self, fields: _Optional[_Mapping[str, Value]] = ...) -> None: ...
+
+class Value(_message.Message):
+ __slots__ = ("number_value", "bool_value", "object_value", "list_value", "date_value", "uuid_value", "int_value", "geo_value", "blob_value", "phone_value", "null_value", "text_value")
+ NUMBER_VALUE_FIELD_NUMBER: _ClassVar[int]
+ BOOL_VALUE_FIELD_NUMBER: _ClassVar[int]
+ OBJECT_VALUE_FIELD_NUMBER: _ClassVar[int]
+ LIST_VALUE_FIELD_NUMBER: _ClassVar[int]
+ DATE_VALUE_FIELD_NUMBER: _ClassVar[int]
+ UUID_VALUE_FIELD_NUMBER: _ClassVar[int]
+ INT_VALUE_FIELD_NUMBER: _ClassVar[int]
+ GEO_VALUE_FIELD_NUMBER: _ClassVar[int]
+ BLOB_VALUE_FIELD_NUMBER: _ClassVar[int]
+ PHONE_VALUE_FIELD_NUMBER: _ClassVar[int]
+ NULL_VALUE_FIELD_NUMBER: _ClassVar[int]
+ TEXT_VALUE_FIELD_NUMBER: _ClassVar[int]
+ number_value: float
+ bool_value: bool
+ object_value: Properties
+ list_value: ListValue
+ date_value: str
+ uuid_value: str
+ int_value: int
+ geo_value: GeoCoordinate
+ blob_value: str
+ phone_value: PhoneNumber
+ null_value: _struct_pb2.NullValue
+ text_value: str
+ def __init__(self, number_value: _Optional[float] = ..., bool_value: _Optional[bool] = ..., object_value: _Optional[_Union[Properties, _Mapping]] = ..., list_value: _Optional[_Union[ListValue, _Mapping]] = ..., date_value: _Optional[str] = ..., uuid_value: _Optional[str] = ..., int_value: _Optional[int] = ..., geo_value: _Optional[_Union[GeoCoordinate, _Mapping]] = ..., blob_value: _Optional[str] = ..., phone_value: _Optional[_Union[PhoneNumber, _Mapping]] = ..., null_value: _Optional[_Union[_struct_pb2.NullValue, str]] = ..., text_value: _Optional[str] = ...) -> None: ...
+
+class ListValue(_message.Message):
+ __slots__ = ("number_values", "bool_values", "object_values", "date_values", "uuid_values", "int_values", "text_values")
+ NUMBER_VALUES_FIELD_NUMBER: _ClassVar[int]
+ BOOL_VALUES_FIELD_NUMBER: _ClassVar[int]
+ OBJECT_VALUES_FIELD_NUMBER: _ClassVar[int]
+ DATE_VALUES_FIELD_NUMBER: _ClassVar[int]
+ UUID_VALUES_FIELD_NUMBER: _ClassVar[int]
+ INT_VALUES_FIELD_NUMBER: _ClassVar[int]
+ TEXT_VALUES_FIELD_NUMBER: _ClassVar[int]
+ number_values: NumberValues
+ bool_values: BoolValues
+ object_values: ObjectValues
+ date_values: DateValues
+ uuid_values: UuidValues
+ int_values: IntValues
+ text_values: TextValues
+ def __init__(self, number_values: _Optional[_Union[NumberValues, _Mapping]] = ..., bool_values: _Optional[_Union[BoolValues, _Mapping]] = ..., object_values: _Optional[_Union[ObjectValues, _Mapping]] = ..., date_values: _Optional[_Union[DateValues, _Mapping]] = ..., uuid_values: _Optional[_Union[UuidValues, _Mapping]] = ..., int_values: _Optional[_Union[IntValues, _Mapping]] = ..., text_values: _Optional[_Union[TextValues, _Mapping]] = ...) -> None: ...
+
+class NumberValues(_message.Message):
+ __slots__ = ("values",)
+ VALUES_FIELD_NUMBER: _ClassVar[int]
+ values: bytes
+ def __init__(self, values: _Optional[bytes] = ...) -> None: ...
+
+class TextValues(_message.Message):
+ __slots__ = ("values",)
+ VALUES_FIELD_NUMBER: _ClassVar[int]
+ values: _containers.RepeatedScalarFieldContainer[str]
+ def __init__(self, values: _Optional[_Iterable[str]] = ...) -> None: ...
+
+class BoolValues(_message.Message):
+ __slots__ = ("values",)
+ VALUES_FIELD_NUMBER: _ClassVar[int]
+ values: _containers.RepeatedScalarFieldContainer[bool]
+ def __init__(self, values: _Optional[_Iterable[bool]] = ...) -> None: ...
+
+class ObjectValues(_message.Message):
+ __slots__ = ("values",)
+ VALUES_FIELD_NUMBER: _ClassVar[int]
+ values: _containers.RepeatedCompositeFieldContainer[Properties]
+ def __init__(self, values: _Optional[_Iterable[_Union[Properties, _Mapping]]] = ...) -> None: ...
+
+class DateValues(_message.Message):
+ __slots__ = ("values",)
+ VALUES_FIELD_NUMBER: _ClassVar[int]
+ values: _containers.RepeatedScalarFieldContainer[str]
+ def __init__(self, values: _Optional[_Iterable[str]] = ...) -> None: ...
+
+class UuidValues(_message.Message):
+ __slots__ = ("values",)
+ VALUES_FIELD_NUMBER: _ClassVar[int]
+ values: _containers.RepeatedScalarFieldContainer[str]
+ def __init__(self, values: _Optional[_Iterable[str]] = ...) -> None: ...
+
+class IntValues(_message.Message):
+ __slots__ = ("values",)
+ VALUES_FIELD_NUMBER: _ClassVar[int]
+ values: bytes
+ def __init__(self, values: _Optional[bytes] = ...) -> None: ...
+
+class GeoCoordinate(_message.Message):
+ __slots__ = ("longitude", "latitude")
+ LONGITUDE_FIELD_NUMBER: _ClassVar[int]
+ LATITUDE_FIELD_NUMBER: _ClassVar[int]
+ longitude: float
+ latitude: float
+ def __init__(self, longitude: _Optional[float] = ..., latitude: _Optional[float] = ...) -> None: ...
+
+class PhoneNumber(_message.Message):
+ __slots__ = ("country_code", "default_country", "input", "international_formatted", "national", "national_formatted", "valid")
+ COUNTRY_CODE_FIELD_NUMBER: _ClassVar[int]
+ DEFAULT_COUNTRY_FIELD_NUMBER: _ClassVar[int]
+ INPUT_FIELD_NUMBER: _ClassVar[int]
+ INTERNATIONAL_FORMATTED_FIELD_NUMBER: _ClassVar[int]
+ NATIONAL_FIELD_NUMBER: _ClassVar[int]
+ NATIONAL_FORMATTED_FIELD_NUMBER: _ClassVar[int]
+ VALID_FIELD_NUMBER: _ClassVar[int]
+ country_code: int
+ default_country: str
+ input: str
+ international_formatted: str
+ national: int
+ national_formatted: str
+ valid: bool
+ def __init__(self, country_code: _Optional[int] = ..., default_country: _Optional[str] = ..., input: _Optional[str] = ..., international_formatted: _Optional[str] = ..., national: _Optional[int] = ..., national_formatted: _Optional[str] = ..., valid: _Optional[bool] = ...) -> None: ...
diff --git a/weaviate/proto/v1/v7351/v1/properties_pb2_grpc.py b/weaviate/proto/v1/v7351/v1/properties_pb2_grpc.py
new file mode 100644
index 000000000..18b33d239
--- /dev/null
+++ b/weaviate/proto/v1/v7351/v1/properties_pb2_grpc.py
@@ -0,0 +1,24 @@
+# Generated by the gRPC Python protocol compiler plugin. DO NOT EDIT!
+"""Client and server classes corresponding to protobuf-defined services."""
+import grpc
+import warnings
+
+
+GRPC_GENERATED_VERSION = '1.83.0'
+GRPC_VERSION = grpc.__version__
+_version_not_supported = False
+
+try:
+ from grpc._utilities import first_version_is_lower
+ _version_not_supported = first_version_is_lower(GRPC_VERSION, GRPC_GENERATED_VERSION)
+except ImportError:
+ _version_not_supported = True
+
+if _version_not_supported:
+ raise RuntimeError(
+ f'The grpc package installed is at version {GRPC_VERSION},'
+ + ' but the generated code in v1/properties_pb2_grpc.py depends on'
+ + f' grpcio>={GRPC_GENERATED_VERSION}.'
+ + f' Please upgrade your grpc module to grpcio>={GRPC_GENERATED_VERSION}'
+ + f' or downgrade your generated code using grpcio-tools<={GRPC_VERSION}.'
+ )
diff --git a/weaviate/proto/v1/v7351/v1/search_get_pb2.py b/weaviate/proto/v1/v7351/v1/search_get_pb2.py
new file mode 100644
index 000000000..fe77b76b6
--- /dev/null
+++ b/weaviate/proto/v1/v7351/v1/search_get_pb2.py
@@ -0,0 +1,111 @@
+# -*- coding: utf-8 -*-
+# Generated by the protocol buffer compiler. DO NOT EDIT!
+# NO CHECKED-IN PROTOBUF GENCODE
+# source: v1/search_get.proto
+# Protobuf Python Version: 7.35.1
+"""Generated protocol buffer code."""
+from google.protobuf import descriptor as _descriptor
+from google.protobuf import descriptor_pool as _descriptor_pool
+from google.protobuf import runtime_version as _runtime_version
+from google.protobuf import symbol_database as _symbol_database
+from google.protobuf.internal import builder as _builder
+_runtime_version.ValidateProtobufRuntimeVersion(
+ _runtime_version.Domain.PUBLIC,
+ 7,
+ 35,
+ 1,
+ '',
+ 'v1/search_get.proto'
+)
+# @@protoc_insertion_point(imports)
+
+_sym_db = _symbol_database.Default()
+
+
+from weaviate.proto.v1.v7351.v1 import base_pb2 as v1_dot_base__pb2
+from weaviate.proto.v1.v7351.v1 import base_search_pb2 as v1_dot_base__search__pb2
+from weaviate.proto.v1.v7351.v1 import generative_pb2 as v1_dot_generative__pb2
+from weaviate.proto.v1.v7351.v1 import properties_pb2 as v1_dot_properties__pb2
+
+
+DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n\x13v1/search_get.proto\x12\x0bweaviate.v1\x1a\rv1/base.proto\x1a\x14v1/base_search.proto\x1a\x13v1/generative.proto\x1a\x13v1/properties.proto\"\xce\x0b\n\rSearchRequest\x12\x12\n\ncollection\x18\x01 \x01(\t\x12\x0e\n\x06tenant\x18\n \x01(\t\x12=\n\x11\x63onsistency_level\x18\x0b \x01(\x0e\x32\x1d.weaviate.v1.ConsistencyLevelH\x00\x88\x01\x01\x12\x37\n\nproperties\x18\x14 \x01(\x0b\x32\x1e.weaviate.v1.PropertiesRequestH\x01\x88\x01\x01\x12\x33\n\x08metadata\x18\x15 \x01(\x0b\x32\x1c.weaviate.v1.MetadataRequestH\x02\x88\x01\x01\x12+\n\x08group_by\x18\x16 \x01(\x0b\x32\x14.weaviate.v1.GroupByH\x03\x88\x01\x01\x12\r\n\x05limit\x18\x1e \x01(\r\x12\x0e\n\x06offset\x18\x1f \x01(\r\x12\x0f\n\x07\x61utocut\x18 \x01(\r\x12\r\n\x05\x61\x66ter\x18! \x01(\t\x12$\n\x07sort_by\x18\" \x03(\x0b\x32\x13.weaviate.v1.SortBy\x12*\n\x07\x66ilters\x18( \x01(\x0b\x32\x14.weaviate.v1.FiltersH\x04\x88\x01\x01\x12/\n\rhybrid_search\x18) \x01(\x0b\x32\x13.weaviate.v1.HybridH\x05\x88\x01\x01\x12+\n\x0b\x62m25_search\x18* \x01(\x0b\x32\x11.weaviate.v1.BM25H\x06\x88\x01\x01\x12\x31\n\x0bnear_vector\x18+ \x01(\x0b\x32\x17.weaviate.v1.NearVectorH\x07\x88\x01\x01\x12\x31\n\x0bnear_object\x18, \x01(\x0b\x32\x17.weaviate.v1.NearObjectH\x08\x88\x01\x01\x12\x33\n\tnear_text\x18- \x01(\x0b\x32\x1b.weaviate.v1.NearTextSearchH\t\x88\x01\x01\x12\x35\n\nnear_image\x18. \x01(\x0b\x32\x1c.weaviate.v1.NearImageSearchH\n\x88\x01\x01\x12\x35\n\nnear_audio\x18/ \x01(\x0b\x32\x1c.weaviate.v1.NearAudioSearchH\x0b\x88\x01\x01\x12\x35\n\nnear_video\x18\x30 \x01(\x0b\x32\x1c.weaviate.v1.NearVideoSearchH\x0c\x88\x01\x01\x12\x35\n\nnear_depth\x18\x31 \x01(\x0b\x32\x1c.weaviate.v1.NearDepthSearchH\r\x88\x01\x01\x12\x39\n\x0cnear_thermal\x18\x32 \x01(\x0b\x32\x1e.weaviate.v1.NearThermalSearchH\x0e\x88\x01\x01\x12\x31\n\x08near_imu\x18\x33 \x01(\x0b\x32\x1a.weaviate.v1.NearIMUSearchH\x0f\x88\x01\x01\x12\x36\n\ngenerative\x18< \x01(\x0b\x32\x1d.weaviate.v1.GenerativeSearchH\x10\x88\x01\x01\x12(\n\x06rerank\x18= \x01(\x0b\x32\x13.weaviate.v1.RerankH\x11\x88\x01\x01\x12&\n\x05\x62oost\x18> \x01(\x0b\x32\x12.weaviate.v1.BoostH\x12\x88\x01\x01\x12\x18\n\x0cuses_123_api\x18\x64 \x01(\x08\x42\x02\x18\x01\x12\x18\n\x0cuses_125_api\x18\x65 \x01(\x08\x42\x02\x18\x01\x12\x14\n\x0cuses_127_api\x18\x66 \x01(\x08\x42\x14\n\x12_consistency_levelB\r\n\x0b_propertiesB\x0b\n\t_metadataB\x0b\n\t_group_byB\n\n\x08_filtersB\x10\n\x0e_hybrid_searchB\x0e\n\x0c_bm25_searchB\x0e\n\x0c_near_vectorB\x0e\n\x0c_near_objectB\x0c\n\n_near_textB\r\n\x0b_near_imageB\r\n\x0b_near_audioB\r\n\x0b_near_videoB\r\n\x0b_near_depthB\x0f\n\r_near_thermalB\x0b\n\t_near_imuB\r\n\x0b_generativeB\t\n\x07_rerankB\x08\n\x06_boost\"L\n\x07GroupBy\x12\x0c\n\x04path\x18\x01 \x03(\t\x12\x18\n\x10number_of_groups\x18\x02 \x01(\x05\x12\x19\n\x11objects_per_group\x18\x03 \x01(\x05\")\n\x06SortBy\x12\x11\n\tascending\x18\x01 \x01(\x08\x12\x0c\n\x04path\x18\x02 \x03(\t\"\xf4\x01\n\x0fMetadataRequest\x12\x0c\n\x04uuid\x18\x01 \x01(\x08\x12\x0e\n\x06vector\x18\x02 \x01(\x08\x12\x1a\n\x12\x63reation_time_unix\x18\x03 \x01(\x08\x12\x1d\n\x15last_update_time_unix\x18\x04 \x01(\x08\x12\x10\n\x08\x64istance\x18\x05 \x01(\x08\x12\x11\n\tcertainty\x18\x06 \x01(\x08\x12\r\n\x05score\x18\x07 \x01(\x08\x12\x15\n\rexplain_score\x18\x08 \x01(\x08\x12\x15\n\ris_consistent\x18\t \x01(\x08\x12\x0f\n\x07vectors\x18\n \x03(\t\x12\x15\n\rquery_profile\x18\x0b \x01(\x08\"\xd1\x01\n\x11PropertiesRequest\x12\x1a\n\x12non_ref_properties\x18\x01 \x03(\t\x12\x39\n\x0eref_properties\x18\x02 \x03(\x0b\x32!.weaviate.v1.RefPropertiesRequest\x12?\n\x11object_properties\x18\x03 \x03(\x0b\x32$.weaviate.v1.ObjectPropertiesRequest\x12$\n\x1creturn_all_nonref_properties\x18\x0b \x01(\x08\"\x8b\x01\n\x17ObjectPropertiesRequest\x12\x11\n\tprop_name\x18\x01 \x01(\t\x12\x1c\n\x14primitive_properties\x18\x02 \x03(\t\x12?\n\x11object_properties\x18\x03 \x03(\x0b\x32$.weaviate.v1.ObjectPropertiesRequest\"\xb1\x01\n\x14RefPropertiesRequest\x12\x1a\n\x12reference_property\x18\x01 \x01(\t\x12\x32\n\nproperties\x18\x02 \x01(\x0b\x32\x1e.weaviate.v1.PropertiesRequest\x12.\n\x08metadata\x18\x03 \x01(\x0b\x32\x1c.weaviate.v1.MetadataRequest\x12\x19\n\x11target_collection\x18\x04 \x01(\t\"8\n\x06Rerank\x12\x10\n\x08property\x18\x01 \x01(\t\x12\x12\n\x05query\x18\x02 \x01(\tH\x00\x88\x01\x01\x42\x08\n\x06_query\"\xf7\x02\n\x0bSearchReply\x12\x0c\n\x04took\x18\x01 \x01(\x02\x12*\n\x07results\x18\x02 \x03(\x0b\x32\x19.weaviate.v1.SearchResult\x12*\n\x19generative_grouped_result\x18\x03 \x01(\tB\x02\x18\x01H\x00\x88\x01\x01\x12\x34\n\x10group_by_results\x18\x04 \x03(\x0b\x32\x1a.weaviate.v1.GroupByResult\x12\x46\n\x1agenerative_grouped_results\x18\x05 \x01(\x0b\x32\x1d.weaviate.v1.GenerativeResultH\x01\x88\x01\x01\x12\x35\n\rquery_profile\x18\x06 \x01(\x0b\x32\x19.weaviate.v1.QueryProfileH\x02\x88\x01\x01\x42\x1c\n\x1a_generative_grouped_resultB\x1d\n\x1b_generative_grouped_resultsB\x10\n\x0e_query_profile\"\x9e\x03\n\x0cQueryProfile\x12\x36\n\x06shards\x18\x01 \x03(\x0b\x32&.weaviate.v1.QueryProfile.ShardProfile\x1a\x86\x01\n\rSearchProfile\x12\x45\n\x07\x64\x65tails\x18\x01 \x03(\x0b\x32\x34.weaviate.v1.QueryProfile.SearchProfile.DetailsEntry\x1a.\n\x0c\x44\x65tailsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\x1a\xcc\x01\n\x0cShardProfile\x12\x0c\n\x04name\x18\x01 \x01(\t\x12\x0c\n\x04node\x18\x02 \x01(\t\x12\x46\n\x08searches\x18\x03 \x03(\x0b\x32\x34.weaviate.v1.QueryProfile.ShardProfile.SearchesEntry\x1aX\n\rSearchesEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\x36\n\x05value\x18\x02 \x01(\x0b\x32\'.weaviate.v1.QueryProfile.SearchProfile:\x02\x38\x01\"\x1c\n\x0bRerankReply\x12\r\n\x05score\x18\x01 \x01(\x01\"\xe9\x02\n\rGroupByResult\x12\x0c\n\x04name\x18\x01 \x01(\t\x12\x14\n\x0cmin_distance\x18\x02 \x01(\x02\x12\x14\n\x0cmax_distance\x18\x03 \x01(\x02\x12\x19\n\x11number_of_objects\x18\x04 \x01(\x03\x12*\n\x07objects\x18\x05 \x03(\x0b\x32\x19.weaviate.v1.SearchResult\x12-\n\x06rerank\x18\x06 \x01(\x0b\x32\x18.weaviate.v1.RerankReplyH\x00\x88\x01\x01\x12\x39\n\ngenerative\x18\x07 \x01(\x0b\x32\x1c.weaviate.v1.GenerativeReplyB\x02\x18\x01H\x01\x88\x01\x01\x12=\n\x11generative_result\x18\x08 \x01(\x0b\x32\x1d.weaviate.v1.GenerativeResultH\x02\x88\x01\x01\x42\t\n\x07_rerankB\r\n\x0b_generativeB\x14\n\x12_generative_result\"\xb7\x01\n\x0cSearchResult\x12\x31\n\nproperties\x18\x01 \x01(\x0b\x32\x1d.weaviate.v1.PropertiesResult\x12-\n\x08metadata\x18\x02 \x01(\x0b\x32\x1b.weaviate.v1.MetadataResult\x12\x36\n\ngenerative\x18\x03 \x01(\x0b\x32\x1d.weaviate.v1.GenerativeResultH\x00\x88\x01\x01\x42\r\n\x0b_generative\"\xf7\x04\n\x0eMetadataResult\x12\n\n\x02id\x18\x01 \x01(\t\x12\x12\n\x06vector\x18\x02 \x03(\x02\x42\x02\x18\x01\x12\x1a\n\x12\x63reation_time_unix\x18\x03 \x01(\x03\x12\"\n\x1a\x63reation_time_unix_present\x18\x04 \x01(\x08\x12\x1d\n\x15last_update_time_unix\x18\x05 \x01(\x03\x12%\n\x1dlast_update_time_unix_present\x18\x06 \x01(\x08\x12\x10\n\x08\x64istance\x18\x07 \x01(\x02\x12\x18\n\x10\x64istance_present\x18\x08 \x01(\x08\x12\x11\n\tcertainty\x18\t \x01(\x02\x12\x19\n\x11\x63\x65rtainty_present\x18\n \x01(\x08\x12\r\n\x05score\x18\x0b \x01(\x02\x12\x15\n\rscore_present\x18\x0c \x01(\x08\x12\x15\n\rexplain_score\x18\r \x01(\t\x12\x1d\n\x15\x65xplain_score_present\x18\x0e \x01(\x08\x12\x1a\n\ris_consistent\x18\x0f \x01(\x08H\x00\x88\x01\x01\x12\x16\n\ngenerative\x18\x10 \x01(\tB\x02\x18\x01\x12\x1e\n\x12generative_present\x18\x11 \x01(\x08\x42\x02\x18\x01\x12\x1d\n\x15is_consistent_present\x18\x12 \x01(\x08\x12\x14\n\x0cvector_bytes\x18\x13 \x01(\x0c\x12\x13\n\x0bid_as_bytes\x18\x14 \x01(\x0c\x12\x14\n\x0crerank_score\x18\x15 \x01(\x01\x12\x1c\n\x14rerank_score_present\x18\x16 \x01(\x08\x12%\n\x07vectors\x18\x17 \x03(\x0b\x32\x14.weaviate.v1.VectorsB\x10\n\x0e_is_consistent\"\x88\x02\n\x10PropertiesResult\x12\x33\n\tref_props\x18\x02 \x03(\x0b\x32 .weaviate.v1.RefPropertiesResult\x12\x19\n\x11target_collection\x18\x03 \x01(\t\x12-\n\x08metadata\x18\x04 \x01(\x0b\x32\x1b.weaviate.v1.MetadataResult\x12.\n\rnon_ref_props\x18\x0b \x01(\x0b\x32\x17.weaviate.v1.Properties\x12\x1b\n\x13ref_props_requested\x18\x0c \x01(\x08J\x04\x08\x01\x10\x02J\x04\x08\x05\x10\x06J\x04\x08\x06\x10\x07J\x04\x08\x07\x10\x08J\x04\x08\x08\x10\tJ\x04\x08\t\x10\nJ\x04\x08\n\x10\x0b\"[\n\x13RefPropertiesResult\x12\x31\n\nproperties\x18\x01 \x03(\x0b\x32\x1d.weaviate.v1.PropertiesResult\x12\x11\n\tprop_name\x18\x02 \x01(\t\"\xb3\t\n\x05\x42oost\x12\x30\n\nconditions\x18\x01 \x03(\x0b\x32\x1c.weaviate.v1.Boost.Condition\x12\x13\n\x06weight\x18\x02 \x01(\x02H\x00\x88\x01\x01\x12\x12\n\x05\x64\x65pth\x18\x03 \x01(\rH\x01\x88\x01\x01\x1aw\n\x15PropertyValueFunction\x12\x10\n\x08property\x18\x01 \x01(\t\x12?\n\x08modifier\x18\x02 \x01(\x0e\x32(.weaviate.v1.Boost.PropertyValueModifierH\x00\x88\x01\x01\x42\x0b\n\t_modifier\x1a\xcb\x01\n\x11TimeDecayFunction\x12\x10\n\x08property\x18\x01 \x01(\t\x12\x0e\n\x06origin\x18\x02 \x01(\t\x12\r\n\x05scale\x18\x03 \x01(\t\x12\x13\n\x06offset\x18\x04 \x01(\tH\x00\x88\x01\x01\x12\x31\n\x05\x63urve\x18\x05 \x01(\x0e\x32\x1d.weaviate.v1.Boost.DecayCurveH\x01\x88\x01\x01\x12\x18\n\x0b\x64\x65\x63\x61y_value\x18\x06 \x01(\x02H\x02\x88\x01\x01\x42\t\n\x07_offsetB\x08\n\x06_curveB\x0e\n\x0c_decay_value\x1a\xce\x01\n\x14NumericDecayFunction\x12\x10\n\x08property\x18\x01 \x01(\t\x12\x0e\n\x06origin\x18\x02 \x01(\x01\x12\r\n\x05scale\x18\x03 \x01(\x01\x12\x13\n\x06offset\x18\x04 \x01(\x01H\x00\x88\x01\x01\x12\x31\n\x05\x63urve\x18\x05 \x01(\x0e\x32\x1d.weaviate.v1.Boost.DecayCurveH\x01\x88\x01\x01\x12\x18\n\x0b\x64\x65\x63\x61y_value\x18\x06 \x01(\x02H\x02\x88\x01\x01\x42\t\n\x07_offsetB\x08\n\x06_curveB\x0e\n\x0c_decay_value\x1a\xa2\x02\n\tCondition\x12&\n\x06\x66ilter\x18\x01 \x01(\x0b\x32\x14.weaviate.v1.FiltersH\x00\x12:\n\ntime_decay\x18\x02 \x01(\x0b\x32$.weaviate.v1.Boost.TimeDecayFunctionH\x00\x12\x42\n\x0eproperty_value\x18\x03 \x01(\x0b\x32(.weaviate.v1.Boost.PropertyValueFunctionH\x00\x12@\n\rnumeric_decay\x18\x04 \x01(\x0b\x32\'.weaviate.v1.Boost.NumericDecayFunctionH\x00\x12\x13\n\x06weight\x18\x05 \x01(\x02H\x01\x88\x01\x01\x42\x0b\n\tconditionB\t\n\x07_weight\"\x85\x01\n\x15PropertyValueModifier\x12\'\n#PROPERTY_VALUE_MODIFIER_UNSPECIFIED\x10\x00\x12!\n\x1dPROPERTY_VALUE_MODIFIER_LOG1P\x10\x01\x12 \n\x1cPROPERTY_VALUE_MODIFIER_SQRT\x10\x02\"u\n\nDecayCurve\x12\x1b\n\x17\x44\x45\x43\x41Y_CURVE_UNSPECIFIED\x10\x00\x12\x15\n\x11\x44\x45\x43\x41Y_CURVE_GAUSS\x10\x01\x12\x16\n\x12\x44\x45\x43\x41Y_CURVE_LINEAR\x10\x02\x12\x1b\n\x17\x44\x45\x43\x41Y_CURVE_EXPONENTIAL\x10\x03\x42\t\n\x07_weightB\x08\n\x06_depthBs\n#io.weaviate.client.grpc.protocol.v1B\x16WeaviateProtoSearchGetZ4github.com/weaviate/weaviate/grpc/generated;protocolb\x06proto3')
+
+_globals = globals()
+_builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, _globals)
+_builder.BuildTopDescriptorsAndMessages(DESCRIPTOR, 'v1.search_get_pb2', _globals)
+if not _descriptor._USE_C_DESCRIPTORS:
+ _globals['DESCRIPTOR']._loaded_options = None
+ _globals['DESCRIPTOR']._serialized_options = b'\n#io.weaviate.client.grpc.protocol.v1B\026WeaviateProtoSearchGetZ4github.com/weaviate/weaviate/grpc/generated;protocol'
+ _globals['_SEARCHREQUEST'].fields_by_name['uses_123_api']._loaded_options = None
+ _globals['_SEARCHREQUEST'].fields_by_name['uses_123_api']._serialized_options = b'\030\001'
+ _globals['_SEARCHREQUEST'].fields_by_name['uses_125_api']._loaded_options = None
+ _globals['_SEARCHREQUEST'].fields_by_name['uses_125_api']._serialized_options = b'\030\001'
+ _globals['_SEARCHREPLY'].fields_by_name['generative_grouped_result']._loaded_options = None
+ _globals['_SEARCHREPLY'].fields_by_name['generative_grouped_result']._serialized_options = b'\030\001'
+ _globals['_QUERYPROFILE_SEARCHPROFILE_DETAILSENTRY']._loaded_options = None
+ _globals['_QUERYPROFILE_SEARCHPROFILE_DETAILSENTRY']._serialized_options = b'8\001'
+ _globals['_QUERYPROFILE_SHARDPROFILE_SEARCHESENTRY']._loaded_options = None
+ _globals['_QUERYPROFILE_SHARDPROFILE_SEARCHESENTRY']._serialized_options = b'8\001'
+ _globals['_GROUPBYRESULT'].fields_by_name['generative']._loaded_options = None
+ _globals['_GROUPBYRESULT'].fields_by_name['generative']._serialized_options = b'\030\001'
+ _globals['_METADATARESULT'].fields_by_name['vector']._loaded_options = None
+ _globals['_METADATARESULT'].fields_by_name['vector']._serialized_options = b'\030\001'
+ _globals['_METADATARESULT'].fields_by_name['generative']._loaded_options = None
+ _globals['_METADATARESULT'].fields_by_name['generative']._serialized_options = b'\030\001'
+ _globals['_METADATARESULT'].fields_by_name['generative_present']._loaded_options = None
+ _globals['_METADATARESULT'].fields_by_name['generative_present']._serialized_options = b'\030\001'
+ _globals['_SEARCHREQUEST']._serialized_start=116
+ _globals['_SEARCHREQUEST']._serialized_end=1602
+ _globals['_GROUPBY']._serialized_start=1604
+ _globals['_GROUPBY']._serialized_end=1680
+ _globals['_SORTBY']._serialized_start=1682
+ _globals['_SORTBY']._serialized_end=1723
+ _globals['_METADATAREQUEST']._serialized_start=1726
+ _globals['_METADATAREQUEST']._serialized_end=1970
+ _globals['_PROPERTIESREQUEST']._serialized_start=1973
+ _globals['_PROPERTIESREQUEST']._serialized_end=2182
+ _globals['_OBJECTPROPERTIESREQUEST']._serialized_start=2185
+ _globals['_OBJECTPROPERTIESREQUEST']._serialized_end=2324
+ _globals['_REFPROPERTIESREQUEST']._serialized_start=2327
+ _globals['_REFPROPERTIESREQUEST']._serialized_end=2504
+ _globals['_RERANK']._serialized_start=2506
+ _globals['_RERANK']._serialized_end=2562
+ _globals['_SEARCHREPLY']._serialized_start=2565
+ _globals['_SEARCHREPLY']._serialized_end=2940
+ _globals['_QUERYPROFILE']._serialized_start=2943
+ _globals['_QUERYPROFILE']._serialized_end=3357
+ _globals['_QUERYPROFILE_SEARCHPROFILE']._serialized_start=3016
+ _globals['_QUERYPROFILE_SEARCHPROFILE']._serialized_end=3150
+ _globals['_QUERYPROFILE_SEARCHPROFILE_DETAILSENTRY']._serialized_start=3104
+ _globals['_QUERYPROFILE_SEARCHPROFILE_DETAILSENTRY']._serialized_end=3150
+ _globals['_QUERYPROFILE_SHARDPROFILE']._serialized_start=3153
+ _globals['_QUERYPROFILE_SHARDPROFILE']._serialized_end=3357
+ _globals['_QUERYPROFILE_SHARDPROFILE_SEARCHESENTRY']._serialized_start=3269
+ _globals['_QUERYPROFILE_SHARDPROFILE_SEARCHESENTRY']._serialized_end=3357
+ _globals['_RERANKREPLY']._serialized_start=3359
+ _globals['_RERANKREPLY']._serialized_end=3387
+ _globals['_GROUPBYRESULT']._serialized_start=3390
+ _globals['_GROUPBYRESULT']._serialized_end=3751
+ _globals['_SEARCHRESULT']._serialized_start=3754
+ _globals['_SEARCHRESULT']._serialized_end=3937
+ _globals['_METADATARESULT']._serialized_start=3940
+ _globals['_METADATARESULT']._serialized_end=4571
+ _globals['_PROPERTIESRESULT']._serialized_start=4574
+ _globals['_PROPERTIESRESULT']._serialized_end=4838
+ _globals['_REFPROPERTIESRESULT']._serialized_start=4840
+ _globals['_REFPROPERTIESRESULT']._serialized_end=4931
+ _globals['_BOOST']._serialized_start=4934
+ _globals['_BOOST']._serialized_end=6137
+ _globals['_BOOST_PROPERTYVALUEFUNCTION']._serialized_start=5034
+ _globals['_BOOST_PROPERTYVALUEFUNCTION']._serialized_end=5153
+ _globals['_BOOST_TIMEDECAYFUNCTION']._serialized_start=5156
+ _globals['_BOOST_TIMEDECAYFUNCTION']._serialized_end=5359
+ _globals['_BOOST_NUMERICDECAYFUNCTION']._serialized_start=5362
+ _globals['_BOOST_NUMERICDECAYFUNCTION']._serialized_end=5568
+ _globals['_BOOST_CONDITION']._serialized_start=5571
+ _globals['_BOOST_CONDITION']._serialized_end=5861
+ _globals['_BOOST_PROPERTYVALUEMODIFIER']._serialized_start=5864
+ _globals['_BOOST_PROPERTYVALUEMODIFIER']._serialized_end=5997
+ _globals['_BOOST_DECAYCURVE']._serialized_start=5999
+ _globals['_BOOST_DECAYCURVE']._serialized_end=6116
+# @@protoc_insertion_point(module_scope)
diff --git a/weaviate/proto/v1/v7351/v1/search_get_pb2.pyi b/weaviate/proto/v1/v7351/v1/search_get_pb2.pyi
new file mode 100644
index 000000000..283e2ffad
--- /dev/null
+++ b/weaviate/proto/v1/v7351/v1/search_get_pb2.pyi
@@ -0,0 +1,396 @@
+from weaviate.proto.v1.v7351.v1 import base_pb2 as _base_pb2
+from weaviate.proto.v1.v7351.v1 import base_search_pb2 as _base_search_pb2
+from weaviate.proto.v1.v7351.v1 import generative_pb2 as _generative_pb2
+from weaviate.proto.v1.v7351.v1 import properties_pb2 as _properties_pb2
+from google.protobuf.internal import containers as _containers
+from google.protobuf.internal import enum_type_wrapper as _enum_type_wrapper
+from google.protobuf import descriptor as _descriptor
+from google.protobuf import message as _message
+from collections.abc import Iterable as _Iterable, Mapping as _Mapping
+from typing import ClassVar as _ClassVar, Optional as _Optional, Union as _Union
+
+DESCRIPTOR: _descriptor.FileDescriptor
+
+class SearchRequest(_message.Message):
+ __slots__ = ("collection", "tenant", "consistency_level", "properties", "metadata", "group_by", "limit", "offset", "autocut", "after", "sort_by", "filters", "hybrid_search", "bm25_search", "near_vector", "near_object", "near_text", "near_image", "near_audio", "near_video", "near_depth", "near_thermal", "near_imu", "generative", "rerank", "boost", "uses_123_api", "uses_125_api", "uses_127_api")
+ COLLECTION_FIELD_NUMBER: _ClassVar[int]
+ TENANT_FIELD_NUMBER: _ClassVar[int]
+ CONSISTENCY_LEVEL_FIELD_NUMBER: _ClassVar[int]
+ PROPERTIES_FIELD_NUMBER: _ClassVar[int]
+ METADATA_FIELD_NUMBER: _ClassVar[int]
+ GROUP_BY_FIELD_NUMBER: _ClassVar[int]
+ LIMIT_FIELD_NUMBER: _ClassVar[int]
+ OFFSET_FIELD_NUMBER: _ClassVar[int]
+ AUTOCUT_FIELD_NUMBER: _ClassVar[int]
+ AFTER_FIELD_NUMBER: _ClassVar[int]
+ SORT_BY_FIELD_NUMBER: _ClassVar[int]
+ FILTERS_FIELD_NUMBER: _ClassVar[int]
+ HYBRID_SEARCH_FIELD_NUMBER: _ClassVar[int]
+ BM25_SEARCH_FIELD_NUMBER: _ClassVar[int]
+ NEAR_VECTOR_FIELD_NUMBER: _ClassVar[int]
+ NEAR_OBJECT_FIELD_NUMBER: _ClassVar[int]
+ NEAR_TEXT_FIELD_NUMBER: _ClassVar[int]
+ NEAR_IMAGE_FIELD_NUMBER: _ClassVar[int]
+ NEAR_AUDIO_FIELD_NUMBER: _ClassVar[int]
+ NEAR_VIDEO_FIELD_NUMBER: _ClassVar[int]
+ NEAR_DEPTH_FIELD_NUMBER: _ClassVar[int]
+ NEAR_THERMAL_FIELD_NUMBER: _ClassVar[int]
+ NEAR_IMU_FIELD_NUMBER: _ClassVar[int]
+ GENERATIVE_FIELD_NUMBER: _ClassVar[int]
+ RERANK_FIELD_NUMBER: _ClassVar[int]
+ BOOST_FIELD_NUMBER: _ClassVar[int]
+ USES_123_API_FIELD_NUMBER: _ClassVar[int]
+ USES_125_API_FIELD_NUMBER: _ClassVar[int]
+ USES_127_API_FIELD_NUMBER: _ClassVar[int]
+ collection: str
+ tenant: str
+ consistency_level: _base_pb2.ConsistencyLevel
+ properties: PropertiesRequest
+ metadata: MetadataRequest
+ group_by: GroupBy
+ limit: int
+ offset: int
+ autocut: int
+ after: str
+ sort_by: _containers.RepeatedCompositeFieldContainer[SortBy]
+ filters: _base_pb2.Filters
+ hybrid_search: _base_search_pb2.Hybrid
+ bm25_search: _base_search_pb2.BM25
+ near_vector: _base_search_pb2.NearVector
+ near_object: _base_search_pb2.NearObject
+ near_text: _base_search_pb2.NearTextSearch
+ near_image: _base_search_pb2.NearImageSearch
+ near_audio: _base_search_pb2.NearAudioSearch
+ near_video: _base_search_pb2.NearVideoSearch
+ near_depth: _base_search_pb2.NearDepthSearch
+ near_thermal: _base_search_pb2.NearThermalSearch
+ near_imu: _base_search_pb2.NearIMUSearch
+ generative: _generative_pb2.GenerativeSearch
+ rerank: Rerank
+ boost: Boost
+ uses_123_api: bool
+ uses_125_api: bool
+ uses_127_api: bool
+ def __init__(self, collection: _Optional[str] = ..., tenant: _Optional[str] = ..., consistency_level: _Optional[_Union[_base_pb2.ConsistencyLevel, str]] = ..., properties: _Optional[_Union[PropertiesRequest, _Mapping]] = ..., metadata: _Optional[_Union[MetadataRequest, _Mapping]] = ..., group_by: _Optional[_Union[GroupBy, _Mapping]] = ..., limit: _Optional[int] = ..., offset: _Optional[int] = ..., autocut: _Optional[int] = ..., after: _Optional[str] = ..., sort_by: _Optional[_Iterable[_Union[SortBy, _Mapping]]] = ..., filters: _Optional[_Union[_base_pb2.Filters, _Mapping]] = ..., hybrid_search: _Optional[_Union[_base_search_pb2.Hybrid, _Mapping]] = ..., bm25_search: _Optional[_Union[_base_search_pb2.BM25, _Mapping]] = ..., near_vector: _Optional[_Union[_base_search_pb2.NearVector, _Mapping]] = ..., near_object: _Optional[_Union[_base_search_pb2.NearObject, _Mapping]] = ..., near_text: _Optional[_Union[_base_search_pb2.NearTextSearch, _Mapping]] = ..., near_image: _Optional[_Union[_base_search_pb2.NearImageSearch, _Mapping]] = ..., near_audio: _Optional[_Union[_base_search_pb2.NearAudioSearch, _Mapping]] = ..., near_video: _Optional[_Union[_base_search_pb2.NearVideoSearch, _Mapping]] = ..., near_depth: _Optional[_Union[_base_search_pb2.NearDepthSearch, _Mapping]] = ..., near_thermal: _Optional[_Union[_base_search_pb2.NearThermalSearch, _Mapping]] = ..., near_imu: _Optional[_Union[_base_search_pb2.NearIMUSearch, _Mapping]] = ..., generative: _Optional[_Union[_generative_pb2.GenerativeSearch, _Mapping]] = ..., rerank: _Optional[_Union[Rerank, _Mapping]] = ..., boost: _Optional[_Union[Boost, _Mapping]] = ..., uses_123_api: _Optional[bool] = ..., uses_125_api: _Optional[bool] = ..., uses_127_api: _Optional[bool] = ...) -> None: ...
+
+class GroupBy(_message.Message):
+ __slots__ = ("path", "number_of_groups", "objects_per_group")
+ PATH_FIELD_NUMBER: _ClassVar[int]
+ NUMBER_OF_GROUPS_FIELD_NUMBER: _ClassVar[int]
+ OBJECTS_PER_GROUP_FIELD_NUMBER: _ClassVar[int]
+ path: _containers.RepeatedScalarFieldContainer[str]
+ number_of_groups: int
+ objects_per_group: int
+ def __init__(self, path: _Optional[_Iterable[str]] = ..., number_of_groups: _Optional[int] = ..., objects_per_group: _Optional[int] = ...) -> None: ...
+
+class SortBy(_message.Message):
+ __slots__ = ("ascending", "path")
+ ASCENDING_FIELD_NUMBER: _ClassVar[int]
+ PATH_FIELD_NUMBER: _ClassVar[int]
+ ascending: bool
+ path: _containers.RepeatedScalarFieldContainer[str]
+ def __init__(self, ascending: _Optional[bool] = ..., path: _Optional[_Iterable[str]] = ...) -> None: ...
+
+class MetadataRequest(_message.Message):
+ __slots__ = ("uuid", "vector", "creation_time_unix", "last_update_time_unix", "distance", "certainty", "score", "explain_score", "is_consistent", "vectors", "query_profile")
+ UUID_FIELD_NUMBER: _ClassVar[int]
+ VECTOR_FIELD_NUMBER: _ClassVar[int]
+ CREATION_TIME_UNIX_FIELD_NUMBER: _ClassVar[int]
+ LAST_UPDATE_TIME_UNIX_FIELD_NUMBER: _ClassVar[int]
+ DISTANCE_FIELD_NUMBER: _ClassVar[int]
+ CERTAINTY_FIELD_NUMBER: _ClassVar[int]
+ SCORE_FIELD_NUMBER: _ClassVar[int]
+ EXPLAIN_SCORE_FIELD_NUMBER: _ClassVar[int]
+ IS_CONSISTENT_FIELD_NUMBER: _ClassVar[int]
+ VECTORS_FIELD_NUMBER: _ClassVar[int]
+ QUERY_PROFILE_FIELD_NUMBER: _ClassVar[int]
+ uuid: bool
+ vector: bool
+ creation_time_unix: bool
+ last_update_time_unix: bool
+ distance: bool
+ certainty: bool
+ score: bool
+ explain_score: bool
+ is_consistent: bool
+ vectors: _containers.RepeatedScalarFieldContainer[str]
+ query_profile: bool
+ def __init__(self, uuid: _Optional[bool] = ..., vector: _Optional[bool] = ..., creation_time_unix: _Optional[bool] = ..., last_update_time_unix: _Optional[bool] = ..., distance: _Optional[bool] = ..., certainty: _Optional[bool] = ..., score: _Optional[bool] = ..., explain_score: _Optional[bool] = ..., is_consistent: _Optional[bool] = ..., vectors: _Optional[_Iterable[str]] = ..., query_profile: _Optional[bool] = ...) -> None: ...
+
+class PropertiesRequest(_message.Message):
+ __slots__ = ("non_ref_properties", "ref_properties", "object_properties", "return_all_nonref_properties")
+ NON_REF_PROPERTIES_FIELD_NUMBER: _ClassVar[int]
+ REF_PROPERTIES_FIELD_NUMBER: _ClassVar[int]
+ OBJECT_PROPERTIES_FIELD_NUMBER: _ClassVar[int]
+ RETURN_ALL_NONREF_PROPERTIES_FIELD_NUMBER: _ClassVar[int]
+ non_ref_properties: _containers.RepeatedScalarFieldContainer[str]
+ ref_properties: _containers.RepeatedCompositeFieldContainer[RefPropertiesRequest]
+ object_properties: _containers.RepeatedCompositeFieldContainer[ObjectPropertiesRequest]
+ return_all_nonref_properties: bool
+ def __init__(self, non_ref_properties: _Optional[_Iterable[str]] = ..., ref_properties: _Optional[_Iterable[_Union[RefPropertiesRequest, _Mapping]]] = ..., object_properties: _Optional[_Iterable[_Union[ObjectPropertiesRequest, _Mapping]]] = ..., return_all_nonref_properties: _Optional[bool] = ...) -> None: ...
+
+class ObjectPropertiesRequest(_message.Message):
+ __slots__ = ("prop_name", "primitive_properties", "object_properties")
+ PROP_NAME_FIELD_NUMBER: _ClassVar[int]
+ PRIMITIVE_PROPERTIES_FIELD_NUMBER: _ClassVar[int]
+ OBJECT_PROPERTIES_FIELD_NUMBER: _ClassVar[int]
+ prop_name: str
+ primitive_properties: _containers.RepeatedScalarFieldContainer[str]
+ object_properties: _containers.RepeatedCompositeFieldContainer[ObjectPropertiesRequest]
+ def __init__(self, prop_name: _Optional[str] = ..., primitive_properties: _Optional[_Iterable[str]] = ..., object_properties: _Optional[_Iterable[_Union[ObjectPropertiesRequest, _Mapping]]] = ...) -> None: ...
+
+class RefPropertiesRequest(_message.Message):
+ __slots__ = ("reference_property", "properties", "metadata", "target_collection")
+ REFERENCE_PROPERTY_FIELD_NUMBER: _ClassVar[int]
+ PROPERTIES_FIELD_NUMBER: _ClassVar[int]
+ METADATA_FIELD_NUMBER: _ClassVar[int]
+ TARGET_COLLECTION_FIELD_NUMBER: _ClassVar[int]
+ reference_property: str
+ properties: PropertiesRequest
+ metadata: MetadataRequest
+ target_collection: str
+ def __init__(self, reference_property: _Optional[str] = ..., properties: _Optional[_Union[PropertiesRequest, _Mapping]] = ..., metadata: _Optional[_Union[MetadataRequest, _Mapping]] = ..., target_collection: _Optional[str] = ...) -> None: ...
+
+class Rerank(_message.Message):
+ __slots__ = ("property", "query")
+ PROPERTY_FIELD_NUMBER: _ClassVar[int]
+ QUERY_FIELD_NUMBER: _ClassVar[int]
+ property: str
+ query: str
+ def __init__(self, property: _Optional[str] = ..., query: _Optional[str] = ...) -> None: ...
+
+class SearchReply(_message.Message):
+ __slots__ = ("took", "results", "generative_grouped_result", "group_by_results", "generative_grouped_results", "query_profile")
+ TOOK_FIELD_NUMBER: _ClassVar[int]
+ RESULTS_FIELD_NUMBER: _ClassVar[int]
+ GENERATIVE_GROUPED_RESULT_FIELD_NUMBER: _ClassVar[int]
+ GROUP_BY_RESULTS_FIELD_NUMBER: _ClassVar[int]
+ GENERATIVE_GROUPED_RESULTS_FIELD_NUMBER: _ClassVar[int]
+ QUERY_PROFILE_FIELD_NUMBER: _ClassVar[int]
+ took: float
+ results: _containers.RepeatedCompositeFieldContainer[SearchResult]
+ generative_grouped_result: str
+ group_by_results: _containers.RepeatedCompositeFieldContainer[GroupByResult]
+ generative_grouped_results: _generative_pb2.GenerativeResult
+ query_profile: QueryProfile
+ def __init__(self, took: _Optional[float] = ..., results: _Optional[_Iterable[_Union[SearchResult, _Mapping]]] = ..., generative_grouped_result: _Optional[str] = ..., group_by_results: _Optional[_Iterable[_Union[GroupByResult, _Mapping]]] = ..., generative_grouped_results: _Optional[_Union[_generative_pb2.GenerativeResult, _Mapping]] = ..., query_profile: _Optional[_Union[QueryProfile, _Mapping]] = ...) -> None: ...
+
+class QueryProfile(_message.Message):
+ __slots__ = ("shards",)
+ class SearchProfile(_message.Message):
+ __slots__ = ("details",)
+ class DetailsEntry(_message.Message):
+ __slots__ = ("key", "value")
+ KEY_FIELD_NUMBER: _ClassVar[int]
+ VALUE_FIELD_NUMBER: _ClassVar[int]
+ key: str
+ value: str
+ def __init__(self, key: _Optional[str] = ..., value: _Optional[str] = ...) -> None: ...
+ DETAILS_FIELD_NUMBER: _ClassVar[int]
+ details: _containers.ScalarMap[str, str]
+ def __init__(self, details: _Optional[_Mapping[str, str]] = ...) -> None: ...
+ class ShardProfile(_message.Message):
+ __slots__ = ("name", "node", "searches")
+ class SearchesEntry(_message.Message):
+ __slots__ = ("key", "value")
+ KEY_FIELD_NUMBER: _ClassVar[int]
+ VALUE_FIELD_NUMBER: _ClassVar[int]
+ key: str
+ value: QueryProfile.SearchProfile
+ def __init__(self, key: _Optional[str] = ..., value: _Optional[_Union[QueryProfile.SearchProfile, _Mapping]] = ...) -> None: ...
+ NAME_FIELD_NUMBER: _ClassVar[int]
+ NODE_FIELD_NUMBER: _ClassVar[int]
+ SEARCHES_FIELD_NUMBER: _ClassVar[int]
+ name: str
+ node: str
+ searches: _containers.MessageMap[str, QueryProfile.SearchProfile]
+ def __init__(self, name: _Optional[str] = ..., node: _Optional[str] = ..., searches: _Optional[_Mapping[str, QueryProfile.SearchProfile]] = ...) -> None: ...
+ SHARDS_FIELD_NUMBER: _ClassVar[int]
+ shards: _containers.RepeatedCompositeFieldContainer[QueryProfile.ShardProfile]
+ def __init__(self, shards: _Optional[_Iterable[_Union[QueryProfile.ShardProfile, _Mapping]]] = ...) -> None: ...
+
+class RerankReply(_message.Message):
+ __slots__ = ("score",)
+ SCORE_FIELD_NUMBER: _ClassVar[int]
+ score: float
+ def __init__(self, score: _Optional[float] = ...) -> None: ...
+
+class GroupByResult(_message.Message):
+ __slots__ = ("name", "min_distance", "max_distance", "number_of_objects", "objects", "rerank", "generative", "generative_result")
+ NAME_FIELD_NUMBER: _ClassVar[int]
+ MIN_DISTANCE_FIELD_NUMBER: _ClassVar[int]
+ MAX_DISTANCE_FIELD_NUMBER: _ClassVar[int]
+ NUMBER_OF_OBJECTS_FIELD_NUMBER: _ClassVar[int]
+ OBJECTS_FIELD_NUMBER: _ClassVar[int]
+ RERANK_FIELD_NUMBER: _ClassVar[int]
+ GENERATIVE_FIELD_NUMBER: _ClassVar[int]
+ GENERATIVE_RESULT_FIELD_NUMBER: _ClassVar[int]
+ name: str
+ min_distance: float
+ max_distance: float
+ number_of_objects: int
+ objects: _containers.RepeatedCompositeFieldContainer[SearchResult]
+ rerank: RerankReply
+ generative: _generative_pb2.GenerativeReply
+ generative_result: _generative_pb2.GenerativeResult
+ def __init__(self, name: _Optional[str] = ..., min_distance: _Optional[float] = ..., max_distance: _Optional[float] = ..., number_of_objects: _Optional[int] = ..., objects: _Optional[_Iterable[_Union[SearchResult, _Mapping]]] = ..., rerank: _Optional[_Union[RerankReply, _Mapping]] = ..., generative: _Optional[_Union[_generative_pb2.GenerativeReply, _Mapping]] = ..., generative_result: _Optional[_Union[_generative_pb2.GenerativeResult, _Mapping]] = ...) -> None: ...
+
+class SearchResult(_message.Message):
+ __slots__ = ("properties", "metadata", "generative")
+ PROPERTIES_FIELD_NUMBER: _ClassVar[int]
+ METADATA_FIELD_NUMBER: _ClassVar[int]
+ GENERATIVE_FIELD_NUMBER: _ClassVar[int]
+ properties: PropertiesResult
+ metadata: MetadataResult
+ generative: _generative_pb2.GenerativeResult
+ def __init__(self, properties: _Optional[_Union[PropertiesResult, _Mapping]] = ..., metadata: _Optional[_Union[MetadataResult, _Mapping]] = ..., generative: _Optional[_Union[_generative_pb2.GenerativeResult, _Mapping]] = ...) -> None: ...
+
+class MetadataResult(_message.Message):
+ __slots__ = ("id", "vector", "creation_time_unix", "creation_time_unix_present", "last_update_time_unix", "last_update_time_unix_present", "distance", "distance_present", "certainty", "certainty_present", "score", "score_present", "explain_score", "explain_score_present", "is_consistent", "generative", "generative_present", "is_consistent_present", "vector_bytes", "id_as_bytes", "rerank_score", "rerank_score_present", "vectors")
+ ID_FIELD_NUMBER: _ClassVar[int]
+ VECTOR_FIELD_NUMBER: _ClassVar[int]
+ CREATION_TIME_UNIX_FIELD_NUMBER: _ClassVar[int]
+ CREATION_TIME_UNIX_PRESENT_FIELD_NUMBER: _ClassVar[int]
+ LAST_UPDATE_TIME_UNIX_FIELD_NUMBER: _ClassVar[int]
+ LAST_UPDATE_TIME_UNIX_PRESENT_FIELD_NUMBER: _ClassVar[int]
+ DISTANCE_FIELD_NUMBER: _ClassVar[int]
+ DISTANCE_PRESENT_FIELD_NUMBER: _ClassVar[int]
+ CERTAINTY_FIELD_NUMBER: _ClassVar[int]
+ CERTAINTY_PRESENT_FIELD_NUMBER: _ClassVar[int]
+ SCORE_FIELD_NUMBER: _ClassVar[int]
+ SCORE_PRESENT_FIELD_NUMBER: _ClassVar[int]
+ EXPLAIN_SCORE_FIELD_NUMBER: _ClassVar[int]
+ EXPLAIN_SCORE_PRESENT_FIELD_NUMBER: _ClassVar[int]
+ IS_CONSISTENT_FIELD_NUMBER: _ClassVar[int]
+ GENERATIVE_FIELD_NUMBER: _ClassVar[int]
+ GENERATIVE_PRESENT_FIELD_NUMBER: _ClassVar[int]
+ IS_CONSISTENT_PRESENT_FIELD_NUMBER: _ClassVar[int]
+ VECTOR_BYTES_FIELD_NUMBER: _ClassVar[int]
+ ID_AS_BYTES_FIELD_NUMBER: _ClassVar[int]
+ RERANK_SCORE_FIELD_NUMBER: _ClassVar[int]
+ RERANK_SCORE_PRESENT_FIELD_NUMBER: _ClassVar[int]
+ VECTORS_FIELD_NUMBER: _ClassVar[int]
+ id: str
+ vector: _containers.RepeatedScalarFieldContainer[float]
+ creation_time_unix: int
+ creation_time_unix_present: bool
+ last_update_time_unix: int
+ last_update_time_unix_present: bool
+ distance: float
+ distance_present: bool
+ certainty: float
+ certainty_present: bool
+ score: float
+ score_present: bool
+ explain_score: str
+ explain_score_present: bool
+ is_consistent: bool
+ generative: str
+ generative_present: bool
+ is_consistent_present: bool
+ vector_bytes: bytes
+ id_as_bytes: bytes
+ rerank_score: float
+ rerank_score_present: bool
+ vectors: _containers.RepeatedCompositeFieldContainer[_base_pb2.Vectors]
+ def __init__(self, id: _Optional[str] = ..., vector: _Optional[_Iterable[float]] = ..., creation_time_unix: _Optional[int] = ..., creation_time_unix_present: _Optional[bool] = ..., last_update_time_unix: _Optional[int] = ..., last_update_time_unix_present: _Optional[bool] = ..., distance: _Optional[float] = ..., distance_present: _Optional[bool] = ..., certainty: _Optional[float] = ..., certainty_present: _Optional[bool] = ..., score: _Optional[float] = ..., score_present: _Optional[bool] = ..., explain_score: _Optional[str] = ..., explain_score_present: _Optional[bool] = ..., is_consistent: _Optional[bool] = ..., generative: _Optional[str] = ..., generative_present: _Optional[bool] = ..., is_consistent_present: _Optional[bool] = ..., vector_bytes: _Optional[bytes] = ..., id_as_bytes: _Optional[bytes] = ..., rerank_score: _Optional[float] = ..., rerank_score_present: _Optional[bool] = ..., vectors: _Optional[_Iterable[_Union[_base_pb2.Vectors, _Mapping]]] = ...) -> None: ...
+
+class PropertiesResult(_message.Message):
+ __slots__ = ("ref_props", "target_collection", "metadata", "non_ref_props", "ref_props_requested")
+ REF_PROPS_FIELD_NUMBER: _ClassVar[int]
+ TARGET_COLLECTION_FIELD_NUMBER: _ClassVar[int]
+ METADATA_FIELD_NUMBER: _ClassVar[int]
+ NON_REF_PROPS_FIELD_NUMBER: _ClassVar[int]
+ REF_PROPS_REQUESTED_FIELD_NUMBER: _ClassVar[int]
+ ref_props: _containers.RepeatedCompositeFieldContainer[RefPropertiesResult]
+ target_collection: str
+ metadata: MetadataResult
+ non_ref_props: _properties_pb2.Properties
+ ref_props_requested: bool
+ def __init__(self, ref_props: _Optional[_Iterable[_Union[RefPropertiesResult, _Mapping]]] = ..., target_collection: _Optional[str] = ..., metadata: _Optional[_Union[MetadataResult, _Mapping]] = ..., non_ref_props: _Optional[_Union[_properties_pb2.Properties, _Mapping]] = ..., ref_props_requested: _Optional[bool] = ...) -> None: ...
+
+class RefPropertiesResult(_message.Message):
+ __slots__ = ("properties", "prop_name")
+ PROPERTIES_FIELD_NUMBER: _ClassVar[int]
+ PROP_NAME_FIELD_NUMBER: _ClassVar[int]
+ properties: _containers.RepeatedCompositeFieldContainer[PropertiesResult]
+ prop_name: str
+ def __init__(self, properties: _Optional[_Iterable[_Union[PropertiesResult, _Mapping]]] = ..., prop_name: _Optional[str] = ...) -> None: ...
+
+class Boost(_message.Message):
+ __slots__ = ("conditions", "weight", "depth")
+ class PropertyValueModifier(int, metaclass=_enum_type_wrapper.EnumTypeWrapper):
+ __slots__ = ()
+ PROPERTY_VALUE_MODIFIER_UNSPECIFIED: _ClassVar[Boost.PropertyValueModifier]
+ PROPERTY_VALUE_MODIFIER_LOG1P: _ClassVar[Boost.PropertyValueModifier]
+ PROPERTY_VALUE_MODIFIER_SQRT: _ClassVar[Boost.PropertyValueModifier]
+ PROPERTY_VALUE_MODIFIER_UNSPECIFIED: Boost.PropertyValueModifier
+ PROPERTY_VALUE_MODIFIER_LOG1P: Boost.PropertyValueModifier
+ PROPERTY_VALUE_MODIFIER_SQRT: Boost.PropertyValueModifier
+ class DecayCurve(int, metaclass=_enum_type_wrapper.EnumTypeWrapper):
+ __slots__ = ()
+ DECAY_CURVE_UNSPECIFIED: _ClassVar[Boost.DecayCurve]
+ DECAY_CURVE_GAUSS: _ClassVar[Boost.DecayCurve]
+ DECAY_CURVE_LINEAR: _ClassVar[Boost.DecayCurve]
+ DECAY_CURVE_EXPONENTIAL: _ClassVar[Boost.DecayCurve]
+ DECAY_CURVE_UNSPECIFIED: Boost.DecayCurve
+ DECAY_CURVE_GAUSS: Boost.DecayCurve
+ DECAY_CURVE_LINEAR: Boost.DecayCurve
+ DECAY_CURVE_EXPONENTIAL: Boost.DecayCurve
+ class PropertyValueFunction(_message.Message):
+ __slots__ = ("property", "modifier")
+ PROPERTY_FIELD_NUMBER: _ClassVar[int]
+ MODIFIER_FIELD_NUMBER: _ClassVar[int]
+ property: str
+ modifier: Boost.PropertyValueModifier
+ def __init__(self, property: _Optional[str] = ..., modifier: _Optional[_Union[Boost.PropertyValueModifier, str]] = ...) -> None: ...
+ class TimeDecayFunction(_message.Message):
+ __slots__ = ("property", "origin", "scale", "offset", "curve", "decay_value")
+ PROPERTY_FIELD_NUMBER: _ClassVar[int]
+ ORIGIN_FIELD_NUMBER: _ClassVar[int]
+ SCALE_FIELD_NUMBER: _ClassVar[int]
+ OFFSET_FIELD_NUMBER: _ClassVar[int]
+ CURVE_FIELD_NUMBER: _ClassVar[int]
+ DECAY_VALUE_FIELD_NUMBER: _ClassVar[int]
+ property: str
+ origin: str
+ scale: str
+ offset: str
+ curve: Boost.DecayCurve
+ decay_value: float
+ def __init__(self, property: _Optional[str] = ..., origin: _Optional[str] = ..., scale: _Optional[str] = ..., offset: _Optional[str] = ..., curve: _Optional[_Union[Boost.DecayCurve, str]] = ..., decay_value: _Optional[float] = ...) -> None: ...
+ class NumericDecayFunction(_message.Message):
+ __slots__ = ("property", "origin", "scale", "offset", "curve", "decay_value")
+ PROPERTY_FIELD_NUMBER: _ClassVar[int]
+ ORIGIN_FIELD_NUMBER: _ClassVar[int]
+ SCALE_FIELD_NUMBER: _ClassVar[int]
+ OFFSET_FIELD_NUMBER: _ClassVar[int]
+ CURVE_FIELD_NUMBER: _ClassVar[int]
+ DECAY_VALUE_FIELD_NUMBER: _ClassVar[int]
+ property: str
+ origin: float
+ scale: float
+ offset: float
+ curve: Boost.DecayCurve
+ decay_value: float
+ def __init__(self, property: _Optional[str] = ..., origin: _Optional[float] = ..., scale: _Optional[float] = ..., offset: _Optional[float] = ..., curve: _Optional[_Union[Boost.DecayCurve, str]] = ..., decay_value: _Optional[float] = ...) -> None: ...
+ class Condition(_message.Message):
+ __slots__ = ("filter", "time_decay", "property_value", "numeric_decay", "weight")
+ FILTER_FIELD_NUMBER: _ClassVar[int]
+ TIME_DECAY_FIELD_NUMBER: _ClassVar[int]
+ PROPERTY_VALUE_FIELD_NUMBER: _ClassVar[int]
+ NUMERIC_DECAY_FIELD_NUMBER: _ClassVar[int]
+ WEIGHT_FIELD_NUMBER: _ClassVar[int]
+ filter: _base_pb2.Filters
+ time_decay: Boost.TimeDecayFunction
+ property_value: Boost.PropertyValueFunction
+ numeric_decay: Boost.NumericDecayFunction
+ weight: float
+ def __init__(self, filter: _Optional[_Union[_base_pb2.Filters, _Mapping]] = ..., time_decay: _Optional[_Union[Boost.TimeDecayFunction, _Mapping]] = ..., property_value: _Optional[_Union[Boost.PropertyValueFunction, _Mapping]] = ..., numeric_decay: _Optional[_Union[Boost.NumericDecayFunction, _Mapping]] = ..., weight: _Optional[float] = ...) -> None: ...
+ CONDITIONS_FIELD_NUMBER: _ClassVar[int]
+ WEIGHT_FIELD_NUMBER: _ClassVar[int]
+ DEPTH_FIELD_NUMBER: _ClassVar[int]
+ conditions: _containers.RepeatedCompositeFieldContainer[Boost.Condition]
+ weight: float
+ depth: int
+ def __init__(self, conditions: _Optional[_Iterable[_Union[Boost.Condition, _Mapping]]] = ..., weight: _Optional[float] = ..., depth: _Optional[int] = ...) -> None: ...
diff --git a/weaviate/proto/v1/v7351/v1/search_get_pb2_grpc.py b/weaviate/proto/v1/v7351/v1/search_get_pb2_grpc.py
new file mode 100644
index 000000000..a74c9d6fb
--- /dev/null
+++ b/weaviate/proto/v1/v7351/v1/search_get_pb2_grpc.py
@@ -0,0 +1,24 @@
+# Generated by the gRPC Python protocol compiler plugin. DO NOT EDIT!
+"""Client and server classes corresponding to protobuf-defined services."""
+import grpc
+import warnings
+
+
+GRPC_GENERATED_VERSION = '1.83.0'
+GRPC_VERSION = grpc.__version__
+_version_not_supported = False
+
+try:
+ from grpc._utilities import first_version_is_lower
+ _version_not_supported = first_version_is_lower(GRPC_VERSION, GRPC_GENERATED_VERSION)
+except ImportError:
+ _version_not_supported = True
+
+if _version_not_supported:
+ raise RuntimeError(
+ f'The grpc package installed is at version {GRPC_VERSION},'
+ + ' but the generated code in v1/search_get_pb2_grpc.py depends on'
+ + f' grpcio>={GRPC_GENERATED_VERSION}.'
+ + f' Please upgrade your grpc module to grpcio>={GRPC_GENERATED_VERSION}'
+ + f' or downgrade your generated code using grpcio-tools<={GRPC_VERSION}.'
+ )
diff --git a/weaviate/proto/v1/v7351/v1/tenants_pb2.py b/weaviate/proto/v1/v7351/v1/tenants_pb2.py
new file mode 100644
index 000000000..d8e915a40
--- /dev/null
+++ b/weaviate/proto/v1/v7351/v1/tenants_pb2.py
@@ -0,0 +1,45 @@
+# -*- coding: utf-8 -*-
+# Generated by the protocol buffer compiler. DO NOT EDIT!
+# NO CHECKED-IN PROTOBUF GENCODE
+# source: v1/tenants.proto
+# Protobuf Python Version: 7.35.1
+"""Generated protocol buffer code."""
+from google.protobuf import descriptor as _descriptor
+from google.protobuf import descriptor_pool as _descriptor_pool
+from google.protobuf import runtime_version as _runtime_version
+from google.protobuf import symbol_database as _symbol_database
+from google.protobuf.internal import builder as _builder
+_runtime_version.ValidateProtobufRuntimeVersion(
+ _runtime_version.Domain.PUBLIC,
+ 7,
+ 35,
+ 1,
+ '',
+ 'v1/tenants.proto'
+)
+# @@protoc_insertion_point(imports)
+
+_sym_db = _symbol_database.Default()
+
+
+
+
+DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n\x10v1/tenants.proto\x12\x0bweaviate.v1\"\\\n\x11TenantsGetRequest\x12\x12\n\ncollection\x18\x01 \x01(\t\x12)\n\x05names\x18\x02 \x01(\x0b\x32\x18.weaviate.v1.TenantNamesH\x00\x42\x08\n\x06params\"\x1d\n\x0bTenantNames\x12\x0e\n\x06values\x18\x01 \x03(\t\"E\n\x0fTenantsGetReply\x12\x0c\n\x04took\x18\x01 \x01(\x02\x12$\n\x07tenants\x18\x02 \x03(\x0b\x32\x13.weaviate.v1.Tenant\"R\n\x06Tenant\x12\x0c\n\x04name\x18\x01 \x01(\t\x12:\n\x0f\x61\x63tivity_status\x18\x02 \x01(\x0e\x32!.weaviate.v1.TenantActivityStatus*\xaf\x03\n\x14TenantActivityStatus\x12&\n\"TENANT_ACTIVITY_STATUS_UNSPECIFIED\x10\x00\x12\x1e\n\x1aTENANT_ACTIVITY_STATUS_HOT\x10\x01\x12\x1f\n\x1bTENANT_ACTIVITY_STATUS_COLD\x10\x02\x12!\n\x1dTENANT_ACTIVITY_STATUS_FROZEN\x10\x04\x12%\n!TENANT_ACTIVITY_STATUS_UNFREEZING\x10\x05\x12#\n\x1fTENANT_ACTIVITY_STATUS_FREEZING\x10\x06\x12!\n\x1dTENANT_ACTIVITY_STATUS_ACTIVE\x10\x07\x12#\n\x1fTENANT_ACTIVITY_STATUS_INACTIVE\x10\x08\x12$\n TENANT_ACTIVITY_STATUS_OFFLOADED\x10\t\x12%\n!TENANT_ACTIVITY_STATUS_OFFLOADING\x10\n\x12$\n TENANT_ACTIVITY_STATUS_ONLOADING\x10\x0b\"\x04\x08\x03\x10\x03\x42q\n#io.weaviate.client.grpc.protocol.v1B\x14WeaviateProtoTenantsZ4github.com/weaviate/weaviate/grpc/generated;protocolb\x06proto3')
+
+_globals = globals()
+_builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, _globals)
+_builder.BuildTopDescriptorsAndMessages(DESCRIPTOR, 'v1.tenants_pb2', _globals)
+if not _descriptor._USE_C_DESCRIPTORS:
+ _globals['DESCRIPTOR']._loaded_options = None
+ _globals['DESCRIPTOR']._serialized_options = b'\n#io.weaviate.client.grpc.protocol.v1B\024WeaviateProtoTenantsZ4github.com/weaviate/weaviate/grpc/generated;protocol'
+ _globals['_TENANTACTIVITYSTATUS']._serialized_start=314
+ _globals['_TENANTACTIVITYSTATUS']._serialized_end=745
+ _globals['_TENANTSGETREQUEST']._serialized_start=33
+ _globals['_TENANTSGETREQUEST']._serialized_end=125
+ _globals['_TENANTNAMES']._serialized_start=127
+ _globals['_TENANTNAMES']._serialized_end=156
+ _globals['_TENANTSGETREPLY']._serialized_start=158
+ _globals['_TENANTSGETREPLY']._serialized_end=227
+ _globals['_TENANT']._serialized_start=229
+ _globals['_TENANT']._serialized_end=311
+# @@protoc_insertion_point(module_scope)
diff --git a/weaviate/proto/v1/v7351/v1/tenants_pb2.pyi b/weaviate/proto/v1/v7351/v1/tenants_pb2.pyi
new file mode 100644
index 000000000..5ff780a07
--- /dev/null
+++ b/weaviate/proto/v1/v7351/v1/tenants_pb2.pyi
@@ -0,0 +1,63 @@
+from google.protobuf.internal import containers as _containers
+from google.protobuf.internal import enum_type_wrapper as _enum_type_wrapper
+from google.protobuf import descriptor as _descriptor
+from google.protobuf import message as _message
+from collections.abc import Iterable as _Iterable, Mapping as _Mapping
+from typing import ClassVar as _ClassVar, Optional as _Optional, Union as _Union
+
+DESCRIPTOR: _descriptor.FileDescriptor
+
+class TenantActivityStatus(int, metaclass=_enum_type_wrapper.EnumTypeWrapper):
+ __slots__ = ()
+ TENANT_ACTIVITY_STATUS_UNSPECIFIED: _ClassVar[TenantActivityStatus]
+ TENANT_ACTIVITY_STATUS_HOT: _ClassVar[TenantActivityStatus]
+ TENANT_ACTIVITY_STATUS_COLD: _ClassVar[TenantActivityStatus]
+ TENANT_ACTIVITY_STATUS_FROZEN: _ClassVar[TenantActivityStatus]
+ TENANT_ACTIVITY_STATUS_UNFREEZING: _ClassVar[TenantActivityStatus]
+ TENANT_ACTIVITY_STATUS_FREEZING: _ClassVar[TenantActivityStatus]
+ TENANT_ACTIVITY_STATUS_ACTIVE: _ClassVar[TenantActivityStatus]
+ TENANT_ACTIVITY_STATUS_INACTIVE: _ClassVar[TenantActivityStatus]
+ TENANT_ACTIVITY_STATUS_OFFLOADED: _ClassVar[TenantActivityStatus]
+ TENANT_ACTIVITY_STATUS_OFFLOADING: _ClassVar[TenantActivityStatus]
+ TENANT_ACTIVITY_STATUS_ONLOADING: _ClassVar[TenantActivityStatus]
+TENANT_ACTIVITY_STATUS_UNSPECIFIED: TenantActivityStatus
+TENANT_ACTIVITY_STATUS_HOT: TenantActivityStatus
+TENANT_ACTIVITY_STATUS_COLD: TenantActivityStatus
+TENANT_ACTIVITY_STATUS_FROZEN: TenantActivityStatus
+TENANT_ACTIVITY_STATUS_UNFREEZING: TenantActivityStatus
+TENANT_ACTIVITY_STATUS_FREEZING: TenantActivityStatus
+TENANT_ACTIVITY_STATUS_ACTIVE: TenantActivityStatus
+TENANT_ACTIVITY_STATUS_INACTIVE: TenantActivityStatus
+TENANT_ACTIVITY_STATUS_OFFLOADED: TenantActivityStatus
+TENANT_ACTIVITY_STATUS_OFFLOADING: TenantActivityStatus
+TENANT_ACTIVITY_STATUS_ONLOADING: TenantActivityStatus
+
+class TenantsGetRequest(_message.Message):
+ __slots__ = ("collection", "names")
+ COLLECTION_FIELD_NUMBER: _ClassVar[int]
+ NAMES_FIELD_NUMBER: _ClassVar[int]
+ collection: str
+ names: TenantNames
+ def __init__(self, collection: _Optional[str] = ..., names: _Optional[_Union[TenantNames, _Mapping]] = ...) -> None: ...
+
+class TenantNames(_message.Message):
+ __slots__ = ("values",)
+ VALUES_FIELD_NUMBER: _ClassVar[int]
+ values: _containers.RepeatedScalarFieldContainer[str]
+ def __init__(self, values: _Optional[_Iterable[str]] = ...) -> None: ...
+
+class TenantsGetReply(_message.Message):
+ __slots__ = ("took", "tenants")
+ TOOK_FIELD_NUMBER: _ClassVar[int]
+ TENANTS_FIELD_NUMBER: _ClassVar[int]
+ took: float
+ tenants: _containers.RepeatedCompositeFieldContainer[Tenant]
+ def __init__(self, took: _Optional[float] = ..., tenants: _Optional[_Iterable[_Union[Tenant, _Mapping]]] = ...) -> None: ...
+
+class Tenant(_message.Message):
+ __slots__ = ("name", "activity_status")
+ NAME_FIELD_NUMBER: _ClassVar[int]
+ ACTIVITY_STATUS_FIELD_NUMBER: _ClassVar[int]
+ name: str
+ activity_status: TenantActivityStatus
+ def __init__(self, name: _Optional[str] = ..., activity_status: _Optional[_Union[TenantActivityStatus, str]] = ...) -> None: ...
diff --git a/weaviate/proto/v1/v7351/v1/tenants_pb2_grpc.py b/weaviate/proto/v1/v7351/v1/tenants_pb2_grpc.py
new file mode 100644
index 000000000..28105b8f2
--- /dev/null
+++ b/weaviate/proto/v1/v7351/v1/tenants_pb2_grpc.py
@@ -0,0 +1,24 @@
+# Generated by the gRPC Python protocol compiler plugin. DO NOT EDIT!
+"""Client and server classes corresponding to protobuf-defined services."""
+import grpc
+import warnings
+
+
+GRPC_GENERATED_VERSION = '1.83.0'
+GRPC_VERSION = grpc.__version__
+_version_not_supported = False
+
+try:
+ from grpc._utilities import first_version_is_lower
+ _version_not_supported = first_version_is_lower(GRPC_VERSION, GRPC_GENERATED_VERSION)
+except ImportError:
+ _version_not_supported = True
+
+if _version_not_supported:
+ raise RuntimeError(
+ f'The grpc package installed is at version {GRPC_VERSION},'
+ + ' but the generated code in v1/tenants_pb2_grpc.py depends on'
+ + f' grpcio>={GRPC_GENERATED_VERSION}.'
+ + f' Please upgrade your grpc module to grpcio>={GRPC_GENERATED_VERSION}'
+ + f' or downgrade your generated code using grpcio-tools<={GRPC_VERSION}.'
+ )
diff --git a/weaviate/proto/v1/v7351/v1/weaviate_pb2.py b/weaviate/proto/v1/v7351/v1/weaviate_pb2.py
new file mode 100644
index 000000000..4f3a39704
--- /dev/null
+++ b/weaviate/proto/v1/v7351/v1/weaviate_pb2.py
@@ -0,0 +1,42 @@
+# -*- coding: utf-8 -*-
+# Generated by the protocol buffer compiler. DO NOT EDIT!
+# NO CHECKED-IN PROTOBUF GENCODE
+# source: v1/weaviate.proto
+# Protobuf Python Version: 7.35.1
+"""Generated protocol buffer code."""
+from google.protobuf import descriptor as _descriptor
+from google.protobuf import descriptor_pool as _descriptor_pool
+from google.protobuf import runtime_version as _runtime_version
+from google.protobuf import symbol_database as _symbol_database
+from google.protobuf.internal import builder as _builder
+_runtime_version.ValidateProtobufRuntimeVersion(
+ _runtime_version.Domain.PUBLIC,
+ 7,
+ 35,
+ 1,
+ '',
+ 'v1/weaviate.proto'
+)
+# @@protoc_insertion_point(imports)
+
+_sym_db = _symbol_database.Default()
+
+
+from weaviate.proto.v1.v7351.v1 import aggregate_pb2 as v1_dot_aggregate__pb2
+from weaviate.proto.v1.v7351.v1 import batch_pb2 as v1_dot_batch__pb2
+from weaviate.proto.v1.v7351.v1 import batch_delete_pb2 as v1_dot_batch__delete__pb2
+from weaviate.proto.v1.v7351.v1 import search_get_pb2 as v1_dot_search__get__pb2
+from weaviate.proto.v1.v7351.v1 import tenants_pb2 as v1_dot_tenants__pb2
+
+
+DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n\x11v1/weaviate.proto\x12\x0bweaviate.v1\x1a\x12v1/aggregate.proto\x1a\x0ev1/batch.proto\x1a\x15v1/batch_delete.proto\x1a\x13v1/search_get.proto\x1a\x10v1/tenants.proto2\xbc\x04\n\x08Weaviate\x12@\n\x06Search\x12\x1a.weaviate.v1.SearchRequest\x1a\x18.weaviate.v1.SearchReply\"\x00\x12R\n\x0c\x42\x61tchObjects\x12 .weaviate.v1.BatchObjectsRequest\x1a\x1e.weaviate.v1.BatchObjectsReply\"\x00\x12[\n\x0f\x42\x61tchReferences\x12#.weaviate.v1.BatchReferencesRequest\x1a!.weaviate.v1.BatchReferencesReply\"\x00\x12O\n\x0b\x42\x61tchDelete\x12\x1f.weaviate.v1.BatchDeleteRequest\x1a\x1d.weaviate.v1.BatchDeleteReply\"\x00\x12L\n\nTenantsGet\x12\x1e.weaviate.v1.TenantsGetRequest\x1a\x1c.weaviate.v1.TenantsGetReply\"\x00\x12I\n\tAggregate\x12\x1d.weaviate.v1.AggregateRequest\x1a\x1b.weaviate.v1.AggregateReply\"\x00\x12S\n\x0b\x42\x61tchStream\x12\x1f.weaviate.v1.BatchStreamRequest\x1a\x1d.weaviate.v1.BatchStreamReply\"\x00(\x01\x30\x01\x42j\n#io.weaviate.client.grpc.protocol.v1B\rWeaviateProtoZ4github.com/weaviate/weaviate/grpc/generated;protocolb\x06proto3')
+
+_globals = globals()
+_builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, _globals)
+_builder.BuildTopDescriptorsAndMessages(DESCRIPTOR, 'v1.weaviate_pb2', _globals)
+if not _descriptor._USE_C_DESCRIPTORS:
+ _globals['DESCRIPTOR']._loaded_options = None
+ _globals['DESCRIPTOR']._serialized_options = b'\n#io.weaviate.client.grpc.protocol.v1B\rWeaviateProtoZ4github.com/weaviate/weaviate/grpc/generated;protocol'
+ _globals['_WEAVIATE']._serialized_start=133
+ _globals['_WEAVIATE']._serialized_end=705
+# @@protoc_insertion_point(module_scope)
diff --git a/weaviate/proto/v1/v7351/v1/weaviate_pb2.pyi b/weaviate/proto/v1/v7351/v1/weaviate_pb2.pyi
new file mode 100644
index 000000000..2f8c2f4b5
--- /dev/null
+++ b/weaviate/proto/v1/v7351/v1/weaviate_pb2.pyi
@@ -0,0 +1,9 @@
+from weaviate.proto.v1.v7351.v1 import aggregate_pb2 as _aggregate_pb2
+from weaviate.proto.v1.v7351.v1 import batch_pb2 as _batch_pb2
+from weaviate.proto.v1.v7351.v1 import batch_delete_pb2 as _batch_delete_pb2
+from weaviate.proto.v1.v7351.v1 import search_get_pb2 as _search_get_pb2
+from weaviate.proto.v1.v7351.v1 import tenants_pb2 as _tenants_pb2
+from google.protobuf import descriptor as _descriptor
+from typing import ClassVar as _ClassVar
+
+DESCRIPTOR: _descriptor.FileDescriptor
diff --git a/weaviate/proto/v1/v7351/v1/weaviate_pb2_grpc.py b/weaviate/proto/v1/v7351/v1/weaviate_pb2_grpc.py
new file mode 100644
index 000000000..4492a1103
--- /dev/null
+++ b/weaviate/proto/v1/v7351/v1/weaviate_pb2_grpc.py
@@ -0,0 +1,359 @@
+# Generated by the gRPC Python protocol compiler plugin. DO NOT EDIT!
+"""Client and server classes corresponding to protobuf-defined services."""
+import grpc
+import warnings
+
+from weaviate.proto.v1.v7351.v1 import aggregate_pb2 as v1_dot_aggregate__pb2
+from weaviate.proto.v1.v7351.v1 import batch_delete_pb2 as v1_dot_batch__delete__pb2
+from weaviate.proto.v1.v7351.v1 import batch_pb2 as v1_dot_batch__pb2
+from weaviate.proto.v1.v7351.v1 import search_get_pb2 as v1_dot_search__get__pb2
+from weaviate.proto.v1.v7351.v1 import tenants_pb2 as v1_dot_tenants__pb2
+
+GRPC_GENERATED_VERSION = '1.83.0'
+GRPC_VERSION = grpc.__version__
+_version_not_supported = False
+
+try:
+ from grpc._utilities import first_version_is_lower
+ _version_not_supported = first_version_is_lower(GRPC_VERSION, GRPC_GENERATED_VERSION)
+except ImportError:
+ _version_not_supported = True
+
+if _version_not_supported:
+ raise RuntimeError(
+ f'The grpc package installed is at version {GRPC_VERSION},'
+ + ' but the generated code in v1/weaviate_pb2_grpc.py depends on'
+ + f' grpcio>={GRPC_GENERATED_VERSION}.'
+ + f' Please upgrade your grpc module to grpcio>={GRPC_GENERATED_VERSION}'
+ + f' or downgrade your generated code using grpcio-tools<={GRPC_VERSION}.'
+ )
+
+
+class WeaviateStub:
+ """Missing associated documentation comment in .proto file."""
+
+ def __init__(self, channel):
+ """Constructor.
+
+ Args:
+ channel: A grpc.Channel.
+ """
+ self.Search = channel.unary_unary(
+ '/weaviate.v1.Weaviate/Search',
+ request_serializer=v1_dot_search__get__pb2.SearchRequest.SerializeToString,
+ response_deserializer=v1_dot_search__get__pb2.SearchReply.FromString,
+ _registered_method=True)
+ self.BatchObjects = channel.unary_unary(
+ '/weaviate.v1.Weaviate/BatchObjects',
+ request_serializer=v1_dot_batch__pb2.BatchObjectsRequest.SerializeToString,
+ response_deserializer=v1_dot_batch__pb2.BatchObjectsReply.FromString,
+ _registered_method=True)
+ self.BatchReferences = channel.unary_unary(
+ '/weaviate.v1.Weaviate/BatchReferences',
+ request_serializer=v1_dot_batch__pb2.BatchReferencesRequest.SerializeToString,
+ response_deserializer=v1_dot_batch__pb2.BatchReferencesReply.FromString,
+ _registered_method=True)
+ self.BatchDelete = channel.unary_unary(
+ '/weaviate.v1.Weaviate/BatchDelete',
+ request_serializer=v1_dot_batch__delete__pb2.BatchDeleteRequest.SerializeToString,
+ response_deserializer=v1_dot_batch__delete__pb2.BatchDeleteReply.FromString,
+ _registered_method=True)
+ self.TenantsGet = channel.unary_unary(
+ '/weaviate.v1.Weaviate/TenantsGet',
+ request_serializer=v1_dot_tenants__pb2.TenantsGetRequest.SerializeToString,
+ response_deserializer=v1_dot_tenants__pb2.TenantsGetReply.FromString,
+ _registered_method=True)
+ self.Aggregate = channel.unary_unary(
+ '/weaviate.v1.Weaviate/Aggregate',
+ request_serializer=v1_dot_aggregate__pb2.AggregateRequest.SerializeToString,
+ response_deserializer=v1_dot_aggregate__pb2.AggregateReply.FromString,
+ _registered_method=True)
+ self.BatchStream = channel.stream_stream(
+ '/weaviate.v1.Weaviate/BatchStream',
+ request_serializer=v1_dot_batch__pb2.BatchStreamRequest.SerializeToString,
+ response_deserializer=v1_dot_batch__pb2.BatchStreamReply.FromString,
+ _registered_method=True)
+
+
+class WeaviateServicer:
+ """Missing associated documentation comment in .proto file."""
+
+ def Search(self, request, context):
+ """Missing associated documentation comment in .proto file."""
+ context.set_code(grpc.StatusCode.UNIMPLEMENTED)
+ context.set_details('Method not implemented!')
+ raise NotImplementedError('Method not implemented!')
+
+ def BatchObjects(self, request, context):
+ """Missing associated documentation comment in .proto file."""
+ context.set_code(grpc.StatusCode.UNIMPLEMENTED)
+ context.set_details('Method not implemented!')
+ raise NotImplementedError('Method not implemented!')
+
+ def BatchReferences(self, request, context):
+ """Missing associated documentation comment in .proto file."""
+ context.set_code(grpc.StatusCode.UNIMPLEMENTED)
+ context.set_details('Method not implemented!')
+ raise NotImplementedError('Method not implemented!')
+
+ def BatchDelete(self, request, context):
+ """Missing associated documentation comment in .proto file."""
+ context.set_code(grpc.StatusCode.UNIMPLEMENTED)
+ context.set_details('Method not implemented!')
+ raise NotImplementedError('Method not implemented!')
+
+ def TenantsGet(self, request, context):
+ """Missing associated documentation comment in .proto file."""
+ context.set_code(grpc.StatusCode.UNIMPLEMENTED)
+ context.set_details('Method not implemented!')
+ raise NotImplementedError('Method not implemented!')
+
+ def Aggregate(self, request, context):
+ """Missing associated documentation comment in .proto file."""
+ context.set_code(grpc.StatusCode.UNIMPLEMENTED)
+ context.set_details('Method not implemented!')
+ raise NotImplementedError('Method not implemented!')
+
+ def BatchStream(self, request_iterator, context):
+ """Missing associated documentation comment in .proto file."""
+ context.set_code(grpc.StatusCode.UNIMPLEMENTED)
+ context.set_details('Method not implemented!')
+ raise NotImplementedError('Method not implemented!')
+
+
+def add_WeaviateServicer_to_server(servicer, server):
+ rpc_method_handlers = {
+ 'Search': grpc.unary_unary_rpc_method_handler(
+ servicer.Search,
+ request_deserializer=v1_dot_search__get__pb2.SearchRequest.FromString,
+ response_serializer=v1_dot_search__get__pb2.SearchReply.SerializeToString,
+ ),
+ 'BatchObjects': grpc.unary_unary_rpc_method_handler(
+ servicer.BatchObjects,
+ request_deserializer=v1_dot_batch__pb2.BatchObjectsRequest.FromString,
+ response_serializer=v1_dot_batch__pb2.BatchObjectsReply.SerializeToString,
+ ),
+ 'BatchReferences': grpc.unary_unary_rpc_method_handler(
+ servicer.BatchReferences,
+ request_deserializer=v1_dot_batch__pb2.BatchReferencesRequest.FromString,
+ response_serializer=v1_dot_batch__pb2.BatchReferencesReply.SerializeToString,
+ ),
+ 'BatchDelete': grpc.unary_unary_rpc_method_handler(
+ servicer.BatchDelete,
+ request_deserializer=v1_dot_batch__delete__pb2.BatchDeleteRequest.FromString,
+ response_serializer=v1_dot_batch__delete__pb2.BatchDeleteReply.SerializeToString,
+ ),
+ 'TenantsGet': grpc.unary_unary_rpc_method_handler(
+ servicer.TenantsGet,
+ request_deserializer=v1_dot_tenants__pb2.TenantsGetRequest.FromString,
+ response_serializer=v1_dot_tenants__pb2.TenantsGetReply.SerializeToString,
+ ),
+ 'Aggregate': grpc.unary_unary_rpc_method_handler(
+ servicer.Aggregate,
+ request_deserializer=v1_dot_aggregate__pb2.AggregateRequest.FromString,
+ response_serializer=v1_dot_aggregate__pb2.AggregateReply.SerializeToString,
+ ),
+ 'BatchStream': grpc.stream_stream_rpc_method_handler(
+ servicer.BatchStream,
+ request_deserializer=v1_dot_batch__pb2.BatchStreamRequest.FromString,
+ response_serializer=v1_dot_batch__pb2.BatchStreamReply.SerializeToString,
+ ),
+ }
+ generic_handler = grpc.method_handlers_generic_handler(
+ 'weaviate.v1.Weaviate', rpc_method_handlers)
+ server.add_generic_rpc_handlers((generic_handler,))
+ server.add_registered_method_handlers('weaviate.v1.Weaviate', rpc_method_handlers)
+
+
+ # This class is part of an EXPERIMENTAL API.
+class Weaviate:
+ """Missing associated documentation comment in .proto file."""
+
+ @staticmethod
+ def Search(request,
+ target,
+ options=(),
+ channel_credentials=None,
+ call_credentials=None,
+ insecure=False,
+ compression=None,
+ wait_for_ready=None,
+ timeout=None,
+ metadata=None):
+ return grpc.experimental.unary_unary(
+ request,
+ target,
+ '/weaviate.v1.Weaviate/Search',
+ v1_dot_search__get__pb2.SearchRequest.SerializeToString,
+ v1_dot_search__get__pb2.SearchReply.FromString,
+ options,
+ channel_credentials,
+ insecure,
+ call_credentials,
+ compression,
+ wait_for_ready,
+ timeout,
+ metadata,
+ _registered_method=True)
+
+ @staticmethod
+ def BatchObjects(request,
+ target,
+ options=(),
+ channel_credentials=None,
+ call_credentials=None,
+ insecure=False,
+ compression=None,
+ wait_for_ready=None,
+ timeout=None,
+ metadata=None):
+ return grpc.experimental.unary_unary(
+ request,
+ target,
+ '/weaviate.v1.Weaviate/BatchObjects',
+ v1_dot_batch__pb2.BatchObjectsRequest.SerializeToString,
+ v1_dot_batch__pb2.BatchObjectsReply.FromString,
+ options,
+ channel_credentials,
+ insecure,
+ call_credentials,
+ compression,
+ wait_for_ready,
+ timeout,
+ metadata,
+ _registered_method=True)
+
+ @staticmethod
+ def BatchReferences(request,
+ target,
+ options=(),
+ channel_credentials=None,
+ call_credentials=None,
+ insecure=False,
+ compression=None,
+ wait_for_ready=None,
+ timeout=None,
+ metadata=None):
+ return grpc.experimental.unary_unary(
+ request,
+ target,
+ '/weaviate.v1.Weaviate/BatchReferences',
+ v1_dot_batch__pb2.BatchReferencesRequest.SerializeToString,
+ v1_dot_batch__pb2.BatchReferencesReply.FromString,
+ options,
+ channel_credentials,
+ insecure,
+ call_credentials,
+ compression,
+ wait_for_ready,
+ timeout,
+ metadata,
+ _registered_method=True)
+
+ @staticmethod
+ def BatchDelete(request,
+ target,
+ options=(),
+ channel_credentials=None,
+ call_credentials=None,
+ insecure=False,
+ compression=None,
+ wait_for_ready=None,
+ timeout=None,
+ metadata=None):
+ return grpc.experimental.unary_unary(
+ request,
+ target,
+ '/weaviate.v1.Weaviate/BatchDelete',
+ v1_dot_batch__delete__pb2.BatchDeleteRequest.SerializeToString,
+ v1_dot_batch__delete__pb2.BatchDeleteReply.FromString,
+ options,
+ channel_credentials,
+ insecure,
+ call_credentials,
+ compression,
+ wait_for_ready,
+ timeout,
+ metadata,
+ _registered_method=True)
+
+ @staticmethod
+ def TenantsGet(request,
+ target,
+ options=(),
+ channel_credentials=None,
+ call_credentials=None,
+ insecure=False,
+ compression=None,
+ wait_for_ready=None,
+ timeout=None,
+ metadata=None):
+ return grpc.experimental.unary_unary(
+ request,
+ target,
+ '/weaviate.v1.Weaviate/TenantsGet',
+ v1_dot_tenants__pb2.TenantsGetRequest.SerializeToString,
+ v1_dot_tenants__pb2.TenantsGetReply.FromString,
+ options,
+ channel_credentials,
+ insecure,
+ call_credentials,
+ compression,
+ wait_for_ready,
+ timeout,
+ metadata,
+ _registered_method=True)
+
+ @staticmethod
+ def Aggregate(request,
+ target,
+ options=(),
+ channel_credentials=None,
+ call_credentials=None,
+ insecure=False,
+ compression=None,
+ wait_for_ready=None,
+ timeout=None,
+ metadata=None):
+ return grpc.experimental.unary_unary(
+ request,
+ target,
+ '/weaviate.v1.Weaviate/Aggregate',
+ v1_dot_aggregate__pb2.AggregateRequest.SerializeToString,
+ v1_dot_aggregate__pb2.AggregateReply.FromString,
+ options,
+ channel_credentials,
+ insecure,
+ call_credentials,
+ compression,
+ wait_for_ready,
+ timeout,
+ metadata,
+ _registered_method=True)
+
+ @staticmethod
+ def BatchStream(request_iterator,
+ target,
+ options=(),
+ channel_credentials=None,
+ call_credentials=None,
+ insecure=False,
+ compression=None,
+ wait_for_ready=None,
+ timeout=None,
+ metadata=None):
+ return grpc.experimental.stream_stream(
+ request_iterator,
+ target,
+ '/weaviate.v1.Weaviate/BatchStream',
+ v1_dot_batch__pb2.BatchStreamRequest.SerializeToString,
+ v1_dot_batch__pb2.BatchStreamReply.FromString,
+ options,
+ channel_credentials,
+ insecure,
+ call_credentials,
+ compression,
+ wait_for_ready,
+ timeout,
+ metadata,
+ _registered_method=True)
diff --git a/weaviate/rbac/models.py b/weaviate/rbac/models.py
index f1cd89bbe..241bbd9ff 100644
--- a/weaviate/rbac/models.py
+++ b/weaviate/rbac/models.py
@@ -143,6 +143,7 @@ class WeaviateDBUserRoleNames(TypedDict):
createdAt: NotRequired[str]
lastUsedAt: NotRequired[str]
apiKeyFirstLetters: NotRequired[str]
+ expiresAt: NotRequired[Optional[str]]
class _Action:
diff --git a/weaviate/users/async_.pyi b/weaviate/users/async_.pyi
index 5770a5063..500fa7e2a 100644
--- a/weaviate/users/async_.pyi
+++ b/weaviate/users/async_.pyi
@@ -1,3 +1,4 @@
+from datetime import datetime
from typing import Dict, List, Literal, Optional, Union, overload
from typing_extensions import deprecated
@@ -52,7 +53,10 @@ class _UsersDBAsync(_UsersDBExecutor[ConnectionAsync]):
) -> Union[Dict[str, Role], Dict[str, RoleBase]]: ...
async def assign_roles(self, *, user_id: str, role_names: Union[str, List[str]]) -> None: ...
async def revoke_roles(self, *, user_id: str, role_names: Union[str, List[str]]) -> None: ...
- async def create(self, *, user_id: str) -> str: ...
+ async def create(self, *, user_id: str, user_expires_at: Optional[datetime] = None) -> str: ...
+ async def update_user_expiration(
+ self, *, user_id: str, user_expires_at: Optional[datetime]
+ ) -> None: ...
async def delete(self, *, user_id: str) -> bool: ...
async def rotate_key(self, *, user_id: str) -> str: ...
async def activate(self, *, user_id: str) -> bool: ...
diff --git a/weaviate/users/base.py b/weaviate/users/base.py
index 0dd90ef56..ec70932ed 100644
--- a/weaviate/users/base.py
+++ b/weaviate/users/base.py
@@ -6,6 +6,7 @@
from weaviate.connect import executor
from weaviate.connect.v4 import ConnectionType, _ExpectedStatusCodes
+from weaviate.exceptions import WeaviateUnsupportedFeatureError
from weaviate.rbac.models import (
Role,
RoleBase,
@@ -19,7 +20,12 @@
OwnUser,
UserDB,
)
-from weaviate.util import _decode_json_response_dict, _zero_time_to_none, escape_string
+from weaviate.util import (
+ _datetime_to_string,
+ _decode_json_response_dict,
+ _zero_time_to_none,
+ escape_string,
+)
def _parse_optional_timestamp(value: Optional[str]) -> Optional[datetime]:
@@ -28,6 +34,19 @@ def _parse_optional_timestamp(value: Optional[str]) -> Optional[datetime]:
return _zero_time_to_none(datetime.fromisoformat(value.replace("Z", "+00:00")))
+def _parse_db_user(user: WeaviateDBUserRoleNames) -> UserDB:
+ return UserDB(
+ user_id=user["userId"],
+ role_names=user["roles"],
+ active=user["active"],
+ user_type=UserTypes(user["dbUserType"]),
+ created_at=_parse_optional_timestamp(user.get("createdAt")),
+ last_used_time=_parse_optional_timestamp(user.get("lastUsedAt")),
+ api_key_first_letters=user.get("apiKeyFirstLetters"),
+ user_expires_at=_parse_optional_timestamp(user.get("expiresAt")),
+ )
+
+
class _BaseExecutor(Generic[ConnectionType]):
def __init__(self, connection: ConnectionType):
self._connection = connection
@@ -143,6 +162,7 @@ def resp(res: Response) -> OwnUser:
else {}
),
groups=parsed["groups"] if "groups" in parsed else [],
+ user_expires_at=_parse_optional_timestamp(parsed.get("expiresAt")),
)
return executor.execute(
@@ -291,6 +311,14 @@ def revoke_roles(
class _UsersDBExecutor(Generic[ConnectionType], _BaseExecutor[ConnectionType]):
+ def __check_user_expiration_version(self) -> None:
+ if self._connection._weaviate_version.is_lower_than(1, 41, 0):
+ raise WeaviateUnsupportedFeatureError(
+ "DB user expiration",
+ str(self._connection._weaviate_version),
+ "1.41.0",
+ )
+
@overload
def get_assigned_roles(
self, *, user_id: str, include_permissions: Literal[False] = False
@@ -356,15 +384,22 @@ def revoke_roles(
USER_TYPE_DB,
)
- def create(self, *, user_id: str) -> executor.Result[str]:
+ def create(
+ self, *, user_id: str, user_expires_at: Optional[datetime] = None
+ ) -> executor.Result[str]:
"""Create a new db user and return its API key.
Args:
user_id: The id of the new user.
+ user_expires_at: The future time at which the db user can no longer authenticate. Weaviate stores it in UTC to the millisecond. If None, the user never expires. Requires Weaviate 1.41+ and a Weaviate license key on the server.
Returns:
The API key of the newly created user. This key can not be retrieved later.
"""
+ payload: Dict[str, Any] = {}
+ if user_expires_at is not None:
+ self.__check_user_expiration_version()
+ payload["expiresAt"] = _datetime_to_string(user_expires_at)
def resp(res: Response) -> str:
resp = _decode_json_response_dict(res, "Create user")
@@ -374,12 +409,42 @@ def resp(res: Response) -> str:
return executor.execute(
response_callback=resp,
method=self._connection.post,
- path=f"/users/db/{user_id}",
- weaviate_object={},
+ path=f"/users/db/{escape_string(user_id)}",
+ weaviate_object=payload,
error_msg=f"Could not create user '{user_id}'",
status_codes=_ExpectedStatusCodes(ok_in=[201], error="Create user"),
)
+ def update_user_expiration(
+ self, *, user_id: str, user_expires_at: Optional[datetime]
+ ) -> executor.Result[None]:
+ """Set or remove the time at which a db user can no longer authenticate.
+
+ Requires Weaviate 1.41+ and a Weaviate license key on the server.
+
+ Args:
+ user_id: The id of the user.
+ user_expires_at: The future time at which the db user can no longer authenticate. Weaviate stores it in UTC to the millisecond. If None, the user never expires.
+ """
+ self.__check_user_expiration_version()
+ payload: Dict[str, Any] = (
+ {"neverExpires": True}
+ if user_expires_at is None
+ else {"expiresAt": _datetime_to_string(user_expires_at)}
+ )
+
+ def resp(res: Response) -> None:
+ pass
+
+ return executor.execute(
+ response_callback=resp,
+ method=self._connection.put,
+ path=f"/users/db/{escape_string(user_id)}/expiration",
+ weaviate_object=payload,
+ error_msg=f"Could not update the expiration of user '{user_id}'",
+ status_codes=_ExpectedStatusCodes(ok_in=[200], error="Update user expiration"),
+ )
+
def delete(self, *, user_id: str) -> executor.Result[bool]:
"""Delete a (dynamic) db user.
@@ -401,6 +466,8 @@ def resp(res: Response) -> bool:
def rotate_key(self, *, user_id: str) -> executor.Result[str]:
"""Rotate the key of a new db user.
+ The user's expiration carries over to the new key. `update_user_expiration` changes it.
+
Args:
user_id: The id of the user.
"""
@@ -463,6 +530,8 @@ def get(
) -> executor.Result[Optional[UserDB]]:
"""Get all information about an user.
+ `active` stays True after the user expires, so compare `user_expires_at` with the current time.
+
Args:
user_id: The id of the user.
include_last_used_time: If True, the last used time of the user will be included.
@@ -473,20 +542,12 @@ def resp(res: Response) -> Optional[UserDB]:
return None
parsed = _decode_json_response_dict(res, "Get user")
assert parsed is not None
- return UserDB(
- user_id=parsed["userId"],
- role_names=parsed["roles"],
- active=parsed["active"],
- user_type=UserTypes(parsed["dbUserType"]),
- created_at=_parse_optional_timestamp(parsed.get("createdAt")),
- last_used_time=_parse_optional_timestamp(parsed.get("lastUsedAt")),
- api_key_first_letters=parsed.get("apiKeyFirstLetters"),
- )
+ return _parse_db_user(cast(WeaviateDBUserRoleNames, parsed))
return executor.execute(
response_callback=resp,
method=self._connection.get,
- path=f"/users/db/{user_id}",
+ path=f"/users/db/{escape_string(user_id)}",
params={"includeLastUsedTime": include_last_used_time},
error_msg=f"Could not get user '{user_id}'",
status_codes=_ExpectedStatusCodes(ok_in=[200, 404], error="get user"),
@@ -495,6 +556,8 @@ def resp(res: Response) -> Optional[UserDB]:
def list_all(self, *, include_last_used_time: bool = False) -> executor.Result[List[UserDB]]:
"""List all DB users.
+ `active` stays True after a user expires, so compare `user_expires_at` with the current time.
+
Args:
include_last_used_time: If True, the last used time of each user will be included.
"""
@@ -502,18 +565,7 @@ def list_all(self, *, include_last_used_time: bool = False) -> executor.Result[L
def resp(res: Response) -> List[UserDB]:
parsed = _decode_json_response_dict(res, "Get user")
assert parsed is not None
- return [
- UserDB(
- user_id=user["userId"],
- role_names=user["roles"],
- active=user["active"],
- user_type=UserTypes(user["dbUserType"]),
- created_at=_parse_optional_timestamp(user.get("createdAt")),
- last_used_time=_parse_optional_timestamp(user.get("lastUsedAt")),
- api_key_first_letters=user.get("apiKeyFirstLetters"),
- )
- for user in cast(List[WeaviateDBUserRoleNames], parsed)
- ]
+ return [_parse_db_user(user) for user in cast(List[WeaviateDBUserRoleNames], parsed)]
return executor.execute(
response_callback=resp,
diff --git a/weaviate/users/sync.pyi b/weaviate/users/sync.pyi
index 7e82eee19..840125caf 100644
--- a/weaviate/users/sync.pyi
+++ b/weaviate/users/sync.pyi
@@ -1,3 +1,4 @@
+from datetime import datetime
from typing import Dict, List, Literal, Optional, Union, overload
from typing_extensions import deprecated
@@ -52,7 +53,10 @@ class _UsersDB(_UsersDBExecutor[ConnectionSync]):
) -> Union[Dict[str, Role], Dict[str, RoleBase]]: ...
def assign_roles(self, *, user_id: str, role_names: Union[str, List[str]]) -> None: ...
def revoke_roles(self, *, user_id: str, role_names: Union[str, List[str]]) -> None: ...
- def create(self, *, user_id: str) -> str: ...
+ def create(self, *, user_id: str, user_expires_at: Optional[datetime] = None) -> str: ...
+ def update_user_expiration(
+ self, *, user_id: str, user_expires_at: Optional[datetime]
+ ) -> None: ...
def delete(self, *, user_id: str) -> bool: ...
def rotate_key(self, *, user_id: str) -> str: ...
def activate(self, *, user_id: str) -> bool: ...
diff --git a/weaviate/users/users.py b/weaviate/users/users.py
index 7c213e141..08ed97b80 100644
--- a/weaviate/users/users.py
+++ b/weaviate/users/users.py
@@ -17,6 +17,7 @@ class OwnUser:
user_id: str
roles: Dict[str, Role]
groups: List[str]
+ user_expires_at: Optional[datetime] = field(default=None)
@dataclass
@@ -29,10 +30,11 @@ class UserBase:
@dataclass
class UserDB(UserBase):
user_type: UserTypes
- active: bool
+ active: bool # Administratively enabled; expiration does not change this value.
created_at: Optional[datetime] = field(default=None)
last_used_time: Optional[datetime] = field(default=None)
api_key_first_letters: Optional[str] = field(default=None)
+ user_expires_at: Optional[datetime] = field(default=None)
@dataclass
diff --git a/weaviate/util.py b/weaviate/util.py
index 4e7d61e50..e80d7bd2c 100644
--- a/weaviate/util.py
+++ b/weaviate/util.py
@@ -21,16 +21,12 @@
SchemaValidationError,
UnexpectedStatusCodeError,
WeaviateInvalidInputError,
- WeaviateUnsupportedFeatureError,
)
-from weaviate.types import BLOB_INPUT, NUMBER, TIME, UUIDS
+from weaviate.types import BLOB_INPUT, NUMBER, TIME, UUID, UUIDS
from weaviate.warnings import _Warnings
PYPI_PACKAGE_URL = "https://pypi.org/pypi/weaviate-client/json"
MAXIMUM_MINOR_VERSION_DELTA = 3 # The maximum delta between minor versions of Weaviate Client that will not trigger an upgrade warning.
-MINIMUM_NO_WARNING_VERSION = (
- "v1.16.0" # The minimum version of Weaviate that will not trigger an upgrade warning.
-)
BYTES_PER_CHUNK = 65535 # The number of bytes to read per chunk when encoding files ~ 64kb
@@ -502,22 +498,6 @@ def strip_newlines(s: str) -> str:
return s.replace("\n", " ")
-def _sanitize_str(value: str) -> str:
- """Ensures string is sanitized for GraphQL.
-
- Args:
- value: The value to be converted.
-
- Returns:
- The sanitized string.
- """
- value = strip_newlines(value)
- value = re.sub(
- r'(? tuple:
"""Parse a version string into a float.
@@ -620,32 +600,6 @@ def is_at_least_any(self, *minimums: Tuple[int, int, int]) -> bool:
return self >= _ServerVersion(major, minor, patch)
return False
- def check_is_at_least_1_25_0(self, feature: str) -> None:
- if not self >= _ServerVersion(1, 25, 0):
- raise WeaviateUnsupportedFeatureError(feature, str(self), "1.25.0")
-
- def check_is_at_least_1_32_0(self, feature: str) -> None:
- if not self >= _ServerVersion(1, 32, 0):
- raise WeaviateUnsupportedFeatureError(feature, str(self), "1.32.0")
-
- @property
- def supports_tenants_get_grpc(self) -> bool:
- return self >= _ServerVersion(1, 25, 0)
-
-
-def is_weaviate_too_old(current_version_str: str) -> bool:
- """Check if the user should be gently nudged to upgrade their Weaviate server version.
-
- Args:
- current_version_str: The version of the Weaviate server that the client is connected to. (e.g. "v1.18.2" or "1.18.0")
-
- Returns:
- True if the user should be nudged to upgrade.
- """
- current_version = parse_version_string(current_version_str)
- minimum_version = parse_version_string(MINIMUM_NO_WARNING_VERSION)
- return minimum_version > current_version
-
def is_weaviate_client_too_old(current_version_str: str, latest_version_str: str) -> bool:
"""Check if the user should be gently nudged to upgrade their Weaviate client version.
@@ -716,9 +670,7 @@ def _type_request_response(json_response: Any) -> Optional[Dict[str, Any]]:
def _to_beacons(uuids: UUIDS, to_class: str = "") -> List[Dict[str, str]]:
- if isinstance(uuids, uuid_lib.UUID) or isinstance(
- uuids, str
- ): # replace with isinstance(uuids, UUID) in 3.10
+ if isinstance(uuids, UUID):
uuids = [uuids]
if len(to_class) > 0:
diff --git a/weaviate/warnings.py b/weaviate/warnings.py
index 83cc6132e..92d2920a4 100644
--- a/weaviate/warnings.py
+++ b/weaviate/warnings.py
@@ -79,15 +79,6 @@ def token_refresh_failed(exc: Exception) -> None:
stacklevel=1,
)
- @staticmethod
- def weaviate_too_old_vs_latest(server_version: str) -> None:
- warnings.warn(
- message=f"""Dep004: You are connected to Weaviate {server_version}.
- Consider upgrading to the latest version. See https://www.weaviate.io/developers/weaviate for details.""",
- category=DeprecationWarning,
- stacklevel=1,
- )
-
@staticmethod
def weaviate_client_too_old_vs_latest(client_version: str, latest_version: str) -> None:
warnings.warn(