-
Notifications
You must be signed in to change notification settings - Fork 240
feat(agentic_gemini): support agentic gemini #588
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: release/agentic_model
Are you sure you want to change the base?
Conversation
Need to create a new tagThe following modules have changes and may need version updates:
|
bfa9c9a to
a36e126
Compare
4cffedc to
938b4d7
Compare
30377f9 to
388b5a2
Compare
388b5a2 to
4f236f1
Compare
01801dc to
f019df0
Compare
f019df0 to
1e36ea1
Compare
4f236f1 to
58cc5bf
Compare
| // EnableCodeExecution allows the model to execute code | ||
| // Warning: Be cautious with code execution in production | ||
| // Optional. Default: false | ||
| EnableCodeExecution *genai.ToolCodeExecution |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| "google.golang.org/genai" | ||
| ) | ||
|
|
||
| type options struct { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
内置工具漏了定义 option
| if block.ServerToolCall != nil { | ||
| switch block.ServerToolCall.Name { | ||
| case ServerToolNameCodeExecution: | ||
| result, ok := block.ServerToolCall.Arguments.(*ExecutableCode) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
之前讨论应该是设计成 oneof 类型?不然太多类型断言用户找不到对应的类型了
| msg.Extra[groundingMetadataKey] = gm | ||
| } | ||
|
|
||
| func GetGroundingMetadata(msg *schema.AgenticMessage) *genai.GroundingMetadata { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
在 eino ResponseMeta 定义有 gemini 的 metadata
| // genInputAndConf generates input messages and configuration for Gemini API | ||
| func (g *Gemini) genInputAndConf(input []*schema.AgenticMessage, opts ...agentic.Option) (string, []*schema.AgenticMessage, *genai.GenerateContentConfig, *agentic.Config, error) { | ||
| commonOptions := agentic.GetCommonOptions(&agentic.Options{ | ||
| Temperature: g.temperature, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
maxTokens 也加到 common option 里了,也补下吧
|
README 要补一下,另外 pkg 挪到 model 下,叫 agenticgemini ? |

What type of PR is this?
Check the PR title.
(Optional) Translate the PR title into Chinese.
(Optional) More detailed description for this PR(en: English/zh: Chinese).
en:
zh(optional):
(Optional) Which issue(s) this PR fixes:
(optional) The PR that updates user documentation: