Skip to content

Commit

Permalink
fix: rag is not working for nitro (janhq#2511)
Browse files Browse the repository at this point in the history
Signed-off-by: James <[email protected]>
Co-authored-by: James <[email protected]>
  • Loading branch information
namchuai and James authored Mar 27, 2024
1 parent 84e1b09 commit 5eed8a5
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion extensions/assistant-extension/src/node/retrieval.ts
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,6 @@ export class Retrieval {
public updateEmbeddingEngine(engine: string): void {
// Engine settings are not compatible with the current embedding model params
// Switch case manually for now
const settings = readEmbeddingEngine(engine)
if (engine === 'nitro') {
this.embeddingModel = new OpenAIEmbeddings(
{ openAIApiKey: 'nitro-embedding' },
Expand All @@ -40,6 +39,7 @@ export class Retrieval {
)
} else {
// Fallback to OpenAI Settings
const settings = readEmbeddingEngine(engine)
this.embeddingModel = new OpenAIEmbeddings({
openAIApiKey: settings.api_key,
})
Expand Down

0 comments on commit 5eed8a5

Please sign in to comment.