mirror of
https://github.com/LLM-Red-Team/glm-free-api.git
synced 2024-12-22 08:59:23 +08:00
支持首轮传none对话ID
This commit is contained in:
parent
756c89aaef
commit
4a450b8848
@ -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(
|
||||
|
Loading…
Reference in New Issue
Block a user