mirror of
https://github.com/oobabooga/text-generation-webui.git
synced 2025-12-06 07:12:10 +01:00
log error when llama-server request exceeds context size (#7263)
This commit is contained in:
parent
611399e089
commit
308e726e11
|
|
@ -200,7 +200,10 @@ class LlamaServer:
|
||||||
# Make the generation request
|
# Make the generation request
|
||||||
response = self.session.post(url, json=payload, stream=True)
|
response = self.session.post(url, json=payload, stream=True)
|
||||||
try:
|
try:
|
||||||
response.raise_for_status() # Raise an exception for HTTP errors
|
if response.status_code == 400 and response.json()["error"]["type"] == "exceed_context_size_error":
|
||||||
|
logger.error("The request exceeds the available context size, try increasing it")
|
||||||
|
else:
|
||||||
|
response.raise_for_status() # Raise an exception for HTTP errors
|
||||||
|
|
||||||
full_text = ""
|
full_text = ""
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue