Comments (1)
经过我测试发现
openai functions 和 function_call 将要废弃,指定function_call,返回然是messages响应.
{'model': 'gpt-3.5-turbo-16k', 'messages': [{'role': 'system', 'content': 'You are an efficient plan-generation agent, your task is to decompose a query into several subtasks that describe must achieved goals for the query.\n--- Background Information ---\nPLAN AND SUBTASK:\nA plan has a tree manner of subtasks: task 1 contatins subtasks task 1.1, task 1.2, task 1.3, ... and task 1.2 contains subtasks 1.2.1, 1.2.2, ...\n\nA subtask-structure has the following json component:\n{\n"subtask name": string, name of the subtask\n"goal.goal": string, the main purpose of the subtask, and what will you do to reach this goal?\n"goal.criticism": string, what potential problems may the current subtask and goal have?\n"milestones": list[string]. what milestones should be achieved to ensure the subtask is done? Make it detailed and specific.\n}\nSUBTASK HANDLE:\nA task-handling agent will handle all the subtasks as the inorder-traversal. For example:\n1. it will handle subtask 1 first.\n2. if solved, handle subtask 2. If failed, split subtask 1 as subtask 1.1 1.2 1.3... Then handle subtask 1.1 1.2 1.3...\n3. Handle subtasks recurrsively, until all subtasks are soloved. Do not make the task queue too complex, make it efficiently solve the original task.\n4. It is powered by a state-of-the-art LLM, so it can handle many subtasks without using external tools or execute codes.\n\nRESOURCES:\n1. Internet access for searches and information gathering, search engine and web browsing.\n2. A FileSystemEnv to read and write files (txt, code, markdown, latex...)\n3. A python notebook to execute python code. Always follow python coding rules.\n4. A ShellEnv to execute bash or zsh command to further achieve complex goals. \n--- Task Description ---\nGenerate the plan for query with operation SUBTASK_SPLIT, make sure all must reach goals are included in the plan.\n\n*** Important Notice ***\n- Always make feasible and efficient plans that can lead to successful task solving. Never create new subtasks that similar or same as the existing subtasks.\n- For subtasks with similar goals, try to do them together in one subtask with a list of subgoals, rather than split them into multiple subtasks.\n- Do not waste time on making irrelevant or unnecessary plans.\n- The task handler is powered by sota LLM, which can directly answer many questions. So make sure your plan can fully utilize its ability and reduce the complexity of the subtasks tree.\n- You can plan multiple subtasks if you want.\n- Minimize the number of subtasks, but make sure all must reach goals are included in the plan.\n'}, {'role': 'user', 'content': 'This is not the first time you are handling the task, so you should give a initial plan. Here is the query:\n"""\n{\n "name": "act as Assistant",\n "goal": "帮我生成一些数字",\n "prior_plan_criticsim": "",\n "milestones": [],\n "exceute_status": "TODO"\n}\n"""\nYou will use operation SUBTASK_SPLIT to split the query into 2-4 subtasks and then commit.'}], 'functions': [{'name': 'subtask_split_operation', 'description': 'further split the target subtask into subtasks. You can only split a status==FAIL task', 'parameters': {'type': 'object', 'properties': {'target_subtask_id': {'type': 'string', 'description': "Which subtask do you want to modify. This must be a inter split by '.', like '1.2' '2.3.3' or '4'. You must ensure this subtask exists and is a FAIL task"}, 'subtasks': {'type': 'array', 'description': 'Max 3 items, min 1 items. Array of the splited subtasks, length of 1-3', 'items': {'type': 'object', 'properties': {'subtask name': {'type': 'string'}, 'goal': {'type': 'object', 'properties': {'goal': {'type': 'string', 'description': 'the main purpose of what the sub-task should handle, and what will you do(tool calls) to reach this goal'}, 'criticism': {'type': 'string', 'description': 'What problems may the current subtask and goal have?'}}}, 'milestones': {'type': 'array', 'description': 'How to automatically check the subtask is done? The subtasks after this subtask will consider all the milestones are done.', 'items': {'type': 'string'}}}, 'required': ['subtask name', 'goal', 'milestones']}}, 'thought': {'description': 'Why you choose this operation, and what you want to do next?', 'type': 'string'}}, 'required': ['target_subtask_id', 'subtasks', 'thought']}}], 'function_call': {'name': 'subtask_split_operation'}}
使用 openai
tools
tools_call
不会出现这种情况
{ 'model': 'gpt-3.5-turbo-16k', 'messages': [ { 'role': 'system', 'content': 'You are an efficient plan-generation agent, your task is to decompose a query into several subtasks that describe must achieved goals for the query.\n--- Background Information ---\nPLAN AND SUBTASK:\nA plan has a tree manner of subtasks: task 1 contatins subtasks task 1.1, task 1.2, task 1.3, ... and task 1.2 contains subtasks 1.2.1, 1.2.2, ...\n\nA subtask-structure has the following json component:\n{\n"subtask name": string, name of the subtask\n"goal.goal": string, the main purpose of the subtask, and what will you do to reach this goal?\n"goal.criticism": string, what potential problems may the current subtask and goal have?\n"milestones": list[string]. what milestones should be achieved to ensure the subtask is done? Make it detailed and specific.\n}\nSUBTASK HANDLE:\nA task-handling agent will handle all the subtasks as the inorder-traversal. For example:\n1. it will handle subtask 1 first.\n2. if solved, handle subtask 2. If failed, split subtask 1 as subtask 1.1 1.2 1.3... Then handle subtask 1.1 1.2 1.3...\n3. Handle subtasks recurrsively, until all subtasks are soloved. Do not make the task queue too complex, make it efficiently solve the original task.\n4. It is powered by a state-of-the-art LLM, so it can handle many subtasks without using external tools or execute codes.\n\nRESOURCES:\n1. Internet access for searches and information gathering, search engine and web browsing.\n2. A FileSystemEnv to read and write files (txt, code, markdown, latex...)\n3. A python notebook to execute python code. Always follow python coding rules.\n4. A ShellEnv to execute bash or zsh command to further achieve complex goals. \n--- Task Description ---\nGenerate the plan for query with operation SUBTASK_SPLIT, make sure all must reach goals are included in the plan.\n\n*** Important Notice ***\n- Always make feasible and efficient plans that can lead to successful task solving. Never create new subtasks that similar or same as the existing subtasks.\n- For subtasks with similar goals, try to do them together in one subtask with a list of subgoals, rather than split them into multiple subtasks.\n- Do not waste time on making irrelevant or unnecessary plans.\n- The task handler is powered by sota LLM, which can directly answer many questions. So make sure your plan can fully utilize its ability and reduce the complexity of the subtasks tree.\n- You can plan multiple subtasks if you want.\n- Minimize the number of subtasks, but make sure all must reach goals are included in the plan.\n' }, { 'role': 'user', 'content': 'This is not the first time you are handling the task, so you should give a initial plan. Here is the query:\n"""\n{\n "name": "act as Assistant",\n "goal": "tel me 1+1",\n "prior_plan_criticsim": "",\n "milestones": [],\n "exceute_status": "TODO"\n}\n"""\nYou will use operation SUBTASK_SPLIT to split the query into 2-4 subtasks and then commit.'} ], 'tools': [ { "type": "function", "function": { 'name': 'subtask_split_operation', 'description': 'further split the target subtask into subtasks. You can only split a status==FAIL task', 'parameters': { 'type': 'object', 'properties': { 'target_subtask_id': { 'type': 'string', 'description': "Which subtask do you want to modify. This must be a inter split by '.', like '1.2' '2.3.3' or '4'. You must ensure this subtask exists and is a FAIL task" }, 'subtasks': { 'type': 'array', 'description': 'Max 3 items, min 1 items. Array of the splited subtasks, length of 1-3', 'items': { 'type': 'object', 'properties': { 'subtask name': { 'type': 'string' }, 'goal': { 'type': 'object', 'properties': { 'goal': { 'type': 'string', 'description': 'the main purpose of what the sub-task should handle, and what will you do(tool calls) to reach this goal' }, 'criticism': { 'type': 'string', 'description': 'What problems may the current subtask and goal have?' } } }, 'milestones': { 'type': 'array', 'description': 'How to automatically check the subtask is done? The subtasks after this subtask will consider all the milestones are done.', 'items': {'type': 'string'} } }, 'required': ['subtask name', 'goal', 'milestones'] } }, 'thought': { 'description': 'Why you choose this operation, and what you want to do next?', 'type': 'string' } }, 'required': ['target_subtask_id', 'subtasks', 'thought'] } } } ], 'tool_choice': {"type": "function", "function": {"name": "subtask_split_operation"}} }
from xagent.
Related Issues (20)
- 什么时候更新版本啊,已经两周多没更新代码了
- try to run XAgentLlama in docker, but Error out: Bfloat16 is only supported on GPUs with compute capability of at least 8.0. Your NVIDIA GeForce RTX ..GPU has compute capability 7.5. HOT 3
- 是否支持 gpt-4-1106-preview? HOT 1
- ValueError: <string>:1 Unexpected "i" at column 3 HOT 1
- 运行卡死并且报错 HOT 1
- gunicorn.errors.HaltServer: <HaltServer 'Worker failed to boot.' 3> HOT 2
- 运行时候弹出Error“max_workers must be greater than 0”
- Docker Enabling Privileged Mode Causes Container Escapes
- 执行任务发生数据库连接报错 HOT 1
- docker内部请求异常终止导致会话超时
- docker拉去成功,run.py后一只重复打印chatcompletion: using gpt-4-32k HOT 3
- Error in task_handler 和 NoneType 错误 HOT 1
- 1、docker 容器中,MongoDB、MySql、Redis 分别用来做什么的,能否自定义集成向量库、图数据库、索引库自定义 RAG
- 2、如何人工干预任务拆解
- 支持本地部署的LLM吗?
- 执行python run.py 的时候报错KeyError: 0,错误定位在plan_exec.py line 178 HOT 3
- xagentllama-34b-preview 使用transformer加载报错: model = AutoModelForCausalLM.from_pretrained( File "/data/envs_qwen_xgentllama_service/lib/python3.9/site-packages/transformers/models/auto/auto_factory.py", line 566, in from_pretrained return model_class.from_pretrained( File "/envs_qwen_xgentllama_service/lib/python3.9/site-packages/transformers/modeling_utils.py", line 3206, in from_pretrained raise EnvironmentError( OSError: Error no file named pytorch_model.bin, tf_model.h5, model.ckpt.index or flax_model.msgpack found in
- xagentllama-34b-preview 缺少 pytorch_model.bin.index.json, 使用transformers 库加载报错
- 疑问:parse_web_text 配置
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from xagent.