diff --git a/src/chatbox.tsx b/src/chatbox.tsx index 2bbd917..90632be 100644 --- a/src/chatbox.tsx +++ b/src/chatbox.tsx @@ -525,14 +525,15 @@ export default function ChatBOX(props: { } // build prompt - const prompt = - chatStore.history - .filter(({ hide }) => !hide) - .slice(chatStore.postBeginIndex) - .map(({ content }) => content) - .join(" ") + - " " + - inputMsg; + const prompt = [chatStore.systemMessageContent] + .concat( + chatStore.history + .filter(({ hide }) => !hide) + .slice(chatStore.postBeginIndex) + .map(({ content }) => content) + ) + .concat([inputMsg]) + .join(" "); console.log({ prompt }); setIsRecording("Recording");