return {
label: "Code Execution",
name: "code_execution",
description: "Run sandboxed Python analysis with xAI. Use for calculations, tabulation, summaries, and chart-style analysis without local machine access.",
parameters: Type.Object({
task: Type.String({
description: "The full analysis task for xAI's remote Python sandbox. Include any data to analyze directly in the task.",
}),
}),
execute: async (_toolCallId: string, args: Record<string, unknown>) => { const apiKey = resolveXaiToolApiKey({
runtimeConfig: (runtimeConfig ?? undefined) as never,
sourceConfig: options?.config as never,
}); if (!apiKey) { return jsonResult({
error: "missing_xai_api_key",
message: "code_execution needs an xAI API key. Set XAI_API_KEY in the Gateway environment, or configure plugins.entries.xai.config.webSearch.apiKey.",
docs: "https://docs.openclaw.ai/tools/code-execution",
});
}
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.