Skip to content

Conversation

@pherzheyu
Copy link
Contributor

No description provided.

}
}
select {
case responseChan <- response:
Copy link
Contributor

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 (
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

有编译,测试,lint失败的问题看看
另外 上面还有一层provider也需要封装下。

@pherzheyu pherzheyu force-pushed the feature/model-gemini branch from a04ce34 to b315989 Compare November 27, 2025 03:24
module trpc.group/trpc-go/trpc-agent-go

go 1.21
go 1.24
Copy link
Contributor

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
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

这里不要修改,可以merge下main分支

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants