Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
phsl
/
new-api
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Snippets
Members
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit
ea9be41f
authored
Nov 19, 2025
by
Calcium-Ion
Committed by
GitHub
Nov 19, 2025
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #2243 from seefs001/feature/gemini-3
feat: gemini-3-pro
parents
ee513f21
a74ab98c
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
18 additions
and
7 deletions
+18
-7
dto/gemini.go
+17
-7
relay/channel/gemini/constant.go
+1
-0
No files found.
dto/gemini.go
View file @
ea9be41f
...
@@ -141,6 +141,8 @@ func (r *GeminiChatRequest) SetTools(tools []GeminiChatTool) {
...
@@ -141,6 +141,8 @@ func (r *GeminiChatRequest) SetTools(tools []GeminiChatTool) {
type
GeminiThinkingConfig
struct
{
type
GeminiThinkingConfig
struct
{
IncludeThoughts
bool
`json:"includeThoughts,omitempty"`
IncludeThoughts
bool
`json:"includeThoughts,omitempty"`
ThinkingBudget
*
int
`json:"thinkingBudget,omitempty"`
ThinkingBudget
*
int
`json:"thinkingBudget,omitempty"`
// TODO Conflict with thinkingbudget.
// ThinkingLevel json.RawMessage `json:"thinkingLevel,omitempty"`
}
}
func
(
c
*
GeminiThinkingConfig
)
SetThinkingBudget
(
budget
int
)
{
func
(
c
*
GeminiThinkingConfig
)
SetThinkingBudget
(
budget
int
)
{
...
@@ -182,8 +184,12 @@ type FunctionCall struct {
...
@@ -182,8 +184,12 @@ type FunctionCall struct {
}
}
type
GeminiFunctionResponse
struct
{
type
GeminiFunctionResponse
struct
{
Name
string
`json:"name"`
Name
string
`json:"name"`
Response
map
[
string
]
interface
{}
`json:"response"`
Response
map
[
string
]
interface
{}
`json:"response"`
WillContinue
json
.
RawMessage
`json:"willContinue,omitempty"`
Scheduling
json
.
RawMessage
`json:"scheduling,omitempty"`
Parts
json
.
RawMessage
`json:"parts,omitempty"`
ID
json
.
RawMessage
`json:"id,omitempty"`
}
}
type
GeminiPartExecutableCode
struct
{
type
GeminiPartExecutableCode
struct
{
...
@@ -202,11 +208,15 @@ type GeminiFileData struct {
...
@@ -202,11 +208,15 @@ type GeminiFileData struct {
}
}
type
GeminiPart
struct
{
type
GeminiPart
struct
{
Text
string
`json:"text,omitempty"`
Text
string
`json:"text,omitempty"`
Thought
bool
`json:"thought,omitempty"`
Thought
bool
`json:"thought,omitempty"`
InlineData
*
GeminiInlineData
`json:"inlineData,omitempty"`
InlineData
*
GeminiInlineData
`json:"inlineData,omitempty"`
FunctionCall
*
FunctionCall
`json:"functionCall,omitempty"`
FunctionCall
*
FunctionCall
`json:"functionCall,omitempty"`
FunctionResponse
*
GeminiFunctionResponse
`json:"functionResponse,omitempty"`
ThoughtSignature
json
.
RawMessage
`json:"thoughtSignature,omitempty"`
FunctionResponse
*
GeminiFunctionResponse
`json:"functionResponse,omitempty"`
// Optional. Media resolution for the input media.
MediaResolution
json
.
RawMessage
`json:"mediaResolution,omitempty"`
VideoMetadata
json
.
RawMessage
`json:"videoMetadata,omitempty"`
FileData
*
GeminiFileData
`json:"fileData,omitempty"`
FileData
*
GeminiFileData
`json:"fileData,omitempty"`
ExecutableCode
*
GeminiPartExecutableCode
`json:"executableCode,omitempty"`
ExecutableCode
*
GeminiPartExecutableCode
`json:"executableCode,omitempty"`
CodeExecutionResult
*
GeminiPartCodeExecutionResult
`json:"codeExecutionResult,omitempty"`
CodeExecutionResult
*
GeminiPartCodeExecutionResult
`json:"codeExecutionResult,omitempty"`
...
...
relay/channel/gemini/constant.go
View file @
ea9be41f
...
@@ -8,6 +8,7 @@ var ModelList = []string{
...
@@ -8,6 +8,7 @@ var ModelList = []string{
"gemini-1.5-pro-latest"
,
"gemini-1.5-flash-latest"
,
"gemini-1.5-pro-latest"
,
"gemini-1.5-flash-latest"
,
// preview version
// preview version
"gemini-2.0-flash-lite-preview"
,
"gemini-2.0-flash-lite-preview"
,
"gemini-3-pro-preview"
,
// gemini exp
// gemini exp
"gemini-exp-1206"
,
"gemini-exp-1206"
,
// flash exp
// flash exp
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment