V4.6.5-alpha (#609)

This commit is contained in:
Archer
2023-12-15 15:57:39 +08:00
committed by GitHub
parent dd7b4b98ae
commit 05bf1b2265
127 changed files with 4283 additions and 2315 deletions

View File

@@ -40,17 +40,19 @@ export const dispatchClassifyQuestion = async (props: Props): Promise<CQResponse
const cqModel = getCQModel(model);
const chatHistories = getHistories(history, histories);
const { arg, tokens } = await (async () => {
if (cqModel.functionCall) {
return functionCall({
...props,
histories: getHistories(history, histories),
histories: chatHistories,
cqModel
});
}
return completions({
...props,
histories: getHistories(history, histories),
histories: chatHistories,
cqModel
});
})();
@@ -65,7 +67,8 @@ export const dispatchClassifyQuestion = async (props: Props): Promise<CQResponse
query: userChatInput,
tokens,
cqList: agents,
cqResult: result.value
cqResult: result.value,
contextTotalLen: chatHistories.length + 2
}
};
};
@@ -115,7 +118,7 @@ ${systemPrompt}
required: ['type']
}
};
const ai = getAIApi(user.openaiAccount, 48000);
const ai = getAIApi(user.openaiAccount, 480000);
const response = await ai.chat.completions.create({
model: cqModel.model,