diff --git a/.env.template b/.env.template new file mode 100644 index 0000000..6f7ce4f --- /dev/null +++ b/.env.template @@ -0,0 +1,13 @@ +# Environment variables declared in this file are automatically made available to Prisma. +# See the documentation for more detail: https://pris.ly/d/prisma-schema#accessing-environment-variables-from-the-schema + +# Prisma supports the native connection string format for PostgreSQL, MySQL, SQLite, SQL Server, MongoDB and CockroachDB. +# See the documentation for all the connection string options: https://pris.ly/d/connection-strings + +DATABASE_URL="postgresql://postgres:postgres@localhost:5432/crew_ai_visualizer?schema=public" + +GEMINI_API_KEY="" + +PYTHON_SITE_PACKAGES="" + +CREW_AI_PY_FILE="" diff --git a/src/app/api/graphql/crew_ai.js b/src/app/api/graphql/crew_ai.js index 469e654..91dc6c3 100644 --- a/src/app/api/graphql/crew_ai.js +++ b/src/app/api/graphql/crew_ai.js @@ -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) {