File tree 2 files changed +10
-4
lines changed 2 files changed +10
-4
lines changed Original file line number Diff line number Diff line change @@ -14,8 +14,10 @@ import (
14
14
// If you use text-moderation-stable, we will provide advanced notice before updating the model.
15
15
// Accuracy of text-moderation-stable may be slightly lower than for text-moderation-latest.
16
16
const (
17
- ModerationTextStable = "text-moderation-stable"
18
- ModerationTextLatest = "text-moderation-latest"
17
+ ModerationOmniLatest = "omni-moderation-latest"
18
+ ModerationOmni20240926 = "omni-moderation-2024-09-26"
19
+ ModerationTextStable = "text-moderation-stable"
20
+ ModerationTextLatest = "text-moderation-latest"
19
21
// Deprecated: use ModerationTextStable and ModerationTextLatest instead.
20
22
ModerationText001 = "text-moderation-001"
21
23
)
25
27
)
26
28
27
29
var validModerationModel = map [string ]struct {}{
28
- ModerationTextStable : {},
29
- ModerationTextLatest : {},
30
+ ModerationOmniLatest : {},
31
+ ModerationOmni20240926 : {},
32
+ ModerationTextStable : {},
33
+ ModerationTextLatest : {},
30
34
}
31
35
32
36
// ModerationRequest represents a request structure for moderation API.
Original file line number Diff line number Diff line change @@ -37,6 +37,8 @@ func TestModerationsWithDifferentModelOptions(t *testing.T) {
37
37
getModerationModelTestOption (openai .GPT3Dot5Turbo , openai .ErrModerationInvalidModel ),
38
38
getModerationModelTestOption (openai .ModerationTextStable , nil ),
39
39
getModerationModelTestOption (openai .ModerationTextLatest , nil ),
40
+ getModerationModelTestOption (openai .ModerationOmni20240926 , nil ),
41
+ getModerationModelTestOption (openai .ModerationOmniLatest , nil ),
40
42
getModerationModelTestOption ("" , nil ),
41
43
)
42
44
client , server , teardown := setupOpenAITestServer ()
You can’t perform that action at this time.
0 commit comments