Make simulation LLM concurrency configurable, default to 5
The hardcoded semaphore=30 caused Groq free tier to hang from too many concurrent requests. Now reads from config.concurrency with a safe default of 5.
This commit is contained in:
parent
c9c1f44711
commit
65d8524a9d
1 changed files with 1 additions and 1 deletions
|
|
@ -578,7 +578,7 @@ class RedditSimulationRunner:
|
|||
agent_graph=self.agent_graph,
|
||||
platform=oasis.DefaultPlatformType.REDDIT,
|
||||
database_path=db_path,
|
||||
semaphore=30, # 限制最大并发 LLM 请求数,防止 API 过载
|
||||
semaphore=self.config.get("concurrency", 5), # 并发LLM请求数,可在配置中调整
|
||||
)
|
||||
|
||||
await self.env.reset()
|
||||
|
|
|
|||
Loading…
Reference in a new issue