MindsDB 25.6.3.1__py3-none-any.whl → 25.7.1.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/command_executor.py +8 -6
- mindsdb/api/executor/datahub/datanodes/information_schema_datanode.py +72 -44
- mindsdb/api/executor/datahub/datanodes/integration_datanode.py +14 -1
- mindsdb/api/executor/datahub/datanodes/project_datanode.py +1 -1
- mindsdb/api/executor/datahub/datanodes/system_tables.py +314 -1
- mindsdb/api/executor/planner/plan_join.py +1 -1
- mindsdb/api/executor/planner/query_planner.py +7 -1
- mindsdb/api/executor/planner/query_prepare.py +68 -87
- mindsdb/api/executor/sql_query/steps/fetch_dataframe.py +6 -1
- mindsdb/api/executor/sql_query/steps/union_step.py +11 -9
- mindsdb/api/http/namespaces/file.py +49 -24
- mindsdb/api/mcp/start.py +45 -31
- mindsdb/integrations/handlers/chromadb_handler/chromadb_handler.py +45 -52
- mindsdb/integrations/handlers/huggingface_handler/__init__.py +17 -12
- mindsdb/integrations/handlers/huggingface_handler/finetune.py +223 -223
- mindsdb/integrations/handlers/huggingface_handler/huggingface_handler.py +383 -383
- mindsdb/integrations/handlers/huggingface_handler/requirements.txt +7 -6
- mindsdb/integrations/handlers/huggingface_handler/requirements_cpu.txt +7 -6
- mindsdb/integrations/handlers/huggingface_handler/settings.py +25 -25
- mindsdb/integrations/handlers/litellm_handler/litellm_handler.py +22 -15
- mindsdb/integrations/handlers/ludwig_handler/requirements.txt +1 -1
- mindsdb/integrations/handlers/pgvector_handler/pgvector_handler.py +150 -140
- mindsdb/integrations/handlers/postgres_handler/postgres_handler.py +1 -1
- mindsdb/integrations/handlers/salesforce_handler/salesforce_tables.py +2 -0
- mindsdb/integrations/handlers/statsforecast_handler/requirements.txt +1 -0
- mindsdb/integrations/handlers/statsforecast_handler/requirements_extra.txt +1 -0
- mindsdb/integrations/libs/api_handler.py +6 -7
- mindsdb/integrations/libs/vectordatabase_handler.py +86 -77
- mindsdb/integrations/utilities/rag/rerankers/base_reranker.py +36 -42
- mindsdb/interfaces/agents/agents_controller.py +29 -9
- mindsdb/interfaces/agents/constants.py +44 -0
- mindsdb/interfaces/agents/langchain_agent.py +15 -6
- mindsdb/interfaces/agents/mcp_client_agent.py +4 -4
- mindsdb/interfaces/agents/mindsdb_database_agent.py +10 -43
- mindsdb/interfaces/data_catalog/data_catalog_reader.py +22 -3
- mindsdb/interfaces/knowledge_base/controller.py +121 -102
- mindsdb/interfaces/knowledge_base/evaluate.py +19 -7
- mindsdb/interfaces/knowledge_base/executor.py +346 -0
- mindsdb/interfaces/knowledge_base/llm_client.py +5 -6
- mindsdb/interfaces/knowledge_base/preprocessing/document_preprocessor.py +20 -45
- mindsdb/interfaces/knowledge_base/preprocessing/models.py +36 -69
- mindsdb/interfaces/skills/custom/text2sql/mindsdb_kb_tools.py +26 -22
- mindsdb/interfaces/skills/custom/text2sql/mindsdb_sql_toolkit.py +40 -28
- mindsdb/interfaces/skills/skill_tool.py +91 -88
- mindsdb/interfaces/skills/sql_agent.py +181 -130
- mindsdb/interfaces/storage/db.py +9 -7
- mindsdb/utilities/config.py +12 -1
- mindsdb/utilities/exception.py +47 -7
- mindsdb/utilities/security.py +54 -11
- {mindsdb-25.6.3.1.dist-info → mindsdb-25.7.1.0.dist-info}/METADATA +239 -251
- {mindsdb-25.6.3.1.dist-info → mindsdb-25.7.1.0.dist-info}/RECORD +55 -54
- {mindsdb-25.6.3.1.dist-info → mindsdb-25.7.1.0.dist-info}/WHEEL +0 -0
- {mindsdb-25.6.3.1.dist-info → mindsdb-25.7.1.0.dist-info}/licenses/LICENSE +0 -0
- {mindsdb-25.6.3.1.dist-info → mindsdb-25.7.1.0.dist-info}/top_level.txt +0 -0
|
@@ -1,6 +1,7 @@
|
|
|
1
|
-
# NOTE: Any changes made here need to be made to requirements_cpu.txt as well
|
|
2
|
-
datasets==2.16.1
|
|
3
|
-
evaluate==0.4.3
|
|
4
|
-
nltk==3.9.1
|
|
5
|
-
huggingface-hub==0.29.3
|
|
6
|
-
torch==2.
|
|
1
|
+
# # NOTE: Any changes made here need to be made to requirements_cpu.txt as well
|
|
2
|
+
# datasets==2.16.1
|
|
3
|
+
# evaluate==0.4.3
|
|
4
|
+
# nltk==3.9.1
|
|
5
|
+
# huggingface-hub==0.29.3
|
|
6
|
+
# torch==2.7.1
|
|
7
|
+
# transformers >= 4.42.4
|
|
@@ -1,6 +1,7 @@
|
|
|
1
|
-
# Needs to be installed with `pip install --extra-index-url https://download.pytorch.org/whl/ .[huggingface_cpu]`
|
|
2
|
-
datasets==2.16.1
|
|
3
|
-
evaluate==0.4.3
|
|
4
|
-
nltk==3.9.1
|
|
5
|
-
huggingface-hub==0.29.3
|
|
6
|
-
torch==2.
|
|
1
|
+
# # Needs to be installed with `pip install --extra-index-url https://download.pytorch.org/whl/ .[huggingface_cpu]`
|
|
2
|
+
# datasets==2.16.1
|
|
3
|
+
# evaluate==0.4.3
|
|
4
|
+
# nltk==3.9.1
|
|
5
|
+
# huggingface-hub==0.29.3
|
|
6
|
+
# torch==2.7.1+cpu
|
|
7
|
+
# transformers >= 4.42.4
|
|
@@ -1,27 +1,27 @@
|
|
|
1
|
-
from mindsdb.integrations.handlers.huggingface_handler.finetune import (
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
)
|
|
1
|
+
# from mindsdb.integrations.handlers.huggingface_handler.finetune import (
|
|
2
|
+
# _finetune_cls,
|
|
3
|
+
# _finetune_fill_mask,
|
|
4
|
+
# _finetune_question_answering,
|
|
5
|
+
# _finetune_summarization,
|
|
6
|
+
# _finetune_text_generation,
|
|
7
|
+
# _finetune_translate,
|
|
8
|
+
# )
|
|
9
9
|
|
|
10
|
-
# todo once we have moved predict tasks functions into a separate function
|
|
11
|
-
# PREDICT_MAP = {
|
|
12
|
-
# 'text-classification': self.predict_text_classification,
|
|
13
|
-
# 'zero-shot-classification': self.predict_zero_shot,
|
|
14
|
-
# 'translation': self.predict_translation,
|
|
15
|
-
# 'summarization': self.predict_summarization,
|
|
16
|
-
# 'fill-mask': self.predict_fill_mask
|
|
17
|
-
# }
|
|
10
|
+
# # todo once we have moved predict tasks functions into a separate function
|
|
11
|
+
# # PREDICT_MAP = {
|
|
12
|
+
# # 'text-classification': self.predict_text_classification,
|
|
13
|
+
# # 'zero-shot-classification': self.predict_zero_shot,
|
|
14
|
+
# # 'translation': self.predict_translation,
|
|
15
|
+
# # 'summarization': self.predict_summarization,
|
|
16
|
+
# # 'fill-mask': self.predict_fill_mask
|
|
17
|
+
# # }
|
|
18
18
|
|
|
19
|
-
FINETUNE_MAP = {
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
}
|
|
19
|
+
# FINETUNE_MAP = {
|
|
20
|
+
# "text-classification": _finetune_cls,
|
|
21
|
+
# "zero-shot-classification": _finetune_cls,
|
|
22
|
+
# "translation": _finetune_translate,
|
|
23
|
+
# "summarization": _finetune_summarization,
|
|
24
|
+
# "fill-mask": _finetune_fill_mask,
|
|
25
|
+
# "text-generation": _finetune_text_generation,
|
|
26
|
+
# "question-answering": _finetune_question_answering,
|
|
27
|
+
# }
|
|
@@ -30,27 +30,34 @@ class LiteLLMHandler(BaseMLEngine):
|
|
|
30
30
|
if "using" not in args:
|
|
31
31
|
raise Exception("Litellm engine requires a USING clause. See settings.py for more info on supported args.")
|
|
32
32
|
|
|
33
|
-
@
|
|
34
|
-
def
|
|
35
|
-
|
|
36
|
-
return [rec["embedding"] for rec in response.data]
|
|
37
|
-
|
|
38
|
-
@staticmethod
|
|
39
|
-
async def acompletion(model: str, messages: List[dict], args: dict):
|
|
40
|
-
if model.startswith("snowflake/") and "snowflake_account_id" in args:
|
|
33
|
+
@classmethod
|
|
34
|
+
def prepare_arguments(cls, provider, model_name, args):
|
|
35
|
+
if provider == "snowflake" and "snowflake_account_id" in args:
|
|
41
36
|
args["api_base"] = (
|
|
42
37
|
f"https://{args['snowflake_account_id']}.snowflakecomputing.com/api/v2/cortex/inference:complete"
|
|
43
38
|
)
|
|
39
|
+
if provider == "google":
|
|
40
|
+
provider = "gemini"
|
|
41
|
+
if "base_url" in args:
|
|
42
|
+
args["api_base"] = args.pop("base_url")
|
|
44
43
|
|
|
45
|
-
|
|
44
|
+
model_name = f"{provider}/{model_name}"
|
|
45
|
+
return model_name, args
|
|
46
46
|
|
|
47
|
-
@
|
|
48
|
-
def
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
47
|
+
@classmethod
|
|
48
|
+
def embeddings(cls, provider: str, model: str, messages: List[str], args: dict) -> List[list]:
|
|
49
|
+
model, args = cls.prepare_arguments(provider, model, args)
|
|
50
|
+
response = embedding(model=model, input=messages, **args)
|
|
51
|
+
return [rec["embedding"] for rec in response.data]
|
|
52
|
+
|
|
53
|
+
@classmethod
|
|
54
|
+
async def acompletion(cls, provider: str, model: str, messages: List[dict], args: dict):
|
|
55
|
+
model, args = cls.prepare_arguments(provider, model, args)
|
|
56
|
+
return await acompletion(model=model, messages=messages, stream=False, **args)
|
|
53
57
|
|
|
58
|
+
@classmethod
|
|
59
|
+
def completion(cls, provider: str, model: str, messages: List[dict], args: dict):
|
|
60
|
+
model, args = cls.prepare_arguments(provider, model, args)
|
|
54
61
|
return completion(model=model, messages=messages, stream=False, **args)
|
|
55
62
|
|
|
56
63
|
def create(
|