From a4d1fbecb311a729780dcdcabe3f9e56cc6e3c2f Mon Sep 17 00:00:00 2001 From: zzr-fox Date: Fri, 6 Mar 2026 19:29:33 +0800 Subject: [PATCH 1/2] Add new YAML file --- yaml_instance/demo_MathHelper.yaml | 221 +++++++++++++++++++++++++++++ 1 file changed, 221 insertions(+) create mode 100644 yaml_instance/demo_MathHelper.yaml diff --git a/yaml_instance/demo_MathHelper.yaml b/yaml_instance/demo_MathHelper.yaml new file mode 100644 index 000000000..8c0675b18 --- /dev/null +++ b/yaml_instance/demo_MathHelper.yaml @@ -0,0 +1,221 @@ +graph: + id: demo_MathHelper + description: 'A math assistant workflow. Able to answer college-level math questions and provide similar questions.' + log_level: DEBUG + is_majority_voting: false + nodes: + - id: Read + type: agent + config: + name: + provider: + role: |- + 你是一名数学高手,擅长解决大学数学问题。 + 你的任务是:接受用户给出的数学问题,分析题意,拆解已知条件和所求,分条陈述给下一个节点。 + 注意:只需分析题意和所求,不要给出解题步骤和解题方法。 + base_url: ${BASE_URL} + api_key: ${API_KEY} + params: {} + tooling: [] + thinking: null + memories: [] + retry: null + description: '' + context_window: 3 + log_output: true + - id: Solve + type: agent + config: + name: + provider: + role: |- + 你是一个数学高手,擅长解决大学数学问题。 + 你的任务是:根据提供的拆解后的已知条件和所求,深入分析,得出一个相对快捷的解法,并将解题步骤陈述给下一个节点。 + 注意:不要给出完整的解法,只需给出思路和解题步骤 + base_url: ${BASE_URL} + api_key: ${API_KEY} + params: {} + tooling: [] + thinking: null + memories: [] + retry: null + description: '' + context_window: 3 + log_output: true + - id: Check + type: agent + config: + name: + provider: + role: | + 你是一个数学高手,擅长解决大学数学问题。 + 你的任务是:检查给出的解法是否能真正解决该问题,如果解法正确,不用做任何操作,如果解法有错误,直接给出修改后的解法。 + base_url: ${BASE_URL} + api_key: ${API_KEY} + params: {} + tooling: [] + thinking: null + memories: [] + retry: null + description: '' + context_window: 3 + log_output: true + - id: Print + type: agent + config: + name: + provider: + role: | + 你是一个数学高手,擅长解决大学数学问题。 + 你的任务是:根据陈述的数学题解法,用严谨的格式给出一个简洁的完整的回答,并打印到对话框中,作为对该数学题的最终答案。 + base_url: ${BASE_URL} + api_key: ${API_KEY} + params: {} + tooling: [] + thinking: null + memories: [] + retry: null + description: '' + context_window: 3 + log_output: true + - id: Rethink + type: agent + config: + name: + provider: + role: | + 你是一个数学高手,擅长解决大学数学问题。 + 你的任务是:根据题目分析和解法步骤,给出一道运用了相同或相似知识点解决的数学题,并直接给出解题步骤,并阐述相似点在何处 + base_url: ${BASE_URL} + api_key: ${API_KEY} + params: {} + tooling: [] + thinking: null + memories: [] + retry: null + description: '' + context_window: 3 + log_output: true + - id: Human View + type: human + config: + description: |- + 如果你想再看一道相似题目,请输入one more。 + 如果不想,请输入stop。 + description: '' + context_window: 0 + log_output: true + edges: + - from: Read + to: Solve + trigger: true + condition: + type: function + config: + name: 'true' + carry_data: true + keep_message: false + clear_context: false + clear_kept_context: false + process: null + dynamic: null + - from: Solve + to: Check + trigger: true + condition: + type: function + config: + name: 'true' + carry_data: true + keep_message: false + clear_context: false + clear_kept_context: false + process: null + dynamic: null + - from: Check + to: Print + trigger: true + condition: + type: function + config: + name: 'true' + carry_data: true + keep_message: false + clear_context: false + clear_kept_context: false + process: null + dynamic: null + - from: Print + to: Rethink + trigger: true + condition: + type: function + config: + name: 'true' + carry_data: true + keep_message: false + clear_context: false + clear_kept_context: false + process: null + dynamic: null + - from: Rethink + to: Human View + trigger: true + condition: + type: function + config: + name: 'true' + carry_data: true + keep_message: false + clear_context: false + clear_kept_context: false + process: null + dynamic: null + - from: Human View + to: Rethink + trigger: true + condition: + type: keyword + config: + any: + - one more + none: [] + regex: [] + case_sensitive: true + carry_data: true + keep_message: false + clear_context: false + clear_kept_context: false + process: null + dynamic: null + - from: Read + to: Rethink + trigger: false + condition: + type: function + config: + name: 'true' + carry_data: true + keep_message: false + clear_context: false + clear_kept_context: false + process: null + dynamic: null + - from: Read + to: Check + trigger: false + condition: + type: function + config: + name: 'true' + carry_data: true + keep_message: false + clear_context: false + clear_kept_context: false + process: null + dynamic: null + memory: [] + initial_instruction: '' + start: + - Read + end: [] From 26049081f3d9ef2e2dbdd56e0c1891d869bc9966 Mon Sep 17 00:00:00 2001 From: zzr-fox Date: Fri, 6 Mar 2026 19:47:42 +0800 Subject: [PATCH 2/2] Update PR --- yaml_instance/demo_MathHelper.yaml | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/yaml_instance/demo_MathHelper.yaml b/yaml_instance/demo_MathHelper.yaml index 8c0675b18..44c2e24b7 100644 --- a/yaml_instance/demo_MathHelper.yaml +++ b/yaml_instance/demo_MathHelper.yaml @@ -7,8 +7,8 @@ graph: - id: Read type: agent config: - name: - provider: + name: gpt-4o + provider: openai role: |- 你是一名数学高手,擅长解决大学数学问题。 你的任务是:接受用户给出的数学问题,分析题意,拆解已知条件和所求,分条陈述给下一个节点。 @@ -26,8 +26,8 @@ graph: - id: Solve type: agent config: - name: - provider: + name: gpt-4o + provider: openai role: |- 你是一个数学高手,擅长解决大学数学问题。 你的任务是:根据提供的拆解后的已知条件和所求,深入分析,得出一个相对快捷的解法,并将解题步骤陈述给下一个节点。 @@ -45,8 +45,8 @@ graph: - id: Check type: agent config: - name: - provider: + name: gpt-4o + provider: openai role: | 你是一个数学高手,擅长解决大学数学问题。 你的任务是:检查给出的解法是否能真正解决该问题,如果解法正确,不用做任何操作,如果解法有错误,直接给出修改后的解法。 @@ -63,8 +63,8 @@ graph: - id: Print type: agent config: - name: - provider: + name: gpt-4o + provider: openai role: | 你是一个数学高手,擅长解决大学数学问题。 你的任务是:根据陈述的数学题解法,用严谨的格式给出一个简洁的完整的回答,并打印到对话框中,作为对该数学题的最终答案。 @@ -81,8 +81,8 @@ graph: - id: Rethink type: agent config: - name: - provider: + name: gpt-4o + provider: openai role: | 你是一个数学高手,擅长解决大学数学问题。 你的任务是:根据题目分析和解法步骤,给出一道运用了相同或相似知识点解决的数学题,并直接给出解题步骤,并阐述相似点在何处