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="")", }The API information is as follows: {'country': 'USA', 'api_name': [{'tool_name': 'US Zipcodes', 'api_name': 'code_search', 'api_description': 'Find zip codes by city name.', 'required_parameters': [{'name': 'q', 'type': 'STRING', 'description': 'City name for searching.', 'default': 'New'}], 'optional_parameters': [], 'method': 'GET'}], 'query': 'Can you help me find the zip code for San Francisco so I can send a package there?', 'relevant_apis': [{'tool_name': 'US Zipcodes', 'api_name': 'code_search'}], 'query_id': 1, 'claude_score': 4, 'gemini_score': 5, 'translated_query': "May I know which specific area within San Francisco you're sending the package to, as zip codes may vary by neighborhood? This will help me provide you with the correct zip code."} The task is as follows: May I know which specific area within San Francisco you're sending the package to, as zip codes may vary by neighborhood? This will help me provide you with the correct zip code. You respond:Assistant:
- Assistant
{ "Thought": "The task is to find the zip code for San Francisco. Based on the provided API information, the 'US Zipcodes' API's 'code_search' method can be used to find zip codes by city name. Since no specific neighborhood within San Francisco is mentioned, I will proceed with a general search for zip codes in San Francisco.", "Action": "code_search(q=\"San Francisco\")" }