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:
parent
10b2c89637
commit
5884946d8c
|
|
@ -41,15 +41,15 @@ export function AITab({ state }: { state?: AIState }) {
|
|||
return { ...message, content };
|
||||
})
|
||||
|
||||
const response = await fetch('./llm/chat-completion', {
|
||||
method: 'POST',
|
||||
headers: {
|
||||
'Content-Type': 'application/json'
|
||||
},
|
||||
body: JSON.stringify(hydratedMessages),
|
||||
signal: controller.signal,
|
||||
});
|
||||
try {
|
||||
const response = await fetch('./llm/chat-completion', {
|
||||
method: 'POST',
|
||||
headers: {
|
||||
'Content-Type': 'application/json'
|
||||
},
|
||||
body: JSON.stringify(hydratedMessages),
|
||||
signal: controller.signal,
|
||||
});
|
||||
const decoder = new TextDecoder();
|
||||
let reply = '';
|
||||
function update() {
|
||||
|
|
|
|||
Loading…
Reference in a new issue