refactor(ai): add message summart limit

pull/90/head
moonrailgun 2 years ago
parent cbd84a506c
commit a36ab65bd2

@ -142,7 +142,9 @@ export const AssistantPopover: React.FC<{
onClick={async () => { onClick={async () => {
const plainMessages = ( const plainMessages = (
await Promise.all( await Promise.all(
messages.map( messages
.slice(0, 30) // get first 30 message, too much will throw error
.map(
async (item) => async (item) =>
`${ `${
( (

Loading…
Cancel
Save