mirror of
https://github.com/hwchase17/langchain.git
synced 2025-06-29 18:08:36 +00:00
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!
This commit is contained in:
parent
8977ac5ab0
commit
156a60013a
@ -51,9 +51,12 @@ class TavilySearchResults(BaseTool): # type: ignore[override, override]
|
|||||||
|
|
||||||
tool.invoke({'query': 'who won the last french open'})
|
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:
|
Invoke with tool call:
|
||||||
|
|
||||||
@ -64,7 +67,7 @@ class TavilySearchResults(BaseTool): # type: ignore[override, override]
|
|||||||
.. code-block:: python
|
.. code-block:: python
|
||||||
|
|
||||||
ToolMessage(
|
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={
|
artifact={
|
||||||
'query': 'who won the last french open',
|
'query': 'who won the last french open',
|
||||||
'follow_up_questions': None,
|
'follow_up_questions': None,
|
||||||
|
Loading…
Reference in New Issue
Block a user