You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Traceback (most recent call last):
File "D:\pythonProject\llm_agents\run_agent.py", line 1, in
from llm_agents import Agent, ChatLLM, PythonREPLTool, HackerNewsSearchTool, SerpAPITool
File "D:\pythonProject\llm_agents\llm_agents_init_.py", line 5, in
from llm_agents.tools.search import SerpAPITool
File "D:\pythonProject\llm_agents\llm_agents\tools\search.py", line 74, in
class SerpAPITool(ToolInterface):
File "D:\Anaconda\envs\agents\Lib\site-packages\pydantic_internal_model_construction.py", line 96, in new
private_attributes = inspect_namespace(
^^^^^^^^^^^^^^^^^^
File "D:\Anaconda\envs\agents\Lib\site-packages\pydantic_internal_model_construction.py", line 391, in inspect_namespace
raise PydanticUserError(
pydantic.errors.PydanticUserError: Field 'name' defined on a base class was overridden by a non-annotated attribute. All field definitions, including overrides, require a type annotation.
For further information visit https://errors.pydantic.dev/2.8/u/model-field-overridden
I don't know if it's a version update of the library, or if it's my configuration problem, I need to re-enforce the type definition in all utility classes, such as:
class GoogleSearchTool(ToolInterface):
"""Tool for Google search results."""
name:str = "Google Search"
description:str = "Get specific information from a search query. Input should be a question like 'How to add number in Clojure?'. Result will be the answer to the question."
def use(self, input_text: str) -> str:
return search(input_text)`
The text was updated successfully, but these errors were encountered:
I don't know if it's a version update of the library, or if it's my configuration problem, I need to re-enforce the type definition in all utility classes, such as:
The text was updated successfully, but these errors were encountered: