Skip to content

Commit

Permalink
Beg for money on billing related error
Browse files Browse the repository at this point in the history
  • Loading branch information
rcy committed Dec 24, 2024
1 parent 4dadf7c commit 74d1521
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions internal/ai/complete.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,9 @@ package ai

import (
"context"
"fmt"
"os"
"strings"

"github.com/sashabaranov/go-openai"
)
Expand All @@ -25,6 +27,10 @@ func Complete(ctx context.Context, model string, system string, message string)
},
})
if err != nil {
if strings.Contains(err.Error(), "billing") {
return "", fmt.Errorf("I need money: https://ko-fi.com/rcyemb")
}

return "", err
}

Expand Down

0 comments on commit 74d1521

Please sign in to comment.