Skip to content

Commit

Permalink
chore: Rename text to three d modality
Browse files Browse the repository at this point in the history
  • Loading branch information
karootplx committed Oct 3, 2024
1 parent 8d9c0c8 commit 8dcd0b5
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion pkg/api/controllers.go
Original file line number Diff line number Diff line change
Expand Up @@ -534,7 +534,7 @@ func GetTasksByPageController(c *gin.Context) {
}

if len(taskTypes) == 1 && taskTypes[0] == "All" {
taskTypes = []string{"CODE_GENERATION", "TEXT_TO_IMAGE", "DIALOGUE", "TEXT_TO_THREE_DEEZ"}
taskTypes = []string{"CODE_GENERATION", "TEXT_TO_IMAGE", "DIALOGUE", "TEXT_TO_THREE_D"}
}

// Parsing "page" and "limit" as integers with default values
Expand Down
2 changes: 1 addition & 1 deletion pkg/task/model.go
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ const (
)

var (
ValidTaskTypes = []db.TaskType{db.TaskTypeCodeGeneration, db.TaskTypeTextToImage, db.TaskTypeDialogue, db.TaskTypeTextToThreeDeez}
ValidTaskTypes = []db.TaskType{db.TaskTypeCodeGeneration, db.TaskTypeTextToImage, db.TaskTypeDialogue, db.TaskTypeTextToThreeD}
)

type Pagination struct {
Expand Down
4 changes: 2 additions & 2 deletions pkg/task/task_service.go
Original file line number Diff line number Diff line change
Expand Up @@ -500,7 +500,7 @@ func ValidateTaskData(taskData TaskData) error {
return errors.New("message is required for each message")
}
}
case db.TaskTypeTextToThreeDeez:
case db.TaskTypeTextToThreeD:
if _, ok := taskresponse.Completion.(map[string]interface{}); !ok {
return fmt.Errorf("invalid completion format: %v", taskresponse.Completion)
}
Expand Down Expand Up @@ -711,7 +711,7 @@ func ProcessFileUpload(requestBody CreateTaskRequest, files []*multipart.FileHea
return CreateTaskRequest{}, errors.New("S3_PUBLIC_URL not set")
}
for i, t := range requestBody.TaskData {
if t.Task == db.TaskTypeTextToImage || t.Task == db.TaskTypeTextToThreeDeez {
if t.Task == db.TaskTypeTextToImage || t.Task == db.TaskTypeTextToThreeD {
for j, response := range t.Responses {
completionMap, ok := response.Completion.(map[string]interface{})
if !ok {
Expand Down
2 changes: 1 addition & 1 deletion schema.prisma
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ enum TaskType {
CODE_GENERATION
DIALOGUE
TEXT_TO_IMAGE
TEXT_TO_THREE_DEEZ
TEXT_TO_THREE_D
}

model ApiKey {
Expand Down

0 comments on commit 8dcd0b5

Please sign in to comment.