OpenBMB / ToolBench

[ICLR'24 spotlight] An open platform for training, serving, and evaluating large language model for tool learning.
https://openbmb.github.io/ToolBench/
Apache License 2.0
4.76k stars 401 forks source link

多轮对话 #70

Closed x2ss closed 1 year ago

x2ss commented 1 year ago

您好, 首先感谢你对这个issue的解答,我解析之后,得到如下结果: { "id": "Step 6: Help me find information about the customs agency 'Gondrand' in New Caledonia. I need their contact details, including postal code, email, name, and phone number. Additionally, can you provide a comprehensive list of all transitaires?", "conversations": [ { "from": "system", "value": "You are AutoGPT, you can use many tools(functions) to do the following task.\nFirst I will give you the task description, and your task start.\nAt each step, you need to give your thought to analyze the status now and what to do next, with a function call to actually excute your step. Your output should follow this format:\nThought:\nAction\nAction Input:\n\nAfter the call, you will get the call result, and you are now in a new state.\nThen you will analyze your status now, then decide what to do next...\nAfter many (Thought-call) pairs, you finally perform the task, then you can give your finial answer.\nRemember: \n1.the state change is irreversible, you can't go back to one of the former state, if you want to restart the task, say \"I give up and restart\".\n2.All the thought is short, at most in 5 sentence.\n3.You can do more then one trys, so if your plan is to continusly try some conditions, you can do one of the conditions per try.\nLet's Begin!\nTask description: You should use functions to help handle the real time user querys. Remember:\n1.ALWAYS call \"Finish\" function at the end of the task. And the final answer should contain enough information to show to the user,If you can't handle the task, or you find that function calls always fail(the function is not valid now), use function Finish->give_up_and_restart.\n2.Do not use origin tool names, use only subfunctions' names.\nYou have access of the following tools:\n1.transitaires: Transitaires de dédouanement en Nouvelle-Calédonie\n\nSpecifically, you have access to the following APIs: [{'name': 'transitaire_for_transitaires', 'description': 'This is the subfunction for tool \"transitaires\", you can use this tool.The description of this function is: \"Récupère un transitaire donnée\"', 'parameters': {'type': 'object', 'properties': {'is_id': {'type': 'string', 'description': '', 'example_value': 'DOUANE_AGENCE_GONDRAND'}}, 'required': ['is_id'], 'optional': []}}, {'name': 'transitaires_for_transitaires', 'description': 'This is the subfunction for tool \"transitaires\", you can use this tool.The description of this function is: \"Renvoie tous les transiatires\"', 'parameters': {'type': 'object', 'properties': {}, 'required': [], 'optional': []}}, {'name': 'Finish', 'description': \"If you think you get the result which can answer the task, call this function to give the final answer. Or, if you think you can't handle the task from this status, call this function to restart. Remember: you should ALWAYS call this function at the end of your try, and the final answer is the ONLY part that will be showed to user, so final answer should contain enough information.\", 'parameters': {'type': 'object', 'properties': {'return_type': {'type': 'string', 'enum': ['give_answer', 'give_up_and_restart']}, 'final_answer': {'type': 'string', 'description': 'The final answer you want to give the user. You should have this field if \"return_type\"==\"give_answer\"'}}, 'required': ['return_type']}}]" }, { "from": "user", "value": "\nHelp me find information about the customs agency 'Gondrand' in New Caledonia. I need their contact details, including postal code, email, name, and phone number. Additionally, can you provide a comprehensive list of all transitaires?\nBegin!\n" }, { "from": "assistant", "value": "\nThought: \nAction: transitaires_for_transitaires\nAction Input: {}" }, { "from": "function", "value": "{\"error\": \"\", \"response\": \"[{\\"id\\":\\"EKVF\\",\\"name\\":\\"EKVF\\",\\"phone\\":\\"+687 27.25.92\\"},{\\"id\\":\\"ACT_AGENCE_CALEDONIENNE_DE_TRANSIT\\",\\"codePostal\\":\\"98800\\",\\"email\\":\\"sales@act.nc\\",\\"name\\":\\"ACT - Agence Cal\u00e9donienne de Transit\\",\\"phone\\":\\"+687 27.55.48\\",\\"ridet\\":\\"0036590\\"},{\\"id\\":\\"AFL_AGENCE_DE_FRET_ET_LOGISTIQUE\\",\\"codePostal\\":\\"98846\\",\\"name\\":\\"AFL - Agence de Fr\u00eat et Logistique\\",\\"phone\\":\\"+687 26.11.11\\",\\"website\\":\\"www.transportinter.eu\\"},{\\"id\\":\\"AGENCE_LOGISTIQUE_ET_TRANSIT_NOUMEA\\",\\"codePostal\\":\\"98800\\",\\"email\\":\\"ltn@ltn.nc\\",\\"name\\":\\"Agence Logistique et Transit Noum\u00e9a\\",\\"phone\\":\\"+687 24.21.85\\",\\"website\\":\\"www.ltn.nc\\"},{\\"id\\":\\"ATI_TRAMAR_GROUPE_LEON_VINCENT\\",\\"name\\":\\"ATI TRAMAR- Groupe L\u00e9on Vincent\\",\\"phone\\":\\"+687 28.61.25\\"},{\\"id\\":\\"ATL_LINES_DEMLINES\\",\\"email\\":\\"e.fleurence@atl-lines.fr\\",\\"name\\":\\"ATL Lines - DEMLINES\\",\\"website\\":\\"nouvellecaledonie.demlines.com\\"},{\\"id\\":\\"BOLLORE_LOGISTICS_NOUMEA\\",\\"codePostal\\":\\"9..." }, { "from": "assistant", "value": "\nThought: \nAction: transitaire_for_transitaires\nAction Input: {\n \"is_id\": \"Gondrand\"\n}" }, { "from": "function", "value": "{\"error\": \"\", \"response\": \"\"}" }, { "from": "assistant", "value": "\nThought: \nAction: transitaires_for_transitaires\nAction Input: {}" } ] }, 这似乎是一个多轮对话结果,这个还需要进一步处理,才能用来被训练对话对吗,因为我之前的理解都是历史也是塞到相关位置,但本质上还是一个单轮对话对。。。

期待您的回复,再次感谢您的帮助!

pooruss commented 1 year ago

您好,以上是已经处理好的数据,不需要进一步处理,训练时会把最后一条assistant的message作为target

x2ss commented 1 year ago

您好,以上是已经处理好的数据,不需要进一步处理,训练时会把最后一条assistant的message作为target

收到,感谢您的回复,那我理解之前的assistant的回复,会作为历史对话,被加入到问答对中去是吗?

pooruss commented 1 year ago

是的

x2ss commented 1 year ago

是的

感谢!