Unverified Commit 4c8608dc authored by takatost's avatar takatost Committed by GitHub

feat: optimize conversation title generation output must be a valid JSON (#1077)

parent a6b0f788
...@@ -3,6 +3,7 @@ CONVERSATION_TITLE_PROMPT = """You need to decompose the user's input into "subj ...@@ -3,6 +3,7 @@ CONVERSATION_TITLE_PROMPT = """You need to decompose the user's input into "subj
Notice: the language type user using is abundant, can be English, Chinese, Español, Arabic, Japanese, and etc. Notice: the language type user using is abundant, can be English, Chinese, Español, Arabic, Japanese, and etc.
MAKE SURE your output is the SAME language as the user's input! MAKE SURE your output is the SAME language as the user's input!
Your output is restricted only to: (Input language) Intention + Subject(short as possible) Your output is restricted only to: (Input language) Intention + Subject(short as possible)
Your output MUST be a valid JSON.
Tip: When the user's question is directed at you (the language model), you can add an emoji to make it more fun. Tip: When the user's question is directed at you (the language model), you can add an emoji to make it more fun.
......
...@@ -26,7 +26,7 @@ def handle(sender, **kwargs): ...@@ -26,7 +26,7 @@ def handle(sender, **kwargs):
conversation.name = name conversation.name = name
except: except:
conversation.name = 'New Chat' conversation.name = 'New conversation'
db.session.add(conversation) db.session.add(conversation)
db.session.commit() db.session.commit()
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment