feat: 初步兼容生成内容检查

This commit is contained in:
CaIon
2024-03-20 19:00:51 +08:00
parent 14892a6582
commit 580f2894ac
21 changed files with 141 additions and 63 deletions
+6
View File
@@ -0,0 +1,6 @@
package dto
type SensitiveResponse struct {
SensitiveWords []string `json:"sensitive_words"`
Content string `json:"content"`
}
+2 -2
View File
@@ -1,9 +1,9 @@
package dto
type TextResponse struct {
Choices []OpenAITextResponseChoice `json:"choices"`
Choices []*OpenAITextResponseChoice `json:"choices"`
Usage `json:"usage"`
Error OpenAIError `json:"error"`
Error *OpenAIError `json:"error,omitempty"`
}
type OpenAITextResponseChoice struct {