nvidia-nat-langchain 1.3.0rc2__py3-none-any.whl → 1.3.0rc4__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 nvidia-nat-langchain might be problematic. Click here for more details.
- nat/plugins/langchain/llm.py +13 -1
- {nvidia_nat_langchain-1.3.0rc2.dist-info → nvidia_nat_langchain-1.3.0rc4.dist-info}/METADATA +10 -2
- {nvidia_nat_langchain-1.3.0rc2.dist-info → nvidia_nat_langchain-1.3.0rc4.dist-info}/RECORD +8 -6
- nvidia_nat_langchain-1.3.0rc4.dist-info/licenses/LICENSE-3rd-party.txt +5478 -0
- nvidia_nat_langchain-1.3.0rc4.dist-info/licenses/LICENSE.md +201 -0
- {nvidia_nat_langchain-1.3.0rc2.dist-info → nvidia_nat_langchain-1.3.0rc4.dist-info}/WHEEL +0 -0
- {nvidia_nat_langchain-1.3.0rc2.dist-info → nvidia_nat_langchain-1.3.0rc4.dist-info}/entry_points.txt +0 -0
- {nvidia_nat_langchain-1.3.0rc2.dist-info → nvidia_nat_langchain-1.3.0rc4.dist-info}/top_level.txt +0 -0
nat/plugins/langchain/llm.py
CHANGED
|
@@ -67,6 +67,11 @@ def _patch_llm_based_on_config(client: ModelType, llm_config: LLMBaseConfig) ->
|
|
|
67
67
|
"""
|
|
68
68
|
system_message = SystemMessage(content=self.system_prompt)
|
|
69
69
|
if isinstance(messages, BaseMessage):
|
|
70
|
+
# Attempt to inject the system prompt into the first system message
|
|
71
|
+
if isinstance(messages, SystemMessage):
|
|
72
|
+
messages.content = f"{self.system_prompt}\n\n{messages.content}"
|
|
73
|
+
return FunctionArgumentWrapper(messages, *args, **kwargs)
|
|
74
|
+
# If no system message found, prepend a new one
|
|
70
75
|
new_messages = [system_message, messages]
|
|
71
76
|
return FunctionArgumentWrapper(new_messages, *args, **kwargs)
|
|
72
77
|
elif isinstance(messages, PromptValue):
|
|
@@ -77,7 +82,14 @@ def _patch_llm_based_on_config(client: ModelType, llm_config: LLMBaseConfig) ->
|
|
|
77
82
|
return FunctionArgumentWrapper(new_messages, *args, **kwargs)
|
|
78
83
|
elif isinstance(messages, Sequence):
|
|
79
84
|
if all(isinstance(m, BaseMessage) for m in messages):
|
|
80
|
-
|
|
85
|
+
messages = list(messages)
|
|
86
|
+
# Attempt to inject the system prompt into the first system message
|
|
87
|
+
for message in messages:
|
|
88
|
+
if isinstance(message, SystemMessage):
|
|
89
|
+
message.content = f"{self.system_prompt}\n\n{message.content}"
|
|
90
|
+
return FunctionArgumentWrapper(messages, *args, **kwargs)
|
|
91
|
+
# If no system message found, prepend a new one
|
|
92
|
+
new_messages = [system_message, *messages]
|
|
81
93
|
return FunctionArgumentWrapper(new_messages, *args, **kwargs)
|
|
82
94
|
raise ValueError(f"Unsupported message type: {type(messages)}")
|
|
83
95
|
|
{nvidia_nat_langchain-1.3.0rc2.dist-info → nvidia_nat_langchain-1.3.0rc4.dist-info}/METADATA
RENAMED
|
@@ -1,7 +1,12 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: nvidia-nat-langchain
|
|
3
|
-
Version: 1.3.
|
|
3
|
+
Version: 1.3.0rc4
|
|
4
4
|
Summary: Subpackage for LangChain/LangGraph integration in NeMo Agent toolkit
|
|
5
|
+
Author: NVIDIA Corporation
|
|
6
|
+
Maintainer: NVIDIA Corporation
|
|
7
|
+
License: Apache-2.0
|
|
8
|
+
Project-URL: documentation, https://docs.nvidia.com/nemo/agent-toolkit/latest/
|
|
9
|
+
Project-URL: source, https://github.com/NVIDIA/NeMo-Agent-Toolkit
|
|
5
10
|
Keywords: ai,rag,agents
|
|
6
11
|
Classifier: Programming Language :: Python
|
|
7
12
|
Classifier: Programming Language :: Python :: 3.11
|
|
@@ -9,7 +14,9 @@ Classifier: Programming Language :: Python :: 3.12
|
|
|
9
14
|
Classifier: Programming Language :: Python :: 3.13
|
|
10
15
|
Requires-Python: <3.14,>=3.11
|
|
11
16
|
Description-Content-Type: text/markdown
|
|
12
|
-
|
|
17
|
+
License-File: LICENSE-3rd-party.txt
|
|
18
|
+
License-File: LICENSE.md
|
|
19
|
+
Requires-Dist: nvidia-nat==v1.3.0-rc4
|
|
13
20
|
Requires-Dist: langchain-aws~=0.2.31
|
|
14
21
|
Requires-Dist: langchain-core~=0.3.75
|
|
15
22
|
Requires-Dist: langchain-litellm~=0.2.3
|
|
@@ -18,6 +25,7 @@ Requires-Dist: langchain-nvidia-ai-endpoints~=0.3.17
|
|
|
18
25
|
Requires-Dist: langchain-openai~=0.3.32
|
|
19
26
|
Requires-Dist: langchain-tavily~=0.2.11
|
|
20
27
|
Requires-Dist: langgraph~=0.6.7
|
|
28
|
+
Dynamic: license-file
|
|
21
29
|
|
|
22
30
|
<!--
|
|
23
31
|
SPDX-FileCopyrightText: Copyright (c) 2025, NVIDIA CORPORATION & AFFILIATES. All rights reserved.
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
nat/meta/pypi.md,sha256=T_KFtTXVxhFM8Y6K3OlNByA5sTXLQuqqUpHgNOCvZBU,1120
|
|
2
2
|
nat/plugins/langchain/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
3
3
|
nat/plugins/langchain/embedder.py,sha256=ZSESaazyz7y3F0GSSsWRe_xfvxOe0Mwd45wEAkQ2jJk,3339
|
|
4
|
-
nat/plugins/langchain/llm.py,sha256=
|
|
4
|
+
nat/plugins/langchain/llm.py,sha256=MhkcqlINcNuGppLLr8vN9DN2meKCjbAzcO_cXxy9GK8,7958
|
|
5
5
|
nat/plugins/langchain/register.py,sha256=jgq6wSJoGQIZFJhS8RbUs25cLgNJjCkFu4M6qaWJS_4,906
|
|
6
6
|
nat/plugins/langchain/retriever.py,sha256=SWbXXOezEUuPACnmSSU497NAmEVEMj2SrFJGodkRg34,2644
|
|
7
7
|
nat/plugins/langchain/tool_wrapper.py,sha256=Zgb2_XB4bEhjPPeqS-ZH_OJT_pcQmteX7u03N_qCLfc,2121
|
|
@@ -10,8 +10,10 @@ nat/plugins/langchain/tools/code_generation_tool.py,sha256=f5pna0WMOx3QOS4WnaMFK
|
|
|
10
10
|
nat/plugins/langchain/tools/register.py,sha256=uemxqLxcNk1bGX4crV52oMphLTZWonStzkXwTZeG2Rw,889
|
|
11
11
|
nat/plugins/langchain/tools/tavily_internet_search.py,sha256=UFMP1xh_kC3fydMQBeV-oDZ-M7jnLcs5OkMSzgm7mng,2653
|
|
12
12
|
nat/plugins/langchain/tools/wikipedia_search.py,sha256=431YwLsjoC_mdvMZ_gY0Q37Uqaue2ASnAHpwr4jWCaU,2197
|
|
13
|
-
nvidia_nat_langchain-1.3.
|
|
14
|
-
nvidia_nat_langchain-1.3.
|
|
15
|
-
nvidia_nat_langchain-1.3.
|
|
16
|
-
nvidia_nat_langchain-1.3.
|
|
17
|
-
nvidia_nat_langchain-1.3.
|
|
13
|
+
nvidia_nat_langchain-1.3.0rc4.dist-info/licenses/LICENSE-3rd-party.txt,sha256=fOk5jMmCX9YoKWyYzTtfgl-SUy477audFC5hNY4oP7Q,284609
|
|
14
|
+
nvidia_nat_langchain-1.3.0rc4.dist-info/licenses/LICENSE.md,sha256=QwcOLU5TJoTeUhuIXzhdCEEDDvorGiC6-3YTOl4TecE,11356
|
|
15
|
+
nvidia_nat_langchain-1.3.0rc4.dist-info/METADATA,sha256=B_4DICNI625tSbo57-PLqkRP5uVqt2IqkbdS4JTad9g,2219
|
|
16
|
+
nvidia_nat_langchain-1.3.0rc4.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
|
|
17
|
+
nvidia_nat_langchain-1.3.0rc4.dist-info/entry_points.txt,sha256=4deXsMn97I012HhDw0UjoqcZ8eEoZ7BnqaRx5QmzebY,123
|
|
18
|
+
nvidia_nat_langchain-1.3.0rc4.dist-info/top_level.txt,sha256=8-CJ2cP6-f0ZReXe5Hzqp-5pvzzHz-5Ds5H2bGqh1-U,4
|
|
19
|
+
nvidia_nat_langchain-1.3.0rc4.dist-info/RECORD,,
|