mirror of
https://git.mirrors.martin98.com/https://github.com/mendableai/firecrawl
synced 2025-08-14 11:56:09 +08:00
Remove OpenAI API key references, use only OpenRouter API key
Co-Authored-By: eric@sideguide.dev <eric@sideguide.dev>
This commit is contained in:
parent
018c6a616e
commit
b646c3e9d9
@ -1,8 +1,5 @@
|
|||||||
# Firecrawl API key
|
# Firecrawl API key
|
||||||
FIRECRAWL_API_KEY=your_firecrawl_api_key_here
|
FIRECRAWL_API_KEY=your_firecrawl_api_key_here
|
||||||
|
|
||||||
# OpenAI API key (if using OpenAI for OpenRouter)
|
# OpenRouter API key
|
||||||
OPENAI_API_KEY=your_openai_api_key_here
|
|
||||||
|
|
||||||
# OpenRouter API key (alternative to OpenAI API key)
|
|
||||||
OPENROUTER_API_KEY=your_openrouter_api_key_here
|
OPENROUTER_API_KEY=your_openrouter_api_key_here
|
||||||
|
@ -13,7 +13,7 @@ This example demonstrates how to use the Firecrawl API with the Qwen3 30B A3B mo
|
|||||||
|
|
||||||
- Python 3.7+
|
- Python 3.7+
|
||||||
- Firecrawl API key
|
- Firecrawl API key
|
||||||
- OpenRouter API key (or OpenAI API key configured for OpenRouter)
|
- OpenRouter API key
|
||||||
|
|
||||||
## Setup
|
## Setup
|
||||||
|
|
||||||
@ -25,7 +25,6 @@ This example demonstrates how to use the Firecrawl API with the Qwen3 30B A3B mo
|
|||||||
3. Create a `.env` file based on the `.env.example` template and add your API keys:
|
3. Create a `.env` file based on the `.env.example` template and add your API keys:
|
||||||
```
|
```
|
||||||
FIRECRAWL_API_KEY=your_firecrawl_api_key_here
|
FIRECRAWL_API_KEY=your_firecrawl_api_key_here
|
||||||
OPENAI_API_KEY=your_openai_api_key_here
|
|
||||||
OPENROUTER_API_KEY=your_openrouter_api_key_here
|
OPENROUTER_API_KEY=your_openrouter_api_key_here
|
||||||
```
|
```
|
||||||
|
|
||||||
|
@ -16,12 +16,11 @@ class Colors:
|
|||||||
load_dotenv()
|
load_dotenv()
|
||||||
|
|
||||||
firecrawl_api_key = os.getenv("FIRECRAWL_API_KEY")
|
firecrawl_api_key = os.getenv("FIRECRAWL_API_KEY")
|
||||||
openai_api_key = os.getenv("OPENAI_API_KEY")
|
|
||||||
openrouter_api_key = os.getenv("OPENROUTER_API_KEY")
|
openrouter_api_key = os.getenv("OPENROUTER_API_KEY")
|
||||||
|
|
||||||
app = FirecrawlApp(api_key=firecrawl_api_key)
|
app = FirecrawlApp(api_key=firecrawl_api_key)
|
||||||
client = OpenAI(
|
client = OpenAI(
|
||||||
api_key=openai_api_key or openrouter_api_key,
|
api_key=openrouter_api_key,
|
||||||
base_url="https://openrouter.ai/api/v1"
|
base_url="https://openrouter.ai/api/v1"
|
||||||
)
|
)
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user