mirror of
https://github.com/langgenius/dify.git
synced 2024-11-16 11:42:29 +08:00
feat: optimize generate name length (#924)
This commit is contained in:
parent
95b179fb39
commit
8d6d1c442b
|
@ -20,6 +20,10 @@ def handle(sender, **kwargs):
|
|||
# generate conversation name
|
||||
try:
|
||||
name = LLMGenerator.generate_conversation_name(app_model.tenant_id, message.query, message.answer)
|
||||
|
||||
if len(name) > 75:
|
||||
name = name[:75] + '...'
|
||||
|
||||
conversation.name = name
|
||||
except:
|
||||
conversation.name = 'New Chat'
|
||||
|
|
Loading…
Reference in New Issue
Block a user