Skip to content

Commit 400b0aa

Browse files
Pin weaviate-client version
1 parent f20c275 commit 400b0aa

File tree

5 files changed

+15
-22
lines changed

5 files changed

+15
-22
lines changed

llama_stack/providers/registry/vector_io.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -503,7 +503,7 @@ def available_providers() -> list[ProviderSpec]:
503503
Api.vector_io,
504504
AdapterSpec(
505505
adapter_type="weaviate",
506-
pip_packages=["weaviate-client"],
506+
pip_packages=["weaviate-client>=4.16.5"],
507507
module="llama_stack.providers.remote.vector_io.weaviate",
508508
config_class="llama_stack.providers.remote.vector_io.weaviate.WeaviateVectorIOConfig",
509509
provider_data_validator="llama_stack.providers.remote.vector_io.weaviate.WeaviateRequestProviderData",

llama_stack/providers/remote/vector_io/weaviate/weaviate.py

Lines changed: 7 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -98,7 +98,7 @@ async def query_vector(self, embedding: NDArray, k: int, score_threshold: float)
9898
Returns:
9999
QueryChunksResponse with chunks and scores
100100
"""
101-
log.info(
101+
log.debug(
102102
f"WEAVIATE VECTOR SEARCH CALLED: embedding_shape={embedding.shape}, k={k}, threshold={score_threshold}"
103103
)
104104
sanitized_collection_name = sanitize_collection_name(self.collection_name, weaviate_format=True)
@@ -135,7 +135,7 @@ async def query_vector(self, embedding: NDArray, k: int, score_threshold: float)
135135
chunks.append(chunk)
136136
scores.append(score)
137137

138-
log.info(f"WEAVIATE VECTOR SEARCH RESULTS: Found {len(chunks)} chunks with scores {scores}")
138+
log.debug(f"WEAVIATE VECTOR SEARCH RESULTS: Found {len(chunks)} chunks with scores {scores}")
139139
return QueryChunksResponse(chunks=chunks, scores=scores)
140140

141141
async def delete(self, chunk_ids: list[str] | None = None) -> None:
@@ -166,7 +166,7 @@ async def query_keyword(
166166
Returns:
167167
QueryChunksResponse with chunks and scores
168168
"""
169-
log.info(f"WEAVIATE KEYWORD SEARCH CALLED: query='{query_string}', k={k}, threshold={score_threshold}")
169+
log.debug(f"WEAVIATE KEYWORD SEARCH CALLED: query='{query_string}', k={k}, threshold={score_threshold}")
170170
sanitized_collection_name = sanitize_collection_name(self.collection_name, weaviate_format=True)
171171
collection = self.client.collections.get(sanitized_collection_name)
172172

@@ -199,7 +199,7 @@ async def query_keyword(
199199
chunks.append(chunk)
200200
scores.append(score)
201201

202-
log.info(f"WEAVIATE KEYWORD SEARCH RESULTS: Found {len(chunks)} chunks with scores {scores}.")
202+
log.debug(f"WEAVIATE KEYWORD SEARCH RESULTS: Found {len(chunks)} chunks with scores {scores}.")
203203
return QueryChunksResponse(chunks=chunks, scores=scores)
204204

205205
async def query_hybrid(
@@ -223,7 +223,7 @@ async def query_hybrid(
223223
Returns:
224224
QueryChunksResponse with combined results
225225
"""
226-
log.info(
226+
log.debug(
227227
f"WEAVIATE HYBRID SEARCH CALLED: query='{query_string}', embedding_shape={embedding.shape}, k={k}, threshold={score_threshold}, reranker={reranker_type}"
228228
)
229229
sanitized_collection_name = sanitize_collection_name(self.collection_name, weaviate_format=True)
@@ -265,11 +265,10 @@ async def query_hybrid(
265265
if score < score_threshold:
266266
continue
267267

268-
log.info(f"Document {chunk.metadata.get('document_id')} has score {score}")
269268
chunks.append(chunk)
270269
scores.append(score)
271270

272-
log.info(f"WEAVIATE HYBRID SEARCH RESULTS: Found {len(chunks)} chunks with scores {scores}")
271+
log.debug(f"WEAVIATE HYBRID SEARCH RESULTS: Found {len(chunks)} chunks with scores {scores}")
273272
return QueryChunksResponse(chunks=chunks, scores=scores)
274273

275274

@@ -297,7 +296,7 @@ def __init__(
297296

298297
def _get_client(self) -> weaviate.WeaviateClient:
299298
if "localhost" in self.config.weaviate_cluster_url:
300-
log.info("using Weaviate locally in container")
299+
log.info("Using Weaviate locally in container")
301300
host, port = self.config.weaviate_cluster_url.split(":")
302301
key = "local_test"
303302
client = weaviate.connect_to_local(

pyproject.toml

Lines changed: 7 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -25,8 +25,8 @@ classifiers = [
2525
]
2626
dependencies = [
2727
"aiohttp",
28-
"fastapi>=0.115.0,<1.0", # server
29-
"fire", # for MCP in LLS client
28+
"fastapi>=0.115.0,<1.0", # server
29+
"fire", # for MCP in LLS client
3030
"httpx",
3131
"huggingface-hub>=0.34.0,<1.0",
3232
"jinja2>=3.1.6",
@@ -43,13 +43,12 @@ dependencies = [
4343
"tiktoken",
4444
"pillow",
4545
"h11>=0.16.0",
46-
"python-multipart>=0.0.20", # For fastapi Form
47-
"uvicorn>=0.34.0", # server
48-
"opentelemetry-sdk>=1.30.0", # server
46+
"python-multipart>=0.0.20", # For fastapi Form
47+
"uvicorn>=0.34.0", # server
48+
"opentelemetry-sdk>=1.30.0", # server
4949
"opentelemetry-exporter-otlp-proto-http>=1.30.0", # server
50-
"aiosqlite>=0.21.0", # server - for metadata store
51-
"asyncpg", # for metadata store
52-
"weaviate-client>=4.16.5",
50+
"aiosqlite>=0.21.0", # server - for metadata store
51+
"asyncpg", # for metadata store
5352
]
5453

5554
[project.optional-dependencies]

tests/unit/providers/vector_io/remote/test_milvus.py

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -324,6 +324,3 @@ async def test_query_hybrid_search_default_rrf(
324324
call_args = mock_milvus_client.hybrid_search.call_args
325325
ranker = call_args[1]["ranker"]
326326
assert ranker is not None
327-
328-
329-
# TODO: Write tests for the MilvusVectorIOAdapter class.

uv.lock

Lines changed: 0 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)