fix: Embedding engine fix (#1319)

<!-- .github/pull_request_template.md -->

## Description
<!-- Provide a clear description of the changes in this PR -->

## DCO Affirmation
I affirm that all code in every commit of this pull request conforms to
the terms of the Topoteretes Developer Certificate of Origin.
This commit is contained in:
Vasilije 2025-09-01 17:17:04 +02:00 committed by GitHub
commit 7b21170e8e
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -33,6 +33,7 @@ def get_embedding_engine() -> EmbeddingEngine:
config.embedding_api_version,
config.huggingface_tokenizer,
llm_config.llm_api_key,
llm_config.llm_provider
)
@ -47,6 +48,7 @@ def create_embedding_engine(
embedding_api_version,
huggingface_tokenizer,
llm_api_key,
llm_provider
):
"""
Create and return an embedding engine based on the specified provider.
@ -99,7 +101,7 @@ def create_embedding_engine(
return LiteLLMEmbeddingEngine(
provider=embedding_provider,
api_key=embedding_api_key or llm_api_key,
api_key=embedding_api_key or (embedding_api_key if llm_provider == 'custom' else llm_api_key),
endpoint=embedding_endpoint,
api_version=embedding_api_version,
model=embedding_model,