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': 'China', 'api_name': [{'tool_name': '文字识别OCR', 'api_name': '文字识别OCR接口', 'api_description': '用于发送图片进行文字识别的API接口', 'required_parameters': [{'name': 'token', 'type': 'string', 'description': 'api-key', 'default': 'www.tulingyun.com'}, {'name': 'upfile_b64', 'type': 'string', 'description': '使用base64编码图片文件', 'default': ''}], 'optional_parameters': [{'name': 'return_text', 'type': 'int', 'description': '识别到多处文字时的拼接符号,0为不拼接,返回list,1为用空格拼接,2为换行拼接,默认为0,注意:此值为1或2时只返回纯识别文本,无位置信息', 'default': ''}, {'name': 'only_rec', 'type': 'int', 'description': '是否为单行文本,0为普通识别模式,1为单行文本识别,默认为0。注意:单行文本使用1时识别更准确,但要求请求图片必须为单行,否则无法识别。', 'default': ''}], 'method': 'POST'}], 'query': '我有一张名片的照片,你能提取上面的所有文本信息吗?', 'relevant_apis': [{'tool_name': '文字识别OCR', 'api_name': '文字识别OCR接口'}], 'query_id': 2, 'claude_score': 4, 'gemini_score': 5, 'translated_query': '我有一张名片的照片,你能提取上面的所有文本信息吗?'} The task is as follows: 我有一张名片的照片,你能提取上面的所有文本信息吗? You respond:Assistant:
- Assistantjson
{ "Thought": "The task is to extract all text information from a photo of a business card. The relevant API for this task is the '文字识别OCR接口', which is designed for text recognition by sending an image file encoded in base64 format. I will use this API to complete the task.", "Action": "文字识别OCR接口(token='www.tulingyun.com', upfile_b64='base64_encoded_image')" }