fix gemini truncated reply (max_tokens 16->64) and suppress GeneratorExit on client disconnect
This commit is contained in:
parent
ae46ac2e07
commit
f1f5fa97a9
2 changed files with 3 additions and 1 deletions
|
|
@ -967,6 +967,8 @@ async def _proxy_to_external_provider(
|
|||
):
|
||||
yield f"{line}\n\n"
|
||||
yield "data: [DONE]\n\n"
|
||||
except GeneratorExit:
|
||||
pass
|
||||
except Exception as exc:
|
||||
logger.error("external_provider.stream_error", error = str(exc))
|
||||
finally:
|
||||
|
|
|
|||
|
|
@ -512,7 +512,7 @@ class TestVisionInference:
|
|||
],
|
||||
}],
|
||||
"stream": True,
|
||||
"max_tokens": 16,
|
||||
"max_tokens": 64,
|
||||
"provider_type": provider_type,
|
||||
"external_model": model,
|
||||
"encrypted_api_key": encrypted,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue