fixed embed endpoint
This commit is contained in:
@@ -7,7 +7,7 @@ app.use(express.json());
|
||||
|
||||
const PORT = getEnv('PORT', '3003'); // Default to 3003 if PORT is not set
|
||||
const OLLAMA_URL = getEnv('OLLAMA_URL', 'http://localhost:11434'); // URL for Ollama API
|
||||
const EMBED_MODEL = getEnv('EMBED_MODEL', 'nomic-embed-text'); // Ollama model for embeddings
|
||||
const EMBED_MODEL = getEnv('EMBEDDING_MODEL', 'nomic-embed-text'); // Ollama model for embeddings
|
||||
|
||||
console.log('OLLAMA_URL:', OLLAMA_URL);
|
||||
console.log('EMBED_MODEL:', EMBED_MODEL);
|
||||
@@ -25,7 +25,7 @@ async function embedText(text) {
|
||||
}
|
||||
|
||||
const data = await res.json();
|
||||
return data.embedding;
|
||||
return data.embeddings[0];
|
||||
}
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user