Restrict generated chat title to 200 chars limit allowed for chat slug

This commit is contained in:
Debanjum
2024-11-30 19:12:03 -08:00
parent 8b8e2be82d
commit 9e0a2c7a98

View File

@@ -562,8 +562,7 @@ async def generate_chat_title(
raise HTTPException(status_code=404, detail="Conversation not found")
new_title = await acreate_title_from_history(request.user.object, conversation=conversation)
conversation.slug = new_title
conversation.slug = new_title[:200]
await conversation.asave()