Skip to content

Commit

Permalink
Merge pull request #3499 from hicder/patch-2
Browse files Browse the repository at this point in the history
Fix embedding provider not respecting batch size
  • Loading branch information
sestinj authored Dec 24, 2024
2 parents d8fbfe1 + 4fdf5d5 commit 73a9772
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions core/llm/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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 await this._embed(chunks);
return await this._embed(batch);
},
);

Expand Down

0 comments on commit 73a9772

Please sign in to comment.