MindsDB 25.7.3.0__py3-none-any.whl → 25.8.2.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 (102) hide show
  1. mindsdb/__about__.py +1 -1
  2. mindsdb/__main__.py +11 -1
  3. mindsdb/api/a2a/common/server/server.py +16 -6
  4. mindsdb/api/executor/command_executor.py +215 -150
  5. mindsdb/api/executor/datahub/datanodes/project_datanode.py +14 -3
  6. mindsdb/api/executor/planner/plan_join.py +3 -0
  7. mindsdb/api/executor/planner/plan_join_ts.py +117 -100
  8. mindsdb/api/executor/planner/query_planner.py +1 -0
  9. mindsdb/api/executor/sql_query/steps/apply_predictor_step.py +54 -85
  10. mindsdb/api/executor/sql_query/steps/fetch_dataframe.py +21 -24
  11. mindsdb/api/executor/sql_query/steps/fetch_dataframe_partition.py +9 -3
  12. mindsdb/api/executor/sql_query/steps/subselect_step.py +11 -8
  13. mindsdb/api/executor/utilities/mysql_to_duckdb_functions.py +264 -0
  14. mindsdb/api/executor/utilities/sql.py +30 -0
  15. mindsdb/api/http/initialize.py +18 -44
  16. mindsdb/api/http/namespaces/agents.py +23 -20
  17. mindsdb/api/http/namespaces/chatbots.py +83 -120
  18. mindsdb/api/http/namespaces/file.py +1 -1
  19. mindsdb/api/http/namespaces/jobs.py +38 -60
  20. mindsdb/api/http/namespaces/tree.py +69 -61
  21. mindsdb/api/http/namespaces/views.py +56 -72
  22. mindsdb/api/mcp/start.py +2 -0
  23. mindsdb/api/mysql/mysql_proxy/utilities/dump.py +3 -2
  24. mindsdb/integrations/handlers/autogluon_handler/requirements.txt +1 -1
  25. mindsdb/integrations/handlers/autosklearn_handler/requirements.txt +1 -1
  26. mindsdb/integrations/handlers/bigquery_handler/bigquery_handler.py +25 -5
  27. mindsdb/integrations/handlers/chromadb_handler/chromadb_handler.py +3 -3
  28. mindsdb/integrations/handlers/db2_handler/db2_handler.py +19 -23
  29. mindsdb/integrations/handlers/flaml_handler/requirements.txt +1 -1
  30. mindsdb/integrations/handlers/gong_handler/__about__.py +2 -0
  31. mindsdb/integrations/handlers/gong_handler/__init__.py +30 -0
  32. mindsdb/integrations/handlers/gong_handler/connection_args.py +37 -0
  33. mindsdb/integrations/handlers/gong_handler/gong_handler.py +164 -0
  34. mindsdb/integrations/handlers/gong_handler/gong_tables.py +508 -0
  35. mindsdb/integrations/handlers/gong_handler/icon.svg +25 -0
  36. mindsdb/integrations/handlers/gong_handler/test_gong_handler.py +125 -0
  37. mindsdb/integrations/handlers/google_calendar_handler/google_calendar_tables.py +82 -73
  38. mindsdb/integrations/handlers/hubspot_handler/requirements.txt +1 -1
  39. mindsdb/integrations/handlers/huggingface_handler/__init__.py +8 -12
  40. mindsdb/integrations/handlers/huggingface_handler/finetune.py +203 -223
  41. mindsdb/integrations/handlers/huggingface_handler/huggingface_handler.py +360 -383
  42. mindsdb/integrations/handlers/huggingface_handler/requirements.txt +7 -7
  43. mindsdb/integrations/handlers/huggingface_handler/requirements_cpu.txt +7 -7
  44. mindsdb/integrations/handlers/huggingface_handler/settings.py +25 -25
  45. mindsdb/integrations/handlers/langchain_handler/langchain_handler.py +83 -77
  46. mindsdb/integrations/handlers/lightwood_handler/requirements.txt +4 -4
  47. mindsdb/integrations/handlers/litellm_handler/litellm_handler.py +5 -2
  48. mindsdb/integrations/handlers/litellm_handler/settings.py +2 -1
  49. mindsdb/integrations/handlers/openai_handler/constants.py +11 -30
  50. mindsdb/integrations/handlers/openai_handler/helpers.py +27 -34
  51. mindsdb/integrations/handlers/openai_handler/openai_handler.py +14 -12
  52. mindsdb/integrations/handlers/pgvector_handler/pgvector_handler.py +106 -90
  53. mindsdb/integrations/handlers/postgres_handler/postgres_handler.py +41 -39
  54. mindsdb/integrations/handlers/salesforce_handler/constants.py +215 -0
  55. mindsdb/integrations/handlers/salesforce_handler/salesforce_handler.py +141 -80
  56. mindsdb/integrations/handlers/salesforce_handler/salesforce_tables.py +0 -1
  57. mindsdb/integrations/handlers/tpot_handler/requirements.txt +1 -1
  58. mindsdb/integrations/handlers/web_handler/urlcrawl_helpers.py +32 -17
  59. mindsdb/integrations/handlers/web_handler/web_handler.py +19 -22
  60. mindsdb/integrations/libs/llm/config.py +0 -14
  61. mindsdb/integrations/libs/llm/utils.py +0 -15
  62. mindsdb/integrations/libs/vectordatabase_handler.py +10 -1
  63. mindsdb/integrations/utilities/files/file_reader.py +5 -19
  64. mindsdb/integrations/utilities/handler_utils.py +32 -12
  65. mindsdb/integrations/utilities/rag/rerankers/base_reranker.py +1 -1
  66. mindsdb/interfaces/agents/agents_controller.py +246 -149
  67. mindsdb/interfaces/agents/constants.py +0 -1
  68. mindsdb/interfaces/agents/langchain_agent.py +11 -6
  69. mindsdb/interfaces/data_catalog/data_catalog_loader.py +4 -4
  70. mindsdb/interfaces/database/database.py +38 -13
  71. mindsdb/interfaces/database/integrations.py +20 -5
  72. mindsdb/interfaces/database/projects.py +174 -23
  73. mindsdb/interfaces/database/views.py +86 -60
  74. mindsdb/interfaces/jobs/jobs_controller.py +103 -110
  75. mindsdb/interfaces/knowledge_base/controller.py +33 -6
  76. mindsdb/interfaces/knowledge_base/evaluate.py +2 -1
  77. mindsdb/interfaces/knowledge_base/executor.py +24 -0
  78. mindsdb/interfaces/knowledge_base/preprocessing/document_preprocessor.py +6 -10
  79. mindsdb/interfaces/knowledge_base/preprocessing/text_splitter.py +73 -0
  80. mindsdb/interfaces/query_context/context_controller.py +111 -145
  81. mindsdb/interfaces/skills/skills_controller.py +18 -6
  82. mindsdb/interfaces/storage/db.py +40 -6
  83. mindsdb/interfaces/variables/variables_controller.py +8 -15
  84. mindsdb/utilities/config.py +5 -3
  85. mindsdb/utilities/fs.py +54 -17
  86. mindsdb/utilities/functions.py +72 -60
  87. mindsdb/utilities/log.py +38 -6
  88. mindsdb/utilities/ps.py +7 -7
  89. {mindsdb-25.7.3.0.dist-info → mindsdb-25.8.2.0.dist-info}/METADATA +282 -268
  90. {mindsdb-25.7.3.0.dist-info → mindsdb-25.8.2.0.dist-info}/RECORD +94 -92
  91. mindsdb/integrations/handlers/anyscale_endpoints_handler/__about__.py +0 -9
  92. mindsdb/integrations/handlers/anyscale_endpoints_handler/__init__.py +0 -20
  93. mindsdb/integrations/handlers/anyscale_endpoints_handler/anyscale_endpoints_handler.py +0 -290
  94. mindsdb/integrations/handlers/anyscale_endpoints_handler/creation_args.py +0 -14
  95. mindsdb/integrations/handlers/anyscale_endpoints_handler/icon.svg +0 -4
  96. mindsdb/integrations/handlers/anyscale_endpoints_handler/requirements.txt +0 -2
  97. mindsdb/integrations/handlers/anyscale_endpoints_handler/settings.py +0 -51
  98. mindsdb/integrations/handlers/anyscale_endpoints_handler/tests/test_anyscale_endpoints_handler.py +0 -212
  99. /mindsdb/integrations/handlers/{anyscale_endpoints_handler/tests/__init__.py → gong_handler/requirements.txt} +0 -0
  100. {mindsdb-25.7.3.0.dist-info → mindsdb-25.8.2.0.dist-info}/WHEEL +0 -0
  101. {mindsdb-25.7.3.0.dist-info → mindsdb-25.8.2.0.dist-info}/licenses/LICENSE +0 -0
  102. {mindsdb-25.7.3.0.dist-info → mindsdb-25.8.2.0.dist-info}/top_level.txt +0 -0
