mirror of
https://github.com/labring/FastGPT.git
synced 2025-07-23 21:13:50 +00:00
Remove quote prompt in api request (#4724)
* chat completion add parsequote param (#4720) * chat completion add parsequote param * fix * perf: quote prompt --------- Co-authored-by: heheer <heheer@sealos.io>
This commit is contained in:
@@ -74,6 +74,7 @@ export type Props = ChatCompletionCreateParams &
|
||||
responseChatItemId?: string;
|
||||
stream?: boolean;
|
||||
detail?: boolean;
|
||||
parseQuote?: boolean;
|
||||
variables: Record<string, any>; // Global variables or plugin inputs
|
||||
};
|
||||
|
||||
@@ -106,6 +107,7 @@ async function handler(req: NextApiRequest, res: NextApiResponse) {
|
||||
|
||||
stream = false,
|
||||
detail = false,
|
||||
parseQuote = false,
|
||||
messages = [],
|
||||
variables = {},
|
||||
responseChatItemId = getNanoid(),
|
||||
@@ -289,6 +291,7 @@ async function handler(req: NextApiRequest, res: NextApiResponse) {
|
||||
chatConfig,
|
||||
histories: newHistories,
|
||||
stream,
|
||||
parseQuote,
|
||||
maxRunTimes: WORKFLOW_MAX_RUN_TIMES,
|
||||
workflowStreamResponse: workflowResponseWrite
|
||||
});
|
||||
|
@@ -74,6 +74,7 @@ export type Props = ChatCompletionCreateParams &
|
||||
responseChatItemId?: string;
|
||||
stream?: boolean;
|
||||
detail?: boolean;
|
||||
parseQuote?: boolean;
|
||||
variables: Record<string, any>; // Global variables or plugin inputs
|
||||
};
|
||||
|
||||
@@ -106,6 +107,7 @@ async function handler(req: NextApiRequest, res: NextApiResponse) {
|
||||
|
||||
stream = false,
|
||||
detail = false,
|
||||
parseQuote = false,
|
||||
messages = [],
|
||||
variables = {},
|
||||
responseChatItemId = getNanoid(),
|
||||
@@ -288,6 +290,7 @@ async function handler(req: NextApiRequest, res: NextApiResponse) {
|
||||
chatConfig,
|
||||
histories: newHistories,
|
||||
stream,
|
||||
parseQuote,
|
||||
maxRunTimes: WORKFLOW_MAX_RUN_TIMES,
|
||||
workflowStreamResponse: workflowResponseWrite,
|
||||
version: 'v2',
|
||||
|
@@ -131,7 +131,8 @@ export const streamFetch = ({
|
||||
...data,
|
||||
variables,
|
||||
detail: true,
|
||||
stream: true
|
||||
stream: true,
|
||||
parseQuote: true
|
||||
})
|
||||
};
|
||||
|
||||
|
Reference in New Issue
Block a user