Merge pull request #3499 from hicder/patch-2
Fix embedding provider not respecting batch size
This commit is contained in:
commit
73a9772253
1 changed files with 2 additions and 2 deletions
|
|
@ -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);
|
||||
},
|
||||
);
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue