Files
letta-server/letta/interfaces/utils.py
Kian Jones b8e9a80d93 merge this (#4759)
* wait I forgot to comit locally

* cp the entire core directory and then rm the .git subdir
2025-09-17 15:47:40 -07:00

12 lines
278 B
Python

import json
from openai.types.chat import ChatCompletionChunk
def _format_sse_error(error_payload: dict) -> str:
return f"data: {json.dumps(error_payload)}\n\n"
def _format_sse_chunk(chunk: ChatCompletionChunk) -> str:
return f"data: {chunk.model_dump_json()}\n\n"