Skip to content

Commit

Permalink
Fix llm not recognizing pydantic tool definition for dict types (#782)
Browse files Browse the repository at this point in the history
* Update src/tools.py pydantic imports to use v1 from v2

Signed-off-by: JoshuaL3000 <[email protected]>
  • Loading branch information
JoshuaL3000 authored Oct 21, 2024
1 parent 7e085a4 commit f36ca80
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion comps/agent/langchain/src/tools.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
import yaml
from langchain.tools import BaseTool, StructuredTool
from langchain_community.agent_toolkits.load_tools import load_tools
from pydantic import BaseModel, Field, create_model
from pydantic.v1 import BaseModel, Field, create_model


def generate_request_function(url):
Expand Down

0 comments on commit f36ca80

Please sign in to comment.