diff --git a/web/app/(commonLayout)/datasets/Container.tsx b/web/app/(commonLayout)/datasets/Container.tsx index a0edb1cd61..c39d9c5dbf 100644 --- a/web/app/(commonLayout)/datasets/Container.tsx +++ b/web/app/(commonLayout)/datasets/Container.tsx @@ -4,7 +4,8 @@ import { useEffect, useMemo, useRef, useState } from 'react' import { useRouter } from 'next/navigation' import { useTranslation } from 'react-i18next' -import { useDebounceFn } from 'ahooks' +import { useBoolean, useDebounceFn } from 'ahooks' +import { useQuery } from '@tanstack/react-query' // Components import ExternalAPIPanel from '../../components/datasets/external-api/external-api-panel' @@ -16,7 +17,9 @@ import TabSliderNew from '@/app/components/base/tab-slider-new' import TagManagementModal from '@/app/components/base/tag-management' import TagFilter from '@/app/components/base/tag-management/filter' import Button from '@/app/components/base/button' +import Input from '@/app/components/base/input' import { ApiConnectionMod } from '@/app/components/base/icons/src/vender/solid/development' +import CheckboxWithLabel from '@/app/components/datasets/create/website/base/checkbox-with-label' // Services import { fetchDatasetApiBaseUrl } from '@/service/datasets' @@ -26,16 +29,14 @@ import { useTabSearchParams } from '@/hooks/use-tab-searchparams' import { useStore as useTagStore } from '@/app/components/base/tag-management/store' import { useAppContext } from '@/context/app-context' import { useExternalApiPanel } from '@/context/external-api-panel-context' -// eslint-disable-next-line import/order -import { useQuery } from '@tanstack/react-query' -import Input from '@/app/components/base/input' const Container = () => { const { t } = useTranslation() const router = useRouter() - const { currentWorkspace } = useAppContext() + const { currentWorkspace, isCurrentWorkspaceOwner } = useAppContext() const showTagManagementModal = useTagStore(s => s.showTagManagementModal) const { showExternalApiPanel, setShowExternalApiPanel } = useExternalApiPanel() + const [includeAll, { toggle: toggleIncludeAll }] = useBoolean(false) const options = useMemo(() => { return [ @@ -90,6 +91,14 @@ const Container = () => { /> {activeTab === 'dataset' && (
max_tokens
The maximum length (tokens) must be validated to be shorter than the length of the parent chunk
- chunk_overlap
Define the overlap between adjacent chunks (optional)
+ search_method
(string) Search method
+ - hybrid_search
Hybrid search
+ - semantic_search
Semantic search
+ - full_text_search
Full-text search
+ - reranking_enable
(bool) Whether to enable reranking
+ - reranking_mode
(object) Rerank model configuration
+ - reranking_provider_name
(string) Rerank model provider
+ - reranking_model_name
(string) Rerank model name
+ - top_k
(int) Number of results to return
+ - score_threshold_enabled
(bool) Whether to enable score threshold
+ - score_threshold
(float) Score threshold
+ search_method
(string) Search method
+ - hybrid_search
Hybrid search
+ - semantic_search
Semantic search
+ - full_text_search
Full-text search
+ - reranking_enable
(bool) Whether to enable reranking
+ - reranking_mode
(object) Rerank model configuration
+ - reranking_provider_name
(string) Rerank model provider
+ - reranking_model_name
(string) Rerank model name
+ - top_k
(int) Number of results to return
+ - score_threshold_enabled
(bool) Whether to enable score threshold
+ - score_threshold
(float) Score threshold
+ reranking_mode
(object) Rerank model configuration, required if reranking is enabled
- reranking_provider_name
(string) Rerank model provider
- reranking_model_name
(string) Rerank model name
- - weights
(double) Semantic search weight setting in hybrid search mode
+ - weights
(float) Semantic search weight setting in hybrid search mode
- top_k
(integer) Number of results to return (optional)
- score_threshold_enabled
(bool) Whether to enable score threshold
- - score_threshold
(double) Score threshold
+ - score_threshold
(float) Score threshold
max_tokens
最大长度 (token) 需要校验小于父级的长度
- chunk_overlap
分段重叠指的是在对数据进行分段时,段与段之间存在一定的重叠部分(选填)
search_method
(string) 检索方法
+ - hybrid_search
混合检索
+ - semantic_search
语义检索
+ - full_text_search
全文检索
+ - reranking_enable
(bool) 是否开启rerank
+ - reranking_model
(object) Rerank 模型配置
+ - reranking_provider_name
(string) Rerank 模型的提供商
+ - reranking_model_name
(string) Rerank 模型的名称
+ - top_k
(int) 召回条数
+ - score_threshold_enabled
(bool)是否开启召回分数限制
+ - score_threshold
(float) 召回分数限制
+ search_method
(string) 检索方法
+ - hybrid_search
混合检索
+ - semantic_search
语义检索
+ - full_text_search
全文检索
+ - reranking_enable
(bool) 是否开启rerank
+ - reranking_model
(object) Rerank 模型配置
+ - reranking_provider_name
(string) Rerank 模型的提供商
+ - reranking_model_name
(string) Rerank 模型的名称
+ - top_k
(int) 召回条数
+ - score_threshold_enabled
(bool)是否开启召回分数限制
+ - score_threshold
(float) 召回分数限制
+ full_text_search
全文检索
- hybrid_search
混合检索
- reranking_enable
(bool) 是否启用 Reranking,非必填,如果检索模式为 semantic_search 模式或者 hybrid_search 则传值
- - reranking_mode
(object) Rerank模型配置,非必填,如果启用了 reranking 则传值
+ - reranking_mode
(object) Rerank 模型配置,非必填,如果启用了 reranking 则传值
- reranking_provider_name
(string) Rerank 模型提供商
- reranking_model_name
(string) Rerank 模型名称
- - weights
(double) 混合检索模式下语意检索的权重设置
+ - weights
(float) 混合检索模式下语意检索的权重设置
- top_k
(integer) 返回结果数量,非必填
- score_threshold_enabled
(bool) 是否开启 score 阈值
- - score_threshold
(double) Score 阈值
+ - score_threshold
(float) Score 阈值