Skip to content

Conversation

@atomlong
Copy link

@atomlong atomlong commented Mar 6, 2025

Summary

This PR adds the ability to set the base_url for the LLM extraction strategy in the CLI. This allows users to specify a custom base URL for their LLM provider, which is useful for using self-hosted or alternative LLM endpoints.

List of files changed and why

  • crawl4ai/cli.py: Modified to accept the base_url parameter in the extraction_config for the LLM extraction strategy and pass it to the LLMConfig object.

How Has This Been Tested?

I have manually tested this change by:

  1. Running the CLI with an extraction_config that includes the base_url parameter.
  2. Verifying that the base_url is correctly passed to the LLMConfig object.
  3. Confirming that the LLM extraction strategy uses the specified base_url when making requests to the LLM provider.

Checklist:

  • My code follows the style guidelines of this project
  • I have performed a self-review of my own code
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation
  • I have added/updated unit tests that prove my fix is effective or that my feature works
  • New and existing unit tests pass locally with my changes

@atomlong atomlong force-pushed the feature/llm_base_url branch from f91c3fa to 5718470 Compare March 7, 2025 13:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant