```
fix(embeddings): handle empty API key in LiteLLMEmbeddingEngine - Add conditional check for empty API key to prevent authentication errors- Set default API key to "EMPTY" when no valid key is provided- This ensures proper fallback behavior when API key is not configured ```
This commit is contained in:
parent
1061258fde
commit
f161cc3194
1 changed files with 1 additions and 1 deletions
|
|
@ -114,7 +114,7 @@ class LiteLLMEmbeddingEngine(EmbeddingEngine):
|
|||
response = await litellm.aembedding(
|
||||
model=self.model,
|
||||
input=text,
|
||||
api_key=self.api_key,
|
||||
api_key=self.api_key if self.api_key and self.api_key.strip() != "" else "EMPTY",
|
||||
api_base=self.endpoint,
|
||||
api_version=self.api_version,
|
||||
)
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue