perf: btn color (#423)

This commit is contained in:
Archer
2023-10-24 13:19:23 +08:00
committed by GitHub
parent bf6dbfb245
commit 1942cb0d67
41 changed files with 350 additions and 221 deletions

View File

@@ -38,6 +38,7 @@ export async function generateQA(): Promise<any> {
datasetCollectionId: 1,
q: 1,
model: 1,
prompt: 1,
billId: 1
});

View File

@@ -35,7 +35,6 @@ export type ChatResponse = {
[TaskResponseKeyEnum.answerText]: string;
[TaskResponseKeyEnum.responseData]: ChatHistoryItemResType;
[TaskResponseKeyEnum.history]: ChatItemType[];
finish: boolean;
};
/* request openai chat */
@@ -193,8 +192,7 @@ export const dispatchChatCompletion = async (props: ChatProps): Promise<ChatResp
quoteList: filterQuoteQA,
historyPreview: getHistoryPreview(completeMessages)
},
[TaskResponseKeyEnum.history]: completeMessages,
finish: true
[TaskResponseKeyEnum.history]: completeMessages
};
};

View File

@@ -6,7 +6,6 @@ export type AnswerProps = ModuleDispatchProps<{
text: string;
}>;
export type AnswerResponse = {
finish: boolean;
[TaskResponseKeyEnum.answerText]: string;
};
@@ -31,7 +30,6 @@ export const dispatchAnswer = (props: Record<string, any>): AnswerResponse => {
}
return {
finish: true,
[TaskResponseKeyEnum.answerText]: formatText
};
};

View File

@@ -8,7 +8,6 @@ export type HttpRequestProps = ModuleDispatchProps<{
[key: string]: any;
}>;
export type HttpResponse = {
[HttpPropsEnum.finish]: boolean;
[HttpPropsEnum.failed]?: boolean;
[TaskResponseKeyEnum.responseData]: ChatHistoryItemResType;
[key: string]: any;
@@ -33,7 +32,6 @@ export const dispatchHttpRequest = async (props: Record<string, any>): Promise<H
});
return {
[HttpPropsEnum.finish]: true,
[TaskResponseKeyEnum.responseData]: {
moduleType: FlowModuleTypeEnum.httpRequest,
moduleName,
@@ -45,7 +43,6 @@ export const dispatchHttpRequest = async (props: Record<string, any>): Promise<H
};
} catch (error) {
return {
[HttpPropsEnum.finish]: true,
[HttpPropsEnum.failed]: true,
[TaskResponseKeyEnum.responseData]: {
moduleType: FlowModuleTypeEnum.httpRequest,

View File

@@ -13,7 +13,6 @@ type Props = ModuleDispatchProps<{
app: SelectAppItemType;
}>;
type Response = {
finish: boolean;
[TaskResponseKeyEnum.responseData]: ChatHistoryItemResType[];
[TaskResponseKeyEnum.answerText]: string;
[TaskResponseKeyEnum.history]: ChatItemType[];
@@ -77,7 +76,6 @@ export const dispatchAppRequest = async (props: Record<string, any>): Promise<Re
]);
return {
finish: true,
responseData,
[TaskResponseKeyEnum.answerText]: answerText,
[TaskResponseKeyEnum.history]: completeMessages