Skip to content

Commit 8fc4455

Browse files
authored
配置文件更改 (#186)
* feat(generation_service): add image URL extraction and random QA generation logic * fix(generation_service): increase batch size from 20 to 100 for improved chunk processing * fix(generation_service): increase batch size from 20 to 100 for improved chunk processing
1 parent 85eb5a9 commit 8fc4455

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

runtime/datamate-python/app/module/generation/service/generation_service.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ class GenerationService:
4949
def __init__(self, db: AsyncSession):
5050
self.db = db
5151
# 全局并发信号量:保证任意时刻最多 10 次模型调用
52-
self.question_semaphore = asyncio.Semaphore(10)
52+
self.question_semaphore = asyncio.Semaphore(20)
5353
self.answer_semaphore = asyncio.Semaphore(100)
5454

5555
async def process_task(self, task_id: str):
@@ -175,7 +175,7 @@ async def _process_single_file(
175175
answer_chat = get_chat_client(answer_model)
176176

177177
# 分批次从 DB 读取并处理 chunk
178-
batch_size = 20
178+
batch_size = 100
179179
current_index = 1
180180

181181
while current_index <= total_chunks:

0 commit comments

Comments
 (0)