code cleanup/hardening

This commit is contained in:
Storme-bit
2026-04-26 21:53:33 -07:00
parent 43fa12899c
commit 4f3b18de08
7 changed files with 30 additions and 13 deletions

View File

@@ -5,9 +5,9 @@ const {getEnv, OLLAMA, PORTS} = require('@nexusai/shared');
const app = express();
app.use(express.json());
const PORT = getEnv('PORT', PORTS.EMBEDDING); // Default to 3003 if PORT is not set
const OLLAMA_URL = getEnv('OLLAMA_URL', OLLAMA.DEFAULT_URL); // URL for Ollama API
const EMBED_MODEL = getEnv('EMBEDDING_MODEL', OLLAMA.EMBED_MODEL); // Ollama model for embeddings
const PORT = getEnv('PORT', PORTS.EMBEDDING);
const OLLAMA_URL = getEnv('OLLAMA_URL', OLLAMA.DEFAULT_URL);
const EMBED_MODEL = getEnv('EMBEDDING_MODEL', OLLAMA.EMBED_MODEL);
//OLLAMA embedding helper function
async function embedText(text) {