@@ -9,7 +9,6 @@ from mindsdb.integrations.utilities.sql_utils import extract_comparison_conditio
9
9
 
10
10
 
11
11
  class GoogleCalendarEventsTable(APITable):
12
-
13
12
  def select(self, query: ast.Select) -> DataFrame:
14
13
  """
15
14
  Gets all events from the calendar.
@@ -26,33 +25,33 @@ class GoogleCalendarEventsTable(APITable):
26
25
  # Get the start and end times from the conditions.
27
26
  params = {}
28
27
  for op, arg1, arg2 in conditions:
29
- if arg1 == 'timeMax' or arg1 == 'timeMin':
28
+ if arg1 == "timeMax" or arg1 == "timeMin":
30
29
  date = parse_utc_date(arg2)
31
- if op == '=':
30
+ if op == "=":
32
31
  params[arg1] = date
33
32
  else:
34
33
  raise NotImplementedError
35
- elif arg1 == 'timeZone':
34
+ elif arg1 == "timeZone":
36
35
  params[arg1] = arg2
37
- elif arg1 == 'maxAttendees':
36
+ elif arg1 == "maxAttendees":
38
37
  params[arg1] = arg2
39
- elif arg1 == 'q':
38
+ elif arg1 == "q":
40
39
  params[arg1] = arg2
41
40
 
42
41
  # Get the order by from the query.
43
42
  if query.order_by is not None:
44
- if query.order_by[0].value == 'start_time':
45
- params['orderBy'] = 'startTime'
46
- elif query.order_by[0].value == 'updated':
47
- params['orderBy'] = 'updated'
43
+ if query.order_by[0].value == "start_time":
44
+ params["orderBy"] = "startTime"
45
+ elif query.order_by[0].value == "updated":
46
+ params["orderBy"] = "updated"
48
47
  else:
49
48
  raise NotImplementedError
50
49
 
51
50
  if query.limit is not None:
52
- params['maxResults'] = query.limit.value
51
+ params["maxResults"] = query.limit.value
53
52
 
54
53
  # Get the events from the Google Calendar API.
55
- events = self.handler.call_application_api(method_name='get_events', params=params)
54
+ events = self.handler.call_application_api(method_name="get_events", params=params)
56
55
 
57
56
  selected_columns = []
58
57
  for target in query.targets:
@@ -87,9 +86,20 @@ class GoogleCalendarEventsTable(APITable):
87
86
  values = query.values[0]
88
87
  # Get the event data from the values.
89
88
  event_data = {}
90
- timestamp_columns = {'start_time', 'end_time', 'created', 'updated'}
91
- regular_columns = {'summary', 'description', 'location', 'status', 'html_link',
92
- 'creator', 'organizer', 'reminders', 'timeZone', 'calendar_id', 'attendees'}
89
+ timestamp_columns = {"start_time", "end_time", "created", "updated"}
90
+ regular_columns = {
91
+ "summary",
92
+ "description",
93
+ "location",
94
+ "status",
95
+ "html_link",
96
+ "creator",
97
+ "organizer",
98
+ "reminders",
99
+ "timeZone",
100
+ "calendar_id",
101
+ "attendees",
102
+ }
93
103
 
94
104
  # TODO: check why query.columns is None
95
105
  for col, val in zip(query.columns, values):
@@ -100,24 +110,18 @@ class GoogleCalendarEventsTable(APITable):
100
110
  else:
101
111
  raise NotImplementedError
102
112
 
103
- st = datetime.datetime.utcfromtimestamp(event_data['start_time'] / 1000).isoformat() + 'Z'
104
- et = datetime.datetime.utcfromtimestamp(event_data['end_time'] / 1000).isoformat() + 'Z'
113
+ st = datetime.datetime.fromtimestamp(event_data["start_time"] / 1000, datetime.timezone.utc).isoformat() + "Z"
114
+ et = datetime.datetime.fromtimestamp(event_data["end_time"] / 1000, datetime.timezone.utc).isoformat() + "Z"
105
115
 
106
- event_data['start'] = {
107
- 'dateTime': st,
108
- 'timeZone': event_data['timeZone']
109
- }
116
+ event_data["start"] = {"dateTime": st, "timeZone": event_data["timeZone"]}
110
117
 
111
- event_data['end'] = {
112
- 'dateTime': et,
113
- 'timeZone': event_data['timeZone']
114
- }
118
+ event_data["end"] = {"dateTime": et, "timeZone": event_data["timeZone"]}
115
119
 
116
- event_data['attendees'] = event_data['attendees'].split(',')
117
- event_data['attendees'] = [{'email': attendee} for attendee in event_data['attendees']]
120
+ event_data["attendees"] = event_data["attendees"].split(",")
121
+ event_data["attendees"] = [{"email": attendee} for attendee in event_data["attendees"]]
118
122
 
119
123
  # Insert the event into the Google Calendar API.
120
- self.handler.call_application_api(method_name='create_event', params=event_data)
124
+ self.handler.call_application_api(method_name="create_event", params=event_data)
121
125
 
122
126
  def update(self, query: ast.Update):
123
127
  """
