firecrawl
firecrawl copied to clipboard
[Feat] Abstract the LLM Extraction to allow for other models and a model providers
Problem Description Currently, Firecrawl's service uses OpenAI's models. This restriction might not cater to all users' needs, as some might prefer using alternative models that are can handle different langauges, or have a domain specific focus, such as medical or financial. Additionally, users may want to bring their own models (via API keys), or those running a local instance of Firecrawl might prefer using a self-hosted model. The lack of flexibility in model selection can hinder adoption and limit the potential user base of Firecrawl.
Proposed Feature Introduce the capability to configure Firecrawl to use different language models. This feature should allow users to:
Select from a list of pre-integrated alternative models.
Bring their own model by providing an API key.
Use a self-hosted model for local deployments of Firecrawl.
Alternatives Considered Sticking with OpenAI's models exclusively: This limits user choice and could lead to higher costs and slower response times depending on the user's needs. Integrating a single alternative model: While this offers some flexibility, it still doesn't cater to users who may have specific models they prefer or are already invested in.
These alternatives were deemed unsuitable as they do not provide the level of flexibility and customization that diverse user scenarios require.
Implementation Suggestions
Configuration Interface: Develop a configuration interface where users can select their preferred model or input their API key for a custom model.
Model Integration: Implement backend changes to support multiple model APIs, ensuring the system can handle requests and responses from different providers.
Documentation: Provide clear documentation and examples on how users can configure and integrate their own models.
Use Case
Alternative Models: A user working with a constrained budget could choose a cheaper model to save on costs without compromising too much on performance.
Custom API Key: An organization with a proprietary language model could integrate their model into Firecrawl, leveraging their own API key.
Self-hosted Model: A developer running Firecrawl locally for a privacy-sensitive project could use a self-hosted model, ensuring that no data leaves their secure environment.
Implementing this feature will enhance Firecrawl's flexibility, making it more attractive to a broader range of users and use cases. It will also empower users to optimize their usage based on specific needs, preferences, and constraints.