Skip to content

Commit

Permalink
chore: add text to image
Browse files Browse the repository at this point in the history
  • Loading branch information
heiruwu committed Aug 19, 2024
1 parent 9503b60 commit d0c1dfa
Showing 1 changed file with 175 additions and 2 deletions.
177 changes: 175 additions & 2 deletions schema/ai-tasks.json
Original file line number Diff line number Diff line change
Expand Up @@ -249,7 +249,7 @@
}
},
"required": [
"finish_reason",
"finish-reason",
"index",
"message",
"created"
Expand Down Expand Up @@ -482,7 +482,7 @@
}
},
"required": [
"finish_reason",
"finish-reason",
"index",
"content",
"created"
Expand Down Expand Up @@ -540,6 +540,179 @@
]
}
},
"TASK_TEXT_TO_IMAGE": {
"title": "Completion",
"instillShortDescription": "Generate text response base on input",
"input": {
"$schema": "http://json-schema.org/draft-07/schema#",
"title": "Completion input",
"description": "Input schema of the completion task",
"instillShortDescription": "Input schema of the completion task",
"type": "object",
"properties": {
"data": {
"description": "Input data",
"instillShortDescription": "Input data",
"type": "object",
"properties": {
"model": {
"description": "The model to be used.",
"instillShortDescription": "The model to be used.",
"instillAcceptFormats": [
"string"
],
"title": "Model Name",
"type": "string"
},
"prompt": {
"title": "Input prompt",
"type": "string",
"description": "What you wish to see in the output image. A strong, descriptive prompt that clearly defines elements, colors, and subjects will lead to better results.",
"instillShortDescription": "Descriptive prompt.",
"instillAcceptFormats": [
"string"
]
}
},
"required": [
"model",
"prompt"
]
},
"parameter": {
"description": "Input parameter",
"instillShortDescription": "Input parameter",
"type": "object",
"properties": {
"aspect-ratio": {
"title": "Aspect ratio",
"type": "string",
"description": "Controls the aspect ratio of the generated image. Defaults to 1:1.",
"instillShortDescription": "Controls the aspect ratio of the generated image. Defaults to 1:1.",
"instillAcceptFormats": [
"string"
],
"default": "1:1",
"enum": [
"16:9",
"1:1",
"21:9",
"2:3",
"3:2",
"4:5",
"5:4",
"9:16",
"9:21"
]
},
"negative-prompt": {
"title": "Aspect ratio",
"type": "string",
"description": "Keywords of what you do not wish to see in the output image.",
"instillShortDescription": "Keywords of what you do not wish to see in the output image.",
"instillAcceptFormats": [
"string"
],
"default": "1:1"
},
"n": {
"title": "Number of choices",
"type": "integer",
"description": "How many samples to generate for each input prompt.",
"instillShortDescription": "How many samples to generate for each input prompt.",
"instillAcceptFormats": [
"integer"
],
"default": 1
},
"seed": {
"title": "Seed",
"type": "integer",
"description": "The seed, default is 0",
"instillShortDescription": "The seed, default is 0",
"instillAcceptFormats": [
"integer"
],
"default": 0
}
}
}
},
"required": [
"data"
]
},
"output": {
"$schema": "http://json-schema.org/draft-07/schema#",
"title": "Chat output",
"description": "Output schema of the chat task",
"instillShortDescription": "Output schema of the chat task",
"type": "object",
"properties": {
"data": {
"description": "Output data",
"instillShortDescription": "Output data",
"type": "object",
"properties": {
"choices": {
"title": "Choices",
"type": "array",
"description": "List of generated sample images",
"instillShortDescription": "List of generated sample images",
"instillFormat": "array",
"items": {
"type": "object",
"properties": {
"finish-reason": {
"title": "Finish reason",
"type": "string",
"description": "The reason the model stopped generating tokens.",
"instillShortDescription": "The reason the model stopped generating tokens.",
"instillFormat": "string",
"enum": [
"content_filtered",
"success"
]
},
"image": {
"title": "Image",
"type": "string",
"description": "The generated image, encoded to base64.",
"instillShortDescription": "The generated image, encoded to base64.",
"instillFormat": "string"
}
},
"required": [
"finish-reason",
"image"
]
}
}
},
"required": [
"choices"
]
},
"metadata": {
"description": "Output metadata",
"instillShortDescription": "Output metadata",
"type": "object",
"properties": {
"usage": {
"description": "Usage statistics for the request.",
"instillShortDescription": "Usage statistics for the request.",
"type": "object",
"properties": {},
"required": []
}
}
}
},
"required": [
"data"
]
}
},
"TASK_CLASSIFICATION": {
"title": "Classification",
"instillShortDescription": "Classify images into predefined categories.",
Expand Down

0 comments on commit d0c1dfa

Please sign in to comment.