crewplus 0.2.9__py3-none-any.whl → 0.2.10__py3-none-any.whl
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.
Potentially problematic release.
This version of crewplus might be problematic. Click here for more details.
- crewplus/__init__.py +10 -0
- crewplus/services/__init__.py +5 -0
- crewplus/services/init_services.py +3 -7
- crewplus/services/model_load_balancer.py +0 -1
- crewplus/utils/__init__.py +4 -0
- crewplus/vectorstores/milvus/__init__.py +5 -0
- crewplus/vectorstores/milvus/schema_milvus.py +1 -26
- crewplus/vectorstores/milvus/vdb_service.py +341 -426
- {crewplus-0.2.9.dist-info → crewplus-0.2.10.dist-info}/METADATA +2 -2
- crewplus-0.2.10.dist-info/RECORD +17 -0
- crewplus-0.2.9.dist-info/RECORD +0 -20
- docs/GeminiChatModel.md +0 -226
- docs/ModelLoadBalancer.md +0 -134
- docs/VDBService.md +0 -238
- docs/index.md +0 -23
- {crewplus-0.2.9.dist-info → crewplus-0.2.10.dist-info}/WHEEL +0 -0
- {crewplus-0.2.9.dist-info → crewplus-0.2.10.dist-info}/entry_points.txt +0 -0
- {crewplus-0.2.9.dist-info → crewplus-0.2.10.dist-info}/licenses/LICENSE +0 -0
crewplus/__init__.py
CHANGED
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
from .services.gemini_chat_model import GeminiChatModel
|
|
2
|
+
from .services.model_load_balancer import ModelLoadBalancer
|
|
3
|
+
from .vectorstores.milvus import SchemaMilvus, VDBService
|
|
4
|
+
|
|
5
|
+
__all__ = [
|
|
6
|
+
"GeminiChatModel",
|
|
7
|
+
"ModelLoadBalancer",
|
|
8
|
+
"SchemaMilvus",
|
|
9
|
+
"VDBService"
|
|
10
|
+
]
|
crewplus/services/__init__.py
CHANGED
|
@@ -3,15 +3,11 @@ from crewplus.services.model_load_balancer import ModelLoadBalancer
|
|
|
3
3
|
|
|
4
4
|
model_balancer = None
|
|
5
5
|
|
|
6
|
-
def init_load_balancer(
|
|
6
|
+
def init_load_balancer():
|
|
7
7
|
global model_balancer
|
|
8
8
|
if model_balancer is None:
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
"MODEL_CONFIG_PATH",
|
|
12
|
-
"config/models_config.json" # Fixed default path
|
|
13
|
-
)
|
|
14
|
-
model_balancer = ModelLoadBalancer(final_config_path)
|
|
9
|
+
config_path = os.getenv("MODEL_CONFIG_PATH", "config/models_config.json")
|
|
10
|
+
model_balancer = ModelLoadBalancer(config_path)
|
|
15
11
|
model_balancer.load_config() # Load initial configuration synchronously
|
|
16
12
|
|
|
17
13
|
def get_model_balancer() -> ModelLoadBalancer:
|
|
@@ -141,7 +141,6 @@ class ModelLoadBalancer:
|
|
|
141
141
|
return ChatOpenAI(**kwargs)
|
|
142
142
|
elif provider == 'azure-openai-embeddings':
|
|
143
143
|
return AzureOpenAIEmbeddings(
|
|
144
|
-
model=model_config['model_name'],
|
|
145
144
|
azure_deployment=model_config['deployment_name'],
|
|
146
145
|
openai_api_version=model_config['api_version'],
|
|
147
146
|
api_key=model_config['api_key'],
|
|
@@ -5,34 +5,9 @@ import json
|
|
|
5
5
|
from pymilvus import DataType
|
|
6
6
|
from langchain_milvus import Milvus
|
|
7
7
|
from langchain_core.documents import Document
|
|
8
|
-
from
|
|
9
|
-
from crewplus.utils.schema_action import Action
|
|
8
|
+
from ...utils import SchemaDocumentUpdater, Action
|
|
10
9
|
from .milvus_schema_manager import MilvusSchemaManager
|
|
11
10
|
|
|
12
|
-
DEFAULT_SCHEMA = """
|
|
13
|
-
{
|
|
14
|
-
"node_types": {
|
|
15
|
-
"Document": {
|
|
16
|
-
"properties": {
|
|
17
|
-
"pk": {
|
|
18
|
-
"type": "INT64",
|
|
19
|
-
"is_primary": true,
|
|
20
|
-
"auto_id": true
|
|
21
|
-
},
|
|
22
|
-
"vector": {
|
|
23
|
-
"type": "FLOAT_VECTOR",
|
|
24
|
-
"dim": 1536
|
|
25
|
-
},
|
|
26
|
-
"text": {
|
|
27
|
-
"type": "VARCHAR",
|
|
28
|
-
"max_length": 65535,
|
|
29
|
-
"description": "The core text of the memory. This could be a user query, a documented fact, a procedural step, or a log of an event."
|
|
30
|
-
}
|
|
31
|
-
}
|
|
32
|
-
}
|
|
33
|
-
}
|
|
34
|
-
}
|
|
35
|
-
"""
|
|
36
11
|
|
|
37
12
|
class SchemaMilvus(Milvus):
|
|
38
13
|
"""
|