Remove fatals, don't know why I added these (#1642)

This commit is contained in:
Evan Simkowitz 2024-12-27 17:39:42 -05:00 committed by GitHub
parent 0df0c57639
commit 6de98ac3fb
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -18,13 +18,13 @@ var _ AIBackend = GoogleBackend{}
func (GoogleBackend) StreamCompletion(ctx context.Context, request wshrpc.WaveAIStreamRequest) chan wshrpc.RespOrErrorUnion[wshrpc.WaveAIPacketType] {
client, err := genai.NewClient(ctx, option.WithAPIKey(request.Opts.APIToken))
if err != nil {
log.Fatalf("failed to create client: %v", err)
log.Printf("failed to create client: %v", err)
return nil
}
model := client.GenerativeModel(request.Opts.Model)
if model == nil {
log.Fatal("model not found")
log.Println("model not found")
client.Close()
return nil
}