feat: 完成对接接口

This commit is contained in:
ccnetcore
2025-06-22 19:09:13 +08:00
parent 6459d7c024
commit 06617de984
19 changed files with 143 additions and 96 deletions

View File

@@ -108,6 +108,7 @@ function handleDataChunk(chunk: AnyObject) {
// 另一种思考中形式content中有 <think></think> 的格式
// 一开始匹配到 <think> 开始,匹配到 </think> 结束,并处理标签中的内容为思考内容
console.log(chunk.choices,"chunk.choices")
const parsedChunk = chunk.choices?.[0].delta.content;
if (parsedChunk) {
const thinkStart = parsedChunk.includes('<think>');