aboutsummaryrefslogtreecommitdiff
path: root/web
diff options
context:
space:
mode:
Diffstat (limited to 'web')
-rw-r--r--web/openai/moderation/moderation.go7
1 files changed, 7 insertions, 0 deletions
diff --git a/web/openai/moderation/moderation.go b/web/openai/moderation/moderation.go
index 7f73bf2..0476b1c 100644
--- a/web/openai/moderation/moderation.go
+++ b/web/openai/moderation/moderation.go
@@ -97,6 +97,13 @@ type Client struct {
apiKey string
}
+func New(httpCli *http.Client, apiKey string) *Client {
+ return &Client{
+ httpCli: httpCli,
+ apiKey: apiKey,
+ }
+}
+
func (c Client) Check(ctx context.Context, input string) (*Response, error) {
data := Request{
Input: input,