@@ -135,44 +139,48 @@ class GoogleCalendarEventsTable(APITable):
135
139
  # Get the event data from the values.
136
140
  event_data = {}
137
141
  for col, val in zip(query.update_columns, values):
138
- if col == 'start_time' or col == 'end_time' or col == 'created' or col == 'updated':
142
+ if col == "start_time" or col == "end_time" or col == "created" or col == "updated":
139
143
  event_data[col] = utc_date_str_to_timestamp_ms(val)
140
- elif col == 'summary' or col == 'description' or col == 'location' or col == 'status' or col == 'html_link' \
141
- or col == 'creator' or col == 'organizer' or col == 'reminders' \
142
- or col == 'timeZone' or col == 'calendar_id' or col == 'attendees':
144
+ elif (
145
+ col == "summary"
146
+ or col == "description"
147
+ or col == "location"
148
+ or col == "status"
149
+ or col == "html_link"
150
+ or col == "creator"
151
+ or col == "organizer"
152
+ or col == "reminders"
153
+ or col == "timeZone"
154
+ or col == "calendar_id"
155
+ or col == "attendees"
156
+ ):
143
157
  event_data[col] = val
144
158
  else:
145
159
  raise NotImplementedError
146
160
 
147
- event_data['start'] = {
148
- 'dateTime': event_data['start_time'],
149
- 'timeZone': event_data['timeZone']
150
- }
161
+ event_data["start"] = {"dateTime": event_data["start_time"], "timeZone": event_data["timeZone"]}
151
162
 
