datarobot-genai 0.2.3__py3-none-any.whl → 0.2.13__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.
- datarobot_genai/drmcp/core/config.py +52 -0
- datarobot_genai/drmcp/core/dr_mcp_server.py +11 -8
- datarobot_genai/drmcp/core/tool_config.py +95 -0
- datarobot_genai/drmcp/test_utils/openai_llm_mcp_client.py +6 -1
- datarobot_genai/drmcp/tools/clients/__init__.py +14 -0
- datarobot_genai/drmcp/tools/clients/atlassian.py +188 -0
- datarobot_genai/drmcp/tools/clients/confluence.py +196 -0
- datarobot_genai/drmcp/tools/clients/jira.py +220 -0
- datarobot_genai/drmcp/tools/clients/s3.py +28 -0
- datarobot_genai/drmcp/tools/confluence/__init__.py +14 -0
- datarobot_genai/drmcp/tools/confluence/tools.py +81 -0
- datarobot_genai/drmcp/tools/jira/__init__.py +14 -0
- datarobot_genai/drmcp/tools/jira/tools.py +101 -0
- datarobot_genai/drmcp/tools/predictive/predict.py +1 -1
- datarobot_genai/drmcp/tools/predictive/predict_realtime.py +1 -1
- datarobot_genai/nat/agent.py +4 -0
- datarobot_genai/nat/datarobot_auth_provider.py +110 -0
- datarobot_genai/nat/datarobot_llm_clients.py +45 -12
- datarobot_genai/nat/datarobot_mcp_client.py +234 -0
- {datarobot_genai-0.2.3.dist-info → datarobot_genai-0.2.13.dist-info}/METADATA +6 -1
- {datarobot_genai-0.2.3.dist-info → datarobot_genai-0.2.13.dist-info}/RECORD +25 -13
- {datarobot_genai-0.2.3.dist-info → datarobot_genai-0.2.13.dist-info}/entry_points.txt +2 -0
- {datarobot_genai-0.2.3.dist-info → datarobot_genai-0.2.13.dist-info}/WHEEL +0 -0
- {datarobot_genai-0.2.3.dist-info → datarobot_genai-0.2.13.dist-info}/licenses/AUTHORS +0 -0
- {datarobot_genai-0.2.3.dist-info → datarobot_genai-0.2.13.dist-info}/licenses/LICENSE +0 -0
|
@@ -14,6 +14,7 @@
|
|
|
14
14
|
|
|
15
15
|
from collections.abc import AsyncGenerator
|
|
16
16
|
from typing import Any
|
|
17
|
+
from typing import TypeVar
|
|
17
18
|
|
|
18
19
|
from crewai import LLM
|
|
19
20
|
from langchain_openai import ChatOpenAI
|
|
@@ -22,12 +23,32 @@ from llama_index.llms.litellm import LiteLLM
|
|
|
22
23
|
from nat.builder.builder import Builder
|
|
23
24
|
from nat.builder.framework_enum import LLMFrameworkEnum
|
|
24
25
|
from nat.cli.register_workflow import register_llm_client
|
|
26
|
+
from nat.data_models.llm import LLMBaseConfig
|
|
27
|
+
from nat.data_models.retry_mixin import RetryMixin
|
|
28
|
+
from nat.plugins.langchain.llm import (
|
|
29
|
+
_patch_llm_based_on_config as langchain_patch_llm_based_on_config,
|
|
30
|
+
)
|
|
31
|
+
from nat.utils.exception_handlers.automatic_retries import patch_with_retry
|
|
25
32
|
|
|
26
33
|
from ..nat.datarobot_llm_providers import DataRobotLLMComponentModelConfig
|
|
27
34
|
from ..nat.datarobot_llm_providers import DataRobotLLMDeploymentModelConfig
|
|
28
35
|
from ..nat.datarobot_llm_providers import DataRobotLLMGatewayModelConfig
|
|
29
36
|
from ..nat.datarobot_llm_providers import DataRobotNIMModelConfig
|
|
30
37
|
|
|
38
|
+
ModelType = TypeVar("ModelType")
|
|
39
|
+
|
|
40
|
+
|
|
41
|
+
def _patch_llm_based_on_config(client: ModelType, llm_config: LLMBaseConfig) -> ModelType:
|
|
42
|
+
if isinstance(llm_config, RetryMixin):
|
|
43
|
+
client = patch_with_retry(
|
|
44
|
+
client,
|
|
45
|
+
retries=llm_config.num_retries,
|
|
46
|
+
retry_codes=llm_config.retry_on_status_codes,
|
|
47
|
+
retry_on_messages=llm_config.retry_on_errors,
|
|
48
|
+
)
|
|
49
|
+
|
|
50
|
+
return client
|
|
51
|
+
|
|
31
52
|
|
|
32
53
|
class DataRobotChatOpenAI(ChatOpenAI):
|
|
33
54
|
def _get_request_payload(
|
|
@@ -77,7 +98,8 @@ async def datarobot_llm_gateway_langchain(
|
|
|
77
98
|
config["base_url"] = config["base_url"] + "/genai/llmgw"
|
|
78
99
|
config["stream_options"] = {"include_usage": True}
|
|
79
100
|
config["model"] = config["model"].removeprefix("datarobot/")
|
|
80
|
-
|
|
101
|
+
client = DataRobotChatOpenAI(**config)
|
|
102
|
+
yield langchain_patch_llm_based_on_config(client, config)
|
|
81
103
|
|
|
82
104
|
|
|
83
105
|
@register_llm_client(
|
|
@@ -90,7 +112,8 @@ async def datarobot_llm_gateway_crewai(
|
|
|
90
112
|
if not config["model"].startswith("datarobot/"):
|
|
91
113
|
config["model"] = "datarobot/" + config["model"]
|
|
92
114
|
config["base_url"] = config["base_url"].removesuffix("/api/v2")
|
|
93
|
-
|
|
115
|
+
client = LLM(**config)
|
|
116
|
+
yield _patch_llm_based_on_config(client, config)
|
|
94
117
|
|
|
95
118
|
|
|
96
119
|
@register_llm_client(
|
|
@@ -103,7 +126,8 @@ async def datarobot_llm_gateway_llamaindex(
|
|
|
103
126
|
if not config["model"].startswith("datarobot/"):
|
|
104
127
|
config["model"] = "datarobot/" + config["model"]
|
|
105
128
|
config["api_base"] = config.pop("base_url").removesuffix("/api/v2")
|
|
106
|
-
|
|
129
|
+
client = DataRobotLiteLLM(**config)
|
|
130
|
+
yield _patch_llm_based_on_config(client, config)
|
|
107
131
|
|
|
108
132
|
|
|
109
133
|
@register_llm_client(
|
|
@@ -119,7 +143,8 @@ async def datarobot_llm_deployment_langchain(
|
|
|
119
143
|
)
|
|
120
144
|
config["stream_options"] = {"include_usage": True}
|
|
121
145
|
config["model"] = config["model"].removeprefix("datarobot/")
|
|
122
|
-
|
|
146
|
+
client = DataRobotChatOpenAI(**config)
|
|
147
|
+
yield langchain_patch_llm_based_on_config(client, config)
|
|
123
148
|
|
|
124
149
|
|
|
125
150
|
@register_llm_client(
|
|
@@ -136,7 +161,8 @@ async def datarobot_llm_deployment_crewai(
|
|
|
136
161
|
if not config["model"].startswith("datarobot/"):
|
|
137
162
|
config["model"] = "datarobot/" + config["model"]
|
|
138
163
|
config["api_base"] = config.pop("base_url") + "/chat/completions"
|
|
139
|
-
|
|
164
|
+
client = LLM(**config)
|
|
165
|
+
yield _patch_llm_based_on_config(client, config)
|
|
140
166
|
|
|
141
167
|
|
|
142
168
|
@register_llm_client(
|
|
@@ -153,7 +179,8 @@ async def datarobot_llm_deployment_llamaindex(
|
|
|
153
179
|
if not config["model"].startswith("datarobot/"):
|
|
154
180
|
config["model"] = "datarobot/" + config["model"]
|
|
155
181
|
config["api_base"] = config.pop("base_url") + "/chat/completions"
|
|
156
|
-
|
|
182
|
+
client = DataRobotLiteLLM(**config)
|
|
183
|
+
yield _patch_llm_based_on_config(client, config)
|
|
157
184
|
|
|
158
185
|
|
|
159
186
|
@register_llm_client(config_type=DataRobotNIMModelConfig, wrapper_type=LLMFrameworkEnum.LANGCHAIN)
|
|
@@ -167,7 +194,8 @@ async def datarobot_nim_langchain(
|
|
|
167
194
|
)
|
|
168
195
|
config["stream_options"] = {"include_usage": True}
|
|
169
196
|
config["model"] = config["model"].removeprefix("datarobot/")
|
|
170
|
-
|
|
197
|
+
client = DataRobotChatOpenAI(**config)
|
|
198
|
+
yield langchain_patch_llm_based_on_config(client, config)
|
|
171
199
|
|
|
172
200
|
|
|
173
201
|
@register_llm_client(config_type=DataRobotNIMModelConfig, wrapper_type=LLMFrameworkEnum.CREWAI)
|
|
@@ -182,7 +210,8 @@ async def datarobot_nim_crewai(
|
|
|
182
210
|
if not config["model"].startswith("datarobot/"):
|
|
183
211
|
config["model"] = "datarobot/" + config["model"]
|
|
184
212
|
config["api_base"] = config.pop("base_url") + "/chat/completions"
|
|
185
|
-
|
|
213
|
+
client = LLM(**config)
|
|
214
|
+
yield _patch_llm_based_on_config(client, config)
|
|
186
215
|
|
|
187
216
|
|
|
188
217
|
@register_llm_client(config_type=DataRobotNIMModelConfig, wrapper_type=LLMFrameworkEnum.LLAMA_INDEX)
|
|
@@ -197,7 +226,8 @@ async def datarobot_nim_llamaindex(
|
|
|
197
226
|
if not config["model"].startswith("datarobot/"):
|
|
198
227
|
config["model"] = "datarobot/" + config["model"]
|
|
199
228
|
config["api_base"] = config.pop("base_url") + "/chat/completions"
|
|
200
|
-
|
|
229
|
+
client = DataRobotLiteLLM(**config)
|
|
230
|
+
yield _patch_llm_based_on_config(client, config)
|
|
201
231
|
|
|
202
232
|
|
|
203
233
|
@register_llm_client(
|
|
@@ -212,7 +242,8 @@ async def datarobot_llm_component_langchain(
|
|
|
212
242
|
config["stream_options"] = {"include_usage": True}
|
|
213
243
|
config["model"] = config["model"].removeprefix("datarobot/")
|
|
214
244
|
config.pop("use_datarobot_llm_gateway")
|
|
215
|
-
|
|
245
|
+
client = DataRobotChatOpenAI(**config)
|
|
246
|
+
yield langchain_patch_llm_based_on_config(client, config)
|
|
216
247
|
|
|
217
248
|
|
|
218
249
|
@register_llm_client(
|
|
@@ -229,7 +260,8 @@ async def datarobot_llm_component_crewai(
|
|
|
229
260
|
else:
|
|
230
261
|
config["api_base"] = config.pop("base_url") + "/chat/completions"
|
|
231
262
|
config.pop("use_datarobot_llm_gateway")
|
|
232
|
-
|
|
263
|
+
client = LLM(**config)
|
|
264
|
+
yield _patch_llm_based_on_config(client, config)
|
|
233
265
|
|
|
234
266
|
|
|
235
267
|
@register_llm_client(
|
|
@@ -246,4 +278,5 @@ async def datarobot_llm_component_llamaindex(
|
|
|
246
278
|
else:
|
|
247
279
|
config["api_base"] = config.pop("base_url") + "/chat/completions"
|
|
248
280
|
config.pop("use_datarobot_llm_gateway")
|
|
249
|
-
|
|
281
|
+
client = DataRobotLiteLLM(**config)
|
|
282
|
+
yield _patch_llm_based_on_config(client, config)
|
|
@@ -0,0 +1,234 @@
|
|
|
1
|
+
# Copyright 2025 DataRobot, Inc. and its affiliates.
|
|
2
|
+
#
|
|
3
|
+
# Licensed under the Apache License, Version 2.0 (the "License");
|
|
4
|
+
# you may not use this file except in compliance with the License.
|
|
5
|
+
# You may obtain a copy of the License at
|
|
6
|
+
#
|
|
7
|
+
# http://www.apache.org/licenses/LICENSE-2.0
|
|
8
|
+
#
|
|
9
|
+
# Unless required by applicable law or agreed to in writing, software
|
|
10
|
+
# distributed under the License is distributed on an "AS IS" BASIS,
|
|
11
|
+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
12
|
+
# See the License for the specific language governing permissions and
|
|
13
|
+
# limitations under the License.
|
|
14
|
+
|
|
15
|
+
import logging
|
|
16
|
+
from datetime import timedelta
|
|
17
|
+
from typing import Literal
|
|
18
|
+
|
|
19
|
+
import httpx
|
|
20
|
+
from nat.authentication.interfaces import AuthProviderBase
|
|
21
|
+
from nat.builder.builder import Builder
|
|
22
|
+
from nat.cli.register_workflow import register_function_group
|
|
23
|
+
from nat.data_models.component_ref import AuthenticationRef
|
|
24
|
+
from nat.plugins.mcp.client_base import AuthAdapter
|
|
25
|
+
from nat.plugins.mcp.client_base import MCPSSEClient
|
|
26
|
+
from nat.plugins.mcp.client_base import MCPStdioClient
|
|
27
|
+
from nat.plugins.mcp.client_base import MCPStreamableHTTPClient
|
|
28
|
+
from nat.plugins.mcp.client_config import MCPServerConfig
|
|
29
|
+
from nat.plugins.mcp.client_impl import MCPClientConfig
|
|
30
|
+
from nat.plugins.mcp.client_impl import MCPFunctionGroup
|
|
31
|
+
from nat.plugins.mcp.client_impl import mcp_apply_tool_alias_and_description
|
|
32
|
+
from nat.plugins.mcp.client_impl import mcp_session_tool_function
|
|
33
|
+
from pydantic import Field
|
|
34
|
+
from pydantic import HttpUrl
|
|
35
|
+
|
|
36
|
+
from datarobot_genai.core.mcp.common import MCPConfig
|
|
37
|
+
|
|
38
|
+
logger = logging.getLogger(__name__)
|
|
39
|
+
|
|
40
|
+
config = MCPConfig().server_config
|
|
41
|
+
|
|
42
|
+
|
|
43
|
+
class DataRobotMCPServerConfig(MCPServerConfig):
|
|
44
|
+
transport: Literal["streamable-http", "sse", "stdio"] = Field(
|
|
45
|
+
default=config["transport"] if config else "stdio",
|
|
46
|
+
description="Transport type to connect to the MCP server (sse or streamable-http)",
|
|
47
|
+
)
|
|
48
|
+
url: HttpUrl | None = Field(
|
|
49
|
+
default=config["url"] if config else None,
|
|
50
|
+
description="URL of the MCP server (for sse or streamable-http transport)",
|
|
51
|
+
)
|
|
52
|
+
# Authentication configuration
|
|
53
|
+
auth_provider: str | AuthenticationRef | None = Field(
|
|
54
|
+
default="datarobot_mcp_auth" if config else None,
|
|
55
|
+
description="Reference to authentication provider",
|
|
56
|
+
)
|
|
57
|
+
command: str | None = Field(
|
|
58
|
+
default=None if config else "docker",
|
|
59
|
+
description="Command to run for stdio transport (e.g. 'python' or 'docker')",
|
|
60
|
+
)
|
|
61
|
+
|
|
62
|
+
|
|
63
|
+
class DataRobotMCPClientConfig(MCPClientConfig, name="datarobot_mcp_client"): # type: ignore[call-arg]
|
|
64
|
+
server: DataRobotMCPServerConfig = Field(
|
|
65
|
+
default=DataRobotMCPServerConfig(), description="DataRobot MCP Server configuration"
|
|
66
|
+
)
|
|
67
|
+
|
|
68
|
+
|
|
69
|
+
class DataRobotAuthAdapter(AuthAdapter):
|
|
70
|
+
async def _get_auth_headers(
|
|
71
|
+
self, request: httpx.Request | None = None, response: httpx.Response | None = None
|
|
72
|
+
) -> dict[str, str]:
|
|
73
|
+
"""Get authentication headers from the NAT auth provider."""
|
|
74
|
+
try:
|
|
75
|
+
# Use the user_id passed to this AuthAdapter instance
|
|
76
|
+
auth_result = await self.auth_provider.authenticate(
|
|
77
|
+
user_id=self.user_id, response=response
|
|
78
|
+
)
|
|
79
|
+
as_kwargs = auth_result.as_requests_kwargs()
|
|
80
|
+
return as_kwargs["headers"]
|
|
81
|
+
except Exception as e:
|
|
82
|
+
logger.warning("Failed to get auth token: %s", e)
|
|
83
|
+
return {}
|
|
84
|
+
|
|
85
|
+
|
|
86
|
+
class DataRobotMCPStreamableHTTPClient(MCPStreamableHTTPClient):
|
|
87
|
+
def __init__(
|
|
88
|
+
self,
|
|
89
|
+
url: str,
|
|
90
|
+
auth_provider: AuthProviderBase | None = None,
|
|
91
|
+
user_id: str | None = None,
|
|
92
|
+
tool_call_timeout: timedelta = timedelta(seconds=60),
|
|
93
|
+
auth_flow_timeout: timedelta = timedelta(seconds=300),
|
|
94
|
+
reconnect_enabled: bool = True,
|
|
95
|
+
reconnect_max_attempts: int = 2,
|
|
96
|
+
reconnect_initial_backoff: float = 0.5,
|
|
97
|
+
reconnect_max_backoff: float = 50.0,
|
|
98
|
+
):
|
|
99
|
+
super().__init__(
|
|
100
|
+
url=url,
|
|
101
|
+
auth_provider=auth_provider,
|
|
102
|
+
user_id=user_id,
|
|
103
|
+
tool_call_timeout=tool_call_timeout,
|
|
104
|
+
auth_flow_timeout=auth_flow_timeout,
|
|
105
|
+
reconnect_enabled=reconnect_enabled,
|
|
106
|
+
reconnect_max_attempts=reconnect_max_attempts,
|
|
107
|
+
reconnect_initial_backoff=reconnect_initial_backoff,
|
|
108
|
+
reconnect_max_backoff=reconnect_max_backoff,
|
|
109
|
+
)
|
|
110
|
+
effective_user_id = user_id or (
|
|
111
|
+
auth_provider.config.default_user_id if auth_provider else None
|
|
112
|
+
)
|
|
113
|
+
self._httpx_auth = (
|
|
114
|
+
DataRobotAuthAdapter(auth_provider, effective_user_id) if auth_provider else None
|
|
115
|
+
)
|
|
116
|
+
|
|
117
|
+
|
|
118
|
+
@register_function_group(config_type=DataRobotMCPClientConfig)
|
|
119
|
+
async def datarobot_mcp_client_function_group(
|
|
120
|
+
config: DataRobotMCPClientConfig, _builder: Builder
|
|
121
|
+
) -> MCPFunctionGroup:
|
|
122
|
+
"""
|
|
123
|
+
Connect to an MCP server and expose tools as a function group.
|
|
124
|
+
|
|
125
|
+
Args:
|
|
126
|
+
config: The configuration for the MCP client
|
|
127
|
+
_builder: The builder
|
|
128
|
+
Returns:
|
|
129
|
+
The function group
|
|
130
|
+
"""
|
|
131
|
+
# Resolve auth provider if specified
|
|
132
|
+
auth_provider = None
|
|
133
|
+
if config.server.auth_provider:
|
|
134
|
+
auth_provider = await _builder.get_auth_provider(config.server.auth_provider)
|
|
135
|
+
|
|
136
|
+
# Build the appropriate client
|
|
137
|
+
if config.server.transport == "stdio":
|
|
138
|
+
if not config.server.command:
|
|
139
|
+
raise ValueError("command is required for stdio transport")
|
|
140
|
+
client = MCPStdioClient(
|
|
141
|
+
config.server.command,
|
|
142
|
+
config.server.args,
|
|
143
|
+
config.server.env,
|
|
144
|
+
tool_call_timeout=config.tool_call_timeout,
|
|
145
|
+
auth_flow_timeout=config.auth_flow_timeout,
|
|
146
|
+
reconnect_enabled=config.reconnect_enabled,
|
|
147
|
+
reconnect_max_attempts=config.reconnect_max_attempts,
|
|
148
|
+
reconnect_initial_backoff=config.reconnect_initial_backoff,
|
|
149
|
+
reconnect_max_backoff=config.reconnect_max_backoff,
|
|
150
|
+
)
|
|
151
|
+
elif config.server.transport == "sse":
|
|
152
|
+
client = MCPSSEClient(
|
|
153
|
+
str(config.server.url),
|
|
154
|
+
tool_call_timeout=config.tool_call_timeout,
|
|
155
|
+
auth_flow_timeout=config.auth_flow_timeout,
|
|
156
|
+
reconnect_enabled=config.reconnect_enabled,
|
|
157
|
+
reconnect_max_attempts=config.reconnect_max_attempts,
|
|
158
|
+
reconnect_initial_backoff=config.reconnect_initial_backoff,
|
|
159
|
+
reconnect_max_backoff=config.reconnect_max_backoff,
|
|
160
|
+
)
|
|
161
|
+
elif config.server.transport == "streamable-http":
|
|
162
|
+
# Use default_user_id for the base client
|
|
163
|
+
base_user_id = auth_provider.config.default_user_id if auth_provider else None
|
|
164
|
+
client = DataRobotMCPStreamableHTTPClient(
|
|
165
|
+
str(config.server.url),
|
|
166
|
+
auth_provider=auth_provider,
|
|
167
|
+
user_id=base_user_id,
|
|
168
|
+
tool_call_timeout=config.tool_call_timeout,
|
|
169
|
+
auth_flow_timeout=config.auth_flow_timeout,
|
|
170
|
+
reconnect_enabled=config.reconnect_enabled,
|
|
171
|
+
reconnect_max_attempts=config.reconnect_max_attempts,
|
|
172
|
+
reconnect_initial_backoff=config.reconnect_initial_backoff,
|
|
173
|
+
reconnect_max_backoff=config.reconnect_max_backoff,
|
|
174
|
+
)
|
|
175
|
+
else:
|
|
176
|
+
raise ValueError(f"Unsupported transport: {config.server.transport}")
|
|
177
|
+
|
|
178
|
+
logger.info("Configured to use MCP server at %s", client.server_name)
|
|
179
|
+
|
|
180
|
+
# Create the MCP function group
|
|
181
|
+
group = MCPFunctionGroup(config=config)
|
|
182
|
+
|
|
183
|
+
# Store shared components for session client creation
|
|
184
|
+
group._shared_auth_provider = auth_provider
|
|
185
|
+
group._client_config = config
|
|
186
|
+
|
|
187
|
+
async with client:
|
|
188
|
+
# Expose the live MCP client on the function group instance so other components
|
|
189
|
+
# (e.g., HTTP endpoints) can reuse the already-established session instead of creating a
|
|
190
|
+
# new client per request.
|
|
191
|
+
group.mcp_client = client
|
|
192
|
+
group.mcp_client_server_name = client.server_name
|
|
193
|
+
group.mcp_client_transport = client.transport
|
|
194
|
+
|
|
195
|
+
all_tools = await client.get_tools()
|
|
196
|
+
tool_overrides = mcp_apply_tool_alias_and_description(all_tools, config.tool_overrides)
|
|
197
|
+
|
|
198
|
+
# Add each tool as a function to the group
|
|
199
|
+
for tool_name, tool in all_tools.items():
|
|
200
|
+
# Get override if it exists
|
|
201
|
+
override = tool_overrides.get(tool_name)
|
|
202
|
+
|
|
203
|
+
# Use override values or defaults
|
|
204
|
+
function_name = override.alias if override and override.alias else tool_name
|
|
205
|
+
description = (
|
|
206
|
+
override.description if override and override.description else tool.description
|
|
207
|
+
)
|
|
208
|
+
|
|
209
|
+
# Create the tool function according to configuration
|
|
210
|
+
tool_fn = mcp_session_tool_function(tool, group)
|
|
211
|
+
|
|
212
|
+
# Normalize optional typing for linter/type-checker compatibility
|
|
213
|
+
single_fn = tool_fn.single_fn
|
|
214
|
+
if single_fn is None:
|
|
215
|
+
# Should not happen because FunctionInfo always sets a single_fn
|
|
216
|
+
logger.warning("Skipping tool %s because single_fn is None", function_name)
|
|
217
|
+
continue
|
|
218
|
+
|
|
219
|
+
input_schema = tool_fn.input_schema
|
|
220
|
+
# Convert NoneType sentinel to None for FunctionGroup.add_function signature
|
|
221
|
+
if input_schema is type(None): # noqa: E721
|
|
222
|
+
input_schema = None
|
|
223
|
+
|
|
224
|
+
# Add to group
|
|
225
|
+
logger.info("Adding tool %s to group", function_name)
|
|
226
|
+
group.add_function(
|
|
227
|
+
name=function_name,
|
|
228
|
+
description=description,
|
|
229
|
+
fn=single_fn,
|
|
230
|
+
input_schema=input_schema,
|
|
231
|
+
converters=tool_fn.converters,
|
|
232
|
+
)
|
|
233
|
+
|
|
234
|
+
yield group
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: datarobot-genai
|
|
3
|
-
Version: 0.2.
|
|
3
|
+
Version: 0.2.13
|
|
4
4
|
Summary: Generic helpers for GenAI
|
|
5
5
|
Project-URL: Homepage, https://github.com/datarobot-oss/datarobot-genai
|
|
6
6
|
Author: DataRobot, Inc.
|
|
@@ -19,11 +19,14 @@ Requires-Dist: opentelemetry-instrumentation-openai<1.0.0,>=0.40.5
|
|
|
19
19
|
Requires-Dist: opentelemetry-instrumentation-requests<1.0.0,>=0.43b0
|
|
20
20
|
Requires-Dist: opentelemetry-instrumentation-threading<1.0.0,>=0.43b0
|
|
21
21
|
Requires-Dist: pandas<3.0.0,>=2.2.3
|
|
22
|
+
Requires-Dist: pyarrow==20.0.0
|
|
22
23
|
Requires-Dist: pyjwt<3.0.0,>=2.10.1
|
|
23
24
|
Requires-Dist: pypdf<7.0.0,>=6.1.3
|
|
24
25
|
Requires-Dist: ragas<0.4.0,>=0.3.8
|
|
25
26
|
Requires-Dist: requests<3.0.0,>=2.32.4
|
|
26
27
|
Provides-Extra: crewai
|
|
28
|
+
Requires-Dist: anthropic<1.0.0,~=0.71.0; extra == 'crewai'
|
|
29
|
+
Requires-Dist: azure-ai-inference<2.0.0,>=1.0.0b9; extra == 'crewai'
|
|
27
30
|
Requires-Dist: crewai-tools[mcp]<0.77.0,>=0.69.0; extra == 'crewai'
|
|
28
31
|
Requires-Dist: crewai>=1.1.0; extra == 'crewai'
|
|
29
32
|
Requires-Dist: opentelemetry-instrumentation-crewai<1.0.0,>=0.40.5; extra == 'crewai'
|
|
@@ -58,9 +61,11 @@ Requires-Dist: llama-index<0.14.0,>=0.13.6; extra == 'llamaindex'
|
|
|
58
61
|
Requires-Dist: opentelemetry-instrumentation-llamaindex<1.0.0,>=0.40.5; extra == 'llamaindex'
|
|
59
62
|
Requires-Dist: pypdf<7.0.0,>=6.0.0; extra == 'llamaindex'
|
|
60
63
|
Provides-Extra: nat
|
|
64
|
+
Requires-Dist: anyio==4.11.0; extra == 'nat'
|
|
61
65
|
Requires-Dist: crewai>=1.1.0; (python_version >= '3.11') and extra == 'nat'
|
|
62
66
|
Requires-Dist: llama-index-llms-litellm<0.7.0,>=0.4.1; extra == 'nat'
|
|
63
67
|
Requires-Dist: nvidia-nat-langchain==1.3.0; (python_version >= '3.11') and extra == 'nat'
|
|
68
|
+
Requires-Dist: nvidia-nat-mcp==1.3.0; (python_version >= '3.11') and extra == 'nat'
|
|
64
69
|
Requires-Dist: nvidia-nat-opentelemetry==1.3.0; (python_version >= '3.11') and extra == 'nat'
|
|
65
70
|
Requires-Dist: nvidia-nat==1.3.0; (python_version >= '3.11') and extra == 'nat'
|
|
66
71
|
Requires-Dist: opentelemetry-instrumentation-crewai<1.0.0,>=0.40.5; extra == 'nat'
|
|
@@ -27,11 +27,11 @@ datarobot_genai/drmcp/server.py,sha256=KE4kjS5f9bfdYftG14HBHrfvxDfCD4pwCXePfvl1O
|
|
|
27
27
|
datarobot_genai/drmcp/core/__init__.py,sha256=y4yapzp3KnFMzSR6HlNDS4uSuyNT7I1iPBvaCLsS0sU,577
|
|
28
28
|
datarobot_genai/drmcp/core/auth.py,sha256=E-5wrGbBFEBlD5377g6Exddrc7HsazamwX8tWr2RLXY,5815
|
|
29
29
|
datarobot_genai/drmcp/core/clients.py,sha256=y-yG8617LbmiZ_L7FWfMrk4WjIekyr76u_Q80aLqGpI,5524
|
|
30
|
-
datarobot_genai/drmcp/core/config.py,sha256=
|
|
30
|
+
datarobot_genai/drmcp/core/config.py,sha256=0Y0OjbLq-buP66U9tiXMyqrX9wWIn557vKvkBvjM_cM,11797
|
|
31
31
|
datarobot_genai/drmcp/core/config_utils.py,sha256=U-aieWw7MyP03cGDFIp97JH99ZUfr3vD9uuTzBzxn7w,6428
|
|
32
32
|
datarobot_genai/drmcp/core/constants.py,sha256=lUwoW_PTrbaBGqRJifKqCn3EoFacoEgdO-CpoFVrUoU,739
|
|
33
33
|
datarobot_genai/drmcp/core/credentials.py,sha256=PYEUDNMVw1BoMzZKLkPVTypNkVevEPtmk3scKnE-zYg,6706
|
|
34
|
-
datarobot_genai/drmcp/core/dr_mcp_server.py,sha256=
|
|
34
|
+
datarobot_genai/drmcp/core/dr_mcp_server.py,sha256=yKaIe7Qq23Zgny7Q1dc48iEcpfM8z2Ne6iouGYL58AE,14392
|
|
35
35
|
datarobot_genai/drmcp/core/dr_mcp_server_logo.py,sha256=hib-nfR1SNTW6CnpFsFCkL9H_OMwa4YYyinV7VNOuLk,4708
|
|
36
36
|
datarobot_genai/drmcp/core/exceptions.py,sha256=eqsGI-lxybgvWL5w4BFhbm3XzH1eU5tetwjnhJxelpc,905
|
|
37
37
|
datarobot_genai/drmcp/core/logging.py,sha256=Y_hig4eBWiXGaVV7B_3wBcaYVRNH4ydptbEQhrP9-mY,3414
|
|
@@ -41,6 +41,7 @@ datarobot_genai/drmcp/core/routes.py,sha256=dqE2M0UzAyyN9vQjlyTjYW4rpju3LT039po5
|
|
|
41
41
|
datarobot_genai/drmcp/core/routes_utils.py,sha256=vSseXWlplMSnRgoJgtP_rHxWSAVYcx_tpTv4lyTpQoc,944
|
|
42
42
|
datarobot_genai/drmcp/core/server_life_cycle.py,sha256=WKGJWGxalvqxupzJ2y67Kklc_9PgpZT0uyjlv_sr5wc,3419
|
|
43
43
|
datarobot_genai/drmcp/core/telemetry.py,sha256=NEkSTC1w6uQgtukLHI-sWvR4EMgInysgATcvfQ5CplM,15378
|
|
44
|
+
datarobot_genai/drmcp/core/tool_config.py,sha256=5OkC3e-vekZtdqg-DbwcyadGSrDxmZqSDey2YyGVn1M,2978
|
|
44
45
|
datarobot_genai/drmcp/core/tool_filter.py,sha256=tLOcG50QBvS48cOVHM6OqoODYiiS6KeM_F-2diaHkW0,2858
|
|
45
46
|
datarobot_genai/drmcp/core/utils.py,sha256=dSjrayWVcnC5GxQcvOIOSHaoEymPIVtG_s2ZBMlmSOw,4336
|
|
46
47
|
datarobot_genai/drmcp/core/dynamic_prompts/__init__.py,sha256=y4yapzp3KnFMzSR6HlNDS4uSuyNT7I1iPBvaCLsS0sU,577
|
|
@@ -69,17 +70,26 @@ datarobot_genai/drmcp/test_utils/__init__.py,sha256=y4yapzp3KnFMzSR6HlNDS4uSuyNT
|
|
|
69
70
|
datarobot_genai/drmcp/test_utils/integration_mcp_server.py,sha256=MdoR7r3m9uT7crodyhY69yhkrM7Thpe__BBD9lB_2oA,3328
|
|
70
71
|
datarobot_genai/drmcp/test_utils/mcp_utils_ete.py,sha256=rgZkPF26YCHX2FGppWE4v22l_NQ3kLSPSUimO0tD4nM,4402
|
|
71
72
|
datarobot_genai/drmcp/test_utils/mcp_utils_integration.py,sha256=0sU29Khal0CelnHBDInyTRiuPKrFFbTbIomOoUbyMhs,3271
|
|
72
|
-
datarobot_genai/drmcp/test_utils/openai_llm_mcp_client.py,sha256=
|
|
73
|
+
datarobot_genai/drmcp/test_utils/openai_llm_mcp_client.py,sha256=TvTkDBcHscLDmqge9NhHxVo1ABtb0n4NmmG2318mQHU,9088
|
|
73
74
|
datarobot_genai/drmcp/test_utils/tool_base_ete.py,sha256=-mKHBkGkyOKQCVS2LHFhSnRofIqJBbeAPRkwizBDtTg,6104
|
|
74
75
|
datarobot_genai/drmcp/test_utils/utils.py,sha256=esGKFv8aO31-Qg3owayeWp32BYe1CdYOEutjjdbweCw,3048
|
|
75
76
|
datarobot_genai/drmcp/tools/__init__.py,sha256=0kq9vMkF7EBsS6lkEdiLibmUrghTQqosHbZ5k-V9a5g,578
|
|
77
|
+
datarobot_genai/drmcp/tools/clients/__init__.py,sha256=0kq9vMkF7EBsS6lkEdiLibmUrghTQqosHbZ5k-V9a5g,578
|
|
78
|
+
datarobot_genai/drmcp/tools/clients/atlassian.py,sha256=__M_uz7FrcbKCYRzeMn24DCEYD6OmFx_LuywHCxgXsA,6472
|
|
79
|
+
datarobot_genai/drmcp/tools/clients/confluence.py,sha256=gbVxeBe7RDEEQt5UMGGW6GoAXsYLhL009dOejYIaIiQ,6325
|
|
80
|
+
datarobot_genai/drmcp/tools/clients/jira.py,sha256=aSDmw07SqpoE5fMQchb_y3Ggn4WcTUZU_1M8TwvZ3-E,6498
|
|
81
|
+
datarobot_genai/drmcp/tools/clients/s3.py,sha256=GmwzvurFdNfvxOooA8g5S4osRysHYU0S9ypg_177Glg,953
|
|
82
|
+
datarobot_genai/drmcp/tools/confluence/__init__.py,sha256=0kq9vMkF7EBsS6lkEdiLibmUrghTQqosHbZ5k-V9a5g,578
|
|
83
|
+
datarobot_genai/drmcp/tools/confluence/tools.py,sha256=t5OqXIhUm6y9bAWymyqwEMElwTxGw1xRnkW2MgJrNF8,3106
|
|
84
|
+
datarobot_genai/drmcp/tools/jira/__init__.py,sha256=0kq9vMkF7EBsS6lkEdiLibmUrghTQqosHbZ5k-V9a5g,578
|
|
85
|
+
datarobot_genai/drmcp/tools/jira/tools.py,sha256=LBJkK9yjgRNZJHaqgJ3bknNnvLKpr2RLLtQYAs-O-oA,4034
|
|
76
86
|
datarobot_genai/drmcp/tools/predictive/__init__.py,sha256=WuOHlNNEpEmcF7gVnhckruJRKU2qtmJLE3E7zoCGLDo,1030
|
|
77
87
|
datarobot_genai/drmcp/tools/predictive/data.py,sha256=k4EJxJrl8DYVGVfJ0DM4YTfnZlC_K3OUHZ0eRUzfluI,3165
|
|
78
88
|
datarobot_genai/drmcp/tools/predictive/deployment.py,sha256=lm02Ayuo11L1hP41fgi3QpR1Eyty-Wc16rM0c8SgliM,3277
|
|
79
89
|
datarobot_genai/drmcp/tools/predictive/deployment_info.py,sha256=BGEF_dmbxOBJR0n1Tt9TO2-iNTQSBTr-oQUyaxLZ0ZI,15297
|
|
80
90
|
datarobot_genai/drmcp/tools/predictive/model.py,sha256=Yih5-KedJ-1yupPLXCJsCXOdyWWi9pRvgapXDlgXWJA,4891
|
|
81
|
-
datarobot_genai/drmcp/tools/predictive/predict.py,sha256=
|
|
82
|
-
datarobot_genai/drmcp/tools/predictive/predict_realtime.py,sha256=
|
|
91
|
+
datarobot_genai/drmcp/tools/predictive/predict.py,sha256=Qoob2_t2crfWtyPzkXMRz2ITZumnczU6Dq4C7q9RBMI,9370
|
|
92
|
+
datarobot_genai/drmcp/tools/predictive/predict_realtime.py,sha256=urq6rPyZFsAP-bPyclSNzrkvb6FTamdlFau8q0IWWJ0,13472
|
|
83
93
|
datarobot_genai/drmcp/tools/predictive/project.py,sha256=KaMDAvJY4s12j_4ybA7-KcCS1yMOj-KPIKNBgCSE2iM,2536
|
|
84
94
|
datarobot_genai/drmcp/tools/predictive/training.py,sha256=kxeDVLqUh9ajDk8wK7CZRRydDK8UNuTVZCB3huUihF8,23660
|
|
85
95
|
datarobot_genai/langgraph/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
@@ -90,12 +100,14 @@ datarobot_genai/llama_index/agent.py,sha256=V6ZsD9GcBDJS-RJo1tJtIHhyW69_78gM6_fO
|
|
|
90
100
|
datarobot_genai/llama_index/base.py,sha256=ovcQQtC-djD_hcLrWdn93jg23AmD6NBEj7xtw4a6K6c,14481
|
|
91
101
|
datarobot_genai/llama_index/mcp.py,sha256=leXqF1C4zhuYEKFwNEfZHY4dsUuGZk3W7KArY-zxVL8,2645
|
|
92
102
|
datarobot_genai/nat/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
93
|
-
datarobot_genai/nat/agent.py,sha256=
|
|
94
|
-
datarobot_genai/nat/
|
|
103
|
+
datarobot_genai/nat/agent.py,sha256=jDeIS9f-8vGbeLy5gQkSjeuHINx5Fh_4BvXYERsgIIk,10516
|
|
104
|
+
datarobot_genai/nat/datarobot_auth_provider.py,sha256=Z4NSsrHxK8hUeiqtK_lryHsUuZC74ziNo_FHbsZgtiM,4230
|
|
105
|
+
datarobot_genai/nat/datarobot_llm_clients.py,sha256=Yu208Ed_p_4P3HdpuM7fYnKcXtimORHpKlWVPyijpU8,11356
|
|
95
106
|
datarobot_genai/nat/datarobot_llm_providers.py,sha256=aDoQcTeGI-odqydPXEX9OGGNFbzAtpqzTvHHEkmJuEQ,4963
|
|
96
|
-
datarobot_genai
|
|
97
|
-
datarobot_genai-0.2.
|
|
98
|
-
datarobot_genai-0.2.
|
|
99
|
-
datarobot_genai-0.2.
|
|
100
|
-
datarobot_genai-0.2.
|
|
101
|
-
datarobot_genai-0.2.
|
|
107
|
+
datarobot_genai/nat/datarobot_mcp_client.py,sha256=35FzilxNp4VqwBYI0NsOc91-xZm1C-AzWqrOdDy962A,9612
|
|
108
|
+
datarobot_genai-0.2.13.dist-info/METADATA,sha256=RJZ6ozRm3L6oreEu4D9gGKZLzlf3xoC7tZ3RrppBc_U,6301
|
|
109
|
+
datarobot_genai-0.2.13.dist-info/WHEEL,sha256=WLgqFyCfm_KASv4WHyYy0P3pM_m7J5L9k2skdKLirC8,87
|
|
110
|
+
datarobot_genai-0.2.13.dist-info/entry_points.txt,sha256=jEW3WxDZ8XIK9-ISmTyt5DbmBb047rFlzQuhY09rGrM,284
|
|
111
|
+
datarobot_genai-0.2.13.dist-info/licenses/AUTHORS,sha256=isJGUXdjq1U7XZ_B_9AH8Qf0u4eX0XyQifJZ_Sxm4sA,80
|
|
112
|
+
datarobot_genai-0.2.13.dist-info/licenses/LICENSE,sha256=U2_VkLIktQoa60Nf6Tbt7E4RMlfhFSjWjcJJfVC-YCE,11341
|
|
113
|
+
datarobot_genai-0.2.13.dist-info/RECORD,,
|
|
@@ -1,3 +1,5 @@
|
|
|
1
1
|
[nat.plugins]
|
|
2
|
+
datarobot_auth_provider = datarobot_genai.nat.datarobot_auth_provider
|
|
2
3
|
datarobot_llm_clients = datarobot_genai.nat.datarobot_llm_clients
|
|
3
4
|
datarobot_llm_providers = datarobot_genai.nat.datarobot_llm_providers
|
|
5
|
+
datarobot_mcp_client = datarobot_genai.nat.datarobot_mcp_client
|
|
File without changes
|
|
File without changes
|
|
File without changes
|