feat(knowledge): adjust default top-n to 10 (#5919)

This commit is contained in:
Chen Tao 2025-05-12 20:32:28 +08:00 committed by GitHub
parent 5f3ef42826
commit dd5229d5ba
2 changed files with 2 additions and 2 deletions

View File

@ -38,7 +38,7 @@ export default abstract class BaseReranker {
protected getRerankRequestBody(query: string, searchResults: ExtractChunkData[]) {
const provider = this.base.rerankModelProvider
const documents = searchResults.map((doc) => doc.pageContent)
const topN = this.base.topN || 5
const topN = this.base.topN || 10
if (provider === 'voyageai') {
return {

View File

@ -291,7 +291,7 @@ const PopupContainer: React.FC<Props> = ({ base: _base, resolve }) => {
rules={[
{
validator(_, value) {
if (value && (value < 0 || value > 10)) {
if (value && (value < 0 || value > 30)) {
return Promise.reject(new Error(t('knowledge.topN_too_large_or_small')))
}
return Promise.resolve()