feat: set openai account

This commit is contained in:
archer
2023-07-28 12:02:23 +08:00
parent 7a56680935
commit dfda5285bd
21 changed files with 211 additions and 156 deletions

View File

@@ -2,7 +2,7 @@ import { adaptChatItem_openAI } from '@/utils/plugin/openai';
import { ChatContextFilter } from '@/service/utils/chat/index';
import type { ChatHistoryItemResType, ChatItemType } from '@/types/chat';
import { ChatModuleEnum, ChatRoleEnum, TaskResponseKeyEnum } from '@/constants/chat';
import { getOpenAIApi, axiosConfig } from '@/service/ai/openai';
import { getAIChatApi, axiosConfig } from '@/service/ai/openai';
import type { ClassifyQuestionAgentItemType } from '@/types/app';
import { countModelPrice } from '@/service/events/pushBill';
@@ -63,7 +63,7 @@ export const dispatchClassifyQuestion = async (props: Record<string, any>): Prom
required: ['type']
}
};
const chatAPI = getOpenAIApi();
const chatAPI = getAIChatApi();
const response = await chatAPI.createChatCompletion(
{