perf: 生成对话框时机
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
import { DataItem } from '@/service/mongo';
|
||||
import { getOpenAIApi } from '@/service/utils/chat';
|
||||
import { getOpenAIApi } from '@/service/utils/auth';
|
||||
import { httpsAgent } from '@/service/utils/tools';
|
||||
import { getOpenApiKey } from '../utils/openai';
|
||||
import type { ChatCompletionRequestMessage } from 'openai';
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import { SplitData } from '@/service/mongo';
|
||||
import { getOpenAIApi } from '@/service/utils/chat';
|
||||
import { getOpenAIApi } from '@/service/utils/auth';
|
||||
import { httpsAgent } from '@/service/utils/tools';
|
||||
import { getOpenApiKey } from '../utils/openai';
|
||||
import type { ChatCompletionRequestMessage } from 'openai';
|
||||
|
||||
@@ -14,7 +14,7 @@ export const pushChatBill = async ({
|
||||
isPay: boolean;
|
||||
modelName: string;
|
||||
userId: string;
|
||||
chatId?: string;
|
||||
chatId?: '' | string;
|
||||
text: string;
|
||||
}) => {
|
||||
let billId;
|
||||
@@ -42,7 +42,7 @@ export const pushChatBill = async ({
|
||||
userId,
|
||||
type: 'chat',
|
||||
modelName,
|
||||
chatId,
|
||||
chatId: chatId ? chatId : undefined,
|
||||
textLen: text.length,
|
||||
tokenLen: tokens,
|
||||
price
|
||||
|
||||
Reference in New Issue
Block a user