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,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() {
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue