This commit is contained in:
Archer
2023-12-31 14:12:51 +08:00
committed by GitHub
parent ccca0468da
commit 9ccfda47b7
270 changed files with 8182 additions and 1295 deletions

View File

@@ -136,7 +136,6 @@ ${replaceVariable(Prompt_AgentQA.fixedText, { text })}`;
stream: false
});
const answer = chatResponse.choices?.[0].message?.content || '';
const totalTokens = chatResponse.usage?.total_tokens || 0;
const qaArr = formatSplitText(answer, text); // 格式化后的QA对
@@ -167,7 +166,8 @@ ${replaceVariable(Prompt_AgentQA.fixedText, { text })}`;
pushQABill({
teamId: data.teamId,
tmbId: data.tmbId,
totalTokens,
inputTokens: chatResponse.usage?.prompt_tokens || 0,
outputTokens: chatResponse.usage?.completion_tokens || 0,
billId: data.billId,
model
});