mirror of
https://github.com/danny-avila/LibreChat.git
synced 2025-12-23 03:40:14 +01:00
🔍 feat: Add SearXNG for Web Search and Enhance ApiKeyDialog (#8242)
* 🔍 feat: Add SearXNG Web Search support and enhance ApiKeyDialog - Updated WebSearch component to include authentication data for web search functionality so it won't show badge after being revoked - Refactored ApiKeyDialog to streamline provider, scraper, and reranker selection with new InputSection component - Added support for SearXNG as a search provider and updated translation files accordingly - Improved form handling in useAuthSearchTool to accommodate new API keys and URLs * 📜 chore: remove unused i18next key * 📦 chore: address comments (swap API key and URL fields in SearXNG config, change input fields to 'text' from 'password' * 📦 chore: make URL fields go first in ApiKeyDialog * chore: bump @librechat/agents to v2.4.52 * ci: update webSearch configuration to include searxng fields in AppService.spec.js --------- Co-authored-by: Danny Avila <danny@librechat.ai>
This commit is contained in:
parent
91a2df4759
commit
e0f468da20
12 changed files with 331 additions and 289 deletions
|
|
@ -4,7 +4,14 @@ import { AuthType, Tools, QueryKeys } from 'librechat-data-provider';
|
|||
import { useUpdateUserPluginsMutation } from 'librechat-data-provider/react-query';
|
||||
|
||||
export type SearchApiKeyFormData = {
|
||||
// Selected options
|
||||
selectedProvider: string;
|
||||
selectedReranker: string;
|
||||
selectedScraper: string;
|
||||
// API keys and URLs
|
||||
serperApiKey: string;
|
||||
searxngInstanceUrl: string;
|
||||
searxngApiKey: string;
|
||||
firecrawlApiKey: string;
|
||||
firecrawlApiUrl: string;
|
||||
jinaApiKey: string;
|
||||
|
|
@ -42,6 +49,8 @@ const useAuthSearchTool = (options?: { isEntityTool: boolean }) => {
|
|||
(data: SearchApiKeyFormData) => {
|
||||
const auth = Object.entries({
|
||||
serperApiKey: data.serperApiKey,
|
||||
searxngInstanceUrl: data.searxngInstanceUrl,
|
||||
searxngApiKey: data.searxngApiKey,
|
||||
firecrawlApiKey: data.firecrawlApiKey,
|
||||
firecrawlApiUrl: data.firecrawlApiUrl,
|
||||
jinaApiKey: data.jinaApiKey,
|
||||
|
|
|
|||
|
|
@ -19,12 +19,11 @@ export default function useSearchApiKeyForm({
|
|||
|
||||
const onSubmitHandler = useCallback(
|
||||
(data: SearchApiKeyFormData) => {
|
||||
reset();
|
||||
installTool(data);
|
||||
setIsDialogOpen(false);
|
||||
onSubmit?.();
|
||||
},
|
||||
[onSubmit, reset, installTool],
|
||||
[onSubmit, installTool],
|
||||
);
|
||||
|
||||
const handleRevokeApiKey = useCallback(() => {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue