Build and run agents you can see, understand and trust.
Python agentchatbotlarge-language-modelsllmllm-agentmcpmulti-agentmulti-modalreact-agentrealtime-agentvoice-agentvoice-assistant
fix(docs): fix links and typos in the tuner example (#1131)
Xuchen Pan7c91bc7766d6
diff --git a/examples/tuner/react_agent/README.md b/examples/tuner/react_agent/README.mdindex e4d85878a..208c0ea7a 100644--- a/examples/tuner/react_agent/README.md+++ b/examples/tuner/react_agent/README.md@@ -261,16 +261,17 @@ react_agent/```pythonfrom typing import Dict-from agentscope.tuner import tune, WorkflowOutput, JudgeOutput, DatasetConfig, TunerModelConfig, AlgorithmConfig+from agentscope.tuner import tune, WorkflowOutput, JudgeOutput, DatasetConfig, AlgorithmConfigfrom agentscope.agent import ReActAgent+from agentscope.model import ChatModelBasefrom agentscope.formatter import OpenAIChatFormatterfrom agentscope.message import Msgasync def run_react_agent(task: Dict,- model: TunerModelConfig,- auxiliary_models: Dict[str, TunerModelConfig],+ model: ChatModelBase,+ auxiliary_models: Dict[str, ChatModelBase],) -> WorkflowOutput:agent = ReActAgent(name="react_agent",@@ -289,7 +290,7 @@ async def run_react_agent(async def judge_function(- task: Dict, response: Msg, auxiliary_models: Dict[str, TunerModelConfig]+ task: Dict, response: Msg, auxiliary_models: Dict[str, ChatModelBase]) -> JudgeOutput:"""Simple reward: 1.0 for exact match, else 0.0."""ground_truth = task["answer"]@@ -362,4 +363,4 @@ After implementing the workflow function, follow these steps to run the training> [!TIP]-> For more tuning examples, refer to [tuner] directory of the AgentScope-Samples repository.+> For more tuning examples, refer to [tuner](https://github.com/agentscope-ai/agentscope-samples/tree/main/tuner) directory of the AgentScope-Samples repository.diff --git a/src/agentscope/tuner/_dataset.py b/src/agentscope/tuner/_dataset.pyindex 71352a723..8ce4c7985 100644--- a/src/agentscope/tuner/_dataset.py+++ b/src/agentscope/tuner/_dataset.py@@ -57,5 +57,5 @@ class DatasetConfig(BaseModel):streaming=True,)samples = list(islice(ds, n))- print(json.dumps(samples, indent=2))+ print(json.dumps(samples, indent=2, ensure_ascii=False))return samples