Skip to content

Commit

Permalink
Fix: Update the channel where we are grabbing the llm thoughts (#5060)
Browse files Browse the repository at this point in the history
  • Loading branch information
Tom-Szendrey authored Oct 7, 2024
1 parent 7632232 commit ae443d7
Showing 1 changed file with 6 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -98,6 +98,7 @@ const submitQuestion = () => {
const message = props.kernelManager.sendMessage('llm_request', {
request: questionString.value
});
llmThoughts.value = [];
emit('question-asked', questionString.value);
// May prefer to use a manual status rather than following this. TBD. Both options work for now
Expand All @@ -110,12 +111,16 @@ const submitQuestion = () => {
});
message.register('llm_thought', (data) => {
thoughts.value = data;
llmThoughts.value = [];
llmThoughts.value.push(data);
llmQuery.value = questionString.value;
emit('llm-thought-output', data);
});
message.register('llm_response', (data) => {
// Check if our llm_response is providing a response text to a user's question
if (data.content.name === 'response_text') {
llmThoughts.value = [];
llmThoughts.value.push(data);
}
thoughts.value = data;
emit('llm-thought-output', data);
});
Expand Down

0 comments on commit ae443d7

Please sign in to comment.