ragas icon indicating copy to clipboard operation
ragas copied to clipboard

Add base_url parameter to embedding_factory for custom endpoint support

Open KoLogicDev opened this issue 8 months ago • 0 comments

Summary

This PR adds a base_url parameter to the embedding_factory function, allowing users to specify a custom API endpoint for the embedding model. This is particularly useful when working with OpenAI-compatible APIs hosted on private or self-hosted infrastructure.

Changes

  • Added base_url: Optional[str] = None to embedding_factory
  • Passed base_url to OpenAIEmbeddings initialization

Motivation

Enables greater flexibility when using embedding_factory, such as routing requests to non-default or local endpoints.

Notes

No breaking changes introduced. Default behavior remains unchanged when base_url is not provided.

KoLogicDev avatar Apr 18 '25 20:04 KoLogicDev