mirror of
https://github.com/dzhng/deep-research.git
synced 2025-12-26 04:48:06 +08:00
feat: added support for self-hosted
Co-authored-by: Siddik <bitcentsup@gmail.com>
This commit is contained in:
parent
4e7f73f317
commit
0ec269d701
@ -90,8 +90,8 @@ npm install
|
||||
|
||||
```bash
|
||||
FIRECRAWL_KEY="your_firecrawl_key"
|
||||
# If you want to use your localhost firecrawl, add the following below:
|
||||
FIRECRAWL_BASE_URL="http://localhost:3002"
|
||||
# If you want to use your self-hosted Firecrawl, add the following below:
|
||||
# FIRECRAWL_BASE_URL="http://localhost:3002"
|
||||
|
||||
OPENAI_KEY="your_openai_key"
|
||||
```
|
||||
|
||||
@ -15,11 +15,11 @@ type ResearchResult = {
|
||||
// increase this if you have higher API rate limits
|
||||
const ConcurrencyLimit = 2;
|
||||
|
||||
// Initialize Firecrawl with API key if available, otherwise use local
|
||||
const isLocal = !process.env.FIRECRAWL_KEY || process.env.FIRECRAWL_KEY === "your_firecrawl_key";
|
||||
// Initialize Firecrawl with optional API key and optional base url
|
||||
|
||||
const firecrawl = new FirecrawlApp({
|
||||
apiKey: isLocal ? 'local-development-token' : process.env.FIRECRAWL_KEY!,
|
||||
apiUrl: isLocal ? (process.env.FIRECRAWL_BASE_URL || 'http://localhost:3002') : undefined
|
||||
apiKey: process.env.FIRECRAWL_KEY ?? "",
|
||||
apiUrl: process.env.FIRECRAWL_BASE_URL
|
||||
});
|
||||
|
||||
// Default options for API consistency
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user