Skip to content

Commit

Permalink
feat(gemini): add Gemini 2.0 models (#192)
Browse files Browse the repository at this point in the history
* feat(gemini): add Gemini 2.0 model variants to provider

Added the following models:
- gemini-2.0-flash
- gemini-2.0-flash lite preview
- gemini-2.0-pro experimental
- gemini-2.0-flash-thinking experimental

* chore(gemini): update the dependcy version
  • Loading branch information
takatea authored Feb 10, 2025
1 parent 51b33cf commit f7bf95c
Show file tree
Hide file tree
Showing 9 changed files with 251 additions and 2 deletions.
2 changes: 1 addition & 1 deletion models/gemini/manifest.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -33,4 +33,4 @@ resource:
tool:
enabled: true
type: plugin
version: 0.0.2
version: 0.0.3
6 changes: 6 additions & 0 deletions models/gemini/models/llm/_position.yaml
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
- gemini-2.0-flash-001
- gemini-2.0-flash-exp
- gemini-2.0-flash-lite-preview-02-05
- gemini-2.0-pro-exp-02-05
- gemini-2.0-flash-thinking-exp-1219
- gemini-2.0-flash-thinking-exp-01-21
- gemini-1.5-pro
- gemini-1.5-pro-latest
- gemini-1.5-pro-001
Expand Down
41 changes: 41 additions & 0 deletions models/gemini/models/llm/gemini-2.0-flash-001.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
model: gemini-2.0-flash-001
label:
en_US: Gemini 2.0 Flash 001
model_type: llm
features:
- agent-thought
- vision
- tool-call
- stream-tool-call
- document
- video
- audio
model_properties:
mode: chat
context_size: 1048576
parameter_rules:
- name: temperature
use_template: temperature
- name: top_p
use_template: top_p
- name: top_k
label:
zh_Hans: 取样数量
en_US: Top k
type: int
help:
zh_Hans: 仅从每个后续标记的前 K 个选项中采样。
en_US: Only sample from the top K options for each subsequent token.
required: false
- name: max_output_tokens
use_template: max_tokens
default: 8192
min: 1
max: 8192
- name: json_schema
use_template: json_schema
pricing:
input: '0.00'
output: '0.00'
unit: '0.000001'
currency: USD
41 changes: 41 additions & 0 deletions models/gemini/models/llm/gemini-2.0-flash-exp.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
model: gemini-2.0-flash-exp
label:
en_US: Gemini 2.0 Flash Exp
model_type: llm
features:
- agent-thought
- vision
- tool-call
- stream-tool-call
- document
- video
- audio
model_properties:
mode: chat
context_size: 1048576
parameter_rules:
- name: temperature
use_template: temperature
- name: top_p
use_template: top_p
- name: top_k
label:
zh_Hans: 取样数量
en_US: Top k
type: int
help:
zh_Hans: 仅从每个后续标记的前 K 个选项中采样。
en_US: Only sample from the top K options for each subsequent token.
required: false
- name: max_output_tokens
use_template: max_tokens
default: 8192
min: 1
max: 8192
- name: json_schema
use_template: json_schema
pricing:
input: '0.00'
output: '0.00'
unit: '0.000001'
currency: USD
42 changes: 42 additions & 0 deletions models/gemini/models/llm/gemini-2.0-flash-lite-preview-02-05.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
model: gemini-2.0-flash-lite-preview-02-05
label:
en_US: Gemini 2.0 Flash Lite Preview 0205
model_type: llm
features:
- agent-thought
- vision
- tool-call
- stream-tool-call
- document
- video
- audio
model_properties:
mode: chat
context_size: 1048576
parameter_rules:
- name: temperature
use_template: temperature
- name: top_p
use_template: top_p
- name: top_k
label:
zh_Hans: 取样数量
en_US: Top k
type: int
help:
zh_Hans: 仅从每个后续标记的前 K 个选项中采样。
en_US: Only sample from the top K options for each subsequent token.
required: false
- name: max_output_tokens
use_template: max_tokens
default: 8192
min: 1
max: 8192
- name: json_schema
use_template: json_schema
pricing:
input: '0.00'
output: '0.00'
unit: '0.000001'
currency: USD

39 changes: 39 additions & 0 deletions models/gemini/models/llm/gemini-2.0-flash-thinking-exp-01-21.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
model: gemini-2.0-flash-thinking-exp-01-21
label:
en_US: Gemini 2.0 Flash Thinking Exp 01-21
model_type: llm
features:
- agent-thought
- vision
- document
- video
- audio
model_properties:
mode: chat
context_size: 32767
parameter_rules:
- name: temperature
use_template: temperature
- name: top_p
use_template: top_p
- name: top_k
label:
zh_Hans: 取样数量
en_US: Top k
type: int
help:
zh_Hans: 仅从每个后续标记的前 K 个选项中采样。
en_US: Only sample from the top K options for each subsequent token.
required: false
- name: max_output_tokens
use_template: max_tokens
default: 8192
min: 1
max: 8192
- name: json_schema
use_template: json_schema
pricing:
input: '0.00'
output: '0.00'
unit: '0.000001'
currency: USD
39 changes: 39 additions & 0 deletions models/gemini/models/llm/gemini-2.0-flash-thinking-exp-1219.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
model: gemini-2.0-flash-thinking-exp-1219
label:
en_US: Gemini 2.0 Flash Thinking Exp 1219
model_type: llm
features:
- agent-thought
- vision
- document
- video
- audio
model_properties:
mode: chat
context_size: 32767
parameter_rules:
- name: temperature
use_template: temperature
- name: top_p
use_template: top_p
- name: top_k
label:
zh_Hans: 取样数量
en_US: Top k
type: int
help:
zh_Hans: 仅从每个后续标记的前 K 个选项中采样。
en_US: Only sample from the top K options for each subsequent token.
required: false
- name: max_output_tokens
use_template: max_tokens
default: 8192
min: 1
max: 8192
- name: json_schema
use_template: json_schema
pricing:
input: '0.00'
output: '0.00'
unit: '0.000001'
currency: USD
41 changes: 41 additions & 0 deletions models/gemini/models/llm/gemini-2.0-pro-exp-02-05.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
model: gemini-2.0-pro-exp-02-05
label:
en_US: Gemini 2.0 pro exp 02-05
model_type: llm
features:
- agent-thought
- vision
- tool-call
- stream-tool-call
- document
- video
- audio
model_properties:
mode: chat
context_size: 1048576
parameter_rules:
- name: temperature
use_template: temperature
- name: top_p
use_template: top_p
- name: top_k
label:
zh_Hans: 取样数量
en_US: Top k
type: int
help:
zh_Hans: 仅从每个后续标记的前 K 个选项中采样。
en_US: Only sample from the top K options for each subsequent token.
required: false
- name: max_output_tokens
use_template: max_tokens
default: 8192
min: 1
max: 8192
- name: json_schema
use_template: json_schema
pricing:
input: '0.00'
output: '0.00'
unit: '0.000001'
currency: USD
2 changes: 1 addition & 1 deletion models/gemini/requirements.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
dify_plugin~=0.0.1b61
dify_plugin~=0.0.1b64
google-ai-generativelanguage~=0.6.9
google-api-python-client~=2.90.0
google-api-core~=2.18.0
Expand Down

0 comments on commit f7bf95c

Please sign in to comment.