mirror of
https://github.com/NicolasBohn/NexQuant.git
synced 2026-07-28 07:57:44 +00:00
make timeout fail a hyper parameter (#859)
Co-authored-by: Xu Yang <xuyang1@microsoft.com>
This commit is contained in:
@@ -360,7 +360,7 @@ class APIBackend(ABC):
|
||||
)
|
||||
):
|
||||
timeout_count += 1
|
||||
if timeout_count >= 3:
|
||||
if timeout_count >= LLM_SETTINGS.timeout_fail_limit:
|
||||
logger.warning("Timeout error, please check your network connection.")
|
||||
raise e
|
||||
|
||||
|
||||
@@ -37,6 +37,7 @@ class LLMSettings(ExtendedBaseSettings):
|
||||
use_embedding_cache: bool = False
|
||||
prompt_cache_path: str = str(Path.cwd() / "prompt_cache.db")
|
||||
max_past_message_include: int = 10
|
||||
timeout_fail_limit: int = 10
|
||||
|
||||
# Behavior of returning answers to the same question when caching is enabled
|
||||
use_auto_chat_cache_seed_gen: bool = False
|
||||
|
||||
Reference in New Issue
Block a user