Unverified Commit 5ff60eda authored by Liangsheng Yin's avatar Liangsheng Yin Committed by GitHub
Browse files

Fix vertexai (#633)

parent c1930022
...@@ -14,15 +14,12 @@ try: ...@@ -14,15 +14,12 @@ try:
GenerativeModel, GenerativeModel,
Image, Image,
) )
from vertexai.generative_models._generative_models import SafetySettingsType
except ImportError as e: except ImportError as e:
GenerativeModel = e GenerativeModel = e
class VertexAI(BaseBackend): class VertexAI(BaseBackend):
def __init__( def __init__(self, model_name, safety_settings=None):
self, model_name, safety_settings: Optional[SafetySettingsType] = None
):
super().__init__() super().__init__()
if isinstance(GenerativeModel, Exception): if isinstance(GenerativeModel, Exception):
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment