mirror of
https://github.com/NovaOSS/nova-betterchat.git
synced 2024-11-25 19:54:00 +01:00
feat: not adding first system message if default system message is empty (#129)
* feat: not adding first system message if default system message is empty * formatting --------- Co-authored-by: Jing Hua <59118459+ztjhz@users.noreply.github.com>
This commit is contained in:
parent
39cb420122
commit
58858d51ac
|
@ -47,9 +47,10 @@ export const _defaultChatConfig: ConfigInterface = {
|
|||
|
||||
export const generateDefaultChat = (title?: string): ChatInterface => ({
|
||||
title: title ? title : 'New Chat',
|
||||
messages: [
|
||||
{ role: 'system', content: useStore.getState().defaultSystemMessage },
|
||||
],
|
||||
messages:
|
||||
useStore.getState().defaultSystemMessage.length > 0
|
||||
? [{ role: 'system', content: useStore.getState().defaultSystemMessage }]
|
||||
: [],
|
||||
config: { ...useStore.getState().defaultChatConfig },
|
||||
titleSet: false,
|
||||
});
|
||||
|
|
Loading…
Reference in a new issue