Skip to content

Commit

Permalink
fix(chat-ai-demo): Add slice to regenerate
Browse files Browse the repository at this point in the history
  • Loading branch information
marker dao ® committed Nov 27, 2024
1 parent 6cad8ec commit acacdfa
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion apps/demos/Demos/Chat/AIIntagration/jQuery/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ $(() => {

async function regenerate() {
try {
const aiResponse = await getAIResponse(messages);
const aiResponse = await getAIResponse(messages.slice(0, -1));

updateLastMessage(false, aiResponse);
messages.at(-1).content = aiResponse;
Expand Down

0 comments on commit acacdfa

Please sign in to comment.