agentscope-ai / agentscope-ai/agentscope-runtime-java
怎么自定义拓展其他的沙箱环境?
- Vorherrschende Sprache
- Java
- Sterne
- 184
- Forks
- 38
- PR-Merge-Kennzahlen
- Keine gemergten PRs in 30 T.
Beschreibung
例如我想要去使用nodejs沙箱,类似于python的baseSandboxTool,但是镜像中不支持nodejs,有nodejs的沙箱镜像吗
自定义那么:run_nodejs_cell
报错信息:
{"messages":[{"content":"Use the nodejs tool to console.log(1+1) and return the message.","role":"user"},{"content":"You are a intelligent agent that can use tools to perform tasks.","role":"user"},{"role":"assistant","tool_calls":[{"id":"call_4Hb9Ucw7EolM5XiCPSoiOkux","type":"function","function":{"name":"run_nodejs_cell","arguments":"{\"code\":\"console.log(1+1)\"}"}}]},{"content":"{\"Response\":{\"result\":\"{\\\"isError\\\":true,\\\"content\\\":[{\\\"text\\\":\\\"HTTP 500: {\\\\\\\"detail\\\\\\\":\\\\\\\"Tool 'run_nodejs_cell' not found.: Traceback (most recent call last):\\\\\\\\n File \\\\\\\\\\\\\\\"/agentscope_runtime/routers/mcp.py\\\\\\\\\\\\\\\", line 164, in call_tool\\\\\\\\n raise ModuleNotFoundError(f\\\\\\\\\\\\\\\"Tool '{tool_name}' not found.\\\\\\\\\\\\\\\")\\\\\\\\nModuleNotFoundError: Tool 'run_nodejs_cell' not found.\\\\\\\\n\\\\\\\"}\\\",\\\"type\\\":\\\"text\\\"}]}\",\"message\":\"Code execution completed\"}}","role":"tool","name":"run_nodejs_cell","tool_call_id":"call_4Hb9Ucw7EolM5XiCPSoiOkux"}],"model":"gpt-5","max_tokens":1000,"stream":false,"temperature":1.0,"tools":[{"type":"function","function":{"description":"Execute NodeJs code snippets and return the output or errors.","name":"run_nodejs_cell","parameters":{"description":"Request object to perform NodeJs code execution","type":"object","properties":{"code":{"description":"Python code to be executed","type":"string"}},"required":["code"]}}}]}
Beitragsleitfaden
Bewertung
Dieses Issue wurde noch nicht bewertet.