feat(knowledge): refactor knowledge creation form and improve form handling
This commit is contained in:
@@ -272,7 +272,9 @@ export const useKnowledgeOperations = () => {
|
||||
* 更新知识库基础信息
|
||||
* 包括名称、描述、语言等基本信息
|
||||
*/
|
||||
const updateKnowledgeBasicInfo = useCallback(async (data: IKnowledge) => {
|
||||
const updateKnowledgeBasicInfo = useCallback(async (data: {
|
||||
kb_id: string;
|
||||
} & Partial<IKnowledge>) => {
|
||||
try {
|
||||
setLoading(true);
|
||||
setError(null);
|
||||
@@ -300,10 +302,7 @@ export const useKnowledgeOperations = () => {
|
||||
*/
|
||||
const updateKnowledgeModelConfig = useCallback(async (data: {
|
||||
kb_id: string;
|
||||
embd_id?: string;
|
||||
parser_config?: Partial<IParserConfig>;
|
||||
parser_id?: string;
|
||||
}) => {
|
||||
} & Partial<IKnowledge>) => {
|
||||
try {
|
||||
setLoading(true);
|
||||
setError(null);
|
||||
|
||||
Reference in New Issue
Block a user