-
Notifications
You must be signed in to change notification settings - Fork 55
add:model gemini #732
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: main
Are you sure you want to change the base?
add:model gemini #732
Conversation
| } | ||
| } | ||
| select { | ||
| case responseChan <- response: |
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.
对于流式响应,需要将本次所有chunk聚合为一个完整的model.Response(例如包括完整的content、toolcall、stopreason),然后塞入responseChan,最终这个response会被存入session。
可以参考 openai/anthropic model 的实现。
| // Package gemini provides Gemini-compatible model implementations. | ||
| package gemini | ||
|
|
||
| import ( |
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.
有编译,测试,lint失败的问题看看
另外 上面还有一层provider也需要封装下。
a04ce34 to
b315989
Compare
| module trpc.group/trpc-go/trpc-agent-go | ||
|
|
||
| go 1.21 | ||
| go 1.24 |
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.
所有 go.mod 里的版本不要动,如果 gemini 本身需要高版本,先做一个单独的 go.mod
| google.golang.org/genai v1.29.0 | ||
| trpc.group/trpc-go/trpc-agent-go v0.0.0-20251126064502-c8c2594d2519 | ||
| google.golang.org/genai v1.36.0 | ||
| trpc.group/trpc-go/trpc-agent-go v0.0.0-00010101000000-000000000000 |
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.
这里不要修改,可以merge下main分支
No description provided.