nvidia-nat 1.3.0rc4__py3-none-any.whl → 1.3.0rc5__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.
- nat/agent/base.py +3 -3
- nat/agent/reasoning_agent/reasoning_agent.py +6 -6
- nat/agent/tool_calling_agent/agent.py +6 -10
- nat/front_ends/fastapi/fastapi_front_end_plugin_worker.py +3 -0
- nat/front_ends/mcp/mcp_front_end_plugin.py +9 -6
- {nvidia_nat-1.3.0rc4.dist-info → nvidia_nat-1.3.0rc5.dist-info}/METADATA +2 -3
- {nvidia_nat-1.3.0rc4.dist-info → nvidia_nat-1.3.0rc5.dist-info}/RECORD +12 -12
- {nvidia_nat-1.3.0rc4.dist-info → nvidia_nat-1.3.0rc5.dist-info}/WHEEL +0 -0
- {nvidia_nat-1.3.0rc4.dist-info → nvidia_nat-1.3.0rc5.dist-info}/entry_points.txt +0 -0
- {nvidia_nat-1.3.0rc4.dist-info → nvidia_nat-1.3.0rc5.dist-info}/licenses/LICENSE-3rd-party.txt +0 -0
- {nvidia_nat-1.3.0rc4.dist-info → nvidia_nat-1.3.0rc5.dist-info}/licenses/LICENSE.md +0 -0
- {nvidia_nat-1.3.0rc4.dist-info → nvidia_nat-1.3.0rc5.dist-info}/top_level.txt +0 -0
nat/agent/base.py
CHANGED
|
@@ -102,11 +102,11 @@ class BaseAgent(ABC):
|
|
|
102
102
|
AIMessage
|
|
103
103
|
The LLM response
|
|
104
104
|
"""
|
|
105
|
-
output_message =
|
|
105
|
+
output_message = []
|
|
106
106
|
async for event in runnable.astream(inputs, config=config):
|
|
107
|
-
output_message
|
|
107
|
+
output_message.append(event.content)
|
|
108
108
|
|
|
109
|
-
return AIMessage(content=output_message)
|
|
109
|
+
return AIMessage(content="".join(output_message))
|
|
110
110
|
|
|
111
111
|
async def _call_llm(self, llm: Runnable, inputs: dict[str, Any], config: RunnableConfig | None = None) -> AIMessage:
|
|
112
112
|
"""
|
|
@@ -157,12 +157,12 @@ async def build_reasoning_function(config: ReasoningFunctionConfig, builder: Bui
|
|
|
157
157
|
prompt = prompt.to_string()
|
|
158
158
|
|
|
159
159
|
# Get the reasoning output from the LLM
|
|
160
|
-
reasoning_output =
|
|
160
|
+
reasoning_output = []
|
|
161
161
|
|
|
162
162
|
async for chunk in llm.astream(prompt):
|
|
163
|
-
reasoning_output
|
|
163
|
+
reasoning_output.append(chunk.content)
|
|
164
164
|
|
|
165
|
-
reasoning_output = remove_r1_think_tags(reasoning_output)
|
|
165
|
+
reasoning_output = remove_r1_think_tags("".join(reasoning_output))
|
|
166
166
|
|
|
167
167
|
output = await downstream_template.ainvoke(input={
|
|
168
168
|
"input_text": input_text, "reasoning_output": reasoning_output
|
|
@@ -200,12 +200,12 @@ async def build_reasoning_function(config: ReasoningFunctionConfig, builder: Bui
|
|
|
200
200
|
prompt = prompt.to_string()
|
|
201
201
|
|
|
202
202
|
# Get the reasoning output from the LLM
|
|
203
|
-
reasoning_output =
|
|
203
|
+
reasoning_output = []
|
|
204
204
|
|
|
205
205
|
async for chunk in llm.astream(prompt):
|
|
206
|
-
reasoning_output
|
|
206
|
+
reasoning_output.append(chunk.content)
|
|
207
207
|
|
|
208
|
-
reasoning_output = remove_r1_think_tags(reasoning_output)
|
|
208
|
+
reasoning_output = remove_r1_think_tags("".join(reasoning_output))
|
|
209
209
|
|
|
210
210
|
output = await downstream_template.ainvoke(input={
|
|
211
211
|
"input_text": input_text, "reasoning_output": reasoning_output
|
|
@@ -233,14 +233,10 @@ def create_tool_calling_agent_prompt(config: "ToolCallAgentWorkflowConfig") -> s
|
|
|
233
233
|
"""
|
|
234
234
|
# the Tool Calling Agent prompt can be customized via config option system_prompt and additional_instructions.
|
|
235
235
|
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
prompt_str += f" {config.additional_instructions}"
|
|
243
|
-
|
|
244
|
-
if len(prompt_str) > 0:
|
|
245
|
-
return prompt_str
|
|
236
|
+
prompt_strs = []
|
|
237
|
+
for msg in [config.system_prompt, config.additional_instructions]:
|
|
238
|
+
if msg is not None:
|
|
239
|
+
prompt_strs.append(msg)
|
|
240
|
+
if prompt_strs:
|
|
241
|
+
return " ".join(prompt_strs)
|
|
246
242
|
return None
|
|
@@ -1184,6 +1184,7 @@ class FastApiFrontEndPluginWorker(FastApiFrontEndPluginWorkerBase):
|
|
|
1184
1184
|
"server": client.server_name,
|
|
1185
1185
|
"transport": config.server.transport,
|
|
1186
1186
|
"session_healthy": session_healthy,
|
|
1187
|
+
"protected": True if config.server.auth_provider is not None else False,
|
|
1187
1188
|
"tools": tools_info,
|
|
1188
1189
|
"total_tools": len(configured_short_names),
|
|
1189
1190
|
"available_tools": available_count
|
|
@@ -1196,6 +1197,7 @@ class FastApiFrontEndPluginWorker(FastApiFrontEndPluginWorkerBase):
|
|
|
1196
1197
|
"server": "unknown",
|
|
1197
1198
|
"transport": config.server.transport if config.server else "unknown",
|
|
1198
1199
|
"session_healthy": False,
|
|
1200
|
+
"protected": False,
|
|
1199
1201
|
"error": str(e),
|
|
1200
1202
|
"tools": [],
|
|
1201
1203
|
"total_tools": 0,
|
|
@@ -1226,6 +1228,7 @@ class FastApiFrontEndPluginWorker(FastApiFrontEndPluginWorkerBase):
|
|
|
1226
1228
|
"server": "streamable-http:http://localhost:9901/mcp",
|
|
1227
1229
|
"transport": "streamable-http",
|
|
1228
1230
|
"session_healthy": True,
|
|
1231
|
+
"protected": False,
|
|
1229
1232
|
"tools": [{
|
|
1230
1233
|
"name": "tool_a",
|
|
1231
1234
|
"description": "Tool A description",
|
|
@@ -105,9 +105,12 @@ class MCPFrontEndPlugin(FrontEndBase[MCPFrontEndConfig]):
|
|
|
105
105
|
|
|
106
106
|
# Start the MCP server with configurable transport
|
|
107
107
|
# streamable-http is the default, but users can choose sse if preferred
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
108
|
+
try:
|
|
109
|
+
if self.front_end_config.transport == "sse":
|
|
110
|
+
logger.info("Starting MCP server with SSE endpoint at /sse")
|
|
111
|
+
await mcp.run_sse_async()
|
|
112
|
+
else: # streamable-http
|
|
113
|
+
logger.info("Starting MCP server with streamable-http endpoint at /mcp/")
|
|
114
|
+
await mcp.run_streamable_http_async()
|
|
115
|
+
except KeyboardInterrupt:
|
|
116
|
+
logger.info("MCP server shutdown requested (Ctrl+C). Shutting down gracefully.")
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: nvidia-nat
|
|
3
|
-
Version: 1.3.
|
|
3
|
+
Version: 1.3.0rc5
|
|
4
4
|
Summary: NVIDIA NeMo Agent toolkit
|
|
5
5
|
Author: NVIDIA Corporation
|
|
6
6
|
Maintainer: NVIDIA Corporation
|
|
@@ -17,7 +17,7 @@ Description-Content-Type: text/markdown
|
|
|
17
17
|
License-File: LICENSE-3rd-party.txt
|
|
18
18
|
License-File: LICENSE.md
|
|
19
19
|
Requires-Dist: aioboto3>=11.0.0
|
|
20
|
-
Requires-Dist: authlib
|
|
20
|
+
Requires-Dist: authlib<2.0.0,>=1.6.5
|
|
21
21
|
Requires-Dist: click~=8.1
|
|
22
22
|
Requires-Dist: colorama~=0.4.6
|
|
23
23
|
Requires-Dist: datasets~=4.0
|
|
@@ -103,7 +103,6 @@ Requires-Dist: nat_multi_frameworks; extra == "examples"
|
|
|
103
103
|
Requires-Dist: nat_plot_charts; extra == "examples"
|
|
104
104
|
Requires-Dist: nat_por_to_jiratickets; extra == "examples"
|
|
105
105
|
Requires-Dist: nat_profiler_agent; extra == "examples"
|
|
106
|
-
Requires-Dist: nat_redact_pii; extra == "examples"
|
|
107
106
|
Requires-Dist: nat_router_agent; extra == "examples"
|
|
108
107
|
Requires-Dist: nat_semantic_kernel_demo; extra == "examples"
|
|
109
108
|
Requires-Dist: nat_sequential_executor; extra == "examples"
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
aiq/__init__.py,sha256=qte-NlwgM990yEeyaRUxA4IBQq3PaEkQUCK3i95iwPw,2341
|
|
2
2
|
nat/agent/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
3
|
-
nat/agent/base.py,sha256=
|
|
3
|
+
nat/agent/base.py,sha256=Q6byRPl4mrfVFD3boKt5yftnnJ3ucH9l39FTt3QOQbg,10169
|
|
4
4
|
nat/agent/dual_node.py,sha256=pfvXa1iLKtrNBHsh-tM5RWRmVe7QkyYhQNanOfWdJJs,2569
|
|
5
5
|
nat/agent/register.py,sha256=rPhHDyqRBIKyon3HqhOmpAjqPP18Or6wDQb0wRUBIjQ,1032
|
|
6
6
|
nat/agent/prompt_optimizer/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
@@ -12,13 +12,13 @@ nat/agent/react_agent/output_parser.py,sha256=m7K6wRwtckBBpAHqOf3BZ9mqZLwrP13Kxz
|
|
|
12
12
|
nat/agent/react_agent/prompt.py,sha256=N47JJrT6xwYQCv1jedHhlul2AE7EfKsSYfAbgJwWRew,1758
|
|
13
13
|
nat/agent/react_agent/register.py,sha256=qkPaK6AvXjolL-q_Z3waVobXDz24GMfuqGqCn-2un2Q,8991
|
|
14
14
|
nat/agent/reasoning_agent/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
15
|
-
nat/agent/reasoning_agent/reasoning_agent.py,sha256=
|
|
15
|
+
nat/agent/reasoning_agent/reasoning_agent.py,sha256=fFQtzvaBWtmr_B6S9KSkqAfyl1BdcOc9xkhnbO4O8Pk,9603
|
|
16
16
|
nat/agent/rewoo_agent/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
17
17
|
nat/agent/rewoo_agent/agent.py,sha256=XXgVXY9xwkyxnr093KXUtfgyNxAQbyGAecoGqN5mMLY,26199
|
|
18
18
|
nat/agent/rewoo_agent/prompt.py,sha256=B0JeL1xDX4VKcShlkkviEcAsOKAwzSlX8NcAQdmUUPw,3645
|
|
19
19
|
nat/agent/rewoo_agent/register.py,sha256=XArlOR37QOBtAvsdKJUjRok5qTmx39S2mJHSteOwU58,9283
|
|
20
20
|
nat/agent/tool_calling_agent/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
21
|
-
nat/agent/tool_calling_agent/agent.py,sha256=
|
|
21
|
+
nat/agent/tool_calling_agent/agent.py,sha256=9CRQbFlcJ02WvuRojaWcRS8ISl38JlS18BUflApuoAw,10960
|
|
22
22
|
nat/agent/tool_calling_agent/register.py,sha256=OucceyELA2xZL3KdANWK9w12fnVP75eVbZgzOnmXHys,7057
|
|
23
23
|
nat/authentication/__init__.py,sha256=Xs1JQ16L9btwreh4pdGKwskffAw1YFO48jKrU4ib_7c,685
|
|
24
24
|
nat/authentication/interfaces.py,sha256=1J2CWEJ_n6CLA3_HD3XV28CSbyfxrPAHzr7Q4kKDFdc,3511
|
|
@@ -242,7 +242,7 @@ nat/front_ends/fastapi/dask_client_mixin.py,sha256=N_tw4yxA7EKIFTKp5_C2ZksIZucWx
|
|
|
242
242
|
nat/front_ends/fastapi/fastapi_front_end_config.py,sha256=BcuzrVlA5b7yYyQKNvQgEanDBtKEHdpC8TAd-O7lfF0,11992
|
|
243
243
|
nat/front_ends/fastapi/fastapi_front_end_controller.py,sha256=ei-34KCMpyaeAgeAN4gVvSGFjewjjRhHZPN0FqAfhDY,2548
|
|
244
244
|
nat/front_ends/fastapi/fastapi_front_end_plugin.py,sha256=e33YkMcLzvm4OUG34bhl-WYiBTqkR-_wJYKG4GODkGM,11169
|
|
245
|
-
nat/front_ends/fastapi/fastapi_front_end_plugin_worker.py,sha256=
|
|
245
|
+
nat/front_ends/fastapi/fastapi_front_end_plugin_worker.py,sha256=T6uslFdkHl_r0U54_7cRRKLnWYP2tTMcD7snx9Gv1xs,60547
|
|
246
246
|
nat/front_ends/fastapi/intermediate_steps_subscriber.py,sha256=kbyWlBVpyvyQQjeUnFG9nsR4RaqqNkx567ZSVwwl2RU,3104
|
|
247
247
|
nat/front_ends/fastapi/job_store.py,sha256=cWIBnIgRdkGL7qbBunEKzTYzdPp3l3QCDHMP-qTZJpc,22743
|
|
248
248
|
nat/front_ends/fastapi/main.py,sha256=s8gXCy61rJjK1aywMRpgPvzlkMGsCS-kI_0EIy4JjBM,2445
|
|
@@ -260,7 +260,7 @@ nat/front_ends/fastapi/html_snippets/auth_code_grant_success.py,sha256=BNpWwzmA5
|
|
|
260
260
|
nat/front_ends/mcp/__init__.py,sha256=Xs1JQ16L9btwreh4pdGKwskffAw1YFO48jKrU4ib_7c,685
|
|
261
261
|
nat/front_ends/mcp/introspection_token_verifier.py,sha256=s7Q4Q6rWZJ0ZVujSxxpvVI6Bnhkg1LJQ3RLkvhzFIGE,2836
|
|
262
262
|
nat/front_ends/mcp/mcp_front_end_config.py,sha256=m6z5qSz8YGnFnfu8hRID69suvO1YT_L6sxy1Ki64Ufw,4042
|
|
263
|
-
nat/front_ends/mcp/mcp_front_end_plugin.py,sha256=
|
|
263
|
+
nat/front_ends/mcp/mcp_front_end_plugin.py,sha256=4u_kpen_T-_Uh62V5M7dfW9KyzbqXI7tGBG4AxJXWm0,5231
|
|
264
264
|
nat/front_ends/mcp/mcp_front_end_plugin_worker.py,sha256=jMclC0qEd910oTGCqd1kQ8WjP3WPdQKTl854-2bU_KI,10200
|
|
265
265
|
nat/front_ends/mcp/register.py,sha256=3aJtgG5VaiqujoeU1-Eq7Hl5pWslIlIwGFU2ASLTXgM,1173
|
|
266
266
|
nat/front_ends/mcp/tool_converter.py,sha256=jyH6tFKUDXSfRBKkv8WjvJsQt05zk3FJBTCwnIuUh5M,11547
|
|
@@ -470,10 +470,10 @@ nat/utils/reactive/base/observer_base.py,sha256=6BiQfx26EMumotJ3KoVcdmFBYR_fnAss
|
|
|
470
470
|
nat/utils/reactive/base/subject_base.py,sha256=UQOxlkZTIeeyYmG5qLtDpNf_63Y7p-doEeUA08_R8ME,2521
|
|
471
471
|
nat/utils/settings/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
472
472
|
nat/utils/settings/global_settings.py,sha256=9JaO6pxKT_Pjw6rxJRsRlFCXdVKCl_xUKU2QHZQWWNM,7294
|
|
473
|
-
nvidia_nat-1.3.
|
|
474
|
-
nvidia_nat-1.3.
|
|
475
|
-
nvidia_nat-1.3.
|
|
476
|
-
nvidia_nat-1.3.
|
|
477
|
-
nvidia_nat-1.3.
|
|
478
|
-
nvidia_nat-1.3.
|
|
479
|
-
nvidia_nat-1.3.
|
|
473
|
+
nvidia_nat-1.3.0rc5.dist-info/licenses/LICENSE-3rd-party.txt,sha256=fOk5jMmCX9YoKWyYzTtfgl-SUy477audFC5hNY4oP7Q,284609
|
|
474
|
+
nvidia_nat-1.3.0rc5.dist-info/licenses/LICENSE.md,sha256=QwcOLU5TJoTeUhuIXzhdCEEDDvorGiC6-3YTOl4TecE,11356
|
|
475
|
+
nvidia_nat-1.3.0rc5.dist-info/METADATA,sha256=nm0UvCzWa259-7OnT21duAI9yl9EqwKs3lXaxup59OA,10180
|
|
476
|
+
nvidia_nat-1.3.0rc5.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
|
|
477
|
+
nvidia_nat-1.3.0rc5.dist-info/entry_points.txt,sha256=4jCqjyETMpyoWbCBf4GalZU8I_wbstpzwQNezdAVbbo,698
|
|
478
|
+
nvidia_nat-1.3.0rc5.dist-info/top_level.txt,sha256=lgJWLkigiVZuZ_O1nxVnD_ziYBwgpE2OStdaCduMEGc,8
|
|
479
|
+
nvidia_nat-1.3.0rc5.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|
{nvidia_nat-1.3.0rc4.dist-info → nvidia_nat-1.3.0rc5.dist-info}/licenses/LICENSE-3rd-party.txt
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|