forked from phoenix/litellm-mirror
fix(huggingface_restapi.py): fixing formatting
This commit is contained in:
parent
d1c0343fe1
commit
846a32ca87
3 changed files with 1 additions and 2 deletions
BIN
dist/litellm-1.3.3.dev2-py3-none-any.whl
vendored
Normal file
BIN
dist/litellm-1.3.3.dev2-py3-none-any.whl
vendored
Normal file
Binary file not shown.
BIN
dist/litellm-1.3.3.dev2.tar.gz
vendored
Normal file
BIN
dist/litellm-1.3.3.dev2.tar.gz
vendored
Normal file
Binary file not shown.
|
@ -406,7 +406,7 @@ class Huggingface(BaseLLM):
|
||||||
try:
|
try:
|
||||||
completion_response = response.json()
|
completion_response = response.json()
|
||||||
if isinstance(completion_response, dict):
|
if isinstance(completion_response, dict):
|
||||||
completion_response: List[Dict[str, Any]] = [{"generated_text": completion_response}]
|
completion_response: List[Dict[str, Any]] = [completion_response]
|
||||||
except:
|
except:
|
||||||
import traceback
|
import traceback
|
||||||
raise HuggingfaceError(
|
raise HuggingfaceError(
|
||||||
|
@ -420,7 +420,6 @@ class Huggingface(BaseLLM):
|
||||||
message=completion_response["error"],
|
message=completion_response["error"],
|
||||||
status_code=response.status_code,
|
status_code=response.status_code,
|
||||||
)
|
)
|
||||||
|
|
||||||
return self.convert_to_model_response_object(
|
return self.convert_to_model_response_object(
|
||||||
completion_response=completion_response,
|
completion_response=completion_response,
|
||||||
model_response=model_response,
|
model_response=model_response,
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue