github.com/instill-ai/component@v0.16.0-beta/pkg/base/testdata/wantConnectorDefinition.json (about) 1 { 2 "name": "connector-definitions/openai", 3 "uid": "9fb6a2cb-bff5-4c69-bc6d-4538dd8e3362", 4 "id": "openai", 5 "title": "OpenAI", 6 "documentation_url": "https://www.instill.tech/docs/latest/vdp/ai-connectors/openai", 7 "icon": "OpenAI/openai.svg", 8 "spec": { 9 "component_specification": { 10 "$schema": "http://json-schema.org/draft-07/schema#", 11 "oneOf": [ 12 { 13 "properties": { 14 "condition": { 15 "instillAcceptFormats": [ 16 "string" 17 ], 18 "instillShortDescription": "config whether the component will be executed or skipped", 19 "instillUIOrder": 1, 20 "instillUpstreamTypes": [ 21 "value", 22 "template" 23 ], 24 "type": "string" 25 }, 26 "input": { 27 "instillEditOnNodeFields": [ 28 "text", 29 "model" 30 ], 31 "instillUIOrder": 0, 32 "properties": { 33 "model": { 34 "anyOf": [ 35 { 36 "enum": [ 37 "text-embedding-ada-002" 38 ], 39 "instillUpstreamType": "value", 40 "type": "string" 41 }, 42 { 43 "instillUpstreamType": "reference", 44 "pattern": "^\\{.*\\}$", 45 "type": "string" 46 }, 47 { 48 "instillUpstreamType": "template", 49 "type": "string" 50 } 51 ], 52 "description": "ID of the model to use", 53 "instillAcceptFormats": [ 54 "string" 55 ], 56 "instillShortDescription": "ID of the model to use", 57 "instillUIOrder": 0, 58 "instillUpstreamTypes": [ 59 "value", 60 "reference", 61 "template" 62 ], 63 "title": "Model" 64 }, 65 "text": { 66 "anyOf": [ 67 { 68 "instillUIMultiline": true, 69 "instillUpstreamType": "value", 70 "type": "string" 71 }, 72 { 73 "instillUpstreamType": "reference", 74 "pattern": "^\\{.*\\}$", 75 "type": "string" 76 }, 77 { 78 "instillUpstreamType": "template", 79 "type": "string" 80 } 81 ], 82 "description": "The text", 83 "instillAcceptFormats": [ 84 "string" 85 ], 86 "instillShortDescription": "The text", 87 "instillUIOrder": 1, 88 "instillUpstreamTypes": [ 89 "value", 90 "reference", 91 "template" 92 ], 93 "title": "Text" 94 } 95 }, 96 "required": [ 97 "text", 98 "model" 99 ], 100 "title": "Input", 101 "type": "object" 102 }, 103 "task": { 104 "const": "TASK_TEXT_EMBEDDINGS", 105 "instillShortDescription": "Turn text into numbers, unlocking use cases like search.", 106 "title": "Text Embeddings" 107 } 108 }, 109 "type": "object" 110 } 111 ], 112 "properties": { 113 "connection": { 114 "$schema": "http://json-schema.org/draft-07/schema#", 115 "additionalProperties": true, 116 "instillShortDescription": "", 117 "properties": { 118 "api_key": { 119 "description": "Fill your OpenAI API key. To find your keys, visit your OpenAI's API Keys page.", 120 "instillCredentialField": true, 121 "instillShortDescription": "Fill your OpenAI API key. To find your keys, visit your OpenAI's API Keys page.", 122 "instillUIOrder": 0, 123 "title": "API Key", 124 "type": "string" 125 } 126 }, 127 "required": [ 128 "api_key" 129 ], 130 "title": "OpenAI Connection", 131 "type": "object" 132 } 133 }, 134 "title": "OpenAI Component", 135 "type": "object" 136 }, 137 "data_specifications": { 138 "TASK_TEXT_EMBEDDINGS": { 139 "input": { 140 "instillEditOnNodeFields": [ 141 "text", 142 "model" 143 ], 144 "instillUIOrder": 0, 145 "properties": { 146 "model": { 147 "description": "ID of the model to use", 148 "instillShortDescription": "ID of the model to use", 149 "instillUIOrder": 0, 150 "title": "Model", 151 "type": "string" 152 }, 153 "text": { 154 "description": "The text", 155 "instillShortDescription": "The text", 156 "instillUIOrder": 1, 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 "instillEditOnNodeFields": [ 170 "embedding" 171 ], 172 "instillUIOrder": 0, 173 "properties": { 174 "embedding": { 175 "instillUIOrder": 0, 176 "items": { 177 "description": "", 178 "instillFormat": "number", 179 "instillShortDescription": "", 180 "instillUIOrder": 0, 181 "title": "Embedding", 182 "type": "number" 183 }, 184 "title": "Embedding", 185 "type": "array" 186 } 187 }, 188 "required": [ 189 "embedding" 190 ], 191 "title": "Output", 192 "type": "object" 193 } 194 } 195 } 196 }, 197 "type": 3, 198 "public": true, 199 "vendor": "OpenAI", 200 "vendor_attributes": {}, 201 "tasks": [ 202 { 203 "name": "TASK_TEXT_EMBEDDINGS", 204 "title": "Text Embeddings", 205 "description": "Turn text into numbers, unlocking use cases like search." 206 } 207 ], 208 "version": "1.0.0", 209 "source_url": "https://github.com/instill-ai/component/blob/main/pkg/base" 210 }