mirror of
https://github.com/labring/FastGPT.git
synced 2026-05-02 01:02:05 +08:00
V4.13.2 features (#5792)
* add manual create http toolset (#5743) * add manual create http toolset * optimize code * optimize * fix * fix * rename filename * feat: integrate ts-rest (#5741) * feat: integrate ts-rest * chore: classify core contract and pro contract * chore: update lockfile * chore: tweak dir structure * chore: tweak dir structure * update tsrest code (#5755) * doc * update tsrest code * fix http toolset (#5753) * fix http toolset * fix * perf: http toolset * fix: toolresponse result (#5760) * doc * fix: toolresponse result * fix: mongo watch * remove log * feat: integrated to minio (#5748) * feat: migrate to minio * feat: migrate apps' and dataset's avatar to minio * feat: migrate more avatars to minio * fix: lock file * feat: migrate copyright settings' logo to minio * feat: integrate minio * chore: improve code * chore: rename variables * refactor: s3 class * fix: s3 and mongo operations * chore: add session for avatar source * fix: init s3 buckets * fix: bugbot issues * expired time code * perf: avatar code * union type * export favouriteContract * empty bucket check --------- Co-authored-by: archer <545436317@qq.com> * refactor: zod schema to generate OpenAPI instead (#5771) * doc * fix: text split code (#5773) * fix: toolresponse result * remove log * stream remove * fix: text split code * fix: workflow (#5779) * fix: toolresponse result * remove log * fix: value check * fix: workflow * openapi doc * perf: bucket delete cron * doc * feat: apikey health * feat: export variables * api code move * perf: workflow performance (#5783) * perf: reactflow context * perf: workflow context split * perf: nodeList computed map * perf: nodes dependen * perf: workflow performance * workflow performance * removel og * lock * version * loop drag * reactflow size * reactflow size * fix: s3init (#5784) * doc * fix: s3init * perf: dynamic import * remove moongose dep * worker build * worker code * perf: worker build * fix: error throw * doc * doc * fix: build * fix: dockerfile * nextjs config * fix: worker * fix: build (#5791) * fix: build * vector cache code * fix: app info modal avatar upload method replace (#5787) * fix: app info modal avatar upload method replace * chore: replace all useSelectFile with useUploadAvatar * remove invalid code * add size * Update projects/app/src/pageComponents/app/detail/WorkflowComponents/Flow/nodes/render/RenderInput/templates/CommonInputForm.tsx Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> * Update projects/app/src/pageComponents/app/detail/WorkflowComponents/context/workflowInitContext.tsx Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> --------- Co-authored-by: heheer <heheer@sealos.io> Co-authored-by: 伍闲犬 <whoeverimf5@gmail.com> Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
This commit is contained in:
@@ -0,0 +1,19 @@
|
||||
import { z } from 'zod';
|
||||
import { ObjectIdSchema } from '../../../../common/type/mongo';
|
||||
|
||||
export const GetChatFavouriteListParamsSchema = z.object({
|
||||
name: z.string().optional().meta({ example: '测试应用', description: '精选应用名称' }),
|
||||
tag: z.string().optional().meta({ example: '效率', description: '精选应用标签' })
|
||||
});
|
||||
export type GetChatFavouriteListParamsType = z.infer<typeof GetChatFavouriteListParamsSchema>;
|
||||
|
||||
export const UpdateFavouriteAppTagsParamsSchema = z.object({
|
||||
id: ObjectIdSchema.meta({ example: '68ad85a7463006c963799a05', description: '精选应用 ID' }),
|
||||
tags: z.array(z.string()).meta({ example: ['效率', '工具'], description: '精选应用标签' })
|
||||
});
|
||||
|
||||
export const UpdateFavouriteAppParamsSchema = z.object({
|
||||
appId: ObjectIdSchema.meta({ example: '68ad85a7463006c963799a05', description: '精选应用 ID' }),
|
||||
order: z.number().meta({ example: 1, description: '排序' })
|
||||
});
|
||||
export type UpdateFavouriteAppParamsType = z.infer<typeof UpdateFavouriteAppParamsSchema>;
|
||||
@@ -0,0 +1,134 @@
|
||||
import { z } from 'zod';
|
||||
import type { OpenAPIPath } from '../../../type';
|
||||
import { ChatFavouriteAppSchema } from '../../../../core/chat/favouriteApp/type';
|
||||
import {
|
||||
GetChatFavouriteListParamsSchema,
|
||||
UpdateFavouriteAppParamsSchema,
|
||||
UpdateFavouriteAppTagsParamsSchema
|
||||
} from './api';
|
||||
import { ObjectIdSchema } from '../../../../common/type/mongo';
|
||||
|
||||
export const ChatFavouriteAppPath: OpenAPIPath = {
|
||||
'/proApi/core/chat/setting/favourite/list': {
|
||||
get: {
|
||||
summary: '获取精选应用列表',
|
||||
description: '获取团队配置的精选应用列表,支持按名称和标签筛选',
|
||||
tags: ['对话页配置'],
|
||||
requestParams: {
|
||||
query: GetChatFavouriteListParamsSchema
|
||||
},
|
||||
responses: {
|
||||
200: {
|
||||
description: '成功返回精选应用列表',
|
||||
content: {
|
||||
'application/json': {
|
||||
schema: z.array(ChatFavouriteAppSchema)
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
'/proApi/core/chat/setting/favourite/update': {
|
||||
post: {
|
||||
summary: '更新精选应用',
|
||||
description: '批量创建或更新精选应用配置,包括应用 ID、标签和排序信息',
|
||||
tags: ['对话页配置'],
|
||||
requestBody: {
|
||||
content: {
|
||||
'application/json': {
|
||||
schema: z.array(UpdateFavouriteAppParamsSchema)
|
||||
}
|
||||
}
|
||||
},
|
||||
responses: {
|
||||
200: {
|
||||
description: '成功更新精选应用',
|
||||
content: {
|
||||
'application/json': {
|
||||
schema: z.array(ChatFavouriteAppSchema)
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
'/proApi/core/chat/setting/favourite/order': {
|
||||
put: {
|
||||
summary: '更新精选应用排序',
|
||||
description: '批量更新精选应用的显示顺序',
|
||||
tags: ['对话页配置'],
|
||||
requestBody: {
|
||||
content: {
|
||||
'application/json': {
|
||||
schema: z.array(
|
||||
z.object({
|
||||
id: ObjectIdSchema.meta({
|
||||
example: '68ad85a7463006c963799a05',
|
||||
description: '精选应用 ID'
|
||||
}),
|
||||
order: z.number().meta({ example: 1, description: '排序' })
|
||||
})
|
||||
)
|
||||
}
|
||||
}
|
||||
},
|
||||
responses: {
|
||||
200: {
|
||||
description: '成功更新精选应用排序',
|
||||
content: {
|
||||
'application/json': {
|
||||
schema: z.null()
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
'/proApi/core/chat/setting/favourite/tags': {
|
||||
put: {
|
||||
summary: '更新精选应用标签',
|
||||
description: '批量更新精选应用的标签分类',
|
||||
tags: ['对话页配置'],
|
||||
requestBody: {
|
||||
content: {
|
||||
'application/json': {
|
||||
schema: z.array(UpdateFavouriteAppTagsParamsSchema)
|
||||
}
|
||||
}
|
||||
},
|
||||
responses: {
|
||||
200: {
|
||||
description: '成功更新精选应用标签',
|
||||
content: {
|
||||
'application/json': {
|
||||
schema: z.null()
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
'/proApi/core/chat/setting/favourite/delete': {
|
||||
delete: {
|
||||
summary: '删除精选应用',
|
||||
description: '根据 ID 删除指定的精选应用配置',
|
||||
tags: ['对话页配置'],
|
||||
requestParams: {
|
||||
query: z.object({
|
||||
id: ObjectIdSchema
|
||||
})
|
||||
},
|
||||
responses: {
|
||||
200: {
|
||||
description: '成功删除精选应用',
|
||||
content: {
|
||||
'application/json': {
|
||||
schema: z.null()
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
};
|
||||
@@ -0,0 +1,7 @@
|
||||
import { ChatSettingPath } from './setting';
|
||||
import { ChatFavouriteAppPath } from './favourite/index';
|
||||
|
||||
export const ChatPath = {
|
||||
...ChatSettingPath,
|
||||
...ChatFavouriteAppPath
|
||||
};
|
||||
@@ -0,0 +1,48 @@
|
||||
import type { OpenAPIPath } from '../../../type';
|
||||
import { ChatSettingSchema, ChatSettingModelSchema } from '../../../../core/chat/setting/type';
|
||||
|
||||
export const ChatSettingPath: OpenAPIPath = {
|
||||
'/proApi/core/chat/setting/detail': {
|
||||
get: {
|
||||
summary: '获取对话页设置',
|
||||
description:
|
||||
'获取当前团队的对话页设置,包括 slogan、对话提示、Logo、快捷应用、已选工具和精选应用标签等配置信息',
|
||||
tags: ['对话页配置'],
|
||||
responses: {
|
||||
200: {
|
||||
description: '成功返回对话页设置信息',
|
||||
content: {
|
||||
'application/json': {
|
||||
schema: ChatSettingSchema
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
'/proApi/core/chat/setting/update': {
|
||||
post: {
|
||||
summary: '更新对话页设置',
|
||||
description:
|
||||
'更新团队的对话页设置配置,包括 slogan、对话提示、Logo、快捷应用、已选工具和精选应用标签等信息',
|
||||
tags: ['对话页配置'],
|
||||
requestBody: {
|
||||
content: {
|
||||
'application/json': {
|
||||
schema: ChatSettingModelSchema.partial()
|
||||
}
|
||||
}
|
||||
},
|
||||
responses: {
|
||||
200: {
|
||||
description: '成功更新对话页设置',
|
||||
content: {
|
||||
'application/json': {
|
||||
schema: ChatSettingSchema
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
};
|
||||
Reference in New Issue
Block a user