Add health check monitoring for EXL2 errors (#206)

* Add health check monitoring for EXL2 errors

* Health: Format and change status code

A status code of 503 makes more sense to use.
---------
This commit is contained in:
TerminalMan
2024-09-23 02:40:36 +01:00
committed by GitHub
parent e0ffa90865
commit 2cda890deb
4 changed files with 73 additions and 3 deletions

View File

@@ -32,6 +32,8 @@ from typing import List, Optional, Union
from ruamel.yaml import YAML
from common.health import HealthManager
from backends.exllamav2.grammar import (
ExLlamaV2Grammar,
clear_grammar_func_cache,
@@ -1373,6 +1375,8 @@ class ExllamaV2Container:
)
asyncio.ensure_future(self.create_generator())
await HealthManager.add_unhealthy_event(ex)
raise ex
finally:
# Log generation options to console