```
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
a0f25f4f50
commit
2c79d693fd
1 changed files with 1 additions and 1 deletions
|
|
@ -134,7 +134,7 @@ class LiteLLMEmbeddingEngine(EmbeddingEngine):
|
|||
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