mirror of
https://github.com/BerriAI/litellm.git
synced 2025-04-25 18:54:30 +00:00
add replicate support for max_tokens
This commit is contained in:
parent
ef43141554
commit
d4c4a138ca
4 changed files with 11 additions and 4 deletions
|
@ -108,10 +108,9 @@ def completion(
|
|||
version_id = model_to_version_id(model)
|
||||
input_data = {
|
||||
"prompt": prompt,
|
||||
"max_new_tokens": 50,
|
||||
**optional_params
|
||||
}
|
||||
|
||||
|
||||
## LOGGING
|
||||
logging_obj.pre_call(
|
||||
input=prompt,
|
||||
|
@ -142,6 +141,9 @@ def completion(
|
|||
)
|
||||
|
||||
print_verbose(f"raw model_response: {result}")
|
||||
|
||||
if len(result) == 0: # edge case, where result from replicate is empty
|
||||
result = " "
|
||||
|
||||
## Building RESPONSE OBJECT
|
||||
model_response["choices"][0]["message"]["content"] = result
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue