MindsDB 25.3.3.0__py3-none-any.whl → 25.3.4.0__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 MindsDB might be problematic. Click here for more details.
- mindsdb/__about__.py +1 -1
- mindsdb/api/executor/datahub/datanodes/information_schema_datanode.py +2 -6
- mindsdb/api/executor/datahub/datanodes/mindsdb_tables.py +1 -1
- mindsdb/api/http/namespaces/agents.py +9 -5
- mindsdb/api/http/namespaces/chatbots.py +6 -5
- mindsdb/api/http/namespaces/databases.py +5 -6
- mindsdb/api/http/namespaces/skills.py +5 -4
- mindsdb/api/http/namespaces/views.py +6 -7
- mindsdb/integrations/handlers/chromadb_handler/chromadb_handler.py +23 -2
- mindsdb/integrations/handlers/dummy_data_handler/dummy_data_handler.py +16 -6
- mindsdb/integrations/handlers/file_handler/tests/test_file_handler.py +64 -83
- mindsdb/integrations/handlers/huggingface_handler/requirements.txt +5 -4
- mindsdb/integrations/handlers/huggingface_handler/requirements_cpu.txt +5 -5
- mindsdb/integrations/handlers/ms_one_drive_handler/ms_graph_api_one_drive_client.py +1 -1
- mindsdb/integrations/handlers/ms_teams_handler/ms_graph_api_teams_client.py +278 -0
- mindsdb/integrations/handlers/ms_teams_handler/ms_teams_handler.py +114 -70
- mindsdb/integrations/handlers/ms_teams_handler/ms_teams_tables.py +431 -0
- mindsdb/integrations/handlers/pgvector_handler/pgvector_handler.py +18 -4
- mindsdb/integrations/libs/vectordatabase_handler.py +2 -2
- mindsdb/integrations/utilities/files/file_reader.py +3 -3
- mindsdb/integrations/utilities/handlers/api_utilities/microsoft/ms_graph_api_utilities.py +36 -2
- mindsdb/integrations/utilities/rag/settings.py +1 -0
- mindsdb/interfaces/chatbot/chatbot_controller.py +6 -4
- mindsdb/interfaces/jobs/jobs_controller.py +1 -4
- mindsdb/interfaces/knowledge_base/controller.py +9 -28
- mindsdb/interfaces/knowledge_base/preprocessing/document_preprocessor.py +1 -1
- mindsdb/interfaces/skills/skills_controller.py +8 -7
- {mindsdb-25.3.3.0.dist-info → mindsdb-25.3.4.0.dist-info}/METADATA +221 -218
- {mindsdb-25.3.3.0.dist-info → mindsdb-25.3.4.0.dist-info}/RECORD +32 -30
- {mindsdb-25.3.3.0.dist-info → mindsdb-25.3.4.0.dist-info}/WHEEL +1 -1
- {mindsdb-25.3.3.0.dist-info → mindsdb-25.3.4.0.dist-info/licenses}/LICENSE +0 -0
- {mindsdb-25.3.3.0.dist-info → mindsdb-25.3.4.0.dist-info}/top_level.txt +0 -0
|
@@ -26,9 +26,7 @@ from mindsdb.integrations.libs.vectordatabase_handler import (
|
|
|
26
26
|
)
|
|
27
27
|
from mindsdb.integrations.utilities.rag.rag_pipeline_builder import RAG
|
|
28
28
|
from mindsdb.integrations.utilities.rag.config_loader import load_rag_config
|
|
29
|
-
|
|
30
|
-
extract_comparison_conditions, filter_dataframe, FilterCondition, FilterOperator
|
|
31
|
-
)
|
|
29
|
+
|
|
32
30
|
from mindsdb.interfaces.agents.constants import DEFAULT_EMBEDDINGS_MODEL_CLASS
|
|
33
31
|
from mindsdb.interfaces.agents.langchain_agent import create_chat_model, get_llm_provider
|
|
34
32
|
from mindsdb.interfaces.database.projects import ProjectController
|
|
@@ -105,19 +103,9 @@ class KnowledgeBaseTable:
|
|
|
105
103
|
db_handler = self.get_vector_db()
|
|
106
104
|
logger.debug(f"Using vector db handler: {type(db_handler)}")
|
|
107
105
|
|
|
108
|
-
|
|
109
|
-
# update vector handlers, mark conditions as applied inside
|
|
110
|
-
for op, arg1, arg2 in extract_comparison_conditions(query.where):
|
|
111
|
-
condition = FilterCondition(arg1, FilterOperator(op.upper()), arg2)
|
|
112
|
-
if arg1 in (TableField.ID.value, TableField.CONTENT.value, TableField.EMBEDDINGS.value):
|
|
113
|
-
vector_filters.append(condition)
|
|
114
|
-
else:
|
|
115
|
-
outer_filters.append([op, arg1, arg2])
|
|
116
|
-
|
|
117
|
-
df = db_handler.dispatch_select(query, conditions=vector_filters)
|
|
106
|
+
df = db_handler.dispatch_select(query)
|
|
118
107
|
|
|
119
108
|
if df is not None:
|
|
120
|
-
df = filter_dataframe(df, outer_filters)
|
|
121
109
|
|
|
122
110
|
logger.debug(f"Query returned {len(df)} rows")
|
|
123
111
|
logger.debug(f"Columns in response: {df.columns.tolist()}")
|
|
@@ -229,7 +217,7 @@ class KnowledgeBaseTable:
|
|
|
229
217
|
|
|
230
218
|
# send to vectordb
|
|
231
219
|
db_handler = self.get_vector_db()
|
|
232
|
-
db_handler.
|
|
220
|
+
db_handler.dispatch_delete(query)
|
|
233
221
|
|
|
234
222
|
def hybrid_search(
|
|
235
223
|
self,
|
|
@@ -293,7 +281,6 @@ class KnowledgeBaseTable:
|
|
|
293
281
|
**base_metadata,
|
|
294
282
|
'original_row_id': str(row_id),
|
|
295
283
|
'content_column': col,
|
|
296
|
-
'content_type': col.split('_')[-1] if '_' in col else 'text'
|
|
297
284
|
}
|
|
298
285
|
|
|
299
286
|
raw_documents.append(Document(
|
|
@@ -364,7 +351,7 @@ class KnowledgeBaseTable:
|
|
|
364
351
|
logger.debug(f"Added IDs: {df_out[TableField.ID.value].tolist()}")
|
|
365
352
|
|
|
366
353
|
# -- prepare content and metadata --
|
|
367
|
-
content_columns = params.get('content_columns')
|
|
354
|
+
content_columns = params.get('content_columns', [TableField.CONTENT.value])
|
|
368
355
|
metadata_columns = params.get('metadata_columns')
|
|
369
356
|
|
|
370
357
|
logger.debug(f"Processing with: content_columns={content_columns}, metadata_columns={metadata_columns}")
|
|
@@ -399,17 +386,6 @@ class KnowledgeBaseTable:
|
|
|
399
386
|
# all the rest columns
|
|
400
387
|
metadata_columns = list(set(columns).difference(content_columns))
|
|
401
388
|
|
|
402
|
-
elif metadata_columns is not None:
|
|
403
|
-
metadata_columns = list(set(metadata_columns).intersection(columns))
|
|
404
|
-
# use all unused columns is content
|
|
405
|
-
content_columns = list(set(columns).difference(metadata_columns))
|
|
406
|
-
elif TableField.METADATA.value in columns:
|
|
407
|
-
metadata_columns = [TableField.METADATA.value]
|
|
408
|
-
content_columns = list(set(columns).difference(metadata_columns))
|
|
409
|
-
else:
|
|
410
|
-
# all columns go to content
|
|
411
|
-
content_columns = columns
|
|
412
|
-
|
|
413
389
|
# Add content columns directly (don't combine them)
|
|
414
390
|
for col in content_columns:
|
|
415
391
|
df_out[col] = df[col]
|
|
@@ -429,6 +405,9 @@ class KnowledgeBaseTable:
|
|
|
429
405
|
value = float(value)
|
|
430
406
|
elif pd.api.types.is_bool_dtype(value):
|
|
431
407
|
value = bool(value)
|
|
408
|
+
elif isinstance(value, dict):
|
|
409
|
+
metadata.update(value)
|
|
410
|
+
continue
|
|
432
411
|
else:
|
|
433
412
|
value = str(value)
|
|
434
413
|
metadata[col] = value
|
|
@@ -852,6 +831,8 @@ class KnowledgeBaseController:
|
|
|
852
831
|
# drop objects if they were created automatically
|
|
853
832
|
if 'default_vector_storage' in kb.params:
|
|
854
833
|
try:
|
|
834
|
+
handler = self.session.datahub.get(kb.params['default_vector_storage']).integration_handler
|
|
835
|
+
handler.drop_table(kb.vector_database_table)
|
|
855
836
|
self.session.integration_controller.delete(kb.params['default_vector_storage'])
|
|
856
837
|
except EntityNotExistsError:
|
|
857
838
|
pass
|
|
@@ -98,7 +98,7 @@ class DocumentPreprocessor:
|
|
|
98
98
|
provided_id: str = None,
|
|
99
99
|
) -> str:
|
|
100
100
|
"""Generate deterministic ID for a chunk"""
|
|
101
|
-
base_id =
|
|
101
|
+
base_id = provided_id
|
|
102
102
|
chunk_id = (
|
|
103
103
|
f"{base_id}_chunk_{chunk_index}" if chunk_index is not None else base_id
|
|
104
104
|
)
|
|
@@ -42,12 +42,12 @@ class SkillsController:
|
|
|
42
42
|
db.Skills.deleted_at == null()
|
|
43
43
|
).first()
|
|
44
44
|
|
|
45
|
-
def get_skills(self, project_name: str) -> List[dict]:
|
|
45
|
+
def get_skills(self, project_name: Optional[str]) -> List[dict]:
|
|
46
46
|
'''
|
|
47
47
|
Gets all skills in a project.
|
|
48
48
|
|
|
49
49
|
Parameters:
|
|
50
|
-
project_name (str): The name of the containing project
|
|
50
|
+
project_name (Optional[str]): The name of the containing project
|
|
51
51
|
|
|
52
52
|
Returns:
|
|
53
53
|
all_skills (List[db.Skills]): List of database skill object
|
|
@@ -56,11 +56,12 @@ class SkillsController:
|
|
|
56
56
|
ValueError: If `project_name` does not exist
|
|
57
57
|
'''
|
|
58
58
|
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
59
|
+
if project_name is None:
|
|
60
|
+
projects = self.project_controller.get_list()
|
|
61
|
+
project_ids = list([p.id for p in projects])
|
|
62
|
+
else:
|
|
63
|
+
project = self.project_controller.get(name=project_name)
|
|
64
|
+
project_ids = [project.id]
|
|
64
65
|
|
|
65
66
|
query = (
|
|
66
67
|
db.session.query(db.Skills)
|