mirror of
https://github.com/BerriAI/litellm.git
synced 2026-09-06 08:16:43 +00:00
Merge pull request #5452 from BerriAI/litellm_allow_qdrant_api_key_to_be_optional
[Fix-Proxy] - Allow Qdrant API Key to be optional
This commit is contained in:
commit
281b183c7c
1 changed files with 5 additions and 3 deletions
|
|
@ -1276,10 +1276,12 @@ class QdrantSemanticCache(BaseCache):
|
|||
qdrant_api_base or os.getenv("QDRANT_URL") or os.getenv("QDRANT_API_BASE")
|
||||
)
|
||||
qdrant_api_key = qdrant_api_key or os.getenv("QDRANT_API_KEY")
|
||||
headers = {"api-key": qdrant_api_key, "Content-Type": "application/json"}
|
||||
headers = {"Content-Type": "application/json"}
|
||||
if qdrant_api_key:
|
||||
headers["api-key"] = qdrant_api_key
|
||||
|
||||
if qdrant_api_key is None or qdrant_api_base is None:
|
||||
raise ValueError("Qdrant url and api_key must be")
|
||||
if qdrant_api_base is None:
|
||||
raise ValueError("Qdrant url must be provided")
|
||||
|
||||
self.qdrant_api_base = qdrant_api_base
|
||||
self.qdrant_api_key = qdrant_api_key
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue