Skip to content

Commit

Permalink
chg: 前後のメッセージ数を制限する
Browse files Browse the repository at this point in the history
  • Loading branch information
ashcolor committed Jan 4, 2024
1 parent 46a5bf6 commit 8a1bb93
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion stores/useMessagesStore.ts
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ export const useMessagesStore = defineStore("messages", () => {
if (messages.value?.length !== 0) {
messages.value?.map(({ role, content }) => requestMessages.push({ role, content }));
}
return requestMessages;
return requestMessages.slice(requestMessages.length - 10);
})
);

Expand Down

0 comments on commit 8a1bb93

Please sign in to comment.