支持首轮传none对话ID

This commit is contained in:
Vinlic 2024-04-29 09:42:21 +08:00
parent 756c89aaef
commit 4a450b8848

View File

@ -184,6 +184,10 @@ async function createCompletion(
)
: [];
// 如果引用对话ID不正确则重置引用
if (!/[0-9a-zA-Z]{24}/.test(refConvId))
refConvId = '';
// 请求流
const token = await acquireToken(refreshToken);
const result = await axios.post(
@ -282,6 +286,10 @@ async function createCompletionStream(
)
: [];
// 如果引用对话ID不正确则重置引用
if (!/[0-9a-zA-Z]{24}/.test(refConvId))
refConvId = '';
// 请求流
const token = await acquireToken(refreshToken);
const result = await axios.post(