convert node_calls_python paths into env variables

This commit is contained in:
Eng. Elias
2024-03-01 11:59:35 +04:00
parent a1ffe22934
commit b8f3986de5
2 changed files with 15 additions and 5 deletions

View File

@@ -4,13 +4,10 @@ const nodecallspython = require("node-calls-python");
const py = nodecallspython.interpreter;
py.addImportPath(
"E:\\Crew AI\\TheProject\\crew-ai-visualizer\\src\\app\\api\\graphql\\venv\\Lib\\site-packages"
);
py.addImportPath(process.env.PYTHON_SITE_PACKAGES);
export function runMission(id) {
const crewaiPath =
"E:\\Crew AI\\TheProject\\crew-ai-visualizer\\src\\app\\api\\graphql\\crew_ai.py";
const crewaiPath = process.env.CREW_AI_PY_FILE;
return py
.import(crewaiPath)
.then(async function (pymodule) {