fix: honor dashscope embedding batch limit
This commit is contained in:
@@ -119,7 +119,7 @@ class IndexWorker:
|
||||
await self._mark_failed(document_id, "INDEXING_FAILED", "文档索引失败,请重试")
|
||||
|
||||
async def _embed_and_upsert(self, document_id: str, chunks: list[PreparedChunk]) -> bool:
|
||||
batch_size = 20
|
||||
batch_size = 10
|
||||
for start in range(0, len(chunks), batch_size):
|
||||
batch = chunks[start : start + batch_size]
|
||||
vectors = await self.embeddings.embed_documents([chunk.content for chunk in batch])
|
||||
|
||||
Reference in New Issue
Block a user