Skip to content

Commit

Permalink
chore: update oneof
Browse files Browse the repository at this point in the history
  • Loading branch information
heiruwu committed Aug 19, 2024
1 parent d0c1dfa commit a65b73d
Show file tree
Hide file tree
Showing 2 changed files with 79 additions and 42 deletions.
66 changes: 59 additions & 7 deletions schema/ai-tasks.json
Original file line number Diff line number Diff line change
Expand Up @@ -40,32 +40,84 @@
"type": "object",
"properties": {
"text": {
"description": "Text message",
"instillShortDescription": "Text message",
"title": "Text message",
"description": "Text message.",
"instillShortDescription": "Text message.",
"instillAcceptFormats": [
"string"
],
"type": "string"
},
"type": {
"title": "Content type",
"description": "Input content type.",
"instillShortDescription": "Input content type.",
"instillAcceptFormats": [
"string"
],
"type": "string",
"const": "text"
}
},
"required": [
"text"
"text",
"type"
]
},
{
"type": "object",
"properties": {
"datauri": {
"description": "Image message with either url or base64 encoded string",
"instillShortDescription": "Image message with either url or base64 encoded string",
"image-url": {
"title": "Image url",
"description": "Image message url.",
"instillShortDescription": "Image message url.",
"instillAcceptFormats": [
"string"
],
"type": "string"
},
"type": {
"title": "Content type",
"description": "Input content type",
"instillShortDescription": "Input content type",
"instillAcceptFormats": [
"string"
],
"type": "string",
"const": "image-url"
}
},
"required": [
"image-url",
"type"
]
},
{
"type": "object",
"properties": {
"image-base64": {
"title": "Image base64",
"description": "Image base64 encoded string.",
"instillShortDescription": "Image base64 encoded string.",
"instillAcceptFormats": [
"string"
],
"type": "string"
},
"type": {
"title": "Content type",
"description": "Input content type",
"instillShortDescription": "Input content type",
"instillAcceptFormats": [
"string"
],
"type": "string",
"const": "image-base64"
}
},
"required": [
"datauri"
"image-base64",
"type"
]
}
]
Expand Down
55 changes: 20 additions & 35 deletions schema/schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,46 +17,31 @@
},
"image": {
"title": "Input image",
"type": "object",
"oneOf": [
{
"type": "object",
"properties": {
"image-url": {
"description": "Image url",
"instillShortDescription": "Image url",
"instillAcceptFormats": [
"string"
],
"type": "string"
}
},
"required": [
"image-url"
]
},
{
"type": "object",
"properties": {
"image-base64": {
"description": "Image base64 encoded string",
"instillShortDescription": "Image base64 encoded string",
"instillAcceptFormats": [
"string"
],
"type": "string"
}
},
"required": [
"image-base64"
]
}
"description": "Input image data.",
"instillShortDescription": "Input image data.",
"instillAcceptFormats": [
"string"
],
"type": "string"
},
"type": {
"title": "Input image type",
"description": "Image url or image base64.",
"instillShortDescription": "Image url or image base64.",
"instillAcceptFormats": [
"string"
],
"type": "string",
"enum": [
"url",
"base64"
]
}
},
"required": [
"model",
"image"
"image",
"type"
]
},
"bounding-box": {
Expand Down

0 comments on commit a65b73d

Please sign in to comment.