mirror of
https://github.com/BerriAI/litellm.git
synced 2025-04-27 11:43:54 +00:00
fix(replicate.py): fix custom prompt formatting
This commit is contained in:
parent
dc9bafa959
commit
a05722571b
5 changed files with 177 additions and 80 deletions
|
@ -684,6 +684,11 @@ def completion(
|
|||
or "https://api.replicate.com/v1"
|
||||
)
|
||||
|
||||
custom_prompt_dict = (
|
||||
custom_prompt_dict
|
||||
or litellm.custom_prompt_dict
|
||||
)
|
||||
|
||||
model_response = replicate.completion(
|
||||
model=model,
|
||||
messages=messages,
|
||||
|
@ -696,6 +701,7 @@ def completion(
|
|||
encoding=encoding, # for calculating input/output tokens
|
||||
api_key=replicate_key,
|
||||
logging_obj=logging,
|
||||
custom_prompt_dict=custom_prompt_dict
|
||||
)
|
||||
if "stream" in optional_params and optional_params["stream"] == True:
|
||||
# don't try to access stream object,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue