mirror of
https://github.com/theroyallab/tabbyAPI.git
synced 2026-04-20 14:28:54 +00:00
Tree: Switch to Pydantic 2
Pydantic 2 has more modern methods and stability compared to Pydantic 1 Signed-off-by: kingbri <bdashore3@proton.me>
This commit is contained in:
2
utils.py
2
utils.py
@@ -26,7 +26,7 @@ def get_generator_error(message: str):
|
||||
|
||||
# Log and send the exception
|
||||
print(f"\n{generator_error.error.trace}")
|
||||
return get_sse_packet(generator_error.json(ensure_ascii = False))
|
||||
return get_sse_packet(generator_error.model_dump_json())
|
||||
|
||||
def get_sse_packet(json_data: str):
|
||||
return f"data: {json_data}\n\n"
|
||||
|
||||
Reference in New Issue
Block a user