Skip to content

Commit

Permalink
fix(vertexai): use opts in NewClient
Browse files Browse the repository at this point in the history
  • Loading branch information
eliben committed Dec 13, 2023
1 parent f41f85e commit e5eb975
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion vertexai/genai/client.go
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,8 @@ type Client struct {
// package.
func NewClient(ctx context.Context, projectID, location string, opts ...option.ClientOption) (*Client, error) {
apiEndpoint := fmt.Sprintf("%s-aiplatform.googleapis.com:443", location)
c, err := aiplatform.NewPredictionClient(ctx, option.WithEndpoint(apiEndpoint))
opts = append(opts, option.WithEndpoint(apiEndpoint))
c, err := aiplatform.NewPredictionClient(ctx, opts...)
if err != nil {
return nil, err
}
Expand Down

0 comments on commit e5eb975

Please sign in to comment.