Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@
import io.agentscope.core.model.DashScopeChatModel;
import io.agentscope.core.model.GenerateOptions;
import io.agentscope.core.tool.Tool;
import io.agentscope.core.tool.ToolParam;
import io.agentscope.core.tool.Toolkit;
import io.agentscope.examples.advanced.util.MsgUtils;

Expand Down Expand Up @@ -85,7 +86,9 @@ public static class SimpleTools {
@Tool(
name = "generate_Python_code",
description = "Generate Python code based on the demand")
public Msg generatePython(String demand) {
public Msg generatePython(
@ToolParam(name = "demand", description = "The demand for the Python code")
String demand) {
System.out.println("I am PythonAgent,now generating Python code for demand: " + demand);
String apiKey = ExampleUtils.getDashScopeApiKey();
ReActAgent agent =
Expand Down Expand Up @@ -124,7 +127,9 @@ public Msg generatePython(String demand) {
* @param demand The demand for the poem.
*/
@Tool(name = "generate_poem", description = "Generate a poem based on the demand")
public Msg generatePoem(String demand) {
public Msg generatePoem(
@ToolParam(name = "demand", description = "The demand for the poem")
String demand) {
System.out.println("I am PoemAgent,now generating a poem for demand: " + demand);
String apiKey = ExampleUtils.getDashScopeApiKey();
ReActAgent agent =
Expand Down
Loading