fix: fix Unsupport authentication type error for Ollama (#2018)

This commit is contained in:
Sarah Wooders
2024-11-09 14:46:39 -08:00
committed by GitHub
parent db18c15ffa
commit 4f30288c14

View File

@@ -18,7 +18,7 @@ def post_json_auth_request(uri, json_payload, auth_type, auth_key):
"""Send a POST request with a JSON payload and optional authentication"""
# By default most local LLM inference servers do not have authorization enabled
if auth_type is None:
if auth_type is None or auth_type == "":
response = requests.post(uri, json=json_payload)
# Used by OpenAI, together.ai, Mistral AI