ソースを参照

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

tags/0.3.20
takatost 2年前
コミット
4c8608dc61
コミッターのメールアドレスに関連付けられたアカウントが存在しません

+ 1
- 0
api/core/prompt/prompts.py ファイルの表示

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.



+ 1
- 1
api/events/event_handlers/generate_conversation_name_when_first_message_created.py ファイルの表示



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()

読み込み中…
キャンセル
保存