diff --git a/src/constants/chat.ts b/src/constants/chat.ts index 9d9b1c4..68b0958 100644 --- a/src/constants/chat.ts +++ b/src/constants/chat.ts @@ -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, });