mirror of
https://github.com/NovaOSS/nova-betterchat.git
synced 2024-11-25 21:43:59 +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 => ({
|
export const generateDefaultChat = (title?: string): ChatInterface => ({
|
||||||
title: title ? title : 'New Chat',
|
title: title ? title : 'New Chat',
|
||||||
messages: [
|
messages:
|
||||||
{ role: 'system', content: useStore.getState().defaultSystemMessage },
|
useStore.getState().defaultSystemMessage.length > 0
|
||||||
],
|
? [{ role: 'system', content: useStore.getState().defaultSystemMessage }]
|
||||||
|
: [],
|
||||||
config: { ...useStore.getState().defaultChatConfig },
|
config: { ...useStore.getState().defaultChatConfig },
|
||||||
titleSet: false,
|
titleSet: false,
|
||||||
});
|
});
|
||||||
|
|
Loading…
Reference in a new issue