forked from infiniflow/ragflow
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: Add EntityTypesForm infiniflow#162 (infiniflow#1777)
### What problem does this PR solve? feat: Add EntityTypesForm infiniflow#162 ### Type of change - [x] New Feature (non-breaking change which adds functionality)
- Loading branch information
Showing
10 changed files
with
62 additions
and
12 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
import { useTranslate } from '@/hooks/common-hooks'; | ||
import { Form } from 'antd'; | ||
import EditTag from './edit-tag'; | ||
|
||
const initialEntityTypes = [ | ||
'organization', | ||
'person', | ||
'location', | ||
'event', | ||
'time', | ||
]; | ||
|
||
const EntityTypesForm = () => { | ||
const { t } = useTranslate('knowledgeConfiguration'); | ||
return ( | ||
<Form.Item | ||
name={['parser_config', 'entity_types']} | ||
label={t('entityTypes')} | ||
rules={[{ required: true }]} | ||
initialValue={initialEntityTypes} | ||
valuePropName="tags" | ||
trigger="setTags" | ||
> | ||
<EditTag></EditTag> | ||
</Form.Item> | ||
); | ||
}; | ||
|
||
export default EntityTypesForm; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
.../pages/add-knowledge/components/knowledge-chunk/components/chunk-creating-modal/index.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters