Skip to content

Commit a8f0bbe

Browse files
qiaodevcopybara-github
authored andcommitted
feat: Go SDK Live module implementation for GoogleAI backend
PiperOrigin-RevId: 707230214
1 parent fa33d53 commit a8f0bbe

File tree

6 files changed

+1218
-0
lines changed

6 files changed

+1218
-0
lines changed

client.go

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,7 @@ import (
2929
type Client struct {
3030
clientConfig ClientConfig
3131
Models *Models
32+
Live *Live
3233
}
3334

3435
// Backend is the GenAI backend to use for the client.
@@ -156,6 +157,7 @@ func NewClient(ctx context.Context, cc *ClientConfig) (*Client, error) {
156157
c := &Client{
157158
clientConfig: *cc,
158159
Models: &Models{apiClient: ac},
160+
Live: &Live{apiClient: ac},
159161
}
160162
return c, nil
161163
}

datatypes.go

Lines changed: 156 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

go.mod

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ go 1.23
55
require (
66
cloud.google.com/go v0.116.0
77
github.com/google/go-cmp v0.6.0
8+
github.com/gorilla/websocket v1.5.3
89
golang.org/x/oauth2 v0.23.0
910
)
1011

go.sum

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,8 @@ cloud.google.com/go/compute/metadata v0.5.0 h1:Zr0eK8JbFv6+Wi4ilXAR8FJ3wyNdpxHKJ
44
cloud.google.com/go/compute/metadata v0.5.0/go.mod h1:aHnloV2TPI38yx4s9+wAZhHykWvVCfu7hQbF+9CWoiY=
55
github.com/google/go-cmp v0.6.0 h1:ofyhxvXcZhMsU5ulbFiLKl/XBFqE1GSq7atu8tAmTRI=
66
github.com/google/go-cmp v0.6.0/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY=
7+
github.com/gorilla/websocket v1.5.3 h1:saDtZ6Pbx/0u+bgYQ3q96pZgCzfhKXGPqt7kZ72aNNg=
8+
github.com/gorilla/websocket v1.5.3/go.mod h1:YR8l580nyteQvAITg2hZ9XVh4b55+EU/adAjf1fMHhE=
79
golang.org/x/oauth2 v0.23.0 h1:PbgcYx2W7i4LvjJWEbf0ngHV6qJYr86PkAV3bXdLEbs=
810
golang.org/x/oauth2 v0.23.0/go.mod h1:XYTD2NtWslqkgxebSiOHnXEap4TF09sJSc7H1sXbhtI=
911
golang.org/x/sys v0.25.0 h1:r+8e+loiHxRqhXVl6ML1nO3l1+oFoWbnlu2Ehimmi34=

0 commit comments

Comments
 (0)