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.
- mindsdb/__about__.py +1 -1
- mindsdb/__main__.py +11 -1
- mindsdb/api/a2a/common/server/server.py +16 -6
- mindsdb/api/executor/command_executor.py +215 -150
- mindsdb/api/executor/datahub/datanodes/project_datanode.py +14 -3
- mindsdb/api/executor/planner/plan_join.py +3 -0
- mindsdb/api/executor/planner/plan_join_ts.py +117 -100
- mindsdb/api/executor/planner/query_planner.py +1 -0
- mindsdb/api/executor/sql_query/steps/apply_predictor_step.py +54 -85
- mindsdb/api/executor/sql_query/steps/fetch_dataframe.py +21 -24
- mindsdb/api/executor/sql_query/steps/fetch_dataframe_partition.py +9 -3
- mindsdb/api/executor/sql_query/steps/subselect_step.py +11 -8
- mindsdb/api/executor/utilities/mysql_to_duckdb_functions.py +264 -0
- mindsdb/api/executor/utilities/sql.py +30 -0
- mindsdb/api/http/initialize.py +18 -44
- mindsdb/api/http/namespaces/agents.py +23 -20
- mindsdb/api/http/namespaces/chatbots.py +83 -120
- mindsdb/api/http/namespaces/file.py +1 -1
- mindsdb/api/http/namespaces/jobs.py +38 -60
- mindsdb/api/http/namespaces/tree.py +69 -61
- mindsdb/api/http/namespaces/views.py +56 -72
- mindsdb/api/mcp/start.py +2 -0
- mindsdb/api/mysql/mysql_proxy/utilities/dump.py +3 -2
- mindsdb/integrations/handlers/autogluon_handler/requirements.txt +1 -1
- mindsdb/integrations/handlers/autosklearn_handler/requirements.txt +1 -1
- mindsdb/integrations/handlers/bigquery_handler/bigquery_handler.py +25 -5
- mindsdb/integrations/handlers/chromadb_handler/chromadb_handler.py +3 -3
- mindsdb/integrations/handlers/db2_handler/db2_handler.py +19 -23
- mindsdb/integrations/handlers/flaml_handler/requirements.txt +1 -1
- mindsdb/integrations/handlers/gong_handler/__about__.py +2 -0
- mindsdb/integrations/handlers/gong_handler/__init__.py +30 -0
- mindsdb/integrations/handlers/gong_handler/connection_args.py +37 -0
- mindsdb/integrations/handlers/gong_handler/gong_handler.py +164 -0
- mindsdb/integrations/handlers/gong_handler/gong_tables.py +508 -0
- mindsdb/integrations/handlers/gong_handler/icon.svg +25 -0
- mindsdb/integrations/handlers/gong_handler/test_gong_handler.py +125 -0
- mindsdb/integrations/handlers/google_calendar_handler/google_calendar_tables.py +82 -73
- mindsdb/integrations/handlers/hubspot_handler/requirements.txt +1 -1
- mindsdb/integrations/handlers/huggingface_handler/__init__.py +8 -12
- mindsdb/integrations/handlers/huggingface_handler/finetune.py +203 -223
- mindsdb/integrations/handlers/huggingface_handler/huggingface_handler.py +360 -383
- mindsdb/integrations/handlers/huggingface_handler/requirements.txt +7 -7
- mindsdb/integrations/handlers/huggingface_handler/requirements_cpu.txt +7 -7
- mindsdb/integrations/handlers/huggingface_handler/settings.py +25 -25
- mindsdb/integrations/handlers/langchain_handler/langchain_handler.py +83 -77
- mindsdb/integrations/handlers/lightwood_handler/requirements.txt +4 -4
- mindsdb/integrations/handlers/litellm_handler/litellm_handler.py +5 -2
- mindsdb/integrations/handlers/litellm_handler/settings.py +2 -1
- mindsdb/integrations/handlers/openai_handler/constants.py +11 -30
- mindsdb/integrations/handlers/openai_handler/helpers.py +27 -34
- mindsdb/integrations/handlers/openai_handler/openai_handler.py +14 -12
- mindsdb/integrations/handlers/pgvector_handler/pgvector_handler.py +106 -90
- mindsdb/integrations/handlers/postgres_handler/postgres_handler.py +41 -39
- mindsdb/integrations/handlers/salesforce_handler/constants.py +215 -0
- mindsdb/integrations/handlers/salesforce_handler/salesforce_handler.py +141 -80
- mindsdb/integrations/handlers/salesforce_handler/salesforce_tables.py +0 -1
- mindsdb/integrations/handlers/tpot_handler/requirements.txt +1 -1
- mindsdb/integrations/handlers/web_handler/urlcrawl_helpers.py +32 -17
- mindsdb/integrations/handlers/web_handler/web_handler.py +19 -22
- mindsdb/integrations/libs/llm/config.py +0 -14
- mindsdb/integrations/libs/llm/utils.py +0 -15
- mindsdb/integrations/libs/vectordatabase_handler.py +10 -1
- mindsdb/integrations/utilities/files/file_reader.py +5 -19
- mindsdb/integrations/utilities/handler_utils.py +32 -12
- mindsdb/integrations/utilities/rag/rerankers/base_reranker.py +1 -1
- mindsdb/interfaces/agents/agents_controller.py +246 -149
- mindsdb/interfaces/agents/constants.py +0 -1
- mindsdb/interfaces/agents/langchain_agent.py +11 -6
- mindsdb/interfaces/data_catalog/data_catalog_loader.py +4 -4
- mindsdb/interfaces/database/database.py +38 -13
- mindsdb/interfaces/database/integrations.py +20 -5
- mindsdb/interfaces/database/projects.py +174 -23
- mindsdb/interfaces/database/views.py +86 -60
- mindsdb/interfaces/jobs/jobs_controller.py +103 -110
- mindsdb/interfaces/knowledge_base/controller.py +33 -6
- mindsdb/interfaces/knowledge_base/evaluate.py +2 -1
- mindsdb/interfaces/knowledge_base/executor.py +24 -0
- mindsdb/interfaces/knowledge_base/preprocessing/document_preprocessor.py +6 -10
- mindsdb/interfaces/knowledge_base/preprocessing/text_splitter.py +73 -0
- mindsdb/interfaces/query_context/context_controller.py +111 -145
- mindsdb/interfaces/skills/skills_controller.py +18 -6
- mindsdb/interfaces/storage/db.py +40 -6
- mindsdb/interfaces/variables/variables_controller.py +8 -15
- mindsdb/utilities/config.py +5 -3
- mindsdb/utilities/fs.py +54 -17
- mindsdb/utilities/functions.py +72 -60
- mindsdb/utilities/log.py +38 -6
- mindsdb/utilities/ps.py +7 -7
- {mindsdb-25.7.3.0.dist-info → mindsdb-25.8.2.0.dist-info}/METADATA +282 -268
- {mindsdb-25.7.3.0.dist-info → mindsdb-25.8.2.0.dist-info}/RECORD +94 -92
- mindsdb/integrations/handlers/anyscale_endpoints_handler/__about__.py +0 -9
- mindsdb/integrations/handlers/anyscale_endpoints_handler/__init__.py +0 -20
- mindsdb/integrations/handlers/anyscale_endpoints_handler/anyscale_endpoints_handler.py +0 -290
- mindsdb/integrations/handlers/anyscale_endpoints_handler/creation_args.py +0 -14
- mindsdb/integrations/handlers/anyscale_endpoints_handler/icon.svg +0 -4
- mindsdb/integrations/handlers/anyscale_endpoints_handler/requirements.txt +0 -2
- mindsdb/integrations/handlers/anyscale_endpoints_handler/settings.py +0 -51
- mindsdb/integrations/handlers/anyscale_endpoints_handler/tests/test_anyscale_endpoints_handler.py +0 -212
- /mindsdb/integrations/handlers/{anyscale_endpoints_handler/tests/__init__.py → gong_handler/requirements.txt} +0 -0
- {mindsdb-25.7.3.0.dist-info → mindsdb-25.8.2.0.dist-info}/WHEEL +0 -0
- {mindsdb-25.7.3.0.dist-info → mindsdb-25.8.2.0.dist-info}/licenses/LICENSE +0 -0
- {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 ==
|
|
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 ==
|
|
34
|
+
elif arg1 == "timeZone":
|
|
36
35
|
params[arg1] = arg2
|
|
37
|
-
elif arg1 ==
|
|
36
|
+
elif arg1 == "maxAttendees":
|
|
38
37
|
params[arg1] = arg2
|
|
39
|
-
elif arg1 ==
|
|
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 ==
|
|
45
|
-
params[
|
|
46
|
-
elif query.order_by[0].value ==
|
|
47
|
-
params[
|
|
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[
|
|
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=
|
|
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 = {
|
|
91
|
-
regular_columns = {
|
|
92
|
-
|
|
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.
|
|
104
|
-
et = datetime.datetime.
|
|
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[
|
|
107
|
-
'dateTime': st,
|
|
108
|
-
'timeZone': event_data['timeZone']
|
|
109
|
-
}
|
|
116
|
+
event_data["start"] = {"dateTime": st, "timeZone": event_data["timeZone"]}
|
|
110
117
|
|
|
111
|
-
event_data[
|
|
112
|
-
'dateTime': et,
|
|
113
|
-
'timeZone': event_data['timeZone']
|
|
114
|
-
}
|
|
118
|
+
event_data["end"] = {"dateTime": et, "timeZone": event_data["timeZone"]}
|
|
115
119
|
|
|
116
|
-
event_data[
|
|
117
|
-
event_data[
|
|
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=
|
|
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 ==
|
|
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
|
|
141
|
-
|
|
142
|
-
|
|
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[
|
|
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[
|
|
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[
|
|
158
|
-
event_data[
|
|
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 ==
|
|
163
|
-
if op ==
|
|
164
|
-
event_data[
|
|
165
|
-
elif op ==
|
|
166
|
-
event_data[
|
|
167
|
-
elif op ==
|
|
168
|
-
event_data[
|
|
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=
|
|
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 ==
|
|
194
|
-
if op ==
|
|
201
|
+
if arg1 == "event_id":
|
|
202
|
+
if op == "=":
|
|
195
203
|
params[arg1] = arg2
|
|
196
|
-
elif op ==
|
|
197
|
-
params[
|
|
198
|
-
elif op ==
|
|
199
|
-
params[
|
|
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=
|
|
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
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
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
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
import_error =
|
|
15
|
-
|
|
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"
|