fix: gpt35 4k
This commit is contained in:
@@ -87,7 +87,7 @@ export async function generateQA(): Promise<any> {
|
||||
// 请求 chatgpt 获取回答
|
||||
const response = await Promise.all(
|
||||
[data.q].map((text) =>
|
||||
modelServiceToolMap[OpenAiChatEnum.GPT35]
|
||||
modelServiceToolMap[OpenAiChatEnum.GPT3516k]
|
||||
.chatCompletion({
|
||||
apiKey: systemAuthKey,
|
||||
temperature: 0.8,
|
||||
|
||||
@@ -104,7 +104,7 @@ export const pushSplitDataBill = async ({
|
||||
await connectToDatabase();
|
||||
|
||||
// 获取模型单价格, 都是用 gpt35 拆分
|
||||
const unitPrice = ChatModelMap[OpenAiChatEnum.GPT35].price || 3;
|
||||
const unitPrice = ChatModelMap[OpenAiChatEnum.GPT3516k].price || 3;
|
||||
// 计算价格
|
||||
const price = unitPrice * totalTokens;
|
||||
|
||||
@@ -112,7 +112,7 @@ export const pushSplitDataBill = async ({
|
||||
const res = await Bill.create({
|
||||
userId,
|
||||
type,
|
||||
modelName: OpenAiChatEnum.GPT35,
|
||||
modelName: OpenAiChatEnum.GPT3516k,
|
||||
textLen,
|
||||
tokenLen: totalTokens,
|
||||
price
|
||||
|
||||
Reference in New Issue
Block a user