Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

GoogleSerperAPIWrapper gives error " Input should be a valid string [type=string_type, input_value={'description': 'Dr. Mihi...n field', 'type': 'str'}, input_type=dict] For further information visit https://errors.pydantic.dev/2.10/v/string_type." #1930

Open
Ansumanbhujabal opened this issue Feb 6, 2025 · 0 comments

Comments

@Ansumanbhujabal
Copy link

Sample Serper use

search = GoogleSerperAPIWrapper()
@tool("GoogleSearchTool")
def Google_search_tool(search_query: str):
    """Performs a search using the GoogleSearchTool."""
    return search().run(search_query)
## Defining Agents

famous_personality_reviewer_agent = Agent(role=
                          "Senior Content Validator and fact checker",
                          goal="Validate the content with facts and get the most correct content", 
                          backstory=
                          """
                          You are a Senior Content Validator and fact checker  who has been assigned to validate the task 
                          for the {career_name} field if {famous_personalities_name} You will give best fact based 
                          """,
                          llm=llm,
                          tools = [Google_search_tool],
                          verbose=True)

Error is

I encountered an error while trying to use the tool. This was the error: Arguments validation failed: 1 validation error for Googlesearchtool
search_query
  Input should be a valid string [type=string_type, input_value={'description': 'Dr. Mihi...n field', 'type': 'str'}, input_type=dict]
    For further information visit https://errors.pydantic.dev/2.10/v/string_type.
 Tool GoogleSearchTool accepts these inputs: Tool Name: GoogleSearchTool
Tool Arguments: {'search_query': {'description': None, 'type': 'str'}}
Tool Description: Performs a search using the GoogleSearchTool.

Dependecies

agentneo==1.2.3
cachetools==5.5.0
certifi==2024.12.14
crewai==0.95.0
crewai-tools==0.32.0
GitPython==3.1.44
google-api-core==2.24.0
google-auth==2.37.0
google-cloud-aiplatform==1.77.0
google-cloud-bigquery==3.27.0
google-cloud-core==2.4.1
google-cloud-resource-manager==1.14.0
google-cloud-storage==2.19.0
google-crc32c==1.6.0
google-resumable-media==2.7.2
googleapis-common-protos==1.66.0
groq==0.13.1
grpc-google-iam-v1==0.14.0
langchain==0.3.17
langchain-cohere==0.3.4
langchain-community==0.3.16
langchain-core==0.3.33
langchain-exa==0.2.1
langchain-experimental==0.3.4
langchain-groq==0.2.2
langchain-openai==0.2.14
langchain-pinecone==0.2.0
langchain-text-splitters==0.3.5
pydantic==2.10.4
pydantic-settings==2.7.1
pydantic_core==2.27.2
scrapegraph_py==1.10.0
selenium==4.27.1
serpapi==0.1.5
setuptools==75.8.0

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant