forked from phoenix/litellm-mirror
fix(huggingface_restapi.py): fix tests
This commit is contained in:
parent
0c26b36d9d
commit
8c5ff150f6
2 changed files with 6 additions and 4 deletions
|
@ -619,6 +619,8 @@ class Huggingface(BaseLLM):
|
|||
|
||||
# SSL certificates (a.k.a CA bundle) used to verify the identity of requested hosts.
|
||||
ssl_verify = os.getenv("SSL_VERIFY", litellm.ssl_verify)
|
||||
if ssl_verify in ["True", "False"]:
|
||||
ssl_verify = bool(ssl_verify)
|
||||
|
||||
if acompletion is True:
|
||||
### ASYNC STREAMING
|
||||
|
@ -634,7 +636,7 @@ class Huggingface(BaseLLM):
|
|||
headers=headers,
|
||||
data=json.dumps(data),
|
||||
stream=optional_params["stream"],
|
||||
verify=ssl_verify
|
||||
verify=ssl_verify,
|
||||
)
|
||||
return response.iter_lines()
|
||||
### SYNC COMPLETION
|
||||
|
@ -643,7 +645,7 @@ class Huggingface(BaseLLM):
|
|||
completion_url,
|
||||
headers=headers,
|
||||
data=json.dumps(data),
|
||||
verify=ssl_verify
|
||||
verify=ssl_verify,
|
||||
)
|
||||
|
||||
## Some servers might return streaming responses even though stream was not set to true. (e.g. Baseten)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue