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

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

Ouverte
#109 0 commentaires 0 réactions 0 personnes assignées Voir sur GitHub
Langage dominant
Java
Étoiles
184
Forks
38
Métriques de merge des PR
Aucune PR mergée en 30 j

Description

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

Guide de contribution

Ouvrir le guide de contribution

Évaluation

Cette issue n'a pas encore été évaluée.

Recevez les nouvelles issues par e-mail

Un résumé court des issues GitHub adaptées aux débutants.