Removed process.env call for API_KEY

This commit is contained in:
Rafael Miller 2024-04-25 13:33:06 -03:00 committed by GitHub
parent e8b8150b56
commit 03d1c64ac8
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 2 additions and 2 deletions

View File

@ -55,7 +55,7 @@ export default class FirecrawlApp {
* @param {FirecrawlAppConfig} config - Configuration options for the FirecrawlApp instance.
*/
constructor({ apiKey = null }: FirecrawlAppConfig) {
this.apiKey = apiKey || process.env.FIRECRAWL_API_KEY || '';
this.apiKey = apiKey || '';
if (!this.apiKey) {
throw new Error('No API key provided');
}
@ -224,4 +224,4 @@ export default class FirecrawlApp {
throw new Error(`Unexpected error occurred while trying to ${action}. Status code: ${response.status}`);
}
}
}
}