nvidia-nat-langchain 1.3.0a20250910__py3-none-any.whl → 1.3.0a20250917__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.
@@ -28,7 +28,7 @@ async def azure_openai_langchain(embedder_config: AzureOpenAIEmbedderModelConfig
28
28
 
29
29
  from langchain_openai import AzureOpenAIEmbeddings
30
30
 
31
- client = AzureOpenAIEmbeddings(**embedder_config.model_dump(exclude={"type"}, by_alias=True))
31
+ client = AzureOpenAIEmbeddings(**embedder_config.model_dump(exclude={"type"}, by_alias=True, exclude_none=True))
32
32
 
33
33
  if isinstance(embedder_config, RetryMixin):
34
34
  client = patch_with_retry(client,
@@ -44,7 +44,7 @@ async def nim_langchain(embedder_config: NIMEmbedderModelConfig, builder: Builde
44
44
 
45
45
  from langchain_nvidia_ai_endpoints import NVIDIAEmbeddings
46
46
 
47
- client = NVIDIAEmbeddings(**embedder_config.model_dump(exclude={"type"}, by_alias=True))
47
+ client = NVIDIAEmbeddings(**embedder_config.model_dump(exclude={"type"}, by_alias=True, exclude_none=True))
48
48
 
49
49
  if isinstance(embedder_config, RetryMixin):
50
50
  client = patch_with_retry(client,
@@ -60,7 +60,7 @@ async def openai_langchain(embedder_config: OpenAIEmbedderModelConfig, builder:
60
60
 
61
61
  from langchain_openai import OpenAIEmbeddings
62
62
 
63
- client = OpenAIEmbeddings(**embedder_config.model_dump(exclude={"type"}, by_alias=True))
63
+ client = OpenAIEmbeddings(**embedder_config.model_dump(exclude={"type"}, by_alias=True, exclude_none=True))
64
64
 
65
65
  if isinstance(embedder_config, RetryMixin):
66
66
  client = patch_with_retry(client,
@@ -107,7 +107,11 @@ async def aws_bedrock_langchain(llm_config: AWSBedrockModelConfig, _builder: Bui
107
107
 
108
108
  from langchain_aws import ChatBedrockConverse
109
109
 
110
- client = ChatBedrockConverse(**llm_config.model_dump(exclude={"type", "context_size", "thinking"}, by_alias=True))
110
+ client = ChatBedrockConverse(**llm_config.model_dump(
111
+ exclude={"type", "context_size", "thinking"},
112
+ by_alias=True,
113
+ exclude_none=True,
114
+ ))
111
115
 
112
116
  yield _patch_llm_based_on_config(client, llm_config)
113
117
 
@@ -117,7 +121,7 @@ async def azure_openai_langchain(llm_config: AzureOpenAIModelConfig, _builder: B
117
121
 
118
122
  from langchain_openai import AzureChatOpenAI
119
123
 
120
- client = AzureChatOpenAI(**llm_config.model_dump(exclude={"type", "thinking"}, by_alias=True))
124
+ client = AzureChatOpenAI(**llm_config.model_dump(exclude={"type", "thinking"}, by_alias=True, exclude_none=True))
121
125
 
122
126
  yield _patch_llm_based_on_config(client, llm_config)
123
127
 
@@ -129,7 +133,7 @@ async def nim_langchain(llm_config: NIMModelConfig, _builder: Builder):
129
133
 
130
134
  # prefer max_completion_tokens over max_tokens
131
135
  client = ChatNVIDIA(
132
- **llm_config.model_dump(exclude={"type", "max_tokens", "thinking"}, by_alias=True),
136
+ **llm_config.model_dump(exclude={"type", "max_tokens", "thinking"}, by_alias=True, exclude_none=True),
133
137
  max_completion_tokens=llm_config.max_tokens,
134
138
  )
135
139
 
@@ -142,6 +146,11 @@ async def openai_langchain(llm_config: OpenAIModelConfig, _builder: Builder):
142
146
  from langchain_openai import ChatOpenAI
143
147
 
144
148
  # If stream_usage is specified, it will override the default value of True.
145
- client = ChatOpenAI(stream_usage=True, **llm_config.model_dump(exclude={"type", "thinking"}, by_alias=True))
149
+ client = ChatOpenAI(stream_usage=True,
150
+ **llm_config.model_dump(
151
+ exclude={"type", "thinking"},
152
+ by_alias=True,
153
+ exclude_none=True,
154
+ ))
146
155
 
147
156
  yield _patch_llm_based_on_config(client, llm_config)
@@ -61,6 +61,6 @@ You are a helpful code assistant that can teach a junior developer how to code.
61
61
  response = await tool.ainvoke({"question": query})
62
62
  if config.verbose:
63
63
  log.debug('Tool input was: %s\nTool output is: \n%s', query, response)
64
- return response.content
64
+ return response.text()
65
65
 
66
66
  yield FunctionInfo.from_fn(_inner, description=config.description)
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: nvidia-nat-langchain
3
- Version: 1.3.0a20250910
3
+ Version: 1.3.0a20250917
4
4
  Summary: Subpackage for LangChain/LangGraph integration in NeMo Agent toolkit
5
5
  Keywords: ai,rag,agents
6
6
  Classifier: Programming Language :: Python
@@ -9,7 +9,7 @@ Classifier: Programming Language :: Python :: 3.12
9
9
  Classifier: Programming Language :: Python :: 3.13
10
10
  Requires-Python: <3.14,>=3.11
11
11
  Description-Content-Type: text/markdown
12
- Requires-Dist: nvidia-nat==v1.3.0a20250910
12
+ Requires-Dist: nvidia-nat==v1.3.0a20250917
13
13
  Requires-Dist: langchain-aws~=0.2.31
14
14
  Requires-Dist: langchain-core~=0.3.75
15
15
  Requires-Dist: langchain-milvus~=0.2.1
@@ -1,17 +1,17 @@
1
1
  nat/meta/pypi.md,sha256=T_KFtTXVxhFM8Y6K3OlNByA5sTXLQuqqUpHgNOCvZBU,1120
2
2
  nat/plugins/langchain/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
3
- nat/plugins/langchain/embedder.py,sha256=7bHXRcLwCeqG6ZQZQ35UAb46k5bN3UUL02OtG7RdL4Y,3282
4
- nat/plugins/langchain/llm.py,sha256=_a9Wh-FuNKFLWdax8XoVV5-P6lWjfRCU3laxIfTzxu8,6421
3
+ nat/plugins/langchain/embedder.py,sha256=ZSESaazyz7y3F0GSSsWRe_xfvxOe0Mwd45wEAkQ2jJk,3339
4
+ nat/plugins/langchain/llm.py,sha256=wWIRlCehT391X1KiISA5wIZe2dHoPw6K6Q2mhJfyvno,6663
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
8
8
  nat/plugins/langchain/tools/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
9
- nat/plugins/langchain/tools/code_generation_tool.py,sha256=qL3HBiOQzVPLw4EiUOWeswckuVX8ynG2UQXYBLxR_gI,2724
9
+ nat/plugins/langchain/tools/code_generation_tool.py,sha256=f5pna0WMOx3QOS4WnaMFKD7tBZ1-tS0PfI0IMYobtTQ,2723
10
10
  nat/plugins/langchain/tools/register.py,sha256=uemxqLxcNk1bGX4crV52oMphLTZWonStzkXwTZeG2Rw,889
11
11
  nat/plugins/langchain/tools/tavily_internet_search.py,sha256=AnnLRY1xSU4DOzxbB8nFZRjHngXpqatPVOJ7yWV7jVw,2612
12
12
  nat/plugins/langchain/tools/wikipedia_search.py,sha256=431YwLsjoC_mdvMZ_gY0Q37Uqaue2ASnAHpwr4jWCaU,2197
13
- nvidia_nat_langchain-1.3.0a20250910.dist-info/METADATA,sha256=Ry7l4ZT0JCe_oCMNy6MzEyhAXFswwZPZZBE5-amd3cw,1844
14
- nvidia_nat_langchain-1.3.0a20250910.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
15
- nvidia_nat_langchain-1.3.0a20250910.dist-info/entry_points.txt,sha256=4deXsMn97I012HhDw0UjoqcZ8eEoZ7BnqaRx5QmzebY,123
16
- nvidia_nat_langchain-1.3.0a20250910.dist-info/top_level.txt,sha256=8-CJ2cP6-f0ZReXe5Hzqp-5pvzzHz-5Ds5H2bGqh1-U,4
17
- nvidia_nat_langchain-1.3.0a20250910.dist-info/RECORD,,
13
+ nvidia_nat_langchain-1.3.0a20250917.dist-info/METADATA,sha256=_11dv-XeHI286Ep35WabR9Em9BcGeHyzQCCPODMX-9A,1844
14
+ nvidia_nat_langchain-1.3.0a20250917.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
15
+ nvidia_nat_langchain-1.3.0a20250917.dist-info/entry_points.txt,sha256=4deXsMn97I012HhDw0UjoqcZ8eEoZ7BnqaRx5QmzebY,123
16
+ nvidia_nat_langchain-1.3.0a20250917.dist-info/top_level.txt,sha256=8-CJ2cP6-f0ZReXe5Hzqp-5pvzzHz-5Ds5H2bGqh1-U,4
17
+ nvidia_nat_langchain-1.3.0a20250917.dist-info/RECORD,,