Skip to content

Commit

Permalink
fix: do not fatal
Browse files Browse the repository at this point in the history
  • Loading branch information
jackmcguire1 committed Dec 14, 2023
1 parent cfc1791 commit 2f55ec2
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions internal/dom/chatmodels/gemini_api.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@ package chatmodels

import (
"context"
"log"

"github.com/google/generative-ai-go/genai"
"github.com/sashabaranov/go-openai"
Expand All @@ -23,7 +22,7 @@ func NewGeminiApiClient(token string) *GeminiApiClient {
func (api *GeminiApiClient) GeminiChat(ctx context.Context, prompt string) (*genai.GenerateContentResponse, error) {
client, err := genai.NewClient(ctx, option.WithCredentialsJSON(api.Token))
if err != nil {
log.Fatal(err)
return nil, err
}
defer client.Close()
model := client.GenerativeModel("gemini-pro")
Expand Down

0 comments on commit 2f55ec2

Please sign in to comment.