Skip to content

Commit

Permalink
fix: use generate content
Browse files Browse the repository at this point in the history
  • Loading branch information
jackmcguire1 committed Dec 14, 2023
1 parent e7f290f commit a692649
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions internal/dom/chatmodels/gemini_api.go
Original file line number Diff line number Diff line change
Expand Up @@ -21,13 +21,12 @@ func NewGeminiApiClient(token string) *GeminiApiClient {
}

func (api *GeminiApiClient) GeminiChat(ctx context.Context, prompt string) (*genai.GenerateContentResponse, error) {
client, err := genai.NewClient(ctx, option.WithAPIKey(api.Token))
client, err := genai.NewClient(ctx, option.WithAPIKey(api.Token), option.WithQuotaProject(""), option.)

Check failure on line 24 in internal/dom/chatmodels/gemini_api.go

View workflow job for this annotation

GitHub Actions / build-deploy

syntax error: unexpected ), expected name or (
if err != nil {
log.Fatal(err)
}
defer client.Close()
model := client.GenerativeModel("gemini-pro")
cs := model.StartChat()

return cs.SendMessage(ctx, genai.Text(prompt))
return model.GenerateContent(ctx, genai.Text(prompt))
}

0 comments on commit a692649

Please sign in to comment.