nvidia-nat-langchain 1.3.0a20250928__py3-none-any.whl → 1.3.0a20250930__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.
@@ -33,7 +33,7 @@ class TavilyInternetSearchToolConfig(FunctionBaseConfig, name="tavily_internet_s
33
33
  async def tavily_internet_search(tool_config: TavilyInternetSearchToolConfig, builder: Builder):
34
34
  import os
35
35
 
36
- from langchain_community.tools import TavilySearchResults
36
+ from langchain_tavily import TavilySearch
37
37
 
38
38
  if not os.environ.get("TAVILY_API_KEY"):
39
39
  os.environ["TAVILY_API_KEY"] = tool_config.api_key
@@ -41,20 +41,24 @@ async def tavily_internet_search(tool_config: TavilyInternetSearchToolConfig, bu
41
41
  # Refer to create_customize_workflow.md for instructions of getting the API key
42
42
 
43
43
  async def _tavily_internet_search(question: str) -> str:
44
+ """This tool retrieves relevant contexts from web search (using Tavily) for the given question.
45
+
46
+ Args:
47
+ question (str): The question to be answered.
48
+
49
+ Returns:
50
+ str: The web search results.
51
+ """
44
52
  # Search the web and get the requested amount of results
45
- tavily_search = TavilySearchResults(max_results=tool_config.max_results)
53
+ tavily_search = TavilySearch(max_results=tool_config.max_results)
46
54
  search_docs = await tavily_search.ainvoke({'query': question})
47
55
  # Format
48
56
  web_search_results = "\n\n---\n\n".join(
49
- [f'<Document href="{doc["url"]}"/>\n{doc["content"]}\n</Document>' for doc in search_docs])
57
+ [f'<Document href="{doc["url"]}"/>\n{doc["content"]}\n</Document>' for doc in search_docs["results"]])
50
58
  return web_search_results
51
59
 
52
60
  # Create a Generic NAT tool that can be used with any supported LLM framework
53
61
  yield FunctionInfo.from_fn(
54
62
  _tavily_internet_search,
55
- description=("""This tool retrieves relevant contexts from web search (using Tavily) for the given question.
56
-
57
- Args:
58
- question (str): The question to be answered.
59
- """),
63
+ description=_tavily_internet_search.__doc__,
60
64
  )
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: nvidia-nat-langchain
3
- Version: 1.3.0a20250928
3
+ Version: 1.3.0a20250930
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,12 +9,13 @@ 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.0a20250928
12
+ Requires-Dist: nvidia-nat==v1.3.0a20250930
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
16
16
  Requires-Dist: langchain-nvidia-ai-endpoints~=0.3.17
17
17
  Requires-Dist: langchain-openai~=0.3.32
18
+ Requires-Dist: langchain-tavily~=0.2.11
18
19
  Requires-Dist: langgraph~=0.6.7
19
20
 
20
21
  <!--
@@ -8,10 +8,10 @@ nat/plugins/langchain/tool_wrapper.py,sha256=Zgb2_XB4bEhjPPeqS-ZH_OJT_pcQmteX7u0
8
8
  nat/plugins/langchain/tools/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
9
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
- nat/plugins/langchain/tools/tavily_internet_search.py,sha256=AnnLRY1xSU4DOzxbB8nFZRjHngXpqatPVOJ7yWV7jVw,2612
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.0a20250928.dist-info/METADATA,sha256=DX8CiCi5at-7Szsz6kJ8ecmnOMSNYc2BE3P0q2-9Ffw,1844
14
- nvidia_nat_langchain-1.3.0a20250928.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
15
- nvidia_nat_langchain-1.3.0a20250928.dist-info/entry_points.txt,sha256=4deXsMn97I012HhDw0UjoqcZ8eEoZ7BnqaRx5QmzebY,123
16
- nvidia_nat_langchain-1.3.0a20250928.dist-info/top_level.txt,sha256=8-CJ2cP6-f0ZReXe5Hzqp-5pvzzHz-5Ds5H2bGqh1-U,4
17
- nvidia_nat_langchain-1.3.0a20250928.dist-info/RECORD,,
13
+ nvidia_nat_langchain-1.3.0a20250930.dist-info/METADATA,sha256=gbhmJ8qBc7J0hDIB8BznPmbT0xOdwIQ8F0Hm_mNXR7k,1884
14
+ nvidia_nat_langchain-1.3.0a20250930.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
15
+ nvidia_nat_langchain-1.3.0a20250930.dist-info/entry_points.txt,sha256=4deXsMn97I012HhDw0UjoqcZ8eEoZ7BnqaRx5QmzebY,123
16
+ nvidia_nat_langchain-1.3.0a20250930.dist-info/top_level.txt,sha256=8-CJ2cP6-f0ZReXe5Hzqp-5pvzzHz-5Ds5H2bGqh1-U,4
17
+ nvidia_nat_langchain-1.3.0a20250930.dist-info/RECORD,,