Skip to content

Commit

Permalink
Merge branch 'feat/parent-child-retrieval' into deploy/dev
Browse files Browse the repository at this point in the history
  • Loading branch information
iamjoel committed Dec 18, 2024
2 parents ffadedb + ade6dd4 commit 1050942
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions web/app/components/datasets/create/step-two/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -157,8 +157,8 @@ const StepTwo = ({
const dataSourceType = isInCreatePage ? inCreatePageDataSourceType : currentDataset?.data_source_type
const [segmentationType, setSegmentationType] = useState<SegmentType>(SegmentType.CUSTOM)
const [segmentIdentifier, doSetSegmentIdentifier] = useState(DEFAULT_SEGMENT_IDENTIFIER)
const setSegmentIdentifier = useCallback((value: string) => {
doSetSegmentIdentifier(value ? escape(value) : DEFAULT_SEGMENT_IDENTIFIER)
const setSegmentIdentifier = useCallback((value: string, canEmpty?: boolean) => {
doSetSegmentIdentifier(value ? escape(value) : (canEmpty ? '' : DEFAULT_SEGMENT_IDENTIFIER))
}, [])
const [maxChunkLength, setMaxChunkLength] = useState(DEFAULT_MAXMIMUM_CHUNK_LENGTH) // default chunk length
const [limitMaxChunkLength, setLimitMaxChunkLength] = useState(4000)
Expand Down Expand Up @@ -612,7 +612,7 @@ const StepTwo = ({
<div className='flex gap-3'>
<DelimiterInput
value={segmentIdentifier}
onChange={e => setSegmentIdentifier(e.target.value)}
onChange={e => setSegmentIdentifier(e.target.value, true)}
/>
<MaxLengthInput
value={maxChunkLength}
Expand Down Expand Up @@ -737,7 +737,7 @@ const StepTwo = ({
...parentChildConfig,
parent: {
...parentChildConfig.parent,
delimiter: e.target.value,
delimiter: e.target.value ? escape(e.target.value) : '',
},
})}
/>
Expand Down Expand Up @@ -782,7 +782,7 @@ const StepTwo = ({
...parentChildConfig,
child: {
...parentChildConfig.child,
delimiter: e.target.value,
delimiter: e.target.value ? escape(e.target.value) : '',
},
})}
/>
Expand Down

0 comments on commit 1050942

Please sign in to comment.