|
24 | 24 | import io.agentscope.core.model.DashScopeChatModel; |
25 | 25 | import io.agentscope.core.model.GenerateOptions; |
26 | 26 | import io.agentscope.core.tool.Tool; |
| 27 | +import io.agentscope.core.tool.ToolParam; |
27 | 28 | import io.agentscope.core.tool.Toolkit; |
28 | 29 | import io.agentscope.examples.advanced.util.MsgUtils; |
29 | 30 |
|
@@ -85,7 +86,9 @@ public static class SimpleTools { |
85 | 86 | @Tool( |
86 | 87 | name = "generate_Python_code", |
87 | 88 | description = "Generate Python code based on the demand") |
88 | | - public Msg generatePython(String demand) { |
| 89 | + public Msg generatePython( |
| 90 | + @ToolParam(name = "demand", description = "The demand for the Python code") |
| 91 | + String demand) { |
89 | 92 | System.out.println("I am PythonAgent,now generating Python code for demand: " + demand); |
90 | 93 | String apiKey = ExampleUtils.getDashScopeApiKey(); |
91 | 94 | ReActAgent agent = |
@@ -124,7 +127,9 @@ public Msg generatePython(String demand) { |
124 | 127 | * @param demand The demand for the poem. |
125 | 128 | */ |
126 | 129 | @Tool(name = "generate_poem", description = "Generate a poem based on the demand") |
127 | | - public Msg generatePoem(String demand) { |
| 130 | + public Msg generatePoem( |
| 131 | + @ToolParam(name = "demand", description = "The demand for the poem") |
| 132 | + String demand) { |
128 | 133 | System.out.println("I am PoemAgent,now generating a poem for demand: " + demand); |
129 | 134 | String apiKey = ExampleUtils.getDashScopeApiKey(); |
130 | 135 | ReActAgent agent = |
|
0 commit comments