From 156a60013a75722284a48f7f21be9ee55ab43475 Mon Sep 17 00:00:00 2001 From: DamonXue Date: Thu, 27 Feb 2025 23:55:15 +0800 Subject: [PATCH] docs: fix tavily_search code-block format. (#30012) This pull request includes a change to the `TavilySearchResults` class in the `tool.py` file, which updates the code block format in the documentation. Documentation update: * [`libs/community/langchain_community/tools/tavily_search/tool.py`](diffhunk://#diff-e3b6a980979268b639c6a86e9b182756b0f7c7e9e5605e613bc0a72ea6aa5301L54-R59): Changed the code block format from Python to JSON in the example provided in the docstring.Thank you for contributing to LangChain! --- .../langchain_community/tools/tavily_search/tool.py | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/libs/community/langchain_community/tools/tavily_search/tool.py b/libs/community/langchain_community/tools/tavily_search/tool.py index 1527458f30a..765f99daecf 100644 --- a/libs/community/langchain_community/tools/tavily_search/tool.py +++ b/libs/community/langchain_community/tools/tavily_search/tool.py @@ -51,9 +51,12 @@ class TavilySearchResults(BaseTool): # type: ignore[override, override] tool.invoke({'query': 'who won the last french open'}) - .. code-block:: python + .. code-block:: json - '{\n "url": "https://www.nytimes.com...", "content": "Novak Djokovic won the last French Open by beating Casper Ruud ...' + { + "url": "https://www.nytimes.com...", + "content": "Novak Djokovic won the last French Open by beating Casper Ruud ..." + } Invoke with tool call: @@ -64,7 +67,7 @@ class TavilySearchResults(BaseTool): # type: ignore[override, override] .. code-block:: python ToolMessage( - content='{\n "url": "https://www.nytimes.com...", "content": "Novak Djokovic won the last French Open by beating Casper Ruud ...', + content='{ "url": "https://www.nytimes.com...", "content": "Novak Djokovic won the last French Open by beating Casper Ruud ..." }', artifact={ 'query': 'who won the last french open', 'follow_up_questions': None,