feat: refactor MidJourney service for conpatible drawing in chat and draw in app

This commit is contained in:
RockYang
2023-09-12 18:01:24 +08:00
parent d825b9ec26
commit 9ce8af0b82
12 changed files with 467 additions and 262 deletions

View File

@@ -49,15 +49,6 @@ type ChatModel struct {
Value string `json:"value"`
}
type MjTask struct {
ChatId string
MessageId string
MessageHash string
UserId uint
RoleId uint
Icon string
}
type ApiError struct {
Error struct {
Message string
@@ -77,5 +68,3 @@ var ModelToTokens = map[string]int{
"gpt-4": 8192,
"gpt-4-32k": 32768,
}
const TaskStorePrefix = "/tasks/"