From 1183cb0843eb8cef0f0b1fd85cd9bee96178ce1a Mon Sep 17 00:00:00 2001 From: "Chang, Hui-Tang" Date: Mon, 12 Aug 2024 18:46:07 +0800 Subject: [PATCH] feat(openai): support gpt-4o-2024-08-06 and structured output --- ai/openai/v0/README.mdx | 2 +- ai/openai/v0/config/tasks.json | 88 +++-- ai/openai/v0/main.go | 26 +- ai/openai/v0/text_generation.go | 56 +-- application/hubspot/v0/deal_test.go | 4 +- application/hubspot/v0/thread_test.go | 4 +- application/hubspot/v0/ticket_test.go | 4 +- application/slack/v0/component_test.go | 4 +- application/whatsapp/v0/config/tasks.json | 406 +++++++++++++++++----- data/elasticsearch/v0/config/tasks.json | 81 +++-- data/mongodb/v0/config/setup.json | 2 +- data/mongodb/v0/config/tasks.json | 87 +++-- data/qdrant/v0/config/tasks.json | 99 +++--- data/sql/v0/config/definition.json | 2 +- data/sql/v0/config/setup.json | 14 +- data/sql/v0/config/tasks.json | 52 +-- data/weaviate/v0/config/tasks.json | 73 ++-- 17 files changed, 675 insertions(+), 329 deletions(-) diff --git a/ai/openai/v0/README.mdx b/ai/openai/v0/README.mdx index 45cc8079..58954440 100644 --- a/ai/openai/v0/README.mdx +++ b/ai/openai/v0/README.mdx @@ -58,7 +58,7 @@ Provide text outputs in response to their inputs. | Temperature | `temperature` | number | What sampling temperature to use, between 0 and 2. Higher values like 0.8 will make the output more random, while lower values like 0.2 will make it more focused and deterministic. We generally recommend altering this or `top-p` but not both. | | N | `n` | integer | How many chat completion choices to generate for each input message. Note that you will be charged based on the number of generated tokens across all of the choices. Keep `n` as `1` to minimize costs. | | Max Tokens | `max-tokens` | integer | The maximum number of tokens that can be generated in the chat completion. The total length of input tokens and generated tokens is limited by the model's context length. | -| Response Format | `response-format` | object | An object specifying the format that the model must output. Used to enable JSON mode. | +| Response Format (required) | `response-format` | object | Response format. | | Top P | `top-p` | number | An alternative to sampling with temperature, called nucleus sampling, where the model considers the results of the tokens with top_p probability mass. So 0.1 means only the tokens comprising the top 10% probability mass are considered. We generally recommend altering this or `temperature` but not both. | | Presence Penalty | `presence-penalty` | number | Number between -2.0 and 2.0. Positive values penalize new tokens based on whether they appear in the text so far, increasing the model's likelihood to talk about new topics. | | Frequency Penalty | `frequency-penalty` | number | Number between -2.0 and 2.0. Positive values penalize new tokens based on their existing frequency in the text so far, decreasing the model's likelihood to repeat the same line verbatim. | diff --git a/ai/openai/v0/config/tasks.json b/ai/openai/v0/config/tasks.json index 423e2551..165e1f8d 100644 --- a/ai/openai/v0/config/tasks.json +++ b/ai/openai/v0/config/tasks.json @@ -309,6 +309,7 @@ "gpt-4o-mini", "gpt-4o", "gpt-4o-2024-05-13", + "gpt-4o-2024-08-06", "gpt-4-turbo", "gpt-4-turbo-2024-04-09", "gpt-4-0125-preview", @@ -329,7 +330,7 @@ "gpt-3.5-turbo-0125", "gpt-3.5-turbo-16k-0613" ], - "example": "gpt-3.5-turbo", + "example": "gpt-4o", "type": "string", "instillAcceptFormats": [ "string" @@ -344,6 +345,7 @@ "instillCredentialMap": { "values": [ "gpt-4o", + "gpt-4o-2024-08-06", "gpt-4-turbo", "gpt-4-vision-preview", "gpt-4", @@ -411,35 +413,68 @@ "type": "string" }, "response-format": { - "description": "An object specifying the format that the model must output. Used to enable JSON mode.", + "description": "Response format.", "instillUIOrder": 8, - "properties": { - "type": { - "default": "text", - "description": "Must be one of `text` or `json_object`.", - "enum": [ - "text", - "json_object" + "additionalProperties": true, + "type": "object", + "required": [ + "type" + ], + "oneOf": [ + { + "properties": { + "type": { + "type": "string", + "const": "text" + } + }, + "required": [ + "type" + ], + "type": "object" + }, + { + "properties": { + "type": { + "type": "string", + "const": "json_object" + } + }, + "required": [ + "type" ], - "type": "string", - "instillAcceptFormats": [ - "string" + "type": "object" + }, + { + "properties": { + "type": { + "type": "string", + "const": "json_schema" + }, + "json-schema": { + "description": "Set up the schema of the structured output.", + "type": "string", + "instillAcceptFormats": [ + "string" + ], + "title": "JSON Schema", + "instillShortDescription": "Specify the schema of the structured output.", + "instillUIOrder": 1, + "instillUIMultiline": true, + "instillUpstreamTypes": [ + "value", + "reference" + ] + } + }, + "required": [ + "type", + "json-schema" ], - "title": "Type", - "example": "text", - "instillShortDescription": "Setting to `json_object` enables JSON mode. ", - "instillUIOrder": 0, - "instillUpstreamTypes": [ - "value", - "reference" - ] + "type": "object" } - }, - "required": [ - "type" ], - "title": "Response Format", - "type": "object" + "title": "Response Format" }, "system-message": { "default": "You are a helpful assistant.", @@ -501,7 +536,8 @@ }, "required": [ "model", - "prompt" + "prompt", + "response-format" ], "title": "Input", "type": "object" diff --git a/ai/openai/v0/main.go b/ai/openai/v0/main.go index fd0ba7dd..c2ccfe07 100644 --- a/ai/openai/v0/main.go +++ b/ai/openai/v0/main.go @@ -174,7 +174,31 @@ func (e *execution) Execute(_ context.Context, inputs []*structpb.Struct) ([]*st // workaround, the OpenAI service can not accept this param if inputStruct.Model != "gpt-4-vision-preview" { - body.ResponseFormat = inputStruct.ResponseFormat + if inputStruct.ResponseFormat != nil { + body.ResponseFormat = &responseFormatReqStruct{ + Type: inputStruct.ResponseFormat.Type, + } + if inputStruct.ResponseFormat.Type == "json_schema" { + if inputStruct.Model == "gpt-4o-mini" || inputStruct.Model == "gpt-4o-2024-08-06" { + sch := map[string]any{} + if inputStruct.ResponseFormat.JSONSchema != "" { + err = json.Unmarshal([]byte(inputStruct.ResponseFormat.JSONSchema), &sch) + if err != nil { + return nil, err + } + body.ResponseFormat = &responseFormatReqStruct{ + Type: inputStruct.ResponseFormat.Type, + JSONSchema: sch, + } + } + + } else { + return nil, fmt.Errorf("this model doesn't support response format: json_schema") + } + + } + } + } resp := textCompletionResp{} diff --git a/ai/openai/v0/text_generation.go b/ai/openai/v0/text_generation.go index 4f3e5139..f6dc75f8 100644 --- a/ai/openai/v0/text_generation.go +++ b/ai/openai/v0/text_generation.go @@ -10,23 +10,24 @@ type textMessage struct { } type TextCompletionInput struct { - Prompt string `json:"prompt"` - Images []string `json:"images"` - ChatHistory []*textMessage `json:"chat-history,omitempty"` - Model string `json:"model"` - SystemMessage *string `json:"system-message,omitempty"` - Temperature *float32 `json:"temperature,omitempty"` - TopP *float32 `json:"top-p,omitempty"` - N *int `json:"n,omitempty"` - Stop *string `json:"stop,omitempty"` - MaxTokens *int `json:"max-tokens,omitempty"` - PresencePenalty *float32 `json:"presence-penalty,omitempty"` - FrequencyPenalty *float32 `json:"frequency-penalty,omitempty"` - ResponseFormat *responseFormatStruct `json:"response-format,omitempty"` + Prompt string `json:"prompt"` + Images []string `json:"images"` + ChatHistory []*textMessage `json:"chat-history,omitempty"` + Model string `json:"model"` + SystemMessage *string `json:"system-message,omitempty"` + Temperature *float32 `json:"temperature,omitempty"` + TopP *float32 `json:"top-p,omitempty"` + N *int `json:"n,omitempty"` + Stop *string `json:"stop,omitempty"` + MaxTokens *int `json:"max-tokens,omitempty"` + PresencePenalty *float32 `json:"presence-penalty,omitempty"` + FrequencyPenalty *float32 `json:"frequency-penalty,omitempty"` + ResponseFormat *responseFormatInputStruct `json:"response-format,omitempty"` } -type responseFormatStruct struct { - Type string `json:"type,omitempty"` +type responseFormatInputStruct struct { + Type string `json:"type,omitempty"` + JSONSchema string `json:"json-schema,omitempty"` } type TextCompletionOutput struct { @@ -35,16 +36,21 @@ type TextCompletionOutput struct { } type textCompletionReq struct { - Model string `json:"model"` - Messages []interface{} `json:"messages"` - Temperature *float32 `json:"temperature,omitempty"` - TopP *float32 `json:"top_p,omitempty"` - N *int `json:"n,omitempty"` - Stop *string `json:"stop,omitempty"` - MaxTokens *int `json:"max_tokens,omitempty"` - PresencePenalty *float32 `json:"presence_penalty,omitempty"` - FrequencyPenalty *float32 `json:"frequency_penalty,omitempty"` - ResponseFormat *responseFormatStruct `json:"response_format,omitempty"` + Model string `json:"model"` + Messages []interface{} `json:"messages"` + Temperature *float32 `json:"temperature,omitempty"` + TopP *float32 `json:"top_p,omitempty"` + N *int `json:"n,omitempty"` + Stop *string `json:"stop,omitempty"` + MaxTokens *int `json:"max_tokens,omitempty"` + PresencePenalty *float32 `json:"presence_penalty,omitempty"` + FrequencyPenalty *float32 `json:"frequency_penalty,omitempty"` + ResponseFormat *responseFormatReqStruct `json:"response_format,omitempty"` +} + +type responseFormatReqStruct struct { + Type string `json:"type,omitempty"` + JSONSchema map[string]any `json:"json_schema,omitempty"` } type multiModalMessage struct { diff --git a/application/hubspot/v0/deal_test.go b/application/hubspot/v0/deal_test.go index f6b1152d..43e1c12b 100644 --- a/application/hubspot/v0/deal_test.go +++ b/application/hubspot/v0/deal_test.go @@ -89,7 +89,7 @@ func TestComponent_ExecuteGetDealTask(t *testing.T) { client: createMockClient(), } e.execute = e.GetDeal - + pbInput, err := structpb.NewStruct(map[string]any{ "deal-id": tc.input, @@ -139,7 +139,7 @@ func TestComponent_ExecuteCreateDealTask(t *testing.T) { client: createMockClient(), } e.execute = e.CreateDeal - + pbInput, err := base.ConvertToStructpb(tc.inputDeal) diff --git a/application/hubspot/v0/thread_test.go b/application/hubspot/v0/thread_test.go index f4bd9932..d2fc976c 100644 --- a/application/hubspot/v0/thread_test.go +++ b/application/hubspot/v0/thread_test.go @@ -112,7 +112,7 @@ func TestComponent_ExecuteGetThreadTask(t *testing.T) { client: createMockClient(), } e.execute = e.GetThread - + pbInput, err := structpb.NewStruct(map[string]any{ "thread-id": tc.input, }) @@ -165,7 +165,7 @@ func TestComponent_ExecuteInsertMessageTask(t *testing.T) { client: createMockClient(), } e.execute = e.InsertMessage - + pbInput, err := base.ConvertToStructpb(tc.input) diff --git a/application/hubspot/v0/ticket_test.go b/application/hubspot/v0/ticket_test.go index ccaaa79d..0611a18f 100644 --- a/application/hubspot/v0/ticket_test.go +++ b/application/hubspot/v0/ticket_test.go @@ -80,7 +80,7 @@ func TestComponent_ExecuteGetTicketTask(t *testing.T) { client: createMockClient(), } e.execute = e.GetTicket - + pbInput, err := structpb.NewStruct(map[string]any{ "ticket-id": tc.input, @@ -132,7 +132,7 @@ func TestComponent_ExecuteCreateTicketTask(t *testing.T) { client: createMockClient(), } e.execute = e.CreateTicket - + pbInput, err := base.ConvertToStructpb(tc.inputTicket) diff --git a/application/slack/v0/component_test.go b/application/slack/v0/component_test.go index cdad5f4f..8178f77a 100644 --- a/application/slack/v0/component_test.go +++ b/application/slack/v0/component_test.go @@ -146,7 +146,7 @@ func TestComponent_ExecuteWriteTask(t *testing.T) { client: &MockSlackClient{}, } e.execute = e.sendMessage - + pbIn, err := base.ConvertToStructpb(tc.input) c.Assert(err, qt.IsNil) @@ -230,7 +230,7 @@ func TestComponent_ExecuteReadTask(t *testing.T) { client: &MockSlackClient{}, } e.execute = e.readMessage - + pbIn, err := base.ConvertToStructpb(tc.input) c.Assert(err, qt.IsNil) diff --git a/application/whatsapp/v0/config/tasks.json b/application/whatsapp/v0/config/tasks.json index 0dc910bc..1832c93f 100644 --- a/application/whatsapp/v0/config/tasks.json +++ b/application/whatsapp/v0/config/tasks.json @@ -3,36 +3,60 @@ "def-input": { "phone-number-id": { "description": "Phone Number ID. Obtainable through the app dashboard. Note: This is for sender.", - "instillAcceptFormats": ["string"], + "instillAcceptFormats": [ + "string" + ], "instillUIMultiline": false, "instillUIOrder": 0, - "instillUpstreamTypes": ["value", "reference", "template"], + "instillUpstreamTypes": [ + "value", + "reference", + "template" + ], "title": "Phone Number ID", "type": "string" }, "to": { "description": "The number of the recipient you are sending the message to", - "instillAcceptFormats": ["string"], + "instillAcceptFormats": [ + "string" + ], "instillUIMultiline": false, "instillUIOrder": 1, - "instillUpstreamTypes": ["value", "reference", "template"], + "instillUpstreamTypes": [ + "value", + "reference", + "template" + ], "title": "Recipient Phone Number", "type": "string" }, - "template":{ + "template": { "name": { "description": "Name of the template", - "instillAcceptFormats": ["string"], + "instillAcceptFormats": [ + "string" + ], "instillUIMultiline": true, - "instillUpstreamTypes": ["value", "reference", "template"], + "instillUpstreamTypes": [ + "value", + "reference", + "template" + ], "title": "Template Name", "type": "string" }, "language-code": { "description": "The code of the language in which the template is used. Supported languages: https://developers.facebook.com/docs/whatsapp/api/messages/message-templates#supported-languages", - "instillAcceptFormats": ["string"], + "instillAcceptFormats": [ + "string" + ], "instillUIMultiline": false, - "instillUpstreamTypes": ["value", "reference", "template"], + "instillUpstreamTypes": [ + "value", + "reference", + "template" + ], "title": "Language Code", "type": "string" }, @@ -61,56 +85,98 @@ } } }, - "media":{ + "media": { "id-or-link": { "description": "Input either ID or link of the media. If the input has 'http', it will be considered as a link.", - "instillAcceptFormats": ["string"], + "instillAcceptFormats": [ + "string" + ], "instillUIMultiline": true, - "instillUpstreamTypes": ["value", "reference", "template"], + "instillUpstreamTypes": [ + "value", + "reference", + "template" + ], "type": "string" }, "caption": { "description": "Media asset caption. Description of the media. This property cannot be used when the media type is audio. If audio tried to use this property, it will be ignored.", - "instillAcceptFormats": ["string"], + "instillAcceptFormats": [ + "string" + ], "instillUIMultiline": true, - "instillUpstreamTypes": ["value", "reference", "template"], + "instillUpstreamTypes": [ + "value", + "reference", + "template" + ], "type": "string" }, "filename": { "description": "The filename of the document. Only document can use this property. This property will specify what format the document is displayed as in WhatsApp. If other media type tried to use this property, it will be ignored.", - "instillAcceptFormats": ["string"], + "instillAcceptFormats": [ + "string" + ], "instillUIMultiline": true, - "instillUpstreamTypes": ["value", "reference", "template"], + "instillUpstreamTypes": [ + "value", + "reference", + "template" + ], "type": "string" } }, - "location":{ + "location": { "latitude": { "description": "Location latitude", - "instillAcceptFormats": ["number"], + "instillAcceptFormats": [ + "number" + ], "instillUIMultiline": false, - "instillUpstreamTypes": ["value", "reference", "template"], + "instillUpstreamTypes": [ + "value", + "reference", + "template" + ], "type": "number" }, "longitude": { "description": "Location longitude", - "instillAcceptFormats": ["number"], + "instillAcceptFormats": [ + "number" + ], "instillUIMultiline": false, - "instillUpstreamTypes": ["value", "reference", "template"], + "instillUpstreamTypes": [ + "value", + "reference", + "template" + ], "type": "number" }, "location-name": { "description": "Name of the location", - "instillAcceptFormats": ["string"], + "instillAcceptFormats": [ + "string" + ], "instillUIMultiline": true, - "instillUpstreamTypes": ["value", "reference", "template"], + "instillUpstreamTypes": [ + "value", + "reference", + "template" + ], "type": "string" }, "address": { "description": "Address of the location", - "instillAcceptFormats": ["string"], + "instillAcceptFormats": [ + "string" + ], "instillUIMultiline": true, - "instillUpstreamTypes": ["value", "reference", "template"], + "instillUpstreamTypes": [ + "value", + "reference", + "template" + ], "type": "string" } } @@ -183,7 +249,6 @@ "body-parameters": { "$ref": "#/$defs/def-input/template/body-parameters", "instillUIOrder": 5 - }, "button-parameters": { "$ref": "#/$defs/def-input/template/button-parameters", @@ -201,7 +266,7 @@ }, "output": { "description": "API response", - "instillUIOrder": 0, + "instillUIOrder": 0, "properties": { "recipient-wa-id": { "$ref": "#/$defs/def-output/recipient-wa-id" @@ -213,7 +278,11 @@ "$ref": "#/$defs/def-output/message-status" } }, - "required": ["recipient-wa-id", "message-id", "message-status"], + "required": [ + "recipient-wa-id", + "message-id", + "message-status" + ], "title": "Output", "type": "object" } @@ -249,12 +318,22 @@ "instillUIOrder": 3 }, "media-type": { - "enum": ["image", "video", "document"], + "enum": [ + "image", + "video", + "document" + ], "example": "none", "description": "Specify the header(media) type for the header section of the template.", - "instillAcceptFormats": ["string"], + "instillAcceptFormats": [ + "string" + ], "instillUIOrder": 4, - "instillUpstreamTypes": ["value", "reference", "template"], + "instillUpstreamTypes": [ + "value", + "reference", + "template" + ], "title": "Header Type", "type": "string" }, @@ -271,7 +350,6 @@ "body-parameters": { "$ref": "#/$defs/def-input/template/body-parameters", "instillUIOrder": 7 - }, "button-parameters": { "$ref": "#/$defs/def-input/template/button-parameters", @@ -285,7 +363,6 @@ "language-code", "media-type", "id-or-link" - ], "title": "Input", "type": "object" @@ -304,7 +381,11 @@ "$ref": "#/$defs/def-output/message-status" } }, - "required": ["recipient-wa-id", "message-id", "message-status"], + "required": [ + "recipient-wa-id", + "message-id", + "message-status" + ], "title": "Output", "type": "object" } @@ -360,7 +441,7 @@ "$ref": "#/$defs/def-input/location/address", "instillUIOrder": 7 }, - "body-parameters":{ + "body-parameters": { "$ref": "#/$defs/def-input/template/body-parameters", "instillUIOrder": 8 }, @@ -368,7 +449,6 @@ "$ref": "#/$defs/def-input/template/button-parameters", "instillUIOrder": 9 } - }, "required": [ "phone-number-id", @@ -397,7 +477,11 @@ "$ref": "#/$defs/def-output/message-status" } }, - "required": ["recipient-wa-id", "message-id", "message-status"], + "required": [ + "recipient-wa-id", + "message-id", + "message-status" + ], "title": "Output", "type": "object" } @@ -429,12 +513,18 @@ "$ref": "#/$defs/def-input/template/language-code", "instillUIOrder": 3 }, - "one-time-password":{ + "one-time-password": { "description": "One-time password to be sent to the recipient. Maximum 15 characters.", - "instillAcceptFormats": ["string"], + "instillAcceptFormats": [ + "string" + ], "instillUIMultiline": false, "instillUIOrder": 4, - "instillUpstreamTypes": ["value", "reference", "template"], + "instillUpstreamTypes": [ + "value", + "reference", + "template" + ], "title": "One-Time Password", "type": "string" } @@ -463,7 +553,11 @@ "$ref": "#/$defs/def-output/message-status" } }, - "required": ["recipient-wa-id", "message-id", "message-status"], + "required": [ + "recipient-wa-id", + "message-id", + "message-status" + ], "title": "Output", "type": "object" } @@ -488,25 +582,45 @@ }, "body": { "description": "Body of the message", - "instillAcceptFormats": ["string"], + "instillAcceptFormats": [ + "string" + ], "instillUIMultiline": true, "instillUIOrder": 2, - "instillUpstreamTypes": ["value", "reference", "template"], + "instillUpstreamTypes": [ + "value", + "reference", + "template" + ], "title": "Text", "type": "string" }, "preview-url": { - "enum": ["false", "true"], + "enum": [ + "false", + "true" + ], "example": "false", "description": "Specify whether URL should be previewed or not. This will have no affect if the message does not contain any URL.", - "instillAcceptFormats": ["string"], + "instillAcceptFormats": [ + "string" + ], "instillUIOrder": 3, - "instillUpstreamTypes": ["value", "reference", "template"], + "instillUpstreamTypes": [ + "value", + "reference", + "template" + ], "title": "Preview URL", "type": "string" } }, - "required": ["phone-number-id", "to", "body", "preview-url"], + "required": [ + "phone-number-id", + "to", + "body", + "preview-url" + ], "title": "Input", "type": "object" }, @@ -521,7 +635,10 @@ "$ref": "#/$defs/def-output/message-id" } }, - "required": ["recipient-wa-id", "message-id"], + "required": [ + "recipient-wa-id", + "message-id" + ], "title": "Output", "type": "object" } @@ -547,12 +664,23 @@ "$ref": "#/$defs/def-input/to" }, "media-type": { - "enum": ["image", "audio", "document", "video"], + "enum": [ + "image", + "audio", + "document", + "video" + ], "example": "image", "description": "Specify what media to send.", - "instillAcceptFormats": ["string"], + "instillAcceptFormats": [ + "string" + ], "instillUIOrder": 2, - "instillUpstreamTypes": ["value", "reference", "template"], + "instillUpstreamTypes": [ + "value", + "reference", + "template" + ], "title": "Media Type", "type": "string" }, @@ -572,7 +700,12 @@ "instillUIOrder": 5 } }, - "required": ["phone-number-id", "to", "media-type", "id-or-link"], + "required": [ + "phone-number-id", + "to", + "media-type", + "id-or-link" + ], "title": "Input", "type": "object" }, @@ -587,7 +720,10 @@ "$ref": "#/$defs/def-output/message-id" } }, - "required": ["recipient-wa-id", "message-id"], + "required": [ + "recipient-wa-id", + "message-id" + ], "title": "Output", "type": "object" } @@ -655,12 +791,15 @@ "$ref": "#/$defs/def-output/message-id" } }, - "required": ["recipient-wa-id", "message-id"], + "required": [ + "recipient-wa-id", + "message-id" + ], "title": "Output", "type": "object" } }, - "TASK_SEND_CONTACT_MESSAGE":{ + "TASK_SEND_CONTACT_MESSAGE": { "instillShortDescription": "Send contact message. Note: Message can only be sent when the 24-hour customer service window is open. For more information: https://developers.facebook.com/docs/whatsapp/cloud-api/guides/send-messages#customer-service-windows", "input": { "description": "Contact input", @@ -686,77 +825,136 @@ }, "first-name": { "description": "First name of the contact", - "instillAcceptFormats": ["string"], + "instillAcceptFormats": [ + "string" + ], "instillUIMultiline": false, "instillUIOrder": 2, - "instillUpstreamTypes": ["value", "reference", "template"], + "instillUpstreamTypes": [ + "value", + "reference", + "template" + ], "title": "First Name", "type": "string" }, "middle-name": { "description": "Middle name of the contact", - "instillAcceptFormats": ["string"], + "instillAcceptFormats": [ + "string" + ], "instillUIMultiline": false, "instillUIOrder": 3, - "instillUpstreamTypes": ["value", "reference", "template"], + "instillUpstreamTypes": [ + "value", + "reference", + "template" + ], "title": "Middle Name", "type": "string" }, "last-name": { "description": "Last name of the contact", - "instillAcceptFormats": ["string"], + "instillAcceptFormats": [ + "string" + ], "instillUIMultiline": false, "instillUIOrder": 4, - "instillUpstreamTypes": ["value", "reference", "template"], + "instillUpstreamTypes": [ + "value", + "reference", + "template" + ], "title": "Last Name", "type": "string" }, "phone-number": { "description": "Phone number of the contact", - "instillAcceptFormats": ["string"], + "instillAcceptFormats": [ + "string" + ], "instillUIMultiline": false, "instillUIOrder": 5, - "instillUpstreamTypes": ["value", "reference", "template"], + "instillUpstreamTypes": [ + "value", + "reference", + "template" + ], "title": "Phone Number", "type": "string" }, "phone-number-type": { - "enum": ["none", "CELL", "MAIN", "PHONE", "HOME", "WORK"], + "enum": [ + "none", + "CELL", + "MAIN", + "PHONE", + "HOME", + "WORK" + ], "example": "none", "description": "Phone number type of the contact. If there is no phone number, pick none.", - "instillAcceptFormats": ["string"], + "instillAcceptFormats": [ + "string" + ], "instillUIMultiline": false, "instillUIOrder": 6, - "instillUpstreamTypes": ["value", "reference", "template"], + "instillUpstreamTypes": [ + "value", + "reference", + "template" + ], "title": "Phone Number Type", "type": "string" }, "email": { "description": "Email of the contact", - "instillAcceptFormats": ["string"], + "instillAcceptFormats": [ + "string" + ], "instillUIMultiline": false, "instillUIOrder": 7, - "instillUpstreamTypes": ["value", "reference", "template"], + "instillUpstreamTypes": [ + "value", + "reference", + "template" + ], "title": "Email", "type": "string" }, "email-type": { - "enum": ["none", "HOME", "WORK"], + "enum": [ + "none", + "HOME", + "WORK" + ], "example": "none", "description": "Email type of the contact. If there is no email, pick none.", - "instillAcceptFormats": ["string"], + "instillAcceptFormats": [ + "string" + ], "instillUIMultiline": false, "instillUIOrder": 8, - "instillUpstreamTypes": ["value", "reference", "template"], + "instillUpstreamTypes": [ + "value", + "reference", + "template" + ], "title": "Email Type", "type": "string" }, "birthday": { "description": "Birthday of the contact. Format is in 'YYYY-MM-DD'.", - "instillAcceptFormats": ["string"], + "instillAcceptFormats": [ + "string" + ], "instillUIMultiline": false, "instillUIOrder": 9, - "instillUpstreamTypes": ["value", "reference", "template"], + "instillUpstreamTypes": [ + "value", + "reference", + "template" + ], "title": "Birthday", "type": "string" } @@ -780,12 +978,15 @@ "$ref": "#/$defs/def-output/message-id" } }, - "required": ["recipient-wa-id", "message-id"], + "required": [ + "recipient-wa-id", + "message-id" + ], "title": "Output", "type": "object" } }, - "TASK_SEND_INTERACTIVE_CALL_TO_ACTION_URL_BUTTON_MESSAGE":{ + "TASK_SEND_INTERACTIVE_CALL_TO_ACTION_URL_BUTTON_MESSAGE": { "instillShortDescription": "Send interactive Call-To-Action URL button message. Note: Message can only be sent when the 24-hour customer service window is open. For more information: https://developers.facebook.com/docs/whatsapp/cloud-api/guides/send-messages#customer-service-windows ", "input": { "description": "Interactive CTA URL button input", @@ -808,46 +1009,76 @@ }, "header-text": { "description": "Message header text.", - "instillAcceptFormats": ["string"], + "instillAcceptFormats": [ + "string" + ], "instillUIMultiline": true, "instillUIOrder": 2, - "instillUpstreamTypes": ["value", "reference", "template"], + "instillUpstreamTypes": [ + "value", + "reference", + "template" + ], "title": "Header Text", "type": "string" }, "body-text": { "description": "Message body text.", - "instillAcceptFormats": ["string"], + "instillAcceptFormats": [ + "string" + ], "instillUIMultiline": true, "instillUIOrder": 3, - "instillUpstreamTypes": ["value", "reference", "template"], + "instillUpstreamTypes": [ + "value", + "reference", + "template" + ], "title": "Body Text", "type": "string" }, "footer-text": { "description": "Message footer text.", - "instillAcceptFormats": ["string"], + "instillAcceptFormats": [ + "string" + ], "instillUIMultiline": true, "instillUIOrder": 4, - "instillUpstreamTypes": ["value", "reference", "template"], + "instillUpstreamTypes": [ + "value", + "reference", + "template" + ], "title": "Footer Text", "type": "string" }, "button-display-text": { "description": "The text displayed on the button", - "instillAcceptFormats": ["string"], + "instillAcceptFormats": [ + "string" + ], "instillUIMultiline": false, "instillUIOrder": 5, - "instillUpstreamTypes": ["value", "reference", "template"], + "instillUpstreamTypes": [ + "value", + "reference", + "template" + ], "title": "Button Display Text", "type": "string" }, "button-url": { "description": "URL to load when the user tapped the button", - "instillAcceptFormats": ["string"], + "instillAcceptFormats": [ + "string" + ], "instillUIMultiline": true, "instillUIOrder": 6, - "instillUpstreamTypes": ["value", "reference", "template"], + "instillUpstreamTypes": [ + "value", + "reference", + "template" + ], "title": "Button URL", "type": "string" } @@ -873,7 +1104,10 @@ "$ref": "#/$defs/def-output/message-id" } }, - "required": ["recipient-wa-id", "message-id"], + "required": [ + "recipient-wa-id", + "message-id" + ], "title": "Output", "type": "object" } diff --git a/data/elasticsearch/v0/config/tasks.json b/data/elasticsearch/v0/config/tasks.json index 4f764334..5e34c131 100644 --- a/data/elasticsearch/v0/config/tasks.json +++ b/data/elasticsearch/v0/config/tasks.json @@ -35,7 +35,8 @@ "data": { "description": "Data to be indexed", "instillAcceptFormats": [ - "semi-structured/*","object" + "semi-structured/*", + "object" ], "instillUIOrder": 2, "instillUpstreamTypes": [ @@ -74,7 +75,7 @@ "type": "object" } }, - "TASK_MULTI_INDEX":{ + "TASK_MULTI_INDEX": { "instillShortDescription": "Index multiple documents into Elasticsearch with bulk API", "input": { "instillUIOrder": 0, @@ -106,7 +107,7 @@ ], "items": { "description": "An id of the document", - "type":"string", + "type": "string", "example": 1 }, "minItems": 1, @@ -116,7 +117,10 @@ "array-data": { "description": "Array data to be indexed", "instillAcceptFormats": [ - "array:semi-structured/*","array:semi-structured/json","array:semi-structured/object","array:object" + "array:semi-structured/*", + "array:semi-structured/json", + "array:semi-structured/object", + "array:object" ], "instillUIOrder": 2, "instillUpstreamTypes": [ @@ -206,13 +210,14 @@ "reference", "template" ], - "type":"string", + "type": "string", "title": "Query" }, "filter": { "description": "The query dsl filter which starts with \"query\" field, please refer to https://www.elastic.co/guide/en/elasticsearch/reference/current/query-filter-context.html", "instillAcceptFormats": [ - "semi-structured/*","object" + "semi-structured/*", + "object" ], "instillUIOrder": 3, "instillUpstreamTypes": [ @@ -242,7 +247,8 @@ "update-data": { "description": "Update data", "instillAcceptFormats": [ - "semi-structured/*","object" + "semi-structured/*", + "object" ], "instillUIOrder": 4, "instillUpstreamTypes": [ @@ -331,13 +337,14 @@ "reference", "template" ], - "type":"string", + "type": "string", "title": "Query" }, "filter": { "description": "The query dsl filter which starts with \"query\" field, please refer to https://www.elastic.co/guide/en/elasticsearch/reference/current/query-filter-context.html", "instillAcceptFormats": [ - "semi-structured/*","object" + "semi-structured/*", + "object" ], "instillUIOrder": 4, "instillUpstreamTypes": [ @@ -364,7 +371,7 @@ "title": "Filter SQL", "type": "string" }, - "size":{ + "size": { "description": "Number of documents to return. If empty then all documents will be returned", "instillAcceptFormats": [ "integer" @@ -378,7 +385,7 @@ "title": "Size", "type": "integer" }, - "fields":{ + "fields": { "description": "The fields to return in the documents. If empty then all fields will be returned", "instillAcceptFormats": [ "array:string" @@ -391,14 +398,14 @@ "value" ], "title": "Fields", - "type":"array", + "type": "array", "items": { - "title":"Field", + "title": "Field", "type": "string" }, "minItems": 1 }, - "min-score":{ + "min-score": { "description": "Minimum score to consider for search results. If empty then no minimum score will be considered", "instillAcceptFormats": [ "number" @@ -440,12 +447,12 @@ "title": "Result", "type": "object", "properties": { - "ids":{ + "ids": { "description": "The ids returned from the search operation", "instillUIOrder": 0, "title": "IDs", "type": "array", - "required":[], + "required": [], "instillFormat": "array:string", "items": { "description": "An id of the document", @@ -512,7 +519,7 @@ "title": "Index Name", "type": "string" }, - "field":{ + "field": { "description": "Field name of the vector to search for similar vectors", "instillAcceptFormats": [ "string" @@ -529,7 +536,8 @@ "query-vector": { "description": "Query vector to search for similar vectors", "instillAcceptFormats": [ - "array:int","array:number" + "array:int", + "array:number" ], "instillShortDescription": "", "instillUIOrder": 3, @@ -538,7 +546,7 @@ "reference", "template" ], - "type":"array", + "type": "array", "items": { "description": "A dimension of the vector", "example": 0.8167237, @@ -547,7 +555,7 @@ "minItems": 1, "title": "Query Vector" }, - "k":{ + "k": { "description": "K of documents to do kNN vector search", "instillAcceptFormats": [ "integer" @@ -561,7 +569,7 @@ "title": "K", "type": "integer" }, - "num-candidates":{ + "num-candidates": { "description": "Number of candidates to be considered for kNN vector search. Default to 2 times of k", "instillAcceptFormats": [ "integer" @@ -578,7 +586,8 @@ "filter": { "description": "The query dsl filter which starts with \"filter\" field, please refer to https://www.elastic.co/guide/en/elasticsearch/reference/current/knn-search.html#knn-search-filter-example", "instillAcceptFormats": [ - "semi-structured/*","object" + "semi-structured/*", + "object" ], "instillUIOrder": 6, "instillUpstreamTypes": [ @@ -605,7 +614,7 @@ "title": "Filter SQL", "type": "string" }, - "fields":{ + "fields": { "description": "The fields to return in the documents. If empty then all fields will be returned", "instillAcceptFormats": [ "array:string" @@ -618,14 +627,14 @@ "value" ], "title": "Fields", - "type":"array", + "type": "array", "items": { - "title":"Field", + "title": "Field", "type": "string" }, "minItems": 1 }, - "min-score":{ + "min-score": { "description": "Minimum score to consider for search results. If empty then no minimum score will be considered", "instillAcceptFormats": [ "number" @@ -670,12 +679,12 @@ "title": "Result", "type": "object", "properties": { - "ids":{ + "ids": { "description": "The ids returned from the vector search operation", "instillUIOrder": 0, "title": "IDs", "type": "array", - "required":[], + "required": [], "instillFormat": "array:string", "items": { "description": "An id of the document", @@ -702,13 +711,13 @@ "instillUIOrder": 2, "title": "Vectors", "type": "array", - "required":[], + "required": [], "instillFormat": "array:array", "items": { "description": "The vector from array vectors", "type": "array", "instillFormat": "array", - "required":[], + "required": [], "items": { "description": "A dimension of the vector", "example": 0.8167237, @@ -787,13 +796,14 @@ "reference", "template" ], - "type":"string", + "type": "string", "title": "Query" }, "filter": { "description": "The query dsl filter which starts with \"query\" field, please refer to https://www.elastic.co/guide/en/elasticsearch/reference/current/query-filter-context.html", "instillAcceptFormats": [ - "semi-structured/*","object" + "semi-structured/*", + "object" ], "instillUIOrder": 3, "instillUpstreamTypes": [ @@ -851,7 +861,7 @@ "type": "object" } }, - "TASK_CREATE_INDEX":{ + "TASK_CREATE_INDEX": { "instillShortDescription": "Create an index in Elasticsearch", "input": { "instillUIOrder": 0, @@ -873,7 +883,8 @@ "mappings": { "description": "Index mappings which starts with {\"mappings\":{\"properties\"}} field, please refer to https://www.elastic.co/guide/en/elasticsearch/reference/current/dense-vector.html for vector search and https://www.elastic.co/guide/en/elasticsearch/reference/current/mapping-types.html for other mappings", "instillAcceptFormats": [ - "semi-structured/*","object" + "semi-structured/*", + "object" ], "instillUIOrder": 1, "instillUpstreamTypes": [ @@ -911,7 +922,7 @@ "type": "object" } }, - "TASK_DELETE_INDEX":{ + "TASK_DELETE_INDEX": { "instillShortDescription": "Delete an index in Elasticsearch", "input": { "instillUIOrder": 0, diff --git a/data/mongodb/v0/config/setup.json b/data/mongodb/v0/config/setup.json index b0135d38..759395ae 100644 --- a/data/mongodb/v0/config/setup.json +++ b/data/mongodb/v0/config/setup.json @@ -24,4 +24,4 @@ ], "title": "MongoDB Connection", "type": "object" -} \ No newline at end of file +} diff --git a/data/mongodb/v0/config/tasks.json b/data/mongodb/v0/config/tasks.json index adf6d522..42afeb78 100644 --- a/data/mongodb/v0/config/tasks.json +++ b/data/mongodb/v0/config/tasks.json @@ -49,7 +49,8 @@ "data": { "description": "The data to be inserted", "instillAcceptFormats": [ - "semi-structured/*","object" + "semi-structured/*", + "object" ], "instillUIOrder": 3, "instillUpstreamTypes": [ @@ -89,7 +90,7 @@ "type": "object" } }, - "TASK_INSERT_MANY":{ + "TASK_INSERT_MANY": { "instillShortDescription": "Perform an insert many operation", "input": { "instillUIOrder": 0, @@ -135,7 +136,7 @@ ], "items": { "description": "An id of the document", - "type":"string", + "type": "string", "example": 1 }, "minItems": 1, @@ -145,7 +146,10 @@ "array-data": { "description": "The array data to be inserted", "instillAcceptFormats": [ - "array:semi-structured/*","array:semi-structured/json","array:semi-structured/object","array:object" + "array:semi-structured/*", + "array:semi-structured/json", + "array:semi-structured/object", + "array:object" ], "instillUIOrder": 3, "instillUpstreamTypes": [ @@ -154,7 +158,7 @@ "value" ], "title": "Data", - "type":"array", + "type": "array", "items": { "description": "The data to be inserted", "title": "Data", @@ -240,7 +244,8 @@ "filter": { "description": "The filter to find documents, please refer to the documentations https://www.mongodb.com/docs/manual/reference/operator/query/. If empty then all documents will be returned", "instillAcceptFormats": [ - "semi-structured/*","object" + "semi-structured/*", + "object" ], "instillShortDescription": "The mongodb language query to filter the documents, empty for no filter", "instillUIOrder": 3, @@ -253,7 +258,7 @@ "type": "object", "required": [] }, - "limit":{ + "limit": { "description": "The number of documents to return. If empty then all documents will be returned", "instillAcceptFormats": [ "integer" @@ -267,7 +272,7 @@ "title": "Limit", "type": "integer" }, - "fields":{ + "fields": { "description": "The fields to return in the documents. If empty then all fields will be returned", "instillAcceptFormats": [ "array:string" @@ -280,9 +285,9 @@ "value" ], "title": "Fields", - "type":"array", + "type": "array", "items": { - "title":"Field", + "title": "Field", "type": "string" }, "minItems": 1 @@ -292,7 +297,7 @@ "database-name", "collection-name" ], - "instillEditOnNodeFields":[ + "instillEditOnNodeFields": [ "database-name", "collection-name", "filter" @@ -317,12 +322,12 @@ "title": "Result", "type": "object", "properties": { - "ids":{ + "ids": { "description": "The ids returned from the find operation", "instillUIOrder": 0, "title": "IDs", "type": "array", - "required":[], + "required": [], "instillFormat": "array:string", "items": { "description": "An id of the document", @@ -420,7 +425,8 @@ "filter": { "description": "The filter to update documents, please refer to the documentations https://www.mongodb.com/docs/manual/reference/operator/query/. If empty then all documents will be returned", "instillAcceptFormats": [ - "semi-structured/*","object" + "semi-structured/*", + "object" ], "instillShortDescription": "The mongodb language query to filter the documents", "instillUIOrder": 3, @@ -436,7 +442,8 @@ "update-data": { "description": "The updated data to be applied to the documents", "instillAcceptFormats": [ - "semi-structured/*","object" + "semi-structured/*", + "object" ], "instillUIOrder": 4, "instillUpstreamTypes": [ @@ -454,7 +461,7 @@ "collection-name", "update-data" ], - "instillEditOnNodeFields":[ + "instillEditOnNodeFields": [ "database-name", "collection-name", "filter" @@ -531,7 +538,8 @@ "filter": { "description": "The filter to delete documents, please refer to the documentations https://www.mongodb.com/docs/manual/reference/operator/query/. If empty then all documents will be returned", "instillAcceptFormats": [ - "semi-structured/*","object" + "semi-structured/*", + "object" ], "instillShortDescription": "The mongodb language query to filter the documents", "instillUIOrder": 3, @@ -549,7 +557,7 @@ "database-name", "collection-name" ], - "instillEditOnNodeFields":[ + "instillEditOnNodeFields": [ "database-name", "collection-name", "filter" @@ -576,7 +584,7 @@ "type": "object" } }, - "TASK_DROP_COLLECTION":{ + "TASK_DROP_COLLECTION": { "instillShortDescription": "Delete the collection", "input": { "instillUIOrder": 0, @@ -636,7 +644,7 @@ "type": "object" } }, - "TASK_DROP_DATABASE":{ + "TASK_DROP_DATABASE": { "instillShortDescription": "Delete the database", "input": { "instillUIOrder": 0, @@ -681,7 +689,7 @@ "type": "object" } }, - "TASK_CREATE_SEARCH_INDEX":{ + "TASK_CREATE_SEARCH_INDEX": { "instillShortDescription": "Create a search index, only works for M10 or larger clusters", "input": { "instillUIOrder": 0, @@ -714,7 +722,7 @@ "title": "Collection Name", "type": "string" }, - "index-name":{ + "index-name": { "description": "The name of the index to be created", "instillAcceptFormats": [ "string" @@ -728,7 +736,7 @@ "title": "Index Name", "type": "string" }, - "index-type":{ + "index-type": { "description": "The type of the index to be created", "instillAcceptFormats": [ "string" @@ -746,10 +754,11 @@ "title": "Index Type", "type": "string" }, - "syntax":{ + "syntax": { "description": "The syntax structure of the search index, please refer to the MongoDB documentation for more information. search https://www.mongodb.com/docs/atlas/atlas-search/create-index/. vectorSearch https://www.mongodb.com/docs/atlas/atlas-vector-search/vector-search-type/", "instillAcceptFormats": [ - "semi-structured/*","object" + "semi-structured/*", + "object" ], "instillShortDescription": "Syntax Structure, please refer to the MongoDB documentation", "instillUIOrder": 4, @@ -791,7 +800,7 @@ "type": "object" } }, - "TASK_DROP_SEARCH_INDEX":{ + "TASK_DROP_SEARCH_INDEX": { "instillShortDescription": "Drop a search index, only works for M10 or larger clusters", "input": { "instillUIOrder": 0, @@ -867,7 +876,7 @@ "type": "object" } }, - "TASK_VECTOR_SEARCH":{ + "TASK_VECTOR_SEARCH": { "instillShortDescription": "Perform a vector search operation", "input": { "instillUIOrder": 0, @@ -918,7 +927,8 @@ "query-vector": { "description": "The query vector to be used for vector search", "instillAcceptFormats": [ - "array:number", "array:integer" + "array:number", + "array:integer" ], "instillShortDescription": "Query Vector", "instillUIOrder": 3, @@ -996,7 +1006,8 @@ "filter": { "description": "The filter to be used for vector search, need to first create filter vectorSearch search index, please refer to the documentations https://www.mongodb.com/docs/manual/reference/operator/query/. If empty then all documents will be returned to be used for vector search", "instillAcceptFormats": [ - "semi-structured/*","object" + "semi-structured/*", + "object" ], "instillShortDescription": "The mongodb language query to filter the documents, empty for all documents", "instillUIOrder": 8, @@ -1009,7 +1020,7 @@ "type": "object", "required": [] }, - "fields":{ + "fields": { "description": "The fields to return in the documents. If empty then all fields will be returned", "instillAcceptFormats": [ "array:string" @@ -1022,9 +1033,9 @@ "value" ], "title": "Fields", - "type":"array", + "type": "array", "items": { - "title":"Field", + "title": "Field", "type": "string" }, "minItems": 1 @@ -1041,7 +1052,7 @@ "title": "Input", "type": "object" }, - "output":{ + "output": { "instillUIOrder": 0, "properties": { "status": { @@ -1058,12 +1069,12 @@ "title": "Result", "type": "object", "properties": { - "ids":{ + "ids": { "description": "The ids returned from the vector search operation", "instillUIOrder": 0, "title": "IDs", "type": "array", - "required":[], + "required": [], "instillFormat": "array:string", "items": { "description": "An id of the document", @@ -1090,13 +1101,13 @@ "instillUIOrder": 2, "title": "Vectors", "type": "array", - "required":[], + "required": [], "instillFormat": "array:array", "items": { "description": "The vector from array vectors", "type": "array", "instillFormat": "array", - "required":[], + "required": [], "items": { "description": "A dimension of the vector", "example": 0.8167237, @@ -1130,4 +1141,4 @@ "type": "object" } } -} \ No newline at end of file +} diff --git a/data/qdrant/v0/config/tasks.json b/data/qdrant/v0/config/tasks.json index f180289e..342cf4a1 100644 --- a/data/qdrant/v0/config/tasks.json +++ b/data/qdrant/v0/config/tasks.json @@ -4,7 +4,7 @@ "input": { "instillUIOrder": 0, "properties": { - "collection-name":{ + "collection-name": { "description": "The name of the collection to perform vector similarity search on", "instillAcceptFormats": [ "string" @@ -52,9 +52,9 @@ "value" ], "title": "Limit", - "type":"integer" + "type": "integer" }, - "payloads":{ + "payloads": { "description": "The payloads to return in the points. If empty then all payloads will be returned", "instillAcceptFormats": [ "array:string" @@ -68,16 +68,17 @@ ], "title": "Payloads", "minItems": 1, - "type":"array", + "type": "array", "items": { - "title":"Field", + "title": "Field", "type": "string" } }, "filter": { "description": "The properties filter to be applied to the data with Qdrant filter, please refer to https://api.qdrant.tech/api-reference/search/points filter section", "instillAcceptFormats": [ - "semi-structured/*", "object" + "semi-structured/*", + "object" ], "instillUIOrder": 4, "instillUpstreamTypes": [ @@ -87,12 +88,13 @@ ], "title": "Filter", "type": "object", - "required":[] + "required": [] }, - "params":{ + "params": { "description": "The additional parameters to be passed to the search, please refer to https://api.qdrant.tech/api-reference/search/points params section", "instillAcceptFormats": [ - "semi-structured/*", "object" + "semi-structured/*", + "object" ], "instillUIOrder": 5, "instillUpstreamTypes": [ @@ -102,9 +104,9 @@ ], "title": "Params", "type": "object", - "required":[] + "required": [] }, - "min-score":{ + "min-score": { "description": "The minimum score of the points to be returned", "instillAcceptFormats": [ "number" @@ -116,7 +118,7 @@ "value" ], "title": "Min Score", - "type":"number" + "type": "number" } }, "required": [ @@ -143,12 +145,12 @@ "title": "Result", "type": "object", "properties": { - "ids":{ + "ids": { "description": "The ids returned from the vector search operation", "instillUIOrder": 0, "title": "IDs", "type": "array", - "required":[], + "required": [], "instillFormat": "array:string", "items": { "description": "An id of the point", @@ -175,13 +177,13 @@ "instillUIOrder": 2, "title": "Vectors", "type": "array", - "required":[], + "required": [], "instillFormat": "array:array", "items": { "description": "The vector from array vectors", "type": "array", "instillFormat": "array", - "required":[], + "required": [], "items": { "description": "A dimension of the vector", "example": 0.8167237, @@ -215,12 +217,12 @@ "type": "object" } }, - "TASK_BATCH_UPSERT":{ + "TASK_BATCH_UPSERT": { "instillShortDescription": "Insert multiple vector points into a collection", "input": { "instillUIOrder": 0, "properties": { - "collection-name":{ + "collection-name": { "description": "The name of the collection to upsert the point into", "instillAcceptFormats": [ "string" @@ -247,7 +249,7 @@ ], "items": { "description": "An id of the point", - "type":"string", + "type": "string", "example": 1 }, "minItems": 1, @@ -257,7 +259,10 @@ "array-metadata": { "description": "The array of vector metadata payload", "instillAcceptFormats": [ - "array:semi-structured/*","array:semi-structured/json","array:semi-structured/object", "array:object" + "array:semi-structured/*", + "array:semi-structured/json", + "array:semi-structured/object", + "array:object" ], "instillUIOrder": 2, "instillUpstreamTypes": [ @@ -272,7 +277,7 @@ "description": "The vector metadata payload", "title": "Metadatum", "type": "object", - "required":[] + "required": [] } }, "array-vector": { @@ -289,7 +294,7 @@ "items": { "description": "An array of dimensions for the vector value", "type": "array", - "instillAcceptFormats":[ + "instillAcceptFormats": [ "array:number", "array:integer" ], @@ -303,7 +308,7 @@ "title": "Array Vector", "type": "array" }, - "ordering":{ + "ordering": { "description": "The ordering guarantees of the batch upsert", "instillAcceptFormats": [ "string" @@ -316,10 +321,10 @@ "value" ], "title": "Ordering", - "type":"string", + "type": "string", "enum": [ - "weak", - "medium", + "weak", + "medium", "strong" ] } @@ -350,7 +355,7 @@ "type": "object" } }, - "TASK_UPSERT":{ + "TASK_UPSERT": { "instillShortDescription": "Upsert a vector point into a collection", "input": { "instillUIOrder": 0, @@ -420,7 +425,7 @@ "title": "Vector", "type": "array" }, - "ordering":{ + "ordering": { "description": "The ordering guarantees of the batch upsert", "instillAcceptFormats": [ "string" @@ -433,10 +438,10 @@ "value" ], "title": "Ordering", - "type":"string", + "type": "string", "enum": [ - "weak", - "medium", + "weak", + "medium", "strong" ] } @@ -467,12 +472,12 @@ "type": "object" } }, - "TASK_DELETE":{ + "TASK_DELETE": { "instillShortDescription": "Delete vector points from a collection", "input": { "instillUIOrder": 0, "properties": { - "collection-name":{ + "collection-name": { "description": "The name of the collection to delete the object from", "instillAcceptFormats": [ "string" @@ -503,7 +508,8 @@ "filter": { "description": "The properties filter to be applied to the data with Qdrant filter, please refer to https://api.qdrant.tech/api-reference/points/delete-points filter section", "instillAcceptFormats": [ - "semi-structured/*", "object" + "semi-structured/*", + "object" ], "instillUIOrder": 2, "instillUpstreamTypes": [ @@ -513,9 +519,9 @@ ], "title": "Filter", "type": "object", - "required":[] + "required": [] }, - "ordering":{ + "ordering": { "description": "The ordering guarantees of the batch upsert", "instillAcceptFormats": [ "string" @@ -528,10 +534,10 @@ "value" ], "title": "Ordering", - "type":"string", + "type": "string", "enum": [ - "weak", - "medium", + "weak", + "medium", "strong" ] } @@ -564,12 +570,12 @@ "type": "object" } }, - "TASK_CREATE_COLLECTION":{ + "TASK_CREATE_COLLECTION": { "instillShortDescription": "Create a collection", "input": { "instillUIOrder": 0, "properties": { - "collection-name":{ + "collection-name": { "description": "The name of the collection to create", "instillAcceptFormats": [ "string" @@ -583,10 +589,11 @@ "title": "Collection Name", "type": "string" }, - "config":{ + "config": { "description": "The configuration of the collection. Please refer to https://api.qdrant.tech/api-reference/collections/create-collection", "instillAcceptFormats": [ - "semi-structured/*", "object" + "semi-structured/*", + "object" ], "instillUIOrder": 1, "instillUpstreamTypes": [ @@ -596,7 +603,7 @@ ], "title": "Config", "type": "object", - "required":[] + "required": [] } }, "required": [ @@ -624,12 +631,12 @@ "type": "object" } }, - "TASK_DELETE_COLLECTION":{ + "TASK_DELETE_COLLECTION": { "instillShortDescription": "Delete a collection", "input": { "instillUIOrder": 0, "properties": { - "collection-name":{ + "collection-name": { "description": "The name of the collection to delete", "instillAcceptFormats": [ "string" diff --git a/data/sql/v0/config/definition.json b/data/sql/v0/config/definition.json index b330f27d..45e8935a 100644 --- a/data/sql/v0/config/definition.json +++ b/data/sql/v0/config/definition.json @@ -20,4 +20,4 @@ "version": "0.1.0", "sourceUrl": "https://github.com/instill-ai/component/blob/main/data/sql/v0", "releaseStage": "RELEASE_STAGE_ALPHA" -} \ No newline at end of file +} diff --git a/data/sql/v0/config/setup.json b/data/sql/v0/config/setup.json index 1c4d1014..f1eb74dd 100644 --- a/data/sql/v0/config/setup.json +++ b/data/sql/v0/config/setup.json @@ -5,7 +5,8 @@ "user": { "description": "Fill in your account username", "instillUpstreamTypes": [ - "value","reference" + "value", + "reference" ], "instillAcceptFormats": [ "string" @@ -30,7 +31,8 @@ "database-name": { "description": "Fill in the name of your database", "instillUpstreamTypes": [ - "value","reference" + "value", + "reference" ], "instillAcceptFormats": [ "string" @@ -42,7 +44,8 @@ "host": { "description": "Fill in the host of your database", "instillUpstreamTypes": [ - "value","reference" + "value", + "reference" ], "instillAcceptFormats": [ "string" @@ -54,7 +57,8 @@ "port": { "description": "Fill in the port of your database", "instillUpstreamTypes": [ - "value","reference" + "value", + "reference" ], "default": 3306, "instillAcceptFormats": [ @@ -81,4 +85,4 @@ ], "title": "SQL Connection", "type": "object" -} \ No newline at end of file +} diff --git a/data/sql/v0/config/tasks.json b/data/sql/v0/config/tasks.json index 37fef25c..7792bd26 100644 --- a/data/sql/v0/config/tasks.json +++ b/data/sql/v0/config/tasks.json @@ -39,12 +39,13 @@ "value" ], "title": "Table Name", - "type":"string" + "type": "string" }, "data": { "description": "The data to be inserted", "instillAcceptFormats": [ - "semi-structured/*","object" + "semi-structured/*", + "object" ], "instillUIOrder": 2, "instillUpstreamTypes": [ @@ -88,7 +89,7 @@ "type": "object" } }, - "TASK_INSERT_MANY":{ + "TASK_INSERT_MANY": { "instillShortDescription": "Perform insert operation with multiple rows", "input": { "instillUIOrder": 0, @@ -128,12 +129,15 @@ "value" ], "title": "Table Name", - "type":"string" + "type": "string" }, "array-data": { "description": "The array data to be inserted", "instillAcceptFormats": [ - "array:semi-structured/*","array:semi-structured/json","array:semi-structured/object", "array:object" + "array:semi-structured/*", + "array:semi-structured/json", + "array:semi-structured/object", + "array:object" ], "instillUIOrder": 2, "instillUpstreamTypes": [ @@ -142,7 +146,7 @@ "value" ], "title": "Data", - "type":"array", + "type": "array", "items": { "description": "The data to be inserted", "title": "Data", @@ -219,7 +223,7 @@ "value" ], "title": "Table Name", - "type":"string" + "type": "string" }, "filter": { "instillShortDescription": "The filter to be applied to the data", @@ -230,7 +234,7 @@ "template", "value" ], - "instillAcceptFormats":[ + "instillAcceptFormats": [ "string" ], "title": "Filter", @@ -239,7 +243,8 @@ "update-data": { "description": "The new data to be updated to", "instillAcceptFormats": [ - "semi-structured/*","object" + "semi-structured/*", + "object" ], "instillUIOrder": 3, "instillUpstreamTypes": [ @@ -284,7 +289,7 @@ "type": "object" } }, - "TASK_SELECT":{ + "TASK_SELECT": { "instillShortDescription": "Perform select operation", "input": { "instillUIOrder": 0, @@ -324,7 +329,7 @@ "value" ], "title": "Table Name", - "type":"string" + "type": "string" }, "filter": { "instillShortDescription": "The filter to be applied to the data. If empty, then all rows will be updated", @@ -335,7 +340,7 @@ "template", "value" ], - "instillAcceptFormats":[ + "instillAcceptFormats": [ "string" ], "title": "Filter", @@ -354,9 +359,9 @@ "value" ], "title": "Limit", - "type":"integer" + "type": "integer" }, - "columns":{ + "columns": { "description": "The columns to return in the rows. If empty then all columns will be returned", "instillAcceptFormats": [ "array:string" @@ -369,9 +374,9 @@ "value" ], "title": "Columns", - "type":"array", + "type": "array", "items": { - "title":"Column", + "title": "Column", "type": "string" }, "minItems": 1 @@ -468,7 +473,7 @@ "value" ], "title": "Table Name", - "type":"string" + "type": "string" }, "filter": { "instillShortDescription": "The filter to be applied to the data", @@ -479,7 +484,7 @@ "template", "value" ], - "instillAcceptFormats":[ + "instillAcceptFormats": [ "string" ], "title": "Filter", @@ -513,7 +518,7 @@ "type": "object" } }, - "TASK_CREATE_TABLE":{ + "TASK_CREATE_TABLE": { "instillShortDescription": "Create a table in the database", "input": { "instillUIOrder": 0, @@ -553,12 +558,13 @@ "value" ], "title": "Table Name", - "type":"string" + "type": "string" }, "columns-structure": { "description": "The columns structure to be created in the table, json with value string, e.g {\"name\": \"VARCHAR(255)\", \"age\": \"INT not null\"}", "instillAcceptFormats": [ - "semi-structured/*","object" + "semi-structured/*", + "object" ], "instillShortDescription": "Columns Structure, e.g {\"name\": \"VARCHAR(255)\", \"age\": \"INT not null\"}", "instillUIOrder": 2, @@ -599,7 +605,7 @@ "type": "object" } }, - "TASK_DROP_TABLE":{ + "TASK_DROP_TABLE": { "instillShortDescription": "Drop a table in the database", "input": { "instillUIOrder": 0, @@ -639,7 +645,7 @@ "value" ], "title": "Table Name", - "type":"string" + "type": "string" } }, "required": [ diff --git a/data/weaviate/v0/config/tasks.json b/data/weaviate/v0/config/tasks.json index 7d627354..9fa49680 100644 --- a/data/weaviate/v0/config/tasks.json +++ b/data/weaviate/v0/config/tasks.json @@ -4,7 +4,7 @@ "input": { "instillUIOrder": 0, "properties": { - "collection-name":{ + "collection-name": { "description": "The name of the collection to perform vector search on", "instillAcceptFormats": [ "string" @@ -51,9 +51,9 @@ "value" ], "title": "Limit", - "type":"integer" + "type": "integer" }, - "fields":{ + "fields": { "description": "The fields to return in the objects. If empty then all fields will be returned", "instillAcceptFormats": [ "array:string" @@ -67,16 +67,17 @@ ], "title": "Fields", "minItems": 1, - "type":"array", + "type": "array", "items": { - "title":"Field", + "title": "Field", "type": "string" } }, "filter": { "description": "The properties filter to be applied to the data with GraphQL queries, which starts with WHERE field, please refer to https://weaviate.io/developers/weaviate/search/filters", "instillAcceptFormats": [ - "semi-structured/*", "object" + "semi-structured/*", + "object" ], "instillUIOrder": 4, "instillUpstreamTypes": [ @@ -86,7 +87,7 @@ ], "title": "Filter", "type": "object", - "required":[] + "required": [] }, "tenant": { "description": "The tenant to perform the vector search on", @@ -130,12 +131,12 @@ "title": "Result", "type": "object", "properties": { - "ids":{ + "ids": { "description": "The ids returned from the vector search operation", "instillUIOrder": 0, "title": "IDs", "type": "array", - "required":[], + "required": [], "instillFormat": "array:string", "items": { "description": "An id of the object", @@ -162,13 +163,13 @@ "instillUIOrder": 2, "title": "Vectors", "type": "array", - "required":[], + "required": [], "instillFormat": "array:array", "items": { "description": "The vector from array vectors", "type": "array", "instillFormat": "array", - "required":[], + "required": [], "items": { "description": "A dimension of the vector", "example": 0.8167237, @@ -207,7 +208,7 @@ "input": { "instillUIOrder": 0, "properties": { - "collection-name":{ + "collection-name": { "description": "The name of the collection to upsert the object into", "instillAcceptFormats": [ "string" @@ -259,7 +260,8 @@ "metadata": { "description": "The vector metadata properties", "instillAcceptFormats": [ - "semi-structured/*", "object" + "semi-structured/*", + "object" ], "instillUIOrder": 3, "instillUpstreamTypes": [ @@ -269,7 +271,7 @@ ], "title": "Metadata", "type": "object", - "required":[] + "required": [] } }, "required": [ @@ -298,12 +300,12 @@ "type": "object" } }, - "TASK_BATCH_INSERT":{ + "TASK_BATCH_INSERT": { "instillShortDescription": "Insert multiple vector objects into a collection", "input": { "instillUIOrder": 0, "properties": { - "collection-name":{ + "collection-name": { "description": "The name of the collection to upsert the object into", "instillAcceptFormats": [ "string" @@ -330,7 +332,7 @@ ], "items": { "description": "An id of the object", - "type":"string", + "type": "string", "example": 1 }, "minItems": 1, @@ -340,7 +342,10 @@ "array-metadata": { "description": "The array of vector metadata properties", "instillAcceptFormats": [ - "array:semi-structured/*","array:semi-structured/json","array:semi-structured/object", "array:object" + "array:semi-structured/*", + "array:semi-structured/json", + "array:semi-structured/object", + "array:object" ], "instillShortDescription": "The vector metadata properties", "instillUIOrder": 2, @@ -356,7 +361,7 @@ "description": "The vector metadata properties", "title": "Metadatum", "type": "object", - "required":[] + "required": [] } }, "array-vector": { @@ -373,7 +378,7 @@ "items": { "description": "An array of dimensions for the vector value", "type": "array", - "instillAcceptFormats":[ + "instillAcceptFormats": [ "array:number", "array:integer" ], @@ -414,12 +419,12 @@ "type": "object" } }, - "TASK_DELETE":{ + "TASK_DELETE": { "instillShortDescription": "Delete vector objects from a collection", "input": { "instillUIOrder": 0, "properties": { - "collection-name":{ + "collection-name": { "description": "The name of the collection to delete the object from", "instillAcceptFormats": [ "string" @@ -447,10 +452,11 @@ "title": "ID", "type": "string" }, - "filter":{ + "filter": { "description": "The properties filter to be applied to the data with GraphQL queries, which starts with WHERE field, please refer to https://weaviate.io/developers/weaviate/search/filters", "instillAcceptFormats": [ - "semi-structured/*", "object" + "semi-structured/*", + "object" ], "instillUIOrder": 2, "instillUpstreamTypes": [ @@ -460,7 +466,7 @@ ], "title": "Filter", "type": "object", - "required":[] + "required": [] } }, "required": [ @@ -491,12 +497,12 @@ "type": "object" } }, - "TASK_UPDATE":{ + "TASK_UPDATE": { "instillShortDescription": "Update vector object in a collection", "input": { "instillUIOrder": 0, "properties": { - "collection-name":{ + "collection-name": { "description": "The name of the collection to update the object in", "instillAcceptFormats": [ "string" @@ -524,7 +530,7 @@ "title": "ID", "type": "string" }, - "update-vector":{ + "update-vector": { "description": "The updated vector value, optional", "instillAcceptFormats": [ "array:number", @@ -548,7 +554,8 @@ "update-metadata": { "description": "The updated vector metadata properties, optional", "instillAcceptFormats": [ - "semi-structured/*", "object" + "semi-structured/*", + "object" ], "instillUIOrder": 3, "instillUpstreamTypes": [ @@ -558,14 +565,14 @@ ], "title": "Update Metadata", "type": "object", - "required":[] + "required": [] } }, "required": [ "collection-name", "id" ], - "instillEditOnNodeFields":[ + "instillEditOnNodeFields": [ "collection-name", "id", "update-vector", @@ -592,12 +599,12 @@ "type": "object" } }, - "TASK_DELETE_COLLECTION":{ + "TASK_DELETE_COLLECTION": { "instillShortDescription": "Delete a collection", "input": { "instillUIOrder": 0, "properties": { - "collection-name":{ + "collection-name": { "description": "The name of the collection to delete", "instillAcceptFormats": [ "string"