This commit is contained in:
Timothy Jaeryang Baek
2025-02-03 18:17:38 -08:00
parent 51de2ffcc0
commit aa7184ae0d
2 changed files with 10 additions and 0 deletions

View File

@@ -1090,6 +1090,14 @@ async def process_chat_response(
task_id = str(uuid4()) # Create a unique task ID.
model_id = form_data.get("model", "")
Chats.upsert_message_to_chat_by_id_and_message_id(
metadata["chat_id"],
metadata["message_id"],
{
"model": model_id,
},
)
# Handle as a background task
async def post_response_handler(response, events):
def serialize_content_blocks(content_blocks, raw=False):