1fb2bedd2b
- Added new API endpoints for managing chat history configuration and retrieval settings, allowing tenants to enable message indexing and configure search parameters. - Introduced new Vue components for ChatHistorySettings and RetrievalSettings, providing a user-friendly interface for managing these configurations. - Updated localization files to include new settings descriptions and labels in multiple languages. - Enhanced the KnowledgeSearch view to support searching across both knowledge bases and chat history, improving the overall search functionality. These changes significantly enhance the application's capabilities in managing and retrieving chat history, contributing to a more robust user experience.
23 lines
695 B
TypeScript
23 lines
695 B
TypeScript
import { get, put } from '@/utils/request'
|
|
|
|
// RetrievalConfig represents the global retrieval/search configuration for a tenant.
|
|
// Shared by knowledge search and message search.
|
|
export interface RetrievalConfig {
|
|
embedding_top_k: number
|
|
vector_threshold: number
|
|
keyword_threshold: number
|
|
rerank_top_k: number
|
|
rerank_threshold: number
|
|
rerank_model_id: string
|
|
}
|
|
|
|
// Get tenant retrieval config via KV API
|
|
export function getTenantRetrievalConfig() {
|
|
return get('/api/v1/tenants/kv/retrieval-config')
|
|
}
|
|
|
|
// Update tenant retrieval config via KV API
|
|
export function updateTenantRetrievalConfig(config: RetrievalConfig) {
|
|
return put('/api/v1/tenants/kv/retrieval-config', config)
|
|
}
|