main
reng 4 months ago
parent d8aa920129
commit e53cfb16d4
  1. 7
      vite/src/pages/flow_free.jsx

@ -242,18 +242,21 @@ export function FreeFlow(){
console.log('Getting summary...');
setChatStatus(ChatStatus.Clear); // Set chat status to Processing
getSummary(history.map(el=>`${el.role}:${el.content}`).join('\n'), data).then(summary_ => {
let message=refInput.current?.value?.trim() || history.map(el=>`${el.role}:${el.content}`).join('\n');
getSummary(message, data).then(summary_ => {
console.log('Summary:', summary_);
onCueEnd(); // End the current cue after getting summary
setSummary(summary_?.result);
setSummary(()=>summary_?.result);
refContainer.current.scrollTop = refContainer.current.scrollHeight; // Scroll to bottom
}).catch(error => {
console.error('Error getting summary:', error);
});
break;
case 'user_input':
setChatStatus(ChatStatus.Message); // Set chat status to User

Loading…
Cancel
Save