feat(knowledge): add configuration components and refactor general form
feat(hooks): add llm-related hooks and constants docs: add architecture analysis for reference projects
This commit is contained in:
@@ -11,7 +11,7 @@ import type {
|
||||
IKnowledgeFile,
|
||||
IChunk,
|
||||
IRenameTag,
|
||||
ParserConfig,
|
||||
IParserConfig,
|
||||
} from '@/interfaces/database/knowledge';
|
||||
import type { GridRowSelectionModel } from '@mui/x-data-grid';
|
||||
|
||||
@@ -120,8 +120,8 @@ const knowledgeService = {
|
||||
return post(api.document_run, data);
|
||||
},
|
||||
|
||||
// 更改文档解析器
|
||||
changeDocumentParser: (data: { doc_id: string; parser_config: ParserConfig }) => {
|
||||
// 更改文档解析器配置
|
||||
changeDocumentParser: (data: { doc_id: string; parser_config: IParserConfig }) => {
|
||||
return post(api.document_change_parser, data);
|
||||
},
|
||||
|
||||
|
||||
@@ -2,6 +2,7 @@ import api from './api';
|
||||
import request, { post } from '@/utils/request';
|
||||
import type { ITenantInfo } from '@/interfaces/database/knowledge';
|
||||
import type { IUserInfo, ITenant } from '@/interfaces/database/user-setting';
|
||||
import type { LlmModelType } from '@/constants/knowledge';
|
||||
|
||||
// 用户相关API服务
|
||||
const userService = {
|
||||
@@ -71,6 +72,11 @@ const userService = {
|
||||
agreeTenant: (tenantId: string) => {
|
||||
return request.put(api.agreeTenant(tenantId));
|
||||
},
|
||||
|
||||
// 获取LLM模型列表
|
||||
llm_list: (data: { model_type?: LlmModelType }) => {
|
||||
return request.get(api.llm_list, { params: data });
|
||||
},
|
||||
};
|
||||
|
||||
export default userService;
|
||||
Reference in New Issue
Block a user