mirror of
https://github.com/BerriAI/litellm.git
synced 2025-04-25 10:44:24 +00:00
(feat) textcompletion - transform hf log probs to openai text completion
This commit is contained in:
parent
b32cedeb28
commit
9223f7cc7a
2 changed files with 11 additions and 1 deletions
|
@ -348,6 +348,7 @@ def completion(
|
|||
model_response.usage.completion_tokens = completion_tokens
|
||||
model_response.usage.prompt_tokens = prompt_tokens
|
||||
model_response.usage.total_tokens = prompt_tokens + completion_tokens
|
||||
model_response._hidden_params["original_response"] = completion_response
|
||||
return model_response
|
||||
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue