Skip to content

Commit

Permalink
[Model] Support GeminiFlash2-0
Browse files Browse the repository at this point in the history
  • Loading branch information
kennymckormick committed Dec 13, 2024
1 parent 27d8ca8 commit 2d1c026
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 3 deletions.
3 changes: 0 additions & 3 deletions vlmeval/api/gemini.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,6 @@ def __init__(self,
project_id='vlmeval',
**kwargs):

assert model in ['gemini-1.0-pro', 'gemini-1.5-pro', 'gemini-1.5-flash']

self.model = model
self.fail_msg = 'Failed to obtain answer via API. '
self.max_tokens = max_tokens
Expand Down Expand Up @@ -77,7 +75,6 @@ def generate_inner(self, inputs, **kwargs) -> str:
if pure_text and self.model == 'gemini-1.0-pro':
model = genai.GenerativeModel('gemini-1.0-pro')
else:
assert self.model in ['gemini-1.5-pro', 'gemini-1.5-flash']
model = genai.GenerativeModel(self.model)

messages = self.build_msgs_genai(inputs)
Expand Down
1 change: 1 addition & 0 deletions vlmeval/config.py
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,7 @@
'GeminiPro1-0': partial(GeminiProVision, model='gemini-1.0-pro', temperature=0, retry=10), # now GeminiPro1-0 is only supported by vertex backend
'GeminiPro1-5': partial(GeminiProVision, model='gemini-1.5-pro', temperature=0, retry=10),
'GeminiFlash1-5': partial(GeminiProVision, model='gemini-1.5-flash', temperature=0, retry=10),
'GeminiFlash2-0': partial(GeminiProVision, model='gemini-2.0-flash-exp', temperature=0, retry=10),
'GeminiPro1-5-002': partial(GPT4V, model='gemini-1.5-pro-002', temperature=0, retry=10), # Internal Use Only
'GeminiFlash1-5-002': partial(GPT4V, model='gemini-1.5-flash-002', temperature=0, retry=10), # Internal Use Only
# Qwen-VL
Expand Down

0 comments on commit 2d1c026

Please sign in to comment.