From 2d038b57b295133ea328278fca3a4f89c155223a Mon Sep 17 00:00:00 2001 From: Harrison Chase Date: Sun, 11 Jun 2023 09:48:09 -0700 Subject: [PATCH] Harrison/arxiv fix (#5993) Co-authored-by: Juanjo do Olmo <87780148+SimplyJuanjo@users.noreply.github.com> --- langchain/tools/arxiv/tool.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/langchain/tools/arxiv/tool.py b/langchain/tools/arxiv/tool.py index 76513e27a1..a9144dd8fa 100644 --- a/langchain/tools/arxiv/tool.py +++ b/langchain/tools/arxiv/tool.py @@ -2,6 +2,8 @@ from typing import Optional +from pydantic import Field + from langchain.callbacks.manager import ( AsyncCallbackManagerForToolRun, CallbackManagerForToolRun, @@ -22,7 +24,7 @@ class ArxivQueryRun(BaseTool): "from scientific articles on arxiv.org. " "Input should be a search query." ) - api_wrapper: ArxivAPIWrapper + api_wrapper: ArxivAPIWrapper = Field(default_factory=ArxivAPIWrapper) def _run( self,