feat: support /v1/moderations now (close #117)

This commit is contained in:
JustSong
2023-06-11 09:37:36 +08:00
parent e398e0756b
commit 4339f45f74
5 changed files with 39 additions and 3 deletions

View File

@@ -161,6 +161,24 @@ func init() {
Root: "text-ada-001",
Parent: nil,
},
{
Id: "text-moderation-latest",
Object: "model",
Created: 1677649963,
OwnedBy: "openai",
Permission: permission,
Root: "text-moderation-latest",
Parent: nil,
},
{
Id: "text-moderation-stable",
Object: "model",
Created: 1677649963,
OwnedBy: "openai",
Permission: permission,
Root: "text-moderation-stable",
Parent: nil,
},
}
openAIModelsMap = make(map[string]OpenAIModels)
for _, model := range openAIModels {