github.com/instill-ai/component@v0.16.0-beta/pkg/connector/openai/v0/config/tasks.json (about) 1 { 2 "$defs": { 3 "chat_message": { 4 "properties": { 5 "content": { 6 "$ref": "https://raw.githubusercontent.com/instill-ai/component/b530a7ac8558f38f45bd116c503b1e2a31a4f92b/schema.json#/$defs/instill_types/multi_modal_content", 7 "description": "The message content", 8 "instillUIOrder": 1, 9 "title": "Content" 10 }, 11 "role": { 12 "description": "The message role, i.e. 'system', 'user' or 'assistant'", 13 "instillFormat": "string", 14 "instillUIOrder": 0, 15 "title": "Role", 16 "type": "string" 17 } 18 }, 19 "required": [ 20 "role", 21 "content" 22 ], 23 "title": "Chat Message", 24 "type": "object" 25 } 26 }, 27 "TASK_SPEECH_RECOGNITION": { 28 "instillShortDescription": "Turn audio into text.", 29 "input": { 30 "instillUIOrder": 0, 31 "properties": { 32 "audio": { 33 "$ref": "openai.json#/components/schemas/CreateTranscriptionRequest/properties/file", 34 "instillAcceptFormats": [ 35 "audio/*" 36 ], 37 "instillUIOrder": 1, 38 "instillUpstreamTypes": [ 39 "reference" 40 ], 41 "title": "Audio" 42 }, 43 "language": { 44 "$ref": "openai.json#/components/schemas/CreateTranscriptionRequest/properties/language", 45 "instillAcceptFormats": [ 46 "string" 47 ], 48 "instillShortDescription": "The language of the input audio.", 49 "instillUIOrder": 3, 50 "instillUpstreamTypes": [ 51 "value", 52 "reference", 53 "template" 54 ], 55 "title": "Language" 56 }, 57 "model": { 58 "$ref": "openai.json#/components/schemas/CreateTranscriptionRequest/properties/model", 59 "instillAcceptFormats": [ 60 "string" 61 ], 62 "instillShortDescription": "ID of the model to use", 63 "instillUIOrder": 0, 64 "instillUpstreamTypes": [ 65 "value", 66 "reference", 67 "template" 68 ], 69 "title": "Model" 70 }, 71 "prompt": { 72 "$ref": "openai.json#/components/schemas/CreateTranscriptionRequest/properties/prompt", 73 "instillAcceptFormats": [ 74 "string" 75 ], 76 "instillShortDescription": "An optional text to guide the model's style or continue a previous audio segment.", 77 "instillUIMultiline": true, 78 "instillUIOrder": 2, 79 "instillUpstreamTypes": [ 80 "value", 81 "reference", 82 "template" 83 ], 84 "title": "Prompt" 85 }, 86 "temperature": { 87 "$ref": "openai.json#/components/schemas/CreateTranscriptionRequest/properties/temperature", 88 "instillAcceptFormats": [ 89 "number", 90 "integer" 91 ], 92 "instillShortDescription": "The sampling temperature, between 0 and 1.", 93 "instillUIOrder": 4, 94 "instillUpstreamTypes": [ 95 "value", 96 "reference" 97 ], 98 "title": "Temperature" 99 } 100 }, 101 "required": [ 102 "audio", 103 "model" 104 ], 105 "title": "Input", 106 "type": "object" 107 }, 108 "output": { 109 "instillUIOrder": 0, 110 "properties": { 111 "text": { 112 "$ref": "openai.json#/components/schemas/CreateTranscriptionResponse/properties/text", 113 "description": "Generated text", 114 "instillFormat": "string", 115 "instillUIOrder": 0, 116 "title": "Text" 117 } 118 }, 119 "required": [ 120 "text" 121 ], 122 "title": "Output", 123 "type": "object" 124 } 125 }, 126 "TASK_TEXT_EMBEDDINGS": { 127 "instillShortDescription": "Turn text into numbers, unlocking use cases like search.", 128 "input": { 129 "instillUIOrder": 0, 130 "properties": { 131 "model": { 132 "$ref": "openai.json#/components/schemas/CreateEmbeddingRequest/properties/model", 133 "instillAcceptFormats": [ 134 "string" 135 ], 136 "instillShortDescription": "ID of the model to use", 137 "instillUIOrder": 0, 138 "instillUpstreamTypes": [ 139 "value", 140 "reference", 141 "template" 142 ], 143 "title": "Model" 144 }, 145 "text": { 146 "description": "The text", 147 "instillAcceptFormats": [ 148 "string" 149 ], 150 "instillUIMultiline": true, 151 "instillUIOrder": 1, 152 "instillUpstreamTypes": [ 153 "value", 154 "reference", 155 "template" 156 ], 157 "title": "Text", 158 "type": "string" 159 } 160 }, 161 "required": [ 162 "text", 163 "model" 164 ], 165 "title": "Input", 166 "type": "object" 167 }, 168 "output": { 169 "instillUIOrder": 0, 170 "properties": { 171 "embedding": { 172 "$ref": "https://raw.githubusercontent.com/instill-ai/component/b530a7ac8558f38f45bd116c503b1e2a31a4f92b/schema.json#/$defs/instill_types/embedding", 173 "description": "Embedding of the input text", 174 "instillUIOrder": 0, 175 "title": "Embedding" 176 } 177 }, 178 "required": [ 179 "embedding" 180 ], 181 "title": "Output", 182 "type": "object" 183 } 184 }, 185 "TASK_TEXT_GENERATION": { 186 "instillShortDescription": "Provide text outputs in response to their inputs.", 187 "description": "OpenAI's text generation models (often called generative pre-trained transformers or large language models) have been trained to understand natural language, code, and images. The models provide text outputs in response to their inputs. The inputs to these models are also referred to as \"prompts\". Designing a prompt is essentially how you \u201cprogram\u201d a large language model model, usually by providing instructions or some examples of how to successfully complete a task.", 188 "input": { 189 "instillUIOrder": 0, 190 "properties": { 191 "chat_history": { 192 "description": "Incorporate external chat history, specifically previous messages within the conversation. Please note that System Message will be ignored and will not have any effect when this field is populated. Each message should adhere to the format: : {\"role\": \"The message role, i.e. 'system', 'user' or 'assistant'\", \"content\": \"message content\"}.", 193 "instillAcceptFormats": [ 194 "structured/chat_messages" 195 ], 196 "instillShortDescription": "Incorporate external chat history, specifically previous messages within the conversation. Please note that System Message will be ignored and will not have any effect when this field is populated. Each message should adhere to the format: : {\"role\": \"The message role, i.e. 'system', 'user' or 'assistant'\", \"content\": \"message content\"}.", 197 "instillUIOrder": 4, 198 "instillUpstreamTypes": [ 199 "value", 200 "reference" 201 ], 202 "items": { 203 "$ref": "#/$defs/chat_message" 204 }, 205 "title": "Chat history", 206 "type": "array" 207 }, 208 "frequency_penalty": { 209 "$ref": "openai.json#/components/schemas/CreateChatCompletionRequest/properties/frequency_penalty", 210 "instillAcceptFormats": [ 211 "number", 212 "integer" 213 ], 214 "instillShortDescription": "Number between -2.0 and 2.0", 215 "instillUIOrder": 11, 216 "instillUpstreamTypes": [ 217 "value", 218 "reference", 219 "template" 220 ], 221 "title": "Frequency Penalty" 222 }, 223 "images": { 224 "description": "The images", 225 "instillAcceptFormats": [ 226 "array:image/*" 227 ], 228 "instillUIOrder": 3, 229 "instillUpstreamTypes": [ 230 "reference" 231 ], 232 "items": { 233 "type": "string" 234 }, 235 "title": "Image", 236 "type": "array" 237 }, 238 "max_tokens": { 239 "$ref": "openai.json#/components/schemas/CreateChatCompletionRequest/properties/max_tokens", 240 "instillAcceptFormats": [ 241 "integer" 242 ], 243 "instillShortDescription": "The maximum number of <a href=\"https://platform.openai.com/tokenizer\">tokens</a> to generate in the chat completion.", 244 "instillUIOrder": 7, 245 "instillUpstreamTypes": [ 246 "value", 247 "reference" 248 ], 249 "title": "Max Tokens" 250 }, 251 "model": { 252 "$ref": "openai.json#/components/schemas/CreateChatCompletionRequest/properties/model", 253 "instillAcceptFormats": [ 254 "string" 255 ], 256 "instillShortDescription": "ID of the model to use", 257 "instillUIOrder": 0, 258 "instillUpstreamTypes": [ 259 "value", 260 "reference", 261 "template" 262 ], 263 "title": "Model" 264 }, 265 "n": { 266 "$ref": "openai.json#/components/schemas/CreateChatCompletionRequest/properties/n", 267 "instillAcceptFormats": [ 268 "integer" 269 ], 270 "instillUIOrder": 6, 271 "instillUpstreamTypes": [ 272 "value", 273 "reference" 274 ], 275 "title": "N" 276 }, 277 "presence_penalty": { 278 "$ref": "openai.json#/components/schemas/CreateChatCompletionRequest/properties/presence_penalty", 279 "instillAcceptFormats": [ 280 "number", 281 "integer" 282 ], 283 "instillShortDescription": "Number between -2.0 and 2.0", 284 "instillUIOrder": 10, 285 "instillUpstreamTypes": [ 286 "value", 287 "reference", 288 "template" 289 ], 290 "title": "Presence Penalty" 291 }, 292 "prompt": { 293 "description": "The prompt text", 294 "instillAcceptFormats": [ 295 "string" 296 ], 297 "instillUIMultiline": true, 298 "instillUIOrder": 1, 299 "instillUpstreamTypes": [ 300 "value", 301 "reference", 302 "template" 303 ], 304 "title": "Prompt", 305 "type": "string" 306 }, 307 "response_format": { 308 "description": "An object specifying the format that the model must output. Used to enable JSON mode.", 309 "instillUIOrder": 8, 310 "properties": { 311 "type": { 312 "$ref": "openai.json#/components/schemas/CreateChatCompletionRequest/properties/response_format/properties/type", 313 "instillAcceptFormats": [ 314 "string" 315 ], 316 "title": "Type", 317 "example": "text", 318 "instillShortDescription": "Setting to `json_object` enables JSON mode. ", 319 "instillUIOrder": 0, 320 "instillUpstreamTypes": [ 321 "value", 322 "reference" 323 ] 324 } 325 }, 326 "required": [ 327 "type" 328 ], 329 "title": "Response Format", 330 "type": "object" 331 }, 332 "system_message": { 333 "default": "You are a helpful assistant.", 334 "description": "The system message helps set the behavior of the assistant. For example, you can modify the personality of the assistant or provide specific instructions about how it should behave throughout the conversation. By default, the model\u2019s behavior is using a generic message as \"You are a helpful assistant.\"", 335 "instillAcceptFormats": [ 336 "string" 337 ], 338 "instillShortDescription": "The system message helps set the behavior of the assistant", 339 "instillUIMultiline": true, 340 "instillUIOrder": 2, 341 "instillUpstreamTypes": [ 342 "value", 343 "reference", 344 "template" 345 ], 346 "title": "System message", 347 "type": "string" 348 }, 349 "temperature": { 350 "$ref": "openai.json#/components/schemas/CreateChatCompletionRequest/properties/temperature", 351 "instillAcceptFormats": [ 352 "number", 353 "integer" 354 ], 355 "instillShortDescription": "What sampling temperature to use, between 0 and 2.", 356 "instillUIOrder": 5, 357 "instillUpstreamTypes": [ 358 "value", 359 "reference" 360 ], 361 "title": "Temperature" 362 }, 363 "top_p": { 364 "$ref": "openai.json#/components/schemas/CreateChatCompletionRequest/properties/top_p", 365 "instillAcceptFormats": [ 366 "number", 367 "integer" 368 ], 369 "instillShortDescription": "An alternative to sampling with temperature, called nucleus sampling", 370 "instillUIOrder": 9, 371 "instillUpstreamTypes": [ 372 "value", 373 "reference" 374 ], 375 "title": "Top P" 376 } 377 }, 378 "required": [ 379 "model", 380 "prompt" 381 ], 382 "title": "Input", 383 "type": "object" 384 }, 385 "output": { 386 "instillUIOrder": 0, 387 "properties": { 388 "texts": { 389 "instillUIOrder": 0, 390 "instillFormat": "array:string", 391 "items": { 392 "instillFormat": "string", 393 "instillUIMultiline": true, 394 "title": "Text", 395 "type": "string" 396 }, 397 "description": "Texts", 398 "title": "Texts", 399 "type": "array" 400 } 401 }, 402 "required": [ 403 "texts" 404 ], 405 "title": "Output", 406 "type": "object" 407 } 408 }, 409 "TASK_TEXT_TO_IMAGE": { 410 "instillShortDescription": "Generate or manipulate images with DALL\u00b7E.", 411 "input": { 412 "instillUIOrder": 0, 413 "properties": { 414 "model": { 415 "$ref": "openai.json#/components/schemas/CreateImageRequest/properties/model", 416 "instillAcceptFormats": [ 417 "string" 418 ], 419 "instillShortDescription": "ID of the model to use", 420 "instillUIOrder": 0, 421 "instillUpstreamTypes": [ 422 "value", 423 "reference", 424 "template" 425 ], 426 "title": "Model" 427 }, 428 "n": { 429 "$ref": "openai.json#/components/schemas/CreateImageRequest/properties/n", 430 "instillAcceptFormats": [ 431 "integer" 432 ], 433 "instillUIOrder": 2, 434 "instillUpstreamTypes": [ 435 "value", 436 "reference" 437 ], 438 "title": "N" 439 }, 440 "prompt": { 441 "$ref": "openai.json#/components/schemas/CreateImageRequest/properties/prompt", 442 "instillAcceptFormats": [ 443 "string" 444 ], 445 "instillShortDescription": "A text description of the desired image(s).", 446 "instillUIMultiline": true, 447 "instillUIOrder": 1, 448 "instillUpstreamTypes": [ 449 "value", 450 "reference", 451 "template" 452 ], 453 "title": "Prompt" 454 }, 455 "quality": { 456 "$ref": "openai.json#/components/schemas/CreateImageRequest/properties/quality", 457 "instillAcceptFormats": [ 458 "string" 459 ], 460 "instillShortDescription": "The quality of the image that will be generated.", 461 "instillUIOrder": 3, 462 "instillUpstreamTypes": [ 463 "value", 464 "reference" 465 ], 466 "title": "Quality" 467 }, 468 "size": { 469 "$ref": "openai.json#/components/schemas/CreateImageRequest/properties/size", 470 "instillAcceptFormats": [ 471 "string" 472 ], 473 "instillShortDescription": "The size of the generated images.", 474 "instillUIOrder": 4, 475 "instillUpstreamTypes": [ 476 "value", 477 "reference" 478 ], 479 "title": "Size" 480 }, 481 "style": { 482 "$ref": "openai.json#/components/schemas/CreateImageRequest/properties/style", 483 "instillAcceptFormats": [ 484 "string" 485 ], 486 "instillShortDescription": "The style of the generated images.", 487 "instillUIOrder": 5, 488 "instillUpstreamTypes": [ 489 "value", 490 "reference" 491 ], 492 "title": "N" 493 } 494 }, 495 "required": [ 496 "prompt", 497 "model" 498 ], 499 "title": "Input", 500 "type": "object" 501 }, 502 "output": { 503 "instillUIOrder": 0, 504 "properties": { 505 "results": { 506 "description": "Generated results", 507 "instillUIOrder": 0, 508 "items": { 509 "description": "Generated result", 510 "properties": { 511 "image": { 512 "title": "Generated Image", 513 "description": "Generated image", 514 "instillFormat": "image/webp", 515 "type": "string" 516 }, 517 "revised_prompt": { 518 "title": "Revised Prompt", 519 "description": "Revised prompt", 520 "instillFormat": "string", 521 "instillUIMultiline": true, 522 "type": "string" 523 } 524 }, 525 "required": [ 526 "image", 527 "revised_prompt" 528 ], 529 "title": "Image", 530 "type": "object" 531 }, 532 "title": "Images", 533 "type": "array" 534 } 535 }, 536 "required": [ 537 "results" 538 ], 539 "title": "Output", 540 "type": "object" 541 } 542 }, 543 "TASK_TEXT_TO_SPEECH": { 544 "instillShortDescription": "Turn text into lifelike spoken audio", 545 "input": { 546 "instillUIOrder": 0, 547 "properties": { 548 "model": { 549 "$ref": "openai.json#/components/schemas/CreateSpeechRequest/properties/model", 550 "default": "tts-1", 551 "enum": [ 552 "tts-1", 553 "tts-1-hd" 554 ], 555 "instillAcceptFormats": [ 556 "string" 557 ], 558 "instillShortDescription": "ID of the model to use", 559 "instillUIOrder": 0, 560 "instillUpstreamTypes": [ 561 "value", 562 "reference", 563 "template" 564 ], 565 "title": "Model", 566 "type": "string" 567 }, 568 "response_format": { 569 "$ref": "openai.json#/components/schemas/CreateSpeechRequest/properties/response_format", 570 "instillAcceptFormats": [ 571 "string" 572 ], 573 "instillShortDescription": "The format to audio", 574 "instillUIOrder": 3, 575 "instillUpstreamTypes": [ 576 "value", 577 "reference" 578 ], 579 "title": "Response Format" 580 }, 581 "speed": { 582 "$ref": "openai.json#/components/schemas/CreateSpeechRequest/properties/speed", 583 "instillAcceptFormats": [ 584 "number" 585 ], 586 "instillShortDescription": "The speed of the generated audio", 587 "instillUIOrder": 4, 588 "instillUpstreamTypes": [ 589 "value", 590 "reference" 591 ], 592 "title": "Speed" 593 }, 594 "text": { 595 "$ref": "openai.json#/components/schemas/CreateSpeechRequest/properties/input", 596 "instillAcceptFormats": [ 597 "string" 598 ], 599 "instillShortDescription": "The text to generate audio for", 600 "instillUIOrder": 1, 601 "instillUpstreamTypes": [ 602 "value", 603 "reference", 604 "template" 605 ], 606 "title": "Text" 607 }, 608 "voice": { 609 "$ref": "openai.json#/components/schemas/CreateSpeechRequest/properties/voice", 610 "instillAcceptFormats": [ 611 "string" 612 ], 613 "instillShortDescription": "The voice to use when generating the audio", 614 "instillUIOrder": 2, 615 "instillUpstreamTypes": [ 616 "value", 617 "reference", 618 "template" 619 ], 620 "title": "Voice" 621 } 622 }, 623 "required": [ 624 "text", 625 "model", 626 "voice" 627 ], 628 "title": "Input", 629 "type": "object" 630 }, 631 "output": { 632 "instillUIOrder": 0, 633 "properties": { 634 "audio": { 635 "description": "AI generated audio", 636 "instillFormat": "audio/wav", 637 "instillUIOrder": 0, 638 "title": "Audio", 639 "type": "string" 640 } 641 }, 642 "required": [], 643 "title": "Output", 644 "type": "object" 645 } 646 } 647 }