mirror of
https://github.com/danny-avila/LibreChat.git
synced 2025-12-16 16:30:15 +01:00
feat: Adding simple reranker for rag_api.
This commit is contained in:
parent
b288d81f5a
commit
2b8578c94a
7 changed files with 12 additions and 2 deletions
|
|
@ -76,6 +76,7 @@
|
|||
- Search the internet and retrieve relevant information to enhance your AI context
|
||||
- Combines search providers, content scrapers, and result rerankers for optimal results
|
||||
- **Customizable Jina Reranking**: Configure custom Jina API URLs for reranking services
|
||||
- Run local reranking with open source models through the rag_api.
|
||||
- **[Learn More →](https://www.librechat.ai/docs/features/web_search)**
|
||||
|
||||
- 🪄 **Generative UI with Code Artifacts**:
|
||||
|
|
|
|||
|
|
@ -117,6 +117,11 @@ export default function ApiKeyDialog({
|
|||
},
|
||||
},
|
||||
},
|
||||
{
|
||||
key: RerankerTypes.SIMPLE,
|
||||
label: localize('com_ui_web_search_reranker_simple'),
|
||||
inputs: {},
|
||||
},
|
||||
];
|
||||
|
||||
const scraperOptions: DropdownOption[] = [
|
||||
|
|
|
|||
|
|
@ -1316,6 +1316,7 @@
|
|||
"com_ui_web_search_reranker_jina": "Jina AI",
|
||||
"com_ui_web_search_reranker_jina_key": "Get your Jina API key",
|
||||
"com_ui_web_search_reranker_jina_url_help": "Learn about Jina Rerank API",
|
||||
"com_ui_web_search_reranker_simple": "Simple",
|
||||
"com_ui_web_search_scraper": "Scraper",
|
||||
"com_ui_web_search_scraper_firecrawl": "Firecrawl API",
|
||||
"com_ui_web_search_scraper_firecrawl_key": "Get your Firecrawl API key",
|
||||
|
|
|
|||
|
|
@ -120,7 +120,8 @@ export async function loadWebSearchAuth({
|
|||
}
|
||||
}
|
||||
|
||||
if (requiredKeys.length === 0) continue;
|
||||
const simpleReRankerChosen = specificService && service === 'simple';
|
||||
if (!simpleReRankerChosen && requiredKeys.length === 0) continue;
|
||||
|
||||
const requiredAuthFields = extractWebSearchEnvVars({
|
||||
keys: requiredKeys,
|
||||
|
|
|
|||
|
|
@ -707,6 +707,7 @@ export enum ScraperProviders {
|
|||
export enum RerankerTypes {
|
||||
JINA = 'jina',
|
||||
COHERE = 'cohere',
|
||||
SIMPLE = 'simple',
|
||||
}
|
||||
|
||||
export enum SafeSearchTypes {
|
||||
|
|
|
|||
|
|
@ -12,7 +12,7 @@ export enum DATE_RANGE {
|
|||
}
|
||||
|
||||
export type SearchProvider = 'serper' | 'searxng';
|
||||
export type RerankerType = 'infinity' | 'jina' | 'cohere' | 'none';
|
||||
export type RerankerType = 'infinity' | 'jina' | 'cohere' | 'simple' | 'none';
|
||||
|
||||
export interface Highlight {
|
||||
score: number;
|
||||
|
|
|
|||
|
|
@ -31,6 +31,7 @@ export const webSearchAuth = {
|
|||
jinaApiUrl: 0 as const,
|
||||
},
|
||||
cohere: { cohereApiKey: 1 as const },
|
||||
simple: { },
|
||||
},
|
||||
};
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue