Skip to content

Commit

Permalink
feat: add default strategy
Browse files Browse the repository at this point in the history
  • Loading branch information
Aralhi committed Feb 25, 2024
1 parent 2a75b0e commit 6b8a479
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions web/components/knowledge/segmentation.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -77,8 +77,8 @@ export default function Segmentation(props: IProps) {
fileStrategies.map((item) => {
const name = item?.chunk_parameters?.chunk_strategy;
if (!name) {
message.error(`Please select chunk strategy for ${item.name}.`);
checked = false;
// set default strategy
item.chunk_parameters = { chunk_strategy: 'Automatic' };
}
const strategy = strategies.filter((item) => item.strategy === name)[0];
const newParam: any = {
Expand Down

0 comments on commit 6b8a479

Please sign in to comment.