perf: log和向量对话
This commit is contained in:
@@ -34,7 +34,6 @@ export const pushChatBill = async ({
|
||||
// 计算价格
|
||||
const unitPrice = modelItem?.price || 5;
|
||||
const price = unitPrice * tokens;
|
||||
console.log(`unit price: ${unitPrice}, price: ${formatPrice(price)}元`);
|
||||
|
||||
try {
|
||||
// 插入 Bill 记录
|
||||
@@ -91,8 +90,6 @@ export const pushSplitDataBill = async ({
|
||||
// 计算价格
|
||||
const price = unitPrice * tokenLen;
|
||||
|
||||
console.log(`price: ${formatPrice(price)}元`);
|
||||
|
||||
// 插入 Bill 记录
|
||||
const res = await Bill.create({
|
||||
userId,
|
||||
@@ -143,8 +140,6 @@ export const pushGenerateVectorBill = async ({
|
||||
let price = unitPrice * tokenLen;
|
||||
price = price > 1 ? price : 1;
|
||||
|
||||
console.log(`price: ${formatPrice(price)}元`);
|
||||
|
||||
// 插入 Bill 记录
|
||||
const res = await Bill.create({
|
||||
userId,
|
||||
|
||||
@@ -30,13 +30,11 @@ export const jsonRes = <T = any>(
|
||||
} else if (openaiError[error?.response?.statusText]) {
|
||||
msg = openaiError[error.response.statusText];
|
||||
}
|
||||
console.log('error->');
|
||||
console.log('code:', error.code);
|
||||
console.log('msg:', msg);
|
||||
console.log(`error-> msg:${msg}`);
|
||||
// request 时候报错
|
||||
if (error?.response) {
|
||||
console.log('statusText:', error?.response?.statusText);
|
||||
console.log('type:', error?.response?.data?.error?.type);
|
||||
console.log('error data:', error?.response?.data);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user