nvidia-nat-langchain 1.2.0a20250813__py3-none-any.whl → 1.2.0rc6__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/meta/pypi.md CHANGED
@@ -15,7 +15,7 @@ See the License for the specific language governing permissions and
15
15
  limitations under the License.
16
16
  -->
17
17
 
18
- ![NVIDIA NeMo Agent Toolkit](https://media.githubusercontent.com/media/NVIDIA/NeMo-Agent-Toolkit/refs/heads/main/docs/source/_static/aiqtoolkit_banner.png "NeMo Agent toolkit banner image")
18
+ ![NVIDIA NeMo Agent Toolkit](https://media.githubusercontent.com/media/NVIDIA/NeMo-Agent-Toolkit/refs/heads/main/docs/source/_static/banner.png "NeMo Agent toolkit banner image")
19
19
 
20
20
  # NVIDIA NeMo Agent Toolkit Subpackage
21
21
  This is a subpackage for LangChain and LangGraph integration in NeMo Agent toolkit.
@@ -12,11 +12,13 @@
12
12
  # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
13
  # See the License for the specific language governing permissions and
14
14
  # limitations under the License.
15
+ # pylint: disable=unused-argument
15
16
 
16
17
  from nat.builder.builder import Builder
17
18
  from nat.builder.framework_enum import LLMFrameworkEnum
18
19
  from nat.cli.register_workflow import register_embedder_client
19
20
  from nat.data_models.retry_mixin import RetryMixin
21
+ from nat.embedder.nim_embedder import NIMEmbedderModelConfig
20
22
  from nat.embedder.openai_embedder import OpenAIEmbedderModelConfig
21
23
  from nat.utils.exception_handlers.automatic_retries import patch_with_retry
22
24
 
@@ -35,3 +37,19 @@ async def openai_langchain(embedder_config: OpenAIEmbedderModelConfig, builder:
35
37
  retry_on_messages=embedder_config.retry_on_errors)
36
38
 
37
39
  yield client
40
+
41
+
42
+ @register_embedder_client(config_type=NIMEmbedderModelConfig, wrapper_type=LLMFrameworkEnum.LANGCHAIN)
43
+ async def nim_langchain(embedder_config: NIMEmbedderModelConfig, builder: Builder):
44
+
45
+ from langchain_nvidia_ai_endpoints import NVIDIAEmbeddings
46
+
47
+ client = NVIDIAEmbeddings(**embedder_config.model_dump(exclude={"type"}, by_alias=True))
48
+
49
+ if isinstance(embedder_config, RetryMixin):
50
+ client = patch_with_retry(client,
51
+ retries=embedder_config.num_retries,
52
+ retry_codes=embedder_config.retry_on_status_codes,
53
+ retry_on_messages=embedder_config.retry_on_errors)
54
+
55
+ yield client
@@ -49,7 +49,7 @@ async def tavily_internet_search(tool_config: TavilyInternetSearchToolConfig, bu
49
49
  [f'<Document href="{doc["url"]}"/>\n{doc["content"]}\n</Document>' for doc in search_docs])
50
50
  return web_search_results
51
51
 
52
- # Create a Generic AIQ Toolkit tool that can be used with any supported LLM framework
52
+ # Create a Generic NAT tool that can be used with any supported LLM framework
53
53
  yield FunctionInfo.from_fn(
54
54
  _tavily_internet_search,
55
55
  description=("""This tool retrieves relevant contexts from web search (using Tavily) for the given question.
@@ -41,7 +41,7 @@ async def wiki_search(tool_config: WikiSearchToolConfig, builder: Builder):
41
41
  ])
42
42
  return wiki_search_results
43
43
 
44
- # Create an AIQ Toolkit wiki search tool that can be used with any supported LLM framework
44
+ # Create a NAT wiki search tool that can be used with any supported LLM framework
45
45
  yield FunctionInfo.from_fn(
46
46
  _wiki_search,
47
47
  description=("""This tool retrieves relevant contexts from wikipedia search for the given question.
@@ -1,12 +1,12 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: nvidia-nat-langchain
3
- Version: 1.2.0a20250813
3
+ Version: 1.2.0rc6
4
4
  Summary: Subpackage for LangChain and LangGraph integration in NeMo Agent toolkit
5
5
  Keywords: ai,rag,agents
6
6
  Classifier: Programming Language :: Python
7
7
  Requires-Python: <3.13,>=3.11
8
8
  Description-Content-Type: text/markdown
9
- Requires-Dist: nvidia-nat==v1.2.0a20250813
9
+ Requires-Dist: nvidia-nat==v1.2.0-rc6
10
10
  Requires-Dist: langchain-aws~=0.2.1
11
11
  Requires-Dist: langchain-core~=0.3.7
12
12
  Requires-Dist: langchain-nvidia-ai-endpoints~=0.3.5
@@ -32,7 +32,7 @@ See the License for the specific language governing permissions and
32
32
  limitations under the License.
33
33
  -->
34
34
 
35
- ![NVIDIA NeMo Agent Toolkit](https://media.githubusercontent.com/media/NVIDIA/NeMo-Agent-Toolkit/refs/heads/main/docs/source/_static/aiqtoolkit_banner.png "NeMo Agent toolkit banner image")
35
+ ![NVIDIA NeMo Agent Toolkit](https://media.githubusercontent.com/media/NVIDIA/NeMo-Agent-Toolkit/refs/heads/main/docs/source/_static/banner.png "NeMo Agent toolkit banner image")
36
36
 
37
37
  # NVIDIA NeMo Agent Toolkit Subpackage
38
38
  This is a subpackage for LangChain and LangGraph integration in NeMo Agent toolkit.
@@ -0,0 +1,17 @@
1
+ nat/meta/pypi.md,sha256=-RewrXPwhrT6398iluvXb5lefn18PybmvRFhmZF7KVI,1124
2
+ nat/plugins/langchain/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
3
+ nat/plugins/langchain/embedder.py,sha256=UcDB4GYY0vW3pUiFqqKhNMgAmEZdRSUJUazjThkPHuQ,2519
4
+ nat/plugins/langchain/llm.py,sha256=i_DffRmQ9PEELuXFYR2ouU0LRkPKAjwZi1z65xGrxws,3293
5
+ nat/plugins/langchain/register.py,sha256=UwxFY-HsZ5n32XPpqDtLvBamiw1Pdavtf2oYSK_XGtY,938
6
+ nat/plugins/langchain/retriever.py,sha256=SWbXXOezEUuPACnmSSU497NAmEVEMj2SrFJGodkRg34,2644
7
+ nat/plugins/langchain/tool_wrapper.py,sha256=dLK09a8lrmytNkIuhTaSByuLdW23aVmIcr3REyuJTMA,2156
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
10
+ nat/plugins/langchain/tools/register.py,sha256=3cf4RH2tQ_qOtZviwXQUqK5dKiVUJQYach4djxGpcOU,921
11
+ nat/plugins/langchain/tools/tavily_internet_search.py,sha256=AnnLRY1xSU4DOzxbB8nFZRjHngXpqatPVOJ7yWV7jVw,2612
12
+ nat/plugins/langchain/tools/wikipedia_search.py,sha256=431YwLsjoC_mdvMZ_gY0Q37Uqaue2ASnAHpwr4jWCaU,2197
13
+ nvidia_nat_langchain-1.2.0rc6.dist-info/METADATA,sha256=pllMoYf-NSsiYN89RNHphv4a3FhIzxQcqj-RH0v2QLs,1724
14
+ nvidia_nat_langchain-1.2.0rc6.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
15
+ nvidia_nat_langchain-1.2.0rc6.dist-info/entry_points.txt,sha256=4deXsMn97I012HhDw0UjoqcZ8eEoZ7BnqaRx5QmzebY,123
16
+ nvidia_nat_langchain-1.2.0rc6.dist-info/top_level.txt,sha256=8-CJ2cP6-f0ZReXe5Hzqp-5pvzzHz-5Ds5H2bGqh1-U,4
17
+ nvidia_nat_langchain-1.2.0rc6.dist-info/RECORD,,
@@ -1,17 +0,0 @@
1
- nat/meta/pypi.md,sha256=jxJ0L4icshSNDFo-5xV1OQrSqK9R31Lx4K6Tg3oXP44,1135
2
- nat/plugins/langchain/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
3
- nat/plugins/langchain/embedder.py,sha256=81LER6jIwmbD2QATH4G-DuovOkQd1890bl5A8DZb99w,1727
4
- nat/plugins/langchain/llm.py,sha256=i_DffRmQ9PEELuXFYR2ouU0LRkPKAjwZi1z65xGrxws,3293
5
- nat/plugins/langchain/register.py,sha256=UwxFY-HsZ5n32XPpqDtLvBamiw1Pdavtf2oYSK_XGtY,938
6
- nat/plugins/langchain/retriever.py,sha256=SWbXXOezEUuPACnmSSU497NAmEVEMj2SrFJGodkRg34,2644
7
- nat/plugins/langchain/tool_wrapper.py,sha256=dLK09a8lrmytNkIuhTaSByuLdW23aVmIcr3REyuJTMA,2156
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
10
- nat/plugins/langchain/tools/register.py,sha256=3cf4RH2tQ_qOtZviwXQUqK5dKiVUJQYach4djxGpcOU,921
11
- nat/plugins/langchain/tools/tavily_internet_search.py,sha256=0zGMRb4pVkDtvaDFpycRHM9GgWZcxwXkQC9N0pnyB9w,2620
12
- nat/plugins/langchain/tools/wikipedia_search.py,sha256=SBWiGz1j8qpiGvJXsVqY9kbrowZKdbaSccR99JKrKFA,2206
13
- nvidia_nat_langchain-1.2.0a20250813.dist-info/METADATA,sha256=Ft-Hlm5VGXfYZrPRFSdzUF2048-gOqlQH4PbSnWBAyw,1746
14
- nvidia_nat_langchain-1.2.0a20250813.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
15
- nvidia_nat_langchain-1.2.0a20250813.dist-info/entry_points.txt,sha256=4deXsMn97I012HhDw0UjoqcZ8eEoZ7BnqaRx5QmzebY,123
16
- nvidia_nat_langchain-1.2.0a20250813.dist-info/top_level.txt,sha256=8-CJ2cP6-f0ZReXe5Hzqp-5pvzzHz-5Ds5H2bGqh1-U,4
17
- nvidia_nat_langchain-1.2.0a20250813.dist-info/RECORD,,