mirror of
https://github.com/labring/FastGPT.git
synced 2025-08-01 03:48:24 +00:00
Chat perf test (#2252)
* perf: optimize chat init api (#2233) * perf: optimize the chat/init api * perf: 添加团队和分享api的优化 * perf: api写法优化 * perf: api写法优化 * perf: 完善细节 * perf: 添加auth字段 * perf: 优雅的写法🥳 * fix: Fix the bug in debugging Tag (#2250) * fix: 修复调试tag不显示bug * perf * perf: 优化代码 * fix: 返回新对象 * fix: show tag error --------- Co-authored-by: papapatrick <109422393+Patrickill@users.noreply.github.com>
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
import { GET, POST, DELETE, PUT } from '@/web/common/api/request';
|
||||
import type { ChatHistoryItemType, ChatAppListSchema } from '@fastgpt/global/core/chat/type.d';
|
||||
|
||||
import type { ChatHistoryItemType, ChatHistoryItemResType } from '@fastgpt/global/core/chat/type.d';
|
||||
import { getResDataQuery } from '@/pages/api/core/chat/getResData';
|
||||
import type {
|
||||
CloseCustomFeedbackParams,
|
||||
InitChatProps,
|
||||
@@ -9,6 +9,7 @@ import type {
|
||||
GetHistoriesProps,
|
||||
InitTeamChatProps
|
||||
} from '@/global/core/chat/api.d';
|
||||
|
||||
import type {
|
||||
AdminUpdateFeedbackParams,
|
||||
ClearHistoriesProps,
|
||||
@@ -29,13 +30,16 @@ export const getInitOutLinkChatInfo = (data: InitOutLinkChatProps) =>
|
||||
GET<InitChatResponse>(`/core/chat/outLink/init`, data);
|
||||
export const getTeamChatInfo = (data: InitTeamChatProps) =>
|
||||
GET<InitChatResponse>(`/core/chat/team/init`, data);
|
||||
|
||||
/**
|
||||
* get current window history(appid or shareId)
|
||||
*/
|
||||
export const getChatHistories = (data: GetHistoriesProps) =>
|
||||
POST<ChatHistoryItemType[]>('/core/chat/getHistories', data);
|
||||
|
||||
/**
|
||||
* get detail responseData by dataId appId chatId
|
||||
*/
|
||||
export const getChatResData = (data: getResDataQuery) =>
|
||||
GET<ChatHistoryItemResType[]>(`/core/chat/getResData`, data);
|
||||
/**
|
||||
* delete one history
|
||||
*/
|
||||
|
Reference in New Issue
Block a user