async function test() { const req = { model: "gemma-4-26b-a4b", messages: [ { role: "system", content: "You have tools. When asked to check files, you MUST use the shell tool.", }, { role: "user", content: "Check what files are in the current directory using shell." }, ], tools: [ { type: "function", function: { name: "shell", description: "Execute a shell command", parameters: { type: "object", properties: { command: { type: "string" }, }, required: ["command"], }, }, }, ], tool_choice: "auto", }; const res = await fetch("http://100.114.51.16:1240/v1/chat/completions", { method: "POST", headers: { "Content-Type": "application/json" }, body: JSON.stringify(req), }); console.log("Status:", res.status); const data = await res.json(); console.log("Response:", JSON.stringify(data, null, 2)); } test().catch(console.error);