diff --git a/core/llm/index.ts b/core/llm/index.ts index fbea69104..d789f724e 100644 --- a/core/llm/index.ts +++ b/core/llm/index.ts @@ -809,12 +809,12 @@ export abstract class BaseLLM implements ILLM { if (this.shouldUseOpenAIAdapter("embed") && this.openaiAdapter) { const result = await this.openaiAdapter.embed({ model: this.model, - input: chunks, + input: batch, }); - return result.data.map((chunk) => chunk.embedding); + return result.data.map((batch) => batch.embedding); } - return await this._embed(chunks); + return await this._embed(batch); }, );