File tree Expand file tree Collapse file tree 2 files changed +10
-4
lines changed Expand file tree Collapse file tree 2 files changed +10
-4
lines changed Original file line number Diff line number Diff line change @@ -14,8 +14,10 @@ import (
1414// If you use text-moderation-stable, we will provide advanced notice before updating the model.
1515// Accuracy of text-moderation-stable may be slightly lower than for text-moderation-latest.
1616const (
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"
1921 // Deprecated: use ModerationTextStable and ModerationTextLatest instead.
2022 ModerationText001 = "text-moderation-001"
2123)
2527)
2628
2729var validModerationModel = map [string ]struct {}{
28- ModerationTextStable : {},
29- ModerationTextLatest : {},
30+ ModerationOmniLatest : {},
31+ ModerationOmni20240926 : {},
32+ ModerationTextStable : {},
33+ ModerationTextLatest : {},
3034}
3135
3236// 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) {
3737 getModerationModelTestOption (openai .GPT3Dot5Turbo , openai .ErrModerationInvalidModel ),
3838 getModerationModelTestOption (openai .ModerationTextStable , nil ),
3939 getModerationModelTestOption (openai .ModerationTextLatest , nil ),
40+ getModerationModelTestOption (openai .ModerationOmni20240926 , nil ),
41+ getModerationModelTestOption (openai .ModerationOmniLatest , nil ),
4042 getModerationModelTestOption ("" , nil ),
4143 )
4244 client , server , teardown := setupOpenAITestServer ()
You can’t perform that action at this time.
0 commit comments