152
- event_data['end'] = {
153
- 'dateTime': event_data['end_time'],
154
- 'timeZone': event_data['timeZone']
155
- }
163
+ event_data["end"] = {"dateTime": event_data["end_time"], "timeZone": event_data["timeZone"]}
156
164
 
157
- event_data['attendees'] = event_data.get('attendees').split(',')
158
- event_data['attendees'] = [{'email': attendee} for attendee in event_data['attendees']]
165
+ event_data["attendees"] = event_data.get("attendees").split(",")
166
+ event_data["attendees"] = [{"email": attendee} for attendee in event_data["attendees"]]
159
167
 
160
168
  conditions = extract_comparison_conditions(query.where)
161
169
  for op, arg1, arg2 in conditions:
162
- if arg1 == 'event_id':
163
- if op == '=':
164
- event_data['event_id'] = arg2
165
- elif op == '>':
166
- event_data['start_id'] = arg2
167
- elif op == '<':
168
- event_data['end_id'] = arg2
170
+ if arg1 == "event_id":
171
+ if op == "=":
172
+ event_data["event_id"] = arg2
173
+ elif op == ">":
174
+ event_data["start_id"] = arg2
175
+ elif op == "<":
176
+ event_data["end_id"] = arg2
169
177
  else:
170
178
  raise NotImplementedError
