forked from phoenix/litellm-mirror
fix(huggingface_restapi.py): fix huggingface response format
This commit is contained in:
parent
a534928337
commit
6892fd8b51
4 changed files with 3 additions and 3 deletions
|
@ -406,7 +406,7 @@ class Huggingface(BaseLLM):
|
|||
try:
|
||||
completion_response = response.json()
|
||||
if isinstance(completion_response, dict):
|
||||
completion_response: List[Dict[str, Any]] = [{"generated_text": content}]
|
||||
completion_response: List[Dict[str, Any]] = [{"generated_text": completion_response}]
|
||||
except:
|
||||
import traceback
|
||||
raise HuggingfaceError(
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue