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.

Files changed (55) hide show
  1. mindsdb/__about__.py +1 -1
  2. mindsdb/api/executor/command_executor.py +8 -6
  3. mindsdb/api/executor/datahub/datanodes/information_schema_datanode.py +72 -44
  4. mindsdb/api/executor/datahub/datanodes/integration_datanode.py +14 -1
  5. mindsdb/api/executor/datahub/datanodes/project_datanode.py +1 -1
  6. mindsdb/api/executor/datahub/datanodes/system_tables.py +314 -1
  7. mindsdb/api/executor/planner/plan_join.py +1 -1
  8. mindsdb/api/executor/planner/query_planner.py +7 -1
  9. mindsdb/api/executor/planner/query_prepare.py +68 -87
  10. mindsdb/api/executor/sql_query/steps/fetch_dataframe.py +6 -1
  11. mindsdb/api/executor/sql_query/steps/union_step.py +11 -9
  12. mindsdb/api/http/namespaces/file.py +49 -24
  13. mindsdb/api/mcp/start.py +45 -31
  14. mindsdb/integrations/handlers/chromadb_handler/chromadb_handler.py +45 -52
  15. mindsdb/integrations/handlers/huggingface_handler/__init__.py +17 -12
  16. mindsdb/integrations/handlers/huggingface_handler/finetune.py +223 -223
  17. mindsdb/integrations/handlers/huggingface_handler/huggingface_handler.py +383 -383
  18. mindsdb/integrations/handlers/huggingface_handler/requirements.txt +7 -6
  19. mindsdb/integrations/handlers/huggingface_handler/requirements_cpu.txt +7 -6
  20. mindsdb/integrations/handlers/huggingface_handler/settings.py +25 -25
  21. mindsdb/integrations/handlers/litellm_handler/litellm_handler.py +22 -15
  22. mindsdb/integrations/handlers/ludwig_handler/requirements.txt +1 -1
  23. mindsdb/integrations/handlers/pgvector_handler/pgvector_handler.py +150 -140
  24. mindsdb/integrations/handlers/postgres_handler/postgres_handler.py +1 -1
  25. mindsdb/integrations/handlers/salesforce_handler/salesforce_tables.py +2 -0
  26. mindsdb/integrations/handlers/statsforecast_handler/requirements.txt +1 -0
  27. mindsdb/integrations/handlers/statsforecast_handler/requirements_extra.txt +1 -0
  28. mindsdb/integrations/libs/api_handler.py +6 -7
  29. mindsdb/integrations/libs/vectordatabase_handler.py +86 -77
  30. mindsdb/integrations/utilities/rag/rerankers/base_reranker.py +36 -42
  31. mindsdb/interfaces/agents/agents_controller.py +29 -9
  32. mindsdb/interfaces/agents/constants.py +44 -0
  33. mindsdb/interfaces/agents/langchain_agent.py +15 -6
  34. mindsdb/interfaces/agents/mcp_client_agent.py +4 -4
  35. mindsdb/interfaces/agents/mindsdb_database_agent.py +10 -43
  36. mindsdb/interfaces/data_catalog/data_catalog_reader.py +22 -3
  37. mindsdb/interfaces/knowledge_base/controller.py +121 -102
  38. mindsdb/interfaces/knowledge_base/evaluate.py +19 -7
  39. mindsdb/interfaces/knowledge_base/executor.py +346 -0
  40. mindsdb/interfaces/knowledge_base/llm_client.py +5 -6
  41. mindsdb/interfaces/knowledge_base/preprocessing/document_preprocessor.py +20 -45
  42. mindsdb/interfaces/knowledge_base/preprocessing/models.py +36 -69
  43. mindsdb/interfaces/skills/custom/text2sql/mindsdb_kb_tools.py +26 -22
  44. mindsdb/interfaces/skills/custom/text2sql/mindsdb_sql_toolkit.py +40 -28
  45. mindsdb/interfaces/skills/skill_tool.py +91 -88
  46. mindsdb/interfaces/skills/sql_agent.py +181 -130
  47. mindsdb/interfaces/storage/db.py +9 -7
  48. mindsdb/utilities/config.py +12 -1
  49. mindsdb/utilities/exception.py +47 -7
  50. mindsdb/utilities/security.py +54 -11
  51. {mindsdb-25.6.3.1.dist-info → mindsdb-25.7.1.0.dist-info}/METADATA +239 -251
  52. {mindsdb-25.6.3.1.dist-info → mindsdb-25.7.1.0.dist-info}/RECORD +55 -54
  53. {mindsdb-25.6.3.1.dist-info → mindsdb-25.7.1.0.dist-info}/WHEEL +0 -0
  54. {mindsdb-25.6.3.1.dist-info → mindsdb-25.7.1.0.dist-info}/licenses/LICENSE +0 -0
  55. {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.6.0
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.6.0+cpu
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
- _finetune_cls,
3
- _finetune_fill_mask,
4
- _finetune_question_answering,
5
- _finetune_summarization,
6
- _finetune_text_generation,
7
- _finetune_translate,
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
- "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
- }
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
- @staticmethod
34
- def embeddings(model: str, messages: List[str], args: dict) -> List[list]:
35
- response = embedding(model=model, input=messages, **args)
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
- return await acompletion(model=model, messages=messages, stream=False, **args)
44
+ model_name = f"{provider}/{model_name}"
45
+ return model_name, args
46
46
 
47
- @staticmethod
48
- def completion(model: str, messages: List[dict], args: dict):
49
- if model.startswith("snowflake/") and "snowflake_account_id" in args:
50
- args["api_base"] = (
51
- f"https://{args['snowflake_account_id']}.snowflakecomputing.com/api/v2/cortex/inference:complete"
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(
@@ -1,3 +1,3 @@
1
1
  ludwig[distributed]>=0.5.2
2
- ray==2.8.1
2
+ ray==2.43.0
3
3
  dask