4.6.3-website dataset (#532)
This commit is contained in:
@@ -113,10 +113,14 @@ export const dispatchChatCompletion = async (props: ChatProps): Promise<ChatResp
|
||||
}
|
||||
]
|
||||
: []),
|
||||
...messages.map((item) => ({
|
||||
...item,
|
||||
content: modelConstantsData.vision ? formatStr2ChatContent(item.content) : item.content
|
||||
}))
|
||||
...(await Promise.all(
|
||||
messages.map(async (item) => ({
|
||||
...item,
|
||||
content: modelConstantsData.vision
|
||||
? await formatStr2ChatContent(item.content)
|
||||
: item.content
|
||||
}))
|
||||
))
|
||||
];
|
||||
|
||||
const response = await ai.chat.completions.create(
|
||||
|
||||
@@ -25,28 +25,29 @@ import { dispatchAppRequest } from './tools/runApp';
|
||||
import { dispatchRunPlugin } from './plugin/run';
|
||||
import { dispatchPluginInput } from './plugin/runInput';
|
||||
import { dispatchPluginOutput } from './plugin/runOutput';
|
||||
import { AuthUserTypeEnum } from '@fastgpt/global/support/permission/constant';
|
||||
|
||||
/* running */
|
||||
export async function dispatchModules({
|
||||
res,
|
||||
appId,
|
||||
chatId,
|
||||
modules,
|
||||
user,
|
||||
teamId,
|
||||
tmbId,
|
||||
user,
|
||||
appId,
|
||||
modules,
|
||||
chatId,
|
||||
params = {},
|
||||
variables = {},
|
||||
stream = false,
|
||||
detail = false
|
||||
}: {
|
||||
res: NextApiResponse;
|
||||
appId: string;
|
||||
chatId?: string;
|
||||
modules: ModuleItemType[];
|
||||
user: UserType;
|
||||
teamId: string;
|
||||
tmbId: string;
|
||||
user: UserType;
|
||||
appId: string;
|
||||
modules: ModuleItemType[];
|
||||
chatId?: string;
|
||||
params?: Record<string, any>;
|
||||
variables?: Record<string, any>;
|
||||
stream?: boolean;
|
||||
@@ -176,15 +177,15 @@ export async function dispatchModules({
|
||||
});
|
||||
const props: ModuleDispatchProps<Record<string, any>> = {
|
||||
res,
|
||||
teamId,
|
||||
tmbId,
|
||||
user,
|
||||
appId,
|
||||
chatId,
|
||||
stream,
|
||||
detail,
|
||||
variables,
|
||||
outputs: module.outputs,
|
||||
user,
|
||||
teamId,
|
||||
tmbId,
|
||||
inputs: params
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user