agentscope-ai / agentscope-ai/agentscope-runtime-java

怎么自定义拓展其他的沙箱环境?

Đang mở
#109 0 bình luận 0 reaction 0 người được giao Xem trên GitHub
Ngôn ngữ chính
Java
Star
184
Fork
38
Chỉ số merge pull request
Không có pull request nào được merge trong 30 ngày

Mô tả

例如我想要去使用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"]}}}]}

Hướng dẫn đóng góp

Mở hướng dẫn đóng góp

Đánh giá

Issue này chưa được đánh giá.

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.