convert node_calls_python paths into env variables
This commit is contained in:
13
.env.template
Normal file
13
.env.template
Normal file
@@ -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=""
|
||||
@@ -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) {
|
||||
|
||||
Reference in New Issue
Block a user