mirror of
https://github.com/labring/FastGPT.git
synced 2025-07-23 05:12:39 +00:00
v4.5 (#403)
This commit is contained in:
@@ -11,6 +11,7 @@ export const getAIApi = (props?: UserModelSchema['openaiAccount'], timeout = 600
|
||||
apiKey: props?.key || systemAIChatKey,
|
||||
baseURL: props?.baseUrl || baseUrl,
|
||||
httpAgent: global.httpsAgent,
|
||||
timeout
|
||||
timeout,
|
||||
maxRetries: 2
|
||||
});
|
||||
};
|
||||
|
6
packages/core/ai/type.d.ts
vendored
6
packages/core/ai/type.d.ts
vendored
@@ -4,3 +4,9 @@ export type ChatCompletion = OpenAI.Chat.ChatCompletion;
|
||||
export type CreateChatCompletionRequest = OpenAI.Chat.ChatCompletionCreateParams;
|
||||
|
||||
export type StreamChatType = Stream<OpenAI.Chat.ChatCompletionChunk>;
|
||||
|
||||
export type PromptTemplateItem = {
|
||||
title: string;
|
||||
desc: string;
|
||||
value: string;
|
||||
};
|
||||
|
@@ -5,7 +5,7 @@
|
||||
"@fastgpt/common": "workspace:*",
|
||||
"@fastgpt/support": "workspace:*",
|
||||
"encoding": "^0.1.13",
|
||||
"openai": "^4.11.1",
|
||||
"openai": "^4.12.1",
|
||||
"tunnel": "^0.0.6"
|
||||
},
|
||||
"devDependencies": {
|
||||
|
Reference in New Issue
Block a user