XFE Git
XFE Studio Git
Git 首页 全局搜索
XFE 主站 文档 NuGet
公开
关注 0 Fork 0 Star 1
返回提交历史

XFEstudio/gpt4free

Increase response stream buffer size to 10MB

Set the response content's _high_water attribute to 10MB per line to address ValueError: Chunk too big during stream processing.

619cf90c
Ammar <ammar.alkotb@gmail.com>
提交于

代码差异

1 个文件 +2 -2
Modified g4f/Provider/Yupp.py +2 -2
@@ -414,12 +414,12 @@ class Yupp(AsyncGeneratorProvider, ProviderModelMixin):
414 414
415 415 # Make chat private in background
416 416 asyncio.create_task(make_chat_private(session, account, url_uuid))
417
417 # ٍSolve ValueError: Chunk too big
418 response.content._high_water = 10 * 1024 * 1024 # 10MB per line
418 419 # Process stream
419 420 async for chunk in cls._process_stream_response(response.content, account, session, prompt,
420 421 model):
421 422 yield chunk
422
423 423 return
424 424
425 425 except RateLimitError: