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.
Files changed (47) hide show
  1. {crewplus-0.2.99 → crewplus-0.3.1}/PKG-INFO +1 -1
  2. {crewplus-0.2.99 → crewplus-0.3.1}/crewplus/vectorstores/milvus/vdb_service.py +76 -1
  3. {crewplus-0.2.99 → crewplus-0.3.1}/pyproject.toml +1 -1
  4. {crewplus-0.2.99 → crewplus-0.3.1}/tests/test_bash_tools.py +532 -532
  5. {crewplus-0.2.99 → crewplus-0.3.1}/tests/test_claude_taskflow_schema.py +688 -688
  6. {crewplus-0.2.99 → crewplus-0.3.1}/tests/test_gemini3_pro_preview.py +563 -563
  7. crewplus-0.3.1/tests/test_ops_models_streaming.py +172 -0
  8. {crewplus-0.2.99 → crewplus-0.3.1}/LICENSE +0 -0
  9. {crewplus-0.2.99 → crewplus-0.3.1}/README.md +0 -0
  10. {crewplus-0.2.99 → crewplus-0.3.1}/crewplus/__init__.py +0 -0
  11. {crewplus-0.2.99 → crewplus-0.3.1}/crewplus/callbacks/__init__.py +0 -0
  12. {crewplus-0.2.99 → crewplus-0.3.1}/crewplus/callbacks/async_langfuse_handler.py +0 -0
  13. {crewplus-0.2.99 → crewplus-0.3.1}/crewplus/services/__init__.py +0 -0
  14. {crewplus-0.2.99 → crewplus-0.3.1}/crewplus/services/azure_chat_model.py +0 -0
  15. {crewplus-0.2.99 → crewplus-0.3.1}/crewplus/services/capabilities/__init__.py +0 -0
  16. {crewplus-0.2.99 → crewplus-0.3.1}/crewplus/services/capabilities/base.py +0 -0
  17. {crewplus-0.2.99 → crewplus-0.3.1}/crewplus/services/capabilities/bash.py +0 -0
  18. {crewplus-0.2.99 → crewplus-0.3.1}/crewplus/services/capabilities/registry.py +0 -0
  19. {crewplus-0.2.99 → crewplus-0.3.1}/crewplus/services/capabilities/web_search.py +0 -0
  20. {crewplus-0.2.99 → crewplus-0.3.1}/crewplus/services/claude_chat_model.py +0 -0
  21. {crewplus-0.2.99 → crewplus-0.3.1}/crewplus/services/feedback.md +0 -0
  22. {crewplus-0.2.99 → crewplus-0.3.1}/crewplus/services/feedback_manager.py +0 -0
  23. {crewplus-0.2.99 → crewplus-0.3.1}/crewplus/services/gemini_chat_model.py +0 -0
  24. {crewplus-0.2.99 → crewplus-0.3.1}/crewplus/services/init_services.py +0 -0
  25. {crewplus-0.2.99 → crewplus-0.3.1}/crewplus/services/model_load_balancer.py +0 -0
  26. {crewplus-0.2.99 → crewplus-0.3.1}/crewplus/services/oai_claude_chat_model.py +0 -0
  27. {crewplus-0.2.99 → crewplus-0.3.1}/crewplus/services/schemas/feedback.py +0 -0
  28. {crewplus-0.2.99 → crewplus-0.3.1}/crewplus/services/tracing_manager.py +0 -0
  29. {crewplus-0.2.99 → crewplus-0.3.1}/crewplus/utils/__init__.py +0 -0
  30. {crewplus-0.2.99 → crewplus-0.3.1}/crewplus/utils/schema_action.py +0 -0
  31. {crewplus-0.2.99 → crewplus-0.3.1}/crewplus/utils/schema_document_updater.py +0 -0
  32. {crewplus-0.2.99 → crewplus-0.3.1}/crewplus/utils/tracing_util.py +0 -0
  33. {crewplus-0.2.99 → crewplus-0.3.1}/crewplus/vectorstores/milvus/__init__.py +0 -0
  34. {crewplus-0.2.99 → crewplus-0.3.1}/crewplus/vectorstores/milvus/milvus_schema_manager.py +0 -0
  35. {crewplus-0.2.99 → crewplus-0.3.1}/crewplus/vectorstores/milvus/schema_milvus.py +0 -0
  36. {crewplus-0.2.99 → crewplus-0.3.1}/docs/GeminiChatModel.md +0 -0
  37. {crewplus-0.2.99 → crewplus-0.3.1}/docs/ModelLoadBalancer.md +0 -0
  38. {crewplus-0.2.99 → crewplus-0.3.1}/docs/VDBService.md +0 -0
  39. {crewplus-0.2.99 → crewplus-0.3.1}/docs/index.md +0 -0
  40. {crewplus-0.2.99 → crewplus-0.3.1}/tests/README.md +0 -0
  41. {crewplus-0.2.99 → crewplus-0.3.1}/tests/conftest.py +0 -0
  42. {crewplus-0.2.99 → crewplus-0.3.1}/tests/test_claude_api.py +0 -0
  43. {crewplus-0.2.99 → crewplus-0.3.1}/tests/test_claude_custom_endpoint_integration.py +0 -0
  44. {crewplus-0.2.99 → crewplus-0.3.1}/tests/test_claude_langchain_openai.py +0 -0
  45. {crewplus-0.2.99 → crewplus-0.3.1}/tests/test_custom_claude_endpoint.py +0 -0
  46. {crewplus-0.2.99 → crewplus-0.3.1}/tests/test_gemini_bind_tools.py +0 -0
  47. {crewplus-0.2.99 → crewplus-0.3.1}/tests/test_oai_claude_chat_model.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: crewplus
3
- Version: 0.2.99
3
+ Version: 0.3.1
4
4
  Summary: Base services for CrewPlus AI applications
5
5
  Author-Email: Tim Liu <tim@opsmateai.com>
6
6
  License: MIT
@@ -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.
@@ -6,7 +6,7 @@ build-backend = "pdm.backend"
6
6
 
7
7
  [project]
8
8
  name = "crewplus"
9
- version = "0.2.99"
9
+ version = "0.3.01"
10
10
  description = "Base services for CrewPlus AI applications"
11
11
  authors = [
12
12
  { name = "Tim Liu", email = "tim@opsmateai.com" },