crewplus 0.2.99__tar.gz → 0.3.1__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {crewplus-0.2.99 → crewplus-0.3.1}/PKG-INFO +1 -1
- {crewplus-0.2.99 → crewplus-0.3.1}/crewplus/vectorstores/milvus/vdb_service.py +76 -1
- {crewplus-0.2.99 → crewplus-0.3.1}/pyproject.toml +1 -1
- {crewplus-0.2.99 → crewplus-0.3.1}/tests/test_bash_tools.py +532 -532
- {crewplus-0.2.99 → crewplus-0.3.1}/tests/test_claude_taskflow_schema.py +688 -688
- {crewplus-0.2.99 → crewplus-0.3.1}/tests/test_gemini3_pro_preview.py +563 -563
- crewplus-0.3.1/tests/test_ops_models_streaming.py +172 -0
- {crewplus-0.2.99 → crewplus-0.3.1}/LICENSE +0 -0
- {crewplus-0.2.99 → crewplus-0.3.1}/README.md +0 -0
- {crewplus-0.2.99 → crewplus-0.3.1}/crewplus/__init__.py +0 -0
- {crewplus-0.2.99 → crewplus-0.3.1}/crewplus/callbacks/__init__.py +0 -0
- {crewplus-0.2.99 → crewplus-0.3.1}/crewplus/callbacks/async_langfuse_handler.py +0 -0
- {crewplus-0.2.99 → crewplus-0.3.1}/crewplus/services/__init__.py +0 -0
- {crewplus-0.2.99 → crewplus-0.3.1}/crewplus/services/azure_chat_model.py +0 -0
- {crewplus-0.2.99 → crewplus-0.3.1}/crewplus/services/capabilities/__init__.py +0 -0
- {crewplus-0.2.99 → crewplus-0.3.1}/crewplus/services/capabilities/base.py +0 -0
- {crewplus-0.2.99 → crewplus-0.3.1}/crewplus/services/capabilities/bash.py +0 -0
- {crewplus-0.2.99 → crewplus-0.3.1}/crewplus/services/capabilities/registry.py +0 -0
- {crewplus-0.2.99 → crewplus-0.3.1}/crewplus/services/capabilities/web_search.py +0 -0
- {crewplus-0.2.99 → crewplus-0.3.1}/crewplus/services/claude_chat_model.py +0 -0
- {crewplus-0.2.99 → crewplus-0.3.1}/crewplus/services/feedback.md +0 -0
- {crewplus-0.2.99 → crewplus-0.3.1}/crewplus/services/feedback_manager.py +0 -0
- {crewplus-0.2.99 → crewplus-0.3.1}/crewplus/services/gemini_chat_model.py +0 -0
- {crewplus-0.2.99 → crewplus-0.3.1}/crewplus/services/init_services.py +0 -0
- {crewplus-0.2.99 → crewplus-0.3.1}/crewplus/services/model_load_balancer.py +0 -0
- {crewplus-0.2.99 → crewplus-0.3.1}/crewplus/services/oai_claude_chat_model.py +0 -0
- {crewplus-0.2.99 → crewplus-0.3.1}/crewplus/services/schemas/feedback.py +0 -0
- {crewplus-0.2.99 → crewplus-0.3.1}/crewplus/services/tracing_manager.py +0 -0
- {crewplus-0.2.99 → crewplus-0.3.1}/crewplus/utils/__init__.py +0 -0
- {crewplus-0.2.99 → crewplus-0.3.1}/crewplus/utils/schema_action.py +0 -0
- {crewplus-0.2.99 → crewplus-0.3.1}/crewplus/utils/schema_document_updater.py +0 -0
- {crewplus-0.2.99 → crewplus-0.3.1}/crewplus/utils/tracing_util.py +0 -0
- {crewplus-0.2.99 → crewplus-0.3.1}/crewplus/vectorstores/milvus/__init__.py +0 -0
- {crewplus-0.2.99 → crewplus-0.3.1}/crewplus/vectorstores/milvus/milvus_schema_manager.py +0 -0
- {crewplus-0.2.99 → crewplus-0.3.1}/crewplus/vectorstores/milvus/schema_milvus.py +0 -0
- {crewplus-0.2.99 → crewplus-0.3.1}/docs/GeminiChatModel.md +0 -0
- {crewplus-0.2.99 → crewplus-0.3.1}/docs/ModelLoadBalancer.md +0 -0
- {crewplus-0.2.99 → crewplus-0.3.1}/docs/VDBService.md +0 -0
- {crewplus-0.2.99 → crewplus-0.3.1}/docs/index.md +0 -0
- {crewplus-0.2.99 → crewplus-0.3.1}/tests/README.md +0 -0
- {crewplus-0.2.99 → crewplus-0.3.1}/tests/conftest.py +0 -0
- {crewplus-0.2.99 → crewplus-0.3.1}/tests/test_claude_api.py +0 -0
- {crewplus-0.2.99 → crewplus-0.3.1}/tests/test_claude_custom_endpoint_integration.py +0 -0
- {crewplus-0.2.99 → crewplus-0.3.1}/tests/test_claude_langchain_openai.py +0 -0
- {crewplus-0.2.99 → crewplus-0.3.1}/tests/test_custom_claude_endpoint.py +0 -0
- {crewplus-0.2.99 → crewplus-0.3.1}/tests/test_gemini_bind_tools.py +0 -0
- {crewplus-0.2.99 → crewplus-0.3.1}/tests/test_oai_claude_chat_model.py +0 -0
|
@@ -9,7 +9,7 @@ import logging
|
|
|
9
9
|
import time
|
|
10
10
|
import uuid
|
|
11
11
|
from collections import defaultdict
|
|
12
|
-
from typing import List, Dict, Optional
|
|
12
|
+
from typing import AsyncIterator, List, Dict, Optional, Any
|
|
13
13
|
|
|
14
14
|
from langchain_core.documents import Document
|
|
15
15
|
from langchain_core.embeddings import Embeddings
|
|
@@ -797,6 +797,81 @@ class VDBService(object):
|
|
|
797
797
|
except Exception as e:
|
|
798
798
|
raise RuntimeError(f"delete collection data failed: {str(e)}")
|
|
799
799
|
|
|
800
|
+
async def aquery_rows(
|
|
801
|
+
self,
|
|
802
|
+
*,
|
|
803
|
+
collection_name: str,
|
|
804
|
+
filter_expr: str,
|
|
805
|
+
output_fields: List[str],
|
|
806
|
+
limit: int,
|
|
807
|
+
offset: int = 0,
|
|
808
|
+
) -> List[dict[str, Any]]:
|
|
809
|
+
if not collection_name:
|
|
810
|
+
raise ValueError("collection_name must be provided.")
|
|
811
|
+
if limit <= 0:
|
|
812
|
+
return []
|
|
813
|
+
store = await self.aget_vector_store(collection_name)
|
|
814
|
+
collection = getattr(store, "col", None)
|
|
815
|
+
if collection is None:
|
|
816
|
+
raise RuntimeError(
|
|
817
|
+
"The vector store instance does not expose a pymilvus Collection via `.col`."
|
|
818
|
+
)
|
|
819
|
+
return await asyncio.to_thread(
|
|
820
|
+
collection.query,
|
|
821
|
+
expr=filter_expr,
|
|
822
|
+
output_fields=output_fields,
|
|
823
|
+
limit=limit,
|
|
824
|
+
offset=offset,
|
|
825
|
+
)
|
|
826
|
+
|
|
827
|
+
async def aiter_query_rows(
|
|
828
|
+
self,
|
|
829
|
+
*,
|
|
830
|
+
collection_name: str,
|
|
831
|
+
filter_expr: str,
|
|
832
|
+
output_fields: List[str],
|
|
833
|
+
batch_size: int,
|
|
834
|
+
) -> AsyncIterator[List[dict[str, Any]]]:
|
|
835
|
+
if not collection_name:
|
|
836
|
+
raise ValueError("collection_name must be provided.")
|
|
837
|
+
if batch_size <= 0:
|
|
838
|
+
return
|
|
839
|
+
store = await self.aget_vector_store(collection_name)
|
|
840
|
+
collection = getattr(store, "col", None)
|
|
841
|
+
if collection is None:
|
|
842
|
+
raise RuntimeError(
|
|
843
|
+
"The vector store instance does not expose a pymilvus Collection via `.col`."
|
|
844
|
+
)
|
|
845
|
+
iterator = await asyncio.to_thread(
|
|
846
|
+
collection.query_iterator,
|
|
847
|
+
expr=filter_expr,
|
|
848
|
+
output_fields=output_fields,
|
|
849
|
+
batch_size=batch_size,
|
|
850
|
+
)
|
|
851
|
+
try:
|
|
852
|
+
while True:
|
|
853
|
+
batch_rows = await asyncio.to_thread(iterator.next)
|
|
854
|
+
if not batch_rows:
|
|
855
|
+
break
|
|
856
|
+
yield batch_rows
|
|
857
|
+
finally:
|
|
858
|
+
await asyncio.to_thread(iterator.close)
|
|
859
|
+
|
|
860
|
+
async def asimilarity_search_with_score(
|
|
861
|
+
self,
|
|
862
|
+
*,
|
|
863
|
+
collection_name: str,
|
|
864
|
+
query: str,
|
|
865
|
+
k: int,
|
|
866
|
+
expr: str | None = None,
|
|
867
|
+
embeddings: Embeddings | None = None,
|
|
868
|
+
) -> list[tuple[Document, float]]:
|
|
869
|
+
store = await self.aget_vector_store(collection_name, embeddings)
|
|
870
|
+
kwargs: dict[str, Any] = {"k": k}
|
|
871
|
+
if expr:
|
|
872
|
+
kwargs["expr"] = expr
|
|
873
|
+
return await asyncio.to_thread(store.similarity_search_with_score, query, **kwargs)
|
|
874
|
+
|
|
800
875
|
async def aget_docs_by_ids(self, collection_names: List[str], ids: List[str], embeddings: Embeddings, output_fields: List[str] = None) -> List[Document]:
|
|
801
876
|
"""
|
|
802
877
|
Retrieves documents from multiple collections by their primary key IDs using a direct query.
|