From 0d90f6597dfdc00a66e75a124996efe546bfb5da Mon Sep 17 00:00:00 2001 From: Muspi Merol Date: Tue, 8 Oct 2024 10:59:15 +0800 Subject: [PATCH] temp --- src/utils/misc.ts | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/utils/misc.ts b/src/utils/misc.ts index abb831d..c913ae5 100644 --- a/src/utils/misc.ts +++ b/src/utils/misc.ts @@ -1,4 +1,4 @@ -import { parse } from 'partial-json' +import { Allow, parse } from 'partial-json' import { responseToAsyncIterator } from './streaming' import { promplateBaseUrl } from './constants' import type { ChatMessage } from '@/types' @@ -61,7 +61,7 @@ class API { const res = await fetch(`${promplateBaseUrl}/single/suggest`, { method: 'PUT', - body: JSON.stringify({ messages, model: 'llama3-70b-8192', prefill: true }), + body: JSON.stringify({ messages, model: 'Qwen/Qwen2-7B-Instruct' }), headers: { 'content-type': 'application/json' }, }) @@ -69,7 +69,7 @@ class API { for await (const delta of responseToAsyncIterator(res)) { json += delta - yield parse(json) as string[] + yield parse(json, Allow.ARR) as string[] } }