Skip to content

Commit 7c91bc7

Browse files
authored
fix(docs): fix links and typos in the tuner example (#1131)
1 parent d2372e2 commit 7c91bc7

File tree

2 files changed

+7
-6
lines changed

2 files changed

+7
-6
lines changed

examples/tuner/react_agent/README.md

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -261,16 +261,17 @@ react_agent/
261261
```python
262262
from typing import Dict
263263

264-
from agentscope.tuner import tune, WorkflowOutput, JudgeOutput, DatasetConfig, TunerModelConfig, AlgorithmConfig
264+
from agentscope.tuner import tune, WorkflowOutput, JudgeOutput, DatasetConfig, AlgorithmConfig
265265
from agentscope.agent import ReActAgent
266+
from agentscope.model import ChatModelBase
266267
from agentscope.formatter import OpenAIChatFormatter
267268
from agentscope.message import Msg
268269

269270

270271
async def run_react_agent(
271272
task: Dict,
272-
model: TunerModelConfig,
273-
auxiliary_models: Dict[str, TunerModelConfig],
273+
model: ChatModelBase,
274+
auxiliary_models: Dict[str, ChatModelBase],
274275
) -> WorkflowOutput:
275276
agent = ReActAgent(
276277
name="react_agent",
@@ -289,7 +290,7 @@ async def run_react_agent(
289290

290291

291292
async def judge_function(
292-
task: Dict, response: Msg, auxiliary_models: Dict[str, TunerModelConfig]
293+
task: Dict, response: Msg, auxiliary_models: Dict[str, ChatModelBase]
293294
) -> JudgeOutput:
294295
"""Simple reward: 1.0 for exact match, else 0.0."""
295296
ground_truth = task["answer"]
@@ -362,4 +363,4 @@ After implementing the workflow function, follow these steps to run the training
362363
![reward_curve](./reward_curve.png)
363364

364365
> [!TIP]
365-
> For more tuning examples, refer to [tuner] directory of the AgentScope-Samples repository.
366+
> For more tuning examples, refer to [tuner](https://github.com/agentscope-ai/agentscope-samples/tree/main/tuner) directory of the AgentScope-Samples repository.

src/agentscope/tuner/_dataset.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,5 +57,5 @@ def preview(self, n: int = 5) -> List:
5757
streaming=True,
5858
)
5959
samples = list(islice(ds, n))
60-
print(json.dumps(samples, indent=2))
60+
print(json.dumps(samples, indent=2, ensure_ascii=False))
6161
return samples

0 commit comments

Comments
 (0)