Update packages/trace-viewer/src/ui/aiTab.tsx

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Signed-off-by: Simon Knott <info@simonknott.de>
This commit is contained in:
Simon Knott 2025-02-11 16:09:58 +01:00 committed by GitHub
parent 10b2c89637
commit 5884946d8c
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -41,6 +41,7 @@ export function AITab({ state }: { state?: AIState }) {
return { ...message, content }; return { ...message, content };
}) })
try {
const response = await fetch('./llm/chat-completion', { const response = await fetch('./llm/chat-completion', {
method: 'POST', method: 'POST',
headers: { headers: {
@ -49,7 +50,6 @@ export function AITab({ state }: { state?: AIState }) {
body: JSON.stringify(hydratedMessages), body: JSON.stringify(hydratedMessages),
signal: controller.signal, signal: controller.signal,
}); });
try {
const decoder = new TextDecoder(); const decoder = new TextDecoder();
let reply = ''; let reply = '';
function update() { function update() {