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
I searched the LangChain documentation with the integrated search.
I used the GitHub search to find a similar question and didn't find it.
I am sure that this is a bug in LangChain rather than my code.
The bug is not resolved by updating to the latest stable version of LangChain (or the specific integration package).
Example Code
from langchain_core.tools import Tool
from langchain_community.utilities import GoogleSearchAPIWrapper
import os
os.environ["GOOGLE_CSE_ID"] = "" # Your Google CSE ID
os.environ["GOOGLE_API_KEY"] = ""
search = GoogleSearchAPIWrapper()
tool = Tool(
name="google_search",
description="Search Google for recent results.",
func=search.run,
)
result = tool.run("Obama's first name?")
print(result)
Checked other resources
Example Code
Error Message and Stack Trace (if applicable)
No response
Description
I want to call the Google Search API, and successfully run this website:
https://www.googleapis.com/customsearch/v1?key=YOUR_API_KEY&cx=YOUR_CX&q=SEARCH_QUERY
However, when I use the GoogleSearchAPIWrapper with the key and cx_id, it will generate an error: TimeoutError: [WinError 10060]
System Info
pip install google-api-python-client >=2.100.0
The text was updated successfully, but these errors were encountered: