This repository has been archived on 2024-10-27. You can view files and clone it, but cannot push or open issues or pull requests.
2023-08-22 20:28:41 -06:00
|
|
|
from llm_server import opts
|
2023-09-23 23:14:22 -06:00
|
|
|
from llm_server.routes.cache import redis
|
2023-08-22 20:28:41 -06:00
|
|
|
|
|
|
|
|
|
|
|
def format_sillytavern_err(msg: str, level: str = 'info'):
|
2023-09-24 15:54:35 -06:00
|
|
|
http_host = redis.get('http_host', str)
|
2023-08-22 20:28:41 -06:00
|
|
|
return f"""```
|
2023-09-23 23:14:22 -06:00
|
|
|
=== MESSAGE FROM LLM MIDDLEWARE AT {http_host} ===
|
2023-08-22 20:28:41 -06:00
|
|
|
-> {level.upper()} <-
|
|
|
|
{msg}
|
|
|
|
```"""
|