From 858e3d7990daf98141782c0602d3ccb495d9ea15 Mon Sep 17 00:00:00 2001 From: Danil Nikolaev Date: Thu, 14 May 2026 20:58:52 +0300 Subject: [PATCH] shitton --- src/ai/tools/python-interpretator.ts | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/src/ai/tools/python-interpretator.ts b/src/ai/tools/python-interpretator.ts index 7302dc8..bc62e65 100644 --- a/src/ai/tools/python-interpretator.ts +++ b/src/ai/tools/python-interpretator.ts @@ -5,6 +5,7 @@ import path from "node:path"; import {AiTool} from "../tool-types"; import {Environment} from "../../common/environment"; import {toolsLogger} from "./tool-logger"; +import {randomUUID} from "node:crypto"; const logger = toolsLogger.child("python-interpreter"); @@ -299,14 +300,12 @@ async function executePythonCode( logger.info("execute.start", {args, options}); const pythonBinary = - options.pythonBinary ?? process.env.PYTHON_INTERPRETER_BINARY ?? "C:\\Users\\meloda\\Desktop\\AI_BOT\\.venv\\Scripts\\python.exe"; + options.pythonBinary ?? process.env.PYTHON_INTERPRETER_BINARY ?? "python"; const timeoutMs = args.timeoutMs ?? options.executionTimeoutMs ?? DEFAULT_EXECUTION_TIMEOUT_MS; const maxOutputChars = options.maxOutputChars ?? DEFAULT_MAX_OUTPUT_CHARS; - // const tempDir = path.join(Environment.DATA_PATH, "cache", "python", "python-temp-" + randomUUID()); - // const tempDir = path.join(Environment.FILE_TOOLS_ROOT_DIR ?? ".", "ollama-python-temp-" + randomUUID()); - const tempDir = path.join(Environment.FILE_TOOLS_ROOT_DIR ?? ".", ""); + const tempDir = path.join(Environment.DATA_PATH, "cache", "python", "python-temp-" + randomUUID()); const inputDir = path.join(tempDir, PYTHON_INPUTS_DIR_NAME); const outputDir = path.join(tempDir, PYTHON_OUTPUTS_DIR_NAME); const attachmentsPath = path.join(tempDir, PYTHON_ATTACHMENTS_FILE_NAME);