171
179
  else:
172
180
  raise NotImplementedError
173
181
 
174
182
  # Update the event in the Google Calendar API.
175
- self.handler.call_application_api(method_name='update_event', params=event_data)
183
+ self.handler.call_application_api(method_name="update_event", params=event_data)
176
184
 
177
185
  def delete(self, query: ast.Delete):
178
186
  """
@@ -190,35 +198,36 @@ class GoogleCalendarEventsTable(APITable):
190
198
  # Get the start and end times from the conditions.
191
199
  params = {}
192
200
  for op, arg1, arg2 in conditions:
193
- if arg1 == 'event_id':
194
- if op == '=':
201
+ if arg1 == "event_id":
202
+ if op == "=":
195
203
  params[arg1] = arg2
196
- elif op == '>':
197
- params['start_id'] = arg2
198
- elif op == '<':
199
- params['end_id'] = arg2
204
+ elif op == ">":
205
+ params["start_id"] = arg2
206
+ elif op == "<":
207
+ params["end_id"] = arg2
200
208
  else:
201
209
  raise NotImplementedError
202
210
 
203
211
  # Delete the events in the Google Calendar API.
204
- self.handler.call_application_api(method_name='delete_event', params=params)
212
+ self.handler.call_application_api(method_name="delete_event", params=params)
205
213
 
206
214
  def get_columns(self) -> list:
207
215
  """Gets all columns to be returned in pandas DataFrame responses"""
208
216
  return [
209
- 'etag',
210
- 'id',
211
- 'status',
212
- 'htmlLink',
213
- 'created',
214
- 'updated',
215
- 'summary',
216
- 'creator',
217
- 'organizer',
218
- 'start',
219
- 'end',
220
- 'timeZone',
221
- 'iCalUID',
222
- 'sequence',
223
- 'reminders',
224
- 'eventType']
217
+ "etag",
218
+ "id",
219
+ "status",
220
+ "htmlLink",
221
+ "created",
222
+ "updated",
223
+ "summary",
224
+ "creator",
225
+ "organizer",
226
+ "start",
227
+ "end",
228
+ "timeZone",
229
+ "iCalUID",
230
+ "sequence",
231
+ "reminders",
232
+ "eventType",
233
+ ]
@@ -1 +1 @@
1
- hubspot-api-client
1
+ hubspot-api-client==11.1.0
@@ -1,19 +1,15 @@
1
1
  from mindsdb.integrations.libs.const import HANDLER_TYPE
2
2
 
3
3
  from .__about__ import __version__ as version, __description__ as description
4
- # try:
5
- # from .huggingface_handler import HuggingFaceHandler as Handler
6
- # import_error = None
7
- # except Exception as e:
8
- # Handler = None
9
- # import_error = e
10
4
 
11
- # NOTE: security vulnerability is in `pytorch` v2.7.1, revert changes here and in
12
- # requirements.txt/requirements_cpu.txt when new version is released
13
- Handler = None
14
- import_error = """
15
- The `huggingface_handler` is temporary disabled in current version of MindsDB due to security vulnerability.
16
- """
5
+ try:
6
+ from .huggingface_handler import HuggingFaceHandler as Handler
7
+
8
+ import_error = None
9
+ except Exception as e:
10
+ Handler = None
11
+ import_error = e
12
+
17
13
 
18
14
  title = "Hugging Face"
19
15
  name = "huggingface"