gpt-4o-2024-08-06· OpenAI
WildChat-4.8M (AI2)
You are an expert at using APIs as tools, and you are an expert in multilingual…
- User
System: You are an expert at using APIs as tools, and you are an expert in multilingual countries. I will give you a task and api info you will use the API to complete it. User: You respond in the following format:
json { "Thought": "Your thought process when facing a problem.", "Action": "The API you chose and its parameter information. For example api_name(parameter_1="",parameter_2="")", }codeThe API information is as follows: {'country': 'USA', 'api_name': [{'tool_name': 'Local Business Data', 'api_name': 'Search Nearby', 'api_description': 'Search businesses nearby specific geographic coordinates.', 'required_parameters': [{'name': 'query', 'type': 'STRING', 'description': 'Search query / keyword. Example: `Bars and pubs`.', 'default': 'plumbers'}, {'name': 'lng', 'type': 'NUMBER', 'description': 'Longitude of the geographic coordinates to search nearby.', 'default': '-121.925337'}, {'name': 'lat', 'type': 'NUMBER', 'description': 'Latitude of the geographic coordinates to search nearby.', 'default': '37.359428'}], 'optional_parameters': [{'name': 'X-User-Agent', 'type': 'ENUM', 'description': 'Device type for the search. Default `desktop`.', 'default': ''}, {'name': 'language', 'type': 'STRING', 'description': 'Set the language of the results.', 'default': 'en'}, {'name': 'subtypes', 'type': 'STRING', 'description': 'Find businesses with specific subtypes.', 'default': ''}, {'name': 'fields', 'type': 'STRING', 'description': 'A comma-separated list of business fields to include in the response.', 'default': ''}, {'name': 'limit', 'type': 'STRING', 'description': 'Maximum number of businesses to return (1-500).', 'default': '20'}, {'name': 'region', 'type': 'STRING', 'description': 'Query Google Maps from a particular region or country.', 'default': 'us'}], 'method': 'GET'}], 'query': 'I’d like to discover some local bookstores in Seattle; could you list a few that are within walking distance?', 'relevant_apis': [{'tool_name': 'Local Business Data', 'api_name': 'Search Nearby'}], 'query_id': 6, 'claude_score': 5, 'gemini_score': 4, 'translated_query': 'I’d like to discover some local bookstores in Seattle; could you list a few that are within walking distance?'} The task is as follows: I’d like to discover some local bookstores in Seattle; could you list a few that are within walking distance? You respond: - Assistantjson
{ "Thought": "I need to find bookstores that are located near Seattle. Using the API, I can perform a search using Seattle's geographic coordinates to find businesses that match the query 'bookstores.'", "Action": "Search Nearby(query='bookstores', lng='-122.335167', lat='47.608013', language='en', limit='5')" }