mirror of
https://github.com/CherryHQ/cherry-studio.git
synced 2025-12-25 11:20:07 +08:00
feat(knowledge): adjust default top-n to 10 (#5919)
This commit is contained in:
parent
0bb25bfe9e
commit
63b8ca4888
@ -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 {
|
||||
|
||||
@ -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()
|
||||
|
||||
Loading…
Reference in New Issue
Block a user