Commit 5284312e by archer

chat default model

parent 86a0e7ce
...@@ -21,7 +21,7 @@ import { AppModuleItemType } from '@/types/app'; ...@@ -21,7 +21,7 @@ import { AppModuleItemType } from '@/types/app';
export type ChatProps = { export type ChatProps = {
res: NextApiResponse; res: NextApiResponse;
model: `${OpenAiChatEnum}`; model: string;
temperature?: number; temperature?: number;
maxToken?: number; maxToken?: number;
history?: ChatItemType[]; history?: ChatItemType[];
...@@ -44,7 +44,7 @@ export type ChatResponse = { ...@@ -44,7 +44,7 @@ export type ChatResponse = {
export const dispatchChatCompletion = async (props: Record<string, any>): Promise<ChatResponse> => { export const dispatchChatCompletion = async (props: Record<string, any>): Promise<ChatResponse> => {
let { let {
res, res,
model, model = global.chatModels[0]?.model,
temperature = 0, temperature = 0,
maxToken = 4000, maxToken = 4000,
stream = false, stream = false,
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment