fix(web): app's knowledge support graph retrieval
This commit is contained in:
@@ -1270,6 +1270,7 @@ export const en = {
|
|||||||
participle: 'Participle retrieval',
|
participle: 'Participle retrieval',
|
||||||
semantic: 'Semantic retrieval',
|
semantic: 'Semantic retrieval',
|
||||||
hybrid: 'Hybrid Retrieval',
|
hybrid: 'Hybrid Retrieval',
|
||||||
|
graph: 'Graph Retrieval',
|
||||||
|
|
||||||
similarity_threshold: 'Semantic similarity threshold',
|
similarity_threshold: 'Semantic similarity threshold',
|
||||||
similarity_threshold_desc: 'Only return results with semantic similarity higher than this threshold',
|
similarity_threshold_desc: 'Only return results with semantic similarity higher than this threshold',
|
||||||
|
|||||||
@@ -657,6 +657,7 @@ export const zh = {
|
|||||||
participle: '分词检索',
|
participle: '分词检索',
|
||||||
semantic: '语义检索',
|
semantic: '语义检索',
|
||||||
hybrid: '混合检索',
|
hybrid: '混合检索',
|
||||||
|
graph: '图谱检索',
|
||||||
|
|
||||||
similarity_threshold: '语义相似度阈值',
|
similarity_threshold: '语义相似度阈值',
|
||||||
similarity_threshold_desc: '仅返回语义相似度高于此阈值的结果',
|
similarity_threshold_desc: '仅返回语义相似度高于此阈值的结果',
|
||||||
|
|||||||
@@ -32,7 +32,7 @@ interface KnowledgeConfigModalProps {
|
|||||||
/**
|
/**
|
||||||
* Available retrieval types
|
* Available retrieval types
|
||||||
*/
|
*/
|
||||||
const retrieveTypes: RetrieveType[] = ['participle', 'semantic', 'hybrid']
|
const retrieveTypes: RetrieveType[] = ['participle', 'semantic', 'hybrid', 'graph']
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Modal for configuring knowledge base retrieval settings
|
* Modal for configuring knowledge base retrieval settings
|
||||||
|
|||||||
@@ -1,8 +1,8 @@
|
|||||||
/*
|
/*
|
||||||
* @Author: ZhaoYing
|
* @Author: ZhaoYing
|
||||||
* @Date: 2026-02-03 16:25:53
|
* @Date: 2026-02-03 16:25:53
|
||||||
* @Last Modified by: ZhaoYing
|
* @Last Modified by: ZhaoYing
|
||||||
* @Last Modified time: 2026-02-03 16:25:53
|
* @Last Modified time: 2026-04-07 17:16:47
|
||||||
*/
|
*/
|
||||||
/**
|
/**
|
||||||
* Type definitions for knowledge base configuration in application settings
|
* Type definitions for knowledge base configuration in application settings
|
||||||
@@ -28,7 +28,7 @@ export interface RerankerConfig {
|
|||||||
* - semantic: Semantic similarity based retrieval
|
* - semantic: Semantic similarity based retrieval
|
||||||
* - hybrid: Combination of both methods
|
* - hybrid: Combination of both methods
|
||||||
*/
|
*/
|
||||||
export type RetrieveType = 'participle' | 'semantic' | 'hybrid'
|
export type RetrieveType = 'participle' | 'semantic' | 'hybrid' | 'graph'
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Knowledge base configuration form data
|
* Knowledge base configuration form data
|
||||||
|
|||||||
@@ -12,7 +12,7 @@ const FormItem = Form.Item;
|
|||||||
interface KnowledgeConfigModalProps {
|
interface KnowledgeConfigModalProps {
|
||||||
refresh: (values: KnowledgeConfigForm, type: 'knowledgeConfig') => void;
|
refresh: (values: KnowledgeConfigForm, type: 'knowledgeConfig') => void;
|
||||||
}
|
}
|
||||||
const retrieveTypes: RetrieveType[] = ['participle', 'semantic', 'hybrid']
|
const retrieveTypes: RetrieveType[] = ['participle', 'semantic', 'hybrid', 'graph']
|
||||||
|
|
||||||
const KnowledgeConfigModal = forwardRef<KnowledgeConfigModalRef, KnowledgeConfigModalProps>(({
|
const KnowledgeConfigModal = forwardRef<KnowledgeConfigModalRef, KnowledgeConfigModalProps>(({
|
||||||
refresh,
|
refresh,
|
||||||
|
|||||||
@@ -5,7 +5,7 @@ export interface RerankerConfig {
|
|||||||
reranker_id?: string | undefined;
|
reranker_id?: string | undefined;
|
||||||
reranker_top_k?: number | undefined;
|
reranker_top_k?: number | undefined;
|
||||||
}
|
}
|
||||||
export type RetrieveType = 'participle' | 'semantic' | 'hybrid'
|
export type RetrieveType = 'participle' | 'semantic' | 'hybrid' | 'graph'
|
||||||
export interface KnowledgeConfigForm {
|
export interface KnowledgeConfigForm {
|
||||||
kb_id?: string;
|
kb_id?: string;
|
||||||
similarity_threshold?: number;
|
similarity_threshold?: number;
|
||||||
|
|||||||
Reference in New Issue
Block a user