You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
错误信息为:
Traceback (most recent call last):
File "/usr/local/lib/python3.10/site-packages/uvicorn/protocols/http/h11_impl.py", line 412, in run_asgi
result = await app( # type: ignore[func-returns-value]
File "/usr/local/lib/python3.10/site-packages/uvicorn/middleware/proxy_headers.py", line 84, in call
return await self.app(scope, receive, send)
File "/usr/local/lib/python3.10/site-packages/fastapi/applications.py", line 1054, in call
await super().call(scope, receive, send)
File "/usr/local/lib/python3.10/site-packages/starlette/applications.py", line 123, in call
await self.middleware_stack(scope, receive, send)
File "/usr/local/lib/python3.10/site-packages/starlette/middleware/errors.py", line 186, in call
raise exc
File "/usr/local/lib/python3.10/site-packages/starlette/middleware/errors.py", line 164, in call
await self.app(scope, receive, _send)
File "/usr/local/lib/python3.10/site-packages/starlette/middleware/cors.py", line 83, in call
await self.app(scope, receive, send)
File "/usr/local/lib/python3.10/site-packages/starlette/middleware/exceptions.py", line 62, in call
await wrap_app_handling_exceptions(self.app, conn)(scope, receive, send)
File "/usr/local/lib/python3.10/site-packages/starlette/_exception_handler.py", line 64, in wrapped_app
raise exc
File "/usr/local/lib/python3.10/site-packages/starlette/_exception_handler.py", line 53, in wrapped_app
await app(scope, receive, sender)
File "/usr/local/lib/python3.10/site-packages/starlette/routing.py", line 758, in call
await self.middleware_stack(scope, receive, send)
File "/usr/local/lib/python3.10/site-packages/starlette/routing.py", line 778, in app
await route.handle(scope, receive, send)
File "/usr/local/lib/python3.10/site-packages/starlette/routing.py", line 299, in handle
await self.app(scope, receive, send)
File "/usr/local/lib/python3.10/site-packages/starlette/routing.py", line 79, in app
await wrap_app_handling_exceptions(app, request)(scope, receive, send)
File "/usr/local/lib/python3.10/site-packages/starlette/_exception_handler.py", line 64, in wrapped_app
raise exc
File "/usr/local/lib/python3.10/site-packages/starlette/_exception_handler.py", line 53, in wrapped_app
await app(scope, receive, sender)
File "/usr/local/lib/python3.10/site-packages/starlette/routing.py", line 74, in app
response = await func(request)
File "/usr/local/lib/python3.10/site-packages/fastapi/routing.py", line 278, in app
raw_response = await run_endpoint_function(
File "/usr/local/lib/python3.10/site-packages/fastapi/routing.py", line 191, in run_endpoint_function
return await dependant.call(**values)
File "/srdkb-backend/knowledge_base/kb_api.py", line 100, in search_docs
retrieved_docs = await kb_service.async_do_search(query, user_id=user_id, req_id=req_id,
File "/srdkb-backend/knowledge_base/milvus_kb_service.py", line 194, in async_do_search
slice_combined_docs.extend(self.query_subkb(embedding_data, 1, top_k, score_threshold, included_files,
File "/srdkb-backend/knowledge_base/milvus_kb_service.py", line 301, in query_subkb
docs_and_distances = search_fun(
File "/srdkb-backend/knowledge_base/milvus.py", line 465, in async_hybrid_search_with_score
result = future.result()
File "/usr/local/lib/python3.10/site-packages/pymilvus/orm/future.py", line 32, in result
return self.on_response(self._f.result())
File "/usr/local/lib/python3.10/site-packages/pymilvus/client/asynch.py", line 117, in result
self._results = self.on_response(self._response)
File "/usr/local/lib/python3.10/site-packages/pymilvus/client/asynch.py", line 166, in on_response
check_status(response.status)
File "/usr/local/lib/python3.10/site-packages/pymilvus/client/utils.py", line 60, in check_status
raise MilvusException(status.code, status.reason, status.error_code)
pymilvus.exceptions.MilvusException: <MilvusException: (code=65535, message=string field contains invalid UTF-8)>
Expected Behavior
如何能够正确查询出数据?
Steps/Code To Reproduce behavior
No response
Environment details
- Hardware/Softward conditions (OS, CPU, GPU, Memory):
- Method of installation (Docker):
- Milvus version (v2.4.1):
Anything else?
No response
The text was updated successfully, but these errors were encountered:
Is there an existing issue for this?
Describe the bug
milvus版本:2.4.1
代码内容:
def async_hybrid_search_with_score(self,
embedding: List[float],
embedding_bm25: List[float],
k: int = 4,
weight_reranker: WeightedRanker = RRFRanker(k=60),
dense_search_params: Optional[dict] = None,
bm25_search_params: Optional[dict] = None,
expr: Optional[str] = None,
timeout: Optional[int] = None,
score_threshold: Optional[float] = None,
**kwargs: Any,
) -> List[Tuple[Document, float]]:
ansyc_param = {"_async": True}
merged_params = ansyc_param.copy() # 创建 async_param 的副本
merged_params.update(kwargs)
if bm25_search_params is None:
bm25_search_params = {
"metric_type": "IP",
"params": {"nprobe": 10}
}
request_bm25 = AnnSearchRequest(
data=embedding_bm25,
anns_field=self._vector_field_bm25,
param=bm25_search_params,
limit=k,
expr=expr,
)
logger.info(f"BM25 search request created: {request_bm25}")
错误信息为:
Traceback (most recent call last):
File "/usr/local/lib/python3.10/site-packages/uvicorn/protocols/http/h11_impl.py", line 412, in run_asgi
result = await app( # type: ignore[func-returns-value]
File "/usr/local/lib/python3.10/site-packages/uvicorn/middleware/proxy_headers.py", line 84, in call
return await self.app(scope, receive, send)
File "/usr/local/lib/python3.10/site-packages/fastapi/applications.py", line 1054, in call
await super().call(scope, receive, send)
File "/usr/local/lib/python3.10/site-packages/starlette/applications.py", line 123, in call
await self.middleware_stack(scope, receive, send)
File "/usr/local/lib/python3.10/site-packages/starlette/middleware/errors.py", line 186, in call
raise exc
File "/usr/local/lib/python3.10/site-packages/starlette/middleware/errors.py", line 164, in call
await self.app(scope, receive, _send)
File "/usr/local/lib/python3.10/site-packages/starlette/middleware/cors.py", line 83, in call
await self.app(scope, receive, send)
File "/usr/local/lib/python3.10/site-packages/starlette/middleware/exceptions.py", line 62, in call
await wrap_app_handling_exceptions(self.app, conn)(scope, receive, send)
File "/usr/local/lib/python3.10/site-packages/starlette/_exception_handler.py", line 64, in wrapped_app
raise exc
File "/usr/local/lib/python3.10/site-packages/starlette/_exception_handler.py", line 53, in wrapped_app
await app(scope, receive, sender)
File "/usr/local/lib/python3.10/site-packages/starlette/routing.py", line 758, in call
await self.middleware_stack(scope, receive, send)
File "/usr/local/lib/python3.10/site-packages/starlette/routing.py", line 778, in app
await route.handle(scope, receive, send)
File "/usr/local/lib/python3.10/site-packages/starlette/routing.py", line 299, in handle
await self.app(scope, receive, send)
File "/usr/local/lib/python3.10/site-packages/starlette/routing.py", line 79, in app
await wrap_app_handling_exceptions(app, request)(scope, receive, send)
File "/usr/local/lib/python3.10/site-packages/starlette/_exception_handler.py", line 64, in wrapped_app
raise exc
File "/usr/local/lib/python3.10/site-packages/starlette/_exception_handler.py", line 53, in wrapped_app
await app(scope, receive, sender)
File "/usr/local/lib/python3.10/site-packages/starlette/routing.py", line 74, in app
response = await func(request)
File "/usr/local/lib/python3.10/site-packages/fastapi/routing.py", line 278, in app
raw_response = await run_endpoint_function(
File "/usr/local/lib/python3.10/site-packages/fastapi/routing.py", line 191, in run_endpoint_function
return await dependant.call(**values)
File "/srdkb-backend/knowledge_base/kb_api.py", line 100, in search_docs
retrieved_docs = await kb_service.async_do_search(query, user_id=user_id, req_id=req_id,
File "/srdkb-backend/knowledge_base/milvus_kb_service.py", line 194, in async_do_search
slice_combined_docs.extend(self.query_subkb(embedding_data, 1, top_k, score_threshold, included_files,
File "/srdkb-backend/knowledge_base/milvus_kb_service.py", line 301, in query_subkb
docs_and_distances = search_fun(
File "/srdkb-backend/knowledge_base/milvus.py", line 465, in async_hybrid_search_with_score
result = future.result()
File "/usr/local/lib/python3.10/site-packages/pymilvus/orm/future.py", line 32, in result
return self.on_response(self._f.result())
File "/usr/local/lib/python3.10/site-packages/pymilvus/client/asynch.py", line 117, in result
self._results = self.on_response(self._response)
File "/usr/local/lib/python3.10/site-packages/pymilvus/client/asynch.py", line 166, in on_response
check_status(response.status)
File "/usr/local/lib/python3.10/site-packages/pymilvus/client/utils.py", line 60, in check_status
raise MilvusException(status.code, status.reason, status.error_code)
pymilvus.exceptions.MilvusException: <MilvusException: (code=65535, message=string field contains invalid UTF-8)>
Expected Behavior
如何能够正确查询出数据?
Steps/Code To Reproduce behavior
No response
Environment details
Anything else?
No response
The text was updated successfully, but these errors were encountered: