Add a default for safety settings in vertex AI

This commit is contained in:
Graham Neubig 2023-12-20 13:12:50 -05:00
parent 04bbd0649f
commit 482b3b5bc3

View file

@ -195,6 +195,7 @@ def completion(
optional_params[k] = v
## Process safety settings into format expected by vertex AI
safety_settings = None
if "safety_settings" in optional_params:
safety_settings = optional_params.pop("safety_settings")
if not isinstance(safety_settings, list):