mirror of
https://github.com/BerriAI/litellm.git
synced 2025-04-27 03:34:10 +00:00
linting bug fix
This commit is contained in:
parent
d792be89de
commit
7f037feedd
1 changed files with 2 additions and 2 deletions
|
@ -77,7 +77,7 @@ class HuggingfaceRestAPILLM:
|
||||||
"parameters": optional_params
|
"parameters": optional_params
|
||||||
}
|
}
|
||||||
## LOGGING
|
## LOGGING
|
||||||
logging.pre_call(input=prompt, api_key=self.api_key, additional_args={"complete_input_dict": data})
|
self.logging_obj.pre_call(input=prompt, api_key=self.api_key, additional_args={"complete_input_dict": data})
|
||||||
## COMPLETION CALL
|
## COMPLETION CALL
|
||||||
response = requests.post(
|
response = requests.post(
|
||||||
completion_url, headers=self.headers, data=json.dumps(data)
|
completion_url, headers=self.headers, data=json.dumps(data)
|
||||||
|
@ -86,7 +86,7 @@ class HuggingfaceRestAPILLM:
|
||||||
return response.iter_lines()
|
return response.iter_lines()
|
||||||
else:
|
else:
|
||||||
## LOGGING
|
## LOGGING
|
||||||
logging.post_call(input=prompt, api_key=self.api_key, original_response=response.text, additional_args={"complete_input_dict": data})
|
self.logging_obj.post_call(input=prompt, api_key=self.api_key, original_response=response.text, additional_args={"complete_input_dict": data})
|
||||||
## RESPONSE OBJECT
|
## RESPONSE OBJECT
|
||||||
completion_response = response.json()
|
completion_response = response.json()
|
||||||
print_verbose(f"response: {completion_response}")
|
print_verbose(f"response: {completion_response}")
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue