datarobot-genai 0.2.37__py3-none-any.whl → 0.3.1__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/core/agents/__init__.py +1 -1
- datarobot_genai/core/agents/base.py +5 -2
- datarobot_genai/core/chat/responses.py +6 -1
- datarobot_genai/core/utils/auth.py +188 -31
- datarobot_genai/crewai/__init__.py +1 -4
- datarobot_genai/crewai/agent.py +150 -17
- datarobot_genai/crewai/events.py +11 -4
- datarobot_genai/drmcp/__init__.py +4 -2
- datarobot_genai/drmcp/core/config.py +21 -1
- datarobot_genai/drmcp/core/mcp_instance.py +5 -49
- datarobot_genai/drmcp/core/routes.py +108 -13
- datarobot_genai/drmcp/core/tool_config.py +16 -0
- datarobot_genai/drmcp/core/utils.py +110 -0
- datarobot_genai/drmcp/test_utils/tool_base_ete.py +41 -26
- datarobot_genai/drmcp/tools/clients/gdrive.py +2 -0
- datarobot_genai/drmcp/tools/clients/microsoft_graph.py +141 -0
- datarobot_genai/drmcp/tools/clients/perplexity.py +173 -0
- datarobot_genai/drmcp/tools/clients/tavily.py +199 -0
- datarobot_genai/drmcp/tools/confluence/tools.py +43 -94
- datarobot_genai/drmcp/tools/gdrive/tools.py +44 -133
- datarobot_genai/drmcp/tools/jira/tools.py +19 -41
- datarobot_genai/drmcp/tools/microsoft_graph/tools.py +201 -32
- datarobot_genai/drmcp/tools/perplexity/__init__.py +0 -0
- datarobot_genai/drmcp/tools/perplexity/tools.py +117 -0
- datarobot_genai/drmcp/tools/predictive/data.py +1 -9
- datarobot_genai/drmcp/tools/predictive/deployment.py +0 -8
- datarobot_genai/drmcp/tools/predictive/deployment_info.py +91 -117
- datarobot_genai/drmcp/tools/predictive/model.py +0 -21
- datarobot_genai/drmcp/tools/predictive/predict_realtime.py +3 -0
- datarobot_genai/drmcp/tools/predictive/project.py +3 -19
- datarobot_genai/drmcp/tools/predictive/training.py +1 -19
- datarobot_genai/drmcp/tools/tavily/__init__.py +13 -0
- datarobot_genai/drmcp/tools/tavily/tools.py +141 -0
- datarobot_genai/langgraph/agent.py +10 -2
- datarobot_genai/llama_index/__init__.py +1 -1
- datarobot_genai/llama_index/agent.py +284 -5
- datarobot_genai/nat/agent.py +17 -6
- {datarobot_genai-0.2.37.dist-info → datarobot_genai-0.3.1.dist-info}/METADATA +3 -1
- {datarobot_genai-0.2.37.dist-info → datarobot_genai-0.3.1.dist-info}/RECORD +43 -40
- datarobot_genai/crewai/base.py +0 -159
- datarobot_genai/drmcp/core/tool_filter.py +0 -117
- datarobot_genai/llama_index/base.py +0 -299
- {datarobot_genai-0.2.37.dist-info → datarobot_genai-0.3.1.dist-info}/WHEEL +0 -0
- {datarobot_genai-0.2.37.dist-info → datarobot_genai-0.3.1.dist-info}/entry_points.txt +0 -0
- {datarobot_genai-0.2.37.dist-info → datarobot_genai-0.3.1.dist-info}/licenses/AUTHORS +0 -0
- {datarobot_genai-0.2.37.dist-info → datarobot_genai-0.3.1.dist-info}/licenses/LICENSE +0 -0
|
@@ -3,31 +3,30 @@ datarobot_genai/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
|
3
3
|
datarobot_genai/core/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
4
4
|
datarobot_genai/core/custom_model.py,sha256=9rSJhKZ1Fo8BpVVLnRMUj3QV2AYUr5ADHEs0aW6s2tY,5813
|
|
5
5
|
datarobot_genai/core/telemetry_agent.py,sha256=CxvoyResG3jXQ7ucU26NXCzWjWQyua-5qSYvVxpZJQg,5343
|
|
6
|
-
datarobot_genai/core/agents/__init__.py,sha256=
|
|
7
|
-
datarobot_genai/core/agents/base.py,sha256=
|
|
6
|
+
datarobot_genai/core/agents/__init__.py,sha256=hjsJ5BEqbMugkVR1oQxVUMm3AgnP74XAwQA3KkArgcs,1531
|
|
7
|
+
datarobot_genai/core/agents/base.py,sha256=I4mS3LShG8g5n9UVL_hs-Q03BCeFYnV4u3ihKnciYwM,6796
|
|
8
8
|
datarobot_genai/core/chat/__init__.py,sha256=kAxp4Dc-6HIM_cdBl-3IxwzJQr13UYYQ2Zc-hMwz2F8,638
|
|
9
9
|
datarobot_genai/core/chat/auth.py,sha256=6qITKTHFtESsBc2NsA6cvJf78pPUrcA5XV3Vxlhb5us,5457
|
|
10
10
|
datarobot_genai/core/chat/client.py,sha256=fk8MebXa8_R33VK0_DrXCS0Fgw3wFvPEvsuubC27c3s,6639
|
|
11
|
-
datarobot_genai/core/chat/responses.py,sha256=
|
|
11
|
+
datarobot_genai/core/chat/responses.py,sha256=4t3wHqaFpTbUud3lBpw833jX5O8DJm_oZ5n5AucuLZQ,10675
|
|
12
12
|
datarobot_genai/core/cli/__init__.py,sha256=B93Yb6VavoZpatrh8ltCL6YglIfR5FHgytXbO9UuxBw,733
|
|
13
13
|
datarobot_genai/core/cli/agent_environment.py,sha256=BJzQoiDvZF5gW4mFE71U0yeg-l72C--kxiE-fv6W194,1662
|
|
14
14
|
datarobot_genai/core/cli/agent_kernel.py,sha256=Pan1l4tFwQBiJCK0u5jjJmxsyADVcicmiCdt5vVm6CI,7873
|
|
15
15
|
datarobot_genai/core/mcp/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
16
16
|
datarobot_genai/core/mcp/common.py,sha256=Y8SjuquUODKEfI7T9X-QuTMKdIlpCWFI1b3xs6tmHFA,7812
|
|
17
17
|
datarobot_genai/core/utils/__init__.py,sha256=VxtRUz6iwb04eFQQy0zqTNXLAkYpPXcJxVoKV0nOdXk,59
|
|
18
|
-
datarobot_genai/core/utils/auth.py,sha256=
|
|
18
|
+
datarobot_genai/core/utils/auth.py,sha256=2fRKGseIwtmztB8FO8MtX4K9uMq2bLiq7w46c3z27-A,14290
|
|
19
19
|
datarobot_genai/core/utils/urls.py,sha256=tk0t13duDEPcmwz2OnS4vwEdatruiuX8lnxMMhSaJik,2289
|
|
20
|
-
datarobot_genai/crewai/__init__.py,sha256=
|
|
21
|
-
datarobot_genai/crewai/agent.py,sha256=
|
|
22
|
-
datarobot_genai/crewai/
|
|
23
|
-
datarobot_genai/crewai/events.py,sha256=K67bO1zwPrxmppz2wh8dFGNbVebyWGXAMD7oodFE2sQ,5462
|
|
20
|
+
datarobot_genai/crewai/__init__.py,sha256=1o03TystuH6djv_KmHCYCymTypF5EuJ-bDF3KelGQFU,589
|
|
21
|
+
datarobot_genai/crewai/agent.py,sha256=GMHPOPJ4j56ahZ2nD-Ohb8gYtlc6LFcnkwbmU7CHLZY,6910
|
|
22
|
+
datarobot_genai/crewai/events.py,sha256=KCWhHLYaUFwIcARdLeHGhjMMjmJPCOs6KSBwvsT8fDw,5745
|
|
24
23
|
datarobot_genai/crewai/mcp.py,sha256=AJTrs-8KdiRSjRECfBT1lJOsszWMoFoN9NIa1p5_wsM,2115
|
|
25
|
-
datarobot_genai/drmcp/__init__.py,sha256=
|
|
24
|
+
datarobot_genai/drmcp/__init__.py,sha256=HPP4wkZSD1c5D_bnjnB5xkqbo-zYfeGmtnZbPgOMb0k,3092
|
|
26
25
|
datarobot_genai/drmcp/server.py,sha256=KE4kjS5f9bfdYftG14HBHrfvxDfCD4pwCXePfvl1OvU,724
|
|
27
26
|
datarobot_genai/drmcp/core/__init__.py,sha256=y4yapzp3KnFMzSR6HlNDS4uSuyNT7I1iPBvaCLsS0sU,577
|
|
28
27
|
datarobot_genai/drmcp/core/auth.py,sha256=E-5wrGbBFEBlD5377g6Exddrc7HsazamwX8tWr2RLXY,5815
|
|
29
28
|
datarobot_genai/drmcp/core/clients.py,sha256=y-yG8617LbmiZ_L7FWfMrk4WjIekyr76u_Q80aLqGpI,5524
|
|
30
|
-
datarobot_genai/drmcp/core/config.py,sha256=
|
|
29
|
+
datarobot_genai/drmcp/core/config.py,sha256=yuTMs1x6yDAlwBugM3FrPh9YieomtfGfVNgRFloEQa4,14442
|
|
31
30
|
datarobot_genai/drmcp/core/config_utils.py,sha256=U-aieWw7MyP03cGDFIp97JH99ZUfr3vD9uuTzBzxn7w,6428
|
|
32
31
|
datarobot_genai/drmcp/core/constants.py,sha256=lUwoW_PTrbaBGqRJifKqCn3EoFacoEgdO-CpoFVrUoU,739
|
|
33
32
|
datarobot_genai/drmcp/core/credentials.py,sha256=PYEUDNMVw1BoMzZKLkPVTypNkVevEPtmk3scKnE-zYg,6706
|
|
@@ -35,14 +34,13 @@ datarobot_genai/drmcp/core/dr_mcp_server.py,sha256=czcjbwhZAeW9EtG_Bys0GARPOuQul
|
|
|
35
34
|
datarobot_genai/drmcp/core/dr_mcp_server_logo.py,sha256=hib-nfR1SNTW6CnpFsFCkL9H_OMwa4YYyinV7VNOuLk,4708
|
|
36
35
|
datarobot_genai/drmcp/core/exceptions.py,sha256=9zoNh5ph6QihWIYuw37ljZ73_iUfy38YVYyFSnEwivc,839
|
|
37
36
|
datarobot_genai/drmcp/core/logging.py,sha256=rnUkws0vIDy_uLevwNj-wgA9uijW1Go774JPCrG0Yfw,3423
|
|
38
|
-
datarobot_genai/drmcp/core/mcp_instance.py,sha256=
|
|
39
|
-
datarobot_genai/drmcp/core/routes.py,sha256=
|
|
37
|
+
datarobot_genai/drmcp/core/mcp_instance.py,sha256=uzpHDpOIBIPox4P3MVReKc5caRBlNRRhdU9H0oskrY0,16925
|
|
38
|
+
datarobot_genai/drmcp/core/routes.py,sha256=pSv8FxGlQdZ2p3u8L90yZ7XigX11r_s_P8U9nm8uvQY,21701
|
|
40
39
|
datarobot_genai/drmcp/core/routes_utils.py,sha256=vSseXWlplMSnRgoJgtP_rHxWSAVYcx_tpTv4lyTpQoc,944
|
|
41
40
|
datarobot_genai/drmcp/core/server_life_cycle.py,sha256=WKGJWGxalvqxupzJ2y67Kklc_9PgpZT0uyjlv_sr5wc,3419
|
|
42
41
|
datarobot_genai/drmcp/core/telemetry.py,sha256=NEkSTC1w6uQgtukLHI-sWvR4EMgInysgATcvfQ5CplM,15378
|
|
43
|
-
datarobot_genai/drmcp/core/tool_config.py,sha256=
|
|
44
|
-
datarobot_genai/drmcp/core/
|
|
45
|
-
datarobot_genai/drmcp/core/utils.py,sha256=EvfpqKZ3tECMoxpIQ_tA_3rOgy6KJEYKC0lWZo_Daag,4517
|
|
42
|
+
datarobot_genai/drmcp/core/tool_config.py,sha256=19lhmrAUka1urvMw-TIucSnfWh5n589SYikacUMIxjs,4235
|
|
43
|
+
datarobot_genai/drmcp/core/utils.py,sha256=4h4UoJZbnzZHg3GcjbdiSVHTlWgnR1vs1DOJg-2cKxg,7448
|
|
46
44
|
datarobot_genai/drmcp/core/dynamic_prompts/__init__.py,sha256=y4yapzp3KnFMzSR6HlNDS4uSuyNT7I1iPBvaCLsS0sU,577
|
|
47
45
|
datarobot_genai/drmcp/core/dynamic_prompts/controllers.py,sha256=AGJlKqgHRO0Kd7Gl-Ulw9KYBgzjTTFXWBvOUF-SuKUI,5454
|
|
48
46
|
datarobot_genai/drmcp/core/dynamic_prompts/dr_lib.py,sha256=4j33AKmq7kQX_EE2_RWAbP8-K5KPVEvpUginTWn_MHs,2701
|
|
@@ -71,7 +69,7 @@ datarobot_genai/drmcp/test_utils/integration_mcp_server.py,sha256=YSk19tbaka_0zi
|
|
|
71
69
|
datarobot_genai/drmcp/test_utils/mcp_utils_ete.py,sha256=mM52xKB-1fy_o3g6k4fNtFU2L_0jEi6GY-czdR3R5HE,5491
|
|
72
70
|
datarobot_genai/drmcp/test_utils/mcp_utils_integration.py,sha256=sHA_BWtpgIAFp9IXiNkUeBartBMjLAauqkV9bYtCr-g,3874
|
|
73
71
|
datarobot_genai/drmcp/test_utils/test_interactive.py,sha256=KAScFT65GUkOxuiiBcjli8HHvV1NusVN01nOib3xVCc,7939
|
|
74
|
-
datarobot_genai/drmcp/test_utils/tool_base_ete.py,sha256=
|
|
72
|
+
datarobot_genai/drmcp/test_utils/tool_base_ete.py,sha256=VSo47v8VIgBA4kEe1KhFLixHh_P4sR-zXcb4fhfRUP0,10066
|
|
75
73
|
datarobot_genai/drmcp/test_utils/utils.py,sha256=JF2W9J4Q8pCqro7dj_bHObHNP7dfybDXesTLFOUsIVM,3039
|
|
76
74
|
datarobot_genai/drmcp/test_utils/clients/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
77
75
|
datarobot_genai/drmcp/test_utils/clients/anthropic.py,sha256=qFhLvLZHMpZa2tZwI8pZQaaeG1lsM56VaONt6a9VU8c,2333
|
|
@@ -82,44 +80,49 @@ datarobot_genai/drmcp/tools/__init__.py,sha256=0kq9vMkF7EBsS6lkEdiLibmUrghTQqosH
|
|
|
82
80
|
datarobot_genai/drmcp/tools/clients/__init__.py,sha256=0kq9vMkF7EBsS6lkEdiLibmUrghTQqosHbZ5k-V9a5g,578
|
|
83
81
|
datarobot_genai/drmcp/tools/clients/atlassian.py,sha256=__M_uz7FrcbKCYRzeMn24DCEYD6OmFx_LuywHCxgXsA,6472
|
|
84
82
|
datarobot_genai/drmcp/tools/clients/confluence.py,sha256=h_G0By_kDnJeWDT_d-IREsaZ5-0xB5GoLXOqblYP5MA,20706
|
|
85
|
-
datarobot_genai/drmcp/tools/clients/gdrive.py,sha256=
|
|
83
|
+
datarobot_genai/drmcp/tools/clients/gdrive.py,sha256=UyY1qrggzu1GpOpWMk1oHKqYrB1bV3VAF9q4q23jE4s,33154
|
|
86
84
|
datarobot_genai/drmcp/tools/clients/jira.py,sha256=Rm91JAyrNIqxu66-9rU1YqoRXVnWbEy-Ahvy6f6HlVg,9823
|
|
87
|
-
datarobot_genai/drmcp/tools/clients/microsoft_graph.py,sha256
|
|
85
|
+
datarobot_genai/drmcp/tools/clients/microsoft_graph.py,sha256=9FWl9HfWubDbVej9PuI2W8BccjsRWSrmvaPOmjg7PVI,30143
|
|
86
|
+
datarobot_genai/drmcp/tools/clients/perplexity.py,sha256=86YvUi8zRVr4rs9iSIO1PvF_LIhYul5SbOro44DQN08,6219
|
|
88
87
|
datarobot_genai/drmcp/tools/clients/s3.py,sha256=GmwzvurFdNfvxOooA8g5S4osRysHYU0S9ypg_177Glg,953
|
|
88
|
+
datarobot_genai/drmcp/tools/clients/tavily.py,sha256=ekD552S3f9Et3xAbIo8HzI34pknlLSYa0rFswloG3jY,6717
|
|
89
89
|
datarobot_genai/drmcp/tools/confluence/__init__.py,sha256=0kq9vMkF7EBsS6lkEdiLibmUrghTQqosHbZ5k-V9a5g,578
|
|
90
|
-
datarobot_genai/drmcp/tools/confluence/tools.py,sha256=
|
|
90
|
+
datarobot_genai/drmcp/tools/confluence/tools.py,sha256=EtrlOQYiKkjdrSAfyIwH3vMEBYnKon0sTj5fokHrbDg,9912
|
|
91
91
|
datarobot_genai/drmcp/tools/gdrive/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
92
|
-
datarobot_genai/drmcp/tools/gdrive/tools.py,sha256=
|
|
92
|
+
datarobot_genai/drmcp/tools/gdrive/tools.py,sha256=d65Ukm0c9rZKnVJIJRxmGH4cetJ86Bf_wUilR-A8iok,13570
|
|
93
93
|
datarobot_genai/drmcp/tools/jira/__init__.py,sha256=0kq9vMkF7EBsS6lkEdiLibmUrghTQqosHbZ5k-V9a5g,578
|
|
94
|
-
datarobot_genai/drmcp/tools/jira/tools.py,sha256=
|
|
94
|
+
datarobot_genai/drmcp/tools/jira/tools.py,sha256=OGHwozgftXoQa50lOJvgmGNlzL_ULUEH5TT6QcdqSpQ,8334
|
|
95
95
|
datarobot_genai/drmcp/tools/microsoft_graph/__init__.py,sha256=CuOaMt1AJo7cHx_GuhO3s_aqxZas_wlDsoBorBsvbeU,577
|
|
96
|
-
datarobot_genai/drmcp/tools/microsoft_graph/tools.py,sha256=
|
|
96
|
+
datarobot_genai/drmcp/tools/microsoft_graph/tools.py,sha256=cWDEheHBS0f6UTsSuwtLle7SC-AwosuT2patDSMepVM,16413
|
|
97
|
+
datarobot_genai/drmcp/tools/perplexity/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
98
|
+
datarobot_genai/drmcp/tools/perplexity/tools.py,sha256=ZIptd6w27eIlUZB_W4EmvZ2Jf5kuePmAX_xpfqRGEXc,4923
|
|
97
99
|
datarobot_genai/drmcp/tools/predictive/__init__.py,sha256=WuOHlNNEpEmcF7gVnhckruJRKU2qtmJLE3E7zoCGLDo,1030
|
|
98
|
-
datarobot_genai/drmcp/tools/predictive/data.py,sha256
|
|
99
|
-
datarobot_genai/drmcp/tools/predictive/deployment.py,sha256=
|
|
100
|
-
datarobot_genai/drmcp/tools/predictive/deployment_info.py,sha256=
|
|
101
|
-
datarobot_genai/drmcp/tools/predictive/model.py,sha256=
|
|
100
|
+
datarobot_genai/drmcp/tools/predictive/data.py,sha256=-9zGKGiHFx5NwneHlnxZiX6BlBm2NqK7qQx8Qd2EQDE,4297
|
|
101
|
+
datarobot_genai/drmcp/tools/predictive/deployment.py,sha256=LChISG8iibqNA7uq_HV1k0ZXi-bC5CnuZc2FRJ-kyrc,3288
|
|
102
|
+
datarobot_genai/drmcp/tools/predictive/deployment_info.py,sha256=IY-xDI217RNjCbokLYMU9Lpl-k0cdrAp-Fk_dY7H_WI,13828
|
|
103
|
+
datarobot_genai/drmcp/tools/predictive/model.py,sha256=E-JGZ-kQrGfezVMNtg68sv5NACbIHDpWV45XtzHwsWA,5289
|
|
102
104
|
datarobot_genai/drmcp/tools/predictive/predict.py,sha256=Qoob2_t2crfWtyPzkXMRz2ITZumnczU6Dq4C7q9RBMI,9370
|
|
103
|
-
datarobot_genai/drmcp/tools/predictive/predict_realtime.py,sha256=
|
|
104
|
-
datarobot_genai/drmcp/tools/predictive/project.py,sha256=
|
|
105
|
-
datarobot_genai/drmcp/tools/predictive/training.py,sha256=
|
|
105
|
+
datarobot_genai/drmcp/tools/predictive/predict_realtime.py,sha256=ICuXGgSrIBTYbjXv_S6itzK3pfgRA-ug9s5XSDIkOvc,13577
|
|
106
|
+
datarobot_genai/drmcp/tools/predictive/project.py,sha256=IbdkuRehp69NogcQlnMliW9IYeBozCyFIyC9dgjw-Q0,2716
|
|
107
|
+
datarobot_genai/drmcp/tools/predictive/training.py,sha256=CzIuH_276WLsve57ERjwX_L-8HZdv5Z4qtPSVTCFM_8,24324
|
|
108
|
+
datarobot_genai/drmcp/tools/tavily/__init__.py,sha256=y4yapzp3KnFMzSR6HlNDS4uSuyNT7I1iPBvaCLsS0sU,577
|
|
109
|
+
datarobot_genai/drmcp/tools/tavily/tools.py,sha256=6jWHFuN2vSE1f4Z1GMTaMDoTs5Svzko6KLoh5CzXls4,5434
|
|
106
110
|
datarobot_genai/langgraph/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
107
|
-
datarobot_genai/langgraph/agent.py,sha256=
|
|
111
|
+
datarobot_genai/langgraph/agent.py,sha256=g8NgheUxySUPhadASDSicmaOauAOQV4X4OriN_ZaiSg,16042
|
|
108
112
|
datarobot_genai/langgraph/mcp.py,sha256=iA2_j46mZAaNaL7ntXT-LW6C-NMJkzr3VfKDDfe7mh8,2851
|
|
109
|
-
datarobot_genai/llama_index/__init__.py,sha256=
|
|
110
|
-
datarobot_genai/llama_index/agent.py,sha256=
|
|
111
|
-
datarobot_genai/llama_index/base.py,sha256=ovcQQtC-djD_hcLrWdn93jg23AmD6NBEj7xtw4a6K6c,14481
|
|
113
|
+
datarobot_genai/llama_index/__init__.py,sha256=kTmV6C_OSWFMi4vlGrKklR1fYHEUuwSMgraaMigeeBw,408
|
|
114
|
+
datarobot_genai/llama_index/agent.py,sha256=d4EgDzaoScrbN4gLkAwO2CUJLjAUeZGlzDUsJ5k-UwU,15557
|
|
112
115
|
datarobot_genai/llama_index/mcp.py,sha256=leXqF1C4zhuYEKFwNEfZHY4dsUuGZk3W7KArY-zxVL8,2645
|
|
113
116
|
datarobot_genai/nat/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
114
|
-
datarobot_genai/nat/agent.py,sha256=
|
|
117
|
+
datarobot_genai/nat/agent.py,sha256=MPgAwRgPr1R8CV1XS5JRwoDI-3kh8Ed-1zE8SdvQ9cg,11469
|
|
115
118
|
datarobot_genai/nat/datarobot_auth_provider.py,sha256=Z4NSsrHxK8hUeiqtK_lryHsUuZC74ziNo_FHbsZgtiM,4230
|
|
116
119
|
datarobot_genai/nat/datarobot_llm_clients.py,sha256=-_q_KlKOVQecIYJd8YRiYnS4ZNazQAiAdZBE1Zip_wQ,12684
|
|
117
120
|
datarobot_genai/nat/datarobot_llm_providers.py,sha256=aDoQcTeGI-odqydPXEX9OGGNFbzAtpqzTvHHEkmJuEQ,4963
|
|
118
121
|
datarobot_genai/nat/datarobot_mcp_client.py,sha256=jL8sXb8g4gvt0VYgB2tfMGsMjpB1GV2XIbN0iv_LxVU,10701
|
|
119
122
|
datarobot_genai/nat/helpers.py,sha256=Q7E3ADZdtFfS8E6OQPyw2wgA6laQ58N3bhLj5CBWwJs,3265
|
|
120
|
-
datarobot_genai-0.
|
|
121
|
-
datarobot_genai-0.
|
|
122
|
-
datarobot_genai-0.
|
|
123
|
-
datarobot_genai-0.
|
|
124
|
-
datarobot_genai-0.
|
|
125
|
-
datarobot_genai-0.
|
|
123
|
+
datarobot_genai-0.3.1.dist-info/METADATA,sha256=Ld9BgMGTyz3z_i8NUDGB7mR_0H82nCYrZ5urqMXj8kY,6419
|
|
124
|
+
datarobot_genai-0.3.1.dist-info/WHEEL,sha256=WLgqFyCfm_KASv4WHyYy0P3pM_m7J5L9k2skdKLirC8,87
|
|
125
|
+
datarobot_genai-0.3.1.dist-info/entry_points.txt,sha256=jEW3WxDZ8XIK9-ISmTyt5DbmBb047rFlzQuhY09rGrM,284
|
|
126
|
+
datarobot_genai-0.3.1.dist-info/licenses/AUTHORS,sha256=isJGUXdjq1U7XZ_B_9AH8Qf0u4eX0XyQifJZ_Sxm4sA,80
|
|
127
|
+
datarobot_genai-0.3.1.dist-info/licenses/LICENSE,sha256=U2_VkLIktQoa60Nf6Tbt7E4RMlfhFSjWjcJJfVC-YCE,11341
|
|
128
|
+
datarobot_genai-0.3.1.dist-info/RECORD,,
|
datarobot_genai/crewai/base.py
DELETED
|
@@ -1,159 +0,0 @@
|
|
|
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
|
-
"""
|
|
16
|
-
Base class for CrewAI-based agents.
|
|
17
|
-
|
|
18
|
-
Manages MCP tool lifecycle and standardizes kickoff flow.
|
|
19
|
-
|
|
20
|
-
Note: This base does not capture pipeline interactions; it returns None by
|
|
21
|
-
default. Subclasses may implement message capture if they need interactions.
|
|
22
|
-
"""
|
|
23
|
-
|
|
24
|
-
from __future__ import annotations
|
|
25
|
-
|
|
26
|
-
import abc
|
|
27
|
-
import asyncio
|
|
28
|
-
from collections.abc import AsyncGenerator
|
|
29
|
-
from typing import Any
|
|
30
|
-
|
|
31
|
-
from crewai import Crew
|
|
32
|
-
from crewai.events.event_bus import CrewAIEventsBus
|
|
33
|
-
from crewai.tools import BaseTool
|
|
34
|
-
from openai.types.chat import CompletionCreateParams
|
|
35
|
-
from ragas import MultiTurnSample
|
|
36
|
-
|
|
37
|
-
from datarobot_genai.core.agents.base import BaseAgent
|
|
38
|
-
from datarobot_genai.core.agents.base import InvokeReturn
|
|
39
|
-
from datarobot_genai.core.agents.base import UsageMetrics
|
|
40
|
-
from datarobot_genai.core.agents.base import default_usage_metrics
|
|
41
|
-
from datarobot_genai.core.agents.base import extract_user_prompt_content
|
|
42
|
-
from datarobot_genai.core.agents.base import is_streaming
|
|
43
|
-
|
|
44
|
-
from .agent import create_pipeline_interactions_from_messages
|
|
45
|
-
from .mcp import mcp_tools_context
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
class CrewAIAgent(BaseAgent[BaseTool], abc.ABC):
|
|
49
|
-
"""Abstract base agent for CrewAI workflows.
|
|
50
|
-
|
|
51
|
-
Subclasses should define the ``agents`` and ``tasks`` properties
|
|
52
|
-
and may override ``build_crewai_workflow`` to customize the workflow
|
|
53
|
-
construction.
|
|
54
|
-
"""
|
|
55
|
-
|
|
56
|
-
@property
|
|
57
|
-
@abc.abstractmethod
|
|
58
|
-
def agents(self) -> list[Any]: # CrewAI Agent list
|
|
59
|
-
raise NotImplementedError
|
|
60
|
-
|
|
61
|
-
@property
|
|
62
|
-
@abc.abstractmethod
|
|
63
|
-
def tasks(self) -> list[Any]: # CrewAI Task list
|
|
64
|
-
raise NotImplementedError
|
|
65
|
-
|
|
66
|
-
def build_crewai_workflow(self) -> Any:
|
|
67
|
-
"""Create a CrewAI workflow instance.
|
|
68
|
-
|
|
69
|
-
Default implementation constructs a Crew with provided agents and tasks.
|
|
70
|
-
Subclasses can override to customize Crew options.
|
|
71
|
-
"""
|
|
72
|
-
return Crew(agents=self.agents, tasks=self.tasks, verbose=self.verbose)
|
|
73
|
-
|
|
74
|
-
@abc.abstractmethod
|
|
75
|
-
def make_kickoff_inputs(self, user_prompt_content: str) -> dict[str, Any]:
|
|
76
|
-
"""Build the inputs dict for ``Crew.kickoff``.
|
|
77
|
-
|
|
78
|
-
Subclasses must implement this to provide the exact inputs required
|
|
79
|
-
by their CrewAI tasks.
|
|
80
|
-
"""
|
|
81
|
-
raise NotImplementedError
|
|
82
|
-
|
|
83
|
-
def _extract_pipeline_interactions(self) -> MultiTurnSample | None:
|
|
84
|
-
"""Extract pipeline interactions from event listener if available."""
|
|
85
|
-
if not hasattr(self, "event_listener"):
|
|
86
|
-
return None
|
|
87
|
-
try:
|
|
88
|
-
listener = getattr(self, "event_listener", None)
|
|
89
|
-
messages = getattr(listener, "messages", None) if listener is not None else None
|
|
90
|
-
return create_pipeline_interactions_from_messages(messages)
|
|
91
|
-
except Exception:
|
|
92
|
-
return None
|
|
93
|
-
|
|
94
|
-
def _extract_usage_metrics(self, crew_output: Any) -> UsageMetrics:
|
|
95
|
-
"""Extract usage metrics from crew output."""
|
|
96
|
-
token_usage = getattr(crew_output, "token_usage", None)
|
|
97
|
-
if token_usage is not None:
|
|
98
|
-
return {
|
|
99
|
-
"completion_tokens": int(getattr(token_usage, "completion_tokens", 0)),
|
|
100
|
-
"prompt_tokens": int(getattr(token_usage, "prompt_tokens", 0)),
|
|
101
|
-
"total_tokens": int(getattr(token_usage, "total_tokens", 0)),
|
|
102
|
-
}
|
|
103
|
-
return default_usage_metrics()
|
|
104
|
-
|
|
105
|
-
def _process_crew_output(
|
|
106
|
-
self, crew_output: Any
|
|
107
|
-
) -> tuple[str, MultiTurnSample | None, UsageMetrics]:
|
|
108
|
-
"""Process crew output into response tuple."""
|
|
109
|
-
response_text = str(crew_output.raw)
|
|
110
|
-
pipeline_interactions = self._extract_pipeline_interactions()
|
|
111
|
-
usage_metrics = self._extract_usage_metrics(crew_output)
|
|
112
|
-
return response_text, pipeline_interactions, usage_metrics
|
|
113
|
-
|
|
114
|
-
async def invoke(self, completion_create_params: CompletionCreateParams) -> InvokeReturn:
|
|
115
|
-
"""Run the CrewAI workflow with the provided completion parameters."""
|
|
116
|
-
user_prompt_content = extract_user_prompt_content(completion_create_params)
|
|
117
|
-
# Preserve prior template startup print for CLI parity
|
|
118
|
-
try:
|
|
119
|
-
print("Running agent with user prompt:", user_prompt_content, flush=True)
|
|
120
|
-
except Exception:
|
|
121
|
-
# Printing is best-effort; proceed regardless
|
|
122
|
-
pass
|
|
123
|
-
|
|
124
|
-
# Use MCP context manager to handle connection lifecycle
|
|
125
|
-
with mcp_tools_context(
|
|
126
|
-
authorization_context=self._authorization_context,
|
|
127
|
-
forwarded_headers=self.forwarded_headers,
|
|
128
|
-
) as mcp_tools:
|
|
129
|
-
# Set MCP tools for all agents if MCP is not configured this is effectively a no-op
|
|
130
|
-
self.set_mcp_tools(mcp_tools)
|
|
131
|
-
|
|
132
|
-
# If an event listener is provided by the subclass/template, register it
|
|
133
|
-
if hasattr(self, "event_listener") and CrewAIEventsBus is not None:
|
|
134
|
-
try:
|
|
135
|
-
listener = getattr(self, "event_listener")
|
|
136
|
-
setup_fn = getattr(listener, "setup_listeners", None)
|
|
137
|
-
if callable(setup_fn):
|
|
138
|
-
setup_fn(CrewAIEventsBus)
|
|
139
|
-
except Exception:
|
|
140
|
-
# Listener is optional best-effort; proceed without failing invoke
|
|
141
|
-
pass
|
|
142
|
-
|
|
143
|
-
crew = self.build_crewai_workflow()
|
|
144
|
-
|
|
145
|
-
if is_streaming(completion_create_params):
|
|
146
|
-
|
|
147
|
-
async def _gen() -> AsyncGenerator[
|
|
148
|
-
tuple[str, MultiTurnSample | None, UsageMetrics]
|
|
149
|
-
]:
|
|
150
|
-
crew_output = await asyncio.to_thread(
|
|
151
|
-
crew.kickoff,
|
|
152
|
-
inputs=self.make_kickoff_inputs(user_prompt_content),
|
|
153
|
-
)
|
|
154
|
-
yield self._process_crew_output(crew_output)
|
|
155
|
-
|
|
156
|
-
return _gen()
|
|
157
|
-
|
|
158
|
-
crew_output = crew.kickoff(inputs=self.make_kickoff_inputs(user_prompt_content))
|
|
159
|
-
return self._process_crew_output(crew_output)
|
|
@@ -1,117 +0,0 @@
|
|
|
1
|
-
# Copyright 2025 DataRobot, Inc.
|
|
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
|
-
|
|
16
|
-
from fastmcp.tools import Tool
|
|
17
|
-
from mcp.types import Tool as MCPTool
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
def filter_tools_by_tags(
|
|
21
|
-
tools: list[Tool | MCPTool],
|
|
22
|
-
tags: list[str] | None = None,
|
|
23
|
-
match_all: bool = False,
|
|
24
|
-
) -> list[Tool | MCPTool]:
|
|
25
|
-
"""
|
|
26
|
-
Filter tools by tags.
|
|
27
|
-
|
|
28
|
-
Args:
|
|
29
|
-
tools: List of tools to filter
|
|
30
|
-
tags: List of tags to filter by. If None, returns all tools
|
|
31
|
-
match_all: If True, tool must have all specified tags. If False, tool must have at least
|
|
32
|
-
one tag.
|
|
33
|
-
|
|
34
|
-
Returns
|
|
35
|
-
-------
|
|
36
|
-
List of tools that match the tag criteria
|
|
37
|
-
"""
|
|
38
|
-
if not tags:
|
|
39
|
-
return tools
|
|
40
|
-
|
|
41
|
-
filtered_tools = []
|
|
42
|
-
|
|
43
|
-
for tool in tools:
|
|
44
|
-
tool_tags = get_tool_tags(tool)
|
|
45
|
-
|
|
46
|
-
if not tool_tags:
|
|
47
|
-
continue
|
|
48
|
-
|
|
49
|
-
if match_all:
|
|
50
|
-
# Tool must have all specified tags
|
|
51
|
-
if all(tag in tool_tags for tag in tags):
|
|
52
|
-
filtered_tools.append(tool)
|
|
53
|
-
elif any(tag in tool_tags for tag in tags):
|
|
54
|
-
# Tool must have at least one specified tag
|
|
55
|
-
filtered_tools.append(tool)
|
|
56
|
-
|
|
57
|
-
return filtered_tools
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
def get_tool_tags(tool: Tool | MCPTool) -> list[str]:
|
|
61
|
-
"""
|
|
62
|
-
Get tags for a specific tool.
|
|
63
|
-
|
|
64
|
-
Args:
|
|
65
|
-
tool: The tool to get tags for
|
|
66
|
-
|
|
67
|
-
Returns
|
|
68
|
-
-------
|
|
69
|
-
List of tags for the tool
|
|
70
|
-
"""
|
|
71
|
-
# Primary: native FastMCP meta location
|
|
72
|
-
if hasattr(tool, "meta") and getattr(tool, "meta"):
|
|
73
|
-
fastmcp_meta = tool.meta.get("_fastmcp", {})
|
|
74
|
-
meta_tags = fastmcp_meta.get("tags", [])
|
|
75
|
-
if isinstance(meta_tags, list):
|
|
76
|
-
return meta_tags
|
|
77
|
-
|
|
78
|
-
# Fallback: annotations.tags (for compatibility during transition)
|
|
79
|
-
if tool.annotations and hasattr(tool.annotations, "tags"):
|
|
80
|
-
tags = getattr(tool.annotations, "tags", [])
|
|
81
|
-
return tags if isinstance(tags, list) else []
|
|
82
|
-
|
|
83
|
-
return []
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
def list_all_tags(tools: list[Tool | MCPTool]) -> list[str]:
|
|
87
|
-
"""
|
|
88
|
-
Get all unique tags from a list of tools.
|
|
89
|
-
|
|
90
|
-
Args:
|
|
91
|
-
tools: List of tools to extract tags from
|
|
92
|
-
|
|
93
|
-
Returns
|
|
94
|
-
-------
|
|
95
|
-
List of unique tags
|
|
96
|
-
"""
|
|
97
|
-
all_tags = set()
|
|
98
|
-
for tool in tools:
|
|
99
|
-
tool_tags = get_tool_tags(tool)
|
|
100
|
-
all_tags.update(tool_tags)
|
|
101
|
-
|
|
102
|
-
return sorted(list(all_tags))
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
def get_tools_by_tag(tools: list[Tool | MCPTool], tag: str) -> list[Tool | MCPTool]:
|
|
106
|
-
"""
|
|
107
|
-
Get all tools that have a specific tag.
|
|
108
|
-
|
|
109
|
-
Args:
|
|
110
|
-
tools: List of tools to search
|
|
111
|
-
tag: The tag to search for
|
|
112
|
-
|
|
113
|
-
Returns
|
|
114
|
-
-------
|
|
115
|
-
List of tools with the specified tag
|
|
116
|
-
"""
|
|
117
|
-
return filter_tools_by_tags(tools, [tag])
|