Skip to content

Commit

Permalink
Restrict generated chat title to 200 chars limit allowed for chat slug
Browse files Browse the repository at this point in the history
  • Loading branch information
debanjum committed Dec 1, 2024
1 parent 8b8e2be commit 9e0a2c7
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions src/khoj/routers/api_chat.py
Original file line number Diff line number Diff line change
Expand Up @@ -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()

Expand Down

0 comments on commit 9e0a2c7

Please sign in to comment.