mirror of
https://github.com/danny-avila/LibreChat.git
synced 2025-12-19 18:00:15 +01:00
🔥 feat: Add Firecrawl Scraper Configurability (#8495)
- Added firecrawlOptions configuration field to librechat.yaml - Refactored web.ts to live in packages/api rather than data-provider - Updated imports from web.ts to reflect new location - Added firecrawlOptions to FirecrawlConfig interface - Added firecrawlOptions to authResult of loadWebSearchAuth so it gets properly passed to agents to be built into firecrawl payload - Added tests for firecrawlOptions to web.spec.ts
This commit is contained in:
parent
0761e65086
commit
d0c958ba33
12 changed files with 410 additions and 50 deletions
|
|
@ -658,6 +658,39 @@ export const webSearchSchema = z.object({
|
|||
rerankerType: z.nativeEnum(RerankerTypes).optional(),
|
||||
scraperTimeout: z.number().optional(),
|
||||
safeSearch: z.nativeEnum(SafeSearchTypes).default(SafeSearchTypes.MODERATE),
|
||||
firecrawlOptions: z
|
||||
.object({
|
||||
formats: z.array(z.string()).optional(),
|
||||
includeTags: z.array(z.string()).optional(),
|
||||
excludeTags: z.array(z.string()).optional(),
|
||||
headers: z.record(z.string()).optional(),
|
||||
waitFor: z.number().optional(),
|
||||
timeout: z.number().optional(),
|
||||
maxAge: z.number().optional(),
|
||||
mobile: z.boolean().optional(),
|
||||
skipTlsVerification: z.boolean().optional(),
|
||||
blockAds: z.boolean().optional(),
|
||||
removeBase64Images: z.boolean().optional(),
|
||||
parsePDF: z.boolean().optional(),
|
||||
storeInCache: z.boolean().optional(),
|
||||
zeroDataRetention: z.boolean().optional(),
|
||||
location: z
|
||||
.object({
|
||||
country: z.string().optional(),
|
||||
languages: z.array(z.string()).optional(),
|
||||
})
|
||||
.optional(),
|
||||
onlyMainContent: z.boolean().optional(),
|
||||
changeTrackingOptions: z
|
||||
.object({
|
||||
modes: z.array(z.string()).optional(),
|
||||
schema: z.record(z.unknown()).optional(),
|
||||
prompt: z.string().optional(),
|
||||
tag: z.string().nullable().optional(),
|
||||
})
|
||||
.optional(),
|
||||
})
|
||||
.optional(),
|
||||
});
|
||||
|
||||
export type TWebSearchConfig = z.infer<typeof webSearchSchema>;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue