Skip to content

Commit c00630d

Browse files
committed
fix import
1 parent 6722e2d commit c00630d

File tree

2 files changed

+9
-1
lines changed

2 files changed

+9
-1
lines changed

docs/en/tune_your_first_agent.md

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -284,6 +284,10 @@ ajet --conf tutorial/example_math_agent/math_agent.yaml
284284
import re
285285
from loguru import logger
286286
from agentscope.message import Msg
287+
from agentscope.agent import ReActAgent
288+
from agentscope.formatter import DashScopeChatFormatter
289+
from agentscope.memory import InMemoryMemory
290+
from agentscope.tool import Toolkit, execute_python_code
287291
from ajet import AjetTuner, Workflow, WorkflowOutput, WorkflowTask
288292

289293

@@ -340,7 +344,6 @@ ajet --conf tutorial/example_math_agent/math_agent.yaml
340344
if match: is_success = (match.group(1) == reference_answer)
341345
else: is_success = False
342346
return WorkflowOutput(reward=(1.0 if is_success else 0.0), metadata={"final_answer": final_answer})
343-
344347
```
345348

346349
=== "`math_agent.yaml` - Configuration Yaml"

tutorial/example_math_agent/math_agent.yaml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,11 @@ ajet:
1919

2020
rollout:
2121
user_workflow: "tutorial.example_math_agent.math_agent->ExampleMathLearn" # ✨✨✨✨ write and select workflow
22+
# user_workflow: "tutorial.example_math_agent.math_agent_langchain->ExampleMathLearn" # ✨if you prefer langchain version
23+
# user_workflow: "tutorial/example_math_agent/math_agent_oai_sdk.py->ExampleMathLearn_Simple_NoToolCall" # ✨if you prefer openai sdk version without toolcall
24+
# user_workflow: "tutorial/example_math_agent/math_agent_oai_sdk.py->ExampleMathLearn" # ✨if you prefer openai sdk version with toolcall
25+
# user_workflow: "tutorial/example_math_agent/math_agent_raw_http.py->ExampleMathLearn" # ✨if you do not want to use any agentic framwork at all
26+
# user_workflow: "tutorial/example_math_agent/math_agent_simplify.py->MathToolWorkflow" # ✨if you prefer to compute reward inside workflow
2227
temperature: 1.0
2328
max_env_worker: 64
2429
num_repeat: 6

0 commit comments

Comments
 (0)