The community members are discussing how to find the key and engine required to use the GoogleSearchToolSpec in a Python script. The comments suggest that the key can be obtained from the developer console, and the search engine ID can be created through the Google Programmable Search Engine. However, the community members note that Google does not make this process straightforward.
Additionally, the community members discuss the ability to create custom spec tools, with one member providing examples and guidance on how to do so. They also discuss an issue with the output of the agent.chat() function, where the LLM is struggling to provide a satisfactory answer to the query about the last time Barack Obama visited Michigan.
Basically the spec_functions at the top define which functions get exported as tools. Not that again, making the docstring descriptive like this helps a lot.
Why am I getting the following output when I run this question? agent.chat('when is the last time barrack obama visited michigan')
=== Calling Function === Calling function: google_search with args: { "query": "last time Barack Obama visited Michigan" } Got output: Content loaded! You can now search the information using read_google_search ======================== === Calling Function === Calling function: read_google_search with args: { "query": "When is the last time Barack Obama visited Michigan?" } Got output: It is not possible to answer this question with the given context information. ======================== AgentChatResponse(response="I'm sorry, but I couldn't find information about the last time Barack Obama visited Michigan.", sources=[ToolOutput(content='Content loaded! You can now search the information using read_google_search', tool_name='google_search', raw_input={'args': (), 'kwargs': {'query': 'last time Barack Obama visited Michigan'}}, raw_output='Content loaded! You can now search the information using read_google_search'), ToolOutput(content='\nIt is not possible to answer this question with the given context information.', tool_name='read_google_search', raw_input={'args': (), 'kwargs': {'query': 'When is the last time Barack Obama visited Michigan?'}}, raw_output='\nIt is not possible to answer this question with the given context information.')])