mirror of
https://github.com/tiennm99/litellm.git
synced 2026-07-19 00:19:23 +00:00
(fix) ensure stop is always a list for anthropic
This commit is contained in:
@@ -1090,6 +1090,8 @@ def get_optional_params( # use the openai defaults
|
||||
if stream:
|
||||
optional_params["stream"] = stream
|
||||
if stop:
|
||||
if type(stop) == str:
|
||||
stop = [stop] # openai can accept str/list for stop
|
||||
optional_params["stop_sequences"] = stop
|
||||
if temperature:
|
||||
optional_params["temperature"] = temperature
|
||||
|
||||
Reference in New Issue
Block a user