diff --git a/pkg/component/CONTRIBUTING.md b/pkg/component/CONTRIBUTING.md index 651ddffd6..a2c92ca50 100644 --- a/pkg/component/CONTRIBUTING.md +++ b/pkg/component/CONTRIBUTING.md @@ -80,9 +80,6 @@ component. "type": "COMPONENT_TYPE_OPERATOR", "description": "'Hello, world' operator used as a template for adding components", "spec": {}, - "availableTasks": [ - "TASK_GREET" - ], "documentationUrl": "https://www.instill.tech/docs/component/operator/hello", "icon": "assets/hello.svg", "version": "0.1.0", @@ -103,10 +100,6 @@ This file defines the component properties: - **`spec`** contains the parameters required to configure the component and that are independent from its tasks. E.g., the API token of a vendor. In general, only AI, data or application components need such parameters. -- **`availableTasks`** defines the tasks the component can perform. - - When a component is created in a pipeline, one of the tasks has to be - selected, i.e., a configured component can only execute one task. - - Task configurations are defined in `tasks.json`. - **`documentationUrl`** points to the official documentation of the component. - **`icon`** is the local path to the icon that will be displayed in the console when creating the component. If left blank, a placeholder icon will be shown. diff --git a/pkg/component/ai/anthropic/v0/config/definition.yaml b/pkg/component/ai/anthropic/v0/config/definition.yaml index 4350ae2d2..afcdc4057 100644 --- a/pkg/component/ai/anthropic/v0/config/definition.yaml +++ b/pkg/component/ai/anthropic/v0/config/definition.yaml @@ -1,5 +1,3 @@ -availableTasks: -- TASK_TEXT_GENERATION_CHAT custom: false documentationUrl: https://www.instill.tech/docs/component/ai/anthropic icon: assets/anthropic.svg diff --git a/pkg/component/ai/cohere/v0/README.mdx b/pkg/component/ai/cohere/v0/README.mdx index 2142e3c88..43119c275 100644 --- a/pkg/component/ai/cohere/v0/README.mdx +++ b/pkg/component/ai/cohere/v0/README.mdx @@ -7,8 +7,8 @@ description: "Learn about how to set up a VDP Cohere component https://github.co The Cohere component is an AI component that allows users to connect the AI models served on the Cohere Platform. It can carry out the following tasks: -- [Text Generation Chat](#text-generation-chat) - [Text Embeddings](#text-embeddings) +- [Text Generation Chat](#text-generation-chat) - [Text Reranking](#text-reranking) @@ -50,6 +50,48 @@ ${connection.}`. ## Supported Tasks +### Text Embeddings + +An embedding is a list of floating point numbers that captures semantic information about the text that it represents. + +
+ +| Input | Field ID | Format | Description | +| :--- | :--- | :--- | :--- | +| Task ID (required) | `task` | string | `TASK_TEXT_EMBEDDINGS` | +| Embedding Type (required) | `embedding-type` | string | Specifies the return type of embedding, Note that 'binary'/'ubinary' options means the component will return packed unsigned binary embeddings. The length of each binary embedding is 1/8 the length of the float embeddings of the provided model.
Enum values
  • `float`
  • `int8`
  • `uint8`
  • `binary`
  • `ubinary`
| +| Input Type (required) | `input-type` | string | Specifies the type of input passed to the model.
Enum values
  • `search_document`
  • `search_query`
  • `classification`
  • `clustering`
| +| Model Name (required) | `model-name` | string | The Cohere embed model to be used.
Enum values
  • `embed-english-v3.0`
  • `embed-multilingual-v3.0`
  • `embed-english-light-v3.0`
  • `embed-multilingual-light-v3.0`
| +| Text (required) | `text` | string | The text. | +
+ + + + + + +
+ +| Output | Field ID | Format | Description | +| :--- | :--- | :--- | :--- | +| Embedding | `embedding` | array[number] | Embedding of the input text. | +| [Usage](#text-embeddings-usage) (optional) | `usage` | object | Token usage on the Cohere platform embed models. | +
+ +
+ Output Objects in Text Embeddings + +

Usage

+ +
+ +| Field | Field ID | Format | Note | +| :--- | :--- | :--- | :--- | +| Token Count | `tokens` | number | The token count used by Cohere Models. | +
+
+ + ### Text Generation Chat Cohere'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 “program” a large language model model, usually by providing instructions or some examples of how to successfully complete a task. @@ -147,48 +189,6 @@ The image URL. -### Text Embeddings - -An embedding is a list of floating point numbers that captures semantic information about the text that it represents. - -
- -| Input | Field ID | Format | Description | -| :--- | :--- | :--- | :--- | -| Task ID (required) | `task` | string | `TASK_TEXT_EMBEDDINGS` | -| Embedding Type (required) | `embedding-type` | string | Specifies the return type of embedding, Note that 'binary'/'ubinary' options means the component will return packed unsigned binary embeddings. The length of each binary embedding is 1/8 the length of the float embeddings of the provided model.
Enum values
  • `float`
  • `int8`
  • `uint8`
  • `binary`
  • `ubinary`
| -| Input Type (required) | `input-type` | string | Specifies the type of input passed to the model.
Enum values
  • `search_document`
  • `search_query`
  • `classification`
  • `clustering`
| -| Model Name (required) | `model-name` | string | The Cohere embed model to be used.
Enum values
  • `embed-english-v3.0`
  • `embed-multilingual-v3.0`
  • `embed-english-light-v3.0`
  • `embed-multilingual-light-v3.0`
| -| Text (required) | `text` | string | The text. | -
- - - - - - -
- -| Output | Field ID | Format | Description | -| :--- | :--- | :--- | :--- | -| Embedding | `embedding` | array[number] | Embedding of the input text. | -| [Usage](#text-embeddings-usage) (optional) | `usage` | object | Token usage on the Cohere platform embed models. | -
- -
- Output Objects in Text Embeddings - -

Usage

- -
- -| Field | Field ID | Format | Note | -| :--- | :--- | :--- | :--- | -| Token Count | `tokens` | number | The token count used by Cohere Models. | -
-
- - ### Text Reranking Rerank models sort text inputs by semantic relevance to a specified query. They are often used to sort search results returned from an existing search solution. diff --git a/pkg/component/ai/cohere/v0/config/definition.yaml b/pkg/component/ai/cohere/v0/config/definition.yaml index d9d584eac..719485cbb 100644 --- a/pkg/component/ai/cohere/v0/config/definition.yaml +++ b/pkg/component/ai/cohere/v0/config/definition.yaml @@ -1,7 +1,3 @@ -availableTasks: -- TASK_TEXT_GENERATION_CHAT -- TASK_TEXT_EMBEDDINGS -- TASK_TEXT_RERANKING documentationUrl: https://www.instill.tech/docs/component/ai/cohere icon: assets/cohere.svg id: cohere diff --git a/pkg/component/ai/fireworksai/v0/README.mdx b/pkg/component/ai/fireworksai/v0/README.mdx index 701222808..9536c987d 100644 --- a/pkg/component/ai/fireworksai/v0/README.mdx +++ b/pkg/component/ai/fireworksai/v0/README.mdx @@ -7,8 +7,8 @@ description: "Learn about how to set up a VDP Fireworks AI component https://git The Fireworks AI component is an AI component that allows users to connect the AI models served on the Fireworks AI Platform. It can carry out the following tasks: -- [Text Generation Chat](#text-generation-chat) - [Text Embeddings](#text-embeddings) +- [Text Generation Chat](#text-generation-chat) @@ -49,6 +49,46 @@ ${connection.}`. ## Supported Tasks +### Text Embeddings + +An embedding is a list of floating point numbers that captures semantic information about the text that it represents. + +
+ +| Input | Field ID | Format | Description | +| :--- | :--- | :--- | :--- | +| Task ID (required) | `task` | string | `TASK_TEXT_EMBEDDINGS` | +| Model Name (required) | `model` | string | The OSS embedding model to be used.
Enum values
  • `nomic-ai/nomic-embed-text-v1.5`
  • `nomic-ai/nomic-embed-text-v1`
  • `WhereIsAI/UAE-Large-V1`
  • `thenlper/gte-large`
  • `thenlper/gte-base`
| +| Text (required) | `text` | string | The text. | +
+ + + + + + +
+ +| Output | Field ID | Format | Description | +| :--- | :--- | :--- | :--- | +| Embedding | `embedding` | array[number] | Embedding of the input text. | +| [Usage](#text-embeddings-usage) (optional) | `usage` | object | Token usage on the Fireworks AI platform embedding models. | +
+ +
+ Output Objects in Text Embeddings + +

Usage

+ +
+ +| Field | Field ID | Format | Note | +| :--- | :--- | :--- | :--- | +| Token Count | `tokens` | number | The token count used by Fireworks AI models. | +
+
+ + ### Text Generation Chat Fireworks AI'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 “program” a large language model model, usually by providing instructions or some examples of how to successfully complete a task. @@ -134,46 +174,6 @@ The image URL. -### Text Embeddings - -An embedding is a list of floating point numbers that captures semantic information about the text that it represents. - -
- -| Input | Field ID | Format | Description | -| :--- | :--- | :--- | :--- | -| Task ID (required) | `task` | string | `TASK_TEXT_EMBEDDINGS` | -| Model Name (required) | `model` | string | The OSS embedding model to be used.
Enum values
  • `nomic-ai/nomic-embed-text-v1.5`
  • `nomic-ai/nomic-embed-text-v1`
  • `WhereIsAI/UAE-Large-V1`
  • `thenlper/gte-large`
  • `thenlper/gte-base`
| -| Text (required) | `text` | string | The text. | -
- - - - - - -
- -| Output | Field ID | Format | Description | -| :--- | :--- | :--- | :--- | -| Embedding | `embedding` | array[number] | Embedding of the input text. | -| [Usage](#text-embeddings-usage) (optional) | `usage` | object | Token usage on the Fireworks AI platform embedding models. | -
- -
- Output Objects in Text Embeddings - -

Usage

- -
- -| Field | Field ID | Format | Note | -| :--- | :--- | :--- | :--- | -| Token Count | `tokens` | number | The token count used by Fireworks AI models. | -
-
- - ## Example Recipes diff --git a/pkg/component/ai/fireworksai/v0/config/definition.yaml b/pkg/component/ai/fireworksai/v0/config/definition.yaml index 64497f886..9983dd222 100644 --- a/pkg/component/ai/fireworksai/v0/config/definition.yaml +++ b/pkg/component/ai/fireworksai/v0/config/definition.yaml @@ -1,6 +1,3 @@ -availableTasks: -- TASK_TEXT_GENERATION_CHAT -- TASK_TEXT_EMBEDDINGS custom: false documentationUrl: https://www.instill.tech/docs/component/ai/fireworks-ai icon: assets/fireworks-ai.svg diff --git a/pkg/component/ai/groq/v0/config/definition.yaml b/pkg/component/ai/groq/v0/config/definition.yaml index 46c5fb10f..dbb420a8a 100644 --- a/pkg/component/ai/groq/v0/config/definition.yaml +++ b/pkg/component/ai/groq/v0/config/definition.yaml @@ -1,5 +1,3 @@ -availableTasks: -- TASK_TEXT_GENERATION_CHAT documentationUrl: https://www.instill.tech/docs/component/ai/groq icon: assets/groq.svg id: groq diff --git a/pkg/component/ai/huggingface/v0/README.mdx b/pkg/component/ai/huggingface/v0/README.mdx index caac5a8d4..e02b08f79 100644 --- a/pkg/component/ai/huggingface/v0/README.mdx +++ b/pkg/component/ai/huggingface/v0/README.mdx @@ -7,23 +7,24 @@ description: "Learn about how to set up a VDP Hugging Face component https://git The Hugging Face component is an AI component that allows users to connect the AI models served on the Hugging Face Platform. It can carry out the following tasks: -- [Text Generation](#text-generation) +- [Audio Classification](#audio-classification) +- [Conversational](#conversational) - [Fill Mask](#fill-mask) +- [Image Classification](#image-classification) +- [Image Segmentation](#image-segmentation) +- [Image to Text](#image-to-text) +- [Object Detection](#object-detection) +- [Question Answering](#question-answering) +- [Sentence Similarity](#sentence-similarity) +- [Speech Recognition](#speech-recognition) - [Summarization](#summarization) +- [Table Question Answering](#table-question-answering) - [Text Classification](#text-classification) +- [Text Generation](#text-generation) +- [Text to Image](#text-to-image) - [Token Classification](#token-classification) - [Translation](#translation) - [Zero Shot Classification](#zero-shot-classification) -- [Question Answering](#question-answering) -- [Table Question Answering](#table-question-answering) -- [Sentence Similarity](#sentence-similarity) -- [Conversational](#conversational) -- [Image Classification](#image-classification) -- [Image Segmentation](#image-segmentation) -- [Object Detection](#object-detection) -- [Image to Text](#image-to-text) -- [Speech Recognition](#speech-recognition) -- [Audio Classification](#audio-classification) @@ -66,26 +67,78 @@ ${connection.}`. ## Supported Tasks -### Text Generation +### Audio Classification -Generating text is the task of producing new text. These models can, for example, fill in incomplete text or paraphrase. +Audio classification is the task of assigning a label or class to a given audio. It can be used for recognizing which command a user is giving or the emotion of a statement, as well as identifying a speaker.
| Input | Field ID | Format | Description | | :--- | :--- | :--- | :--- | -| Task ID (required) | `task` | string | `TASK_TEXT_GENERATION` | +| Task ID (required) | `task` | string | `TASK_AUDIO_CLASSIFICATION` | | Model (required) | `model` | string | The Hugging Face model to be used. | -| String Input (required) | `inputs` | string | String input. | -| [Parameters](#text-generation-parameters) | `parameters` | object | Parameters. | -| [Options](#text-generation-options) | `options` | object | Options for the model. | +| Audio (required) | `audio` | string | The audio file. |
+ + + + +
+ +| Output | Field ID | Format | Description | +| :--- | :--- | :--- | :--- | +| [Classes](#audio-classification-classes) | `classes` | array[object] | Classes. | +
+
- Input Objects in Text Generation + Output Objects in Audio Classification -

Parameters

+

Classes

+ +
+ +| Field | Field ID | Format | Note | +| :--- | :--- | :--- | :--- | +| Label | `label` | string | The label for the class (model specific). | +| Score | `score` | number | A float that represents how likely it is that the audio file belongs to this class. | +
+
+ + +### Conversational + +Conversational response modelling is the task of generating conversational text that is relevant, coherent and knowledgable given a prompt. These models have applications in chatbots, and as a part of voice assistants. + +
+ +| Input | Field ID | Format | Description | +| :--- | :--- | :--- | :--- | +| Task ID (required) | `task` | string | `TASK_CONVERSATIONAL` | +| Model (required) | `model` | string | The Hugging Face model to be used. | +| [Inputs](#conversational-inputs) (required) | `inputs` | object | Inputs. | +| [Parameters](#conversational-parameters) | `parameters` | object | Parameters. | +| [Options](#conversational-options) | `options` | object | Options for the model. | +
+ + +
+ Input Objects in Conversational + +

Inputs

+ +Inputs. + +
+ +| Field | Field ID | Format | Note | +| :--- | :--- | :--- | :--- | +| Generated Responses | `generated-responses` | array | A list of strings corresponding to the earlier replies from the model. | +| Past User Inputs | `past-user-inputs` | array | A list of strings corresponding to the earlier replies from the user. Should be of the same length of generated-responses. | +| Text | `text` | string | The last input from the user in the conversation. | +
+

Parameters

Parameters. @@ -93,17 +146,15 @@ Parameters. | Field | Field ID | Format | Note | | :--- | :--- | :--- | :--- | -| Do Sample | `do-sample` | boolean | Whether or not to use sampling, use greedy decoding otherwise. | -| Max New Tokens | `max-new-tokens` | integer | The amount of new tokens to be generated, this does not include the input length it is a estimate of the size of generated text you want. Each new tokens slows down the request, so look for balance between response times and length of text generated. | -| Max Time | `max-time` | number | The amount of time in seconds that the query should take maximum. Network can cause some overhead so it will be a soft limit. Use that in combination with max-new-tokens for best results. | -| Num Return Sequences | `num-return-sequences` | integer | The number of proposition you want to be returned. | +| Max Length | `max-length` | integer | Integer to define the maximum length in tokens of the output summary. | +| Max Time | `max-time` | number | The amount of time in seconds that the query should take maximum. Network can cause some overhead so it will be a soft limit. | +| Min Length | `min-length` | integer | Integer to define the minimum length in tokens of the output summary. | | Repetition Penalty | `repetition-penalty` | number | The more a token is used within generation the more it is penalized to not be picked in successive generation passes. | -| Return Full Text | `return-full-text` | boolean | If set to False, the return results will not contain the original query making it easier for prompting. | | Temperature | `temperature` | number | The temperature of the sampling operation. 1 means regular sampling, 0 means always take the highest score, 100.0 is getting closer to uniform probability. | | Top K | `top-k` | integer | Integer to define the top tokens considered within the sample operation to create new text. | | Top P | `top-p` | number | Float to define the tokens that are within the sample operation of text generation. Add tokens in the sample for more probable to least probable until the sum of the probabilities is greater than top-p. | -

Options

+

Options

Options for the model. @@ -122,8 +173,23 @@ Options for the model. | Output | Field ID | Format | Description | | :--- | :--- | :--- | :--- | -| Generated Text | `generated-text` | string | The continuated string. | +| [Conversation](#conversational-conversation) (optional) | `conversation` | object | A facility dictionary to send back for the next input (with the new user input addition). | +| Generated Text | `generated-text` | string | The answer of the bot. | + + +
+ Output Objects in Conversational + +

Conversation

+ +
+ +| Field | Field ID | Format | Note | +| :--- | :--- | :--- | :--- | +| Generated Responses | `generated-responses` | array | List of strings. The last outputs from the model in the conversation, after the model has run. | +| Past User Inputs | `past-user-inputs` | array | List of strings. The last inputs from the user in the conversation, after the model has run. |
+
### Fill Mask @@ -183,94 +249,61 @@ Options for the model.
-### Summarization +### Image Classification -Summarization is the task of producing a shorter version of a document while preserving its important information. Some models can extract text from the original input, while other models can generate entirely new text. +Image classification is the task of assigning a label or class to an entire image. Images are expected to have only one class for each image. Image classification models take an image as input and return a prediction about which class the image belongs to.
| Input | Field ID | Format | Description | | :--- | :--- | :--- | :--- | -| Task ID (required) | `task` | string | `TASK_SUMMARIZATION` | +| Task ID (required) | `task` | string | `TASK_IMAGE_CLASSIFICATION` | | Model (required) | `model` | string | The Hugging Face model to be used. | -| String Input (required) | `inputs` | string | String input. | -| [Parameters](#summarization-parameters) | `parameters` | object | Parameters. | -| [Options](#summarization-options) | `options` | object | Options for the model. | +| Image (required) | `image` | string | The image file. |
-
- Input Objects in Summarization - -

Parameters

- -Parameters. -
-| Field | Field ID | Format | Note | -| :--- | :--- | :--- | :--- | -| Max Length | `max-length` | integer | Integer to define the maximum length in tokens of the output summary. | -| Max Time | `max-time` | number | The amount of time in seconds that the query should take maximum. Network can cause some overhead so it will be a soft limit. | -| Min Length | `min-length` | integer | Integer to define the minimum length in tokens of the output summary. | -| Repetition Penalty | `repetition-penalty` | number | The more a token is used within generation the more it is penalized to not be picked in successive generation passes. | -| Temperature | `temperature` | number | The temperature of the sampling operation. 1 means regular sampling, 0 means always take the highest score, 100.0 is getting closer to uniform probability. | -| Top K | `top-k` | integer | Integer to define the top tokens considered within the sample operation to create new text. | -| Top P | `top-p` | number | Float to define the tokens that are within the sample operation of text generation. Add tokens in the sample for more probable to least probable until the sum of the probabilities is greater than top-p. | -
-

Options

-Options for the model.
-| Field | Field ID | Format | Note | +| Output | Field ID | Format | Description | | :--- | :--- | :--- | :--- | -| Use Cache | `use-cache` | boolean | There is a cache layer on the inference API to speedup requests we have already seen. Most models can use those results as is as models are deterministic (meaning the results will be the same anyway). However if you use a non deterministic model, you can set this parameter to prevent the caching mechanism from being used resulting in a real new query. | -| Wait For Model | `wait-for-model` | boolean | If the model is not ready, wait for it instead of receiving 503. It limits the number of requests required to get your inference done. It is advised to only set this flag to true after receiving a 503 error as it will limit hanging in your application to known places. | +| [Classes](#image-classification-classes) | `classes` | array[object] | Classes. |
-
+
+ Output Objects in Image Classification +

Classes

-| Output | Field ID | Format | Description | +| Field | Field ID | Format | Note | | :--- | :--- | :--- | :--- | -| Summary Text | `summary-text` | string | The string after summarization. | +| Label | `label` | string | The label for the class (model specific). | +| Score | `score` | number | A float that represents how likely it is that the image file belongs to this class. |
+
-### Text Classification +### Image Segmentation -Text Classification is the task of assigning a label or class to a given text. Some use cases are sentiment analysis, natural language inference, and assessing grammatical correctness. +Image Segmentation divides an image into segments where each pixel in the image is mapped to an object. This task has multiple variants such as instance segmentation, panoptic segmentation and semantic segmentation.
| Input | Field ID | Format | Description | | :--- | :--- | :--- | :--- | -| Task ID (required) | `task` | string | `TASK_TEXT_CLASSIFICATION` | +| Task ID (required) | `task` | string | `TASK_IMAGE_SEGMENTATION` | | Model (required) | `model` | string | The Hugging Face model to be used. | -| String Input (required) | `inputs` | string | String input. | -| [Options](#text-classification-options) | `options` | object | Options for the model. | +| Image (required) | `image` | string | The image file. |
-
- Input Objects in Text Classification - -

Options

- -Options for the model. - -
-| Field | Field ID | Format | Note | -| :--- | :--- | :--- | :--- | -| Use Cache | `use-cache` | boolean | There is a cache layer on the inference API to speedup requests we have already seen. Most models can use those results as is as models are deterministic (meaning the results will be the same anyway). However if you use a non deterministic model, you can set this parameter to prevent the caching mechanism from being used resulting in a real new query. | -| Wait For Model | `wait-for-model` | boolean | If the model is not ready, wait for it instead of receiving 503. It limits the number of requests required to get your inference done. It is advised to only set this flag to true after receiving a 503 error as it will limit hanging in your application to known places. | -
-
@@ -278,70 +311,66 @@ Options for the model. | Output | Field ID | Format | Description | | :--- | :--- | :--- | :--- | -| [Results](#text-classification-results) | `results` | array[object] | Results. | +| [Segments](#image-segmentation-segments) | `segments` | array[object] | Segments. |
- Output Objects in Text Classification + Output Objects in Image Segmentation -

Results

+

Segments

| Field | Field ID | Format | Note | | :--- | :--- | :--- | :--- | -| Label | `label` | string | The label for the class (model specific). | -| Score | `score` | number | A floats that represents how likely is that the text belongs the this class. | +| Label | `label` | string | The label for the class (model specific) of a segment. | +| Mask | `mask` | image/png | A str (base64 str of a single channel black-and-white img) representing the mask of a segment. | +| Score | `score` | number | A float that represents how likely it is that the segment belongs to the given class. |
-### Token Classification +### Image to Text -Token classification is a natural language understanding task in which a label is assigned to some tokens in a text. Some popular token classification subtasks are Named Entity Recognition (NER) and Part-of-Speech (PoS) tagging. NER models could be trained to identify specific entities in a text, such as dates, individuals and places; and PoS tagging would identify, for example, which words in a text are verbs, nouns, and punctuation marks. +Image to text models output a text from a given image. Image captioning or optical character recognition can be considered as the most common applications of image to text.
| Input | Field ID | Format | Description | | :--- | :--- | :--- | :--- | -| Task ID (required) | `task` | string | `TASK_TOKEN_CLASSIFICATION` | +| Task ID (required) | `task` | string | `TASK_IMAGE_TO_TEXT` | | Model (required) | `model` | string | The Hugging Face model to be used. | -| String Input (required) | `inputs` | string | String input. | -| [Parameters](#token-classification-parameters) | `parameters` | object | Parameters. | -| [Options](#token-classification-options) | `options` | object | Options for the model. | +| Image (required) | `image` | string | The image file. |
-
- Input Objects in Token Classification -

Parameters

-Parameters. +
-| Field | Field ID | Format | Note | +| Output | Field ID | Format | Description | | :--- | :--- | :--- | :--- | -| Aggregation Strategy | `aggregation-strategy` | string | There are several aggregation strategies: -none: Every token gets classified without further aggregation. -simple: Entities are grouped according to the default schema (B-, I- tags get merged when the tag is similar). -first: Same as the simple strategy except words cannot end up with different tags. Words will use the tag of the first token when there is ambiguity. -average: Same as the simple strategy except words cannot end up with different tags. Scores are averaged across tokens and then the maximum label is applied. -max: Same as the simple strategy except words cannot end up with different tags. Word entity will be the token with the maximum score. | +| Text | `text` | string | Generated text. |
-

Options

-Options for the model. + +### Object Detection + +Object Detection models allow users to identify objects of certain defined classes. Object detection models receive an image as input and output the images with bounding boxes and labels on detected objects.
-| Field | Field ID | Format | Note | +| Input | Field ID | Format | Description | | :--- | :--- | :--- | :--- | -| Use Cache | `use-cache` | boolean | There is a cache layer on the inference API to speedup requests we have already seen. Most models can use those results as is as models are deterministic (meaning the results will be the same anyway). However if you use a non deterministic model, you can set this parameter to prevent the caching mechanism from being used resulting in a real new query. | -| Wait For Model | `wait-for-model` | boolean | If the model is not ready, wait for it instead of receiving 503. It limits the number of requests required to get your inference done. It is advised to only set this flag to true after receiving a 503 error as it will limit hanging in your application to known places. | +| Task ID (required) | `task` | string | `TASK_OBJECT_DETECTION` | +| Model (required) | `model` | string | The Hugging Face model to be used. | +| Image (required) | `image` | string | The image file. |
-
+ + + @@ -349,46 +378,67 @@ Options for the model. | Output | Field ID | Format | Description | | :--- | :--- | :--- | :--- | -| [Results](#token-classification-results) | `results` | array[object] | Results. | +| [Objects](#object-detection-objects) | `objects` | array[object] | Objects. |
- Output Objects in Token Classification + Output Objects in Object Detection -

Results

+

Objects

| Field | Field ID | Format | Note | | :--- | :--- | :--- | :--- | -| End | `end` | integer | The offset stringwise where the answer is located. Useful to disambiguate if word occurs multiple times. | -| Entity Group | `entity-group` | string | The type for the entity being recognized (model specific). | -| Score | `score` | number | How likely the entity was recognized. | -| Start | `start` | integer | The offset stringwise where the answer is located. Useful to disambiguate if word occurs multiple times. | -| Word | `word` | string | The string that was captured. | +| [Box](#object-detection-box) | `box` | object | A dict (with keys [xmin,ymin,xmax,ymax]) representing the bounding box of a detected object. | +| Label | `label` | string | The label for the class (model specific) of a detected object. | +| Score | `score` | number | A float that represents how likely it is that the detected object belongs to the given class. |
-
- -### Translation - -Translation is the task of converting text from one language to another. +

Box

+ +
+ +| Field | Field ID | Format | Note | +| :--- | :--- | :--- | :--- | +| X Max | `xmax` | number | X max. | +| X Min | `xmin` | number | X min. | +| Y Max | `ymax` | number | Y Max. | +| Y min | `ymin` | number | Y min. | +
+ + + +### Question Answering + +Question Answering models can retrieve the answer to a question from a given text, which is useful for searching for an answer in a document. Some question answering models can generate answers without context!.
| Input | Field ID | Format | Description | | :--- | :--- | :--- | :--- | -| Task ID (required) | `task` | string | `TASK_TRANSLATION` | +| Task ID (required) | `task` | string | `TASK_QUESTION_ANSWERING` | | Model (required) | `model` | string | The Hugging Face model to be used. | -| String Input (required) | `inputs` | string | String input. | -| [Options](#translation-options) | `options` | object | Options for the model. | +| [Inputs](#question-answering-inputs) (required) | `inputs` | object | Inputs. | +| [Options](#question-answering-options) | `options` | object | Options for the model. |
- Input Objects in Translation + Input Objects in Question Answering -

Options

+

Inputs

+ +Inputs. + +
+ +| Field | Field ID | Format | Note | +| :--- | :--- | :--- | :--- | +| Context | `context` | string | The context for answering the question. | +| Question | `question` | string | The question. | +
+

Options

Options for the model. @@ -407,41 +457,43 @@ Options for the model. | Output | Field ID | Format | Description | | :--- | :--- | :--- | :--- | -| Translation Text | `translation-text` | string | The string after translation. | +| Answer | `answer` | string | A string that’s the answer within the text. | +| Stop (optional) | `stop` | integer | The index (string wise) of the stop of the answer within context. | +| Score (optional) | `score` | number | A float that represents how likely that the answer is correct. | +| Start (optional) | `start` | integer | The index (string wise) of the start of the answer within context. | -### Zero Shot Classification +### Sentence Similarity -Zero-shot text classification is a task in natural language processing where a model is trained on a set of labeled examples but is then able to classify new examples from previously unseen classes. +Sentence Similarity is the task of determining how similar two texts are. Sentence similarity models convert input texts into vectors (embeddings) that capture semantic information and calculate how close (similar) they are between them. This task is particularly useful for information retrieval and clustering/grouping.
| Input | Field ID | Format | Description | | :--- | :--- | :--- | :--- | -| Task ID (required) | `task` | string | `TASK_ZERO_SHOT_CLASSIFICATION` | +| Task ID (required) | `task` | string | `TASK_SENTENCE_SIMILARITY` | | Model (required) | `model` | string | The Hugging Face model to be used. | -| String Input (required) | `inputs` | string | String input. | -| [Parameters](#zero-shot-classification-parameters) | `parameters` | object | Parameters. | -| [Options](#zero-shot-classification-options) | `options` | object | Options for the model. | +| [Inputs](#sentence-similarity-inputs) (required) | `inputs` | object | Inputs. | +| [Options](#sentence-similarity-options) | `options` | object | Options for the model. |
- Input Objects in Zero Shot Classification + Input Objects in Sentence Similarity -

Parameters

+

Inputs

-Parameters. +Inputs.
| Field | Field ID | Format | Note | | :--- | :--- | :--- | :--- | -| Candidate Labels | `candidate-labels` | array | a list of strings that are potential classes for inputs. (max 10 candidate-labels, for more, simply run multiple requests, results are going to be misleading if using too many candidate-labels anyway. If you want to keep the exact same, you can simply run multi-label=True and do the scaling on your end. ). | -| Multi Label | `multi-label` | boolean | Boolean that is set to True if classes can overlap. | +| Sentences | `sentences` | array | A list of strings which will be compared against the source-sentence. | +| Source Sentence | `source-sentence` | string | The string that you wish to compare the other strings with. This can be a phrase, sentence, or longer passage, depending on the model being used. |
-

Options

+

Options

Options for the model. @@ -460,42 +512,72 @@ Options for the model. | Output | Field ID | Format | Description | | :--- | :--- | :--- | :--- | -| Scores | `scores` | array[number] | a list of floats that correspond the the probability of label, in the same order as labels. | -| Labels | `labels` | array[string] | The list of strings for labels that you sent (in order). | -| Sequence (optional) | `sequence` | string | The string sent as an input. | +| Scores | `scores` | array[number] | The associated similarity score for each of the given strings. | -### Question Answering +### Speech Recognition -Question Answering models can retrieve the answer to a question from a given text, which is useful for searching for an answer in a document. Some question answering models can generate answers without context!. +Automatic Speech Recognition (ASR), also known as Speech to Text (STT), is the task of transcribing a given audio to text. It has many applications, such as voice user interfaces.
| Input | Field ID | Format | Description | | :--- | :--- | :--- | :--- | -| Task ID (required) | `task` | string | `TASK_QUESTION_ANSWERING` | +| Task ID (required) | `task` | string | `TASK_SPEECH_RECOGNITION` | | Model (required) | `model` | string | The Hugging Face model to be used. | -| [Inputs](#question-answering-inputs) (required) | `inputs` | object | Inputs. | -| [Options](#question-answering-options) | `options` | object | Options for the model. | +| Audio (required) | `audio` | string | The audio file. | +
+ + + + + + +
+ +| Output | Field ID | Format | Description | +| :--- | :--- | :--- | :--- | +| Text | `text` | string | The string that was recognized within the audio file. | +
+ + +### Summarization + +Summarization is the task of producing a shorter version of a document while preserving its important information. Some models can extract text from the original input, while other models can generate entirely new text. + +
+ +| Input | Field ID | Format | Description | +| :--- | :--- | :--- | :--- | +| Task ID (required) | `task` | string | `TASK_SUMMARIZATION` | +| Model (required) | `model` | string | The Hugging Face model to be used. | +| String Input (required) | `inputs` | string | String input. | +| [Parameters](#summarization-parameters) | `parameters` | object | Parameters. | +| [Options](#summarization-options) | `options` | object | Options for the model. |
- Input Objects in Question Answering + Input Objects in Summarization -

Inputs

+

Parameters

-Inputs. +Parameters.
| Field | Field ID | Format | Note | | :--- | :--- | :--- | :--- | -| Context | `context` | string | The context for answering the question. | -| Question | `question` | string | The question. | +| Max Length | `max-length` | integer | Integer to define the maximum length in tokens of the output summary. | +| Max Time | `max-time` | number | The amount of time in seconds that the query should take maximum. Network can cause some overhead so it will be a soft limit. | +| Min Length | `min-length` | integer | Integer to define the minimum length in tokens of the output summary. | +| Repetition Penalty | `repetition-penalty` | number | The more a token is used within generation the more it is penalized to not be picked in successive generation passes. | +| Temperature | `temperature` | number | The temperature of the sampling operation. 1 means regular sampling, 0 means always take the highest score, 100.0 is getting closer to uniform probability. | +| Top K | `top-k` | integer | Integer to define the top tokens considered within the sample operation to create new text. | +| Top P | `top-p` | number | Float to define the tokens that are within the sample operation of text generation. Add tokens in the sample for more probable to least probable until the sum of the probabilities is greater than top-p. |
-

Options

+

Options

Options for the model. @@ -514,10 +596,7 @@ Options for the model. | Output | Field ID | Format | Description | | :--- | :--- | :--- | :--- | -| Answer | `answer` | string | A string that’s the answer within the text. | -| Stop (optional) | `stop` | integer | The index (string wise) of the stop of the answer within context. | -| Score (optional) | `score` | number | A float that represents how likely that the answer is correct. | -| Start (optional) | `start` | integer | The index (string wise) of the start of the answer within context. | +| Summary Text | `summary-text` | string | The string after summarization. | @@ -576,36 +655,25 @@ Options for the model. -### Sentence Similarity +### Text Classification -Sentence Similarity is the task of determining how similar two texts are. Sentence similarity models convert input texts into vectors (embeddings) that capture semantic information and calculate how close (similar) they are between them. This task is particularly useful for information retrieval and clustering/grouping. +Text Classification is the task of assigning a label or class to a given text. Some use cases are sentiment analysis, natural language inference, and assessing grammatical correctness.
| Input | Field ID | Format | Description | | :--- | :--- | :--- | :--- | -| Task ID (required) | `task` | string | `TASK_SENTENCE_SIMILARITY` | +| Task ID (required) | `task` | string | `TASK_TEXT_CLASSIFICATION` | | Model (required) | `model` | string | The Hugging Face model to be used. | -| [Inputs](#sentence-similarity-inputs) (required) | `inputs` | object | Inputs. | -| [Options](#sentence-similarity-options) | `options` | object | Options for the model. | +| String Input (required) | `inputs` | string | String input. | +| [Options](#text-classification-options) | `options` | object | Options for the model. |
- Input Objects in Sentence Similarity - -

Inputs

- -Inputs. - -
+ Input Objects in Text Classification -| Field | Field ID | Format | Note | -| :--- | :--- | :--- | :--- | -| Sentences | `sentences` | array | A list of strings which will be compared against the source-sentence. | -| Source Sentence | `source-sentence` | string | The string that you wish to compare the other strings with. This can be a phrase, sentence, or longer passage, depending on the model being used. | -
-

Options

+

Options

Options for the model. @@ -624,42 +692,44 @@ Options for the model. | Output | Field ID | Format | Description | | :--- | :--- | :--- | :--- | -| Scores | `scores` | array[number] | The associated similarity score for each of the given strings. | +| [Results](#text-classification-results) | `results` | array[object] | Results. | +
+ Output Objects in Text Classification -### Conversational - -Conversational response modelling is the task of generating conversational text that is relevant, coherent and knowledgable given a prompt. These models have applications in chatbots, and as a part of voice assistants. +

Results

-| Input | Field ID | Format | Description | +| Field | Field ID | Format | Note | | :--- | :--- | :--- | :--- | -| Task ID (required) | `task` | string | `TASK_CONVERSATIONAL` | -| Model (required) | `model` | string | The Hugging Face model to be used. | -| [Inputs](#conversational-inputs) (required) | `inputs` | object | Inputs. | -| [Parameters](#conversational-parameters) | `parameters` | object | Parameters. | -| [Options](#conversational-options) | `options` | object | Options for the model. | +| Label | `label` | string | The label for the class (model specific). | +| Score | `score` | number | A floats that represents how likely is that the text belongs the this class. |
+
-
- Input Objects in Conversational - -

Inputs

+### Text Generation -Inputs. +Generating text is the task of producing new text. These models can, for example, fill in incomplete text or paraphrase.
-| Field | Field ID | Format | Note | +| Input | Field ID | Format | Description | | :--- | :--- | :--- | :--- | -| Generated Responses | `generated-responses` | array | A list of strings corresponding to the earlier replies from the model. | -| Past User Inputs | `past-user-inputs` | array | A list of strings corresponding to the earlier replies from the user. Should be of the same length of generated-responses. | -| Text | `text` | string | The last input from the user in the conversation. | +| Task ID (required) | `task` | string | `TASK_TEXT_GENERATION` | +| Model (required) | `model` | string | The Hugging Face model to be used. | +| String Input (required) | `inputs` | string | String input. | +| [Parameters](#text-generation-parameters) | `parameters` | object | Parameters. | +| [Options](#text-generation-options) | `options` | object | Options for the model. |
-

Parameters

+ + +
+ Input Objects in Text Generation + +

Parameters

Parameters. @@ -667,15 +737,17 @@ Parameters. | Field | Field ID | Format | Note | | :--- | :--- | :--- | :--- | -| Max Length | `max-length` | integer | Integer to define the maximum length in tokens of the output summary. | -| Max Time | `max-time` | number | The amount of time in seconds that the query should take maximum. Network can cause some overhead so it will be a soft limit. | -| Min Length | `min-length` | integer | Integer to define the minimum length in tokens of the output summary. | +| Do Sample | `do-sample` | boolean | Whether or not to use sampling, use greedy decoding otherwise. | +| Max New Tokens | `max-new-tokens` | integer | The amount of new tokens to be generated, this does not include the input length it is a estimate of the size of generated text you want. Each new tokens slows down the request, so look for balance between response times and length of text generated. | +| Max Time | `max-time` | number | The amount of time in seconds that the query should take maximum. Network can cause some overhead so it will be a soft limit. Use that in combination with max-new-tokens for best results. | +| Num Return Sequences | `num-return-sequences` | integer | The number of proposition you want to be returned. | | Repetition Penalty | `repetition-penalty` | number | The more a token is used within generation the more it is penalized to not be picked in successive generation passes. | +| Return Full Text | `return-full-text` | boolean | If set to False, the return results will not contain the original query making it easier for prompting. | | Temperature | `temperature` | number | The temperature of the sampling operation. 1 means regular sampling, 0 means always take the highest score, 100.0 is getting closer to uniform probability. | | Top K | `top-k` | integer | Integer to define the top tokens considered within the sample operation to create new text. | | Top P | `top-p` | number | Float to define the tokens that are within the sample operation of text generation. Add tokens in the sample for more probable to least probable until the sum of the probabilities is greater than top-p. | -

Options

+

Options

Options for the model. @@ -694,121 +766,112 @@ Options for the model. | Output | Field ID | Format | Description | | :--- | :--- | :--- | :--- | -| [Conversation](#conversational-conversation) (optional) | `conversation` | object | A facility dictionary to send back for the next input (with the new user input addition). | -| Generated Text | `generated-text` | string | The answer of the bot. | - - -
- Output Objects in Conversational - -

Conversation

- -
- -| Field | Field ID | Format | Note | -| :--- | :--- | :--- | :--- | -| Generated Responses | `generated-responses` | array | List of strings. The last outputs from the model in the conversation, after the model has run. | -| Past User Inputs | `past-user-inputs` | array | List of strings. The last inputs from the user in the conversation, after the model has run. | +| Generated Text | `generated-text` | string | The continuated string. |
-
-### Image Classification +### Text to Image -Image classification is the task of assigning a label or class to an entire image. Images are expected to have only one class for each image. Image classification models take an image as input and return a prediction about which class the image belongs to. +Generates images from input text. These models can be used to generate and modify images based on text prompts.
| Input | Field ID | Format | Description | | :--- | :--- | :--- | :--- | -| Task ID (required) | `task` | string | `TASK_IMAGE_CLASSIFICATION` | +| Task ID (required) | `task` | string | `TASK_TEXT_TO_IMAGE` | | Model (required) | `model` | string | The Hugging Face model to be used. | -| Image (required) | `image` | string | The image file. | +| String Input (required) | `inputs` | string | String input. | +| [Parameters](#text-to-image-parameters) | `parameters` | object | Parameters. | +| [Options](#text-to-image-options) | `options` | object | Options for the model. |
+
+ Input Objects in Text to Image +

Parameters

- +Parameters.
-| Output | Field ID | Format | Description | +| Field | Field ID | Format | Note | | :--- | :--- | :--- | :--- | -| [Classes](#image-classification-classes) | `classes` | array[object] | Classes. | +| Guidance Scale | `guidance-scale` | number | Guidance scale. | +| Height | `height` | integer | Image Height. | +| Negative Prompt | `negative-prompt` | string | Negative prompt for generating the image. | +| Num Inference Steps | `num-inference-steps` | integer | Number of inference steps. | +| Width | `width` | integer | Image width. |
+

Options

-
- Output Objects in Image Classification - -

Classes

+Options for the model.
| Field | Field ID | Format | Note | | :--- | :--- | :--- | :--- | -| Label | `label` | string | The label for the class (model specific). | -| Score | `score` | number | A float that represents how likely it is that the image file belongs to this class. | +| Use Cache | `use-cache` | boolean | There is a cache layer on the inference API to speedup requests we have already seen. Most models can use those results as is as models are deterministic (meaning the results will be the same anyway). However if you use a non deterministic model, you can set this parameter to prevent the caching mechanism from being used resulting in a real new query. | +| Wait For Model | `wait-for-model` | boolean | If the model is not ready, wait for it instead of receiving 503. It limits the number of requests required to get your inference done. It is advised to only set this flag to true after receiving a 503 error as it will limit hanging in your application to known places. |
-### Image Segmentation - -Image Segmentation divides an image into segments where each pixel in the image is mapped to an object. This task has multiple variants such as instance segmentation, panoptic segmentation and semantic segmentation.
-| Input | Field ID | Format | Description | +| Output | Field ID | Format | Description | | :--- | :--- | :--- | :--- | -| Task ID (required) | `task` | string | `TASK_IMAGE_SEGMENTATION` | -| Model (required) | `model` | string | The Hugging Face model to be used. | -| Image (required) | `image` | string | The image file. | +| Image | `image` | image/jpeg | Image. |
+### Token Classification - - +Token classification is a natural language understanding task in which a label is assigned to some tokens in a text. Some popular token classification subtasks are Named Entity Recognition (NER) and Part-of-Speech (PoS) tagging. NER models could be trained to identify specific entities in a text, such as dates, individuals and places; and PoS tagging would identify, for example, which words in a text are verbs, nouns, and punctuation marks.
-| Output | Field ID | Format | Description | +| Input | Field ID | Format | Description | | :--- | :--- | :--- | :--- | -| [Segments](#image-segmentation-segments) | `segments` | array[object] | Segments. | +| Task ID (required) | `task` | string | `TASK_TOKEN_CLASSIFICATION` | +| Model (required) | `model` | string | The Hugging Face model to be used. | +| String Input (required) | `inputs` | string | String input. | +| [Parameters](#token-classification-parameters) | `parameters` | object | Parameters. | +| [Options](#token-classification-options) | `options` | object | Options for the model. |
+
- Output Objects in Image Segmentation + Input Objects in Token Classification -

Segments

+

Parameters

+ +Parameters.
| Field | Field ID | Format | Note | | :--- | :--- | :--- | :--- | -| Label | `label` | string | The label for the class (model specific) of a segment. | -| Mask | `mask` | image/png | A str (base64 str of a single channel black-and-white img) representing the mask of a segment. | -| Score | `score` | number | A float that represents how likely it is that the segment belongs to the given class. | +| Aggregation Strategy | `aggregation-strategy` | string | There are several aggregation strategies: +none: Every token gets classified without further aggregation. +simple: Entities are grouped according to the default schema (B-, I- tags get merged when the tag is similar). +first: Same as the simple strategy except words cannot end up with different tags. Words will use the tag of the first token when there is ambiguity. +average: Same as the simple strategy except words cannot end up with different tags. Scores are averaged across tokens and then the maximum label is applied. +max: Same as the simple strategy except words cannot end up with different tags. Word entity will be the token with the maximum score. |
-
- - -### Object Detection +

Options

-Object Detection models allow users to identify objects of certain defined classes. Object detection models receive an image as input and output the images with bounding boxes and labels on detected objects. +Options for the model.
-| Input | Field ID | Format | Description | +| Field | Field ID | Format | Note | | :--- | :--- | :--- | :--- | -| Task ID (required) | `task` | string | `TASK_OBJECT_DETECTION` | -| Model (required) | `model` | string | The Hugging Face model to be used. | -| Image (required) | `image` | string | The image file. | +| Use Cache | `use-cache` | boolean | There is a cache layer on the inference API to speedup requests we have already seen. Most models can use those results as is as models are deterministic (meaning the results will be the same anyway). However if you use a non deterministic model, you can set this parameter to prevent the caching mechanism from being used resulting in a real new query. | +| Wait For Model | `wait-for-model` | boolean | If the model is not ready, wait for it instead of receiving 503. It limits the number of requests required to get your inference done. It is advised to only set this flag to true after receiving a 503 error as it will limit hanging in your application to known places. |
- - - +
@@ -816,127 +879,121 @@ Object Detection models allow users to identify objects of certain defined class | Output | Field ID | Format | Description | | :--- | :--- | :--- | :--- | -| [Objects](#object-detection-objects) | `objects` | array[object] | Objects. | +| [Results](#token-classification-results) | `results` | array[object] | Results. |
- Output Objects in Object Detection - -

Objects

- -
- -| Field | Field ID | Format | Note | -| :--- | :--- | :--- | :--- | -| [Box](#object-detection-box) | `box` | object | A dict (with keys [xmin,ymin,xmax,ymax]) representing the bounding box of a detected object. | -| Label | `label` | string | The label for the class (model specific) of a detected object. | -| Score | `score` | number | A float that represents how likely it is that the detected object belongs to the given class. | -
+ Output Objects in Token Classification -

Box

+

Results

| Field | Field ID | Format | Note | | :--- | :--- | :--- | :--- | -| X Max | `xmax` | number | X max. | -| X Min | `xmin` | number | X min. | -| Y Max | `ymax` | number | Y Max. | -| Y min | `ymin` | number | Y min. | +| End | `end` | integer | The offset stringwise where the answer is located. Useful to disambiguate if word occurs multiple times. | +| Entity Group | `entity-group` | string | The type for the entity being recognized (model specific). | +| Score | `score` | number | How likely the entity was recognized. | +| Start | `start` | integer | The offset stringwise where the answer is located. Useful to disambiguate if word occurs multiple times. | +| Word | `word` | string | The string that was captured. |
-### Image to Text +### Translation -Image to text models output a text from a given image. Image captioning or optical character recognition can be considered as the most common applications of image to text. +Translation is the task of converting text from one language to another.
| Input | Field ID | Format | Description | | :--- | :--- | :--- | :--- | -| Task ID (required) | `task` | string | `TASK_IMAGE_TO_TEXT` | +| Task ID (required) | `task` | string | `TASK_TRANSLATION` | | Model (required) | `model` | string | The Hugging Face model to be used. | -| Image (required) | `image` | string | The image file. | +| String Input (required) | `inputs` | string | String input. | +| [Options](#translation-options) | `options` | object | Options for the model. |
+
+ Input Objects in Translation +

Options

- +Options for the model.
-| Output | Field ID | Format | Description | +| Field | Field ID | Format | Note | | :--- | :--- | :--- | :--- | -| Text | `text` | string | Generated text. | +| Use Cache | `use-cache` | boolean | There is a cache layer on the inference API to speedup requests we have already seen. Most models can use those results as is as models are deterministic (meaning the results will be the same anyway). However if you use a non deterministic model, you can set this parameter to prevent the caching mechanism from being used resulting in a real new query. | +| Wait For Model | `wait-for-model` | boolean | If the model is not ready, wait for it instead of receiving 503. It limits the number of requests required to get your inference done. It is advised to only set this flag to true after receiving a 503 error as it will limit hanging in your application to known places. |
+
-### Speech Recognition - -Automatic Speech Recognition (ASR), also known as Speech to Text (STT), is the task of transcribing a given audio to text. It has many applications, such as voice user interfaces.
-| Input | Field ID | Format | Description | +| Output | Field ID | Format | Description | | :--- | :--- | :--- | :--- | -| Task ID (required) | `task` | string | `TASK_SPEECH_RECOGNITION` | -| Model (required) | `model` | string | The Hugging Face model to be used. | -| Audio (required) | `audio` | string | The audio file. | +| Translation Text | `translation-text` | string | The string after translation. |
+### Zero Shot Classification - - +Zero-shot text classification is a task in natural language processing where a model is trained on a set of labeled examples but is then able to classify new examples from previously unseen classes.
-| Output | Field ID | Format | Description | +| Input | Field ID | Format | Description | | :--- | :--- | :--- | :--- | -| Text | `text` | string | The string that was recognized within the audio file. | +| Task ID (required) | `task` | string | `TASK_ZERO_SHOT_CLASSIFICATION` | +| Model (required) | `model` | string | The Hugging Face model to be used. | +| String Input (required) | `inputs` | string | String input. | +| [Parameters](#zero-shot-classification-parameters) | `parameters` | object | Parameters. | +| [Options](#zero-shot-classification-options) | `options` | object | Options for the model. |
-### Audio Classification +
+ Input Objects in Zero Shot Classification -Audio classification is the task of assigning a label or class to a given audio. It can be used for recognizing which command a user is giving or the emotion of a statement, as well as identifying a speaker. +

Parameters

+ +Parameters.
-| Input | Field ID | Format | Description | +| Field | Field ID | Format | Note | | :--- | :--- | :--- | :--- | -| Task ID (required) | `task` | string | `TASK_AUDIO_CLASSIFICATION` | -| Model (required) | `model` | string | The Hugging Face model to be used. | -| Audio (required) | `audio` | string | The audio file. | +| Candidate Labels | `candidate-labels` | array | a list of strings that are potential classes for inputs. (max 10 candidate-labels, for more, simply run multiple requests, results are going to be misleading if using too many candidate-labels anyway. If you want to keep the exact same, you can simply run multi-label=True and do the scaling on your end. ). | +| Multi Label | `multi-label` | boolean | Boolean that is set to True if classes can overlap. |
+

Options

- - - - +Options for the model.
-| Output | Field ID | Format | Description | +| Field | Field ID | Format | Note | | :--- | :--- | :--- | :--- | -| [Classes](#audio-classification-classes) | `classes` | array[object] | Classes. | +| Use Cache | `use-cache` | boolean | There is a cache layer on the inference API to speedup requests we have already seen. Most models can use those results as is as models are deterministic (meaning the results will be the same anyway). However if you use a non deterministic model, you can set this parameter to prevent the caching mechanism from being used resulting in a real new query. | +| Wait For Model | `wait-for-model` | boolean | If the model is not ready, wait for it instead of receiving 503. It limits the number of requests required to get your inference done. It is advised to only set this flag to true after receiving a 503 error as it will limit hanging in your application to known places. |
+
-
- Output Objects in Audio Classification -

Classes

-| Field | Field ID | Format | Note | +| Output | Field ID | Format | Description | | :--- | :--- | :--- | :--- | -| Label | `label` | string | The label for the class (model specific). | -| Score | `score` | number | A float that represents how likely it is that the audio file belongs to this class. | +| Scores | `scores` | array[number] | a list of floats that correspond the the probability of label, in the same order as labels. | +| Labels | `labels` | array[string] | The list of strings for labels that you sent (in order). | +| Sequence (optional) | `sequence` | string | The string sent as an input. |
-
diff --git a/pkg/component/ai/huggingface/v0/config/definition.yaml b/pkg/component/ai/huggingface/v0/config/definition.yaml index bfb1f4833..b2f90c925 100644 --- a/pkg/component/ai/huggingface/v0/config/definition.yaml +++ b/pkg/component/ai/huggingface/v0/config/definition.yaml @@ -1,21 +1,3 @@ -availableTasks: -- TASK_TEXT_GENERATION -- TASK_FILL_MASK -- TASK_SUMMARIZATION -- TASK_TEXT_CLASSIFICATION -- TASK_TOKEN_CLASSIFICATION -- TASK_TRANSLATION -- TASK_ZERO_SHOT_CLASSIFICATION -- TASK_QUESTION_ANSWERING -- TASK_TABLE_QUESTION_ANSWERING -- TASK_SENTENCE_SIMILARITY -- TASK_CONVERSATIONAL -- TASK_IMAGE_CLASSIFICATION -- TASK_IMAGE_SEGMENTATION -- TASK_OBJECT_DETECTION -- TASK_IMAGE_TO_TEXT -- TASK_SPEECH_RECOGNITION -- TASK_AUDIO_CLASSIFICATION custom: false documentationUrl: https://www.instill.tech/docs/component/ai/hugging-face icon: assets/hugging-face.svg diff --git a/pkg/component/ai/instill/v0/README.mdx b/pkg/component/ai/instill/v0/README.mdx index a017cabca..cd7ba0d25 100644 --- a/pkg/component/ai/instill/v0/README.mdx +++ b/pkg/component/ai/instill/v0/README.mdx @@ -7,18 +7,18 @@ description: "Learn about how to set up a VDP Instill Model component https://gi The Instill Model component is an AI component that allows users to connect the AI models served on the Instill Model Platform. It can carry out the following tasks: +- [Chat](#chat) - [Classification](#classification) +- [Detection](#detection) +- [Embedding](#embedding) - [Instance Segmentation](#instance-segmentation) - [Keypoint](#keypoint) -- [Detection](#detection) - [OCR](#ocr) - [Semantic Segmentation](#semantic-segmentation) - [Text Generation](#text-generation) - [Text Generation Chat](#text-generation-chat) - [Text to Image](#text-to-image) - [Visual Question Answering](#visual-question-answering) -- [Chat](#chat) -- [Embedding](#embedding) @@ -40,6 +40,74 @@ The component definition and tasks are defined in the [definition.yaml](https:// ## Supported Tasks +### Chat + +Generate texts from input text prompts and chat history. + +
+ +| Input | Field ID | Format | Description | +| :--- | :--- | :--- | :--- | +| Task ID (required) | `task` | string | `TASK_CHAT` | +| Model Name (required) | `model-name` | string | The Instill Model model to be used. | +| Prompt (required) | `prompt` | string | The prompt text. | +| System Message | `system-message` | string | 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’s behavior is using a generic message as "You are a helpful assistant.". | +| Prompt Images | `prompt-images` | array[string] | The prompt images. | +| [Chat History](#chat-chat-history) | `chat-history` | array[object] | 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"\}. | +| Seed | `seed` | integer | The seed. | +| Temperature | `temperature` | number | The temperature for sampling. | +| Max New Tokens | `max-new-tokens` | integer | The maximum number of tokens for model to generate. | +
+ + +
+ Input Objects in Chat + +

Chat History

+ +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"\}. + +
+ +| Field | Field ID | Format | Note | +| :--- | :--- | :--- | :--- | +| [Content](#chat-content) | `content` | array | The message content. | +| Role | `role` | string | The message role, i.e. 'system', 'user' or 'assistant'. | +
+

Content

+ +The message content. + +
+ +| Field | Field ID | Format | Note | +| :--- | :--- | :--- | :--- | +| [Image URL](#chat-image-url) | `image-url` | object | The image URL | +| Text | `text` | string | The text content. | +| Type | `type` | string | The type of the content part.
Enum values
  • `text`
  • `image-url`
| +
+

Image URL

+ +The image URL + +
+ +| Field | Field ID | Format | Note | +| :--- | :--- | :--- | :--- | +| URL | `url` | string | Either a URL of the image or the base64 encoded image data. | +
+
+ + + +
+ +| Output | Field ID | Format | Description | +| :--- | :--- | :--- | :--- | +| Text | `text` | string | Text. | +
+ + ### Classification Classify images into predefined categories. @@ -67,15 +135,15 @@ Classify images into predefined categories. -### Instance Segmentation +### Detection -Detect, localize and delineate multiple objects in images. +Detect and localize multiple objects in images.
| Input | Field ID | Format | Description | | :--- | :--- | :--- | :--- | -| Task ID (required) | `task` | string | `TASK_INSTANCE_SEGMENTATION` | +| Task ID (required) | `task` | string | `TASK_DETECTION` | | Model Name (required) | `model-name` | string | The Instill Model model to be used. | | Image (required) | `image-base64` | string | Image base64. |
@@ -89,25 +157,24 @@ Detect, localize and delineate multiple objects in images. | Output | Field ID | Format | Description | | :--- | :--- | :--- | :--- | -| [Objects](#instance-segmentation-objects) | `objects` | array[object] | A list of detected instance bounding boxes. | +| [Objects](#detection-objects) | `objects` | array[object] | A list of detected objects. |
- Output Objects in Instance Segmentation + Output Objects in Detection -

Objects

+

Objects

| Field | Field ID | Format | Note | | :--- | :--- | :--- | :--- | -| [Bounding Box](#instance-segmentation-bounding-box) | `bounding-box` | object | The detected bounding box in (left, top, width, height) format. | +| [Bounding box](#detection-bounding-box) | `bounding-box` | object | The detected bounding box in (left, top, width, height) format. | | Category | `category` | string | The predicted category of the bounding box. | -| RLE | `rle` | string | Run Length Encoding (RLE) of instance mask within the bounding box. | -| Score | `score` | number | The confidence score of the predicted instance object. | +| Score | `score` | number | The confidence score of the predicted category of the bounding box. |
-

Bounding Box

+

Bounding Box

@@ -121,57 +188,160 @@ Detect, localize and delineate multiple objects in images.
-### Keypoint +### Embedding -Detect and localize multiple keypoints of objects in images. +This task refers to the process of generating vector embeddings from input data, which can be text or images. This transformation converts the data into a dense, fixed-length numerical representation that captures the essential features of the original input. These embeddings are typically used in machine learning tasks to represent complex data in a more structured, simplified form.
| Input | Field ID | Format | Description | | :--- | :--- | :--- | :--- | -| Task ID (required) | `task` | string | `TASK_KEYPOINT` | -| Model Name (required) | `model-name` | string | The Instill Model model to be used. | -| Image (required) | `image-base64` | string | Image base64. | +| Task ID (required) | `task` | string | `TASK_EMBEDDING` | +| [Data](#embedding-data) (required) | `data` | object | Input data. | +| [Parameter](#embedding-parameter) | `parameter` | object | Input parameter. | +
+ + +
+ Input Objects in Embedding + +

Data

+ +Input data. + +
+ +| Field | Field ID | Format | Note | +| :--- | :--- | :--- | :--- | +| [Embeddings](#embedding-embeddings) | `embeddings` | array | List of input data to be embedded. | +| Model | `model` | string | The model to be used for generating embeddings. It should be `namespace/model-name/version`. i.e. `abrc/yolov7-stomata/v0.1.0`. You can see the version from the Versions tab of Model page. | +
+

Parameter

+ +Input parameter. + +
+ +| Field | Field ID | Format | Note | +| :--- | :--- | :--- | :--- | +| Dimensions | `dimensions` | integer | Number of dimensions in the output embedding vectors. | +| Data Format | `format` | string | The data format of the embeddings. Defaults to float.
Enum values
  • `float`
  • `base64`
| +| Input Type | `input-type` | string | The type of input data to be embedded (e.g., query, document). | +| Truncate | `truncate` | string | How to handle inputs longer than the max token length. Defaults to 'End'.
Enum values
  • `None`
  • `End`
  • `Start`
|
+
+
+The embeddings Object +

Embeddings

+`embeddings` must fulfill one of the following schemas: +
Text
+
+ +| Field | Field ID | Format | Note | +| :--- | :--- | :--- | :--- | +| Text Content | `text` | string | When the input is text, the raw text is tokenized and processed into a dense, fixed-length vector that captures semantic information such as word meanings and relationships. These text embeddings enable tasks like sentiment analysis, search, or classification. | +| Text | `type` | string | Must be `"text"` | +
+ +
Image URL
+ +
+ +| Field | Field ID | Format | Note | +| :--- | :--- | :--- | :--- | +| Image URL | `image-url` | string | When the input is an image from a URL, the image is first fetched from the URL and then decoded into its original format. It is then processed into a fixed-length vector representing essential visual features like shapes and colors. These image embeddings are useful for tasks like image classification or similarity search, providing structured numerical data for complex visual inputs. | +| Image URL | `type` | string | Must be `"image-url"` | +
+ +
Image Base64
+ +
+ +| Field | Field ID | Format | Note | +| :--- | :--- | :--- | :--- | +| Image File | `image-base64` | string | When the input is an image in base64 format, the base64-encoded data is first decoded into its original image form. The image is then processed and transformed into a dense, fixed-length numerical vector, capturing key visual features like shapes, colors, or textures. | +| Image File | `type` | string | Must be `"image-base64"` | +
+
| Output | Field ID | Format | Description | | :--- | :--- | :--- | :--- | -| [Objects](#keypoint-objects) | `objects` | array[object] | A list of keypoint objects, a keypoint object includes all the pre-defined keypoints of a detected object. | +| [Data](#embedding-data) | `data` | object | Output data. |
- Output Objects in Keypoint + Output Objects in Embedding -

Objects

+

Data

| Field | Field ID | Format | Note | | :--- | :--- | :--- | :--- | -| [Bounding Box](#keypoint-bounding-box) | `bounding-box` | object | The detected bounding box in (left, top, width, height) format. | -| [Keypoints](#keypoint-keypoints) | `keypoints` | array | A keypoint group is composed of a list of pre-defined keypoints of a detected object. | -| Score | `score` | number | The confidence score of the predicted object. | +| [Embeddings](#embedding-embeddings) | `embeddings` | array | List of generated embeddings. |
-

Keypoints

+

Embeddings

| Field | Field ID | Format | Note | | :--- | :--- | :--- | :--- | -| Visibility Score | `v` | number | visibility score of the keypoint. | -| X Coordinate | `x` | number | x coordinate of the keypoint. | -| Y Coordinate | `y` | number | y coordinate of the keypoint. | +| Created | `created` | integer | The Unix timestamp (in seconds) of when the embedding was created. | +| Index | `index` | integer | The index of the embedding vector in the array. | +| Embedding Vector | `vector` | array | The embedding vector. |
+
-

Bounding Box

+ +### Instance Segmentation + +Detect, localize and delineate multiple objects in images. + +
+ +| Input | Field ID | Format | Description | +| :--- | :--- | :--- | :--- | +| Task ID (required) | `task` | string | `TASK_INSTANCE_SEGMENTATION` | +| Model Name (required) | `model-name` | string | The Instill Model model to be used. | +| Image (required) | `image-base64` | string | Image base64. | +
+ + + + + + +
+ +| Output | Field ID | Format | Description | +| :--- | :--- | :--- | :--- | +| [Objects](#instance-segmentation-objects) | `objects` | array[object] | A list of detected instance bounding boxes. | +
+ +
+ Output Objects in Instance Segmentation + +

Objects

+ +
+ +| Field | Field ID | Format | Note | +| :--- | :--- | :--- | :--- | +| [Bounding Box](#instance-segmentation-bounding-box) | `bounding-box` | object | The detected bounding box in (left, top, width, height) format. | +| Category | `category` | string | The predicted category of the bounding box. | +| RLE | `rle` | string | Run Length Encoding (RLE) of instance mask within the bounding box. | +| Score | `score` | number | The confidence score of the predicted instance object. | +
+ +

Bounding Box

@@ -185,15 +355,15 @@ Detect and localize multiple keypoints of objects in images.
-### Detection +### Keypoint -Detect and localize multiple objects in images. +Detect and localize multiple keypoints of objects in images.
| Input | Field ID | Format | Description | | :--- | :--- | :--- | :--- | -| Task ID (required) | `task` | string | `TASK_DETECTION` | +| Task ID (required) | `task` | string | `TASK_KEYPOINT` | | Model Name (required) | `model-name` | string | The Instill Model model to be used. | | Image (required) | `image-base64` | string | Image base64. |
@@ -207,24 +377,35 @@ Detect and localize multiple objects in images. | Output | Field ID | Format | Description | | :--- | :--- | :--- | :--- | -| [Objects](#detection-objects) | `objects` | array[object] | A list of detected objects. | +| [Objects](#keypoint-objects) | `objects` | array[object] | A list of keypoint objects, a keypoint object includes all the pre-defined keypoints of a detected object. |
- Output Objects in Detection + Output Objects in Keypoint -

Objects

+

Objects

| Field | Field ID | Format | Note | | :--- | :--- | :--- | :--- | -| [Bounding box](#detection-bounding-box) | `bounding-box` | object | The detected bounding box in (left, top, width, height) format. | -| Category | `category` | string | The predicted category of the bounding box. | -| Score | `score` | number | The confidence score of the predicted category of the bounding box. | +| [Bounding Box](#keypoint-bounding-box) | `bounding-box` | object | The detected bounding box in (left, top, width, height) format. | +| [Keypoints](#keypoint-keypoints) | `keypoints` | array | A keypoint group is composed of a list of pre-defined keypoints of a detected object. | +| Score | `score` | number | The confidence score of the predicted object. |
-

Bounding Box

+

Keypoints

+ +
+ +| Field | Field ID | Format | Note | +| :--- | :--- | :--- | :--- | +| Visibility Score | `v` | number | visibility score of the keypoint. | +| X Coordinate | `x` | number | x coordinate of the keypoint. | +| Y Coordinate | `y` | number | y coordinate of the keypoint. | +
+ +

Bounding Box

@@ -527,185 +708,4 @@ The image URL
-### Chat - -Generate texts from input text prompts and chat history. - -
- -| Input | Field ID | Format | Description | -| :--- | :--- | :--- | :--- | -| Task ID (required) | `task` | string | `TASK_CHAT` | -| Model Name (required) | `model-name` | string | The Instill Model model to be used. | -| Prompt (required) | `prompt` | string | The prompt text. | -| System Message | `system-message` | string | 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’s behavior is using a generic message as "You are a helpful assistant.". | -| Prompt Images | `prompt-images` | array[string] | The prompt images. | -| [Chat History](#chat-chat-history) | `chat-history` | array[object] | 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"\}. | -| Seed | `seed` | integer | The seed. | -| Temperature | `temperature` | number | The temperature for sampling. | -| Max New Tokens | `max-new-tokens` | integer | The maximum number of tokens for model to generate. | -
- - -
- Input Objects in Chat - -

Chat History

- -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"\}. - -
- -| Field | Field ID | Format | Note | -| :--- | :--- | :--- | :--- | -| [Content](#chat-content) | `content` | array | The message content. | -| Role | `role` | string | The message role, i.e. 'system', 'user' or 'assistant'. | -
-

Content

- -The message content. - -
- -| Field | Field ID | Format | Note | -| :--- | :--- | :--- | :--- | -| [Image URL](#chat-image-url) | `image-url` | object | The image URL | -| Text | `text` | string | The text content. | -| Type | `type` | string | The type of the content part.
Enum values
  • `text`
  • `image-url`
| -
-

Image URL

- -The image URL - -
- -| Field | Field ID | Format | Note | -| :--- | :--- | :--- | :--- | -| URL | `url` | string | Either a URL of the image or the base64 encoded image data. | -
-
- - - -
- -| Output | Field ID | Format | Description | -| :--- | :--- | :--- | :--- | -| Text | `text` | string | Text. | -
- - -### Embedding - -This task refers to the process of generating vector embeddings from input data, which can be text or images. This transformation converts the data into a dense, fixed-length numerical representation that captures the essential features of the original input. These embeddings are typically used in machine learning tasks to represent complex data in a more structured, simplified form. - -
- -| Input | Field ID | Format | Description | -| :--- | :--- | :--- | :--- | -| Task ID (required) | `task` | string | `TASK_EMBEDDING` | -| [Data](#embedding-data) (required) | `data` | object | Input data. | -| [Parameter](#embedding-parameter) | `parameter` | object | Input parameter. | -
- - -
- Input Objects in Embedding - -

Data

- -Input data. - -
- -| Field | Field ID | Format | Note | -| :--- | :--- | :--- | :--- | -| [Embeddings](#embedding-embeddings) | `embeddings` | array | List of input data to be embedded. | -| Model | `model` | string | The model to be used for generating embeddings. It should be `namespace/model-name/version`. i.e. `abrc/yolov7-stomata/v0.1.0`. You can see the version from the Versions tab of Model page. | -
-

Parameter

- -Input parameter. - -
- -| Field | Field ID | Format | Note | -| :--- | :--- | :--- | :--- | -| Dimensions | `dimensions` | integer | Number of dimensions in the output embedding vectors. | -| Data Format | `format` | string | The data format of the embeddings. Defaults to float.
Enum values
  • `float`
  • `base64`
| -| Input Type | `input-type` | string | The type of input data to be embedded (e.g., query, document). | -| Truncate | `truncate` | string | How to handle inputs longer than the max token length. Defaults to 'End'.
Enum values
  • `None`
  • `End`
  • `Start`
| -
-
- -
-The embeddings Object - -

Embeddings

- -`embeddings` must fulfill one of the following schemas: - -
Text
- -
- -| Field | Field ID | Format | Note | -| :--- | :--- | :--- | :--- | -| Text Content | `text` | string | When the input is text, the raw text is tokenized and processed into a dense, fixed-length vector that captures semantic information such as word meanings and relationships. These text embeddings enable tasks like sentiment analysis, search, or classification. | -| Text | `type` | string | Must be `"text"` | -
- -
Image URL
- -
- -| Field | Field ID | Format | Note | -| :--- | :--- | :--- | :--- | -| Image URL | `image-url` | string | When the input is an image from a URL, the image is first fetched from the URL and then decoded into its original format. It is then processed into a fixed-length vector representing essential visual features like shapes and colors. These image embeddings are useful for tasks like image classification or similarity search, providing structured numerical data for complex visual inputs. | -| Image URL | `type` | string | Must be `"image-url"` | -
- -
Image Base64
- -
- -| Field | Field ID | Format | Note | -| :--- | :--- | :--- | :--- | -| Image File | `image-base64` | string | When the input is an image in base64 format, the base64-encoded data is first decoded into its original image form. The image is then processed and transformed into a dense, fixed-length numerical vector, capturing key visual features like shapes, colors, or textures. | -| Image File | `type` | string | Must be `"image-base64"` | -
-
- -
- -| Output | Field ID | Format | Description | -| :--- | :--- | :--- | :--- | -| [Data](#embedding-data) | `data` | object | Output data. | -
- -
- Output Objects in Embedding - -

Data

- -
- -| Field | Field ID | Format | Note | -| :--- | :--- | :--- | :--- | -| [Embeddings](#embedding-embeddings) | `embeddings` | array | List of generated embeddings. | -
- -

Embeddings

- -
- -| Field | Field ID | Format | Note | -| :--- | :--- | :--- | :--- | -| Created | `created` | integer | The Unix timestamp (in seconds) of when the embedding was created. | -| Index | `index` | integer | The index of the embedding vector in the array. | -| Embedding Vector | `vector` | array | The embedding vector. | -
-
- - diff --git a/pkg/component/ai/instill/v0/config/definition.yaml b/pkg/component/ai/instill/v0/config/definition.yaml index a1380ed00..f28123311 100644 --- a/pkg/component/ai/instill/v0/config/definition.yaml +++ b/pkg/component/ai/instill/v0/config/definition.yaml @@ -1,16 +1,3 @@ -availableTasks: -- TASK_CLASSIFICATION -- TASK_INSTANCE_SEGMENTATION -- TASK_KEYPOINT -- TASK_DETECTION -- TASK_OCR -- TASK_SEMANTIC_SEGMENTATION -- TASK_TEXT_GENERATION -- TASK_TEXT_GENERATION_CHAT -- TASK_TEXT_TO_IMAGE -- TASK_VISUAL_QUESTION_ANSWERING -- TASK_CHAT -- TASK_EMBEDDING custom: false documentationUrl: https://www.instill.tech/docs/component/ai/instill-model icon: assets/instill-model.svg diff --git a/pkg/component/ai/mistralai/v0/README.mdx b/pkg/component/ai/mistralai/v0/README.mdx index c5e805aca..9bdd3b013 100644 --- a/pkg/component/ai/mistralai/v0/README.mdx +++ b/pkg/component/ai/mistralai/v0/README.mdx @@ -7,8 +7,8 @@ description: "Learn about how to set up a VDP Mistral AI component https://githu The Mistral AI component is an AI component that allows users to connect the AI models served on the Mistral AI Platform. It can carry out the following tasks: -- [Text Generation Chat](#text-generation-chat) - [Text Embeddings](#text-embeddings) +- [Text Generation Chat](#text-generation-chat) @@ -49,6 +49,46 @@ ${connection.}`. ## Supported Tasks +### Text Embeddings + +An embedding is a list of floating point numbers that captures semantic information about the text that it represents. + +
+ +| Input | Field ID | Format | Description | +| :--- | :--- | :--- | :--- | +| Task ID (required) | `task` | string | `TASK_TEXT_EMBEDDINGS` | +| Model Name (required) | `model-name` | string | The Mistral embed model to be used.
Enum values
  • `mistral-embed`
| +| Text (required) | `text` | string | The text. | +
+ + + + + + +
+ +| Output | Field ID | Format | Description | +| :--- | :--- | :--- | :--- | +| Embedding | `embedding` | array[number] | Embedding of the input text. | +| [Usage](#text-embeddings-usage) (optional) | `usage` | object | Token usage on the Mistral platform embedding models. | +
+ +
+ Output Objects in Text Embeddings + +

Usage

+ +
+ +| Field | Field ID | Format | Note | +| :--- | :--- | :--- | :--- | +| Token Count | `tokens` | number | The token count used by Mistral models. | +
+
+ + ### Text Generation Chat Mistral AI'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 “program” a large language model model, usually by providing instructions or some examples of how to successfully complete a task. @@ -135,46 +175,6 @@ The image URL.
-### Text Embeddings - -An embedding is a list of floating point numbers that captures semantic information about the text that it represents. - -
- -| Input | Field ID | Format | Description | -| :--- | :--- | :--- | :--- | -| Task ID (required) | `task` | string | `TASK_TEXT_EMBEDDINGS` | -| Model Name (required) | `model-name` | string | The Mistral embed model to be used.
Enum values
  • `mistral-embed`
| -| Text (required) | `text` | string | The text. | -
- - - - - - -
- -| Output | Field ID | Format | Description | -| :--- | :--- | :--- | :--- | -| Embedding | `embedding` | array[number] | Embedding of the input text. | -| [Usage](#text-embeddings-usage) (optional) | `usage` | object | Token usage on the Mistral platform embedding models. | -
- -
- Output Objects in Text Embeddings - -

Usage

- -
- -| Field | Field ID | Format | Note | -| :--- | :--- | :--- | :--- | -| Token Count | `tokens` | number | The token count used by Mistral models. | -
-
- - ## Example Recipes diff --git a/pkg/component/ai/mistralai/v0/config/definition.yaml b/pkg/component/ai/mistralai/v0/config/definition.yaml index c293e2b6d..b423a205f 100644 --- a/pkg/component/ai/mistralai/v0/config/definition.yaml +++ b/pkg/component/ai/mistralai/v0/config/definition.yaml @@ -1,6 +1,3 @@ -availableTasks: -- TASK_TEXT_GENERATION_CHAT -- TASK_TEXT_EMBEDDINGS custom: false documentationUrl: https://www.instill.tech/docs/component/ai/mistral-ai icon: assets/mistral-ai.svg diff --git a/pkg/component/ai/ollama/v0/README.mdx b/pkg/component/ai/ollama/v0/README.mdx index 5d9f1f464..cba8c8193 100644 --- a/pkg/component/ai/ollama/v0/README.mdx +++ b/pkg/component/ai/ollama/v0/README.mdx @@ -7,8 +7,8 @@ description: "Learn about how to set up a VDP Ollama component https://github.co The Ollama component is an AI component that allows users to connect the AI models served with the Ollama library. It can carry out the following tasks: -- [Text Generation Chat](#text-generation-chat) - [Text Embeddings](#text-embeddings) +- [Text Generation Chat](#text-generation-chat) @@ -50,6 +50,32 @@ ${connection.}`. ## Supported Tasks +### Text Embeddings + +An embedding is a list of floating point numbers that captures semantic information about the text that it represents. + +
+ +| Input | Field ID | Format | Description | +| :--- | :--- | :--- | :--- | +| Task ID (required) | `task` | string | `TASK_TEXT_EMBEDDINGS` | +| Model Name (required) | `model` | string | The OSS model to be used, check [here](https://ollama.com/library) for list of models available. | +| Text (required) | `text` | string | The text. | +
+ + + + + + +
+ +| Output | Field ID | Format | Description | +| :--- | :--- | :--- | :--- | +| Embedding | `embedding` | array[number] | Embedding of the input text. | +
+ + ### Text Generation Chat Open-source large language models (OSS LLMs) are artificial intelligence models with publicly accessible code and architecture, allowing for free use, modification, and distribution. These models can provide performance comparable to proprietary alternatives. Ollama is a tool that enables you to run and interact with OSS LLMs using limited computational resources. You can install Ollama from: [here](https://ollama.com). @@ -132,30 +158,4 @@ To set up an Ollama instance on your local machine, follow the instructions belo 4. Suppose the IP address is `192.168.178.88`, then the Ollama hosting endpoint would be `192.168.178.88:11434`. 5. Enjoy fast LLM inference on your local machine and integration with 💧 Instill VDP. -### Text Embeddings - -An embedding is a list of floating point numbers that captures semantic information about the text that it represents. - -
- -| Input | Field ID | Format | Description | -| :--- | :--- | :--- | :--- | -| Task ID (required) | `task` | string | `TASK_TEXT_EMBEDDINGS` | -| Model Name (required) | `model` | string | The OSS model to be used, check [here](https://ollama.com/library) for list of models available. | -| Text (required) | `text` | string | The text. | -
- - - - - - -
- -| Output | Field ID | Format | Description | -| :--- | :--- | :--- | :--- | -| Embedding | `embedding` | array[number] | Embedding of the input text. | -
- - diff --git a/pkg/component/ai/ollama/v0/config/definition.yaml b/pkg/component/ai/ollama/v0/config/definition.yaml index 45c0636ee..53e84469b 100644 --- a/pkg/component/ai/ollama/v0/config/definition.yaml +++ b/pkg/component/ai/ollama/v0/config/definition.yaml @@ -1,6 +1,3 @@ -availableTasks: -- TASK_TEXT_GENERATION_CHAT -- TASK_TEXT_EMBEDDINGS documentationUrl: https://www.instill.tech/docs/component/ai/ollama icon: assets/ollama.svg id: ollama diff --git a/pkg/component/ai/openai/v0/README.mdx b/pkg/component/ai/openai/v0/README.mdx index 9c7698cf4..ef8bd78aa 100644 --- a/pkg/component/ai/openai/v0/README.mdx +++ b/pkg/component/ai/openai/v0/README.mdx @@ -7,11 +7,11 @@ description: "Learn about how to set up a VDP OpenAI component https://github.co The OpenAI component is an AI component that allows users to connect the AI models served on the OpenAI Platform. It can carry out the following tasks: -- [Text Generation](#text-generation) -- [Text Embeddings](#text-embeddings) - [Speech Recognition](#speech-recognition) -- [Text to Speech](#text-to-speech) +- [Text Embeddings](#text-embeddings) +- [Text Generation](#text-generation) - [Text to Image](#text-to-image) +- [Text to Speech](#text-to-speech) @@ -53,6 +53,62 @@ ${connection.}`. ## Supported Tasks +### Speech Recognition + +Turn audio into text. + +
+ +| Input | Field ID | Format | Description | +| :--- | :--- | :--- | :--- | +| Task ID (required) | `task` | string | `TASK_SPEECH_RECOGNITION` | +| Model (required) | `model` | string | ID of the model to use. Only `whisper-1` is currently available. .
Enum values
  • `whisper-1`
| +| Audio (required) | `audio` | string | The audio file object (not file name) to transcribe, in one of these formats: flac, mp3, mp4, mpeg, mpga, m4a, ogg, wav, or webm. . | +| Prompt | `prompt` | string | An optional text to guide the model's style or continue a previous audio segment. The prompt should match the audio language. . | +| Language | `language` | string | The language of the input audio. Supplying the input language in ISO-639-1 format will improve accuracy and latency. . | +| Temperature | `temperature` | number | The sampling temperature, between 0 and 1. Higher values like 0.8 will make the output more random, while lower values like 0.2 will make it more focused and deterministic. If set to 0, the model will use log probability to automatically increase the temperature until certain thresholds are hit. . | +
+ + + + + + +
+ +| Output | Field ID | Format | Description | +| :--- | :--- | :--- | :--- | +| Text | `text` | string | Generated text. | +
+ + +### Text Embeddings + +Turn text into numbers, unlocking use cases like search. + +
+ +| Input | Field ID | Format | Description | +| :--- | :--- | :--- | :--- | +| Task ID (required) | `task` | string | `TASK_TEXT_EMBEDDINGS` | +| Model (required) | `model` | string | ID of the model to use.
Enum values
  • `text-embedding-ada-002`
  • `text-embedding-3-small`
  • `text-embedding-3-large`
| +| Text (required) | `text` | string | The text. | +| Dimensions | `dimensions` | integer | The number of dimensions the resulting output embeddings should have. Only supported in text-embedding-3 and later models. | +
+ + + + + + +
+ +| Output | Field ID | Format | Description | +| :--- | :--- | :--- | :--- | +| Embedding | `embedding` | array[number] | Embedding of the input text. | +
+ + ### Text Generation 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 “program” a large language model model, usually by providing instructions or some examples of how to successfully complete a task. @@ -175,18 +231,21 @@ The image URL
-### Text Embeddings +### Text to Image -Turn text into numbers, unlocking use cases like search. +Generate or manipulate images with DALL·E.
| Input | Field ID | Format | Description | | :--- | :--- | :--- | :--- | -| Task ID (required) | `task` | string | `TASK_TEXT_EMBEDDINGS` | -| Model (required) | `model` | string | ID of the model to use.
Enum values
  • `text-embedding-ada-002`
  • `text-embedding-3-small`
  • `text-embedding-3-large`
| -| Text (required) | `text` | string | The text. | -| Dimensions | `dimensions` | integer | The number of dimensions the resulting output embeddings should have. Only supported in text-embedding-3 and later models. | +| Task ID (required) | `task` | string | `TASK_TEXT_TO_IMAGE` | +| Model (required) | `model` | string | The model to use for image generation.
Enum values
  • `dall-e-2`
  • `dall-e-3`
| +| Prompt (required) | `prompt` | string | A text description of the desired image(s). The maximum length is 1000 characters for `dall-e-2` and 4000 characters for `dall-e-3`. | +| N | `n` | integer | The number of images to generate. Must be between 1 and 10. For `dall-e-3`, only `n=1` is supported. | +| Quality | `quality` | string | The quality of the image that will be generated. `hd` creates images with finer details and greater consistency across the image. This param is only supported for `dall-e-3`.
Enum values
  • `standard`
  • `hd`
| +| Size | `size` | string | The size of the generated images. Must be one of `256x256`, `512x512`, or `1024x1024` for `dall-e-2`. Must be one of `1024x1024`, `1792x1024`, or `1024x1792` for `dall-e-3` models.
Enum values
  • `256x256`
  • `512x512`
  • `1024x1024`
  • `1792x1024`
  • `1024x1792`
| +| N | `style` | string | The style of the generated images. Must be one of `vivid` or `natural`. Vivid causes the model to lean towards generating hyper-real and dramatic images. Natural causes the model to produce more natural, less hyper-real looking images. This param is only supported for `dall-e-3`.
Enum values
  • `vivid`
  • `natural`
|
@@ -198,37 +257,22 @@ Turn text into numbers, unlocking use cases like search. | Output | Field ID | Format | Description | | :--- | :--- | :--- | :--- | -| Embedding | `embedding` | array[number] | Embedding of the input text. | - - - -### Speech Recognition - -Turn audio into text. - -
- -| Input | Field ID | Format | Description | -| :--- | :--- | :--- | :--- | -| Task ID (required) | `task` | string | `TASK_SPEECH_RECOGNITION` | -| Model (required) | `model` | string | ID of the model to use. Only `whisper-1` is currently available. .
Enum values
  • `whisper-1`
| -| Audio (required) | `audio` | string | The audio file object (not file name) to transcribe, in one of these formats: flac, mp3, mp4, mpeg, mpga, m4a, ogg, wav, or webm. . | -| Prompt | `prompt` | string | An optional text to guide the model's style or continue a previous audio segment. The prompt should match the audio language. . | -| Language | `language` | string | The language of the input audio. Supplying the input language in ISO-639-1 format will improve accuracy and latency. . | -| Temperature | `temperature` | number | The sampling temperature, between 0 and 1. Higher values like 0.8 will make the output more random, while lower values like 0.2 will make it more focused and deterministic. If set to 0, the model will use log probability to automatically increase the temperature until certain thresholds are hit. . | +| [Images](#text-to-image-images) | `results` | array[object] | Generated results. |
+
+ Output Objects in Text to Image - - - +

Images

-| Output | Field ID | Format | Description | +| Field | Field ID | Format | Note | | :--- | :--- | :--- | :--- | -| Text | `text` | string | Generated text. | +| Generated Image | `image` | image/webp | Generated image. | +| Revised Prompt | `revised-prompt` | string | Revised prompt. |
+
### Text to Speech @@ -260,50 +304,6 @@ Turn text into lifelike spoken audio -### Text to Image - -Generate or manipulate images with DALL·E. - -
- -| Input | Field ID | Format | Description | -| :--- | :--- | :--- | :--- | -| Task ID (required) | `task` | string | `TASK_TEXT_TO_IMAGE` | -| Model (required) | `model` | string | The model to use for image generation.
Enum values
  • `dall-e-2`
  • `dall-e-3`
| -| Prompt (required) | `prompt` | string | A text description of the desired image(s). The maximum length is 1000 characters for `dall-e-2` and 4000 characters for `dall-e-3`. | -| N | `n` | integer | The number of images to generate. Must be between 1 and 10. For `dall-e-3`, only `n=1` is supported. | -| Quality | `quality` | string | The quality of the image that will be generated. `hd` creates images with finer details and greater consistency across the image. This param is only supported for `dall-e-3`.
Enum values
  • `standard`
  • `hd`
| -| Size | `size` | string | The size of the generated images. Must be one of `256x256`, `512x512`, or `1024x1024` for `dall-e-2`. Must be one of `1024x1024`, `1792x1024`, or `1024x1792` for `dall-e-3` models.
Enum values
  • `256x256`
  • `512x512`
  • `1024x1024`
  • `1792x1024`
  • `1024x1792`
| -| N | `style` | string | The style of the generated images. Must be one of `vivid` or `natural`. Vivid causes the model to lean towards generating hyper-real and dramatic images. Natural causes the model to produce more natural, less hyper-real looking images. This param is only supported for `dall-e-3`.
Enum values
  • `vivid`
  • `natural`
| -
- - - - - - -
- -| Output | Field ID | Format | Description | -| :--- | :--- | :--- | :--- | -| [Images](#text-to-image-images) | `results` | array[object] | Generated results. | -
- -
- Output Objects in Text to Image - -

Images

- -
- -| Field | Field ID | Format | Note | -| :--- | :--- | :--- | :--- | -| Generated Image | `image` | image/webp | Generated image. | -| Revised Prompt | `revised-prompt` | string | Revised prompt. | -
-
- - ## Example Recipes diff --git a/pkg/component/ai/openai/v0/config/definition.yaml b/pkg/component/ai/openai/v0/config/definition.yaml index d9ede2fee..633885127 100644 --- a/pkg/component/ai/openai/v0/config/definition.yaml +++ b/pkg/component/ai/openai/v0/config/definition.yaml @@ -1,9 +1,3 @@ -availableTasks: -- TASK_TEXT_GENERATION -- TASK_TEXT_EMBEDDINGS -- TASK_SPEECH_RECOGNITION -- TASK_TEXT_TO_SPEECH -- TASK_TEXT_TO_IMAGE custom: false icon: assets/openai.svg iconUrl: '' diff --git a/pkg/component/ai/perplexity/v0/config/definition.yaml b/pkg/component/ai/perplexity/v0/config/definition.yaml index ba7bd7e9a..17c5cc00d 100644 --- a/pkg/component/ai/perplexity/v0/config/definition.yaml +++ b/pkg/component/ai/perplexity/v0/config/definition.yaml @@ -1,5 +1,3 @@ -availableTasks: -- TASK_CHAT custom: false documentationUrl: https://www.instill.tech/docs/component/ai/perplexity icon: assets/perplexity.svg diff --git a/pkg/component/ai/stabilityai/v0/README.mdx b/pkg/component/ai/stabilityai/v0/README.mdx index 6d2fddfe7..7d303f4b5 100644 --- a/pkg/component/ai/stabilityai/v0/README.mdx +++ b/pkg/component/ai/stabilityai/v0/README.mdx @@ -7,8 +7,8 @@ description: "Learn about how to set up a VDP Stability AI component https://git The Stability AI component is an AI component that allows users to connect the AI models served on the Stability AI Platform. It can carry out the following tasks: -- [Text to Image](#text-to-image) - [Image to Image](#image-to-image) +- [Text to Image](#text-to-image) @@ -49,27 +49,30 @@ ${connection.}`. ## Supported Tasks -### Text to Image +### Image to Image -Generate a new image from a text prompt. +Modify an image based on a text prompt.
| Input | Field ID | Format | Description | | :--- | :--- | :--- | :--- | -| Task ID (required) | `task` | string | `TASK_TEXT_TO_IMAGE` | +| Task ID (required) | `task` | string | `TASK_IMAGE_TO_IMAGE` | | Engine (required) | `engine` | string | Stability AI Engine (model) to be used.
Enum values
  • `stable-diffusion-xl-1024-v1-0`
  • `stable-diffusion-xl-1024-v0-9`
  • `stable-diffusion-v1-6`
  • `esrgan-v1-x2plus`
  • `stable-diffusion-512-v2-1`
  • `stable-diffusion-xl-beta-v2-2-2`
| -| Prompts (required) | `prompts` | array | An array of prompts to use for generation. | -| Weights | `weights` | array[float] | An array of weights to use for generation. | -| CFG Scale | `cfg-scale` | number | How strictly the diffusion process adheres to the prompt text (higher values keep your image closer to your prompt) | +| Prompts (required) | `prompts` | array[string] | An array of prompts to use for generation. | +| Init Image | `init-image` | image | Image used to initialize the diffusion process, in lieu of random noise. | +| Weights | `weights` | array | An array of weights to use for generation. If unspecified, the model will automatically assign a default weight of 1.0 to each prompt. | | Clip Guidance Preset | `clip-guidance-preset` | string | Clip guidance preset.
Enum values
  • `FAST_BLUE`
  • `FAST_GREEN`
  • `NONE`
  • `SIMPLE`
  • `SLOW`
  • `SLOWER`
  • `SLOWEST`
| -| Height | `height` | integer | Height of the image to generate, in pixels, in an increment divible by 64. Engine-specific dimension validation: - SDXL Beta: must be between 128x128 and 512x896 (or 896x512); only one dimension can be greater than 512. - SDXL v0.9: must be one of 1024x1024, 1152x896, 1216x832, 1344x768, 1536x640, 640x1536, 768x1344, 832x1216, or 896x1152 - SDXL v1.0: same as SDXL v0.9 - SD v1.6: must be between 320x320 and 1536x1536 | -| Width | `width` | integer | Width of the image to generate, in pixels, in an increment divible by 64. Engine-specific dimension validation: - SDXL Beta: must be between 128x128 and 512x896 (or 896x512); only one dimension can be greater than 512. - SDXL v0.9: must be one of 1024x1024, 1152x896, 1216x832, 1344x768, 1536x640, 640x1536, 768x1344, 832x1216, or 896x1152 - SDXL v1.0: same as SDXL v0.9 - SD v1.6: must be between 320x320 and 1536x1536 | +| Image Strength | `image-strength` | number | How much influence the `init_image` has on the diffusion process. Values close to `1` will yield images very similar to the `init_image` while values close to `0` will yield images wildly different than the `init_image`. The behavior of this is meant to mirror DreamStudio's "Image Strength" slider.

This parameter is just an alternate way to set `step_schedule_start`, which is done via the calculation `1 - image_strength`. For example, passing in an Image Strength of 35% (`0.35`) would result in a `step_schedule_start` of `0.65`. | +| CFG Scale | `cfg-scale` | number | How strictly the diffusion process adheres to the prompt text (higher values keep your image closer to your prompt) | +| Init Image Mode | `init-image-mode` | string | Whether to use `image_strength` or `step_schedule_*` to control how much influence the `init_image` has on the result.
Enum values
  • `IMAGE_STRENGTH`
  • `STEP_SCHEDULE`
| | Sampler | `sampler` | string | Which sampler to use for the diffusion process. If this value is omitted we'll automatically select an appropriate sampler for you.
Enum values
  • `DDIM`
  • `DDPM`
  • `K_DPMPP_2M`
  • `K_DPMPP_2S_ANCESTRAL`
  • `K_DPM_2`
  • `K_DPM_2_ANCESTRAL`
  • `K_EULER`
  • `K_EULER_ANCESTRAL`
  • `K_HEUN`
  • `K_LMS`
| | Samples | `samples` | integer | Number of images to generate | | Seed | `seed` | integer | Random noise seed (omit this option or use `0` for a random seed) | +| Step Schedule Start | `step-schedule-start` | number | Skips a proportion of the start of the diffusion steps, allowing the init_image to influence the final generated image. Lower values will result in more influence from the init_image, while higher values will result in more influence from the diffusion steps. (e.g. a value of `0` would simply return you the init_image, where a value of `1` would return you a completely different image.) | +| Step Schedule End | `step-schedule-end` | number | Skips a proportion of the end of the diffusion steps, allowing the init_image to influence the final generated image. Lower values will result in more influence from the init_image, while higher values will result in more influence from the diffusion steps. | | Steps | `steps` | integer | Number of diffusion steps to run. | -| Style Preset | `style-preset` | string | Pass in a style preset to guide the image model towards a particular style. This list of style presets is subject to change.
Enum values
  • `enhance`
  • `anime`
  • `photographic`
  • `digital-art`
  • `comic-book`
  • `fantasy-art`
  • `line-art`
  • `analog-film`
  • `neon-punk`
  • `isometric`
  • `low-poly`
  • `origami`
  • `modeling-compound`
  • `cinematic`
  • `3d-model`
  • `pixel-art`
  • `tile-texture`
| +| Style Preset | `style-preset` | any | Pass in a style preset to guide the image model towards a particular style. This list of style presets is subject to change.
Enum values
  • `enhance`
  • `anime`
  • `photographic`
  • `digital-art`
  • `comic-book`
  • `fantasy-art`
  • `line-art`
  • `analog-film`
  • `neon-punk`
  • `isometric`
  • `low-poly`
  • `origami`
  • `modeling-compound`
  • `cinematic`
  • `3d-model`
  • `pixel-art`
  • `tile-texture`
|
@@ -86,30 +89,27 @@ Generate a new image from a text prompt. -### Image to Image +### Text to Image -Modify an image based on a text prompt. +Generate a new image from a text prompt.
| Input | Field ID | Format | Description | | :--- | :--- | :--- | :--- | -| Task ID (required) | `task` | string | `TASK_IMAGE_TO_IMAGE` | +| Task ID (required) | `task` | string | `TASK_TEXT_TO_IMAGE` | | Engine (required) | `engine` | string | Stability AI Engine (model) to be used.
Enum values
  • `stable-diffusion-xl-1024-v1-0`
  • `stable-diffusion-xl-1024-v0-9`
  • `stable-diffusion-v1-6`
  • `esrgan-v1-x2plus`
  • `stable-diffusion-512-v2-1`
  • `stable-diffusion-xl-beta-v2-2-2`
| -| Prompts (required) | `prompts` | array[string] | An array of prompts to use for generation. | -| Init Image | `init-image` | image | Image used to initialize the diffusion process, in lieu of random noise. | -| Weights | `weights` | array | An array of weights to use for generation. If unspecified, the model will automatically assign a default weight of 1.0 to each prompt. | -| Clip Guidance Preset | `clip-guidance-preset` | string | Clip guidance preset.
Enum values
  • `FAST_BLUE`
  • `FAST_GREEN`
  • `NONE`
  • `SIMPLE`
  • `SLOW`
  • `SLOWER`
  • `SLOWEST`
| -| Image Strength | `image-strength` | number | How much influence the `init_image` has on the diffusion process. Values close to `1` will yield images very similar to the `init_image` while values close to `0` will yield images wildly different than the `init_image`. The behavior of this is meant to mirror DreamStudio's "Image Strength" slider.

This parameter is just an alternate way to set `step_schedule_start`, which is done via the calculation `1 - image_strength`. For example, passing in an Image Strength of 35% (`0.35`) would result in a `step_schedule_start` of `0.65`. | +| Prompts (required) | `prompts` | array | An array of prompts to use for generation. | +| Weights | `weights` | array[float] | An array of weights to use for generation. | | CFG Scale | `cfg-scale` | number | How strictly the diffusion process adheres to the prompt text (higher values keep your image closer to your prompt) | -| Init Image Mode | `init-image-mode` | string | Whether to use `image_strength` or `step_schedule_*` to control how much influence the `init_image` has on the result.
Enum values
  • `IMAGE_STRENGTH`
  • `STEP_SCHEDULE`
| +| Clip Guidance Preset | `clip-guidance-preset` | string | Clip guidance preset.
Enum values
  • `FAST_BLUE`
  • `FAST_GREEN`
  • `NONE`
  • `SIMPLE`
  • `SLOW`
  • `SLOWER`
  • `SLOWEST`
| +| Height | `height` | integer | Height of the image to generate, in pixels, in an increment divible by 64. Engine-specific dimension validation: - SDXL Beta: must be between 128x128 and 512x896 (or 896x512); only one dimension can be greater than 512. - SDXL v0.9: must be one of 1024x1024, 1152x896, 1216x832, 1344x768, 1536x640, 640x1536, 768x1344, 832x1216, or 896x1152 - SDXL v1.0: same as SDXL v0.9 - SD v1.6: must be between 320x320 and 1536x1536 | +| Width | `width` | integer | Width of the image to generate, in pixels, in an increment divible by 64. Engine-specific dimension validation: - SDXL Beta: must be between 128x128 and 512x896 (or 896x512); only one dimension can be greater than 512. - SDXL v0.9: must be one of 1024x1024, 1152x896, 1216x832, 1344x768, 1536x640, 640x1536, 768x1344, 832x1216, or 896x1152 - SDXL v1.0: same as SDXL v0.9 - SD v1.6: must be between 320x320 and 1536x1536 | | Sampler | `sampler` | string | Which sampler to use for the diffusion process. If this value is omitted we'll automatically select an appropriate sampler for you.
Enum values
  • `DDIM`
  • `DDPM`
  • `K_DPMPP_2M`
  • `K_DPMPP_2S_ANCESTRAL`
  • `K_DPM_2`
  • `K_DPM_2_ANCESTRAL`
  • `K_EULER`
  • `K_EULER_ANCESTRAL`
  • `K_HEUN`
  • `K_LMS`
| | Samples | `samples` | integer | Number of images to generate | | Seed | `seed` | integer | Random noise seed (omit this option or use `0` for a random seed) | -| Step Schedule Start | `step-schedule-start` | number | Skips a proportion of the start of the diffusion steps, allowing the init_image to influence the final generated image. Lower values will result in more influence from the init_image, while higher values will result in more influence from the diffusion steps. (e.g. a value of `0` would simply return you the init_image, where a value of `1` would return you a completely different image.) | -| Step Schedule End | `step-schedule-end` | number | Skips a proportion of the end of the diffusion steps, allowing the init_image to influence the final generated image. Lower values will result in more influence from the init_image, while higher values will result in more influence from the diffusion steps. | | Steps | `steps` | integer | Number of diffusion steps to run. | -| Style Preset | `style-preset` | any | Pass in a style preset to guide the image model towards a particular style. This list of style presets is subject to change.
Enum values
  • `enhance`
  • `anime`
  • `photographic`
  • `digital-art`
  • `comic-book`
  • `fantasy-art`
  • `line-art`
  • `analog-film`
  • `neon-punk`
  • `isometric`
  • `low-poly`
  • `origami`
  • `modeling-compound`
  • `cinematic`
  • `3d-model`
  • `pixel-art`
  • `tile-texture`
| +| Style Preset | `style-preset` | string | Pass in a style preset to guide the image model towards a particular style. This list of style presets is subject to change.
Enum values
  • `enhance`
  • `anime`
  • `photographic`
  • `digital-art`
  • `comic-book`
  • `fantasy-art`
  • `line-art`
  • `analog-film`
  • `neon-punk`
  • `isometric`
  • `low-poly`
  • `origami`
  • `modeling-compound`
  • `cinematic`
  • `3d-model`
  • `pixel-art`
  • `tile-texture`
|
diff --git a/pkg/component/ai/stabilityai/v0/config/definition.yaml b/pkg/component/ai/stabilityai/v0/config/definition.yaml index 7dd539af3..1d153a077 100644 --- a/pkg/component/ai/stabilityai/v0/config/definition.yaml +++ b/pkg/component/ai/stabilityai/v0/config/definition.yaml @@ -1,6 +1,3 @@ -availableTasks: -- TASK_TEXT_TO_IMAGE -- TASK_IMAGE_TO_IMAGE custom: false documentationUrl: https://www.instill.tech/docs/component/ai/stability-ai icon: assets/stability-ai.svg diff --git a/pkg/component/ai/universalai/v0/config/definition.yaml b/pkg/component/ai/universalai/v0/config/definition.yaml index 4de217a4d..1c236657c 100644 --- a/pkg/component/ai/universalai/v0/config/definition.yaml +++ b/pkg/component/ai/universalai/v0/config/definition.yaml @@ -1,5 +1,3 @@ -availableTasks: -- TASK_CHAT custom: false icon: assets/universal-ai.svg id: universal-ai diff --git a/pkg/component/application/asana/v0/README.mdx b/pkg/component/application/asana/v0/README.mdx index 6dd2fe857..26a25c239 100644 --- a/pkg/component/application/asana/v0/README.mdx +++ b/pkg/component/application/asana/v0/README.mdx @@ -8,9 +8,9 @@ description: "Learn about how to set up a VDP Asana component https://github.com The Asana component is an application component that allows users to do anything available on Asana. It can carry out the following tasks: - [Crud Goal](#crud-goal) -- [Crud Task](#crud-task) -- [Crud Project](#crud-project) - [Crud Portfolio](#crud-portfolio) +- [Crud Project](#crud-project) +- [Crud Task](#crud-task) @@ -176,16 +176,16 @@ Create Goal.
-### Crud Task +### Crud Portfolio -Create, Update, Delete, Read and Duplicate Task in Asana. +Create, Update, Delete and Read portfolio in Asana.
| Input | Field ID | Format | Description | | :--- | :--- | :--- | :--- | -| Task ID (required) | `task` | string | `TASK_CRUD_TASK` | -| [Action](#crud-task-action) | `action` | object | Action. | +| Task ID (required) | `task` | string | `TASK_CRUD_PORTFOLIO` | +| [Action](#crud-portfolio-action) | `action` | object | action. |
@@ -194,142 +194,63 @@ Create, Update, Delete, Read and Duplicate Task in Asana.
The action Object -

Action

+

Action

`action` must fulfill one of the following schemas: -
Get
+
Get
-Get Task. +Get Portfolio.
| Field | Field ID | Format | Note | | :--- | :--- | :--- | :--- | | Action | `action` | string | Must be `"get"` | -| Task ID | `task-gid` | string | Globally unique identifier (GID) for the task. | +| Portfolio ID | `portfolio-gid` | string | Globally unique identifier (GID) for the portfolio. |
-
Update
+
Update
-Update Task. +Update Portfolio.
| Field | Field ID | Format | Note | | :--- | :--- | :--- | :--- | | Action | `action` | string | Must be `"update"` | -| Approval Status | `approval-status` | string | The approval status of the task. If you set completed to true, this field will be set to approved.
Enum values
  • `pending`
  • `approved`
  • `rejected`
  • `changes_requested`
| -| Assignee | `assignee` | string | GID of the assignee. | -| Completed | `completed` | boolean | Whether the task is currently marked complete. | -| Liked | `liked` | boolean | Whether the task is liked by the user. | -| Name of the task | `name` | string | Name of the task. This is generally a short sentence fragment that fits on a line in the UI for maximum readability. However, it can be longer. | -| Notes of the task | `notes` | string | Free-form textual information associated with the task (i.e. its description). | -| Parent Task | `parent` | string | GID of the parent task. | -| Resource Subtype | `resource-subtype` | string | The subtype of this resource. Different subtypes retain many of the same fields and behavior, but may render differently in Asana or represent resources with different semantic meaning.
Enum values
  • `default_task`
  • `milestone`
  • `section`
  • `approval`
  • `custom`
| -| Task ID | `task-gid` | string | Globally unique identifier (GID) for the task. | +| Update Color | `color` | string | The color of the portfolio.
Enum values
  • `dark-pink`
  • `dark-green`
  • `dark-blue`
  • `dark-red`
  • `dark-teal`
  • `dark-brown`
  • `dark-orange`
  • `dark-purple`
  • `dark-warm-gray`
  • `light-pink`
  • `light-green`
  • `light-blue`
  • `light-red`
  • `light-teal`
  • `light-brown`
  • `light-orange`
  • `light-purple`
  • `light-warm-gray`
  • `none`
  • `null`
| +| Portfolio Name | `name` | string | The name of the portfolio. | +| Portfolio ID | `portfolio-gid` | string | Globally unique identifier (GID) for the portfolio. | +| Public | `public` | boolean | Whether the portfolio is public. | +| Workspace | `workspace` | string | The workspace of the portfolio. Please fill in the Globally unique identifier (GID) for the workspace. |
-
Delete
+
Delete
-Delete Task. +Delete Portfolio.
| Field | Field ID | Format | Note | | :--- | :--- | :--- | :--- | | Action | `action` | string | Must be `"delete"` | -| Task ID | `task-gid` | string | Globally unique identifier (GID) for the task. | +| Portfolio ID | `portfolio-gid` | string | Globally unique identifier (GID) for the portfolio. |
-
Create
+
Create
-Create Task. +Create Portfolio.
| Field | Field ID | Format | Note | | :--- | :--- | :--- | :--- | | Action | `action` | string | Must be `"create"` | -| Approval Status | `approval-status` | string | The approval status of the task. If you set completed to true, this field will be set to approved.
Enum values
  • `pending`
  • `approved`
  • `rejected`
  • `changes_requested`
| -| Assignee | `assignee` | string | GID of the assignee. | -| Completed | `completed` | boolean | Whether the task is currently marked complete. | -| Due Date & Time | `due-at` | string | Date and time on which work begins for the task, or null if the task has no start time. This takes an ISO 8601 date string in UTC. | -| Liked | `liked` | boolean | Whether the task is liked by the user. | -| Task Name | `name` | string | The name of the task. | -| Task Notes | `notes` | string | The notes of the task. | -| Parent Task | `parent` | string | GID of the parent task. | -| Resource Subtype | `resource-subtype` | string | The subtype of this resource. Different subtypes retain many of the same fields and behavior, but may render differently in Asana or represent resources with different semantic meaning.
Enum values
  • `default_task`
  • `milestone`
  • `section`
  • `approval`
  • `custom`
| -| Start Date & Time | `start-at` | string | The UTC date and time on which this task is due, or null if the task has no due time. This takes an ISO 8601 date string in UTC. | -| Workspace | `workspace` | string | GID of the workspace. You can find one by filling the access token in the Asana API Playground. | -
- -
Duplicate
- -Duplicate Task. - -
- -| Field | Field ID | Format | Note | -| :--- | :--- | :--- | :--- | -| Action | `action` | string | Must be `"duplicate"` | -| Name | `name` | string | Name of the new task. This is generally a short sentence fragment that fits on a line in the UI for maximum readability. However, it can be longer. | -| Task ID | `task-gid` | string | Globally unique identifier (GID) for the task. | -
- -
Set Parent
- -Set Parent Task. - -
- -| Field | Field ID | Format | Note | -| :--- | :--- | :--- | :--- | -| Action | `action` | string | Must be `"set parent"` | -| Parent Task | `parent` | string | GID of the parent task. | -| Task ID | `task-gid` | string | Globally unique identifier (GID) for the task. | -
- -
Edit Tag
- -Edit Tag. - -
- -| Field | Field ID | Format | Note | -| :--- | :--- | :--- | :--- | -| Action | `action` | string | Must be `"edit tag"` | -| Edit option | `edit-option` | string | Edit option. You can choose to add or remove the tag.
Enum values
  • `add`
  • `remove`
| -| Tag ID | `tag-gid` | string | Globally unique identifier (GID) for the tag. | -| Task ID | `task-gid` | string | Globally unique identifier (GID) for the task. | -
- -
Edit Follower
- -Edit Follower. - -
- -| Field | Field ID | Format | Note | -| :--- | :--- | :--- | :--- | -| Action | `action` | string | Must be `"edit follower"` | -| Edit option | `edit-option` | string | Edit option. You can choose to add or remove the follower.
Enum values
  • `add`
  • `remove`
| -| Followers | `followers` | string | This can either be the string "me", an email, or the gid of a user. For multiple followers, separate them with commas. | -| Task ID | `task-gid` | string | Globally unique identifier (GID) for the task. | -
- -
Edit Project
- -Edit Project. - -
- -| Field | Field ID | Format | Note | -| :--- | :--- | :--- | :--- | -| Action | `action` | string | Must be `"edit project"` | -| Edit option | `edit-option` | string | Edit option. You can choose to add or remove the project.
Enum values
  • `add`
  • `remove`
| -| Project ID | `project-gid` | string | Globally unique identifier (GID) for the project. | -| Task ID | `task-gid` | string | Globally unique identifier (GID) for the task. | +| Color | `color` | string | The color of the portfolio.
Enum values
  • `dark-pink`
  • `dark-green`
  • `dark-blue`
  • `dark-red`
  • `dark-teal`
  • `dark-brown`
  • `dark-orange`
  • `dark-purple`
  • `dark-warm-gray`
  • `light-pink`
  • `light-green`
  • `light-blue`
  • `light-red`
  • `light-teal`
  • `light-brown`
  • `light-orange`
  • `light-purple`
  • `light-warm-gray`
  • `none`
  • `null`
| +| Portfolio Name | `name` | string | The name of the portfolio. | +| Public | `public` | boolean | Whether the portfolio is public. | +| Workspace | `workspace` | string | The workspace of the portfolio. Please fill in the Globally unique identifier (GID) for the workspace. |
@@ -337,44 +258,40 @@ Edit Project. | Output | Field ID | Format | Description | | :--- | :--- | :--- | :--- | -| Task ID (optional) | `gid` | string | Globally unique identifier (GID) for the task. | -| Task Name (optional) | `name` | string | The name of the task. | -| Task Notes (optional) | `notes` | string | The notes of the task. | -| Task Notes in HTML Format (optional) | `html-notes` | string | The notes of the task in HTML format. | -| Due Date (optional) | `due-on` | string | The date on which the task is due. In the format YYYY-MM-DD. | -| [Projects](#crud-task-projects) (optional) | `projects` | array[object] | The projects of the task. | -| Start Date (optional) | `start-on` | string | The date on which the task starts. In the format YYYY-MM-DD. | -| Liked (optional) | `liked` | boolean | Whether the task is liked by the user. | -| [Likes](#crud-task-likes) (optional) | `likes` | array[object] | The users who likes the task. | -| Approval Status (optional) | `approval-status` | string | The approval status of the task. If you set completed to true, this field will be set to approved. | -| Resource Subtype (optional) | `resource-subtype` | string | The subtype of this resource. Different subtypes retain many of the same fields and behavior, but may render differently in Asana or represent resources with different semantic meaning. | -| Completed (optional) | `completed` | boolean | Whether the task is currently marked complete. | -| Assignee (optional) | `assignee` | string | GID of the assignee. | -| Parent Task (optional) | `parent` | string | GID of the parent task. | +| Portfolio ID (optional) | `gid` | string | Globally unique identifier (GID) for the portfolio. | +| Portfolio Name (optional) | `name` | string | The name of the portfolio. | +| [Owner](#crud-portfolio-owner) (optional) | `owner` | object | The owner of the portfolio. | +| Due Date (optional) | `due-on` | string | The date on which the portfolio is due. In the format YYYY-MM-DD. | +| Start Date (optional) | `start-on` | string | The date on which the portfolio starts. In the format YYYY-MM-DD. | +| Color (optional) | `color` | string | The color of the portfolio. | +| Public (optional) | `public` | boolean | Whether the portfolio is public. | +| [Created By](#crud-portfolio-created-by) (optional) | `created-by` | object | The user who created the portfolio. | +| Current Status (optional) | `current-status` | array[json] | The current status of the portfolio. | +| Custom Fields (optional) | `custom-fields` | array[json] | The custom fields of the portfolio. | +| Custom Field Settings (optional) | `custom-field-settings` | array[json] | The custom field settings of the portfolio. |
- Output Objects in Crud Task + Output Objects in Crud Portfolio -

Projects

+

Owner

| Field | Field ID | Format | Note | | :--- | :--- | :--- | :--- | -| Project ID | `gid` | string | Globally unique identifier (GID) for the project. | -| Project Name | `name` | string | The name of the project. | +| Owner ID | `gid` | string | Globally unique identifier (GID) for the owner. | +| Owner Name | `name` | string | The name of the owner. |
-

Likes

+

Created By

| Field | Field ID | Format | Note | | :--- | :--- | :--- | :--- | -| Like ID | `like-gid` | string | Globally unique identifier (GID) for the like. | +| User ID | `gid` | string | Globally unique identifier (GID) for the user. | | User Name | `name` | string | The name of the user. | -| User ID | `user-gid` | string | Globally unique identifier (GID) for the user. |
@@ -528,16 +445,16 @@ Duplicate Project.
-### Crud Portfolio +### Crud Task -Create, Update, Delete and Read portfolio in Asana. +Create, Update, Delete, Read and Duplicate Task in Asana.
| Input | Field ID | Format | Description | | :--- | :--- | :--- | :--- | -| Task ID (required) | `task` | string | `TASK_CRUD_PORTFOLIO` | -| [Action](#crud-portfolio-action) | `action` | object | action. | +| Task ID (required) | `task` | string | `TASK_CRUD_TASK` | +| [Action](#crud-task-action) | `action` | object | Action. |
@@ -546,63 +463,142 @@ Create, Update, Delete and Read portfolio in Asana.
The action Object -

Action

+

Action

`action` must fulfill one of the following schemas: -
Get
+
Get
-Get Portfolio. +Get Task.
| Field | Field ID | Format | Note | | :--- | :--- | :--- | :--- | | Action | `action` | string | Must be `"get"` | -| Portfolio ID | `portfolio-gid` | string | Globally unique identifier (GID) for the portfolio. | +| Task ID | `task-gid` | string | Globally unique identifier (GID) for the task. |
-
Update
+
Update
-Update Portfolio. +Update Task.
| Field | Field ID | Format | Note | | :--- | :--- | :--- | :--- | | Action | `action` | string | Must be `"update"` | -| Update Color | `color` | string | The color of the portfolio.
Enum values
  • `dark-pink`
  • `dark-green`
  • `dark-blue`
  • `dark-red`
  • `dark-teal`
  • `dark-brown`
  • `dark-orange`
  • `dark-purple`
  • `dark-warm-gray`
  • `light-pink`
  • `light-green`
  • `light-blue`
  • `light-red`
  • `light-teal`
  • `light-brown`
  • `light-orange`
  • `light-purple`
  • `light-warm-gray`
  • `none`
  • `null`
| -| Portfolio Name | `name` | string | The name of the portfolio. | -| Portfolio ID | `portfolio-gid` | string | Globally unique identifier (GID) for the portfolio. | -| Public | `public` | boolean | Whether the portfolio is public. | -| Workspace | `workspace` | string | The workspace of the portfolio. Please fill in the Globally unique identifier (GID) for the workspace. | +| Approval Status | `approval-status` | string | The approval status of the task. If you set completed to true, this field will be set to approved.
Enum values
  • `pending`
  • `approved`
  • `rejected`
  • `changes_requested`
| +| Assignee | `assignee` | string | GID of the assignee. | +| Completed | `completed` | boolean | Whether the task is currently marked complete. | +| Liked | `liked` | boolean | Whether the task is liked by the user. | +| Name of the task | `name` | string | Name of the task. This is generally a short sentence fragment that fits on a line in the UI for maximum readability. However, it can be longer. | +| Notes of the task | `notes` | string | Free-form textual information associated with the task (i.e. its description). | +| Parent Task | `parent` | string | GID of the parent task. | +| Resource Subtype | `resource-subtype` | string | The subtype of this resource. Different subtypes retain many of the same fields and behavior, but may render differently in Asana or represent resources with different semantic meaning.
Enum values
  • `default_task`
  • `milestone`
  • `section`
  • `approval`
  • `custom`
| +| Task ID | `task-gid` | string | Globally unique identifier (GID) for the task. |
-
Delete
+
Delete
-Delete Portfolio. +Delete Task.
| Field | Field ID | Format | Note | | :--- | :--- | :--- | :--- | | Action | `action` | string | Must be `"delete"` | -| Portfolio ID | `portfolio-gid` | string | Globally unique identifier (GID) for the portfolio. | +| Task ID | `task-gid` | string | Globally unique identifier (GID) for the task. |
-
Create
+
Create
-Create Portfolio. +Create Task.
| Field | Field ID | Format | Note | | :--- | :--- | :--- | :--- | | Action | `action` | string | Must be `"create"` | -| Color | `color` | string | The color of the portfolio.
Enum values
  • `dark-pink`
  • `dark-green`
  • `dark-blue`
  • `dark-red`
  • `dark-teal`
  • `dark-brown`
  • `dark-orange`
  • `dark-purple`
  • `dark-warm-gray`
  • `light-pink`
  • `light-green`
  • `light-blue`
  • `light-red`
  • `light-teal`
  • `light-brown`
  • `light-orange`
  • `light-purple`
  • `light-warm-gray`
  • `none`
  • `null`
| -| Portfolio Name | `name` | string | The name of the portfolio. | -| Public | `public` | boolean | Whether the portfolio is public. | -| Workspace | `workspace` | string | The workspace of the portfolio. Please fill in the Globally unique identifier (GID) for the workspace. | +| Approval Status | `approval-status` | string | The approval status of the task. If you set completed to true, this field will be set to approved.
Enum values
  • `pending`
  • `approved`
  • `rejected`
  • `changes_requested`
| +| Assignee | `assignee` | string | GID of the assignee. | +| Completed | `completed` | boolean | Whether the task is currently marked complete. | +| Due Date & Time | `due-at` | string | Date and time on which work begins for the task, or null if the task has no start time. This takes an ISO 8601 date string in UTC. | +| Liked | `liked` | boolean | Whether the task is liked by the user. | +| Task Name | `name` | string | The name of the task. | +| Task Notes | `notes` | string | The notes of the task. | +| Parent Task | `parent` | string | GID of the parent task. | +| Resource Subtype | `resource-subtype` | string | The subtype of this resource. Different subtypes retain many of the same fields and behavior, but may render differently in Asana or represent resources with different semantic meaning.
Enum values
  • `default_task`
  • `milestone`
  • `section`
  • `approval`
  • `custom`
| +| Start Date & Time | `start-at` | string | The UTC date and time on which this task is due, or null if the task has no due time. This takes an ISO 8601 date string in UTC. | +| Workspace | `workspace` | string | GID of the workspace. You can find one by filling the access token in the Asana API Playground. | +
+ +
Duplicate
+ +Duplicate Task. + +
+ +| Field | Field ID | Format | Note | +| :--- | :--- | :--- | :--- | +| Action | `action` | string | Must be `"duplicate"` | +| Name | `name` | string | Name of the new task. This is generally a short sentence fragment that fits on a line in the UI for maximum readability. However, it can be longer. | +| Task ID | `task-gid` | string | Globally unique identifier (GID) for the task. | +
+ +
Set Parent
+ +Set Parent Task. + +
+ +| Field | Field ID | Format | Note | +| :--- | :--- | :--- | :--- | +| Action | `action` | string | Must be `"set parent"` | +| Parent Task | `parent` | string | GID of the parent task. | +| Task ID | `task-gid` | string | Globally unique identifier (GID) for the task. | +
+ +
Edit Tag
+ +Edit Tag. + +
+ +| Field | Field ID | Format | Note | +| :--- | :--- | :--- | :--- | +| Action | `action` | string | Must be `"edit tag"` | +| Edit option | `edit-option` | string | Edit option. You can choose to add or remove the tag.
Enum values
  • `add`
  • `remove`
| +| Tag ID | `tag-gid` | string | Globally unique identifier (GID) for the tag. | +| Task ID | `task-gid` | string | Globally unique identifier (GID) for the task. | +
+ +
Edit Follower
+ +Edit Follower. + +
+ +| Field | Field ID | Format | Note | +| :--- | :--- | :--- | :--- | +| Action | `action` | string | Must be `"edit follower"` | +| Edit option | `edit-option` | string | Edit option. You can choose to add or remove the follower.
Enum values
  • `add`
  • `remove`
| +| Followers | `followers` | string | This can either be the string "me", an email, or the gid of a user. For multiple followers, separate them with commas. | +| Task ID | `task-gid` | string | Globally unique identifier (GID) for the task. | +
+ +
Edit Project
+ +Edit Project. + +
+ +| Field | Field ID | Format | Note | +| :--- | :--- | :--- | :--- | +| Action | `action` | string | Must be `"edit project"` | +| Edit option | `edit-option` | string | Edit option. You can choose to add or remove the project.
Enum values
  • `add`
  • `remove`
| +| Project ID | `project-gid` | string | Globally unique identifier (GID) for the project. | +| Task ID | `task-gid` | string | Globally unique identifier (GID) for the task. |
@@ -610,40 +606,44 @@ Create Portfolio. | Output | Field ID | Format | Description | | :--- | :--- | :--- | :--- | -| Portfolio ID (optional) | `gid` | string | Globally unique identifier (GID) for the portfolio. | -| Portfolio Name (optional) | `name` | string | The name of the portfolio. | -| [Owner](#crud-portfolio-owner) (optional) | `owner` | object | The owner of the portfolio. | -| Due Date (optional) | `due-on` | string | The date on which the portfolio is due. In the format YYYY-MM-DD. | -| Start Date (optional) | `start-on` | string | The date on which the portfolio starts. In the format YYYY-MM-DD. | -| Color (optional) | `color` | string | The color of the portfolio. | -| Public (optional) | `public` | boolean | Whether the portfolio is public. | -| [Created By](#crud-portfolio-created-by) (optional) | `created-by` | object | The user who created the portfolio. | -| Current Status (optional) | `current-status` | array[json] | The current status of the portfolio. | -| Custom Fields (optional) | `custom-fields` | array[json] | The custom fields of the portfolio. | -| Custom Field Settings (optional) | `custom-field-settings` | array[json] | The custom field settings of the portfolio. | +| Task ID (optional) | `gid` | string | Globally unique identifier (GID) for the task. | +| Task Name (optional) | `name` | string | The name of the task. | +| Task Notes (optional) | `notes` | string | The notes of the task. | +| Task Notes in HTML Format (optional) | `html-notes` | string | The notes of the task in HTML format. | +| Due Date (optional) | `due-on` | string | The date on which the task is due. In the format YYYY-MM-DD. | +| [Projects](#crud-task-projects) (optional) | `projects` | array[object] | The projects of the task. | +| Start Date (optional) | `start-on` | string | The date on which the task starts. In the format YYYY-MM-DD. | +| Liked (optional) | `liked` | boolean | Whether the task is liked by the user. | +| [Likes](#crud-task-likes) (optional) | `likes` | array[object] | The users who likes the task. | +| Approval Status (optional) | `approval-status` | string | The approval status of the task. If you set completed to true, this field will be set to approved. | +| Resource Subtype (optional) | `resource-subtype` | string | The subtype of this resource. Different subtypes retain many of the same fields and behavior, but may render differently in Asana or represent resources with different semantic meaning. | +| Completed (optional) | `completed` | boolean | Whether the task is currently marked complete. | +| Assignee (optional) | `assignee` | string | GID of the assignee. | +| Parent Task (optional) | `parent` | string | GID of the parent task. |
- Output Objects in Crud Portfolio + Output Objects in Crud Task -

Owner

+

Projects

| Field | Field ID | Format | Note | | :--- | :--- | :--- | :--- | -| Owner ID | `gid` | string | Globally unique identifier (GID) for the owner. | -| Owner Name | `name` | string | The name of the owner. | +| Project ID | `gid` | string | Globally unique identifier (GID) for the project. | +| Project Name | `name` | string | The name of the project. |
-

Created By

+

Likes

| Field | Field ID | Format | Note | | :--- | :--- | :--- | :--- | -| User ID | `gid` | string | Globally unique identifier (GID) for the user. | +| Like ID | `like-gid` | string | Globally unique identifier (GID) for the like. | | User Name | `name` | string | The name of the user. | +| User ID | `user-gid` | string | Globally unique identifier (GID) for the user. |
diff --git a/pkg/component/application/asana/v0/config/definition.yaml b/pkg/component/application/asana/v0/config/definition.yaml index 1e4c742e5..ff669280b 100644 --- a/pkg/component/application/asana/v0/config/definition.yaml +++ b/pkg/component/application/asana/v0/config/definition.yaml @@ -1,8 +1,3 @@ -availableTasks: -- TASK_CRUD_GOAL -- TASK_CRUD_TASK -- TASK_CRUD_PROJECT -- TASK_CRUD_PORTFOLIO documentationUrl: https://www.instill.tech/docs/component/application/asana icon: assets/asana.svg id: asana diff --git a/pkg/component/application/email/v0/README.mdx b/pkg/component/application/email/v0/README.mdx index 9c3bf935d..6ac9dd2c2 100644 --- a/pkg/component/application/email/v0/README.mdx +++ b/pkg/component/application/email/v0/README.mdx @@ -7,8 +7,8 @@ description: "Learn about how to set up a VDP Email component https://github.com The Email component is an application component that allows users to get and send email from Mail Protocol. It can carry out the following tasks: -- [Send Email](#send-email) - [Read Emails](#read-emails) +- [Send Email](#send-email) You can connect to different email servers through the Email component. Emails are fetched and sent using the IMAP and SMTP protocols, respectively. You can set the server address and port for each protocol in the component configuration. @@ -80,35 +80,6 @@ For App Password, please follow the steps below: ## Supported Tasks -### Send Email - -Send an email to recipients - -
- -| Input | Field ID | Format | Description | -| :--- | :--- | :--- | :--- | -| Task ID (required) | `task` | string | `TASK_SEND_EMAIL` | -| Recipient (required) | `recipients` | array[string] | The email addresses of the recipients. | -| CC | `cc` | array[string] | The email addresses for Carbon Copy. | -| BCC | `bcc` | array[string] | The email addresses for Blind Carbon Copy. | -| Subject | `subject` | string | The subject of the email. | -| Message (required) | `message` | string | The message to be sent. | -
- - - - - - -
- -| Output | Field ID | Format | Description | -| :--- | :--- | :--- | :--- | -| Result | `result` | string | The result of sending the email. | -
- - ### Read Emails Read emails from a mailbox @@ -185,4 +156,33 @@ Take Gmail as an example, the mailbox names are following. You need to input the exact same email address with `<` as a prefix and `>` as a suffix as the email you want to search for. For example, if you want to search for the email from `email@example.com`, you need to input ``. +### Send Email + +Send an email to recipients + +
+ +| Input | Field ID | Format | Description | +| :--- | :--- | :--- | :--- | +| Task ID (required) | `task` | string | `TASK_SEND_EMAIL` | +| Recipient (required) | `recipients` | array[string] | The email addresses of the recipients. | +| CC | `cc` | array[string] | The email addresses for Carbon Copy. | +| BCC | `bcc` | array[string] | The email addresses for Blind Carbon Copy. | +| Subject | `subject` | string | The subject of the email. | +| Message (required) | `message` | string | The message to be sent. | +
+ + + + + + +
+ +| Output | Field ID | Format | Description | +| :--- | :--- | :--- | :--- | +| Result | `result` | string | The result of sending the email. | +
+ + diff --git a/pkg/component/application/email/v0/config/definition.yaml b/pkg/component/application/email/v0/config/definition.yaml index f5f186049..9bada5a77 100644 --- a/pkg/component/application/email/v0/config/definition.yaml +++ b/pkg/component/application/email/v0/config/definition.yaml @@ -1,6 +1,3 @@ -availableTasks: -- TASK_SEND_EMAIL -- TASK_READ_EMAILS documentationUrl: https://www.instill.tech/docs/component/application/email icon: assets/email.svg id: email diff --git a/pkg/component/application/freshdesk/v0/README.mdx b/pkg/component/application/freshdesk/v0/README.mdx index bfeb7b980..9df96c8a6 100644 --- a/pkg/component/application/freshdesk/v0/README.mdx +++ b/pkg/component/application/freshdesk/v0/README.mdx @@ -7,21 +7,21 @@ description: "Learn about how to set up a VDP Freshdesk component https://github The Freshdesk component is an application component that allows users to use Freshdesk API to manage tickets, contacts and more. It can carry out the following tasks: -- [Get Ticket](#get-ticket) +- [Create Company](#create-company) +- [Create Contact](#create-contact) - [Create Ticket](#create-ticket) -- [Reply to Ticket](#reply-to-ticket) - [Create Ticket Note](#create-ticket-note) +- [Get Agent](#get-agent) +- [Get All](#get-all) - [Get All Conversations](#get-all-conversations) -- [Get Contact](#get-contact) -- [Create Contact](#create-contact) - [Get Company](#get-company) -- [Create Company](#create-company) -- [Get All](#get-all) +- [Get Contact](#get-contact) +- [Get Group](#get-group) - [Get Product](#get-product) -- [Get Agent](#get-agent) - [Get Role](#get-role) -- [Get Group](#get-group) - [Get Skill](#get-skill) +- [Get Ticket](#get-ticket) +- [Reply to Ticket](#reply-to-ticket) @@ -63,16 +63,23 @@ ${connection.}`. ## Supported Tasks -### Get Ticket +### Create Company -Get ticket using ID +Create company
| Input | Field ID | Format | Description | | :--- | :--- | :--- | :--- | -| Task ID (required) | `task` | string | `TASK_GET_TICKET` | -| Ticket ID (required) | `ticket-id` | integer | The ID of the ticket. | +| Task ID (required) | `task` | string | `TASK_CREATE_COMPANY` | +| Name (required) | `name` | string | Name of the company. | +| Description | `description` | string | Description of the company. | +| Note | `note` | string | Note about the company. | +| Domains | `domains` | array[string] | Domains of the company. | +| Health Score | `health-score` | string | The strength of your relationship with the company. To look at all the possible values or create custom values, please go to Admin -> Customer Fields. Default values: "At risk", "Doing okay", "Happy". | +| Account Tier | `account-tier` | string | Classification based on how much value the company brings to your business. To look at all the possible values or create custom values, please go to Admin -> Customer Fields. Default values: "Basic", "Premium", "Enterprise". | +| Renewal Date | `renewal-date` | string | Date when your contract or relationship with the company is due for renewal. Enter in the format YYYY-MM-DD. | +| Industry | `industry` | string | The industry in which the company operates. To look at all the possible values or create custom values, please go to Admin -> Customer Fields. |
@@ -84,54 +91,51 @@ Get ticket using ID | Output | Field ID | Format | Description | | :--- | :--- | :--- | :--- | -| Subject | `subject` | string | Subject of the ticket. | -| Description Text | `description-text` | string | Content of the ticket. | -| Source | `source` | string | Source of the ticket. Eg: Email. | -| Status | `status` | string | Status of the ticket. Eg: Pending. | -| Priority | `priority` | string | Priority of the ticket. Eg: Medium. | -| Ticket Type (optional) | `ticket-type` | string | Used to categorize the ticket. To check the possible types a ticket can have, please go to Admin -> Ticket Fields. | -| Association Type (optional) | `association-type` | string | Used to determine whether a ticket is a parent, child, tracker or related ticket. | -| Associated Ticket List (optional) | `associated-ticket-list` | array[integer] | List of associated ticket IDs. | -| Tags (optional) | `tags` | array[string] | Tags associated with the ticket. | -| CC Emails (optional) | `cc-emails` | array[string] | Email addresses added in the 'cc' field of the incoming ticket email. | -| Forward Emails (optional) | `forward-emails` | array[string] | Email addresses added while forwarding a ticket. | -| Reply CC Emails (optional) | `reply-cc-emails` | array[string] | Email addresses added while replying to a ticket. | -| Requester ID | `requester-id` | integer | ID of the requester. | -| Responder ID (optional) | `responder-id` | integer | ID of the agent to whom the ticket has been assigned. List of agents can be found in Admin -> Agents. | -| Company ID (optional) | `company-id` | integer | ID of the company to which this ticket belongs. | -| Group ID (optional) | `group-id` | integer | ID of the group to which the ticket has been assigned. List of groups can be found in Admin -> Groups. | -| Product ID (optional) | `product-id` | integer | ID of the product to which the ticket is associated. List of products can be found in Admin -> Multiple Products. | -| Support Email (optional) | `support-email` | string | Support email address. You can find it in Admin -> Email (under channel). | -| To Emails (optional) | `to-emails` | array[string] | Email addresses to which the ticket was originally sent. | -| Spam (optional) | `spam` | boolean | Set to true if the ticket is marked as spam. | -| Due By (optional) | `due-by` | string | Timestamp that denotes when the ticket is due to be resolved. In UTC format. | -| Is Escalated (optional) | `is-escalated` | boolean | Set to true if the ticket has been escalated. | -| First Response Due By (optional) | `first-response-due-by` | string | Timestamp that denotes when the first response is due. In UTC format. You can adjust this by going to Admin -> SLA policy (under Workflows). | -| First Response Escalated (optional) | `first-response-escalated` | boolean | Set to true if the ticket has been escalated as the result of first response time being breached. | -| Next Response Due By (optional) | `next-response-due-by` | string | Timestamp that denotes when the next response is due. In UTC format. You can adjust this by going to Admin -> SLA policy (under Workflows). | -| Next Response Escalated (optional) | `next-response-escalated` | boolean | Set to true if the ticket has been escalated as the result of next response time being breached. | -| Created At | `created-at` | string | Timestamp that denotes when the ticket/conversation was created. In UTC format. | -| Updated At | `updated-at` | string | Timestamp that denotes when the ticket was last updated. In UTC format. | -| [Attachments](#get-ticket-attachments) (optional) | `attachments` | array[object] | Ticket attachments (cannot be more than 20MB). | -| Sentiment Score (optional) | `sentiment-score` | integer | Freshdesk uses AI to assess the emotional tone and attitude expressed in customer interaction. | -| Initial Sentiment Score (optional) | `initial-sentiment-score` | integer | The initial sentiment score of the ticket. | -| Custom Fields (optional) | `custom-fields` | json | Custom fields that the ticket have. Custom fields can be created or modified in Admin -> Ticket Fields. | +| Company ID | `company-id` | integer | ID of the company. | +| Created At | `created-at` | string | Timestamp that denotes when the company was created. In UTC format. | -
- Output Objects in Get Ticket -

Attachments

+### Create Contact + +Create contact
-| Field | Field ID | Format | Note | +| Input | Field ID | Format | Description | | :--- | :--- | :--- | :--- | -| Attachment Content Type | `content-type` | string | The type of the file. | -| Attachment Name | `name` | string | The name of the file. | -| Attachment URL | `url` | string | The URL to the attachment. | +| Task ID (required) | `task` | string | `TASK_CREATE_CONTACT` | +| Name (required) | `name` | string | Name of the contact. | +| Email | `email` | string | The primary email address of the contact. | +| Phone | `phone` | string | Telephone number of the contact. | +| Mobile | `mobile` | string | Mobile number of the contact. | +| Description | `description` | string | Description of the contact. | +| Address | `address` | string | Address of the contact. | +| Job Title | `job-title` | string | Job title of the contact. | +| Tags | `tags` | array[string] | Tags associated with the contact. | +| Language | `language` | string | Language of the contact.
Enum values
  • `Arabic`
  • `Bosnian`
  • `Bulgarian`
  • `Catalan`
  • `Chinese`
  • `Chinese (Traditional)`
  • `Croatian`
  • `Czech`
  • `Danish`
  • `Dutch`
  • `English`
  • `Estonian`
  • `Filipino`
  • `Finnish`
  • `French`
  • `German`
  • `Greek`
  • `Hebrew`
  • `Hungarian`
  • `Icelandic`
  • `Indonesian`
  • `Italian`
  • `Japanese`
  • `Korean`
  • `Latvian`
  • `Lithuanian`
  • `Malay`
  • `Norwegian`
  • `Polish`
  • `Portuguese (BR)`
  • `Portuguese/Portugal`
  • `Romanian`
  • `Russian`
  • `Serbian`
  • `Slovak`
  • `Slovenian`
  • `Spanish`
  • `Spanish (Latin America)`
  • `Swedish`
  • `Thai`
  • `Turkish`
  • `Ukrainian`
  • `Vietnamese`
| +| Time Zone | `time-zone` | string | Time zone of the contact.
Enum values
  • `American Samoa`
  • `International Date Line West`
  • `Midway Island`
  • `Hawaii`
  • `Alaska`
  • `Pacific Time (US & Canada)`
  • `Tijuana`
  • `Arizona`
  • `Mazatlan`
  • `Mountain Time (US & Canada)`
  • `Central America`
  • `Central Time (US & Canada)`
  • `Chihuahua`
  • `Guadalajara`
  • `Mexico City`
  • `Monterrey`
  • `Saskatchewan`
  • `Bogota`
  • `Eastern Time (US & Canada)`
  • `Indiana (East)`
  • `Lima`
  • `Quito`
  • `Atlantic Time (Canada)`
  • `Caracas`
  • `Georgetown`
  • `La Paz`
  • `Santiago`
  • `Newfoundland`
  • `Brasilia`
  • `Buenos Aires`
  • `Montevideo`
  • `Greenland`
  • `Mid-Atlantic`
  • `Azores`
  • `Cape Verde Is.`
  • `Casablanca`
  • `Dublin`
  • `Edinburgh`
  • `Lisbon`
  • `London`
  • `Monrovia`
  • `UTC`
  • `Amsterdam`
  • `Belgrade`
  • `Berlin`
  • `Bern`
  • `Bratislava`
  • `Brussels`
  • `Budapest`
  • `Copenhagen`
  • `Ljubljana`
  • `Madrid`
  • `Paris`
  • `Prague`
  • `Rome`
  • `Sarajevo`
  • `Skopje`
  • `Stockholm`
  • `Vienna`
  • `Warsaw`
  • `West Central Africa`
  • `Zagreb`
  • `Athens`
  • `Bucharest`
  • `Cairo`
  • `Harare`
  • `Helsinki`
  • `Jerusalem`
  • `Kaliningrad`
  • `Kyiv`
  • `Pretoria`
  • `Riga`
  • `Sofia`
  • `Tallinn`
  • `Vilnius`
  • `Baghdad`
  • `Istanbul`
  • `Kuwait`
  • `Minsk`
  • `Moscow`
  • `Nairobi`
  • `Riyadh`
  • `St. Petersburg`
  • `Volgograd`
  • `Tehran`
  • `Abu Dhabi`
  • `Baku`
  • `Muscat`
  • `Samara`
  • `Tbilisi`
  • `Yerevan`
  • `Kabul`
  • `Ekaterinburg`
  • `Islamabad`
  • `Karachi`
  • `Tashkent`
  • `Chennai`
  • `Kolkata`
  • `Mumbai`
  • `New Delhi`
  • `Sri Jayawardenepura`
  • `Kathmandu`
  • `Almaty`
  • `Astana`
  • `Dhaka`
  • `Urumqi`
  • `Rangoon`
  • `Bangkok`
  • `Hanoi`
  • `Jakarta`
  • `Krasnoyarsk`
  • `Novosibirsk`
  • `Beijing`
  • `Chongqing`
  • `Hong Kong`
  • `Irkutsk`
  • `Kuala Lumpur`
  • `Perth`
  • `Singapore`
  • `Taipei`
  • `Ulaanbaatar`
  • `Osaka`
  • `Sapporo`
  • `Seoul`
  • `Tokyo`
  • `Yakutsk`
  • `Adelaide`
  • `Darwin`
  • `Brisbane`
  • `Canberra`
  • `Guam`
  • `Hobart`
  • `Melbourne`
  • `Port Moresby`
  • `Sydney`
  • `Vladivostok`
  • `Magadan`
  • `New Caledonia`
  • `Solomon Is.`
  • `Srednekolymsk`
  • `Auckland`
  • `Fiji`
  • `Kamchatka`
  • `Marshall Is.`
  • `Wellington`
  • `Chatham Is.`
  • `Nuku'alofa`
  • `Samoa`
  • `Tokelau Is.`
| +| Company ID | `company-id` | integer | ID of the primary company to which the contact belongs. | +| Unique External ID | `unique-external-id` | string | Unique external ID of the contact which be assigned by the user(agent). | +| Twitter ID | `twitter-id` | string | Twitter ID of the contact. | +| View All Tickets | `view-all-tickets` | boolean | Used to determine if the contact can see all the tickets that are associated with the primary company. Note: this property will be ignored if the Company ID is not provided. | +| Other Emails | `other-emails` | array[string] | List of other email addresses of the contact. | +| Other Companies | `other-companies` | array[string] | List of other companies to which the contact belongs. Each company should be in the format of company-id;view-all-tickets(boolean "true"/"false") Example: 123;true. | +| Other Phone Numbers | `other-phone-numbers` | array[string] | List of other phone numbers of the contact. | +
+ + + + + + +
+ +| Output | Field ID | Format | Description | +| :--- | :--- | :--- | :--- | +| Contact ID | `contact-id` | integer | ID of the contact. | +| Created At | `created-at` | string | Timestamp that denotes when the contact was created. In UTC format. |
-
### Create Ticket @@ -175,21 +179,21 @@ Create ticket -### Reply to Ticket +### Create Ticket Note -Reply to a ticket thread. +Create a private/public note on a ticket thread.
| Input | Field ID | Format | Description | | :--- | :--- | :--- | :--- | -| Task ID (required) | `task` | string | `TASK_REPLY_TO_TICKET` | -| Body (required) | `body` | string | Content of the reply. Can be in HTML format. | +| Task ID (required) | `task` | string | `TASK_CREATE_TICKET_NOTE` | | Ticket ID (required) | `ticket-id` | integer | The ID of the ticket. | -| From Email | `from-email` | string | Email address that is replying to the ticket. You need to have this email address registered in Freshdesk by going to Admin -> Emails. If you leave this field empty, the global support email will be used. | -| User ID | `user-id` | integer | ID of the agent/contact replying to the ticket. If you fill this field using a contact ID, there will be no email sent to the requester. | -| CC Emails | `cc-emails` | array[string] | Email addresses added in the 'cc' field of the outgoing ticket email. | -| BCC Emails | `bcc-emails` | array[string] | Email addresses added in the 'bcc' field of the outgoing ticket email. | +| Body (required) | `body` | string | Content of the note. Can be in HTML format. | +| Notify Emails | `notify-emails` | array[string] | Email addresses of agents/users who need to be notified about this note. The emails need to exist in Freshdesk agent. Agent list can be seen in Admin -> Agents. | +| User ID | `user-id` | integer | ID of the agent/contact who is adding the note. | +| Private | `private` | boolean | Set to true if the note is private. | +| Incoming | `incoming` | boolean | Set to true if a particular note should appear as being created from outside (i.e., not through web portal). |
@@ -206,21 +210,16 @@ Reply to a ticket thread. -### Create Ticket Note +### Get Agent -Create a private/public note on a ticket thread. +Get agent using ID. This task will only work if you have admin privileges. Agents are those in your team who will login to Freshdesk.
| Input | Field ID | Format | Description | | :--- | :--- | :--- | :--- | -| Task ID (required) | `task` | string | `TASK_CREATE_TICKET_NOTE` | -| Ticket ID (required) | `ticket-id` | integer | The ID of the ticket. | -| Body (required) | `body` | string | Content of the note. Can be in HTML format. | -| Notify Emails | `notify-emails` | array[string] | Email addresses of agents/users who need to be notified about this note. The emails need to exist in Freshdesk agent. Agent list can be seen in Admin -> Agents. | -| User ID | `user-id` | integer | ID of the agent/contact who is adding the note. | -| Private | `private` | boolean | Set to true if the note is private. | -| Incoming | `incoming` | boolean | Set to true if a particular note should appear as being created from outside (i.e., not through web portal). | +| Task ID (required) | `task` | string | `TASK_GET_AGENT` | +| Agent ID (required) | `agent-id` | integer | Agent ID. |
@@ -232,8 +231,53 @@ Create a private/public note on a ticket thread. | Output | Field ID | Format | Description | | :--- | :--- | :--- | :--- | -| Conversation ID | `conversation-id` | integer | The ID of the note or reply that is associated with the ticket. | -| Created At | `created-at` | string | Timestamp that denotes when the ticket/conversation was created. In UTC format. | +| Name (optional) | `name` | string | Name of the agent. | +| Active (optional) | `active` | boolean | Set to true if the agent is verified. | +| Email | `email` | string | Email of the agent. | +| Job Title (optional) | `job-title` | string | Job title of the agent. | +| Language (optional) | `language` | string | Language of the agent. | +| Mobile (optional) | `mobile` | string | Mobile number of the agent. | +| Phone (optional) | `phone` | string | Telephone number of the agent. | +| Time Zone (optional) | `time-zone` | string | Time zone of the agent. | +| Type | `type` | string | Type of the agent. Can be "Support Agent", "Field Agent" or "Collaborator". | +| Ticket Scope | `ticket-scope` | string | Ticket permission of the agent. Can be "Global Access", "Group Access" or "Restricted Access". | +| Available (optional) | `available` | boolean | Set to true if the agent is in a group that has enabled "Automatic Ticket Assignment". | +| Group IDs (optional) | `group-ids` | array[integer] | Group IDs of the agent. | +| Role IDs (optional) | `role-ids` | array[integer] | Role IDs of the agent. | +| Skill IDs (optional) | `skill-ids` | array[integer] | Skill IDs of the agent. | +| Occasional | `occasional` | boolean | Set to true if the agent is not working full-time. | +| Signature (optional) | `signature` | string | Signature of the agent in HTML format. | +| Focus Mode (optional) | `focus-mode` | boolean | Set to true if the agent is in focus mode. | +| Deactivated (optional) | `deactivated` | boolean | Set to true if the agent is deactivated. | +| Created At (optional) | `created-at` | string | Timestamp that denotes when the agent was created. | +| Updated At (optional) | `updated-at` | string | Timestamp that denotes when the agent was last updated. | + + + +### Get All + +Task to get all the IDs of existing contacts, companies, tickets, products, agents, roles, or skills. Note: products, agents, roles, and skills require admin privileges. Some of these might not work, depending on the plan you are on. + +
+ +| Input | Field ID | Format | Description | +| :--- | :--- | :--- | :--- | +| Task ID (required) | `task` | string | `TASK_GET_ALL` | +| Object Type (required) | `object-type` | string | Type of object to get IDs for.
Enum values
  • `Contacts`
  • `Companies`
  • `Tickets`
  • `Products`
  • `Agents`
  • `Roles`
  • `Skills`
| +| Length (required) | `length` | integer | The maximum number of IDs allowed is 500. The most recent IDs will be retrieved. | +
+ + + + + + +
+ +| Output | Field ID | Format | Description | +| :--- | :--- | :--- | :--- | +| IDs | `ids` | array[integer] | List of IDs. | +| ID Length | `id-length` | integer | Number of IDs. |
@@ -286,6 +330,41 @@ Get all the conversations in a ticket. (Conversations are replies and notes that
+### Get Company + +Get company using ID + +
+ +| Input | Field ID | Format | Description | +| :--- | :--- | :--- | :--- | +| Task ID (required) | `task` | string | `TASK_GET_COMPANY` | +| Company ID (required) | `company-id` | integer | ID of the primary company to which the contact belongs. | +
+ + + + + + +
+ +| Output | Field ID | Format | Description | +| :--- | :--- | :--- | :--- | +| Name | `name` | string | Name of the company. | +| Description (optional) | `description` | string | Description of the company. | +| Note (optional) | `note` | string | Note about the company. | +| Domains (optional) | `domains` | array[string] | Domains of the company. | +| Health Score (optional) | `health-score` | string | The strength of your relationship with the company. To look at all the possible values or create custom values, please go to Admin -> Customer Fields. Default values: "At risk", "Doing okay", "Happy". | +| Account Tier (optional) | `account-tier` | string | Classification based on how much value the company brings to your business. To look at all the possible values or create custom values, please go to Admin -> Customer Fields. Default values: "Basic", "Premium", "Enterprise". | +| Renewal Date (optional) | `renewal-date` | string | Date when your contract or relationship with the company is due for renewal. | +| Industry (optional) | `industry` | string | The industry in which the company operates. To look at all the possible values or create custom values, please go to Admin -> Customer Fields. | +| Created At | `created-at` | string | Timestamp that denotes when the company was created. In UTC format. | +| Updated At | `updated-at` | string | Timestamp that denotes when the company was last updated. In UTC format. | +| Custom Fields (optional) | `custom-fields` | json | Custom fields that the company have. Custom fields can be created or modified in Admin -> Customer Fields. | +
+ + ### Get Contact Get contact using ID @@ -346,127 +425,16 @@ Get contact using ID
-### Create Contact - -Create contact - -
- -| Input | Field ID | Format | Description | -| :--- | :--- | :--- | :--- | -| Task ID (required) | `task` | string | `TASK_CREATE_CONTACT` | -| Name (required) | `name` | string | Name of the contact. | -| Email | `email` | string | The primary email address of the contact. | -| Phone | `phone` | string | Telephone number of the contact. | -| Mobile | `mobile` | string | Mobile number of the contact. | -| Description | `description` | string | Description of the contact. | -| Address | `address` | string | Address of the contact. | -| Job Title | `job-title` | string | Job title of the contact. | -| Tags | `tags` | array[string] | Tags associated with the contact. | -| Language | `language` | string | Language of the contact.
Enum values
  • `Arabic`
  • `Bosnian`
  • `Bulgarian`
  • `Catalan`
  • `Chinese`
  • `Chinese (Traditional)`
  • `Croatian`
  • `Czech`
  • `Danish`
  • `Dutch`
  • `English`
  • `Estonian`
  • `Filipino`
  • `Finnish`
  • `French`
  • `German`
  • `Greek`
  • `Hebrew`
  • `Hungarian`
  • `Icelandic`
  • `Indonesian`
  • `Italian`
  • `Japanese`
  • `Korean`
  • `Latvian`
  • `Lithuanian`
  • `Malay`
  • `Norwegian`
  • `Polish`
  • `Portuguese (BR)`
  • `Portuguese/Portugal`
  • `Romanian`
  • `Russian`
  • `Serbian`
  • `Slovak`
  • `Slovenian`
  • `Spanish`
  • `Spanish (Latin America)`
  • `Swedish`
  • `Thai`
  • `Turkish`
  • `Ukrainian`
  • `Vietnamese`
| -| Time Zone | `time-zone` | string | Time zone of the contact.
Enum values
  • `American Samoa`
  • `International Date Line West`
  • `Midway Island`
  • `Hawaii`
  • `Alaska`
  • `Pacific Time (US & Canada)`
  • `Tijuana`
  • `Arizona`
  • `Mazatlan`
  • `Mountain Time (US & Canada)`
  • `Central America`
  • `Central Time (US & Canada)`
  • `Chihuahua`
  • `Guadalajara`
  • `Mexico City`
  • `Monterrey`
  • `Saskatchewan`
  • `Bogota`
  • `Eastern Time (US & Canada)`
  • `Indiana (East)`
  • `Lima`
  • `Quito`
  • `Atlantic Time (Canada)`
  • `Caracas`
  • `Georgetown`
  • `La Paz`
  • `Santiago`
  • `Newfoundland`
  • `Brasilia`
  • `Buenos Aires`
  • `Montevideo`
  • `Greenland`
  • `Mid-Atlantic`
  • `Azores`
  • `Cape Verde Is.`
  • `Casablanca`
  • `Dublin`
  • `Edinburgh`
  • `Lisbon`
  • `London`
  • `Monrovia`
  • `UTC`
  • `Amsterdam`
  • `Belgrade`
  • `Berlin`
  • `Bern`
  • `Bratislava`
  • `Brussels`
  • `Budapest`
  • `Copenhagen`
  • `Ljubljana`
  • `Madrid`
  • `Paris`
  • `Prague`
  • `Rome`
  • `Sarajevo`
  • `Skopje`
  • `Stockholm`
  • `Vienna`
  • `Warsaw`
  • `West Central Africa`
  • `Zagreb`
  • `Athens`
  • `Bucharest`
  • `Cairo`
  • `Harare`
  • `Helsinki`
  • `Jerusalem`
  • `Kaliningrad`
  • `Kyiv`
  • `Pretoria`
  • `Riga`
  • `Sofia`
  • `Tallinn`
  • `Vilnius`
  • `Baghdad`
  • `Istanbul`
  • `Kuwait`
  • `Minsk`
  • `Moscow`
  • `Nairobi`
  • `Riyadh`
  • `St. Petersburg`
  • `Volgograd`
  • `Tehran`
  • `Abu Dhabi`
  • `Baku`
  • `Muscat`
  • `Samara`
  • `Tbilisi`
  • `Yerevan`
  • `Kabul`
  • `Ekaterinburg`
  • `Islamabad`
  • `Karachi`
  • `Tashkent`
  • `Chennai`
  • `Kolkata`
  • `Mumbai`
  • `New Delhi`
  • `Sri Jayawardenepura`
  • `Kathmandu`
  • `Almaty`
  • `Astana`
  • `Dhaka`
  • `Urumqi`
  • `Rangoon`
  • `Bangkok`
  • `Hanoi`
  • `Jakarta`
  • `Krasnoyarsk`
  • `Novosibirsk`
  • `Beijing`
  • `Chongqing`
  • `Hong Kong`
  • `Irkutsk`
  • `Kuala Lumpur`
  • `Perth`
  • `Singapore`
  • `Taipei`
  • `Ulaanbaatar`
  • `Osaka`
  • `Sapporo`
  • `Seoul`
  • `Tokyo`
  • `Yakutsk`
  • `Adelaide`
  • `Darwin`
  • `Brisbane`
  • `Canberra`
  • `Guam`
  • `Hobart`
  • `Melbourne`
  • `Port Moresby`
  • `Sydney`
  • `Vladivostok`
  • `Magadan`
  • `New Caledonia`
  • `Solomon Is.`
  • `Srednekolymsk`
  • `Auckland`
  • `Fiji`
  • `Kamchatka`
  • `Marshall Is.`
  • `Wellington`
  • `Chatham Is.`
  • `Nuku'alofa`
  • `Samoa`
  • `Tokelau Is.`
| -| Company ID | `company-id` | integer | ID of the primary company to which the contact belongs. | -| Unique External ID | `unique-external-id` | string | Unique external ID of the contact which be assigned by the user(agent). | -| Twitter ID | `twitter-id` | string | Twitter ID of the contact. | -| View All Tickets | `view-all-tickets` | boolean | Used to determine if the contact can see all the tickets that are associated with the primary company. Note: this property will be ignored if the Company ID is not provided. | -| Other Emails | `other-emails` | array[string] | List of other email addresses of the contact. | -| Other Companies | `other-companies` | array[string] | List of other companies to which the contact belongs. Each company should be in the format of company-id;view-all-tickets(boolean "true"/"false") Example: 123;true. | -| Other Phone Numbers | `other-phone-numbers` | array[string] | List of other phone numbers of the contact. | -
- - - - - - -
- -| Output | Field ID | Format | Description | -| :--- | :--- | :--- | :--- | -| Contact ID | `contact-id` | integer | ID of the contact. | -| Created At | `created-at` | string | Timestamp that denotes when the contact was created. In UTC format. | -
- - -### Get Company - -Get company using ID - -
- -| Input | Field ID | Format | Description | -| :--- | :--- | :--- | :--- | -| Task ID (required) | `task` | string | `TASK_GET_COMPANY` | -| Company ID (required) | `company-id` | integer | ID of the primary company to which the contact belongs. | -
- - - - - - -
- -| Output | Field ID | Format | Description | -| :--- | :--- | :--- | :--- | -| Name | `name` | string | Name of the company. | -| Description (optional) | `description` | string | Description of the company. | -| Note (optional) | `note` | string | Note about the company. | -| Domains (optional) | `domains` | array[string] | Domains of the company. | -| Health Score (optional) | `health-score` | string | The strength of your relationship with the company. To look at all the possible values or create custom values, please go to Admin -> Customer Fields. Default values: "At risk", "Doing okay", "Happy". | -| Account Tier (optional) | `account-tier` | string | Classification based on how much value the company brings to your business. To look at all the possible values or create custom values, please go to Admin -> Customer Fields. Default values: "Basic", "Premium", "Enterprise". | -| Renewal Date (optional) | `renewal-date` | string | Date when your contract or relationship with the company is due for renewal. | -| Industry (optional) | `industry` | string | The industry in which the company operates. To look at all the possible values or create custom values, please go to Admin -> Customer Fields. | -| Created At | `created-at` | string | Timestamp that denotes when the company was created. In UTC format. | -| Updated At | `updated-at` | string | Timestamp that denotes when the company was last updated. In UTC format. | -| Custom Fields (optional) | `custom-fields` | json | Custom fields that the company have. Custom fields can be created or modified in Admin -> Customer Fields. | -
- - -### Create Company - -Create company - -
- -| Input | Field ID | Format | Description | -| :--- | :--- | :--- | :--- | -| Task ID (required) | `task` | string | `TASK_CREATE_COMPANY` | -| Name (required) | `name` | string | Name of the company. | -| Description | `description` | string | Description of the company. | -| Note | `note` | string | Note about the company. | -| Domains | `domains` | array[string] | Domains of the company. | -| Health Score | `health-score` | string | The strength of your relationship with the company. To look at all the possible values or create custom values, please go to Admin -> Customer Fields. Default values: "At risk", "Doing okay", "Happy". | -| Account Tier | `account-tier` | string | Classification based on how much value the company brings to your business. To look at all the possible values or create custom values, please go to Admin -> Customer Fields. Default values: "Basic", "Premium", "Enterprise". | -| Renewal Date | `renewal-date` | string | Date when your contract or relationship with the company is due for renewal. Enter in the format YYYY-MM-DD. | -| Industry | `industry` | string | The industry in which the company operates. To look at all the possible values or create custom values, please go to Admin -> Customer Fields. | -
- - - - - - -
- -| Output | Field ID | Format | Description | -| :--- | :--- | :--- | :--- | -| Company ID | `company-id` | integer | ID of the company. | -| Created At | `created-at` | string | Timestamp that denotes when the company was created. In UTC format. | -
- - -### Get All +### Get Group -Task to get all the IDs of existing contacts, companies, tickets, products, agents, roles, or skills. Note: products, agents, roles, and skills require admin privileges. Some of these might not work, depending on the plan you are on. +Get group using ID. This task will only work if you have admin privileges. Agents can be classified into groups such as Customer Support.
| Input | Field ID | Format | Description | | :--- | :--- | :--- | :--- | -| Task ID (required) | `task` | string | `TASK_GET_ALL` | -| Object Type (required) | `object-type` | string | Type of object to get IDs for.
Enum values
  • `Contacts`
  • `Companies`
  • `Tickets`
  • `Products`
  • `Agents`
  • `Roles`
  • `Skills`
| -| Length (required) | `length` | integer | The maximum number of IDs allowed is 500. The most recent IDs will be retrieved. | +| Task ID (required) | `task` | string | `TASK_GET_GROUP` | +| Group ID (required) | `group-id` | integer | Group ID. |
@@ -478,8 +446,16 @@ Task to get all the IDs of existing contacts, companies, tickets, products, agen | Output | Field ID | Format | Description | | :--- | :--- | :--- | :--- | -| IDs | `ids` | array[integer] | List of IDs. | -| ID Length | `id-length` | integer | Number of IDs. | +| Name | `name` | string | Name of the group. | +| Description | `description` | string | Description of the group. | +| Agent IDs (optional) | `agent-ids` | array[integer] | Agent IDs of the group. | +| Auto Ticket Assign | `auto-ticket-assign` | string | The type of automatic ticket assignment set for the group. | +| Escalate To (optional) | `escalate-to` | integer | The ID of the user to whom an escalation email is sent if a ticket is unassigned. | +| Unassigned Duration (optional) | `unassigned-duration` | string | The duration for which a ticket is unassigned before it is escalated. | +| Group Type (optional) | `group-type` | string | Group type. Can be "support_agent_group" or "field_agent_group". | +| Agent Availability Status (optional) | `agent-availability-status` | boolean | The availability status of the agent in the group. Automatically set to true if the group has enabled "Automatic Ticket Assignment". | +| Created At | `created-at` | string | Timestamp that denotes when the group was created. | +| Updated At | `updated-at` | string | Timestamp that denotes when the group was last updated. | @@ -513,16 +489,16 @@ Get product using ID. This task will only work if you have admin privileges. -### Get Agent +### Get Role -Get agent using ID. This task will only work if you have admin privileges. Agents are those in your team who will login to Freshdesk. +Get role using ID. This task will only work if you have admin privileges. Roles allow agents/collaborators to have different privileges.
| Input | Field ID | Format | Description | | :--- | :--- | :--- | :--- | -| Task ID (required) | `task` | string | `TASK_GET_AGENT` | -| Agent ID (required) | `agent-id` | integer | Agent ID. | +| Task ID (required) | `task` | string | `TASK_GET_ROLE` | +| Role ID (required) | `role-id` | integer | Role ID. |
@@ -534,39 +510,25 @@ Get agent using ID. This task will only work if you have admin privileges. Agent | Output | Field ID | Format | Description | | :--- | :--- | :--- | :--- | -| Name (optional) | `name` | string | Name of the agent. | -| Active (optional) | `active` | boolean | Set to true if the agent is verified. | -| Email | `email` | string | Email of the agent. | -| Job Title (optional) | `job-title` | string | Job title of the agent. | -| Language (optional) | `language` | string | Language of the agent. | -| Mobile (optional) | `mobile` | string | Mobile number of the agent. | -| Phone (optional) | `phone` | string | Telephone number of the agent. | -| Time Zone (optional) | `time-zone` | string | Time zone of the agent. | -| Type | `type` | string | Type of the agent. Can be "Support Agent", "Field Agent" or "Collaborator". | -| Ticket Scope | `ticket-scope` | string | Ticket permission of the agent. Can be "Global Access", "Group Access" or "Restricted Access". | -| Available (optional) | `available` | boolean | Set to true if the agent is in a group that has enabled "Automatic Ticket Assignment". | -| Group IDs (optional) | `group-ids` | array[integer] | Group IDs of the agent. | -| Role IDs (optional) | `role-ids` | array[integer] | Role IDs of the agent. | -| Skill IDs (optional) | `skill-ids` | array[integer] | Skill IDs of the agent. | -| Occasional | `occasional` | boolean | Set to true if the agent is not working full-time. | -| Signature (optional) | `signature` | string | Signature of the agent in HTML format. | -| Focus Mode (optional) | `focus-mode` | boolean | Set to true if the agent is in focus mode. | -| Deactivated (optional) | `deactivated` | boolean | Set to true if the agent is deactivated. | -| Created At (optional) | `created-at` | string | Timestamp that denotes when the agent was created. | -| Updated At (optional) | `updated-at` | string | Timestamp that denotes when the agent was last updated. | +| Name | `name` | string | Name of the role. | +| Description | `description` | string | Description of the role. | +| Default | `default` | boolean | Set to true if the role is the default role. | +| Agent Type | `agent-type` | string | Type of the agent. Can be "Support Agent", "Field Agent" or "Collaborator". | +| Created At | `created-at` | string | Timestamp that denotes when the role was created. | +| Updated At | `updated-at` | string | Timestamp that denotes when the role was last updated. | -### Get Role +### Get Skill -Get role using ID. This task will only work if you have admin privileges. Roles allow agents/collaborators to have different privileges. +Get skill using ID. This task will only work if you have admin privileges. Agents can be assigned skills, and it is possible for tickets to be automatically assigned to agents based on the skills they have.
| Input | Field ID | Format | Description | | :--- | :--- | :--- | :--- | -| Task ID (required) | `task` | string | `TASK_GET_ROLE` | -| Role ID (required) | `role-id` | integer | Role ID. | +| Task ID (required) | `task` | string | `TASK_GET_SKILL` | +| Skill ID (required) | `skill-id` | integer | Skill ID. |
@@ -578,25 +540,25 @@ Get role using ID. This task will only work if you have admin privileges. Roles | Output | Field ID | Format | Description | | :--- | :--- | :--- | :--- | -| Name | `name` | string | Name of the role. | -| Description | `description` | string | Description of the role. | -| Default | `default` | boolean | Set to true if the role is the default role. | -| Agent Type | `agent-type` | string | Type of the agent. Can be "Support Agent", "Field Agent" or "Collaborator". | -| Created At | `created-at` | string | Timestamp that denotes when the role was created. | -| Updated At | `updated-at` | string | Timestamp that denotes when the role was last updated. | +| Name | `name` | string | Name of the skill. | +| Rank | `rank` | integer | Rank of the skill. | +| Condition Match Type | `condition-match-type` | string | Type of condition match. Can be "all" or "any". | +| Conditions | `conditions` | array[json] | Conditions for the skill. | +| Created At | `created-at` | string | Timestamp that denotes when the skill was created. | +| Updated At | `updated-at` | string | Timestamp that denotes when the skill was last updated. | -### Get Group +### Get Ticket -Get group using ID. This task will only work if you have admin privileges. Agents can be classified into groups such as Customer Support. +Get ticket using ID
| Input | Field ID | Format | Description | | :--- | :--- | :--- | :--- | -| Task ID (required) | `task` | string | `TASK_GET_GROUP` | -| Group ID (required) | `group-id` | integer | Group ID. | +| Task ID (required) | `task` | string | `TASK_GET_TICKET` | +| Ticket ID (required) | `ticket-id` | integer | The ID of the ticket. |
@@ -608,29 +570,71 @@ Get group using ID. This task will only work if you have admin privileges. Agent | Output | Field ID | Format | Description | | :--- | :--- | :--- | :--- | -| Name | `name` | string | Name of the group. | -| Description | `description` | string | Description of the group. | -| Agent IDs (optional) | `agent-ids` | array[integer] | Agent IDs of the group. | -| Auto Ticket Assign | `auto-ticket-assign` | string | The type of automatic ticket assignment set for the group. | -| Escalate To (optional) | `escalate-to` | integer | The ID of the user to whom an escalation email is sent if a ticket is unassigned. | -| Unassigned Duration (optional) | `unassigned-duration` | string | The duration for which a ticket is unassigned before it is escalated. | -| Group Type (optional) | `group-type` | string | Group type. Can be "support_agent_group" or "field_agent_group". | -| Agent Availability Status (optional) | `agent-availability-status` | boolean | The availability status of the agent in the group. Automatically set to true if the group has enabled "Automatic Ticket Assignment". | -| Created At | `created-at` | string | Timestamp that denotes when the group was created. | -| Updated At | `updated-at` | string | Timestamp that denotes when the group was last updated. | +| Subject | `subject` | string | Subject of the ticket. | +| Description Text | `description-text` | string | Content of the ticket. | +| Source | `source` | string | Source of the ticket. Eg: Email. | +| Status | `status` | string | Status of the ticket. Eg: Pending. | +| Priority | `priority` | string | Priority of the ticket. Eg: Medium. | +| Ticket Type (optional) | `ticket-type` | string | Used to categorize the ticket. To check the possible types a ticket can have, please go to Admin -> Ticket Fields. | +| Association Type (optional) | `association-type` | string | Used to determine whether a ticket is a parent, child, tracker or related ticket. | +| Associated Ticket List (optional) | `associated-ticket-list` | array[integer] | List of associated ticket IDs. | +| Tags (optional) | `tags` | array[string] | Tags associated with the ticket. | +| CC Emails (optional) | `cc-emails` | array[string] | Email addresses added in the 'cc' field of the incoming ticket email. | +| Forward Emails (optional) | `forward-emails` | array[string] | Email addresses added while forwarding a ticket. | +| Reply CC Emails (optional) | `reply-cc-emails` | array[string] | Email addresses added while replying to a ticket. | +| Requester ID | `requester-id` | integer | ID of the requester. | +| Responder ID (optional) | `responder-id` | integer | ID of the agent to whom the ticket has been assigned. List of agents can be found in Admin -> Agents. | +| Company ID (optional) | `company-id` | integer | ID of the company to which this ticket belongs. | +| Group ID (optional) | `group-id` | integer | ID of the group to which the ticket has been assigned. List of groups can be found in Admin -> Groups. | +| Product ID (optional) | `product-id` | integer | ID of the product to which the ticket is associated. List of products can be found in Admin -> Multiple Products. | +| Support Email (optional) | `support-email` | string | Support email address. You can find it in Admin -> Email (under channel). | +| To Emails (optional) | `to-emails` | array[string] | Email addresses to which the ticket was originally sent. | +| Spam (optional) | `spam` | boolean | Set to true if the ticket is marked as spam. | +| Due By (optional) | `due-by` | string | Timestamp that denotes when the ticket is due to be resolved. In UTC format. | +| Is Escalated (optional) | `is-escalated` | boolean | Set to true if the ticket has been escalated. | +| First Response Due By (optional) | `first-response-due-by` | string | Timestamp that denotes when the first response is due. In UTC format. You can adjust this by going to Admin -> SLA policy (under Workflows). | +| First Response Escalated (optional) | `first-response-escalated` | boolean | Set to true if the ticket has been escalated as the result of first response time being breached. | +| Next Response Due By (optional) | `next-response-due-by` | string | Timestamp that denotes when the next response is due. In UTC format. You can adjust this by going to Admin -> SLA policy (under Workflows). | +| Next Response Escalated (optional) | `next-response-escalated` | boolean | Set to true if the ticket has been escalated as the result of next response time being breached. | +| Created At | `created-at` | string | Timestamp that denotes when the ticket/conversation was created. In UTC format. | +| Updated At | `updated-at` | string | Timestamp that denotes when the ticket was last updated. In UTC format. | +| [Attachments](#get-ticket-attachments) (optional) | `attachments` | array[object] | Ticket attachments (cannot be more than 20MB). | +| Sentiment Score (optional) | `sentiment-score` | integer | Freshdesk uses AI to assess the emotional tone and attitude expressed in customer interaction. | +| Initial Sentiment Score (optional) | `initial-sentiment-score` | integer | The initial sentiment score of the ticket. | +| Custom Fields (optional) | `custom-fields` | json | Custom fields that the ticket have. Custom fields can be created or modified in Admin -> Ticket Fields. | +
+ Output Objects in Get Ticket -### Get Skill +

Attachments

-Get skill using ID. This task will only work if you have admin privileges. Agents can be assigned skills, and it is possible for tickets to be automatically assigned to agents based on the skills they have. +
+ +| Field | Field ID | Format | Note | +| :--- | :--- | :--- | :--- | +| Attachment Content Type | `content-type` | string | The type of the file. | +| Attachment Name | `name` | string | The name of the file. | +| Attachment URL | `url` | string | The URL to the attachment. | +
+
+ + +### Reply to Ticket + +Reply to a ticket thread.
| Input | Field ID | Format | Description | | :--- | :--- | :--- | :--- | -| Task ID (required) | `task` | string | `TASK_GET_SKILL` | -| Skill ID (required) | `skill-id` | integer | Skill ID. | +| Task ID (required) | `task` | string | `TASK_REPLY_TO_TICKET` | +| Body (required) | `body` | string | Content of the reply. Can be in HTML format. | +| Ticket ID (required) | `ticket-id` | integer | The ID of the ticket. | +| From Email | `from-email` | string | Email address that is replying to the ticket. You need to have this email address registered in Freshdesk by going to Admin -> Emails. If you leave this field empty, the global support email will be used. | +| User ID | `user-id` | integer | ID of the agent/contact replying to the ticket. If you fill this field using a contact ID, there will be no email sent to the requester. | +| CC Emails | `cc-emails` | array[string] | Email addresses added in the 'cc' field of the outgoing ticket email. | +| BCC Emails | `bcc-emails` | array[string] | Email addresses added in the 'bcc' field of the outgoing ticket email. |
@@ -642,12 +646,8 @@ Get skill using ID. This task will only work if you have admin privileges. Agent | Output | Field ID | Format | Description | | :--- | :--- | :--- | :--- | -| Name | `name` | string | Name of the skill. | -| Rank | `rank` | integer | Rank of the skill. | -| Condition Match Type | `condition-match-type` | string | Type of condition match. Can be "all" or "any". | -| Conditions | `conditions` | array[json] | Conditions for the skill. | -| Created At | `created-at` | string | Timestamp that denotes when the skill was created. | -| Updated At | `updated-at` | string | Timestamp that denotes when the skill was last updated. | +| Conversation ID | `conversation-id` | integer | The ID of the note or reply that is associated with the ticket. | +| Created At | `created-at` | string | Timestamp that denotes when the ticket/conversation was created. In UTC format. | diff --git a/pkg/component/application/freshdesk/v0/config/definition.yaml b/pkg/component/application/freshdesk/v0/config/definition.yaml index 6538709cc..fde7cb906 100644 --- a/pkg/component/application/freshdesk/v0/config/definition.yaml +++ b/pkg/component/application/freshdesk/v0/config/definition.yaml @@ -1,19 +1,3 @@ -availableTasks: -- TASK_GET_TICKET -- TASK_CREATE_TICKET -- TASK_REPLY_TO_TICKET -- TASK_CREATE_TICKET_NOTE -- TASK_GET_ALL_CONVERSATIONS -- TASK_GET_CONTACT -- TASK_CREATE_CONTACT -- TASK_GET_COMPANY -- TASK_CREATE_COMPANY -- TASK_GET_ALL -- TASK_GET_PRODUCT -- TASK_GET_AGENT -- TASK_GET_ROLE -- TASK_GET_GROUP -- TASK_GET_SKILL documentationUrl: https://www.instill.tech/docs/component/application/freshdesk icon: assets/freshdesk.svg id: freshdesk diff --git a/pkg/component/application/github/v0/README.mdx b/pkg/component/application/github/v0/README.mdx index b9bafc637..3ed1ff4ea 100644 --- a/pkg/component/application/github/v0/README.mdx +++ b/pkg/component/application/github/v0/README.mdx @@ -7,15 +7,15 @@ description: "Learn about how to set up a VDP GitHub component https://github.co The GitHub component is an application component that allows users to do anything available on GitHub. It can carry out the following tasks: -- [List Pull Requests](#list-pull-requests) -- [Get Pull Request](#get-pull-request) -- [Get Commit](#get-commit) -- [List Review Comments](#list-review-comments) -- [Create Review Comment](#create-review-comment) -- [List Issues](#list-issues) -- [Get Issue](#get-issue) - [Create Issue](#create-issue) +- [Create Review Comment](#create-review-comment) - [Create Webhook](#create-webhook) +- [Get Commit](#get-commit) +- [Get Issue](#get-issue) +- [Get Pull Request](#get-pull-request) +- [List Issues](#list-issues) +- [List Pull Requests](#list-pull-requests) +- [List Review Comments](#list-review-comments) @@ -56,22 +56,21 @@ ${connection.}`. ## Supported Tasks -### List Pull Requests +### Create Issue -Get the list of all pull requests in a repository. Detailed information about each commit in a PR is omitted, please use the `Get Commit` task or the `Get Pull Request` task to get the details of a commit. +Create an issue.
| Input | Field ID | Format | Description | | :--- | :--- | :--- | :--- | -| Task ID (required) | `task` | string | `TASK_LIST_PULL_REQUESTS` | +| Task ID (required) | `task` | string | `TASK_CREATE_ISSUE` | | Owner (required) | `owner` | string | Owner of the repository. | | Repository (required) | `repository` | string | Repository name. | -| State | `state` | string | State of the PRs, including open, closed, all. Default is open.
Enum values
  • `open`
  • `closed`
  • `all`
| -| Sort | `sort` | string | Sort the PRs by created, updated, popularity, or long-running. Default is created.
Enum values
  • `created`
  • `updated`
  • `popularity`
  • `long-running`
| -| Direction | `direction` | string | Direction of the sort, including asc or desc. Default is desc.
Enum values
  • `asc`
  • `desc`
| -| Page | `page` | integer | Page number of the results to fetch. Default is 1. | -| Per Page | `per-page` | integer | Number of results to fetch per page. Default is 30. | +| Issue Title (required) | `title` | string | Title of the issue. | +| Issue Body (required) | `body` | string | Body of the issue. | +| Assignees | `assignees` | array[string] | Assignees of the issue. | +| Labels | `labels` | array[string] | Labels of the issue. |
@@ -83,82 +82,107 @@ Get the list of all pull requests in a repository. Detailed information about ea | Output | Field ID | Format | Description | | :--- | :--- | :--- | :--- | -| [Pull Requests](#list-pull-requests-pull-requests) | `pull-requests` | array[object] | An array of PRs. | +| Issue Number (optional) | `number` | integer | Number of the issue. | +| Issue State (optional) | `state` | string | State of the issue. | +| Issue Title (optional) | `title` | string | Title of the issue. | +| Issue Body (optional) | `body` | string | Body of the issue. | +| Assignee (optional) | `assignee` | string | Assignee of the issue. | +| Assignees (optional) | `assignees` | array[string] | Assignees of the issue. | +| Labels (optional) | `labels` | array[string] | Labels of the issue. | +| Is Pull Request (optional) | `is-pull-request` | boolean | Whether the issue is a pull request. | -
- Output Objects in List Pull Requests -

Pull Requests

+### Create Review Comment + +Create a review comment in a pull request. The comment can be a general comment or a review comment. The comment can be on a specific line or on the PR as a whole.
-| Field | Field ID | Format | Note | +| Input | Field ID | Format | Description | | :--- | :--- | :--- | :--- | -| PR base | `base` | string | Base commit of the PR (in SHA value). | -| PR body | `body` | string | Body of the PR. | -| Number of PR comments | `comments-num` | integer | Number of comments on the PR. | -| [Commits](#list-pull-requests-commits) | `commits` | array | Commits in the PR. | -| Number of PR commits | `commits-num` | integer | Number of commits in the PR. | -| PR diff url | `diff-url` | string | URL to the diff of the PR. | -| PR head | `head` | string | Head commit of the PR (in SHA value). | -| PR id | `id` | integer | ID of the PR. | -| PR number | `number` | integer | Number of the PR. | -| Number of PR review comments | `review-comments-num` | integer | Number of review comments in the PR. | -| PR state | `state` | string | State of the PR. | -| PR Title | `title` | string | Title of the PR. | +| Task ID (required) | `task` | string | `TASK_CREATE_REVIEW_COMMENT` | +| Owner (required) | `owner` | string | Owner of the repository. | +| Repository (required) | `repository` | string | Repository name. | +| PR Number (required) | `pr-number` | integer | Number of the PR. | +| [Comment](#create-review-comment-comment) (required) | `comment` | object | The comment to be added. |
-

Commits

+ +
+ Input Objects in Create Review Comment + +

Comment

+ +The comment to be added.
| Field | Field ID | Format | Note | | :--- | :--- | :--- | :--- | -| [Files](#list-pull-requests-files) | `files` | array | Files in the commit. | -| Commit message | `message` | string | Message of the commit. | -| Commit SHA | `sha` | string | SHA of the commit. | -| [Commit stats](#list-pull-requests-commit-stats) | `stats` | object | Stats of changes. | +| Comment body | `body` | string | Body of the comment. | +| Commit SHA | `commit-id` | string | SHA of the commit on which you want to comment. | +| Comment end line | `line` | integer | The line of the blob in the pull request diff that the comment applies to. For a multi-line comment, the last line of the range that your comment applies to. | +| Comment path | `path` | string | Path of the file the comment is on. | +| Comment end side | `side` | string | Side of the end line, can be one of: LEFT, RIGHT, side. LEFT is the left side of the diff (deletion), RIGHT is the right side of the diff (addition), and side is the comment on the PR as a whole. Default is side.
Enum values
  • `LEFT`
  • `RIGHT`
  • `side`
| +| Comment start line | `start-line` | integer | The first line in the pull request diff that your multi-line comment applies to. Only multi-line comment needs to fill this field. | +| Comment start side | `start-side` | string | Side of the start line, can be one of: LEFT, RIGHT, side. LEFT is the left side of the diff (deletion), RIGHT is the right side of the diff (addition), and side is the comment on the PR as a whole. Default is side.
Enum values
  • `LEFT`
  • `RIGHT`
  • `side`
| +| Comment type | `subject-type` | string | Subject type of the comment, can be one of: line, file. Default is line.
Enum values
  • `line`
  • `file`
|
+
+ -

Commit Stats

-| Field | Field ID | Format | Note | +| Output | Field ID | Format | Description | | :--- | :--- | :--- | :--- | -| Additions | `additions` | integer | Number of additions in the commit. | -| Total changes | `changes` | integer | Total number of changes in the commit. | -| Deletions | `deletions` | integer | Number of deletions in the commit. | +| Comment ID (optional) | `id` | integer | ID of the comment. | +| In Reply To (optional) | `in-reply-to-id` | integer | ID of the comment this comment is in reply to. | +| Commit SHA (optional) | `commit-id` | string | SHA of the commit on which you want to comment. | +| Comment Body (optional) | `body` | string | Body of the comment. | +| Comment Path (optional) | `path` | string | Path of the file the comment is on. | +| Comment End Line (optional) | `line` | integer | The line of the blob in the pull request diff that the comment applies to. For a multi-line comment, the last line of the range that your comment applies to. | +| Comment Start Line (optional) | `start-line` | integer | The first line in the pull request diff that your multi-line comment applies to. Only multi-line comment needs to fill this field. | +| Comment End Side (optional) | `side` | string | Side of the end line, can be one of: LEFT, RIGHT, side. LEFT is the left side of the diff (deletion), RIGHT is the right side of the diff (addition), and side is the comment on the PR as a whole. Default is side. | +| Comment Start Side (optional) | `start-side` | string | Side of the start line, can be one of: LEFT, RIGHT, side. LEFT is the left side of the diff (deletion), RIGHT is the right side of the diff (addition), and side is the comment on the PR as a whole. Default is side. | +| Comment Type (optional) | `subject-type` | string | Subject type of the comment, can be one of: line, file. Default is line. | +| Comment Created At (optional) | `created-at` | string | Time the comment was created. | +| Comment Updated At (optional) | `updated-at` | string | Time the comment was updated. | +| [User](#create-review-comment-user) (optional) | `user` | object | User who created the comment. |
-

Files

+
+ Output Objects in Create Review Comment + +

User

| Field | Field ID | Format | Note | | :--- | :--- | :--- | :--- | -| Additions | `additions` | integer | Number of additions in the commit. | -| Total changes | `changes` | integer | Total number of changes in the commit. | -| Deletions | `deletions` | integer | Number of deletions in the commit. | -| File name | `filename` | string | Name of the file. | -| Patch | `patch` | string | Patch of the file. | +| User id | `id` | integer | ID of the user. | +| User URL | `url` | string | URL of the user. |
-### Get Pull Request +### Create Webhook -Get a pull request from a repository, given the PR number. This will default to the latest PR if no PR number is provided. +Create a webhook for a repository.
| Input | Field ID | Format | Description | | :--- | :--- | :--- | :--- | -| Task ID (required) | `task` | string | `TASK_GET_PULL_REQUEST` | +| Task ID (required) | `task` | string | `TASK_CREATE_WEBHOOK` | | Owner (required) | `owner` | string | Owner of the repository. | | Repository (required) | `repository` | string | Repository name. | -| PR Number | `pr-number` | integer | Number of the PR. `0` for the latest PR. | +| Webhook URL (required) | `hook-url` | string | URL to send the payload to. | +| Events (required) | `events` | array[string] | Events to trigger the webhook. Please see the github document for more information. | +| Active | `active` | boolean | Whether the webhook is active. Default is false. | +| Content Type | `content-type` | string | Content type of the webhook, can be one of: json, form. Default is json.
Enum values
  • `json`
  • `form`
| +| Hook Secret | `hook-secret` | string | If provided, the secret will be used as the key to generate the HMAC hex digest value for delivery signature headers. (see the document). |
@@ -170,57 +194,25 @@ Get a pull request from a repository, given the PR number. This will default to | Output | Field ID | Format | Description | | :--- | :--- | :--- | :--- | -| PR ID (optional) | `id` | integer | ID of the PR. | -| PR Number (optional) | `number` | integer | Number of the PR. | -| PR State (optional) | `state` | string | State of the PR. | -| PR Title (optional) | `title` | string | Title of the PR. | -| PR Body (optional) | `body` | string | Body of the PR. | -| PR Diff URL (optional) | `diff-url` | string | URL to the diff of the PR. | -| PR Head (optional) | `head` | string | Head commit of the PR (in SHA value). | -| PR Base (optional) | `base` | string | Base commit of the PR (in SHA value). | -| Number of PR Comments (optional) | `comments-num` | integer | Number of comments on the PR. | -| Number of PR Commits (optional) | `commits-num` | integer | Number of commits in the PR. | -| Number of PR Review Comments (optional) | `review-comments-num` | integer | Number of review comments in the PR. | -| [Commits](#get-pull-request-commits) (optional) | `commits` | array[object] | Commits in the PR. | +| Webhook ID (optional) | `id` | integer | ID of the webhook. | +| Webhook URL (optional) | `url` | string | URL of the webhook. | +| Ping URL (optional) | `ping-url` | string | URL to ping the webhook. | +| Test URL (optional) | `test-url` | string | URL to test the webhook. | +| [Config](#create-webhook-config) (optional) | `config` | object | Configuration of the webhook. |
- Output Objects in Get Pull Request - -

Commits

- -
- -| Field | Field ID | Format | Note | -| :--- | :--- | :--- | :--- | -| [Files](#get-pull-request-files) | `files` | array | Files in the commit. | -| Commit message | `message` | string | Message of the commit. | -| Commit SHA | `sha` | string | SHA of the commit. | -| [Commit stats](#get-pull-request-commit-stats) | `stats` | object | Stats of changes. | -
- -

Commit Stats

- -
- -| Field | Field ID | Format | Note | -| :--- | :--- | :--- | :--- | -| Additions | `additions` | integer | Number of additions in the commit. | -| Total changes | `changes` | integer | Total number of changes in the commit. | -| Deletions | `deletions` | integer | Number of deletions in the commit. | -
+ Output Objects in Create Webhook -

Files

+

Config

| Field | Field ID | Format | Note | | :--- | :--- | :--- | :--- | -| Additions | `additions` | integer | Number of additions in the commit. | -| Total changes | `changes` | integer | Total number of changes in the commit. | -| Deletions | `deletions` | integer | Number of deletions in the commit. | -| File name | `filename` | string | Name of the file. | -| Patch | `patch` | string | Patch of the file. | +| Content Type | `content-type` | string | Content type of the webhook. | +| Insecure SSL | `insecure-ssl` | string | Whether the webhook is insecure. | +| Webhook URL | `url` | string | URL of the webhook. |
@@ -283,23 +275,18 @@ Get a commit from a repository, given the commit SHA
-### List Review Comments +### Get Issue -Get the review comments in a pull request. The comments can be on a specific line or on the PR as a whole. +Get an issue. This can be a pull request or a general issue, and you can tell by the `is-pull-request` field.
| Input | Field ID | Format | Description | | :--- | :--- | :--- | :--- | -| Task ID (required) | `task` | string | `TASK_LIST_REVIEW_COMMENTS` | +| Task ID (required) | `task` | string | `TASK_GET_ISSUE` | | Owner (required) | `owner` | string | Owner of the repository. | | Repository (required) | `repository` | string | Repository name. | -| PR Number | `pr-number` | integer | Number of the PR. Default is `0`, which retrieves all comments on all PRs in the repository. | -| Sort | `sort` | string | Sort the comments by created, updated. Default is created.
Enum values
  • `created`
  • `updated`
| -| Direction | `direction` | string | Direction of the sort, including asc or desc. Default is desc.
Enum values
  • `asc`
  • `desc`
| -| Since | `since` | string | Date (in `YYYY-MM-DD` format) from which comments will start to be fetched. The date will be in the UTC timezone. | -| Page | `page` | integer | Page number of the results to fetch. Default is 1. | -| Per Page | `per-page` | integer | Number of results to fetch per page. Default is 30. | +| Issue Number (required) | `issue-number` | integer | Number of the issue. |
@@ -311,115 +298,91 @@ Get the review comments in a pull request. The comments can be on a specific lin | Output | Field ID | Format | Description | | :--- | :--- | :--- | :--- | -| [Comments](#list-review-comments-comments) | `comments` | array[object] | An array of comments. | +| Issue Number (optional) | `number` | integer | Number of the issue. | +| Issue State (optional) | `state` | string | State of the issue. | +| Issue Title (optional) | `title` | string | Title of the issue. | +| Issue Body (optional) | `body` | string | Body of the issue. | +| Assignee (optional) | `assignee` | string | Assignee of the issue. | +| Assignees (optional) | `assignees` | array[string] | Assignees of the issue. | +| Labels (optional) | `labels` | array[string] | Labels of the issue. | +| Is Pull Request (optional) | `is-pull-request` | boolean | Whether the issue is a pull request. | -
- Output Objects in List Review Comments -

Comments

+### Get Pull Request + +Get a pull request from a repository, given the PR number. This will default to the latest PR if no PR number is provided.
-| Field | Field ID | Format | Note | +| Input | Field ID | Format | Description | | :--- | :--- | :--- | :--- | -| Comment body | `body` | string | Body of the comment. | -| Commit SHA | `commit-id` | string | SHA of the commit on which you want to comment. | -| Comment created at | `created-at` | string | Time the comment was created. | -| Comment id | `id` | integer | ID of the comment. | -| In Reply To | `in-reply-to-id` | integer | ID of the comment this comment is in reply to. | -| Comment end line | `line` | integer | The line of the blob in the pull request diff that the comment applies to. For a multi-line comment, the last line of the range that your comment applies to. | -| Comment path | `path` | string | Path of the file the comment is on. | -| Comment end side | `side` | string | Side of the end line, can be one of: LEFT, RIGHT, side. LEFT is the left side of the diff (deletion), RIGHT is the right side of the diff (addition), and side is the comment on the PR as a whole. Default is side. | -| Comment start line | `start-line` | integer | The first line in the pull request diff that your multi-line comment applies to. Only multi-line comment needs to fill this field. | -| Comment start side | `start-side` | string | Side of the start line, can be one of: LEFT, RIGHT, side. LEFT is the left side of the diff (deletion), RIGHT is the right side of the diff (addition), and side is the comment on the PR as a whole. Default is side. | -| Comment type | `subject-type` | string | Subject type of the comment, can be one of: line, file. Default is line. | -| Comment updated at | `updated-at` | string | Time the comment was updated. | -| [User](#list-review-comments-user) | `user` | object | User who created the comment. | +| Task ID (required) | `task` | string | `TASK_GET_PULL_REQUEST` | +| Owner (required) | `owner` | string | Owner of the repository. | +| Repository (required) | `repository` | string | Repository name. | +| PR Number | `pr-number` | integer | Number of the PR. `0` for the latest PR. |
-

User

- -
-| Field | Field ID | Format | Note | -| :--- | :--- | :--- | :--- | -| User id | `id` | integer | ID of the user. | -| User URL | `url` | string | URL of the user. | -
-
-### Create Review Comment -Create a review comment in a pull request. The comment can be a general comment or a review comment. The comment can be on a specific line or on the PR as a whole.
-| Input | Field ID | Format | Description | +| Output | Field ID | Format | Description | | :--- | :--- | :--- | :--- | -| Task ID (required) | `task` | string | `TASK_CREATE_REVIEW_COMMENT` | -| Owner (required) | `owner` | string | Owner of the repository. | -| Repository (required) | `repository` | string | Repository name. | -| PR Number (required) | `pr-number` | integer | Number of the PR. | -| [Comment](#create-review-comment-comment) (required) | `comment` | object | The comment to be added. | +| PR ID (optional) | `id` | integer | ID of the PR. | +| PR Number (optional) | `number` | integer | Number of the PR. | +| PR State (optional) | `state` | string | State of the PR. | +| PR Title (optional) | `title` | string | Title of the PR. | +| PR Body (optional) | `body` | string | Body of the PR. | +| PR Diff URL (optional) | `diff-url` | string | URL to the diff of the PR. | +| PR Head (optional) | `head` | string | Head commit of the PR (in SHA value). | +| PR Base (optional) | `base` | string | Base commit of the PR (in SHA value). | +| Number of PR Comments (optional) | `comments-num` | integer | Number of comments on the PR. | +| Number of PR Commits (optional) | `commits-num` | integer | Number of commits in the PR. | +| Number of PR Review Comments (optional) | `review-comments-num` | integer | Number of review comments in the PR. | +| [Commits](#get-pull-request-commits) (optional) | `commits` | array[object] | Commits in the PR. |
-
- Input Objects in Create Review Comment - -

Comment

+ Output Objects in Get Pull Request -The comment to be added. +

Commits

| Field | Field ID | Format | Note | | :--- | :--- | :--- | :--- | -| Comment body | `body` | string | Body of the comment. | -| Commit SHA | `commit-id` | string | SHA of the commit on which you want to comment. | -| Comment end line | `line` | integer | The line of the blob in the pull request diff that the comment applies to. For a multi-line comment, the last line of the range that your comment applies to. | -| Comment path | `path` | string | Path of the file the comment is on. | -| Comment end side | `side` | string | Side of the end line, can be one of: LEFT, RIGHT, side. LEFT is the left side of the diff (deletion), RIGHT is the right side of the diff (addition), and side is the comment on the PR as a whole. Default is side.
Enum values
  • `LEFT`
  • `RIGHT`
  • `side`
| -| Comment start line | `start-line` | integer | The first line in the pull request diff that your multi-line comment applies to. Only multi-line comment needs to fill this field. | -| Comment start side | `start-side` | string | Side of the start line, can be one of: LEFT, RIGHT, side. LEFT is the left side of the diff (deletion), RIGHT is the right side of the diff (addition), and side is the comment on the PR as a whole. Default is side.
Enum values
  • `LEFT`
  • `RIGHT`
  • `side`
| -| Comment type | `subject-type` | string | Subject type of the comment, can be one of: line, file. Default is line.
Enum values
  • `line`
  • `file`
| +| [Files](#get-pull-request-files) | `files` | array | Files in the commit. | +| Commit message | `message` | string | Message of the commit. | +| Commit SHA | `sha` | string | SHA of the commit. | +| [Commit stats](#get-pull-request-commit-stats) | `stats` | object | Stats of changes. |
-
- +

Commit Stats

-| Output | Field ID | Format | Description | +| Field | Field ID | Format | Note | | :--- | :--- | :--- | :--- | -| Comment ID (optional) | `id` | integer | ID of the comment. | -| In Reply To (optional) | `in-reply-to-id` | integer | ID of the comment this comment is in reply to. | -| Commit SHA (optional) | `commit-id` | string | SHA of the commit on which you want to comment. | -| Comment Body (optional) | `body` | string | Body of the comment. | -| Comment Path (optional) | `path` | string | Path of the file the comment is on. | -| Comment End Line (optional) | `line` | integer | The line of the blob in the pull request diff that the comment applies to. For a multi-line comment, the last line of the range that your comment applies to. | -| Comment Start Line (optional) | `start-line` | integer | The first line in the pull request diff that your multi-line comment applies to. Only multi-line comment needs to fill this field. | -| Comment End Side (optional) | `side` | string | Side of the end line, can be one of: LEFT, RIGHT, side. LEFT is the left side of the diff (deletion), RIGHT is the right side of the diff (addition), and side is the comment on the PR as a whole. Default is side. | -| Comment Start Side (optional) | `start-side` | string | Side of the start line, can be one of: LEFT, RIGHT, side. LEFT is the left side of the diff (deletion), RIGHT is the right side of the diff (addition), and side is the comment on the PR as a whole. Default is side. | -| Comment Type (optional) | `subject-type` | string | Subject type of the comment, can be one of: line, file. Default is line. | -| Comment Created At (optional) | `created-at` | string | Time the comment was created. | -| Comment Updated At (optional) | `updated-at` | string | Time the comment was updated. | -| [User](#create-review-comment-user) (optional) | `user` | object | User who created the comment. | +| Additions | `additions` | integer | Number of additions in the commit. | +| Total changes | `changes` | integer | Total number of changes in the commit. | +| Deletions | `deletions` | integer | Number of deletions in the commit. |
-
- Output Objects in Create Review Comment - -

User

+

Files

| Field | Field ID | Format | Note | | :--- | :--- | :--- | :--- | -| User id | `id` | integer | ID of the user. | -| User URL | `url` | string | URL of the user. | +| Additions | `additions` | integer | Number of additions in the commit. | +| Total changes | `changes` | integer | Total number of changes in the commit. | +| Deletions | `deletions` | integer | Number of deletions in the commit. | +| File name | `filename` | string | Name of the file. | +| Patch | `patch` | string | Patch of the file. |
@@ -477,18 +440,22 @@ Get the list of all issues in a repository,This can be a pull request or a gener
-### Get Issue +### List Pull Requests -Get an issue. This can be a pull request or a general issue, and you can tell by the `is-pull-request` field. +Get the list of all pull requests in a repository. Detailed information about each commit in a PR is omitted, please use the `Get Commit` task or the `Get Pull Request` task to get the details of a commit.
| Input | Field ID | Format | Description | | :--- | :--- | :--- | :--- | -| Task ID (required) | `task` | string | `TASK_GET_ISSUE` | +| Task ID (required) | `task` | string | `TASK_LIST_PULL_REQUESTS` | | Owner (required) | `owner` | string | Owner of the repository. | | Repository (required) | `repository` | string | Repository name. | -| Issue Number (required) | `issue-number` | integer | Number of the issue. | +| State | `state` | string | State of the PRs, including open, closed, all. Default is open.
Enum values
  • `open`
  • `closed`
  • `all`
| +| Sort | `sort` | string | Sort the PRs by created, updated, popularity, or long-running. Default is created.
Enum values
  • `created`
  • `updated`
  • `popularity`
  • `long-running`
| +| Direction | `direction` | string | Direction of the sort, including asc or desc. Default is desc.
Enum values
  • `asc`
  • `desc`
| +| Page | `page` | integer | Page number of the results to fetch. Default is 1. | +| Per Page | `per-page` | integer | Number of results to fetch per page. Default is 30. |
@@ -500,70 +467,87 @@ Get an issue. This can be a pull request or a general issue, and you can tell by | Output | Field ID | Format | Description | | :--- | :--- | :--- | :--- | -| Issue Number (optional) | `number` | integer | Number of the issue. | -| Issue State (optional) | `state` | string | State of the issue. | -| Issue Title (optional) | `title` | string | Title of the issue. | -| Issue Body (optional) | `body` | string | Body of the issue. | -| Assignee (optional) | `assignee` | string | Assignee of the issue. | -| Assignees (optional) | `assignees` | array[string] | Assignees of the issue. | -| Labels (optional) | `labels` | array[string] | Labels of the issue. | -| Is Pull Request (optional) | `is-pull-request` | boolean | Whether the issue is a pull request. | +| [Pull Requests](#list-pull-requests-pull-requests) | `pull-requests` | array[object] | An array of PRs. | +
+ Output Objects in List Pull Requests -### Create Issue - -Create an issue. +

Pull Requests

-| Input | Field ID | Format | Description | +| Field | Field ID | Format | Note | | :--- | :--- | :--- | :--- | -| Task ID (required) | `task` | string | `TASK_CREATE_ISSUE` | -| Owner (required) | `owner` | string | Owner of the repository. | -| Repository (required) | `repository` | string | Repository name. | -| Issue Title (required) | `title` | string | Title of the issue. | -| Issue Body (required) | `body` | string | Body of the issue. | -| Assignees | `assignees` | array[string] | Assignees of the issue. | -| Labels | `labels` | array[string] | Labels of the issue. | +| PR base | `base` | string | Base commit of the PR (in SHA value). | +| PR body | `body` | string | Body of the PR. | +| Number of PR comments | `comments-num` | integer | Number of comments on the PR. | +| [Commits](#list-pull-requests-commits) | `commits` | array | Commits in the PR. | +| Number of PR commits | `commits-num` | integer | Number of commits in the PR. | +| PR diff url | `diff-url` | string | URL to the diff of the PR. | +| PR head | `head` | string | Head commit of the PR (in SHA value). | +| PR id | `id` | integer | ID of the PR. | +| PR number | `number` | integer | Number of the PR. | +| Number of PR review comments | `review-comments-num` | integer | Number of review comments in the PR. | +| PR state | `state` | string | State of the PR. | +| PR Title | `title` | string | Title of the PR. |
+

Commits

+ +
+ +| Field | Field ID | Format | Note | +| :--- | :--- | :--- | :--- | +| [Files](#list-pull-requests-files) | `files` | array | Files in the commit. | +| Commit message | `message` | string | Message of the commit. | +| Commit SHA | `sha` | string | SHA of the commit. | +| [Commit stats](#list-pull-requests-commit-stats) | `stats` | object | Stats of changes. | +
+

Commit Stats

+
+| Field | Field ID | Format | Note | +| :--- | :--- | :--- | :--- | +| Additions | `additions` | integer | Number of additions in the commit. | +| Total changes | `changes` | integer | Total number of changes in the commit. | +| Deletions | `deletions` | integer | Number of deletions in the commit. | +
+

Files

-| Output | Field ID | Format | Description | +| Field | Field ID | Format | Note | | :--- | :--- | :--- | :--- | -| Issue Number (optional) | `number` | integer | Number of the issue. | -| Issue State (optional) | `state` | string | State of the issue. | -| Issue Title (optional) | `title` | string | Title of the issue. | -| Issue Body (optional) | `body` | string | Body of the issue. | -| Assignee (optional) | `assignee` | string | Assignee of the issue. | -| Assignees (optional) | `assignees` | array[string] | Assignees of the issue. | -| Labels (optional) | `labels` | array[string] | Labels of the issue. | -| Is Pull Request (optional) | `is-pull-request` | boolean | Whether the issue is a pull request. | +| Additions | `additions` | integer | Number of additions in the commit. | +| Total changes | `changes` | integer | Total number of changes in the commit. | +| Deletions | `deletions` | integer | Number of deletions in the commit. | +| File name | `filename` | string | Name of the file. | +| Patch | `patch` | string | Patch of the file. |
+
-### Create Webhook +### List Review Comments -Create a webhook for a repository. +Get the review comments in a pull request. The comments can be on a specific line or on the PR as a whole.
| Input | Field ID | Format | Description | | :--- | :--- | :--- | :--- | -| Task ID (required) | `task` | string | `TASK_CREATE_WEBHOOK` | +| Task ID (required) | `task` | string | `TASK_LIST_REVIEW_COMMENTS` | | Owner (required) | `owner` | string | Owner of the repository. | | Repository (required) | `repository` | string | Repository name. | -| Webhook URL (required) | `hook-url` | string | URL to send the payload to. | -| Events (required) | `events` | array[string] | Events to trigger the webhook. Please see the github document for more information. | -| Active | `active` | boolean | Whether the webhook is active. Default is false. | -| Content Type | `content-type` | string | Content type of the webhook, can be one of: json, form. Default is json.
Enum values
  • `json`
  • `form`
| -| Hook Secret | `hook-secret` | string | If provided, the secret will be used as the key to generate the HMAC hex digest value for delivery signature headers. (see the document). | +| PR Number | `pr-number` | integer | Number of the PR. Default is `0`, which retrieves all comments on all PRs in the repository. | +| Sort | `sort` | string | Sort the comments by created, updated. Default is created.
Enum values
  • `created`
  • `updated`
| +| Direction | `direction` | string | Direction of the sort, including asc or desc. Default is desc.
Enum values
  • `asc`
  • `desc`
| +| Since | `since` | string | Date (in `YYYY-MM-DD` format) from which comments will start to be fetched. The date will be in the UTC timezone. | +| Page | `page` | integer | Page number of the results to fetch. Default is 1. | +| Per Page | `per-page` | integer | Number of results to fetch per page. Default is 30. |
@@ -575,25 +559,41 @@ Create a webhook for a repository. | Output | Field ID | Format | Description | | :--- | :--- | :--- | :--- | -| Webhook ID (optional) | `id` | integer | ID of the webhook. | -| Webhook URL (optional) | `url` | string | URL of the webhook. | -| Ping URL (optional) | `ping-url` | string | URL to ping the webhook. | -| Test URL (optional) | `test-url` | string | URL to test the webhook. | -| [Config](#create-webhook-config) (optional) | `config` | object | Configuration of the webhook. | +| [Comments](#list-review-comments-comments) | `comments` | array[object] | An array of comments. |
- Output Objects in Create Webhook + Output Objects in List Review Comments -

Config

+

Comments

| Field | Field ID | Format | Note | | :--- | :--- | :--- | :--- | -| Content Type | `content-type` | string | Content type of the webhook. | -| Insecure SSL | `insecure-ssl` | string | Whether the webhook is insecure. | -| Webhook URL | `url` | string | URL of the webhook. | +| Comment body | `body` | string | Body of the comment. | +| Commit SHA | `commit-id` | string | SHA of the commit on which you want to comment. | +| Comment created at | `created-at` | string | Time the comment was created. | +| Comment id | `id` | integer | ID of the comment. | +| In Reply To | `in-reply-to-id` | integer | ID of the comment this comment is in reply to. | +| Comment end line | `line` | integer | The line of the blob in the pull request diff that the comment applies to. For a multi-line comment, the last line of the range that your comment applies to. | +| Comment path | `path` | string | Path of the file the comment is on. | +| Comment end side | `side` | string | Side of the end line, can be one of: LEFT, RIGHT, side. LEFT is the left side of the diff (deletion), RIGHT is the right side of the diff (addition), and side is the comment on the PR as a whole. Default is side. | +| Comment start line | `start-line` | integer | The first line in the pull request diff that your multi-line comment applies to. Only multi-line comment needs to fill this field. | +| Comment start side | `start-side` | string | Side of the start line, can be one of: LEFT, RIGHT, side. LEFT is the left side of the diff (deletion), RIGHT is the right side of the diff (addition), and side is the comment on the PR as a whole. Default is side. | +| Comment type | `subject-type` | string | Subject type of the comment, can be one of: line, file. Default is line. | +| Comment updated at | `updated-at` | string | Time the comment was updated. | +| [User](#list-review-comments-user) | `user` | object | User who created the comment. | +
+ +

User

+ +
+ +| Field | Field ID | Format | Note | +| :--- | :--- | :--- | :--- | +| User id | `id` | integer | ID of the user. | +| User URL | `url` | string | URL of the user. |
diff --git a/pkg/component/application/github/v0/config/definition.yaml b/pkg/component/application/github/v0/config/definition.yaml index 6e6884e67..411f7f7e1 100644 --- a/pkg/component/application/github/v0/config/definition.yaml +++ b/pkg/component/application/github/v0/config/definition.yaml @@ -1,15 +1,3 @@ -availableTasks: -- TASK_LIST_PULL_REQUESTS -- TASK_GET_PULL_REQUEST -- TASK_GET_COMMIT -- TASK_LIST_REVIEW_COMMENTS -- TASK_CREATE_REVIEW_COMMENT -- TASK_LIST_ISSUES -- TASK_GET_ISSUE -- TASK_CREATE_ISSUE -- TASK_CREATE_WEBHOOK -availableEvents: -- EVENT_STAR_CREATED documentationUrl: https://www.instill.tech/docs/component/application/github icon: assets/github.svg id: github diff --git a/pkg/component/application/googlesearch/v0/config/definition.yaml b/pkg/component/application/googlesearch/v0/config/definition.yaml index a0eac5ae5..d2487a4b8 100644 --- a/pkg/component/application/googlesearch/v0/config/definition.yaml +++ b/pkg/component/application/googlesearch/v0/config/definition.yaml @@ -1,5 +1,3 @@ -availableTasks: -- TASK_SEARCH custom: false documentationUrl: https://www.instill.tech/docs/component/application/google-search icon: assets/google-search.svg diff --git a/pkg/component/application/hubspot/v0/README.mdx b/pkg/component/application/hubspot/v0/README.mdx index f8f8c5718..6b04d9dd4 100644 --- a/pkg/component/application/hubspot/v0/README.mdx +++ b/pkg/component/application/hubspot/v0/README.mdx @@ -7,21 +7,21 @@ description: "Learn about how to set up a VDP HubSpot component https://github.c The HubSpot component is an application component that allows users to use HubSpot application to do various tasks. It can carry out the following tasks: -- [Get Contact](#get-contact) +- [Create Company](#create-company) - [Create Contact](#create-contact) -- [Get Deal](#get-deal) - [Create Deal](#create-deal) -- [Update Deal](#update-deal) -- [Get Company](#get-company) -- [Create Company](#create-company) -- [Get Ticket](#get-ticket) - [Create Ticket](#create-ticket) -- [Update Ticket](#update-ticket) +- [Get All](#get-all) +- [Get Company](#get-company) +- [Get Contact](#get-contact) +- [Get Deal](#get-deal) +- [Get Owner](#get-owner) - [Get Thread](#get-thread) +- [Get Ticket](#get-ticket) - [Insert Message](#insert-message) - [Retrieve Association](#retrieve-association) -- [Get Owner](#get-owner) -- [Get All](#get-all) +- [Update Deal](#update-deal) +- [Update Ticket](#update-ticket) @@ -62,16 +62,30 @@ ${connection.}`. ## Supported Tasks -### Get Contact +### Create Company -Get contact information using contact ID or Email +Create new company
| Input | Field ID | Format | Description | | :--- | :--- | :--- | :--- | -| Task ID (required) | `task` | string | `TASK_GET_CONTACT` | -| Contact ID or Email (required) | `contact-id-or-email` | string | Input contact ID or email. If the input has @, it will search the contact using email. | +| Task ID (required) | `task` | string | `TASK_CREATE_COMPANY` | +| Owner ID | `owner-id` | string | The user who is assigned to the object. | +| Company Name | `company-name` | string | Company name. | +| Company Domain (required) | `company-domain` | string | The domain name of the company. | +| Description | `description` | string | Description of the company. | +| Phone Number | `phone-number` | string | Phone number of the company. If you plan to use the number formatting feature in HubSpot, use country code + phone number. Example: +886xxxxxxxxx. | +| Industry | `industry` | string | The industry the company belongs to. Default format is in capital letters, with _ as space. Example: BROADCAST_MEDIA. | +| Company Type | `company-type` | string | Type of company. Default format is capital letter. Example: RESELLER. | +| City | `city` | string | City. | +| State | `state` | string | State. | +| Country | `country` | string | Country. | +| Postal Code | `postal-code,` | string | Postal code. | +| Time Zone | `time-zone` | string | Time zone. | +| Annual Revenue | `annual-revenue` | number | Annual revenue. | +| Linkedin Page | `linkedin-page` | string | Linkedin page of the company. | +| Create Object -> Contact Association Using Contact IDs | `create-contacts-association` | array[string] | Existing contact IDs to be associated with the object. |
@@ -83,16 +97,7 @@ Get contact information using contact ID or Email | Output | Field ID | Format | Description | | :--- | :--- | :--- | :--- | -| Owner ID (optional) | `owner-id` | string | The user who is assigned to the object. | -| Email Address (optional) | `email` | string | Email address. | -| First Name (optional) | `first-name` | string | First name. | -| Last Name (optional) | `last-name` | string | Last name. | -| Phone Number (optional) | `phone-number` | string | Phone number. If you plan to use the number formatting feature in HubSpot, use country code + phone number. Example: +886xxxxxxxxx. | -| Company (optional) | `company` | string | Company. | -| Job Title (optional) | `job-title` | string | Job title. | -| Lifecycle Stage (optional) | `lifecycle-stage` | string | Lifecycle stages are used to track how contacts or companies move forward in your process. Default format is in small letters, all words are combined. Example: salesqualifiedlead. However, remember to check internal value for custom fields. | -| Lead Status (optional) | `lead-status` | string | The contact's sales, prospecting or outreach status. Default format is in capital letters, with _ as space. Example: IN_PROGRESS. However, remember to check internal value for custom fields. | -| Contact ID | `contact-id` | string | Contact ID. | +| Company ID | `company-id` | string | Company ID. | @@ -132,16 +137,23 @@ Create new contact -### Get Deal +### Create Deal -Get deal information using deal ID +Create new deal
| Input | Field ID | Format | Description | | :--- | :--- | :--- | :--- | -| Task ID (required) | `task` | string | `TASK_GET_DEAL` | -| Deal ID (required) | `deal-id` | string | Input deal ID. | +| Task ID (required) | `task` | string | `TASK_CREATE_DEAL` | +| Owner ID | `owner-id` | string | The user who is assigned to the object. | +| Deal Name (required) | `deal-name` | string | Deal name. | +| Pipeline (required) | `pipeline` | string | A pipeline is the place where you document and manage how your prospects move through the steps of your sales process. HubSpot uses interval value rather than the name displayed in the view. | +| Deal Stage (required) | `deal-stage` | string | Deal stages allow you to categorize and track the progress of the deals that you are working on. Default format is in small letters, all words are combined. Example: qualifiedtobuy. However, remember to check internal value for custom fields. | +| Amount | `amount` | number | The total amount of the deal. | +| Deal Type | `deal-type` | string | The type of deal. Default format is in small letters, all words are combined. Example: newbusiness. However, remember to check internal value for custom fields. | +| Close Date | `close-date` | string | Date the deal was closed. Set automatically by HubSpot. Format is in ISO 8601. Example: 2024-07-01T11:47:40.388Z. | +| Create Object -> Contact Association Using Contact IDs | `create-contacts-association` | array[string] | Existing contact IDs to be associated with the object. |
@@ -153,34 +165,26 @@ Get deal information using deal ID | Output | Field ID | Format | Description | | :--- | :--- | :--- | :--- | -| Owner ID (optional) | `owner-id` | string | The user who is assigned to the object. | -| Deal Name | `deal-name` | string | Deal name. | -| Pipeline | `pipeline` | string | A pipeline is the place where you document and manage how your prospects move through the steps of your sales process. HubSpot uses interval value rather than the name displayed in the view. | -| Deal Stage | `deal-stage` | string | Deal stages allow you to categorize and track the progress of the deals that you are working on. Default format is in small letters, all words are combined. Example: qualifiedtobuy. However, remember to check internal value for custom fields. | -| Amount (optional) | `amount` | number | The total amount of the deal. | -| Deal Type (optional) | `deal-type` | string | The type of deal. Default format is in small letters, all words are combined. Example: newbusiness. However, remember to check internal value for custom fields. | -| Close Date (optional) | `close-date` | string | Date the deal was closed. Set automatically by HubSpot. Format is in ISO 8601. Example: 2024-07-01T11:47:40.388Z. | -| Create Date (optional) | `create-date` | string | Create date. Format is in ISO 8601. Example: 2024-07-01T11:47:40.388Z. | -| Associated Contact IDs (optional) | `associated-contact-ids` | array[string] | Contact IDs associated with the object. | +| Deal ID | `deal-id` | string | Deal ID. | -### Create Deal +### Create Ticket -Create new deal +Create new ticket
| Input | Field ID | Format | Description | | :--- | :--- | :--- | :--- | -| Task ID (required) | `task` | string | `TASK_CREATE_DEAL` | +| Task ID (required) | `task` | string | `TASK_CREATE_TICKET` | | Owner ID | `owner-id` | string | The user who is assigned to the object. | -| Deal Name (required) | `deal-name` | string | Deal name. | -| Pipeline (required) | `pipeline` | string | A pipeline is the place where you document and manage how your prospects move through the steps of your sales process. HubSpot uses interval value rather than the name displayed in the view. | -| Deal Stage (required) | `deal-stage` | string | Deal stages allow you to categorize and track the progress of the deals that you are working on. Default format is in small letters, all words are combined. Example: qualifiedtobuy. However, remember to check internal value for custom fields. | -| Amount | `amount` | number | The total amount of the deal. | -| Deal Type | `deal-type` | string | The type of deal. Default format is in small letters, all words are combined. Example: newbusiness. However, remember to check internal value for custom fields. | -| Close Date | `close-date` | string | Date the deal was closed. Set automatically by HubSpot. Format is in ISO 8601. Example: 2024-07-01T11:47:40.388Z. | +| Ticket Name (required) | `ticket-name` | string | Ticket name. | +| Ticket Status (required) | `ticket-status` | string | The pipeline stage that contains this ticket. Default format is number. Example: 1. However, remember to check internal value for custom fields. Note: In Instill AI, ticket-status is displayed as string because of the possible custom internal value. | +| Pipeline (required) | `pipeline` | string | A pipeline organizes and tracks the progression of tickets through various stages of resolution within your support process. HubSpot uses interval value rather than the name displayed in the view. | +| Categories | `categories` | array[string] | The main reason customer reached out for help. Default format is in capital letters. Example: BILLING_ISSUE. However, remember to check internal value for custom fields. | +| Priority | `priority` | string | The level of attention needed on the ticket. Default format is in capital letters. Example: MEDIUM. However, remember to check internal value for custom fields. | +| Source | `source` | string | Channel where ticket was originally submitted. Default format is in capital letters. Example: EMAIL. | | Create Object -> Contact Association Using Contact IDs | `create-contacts-association` | array[string] | Existing contact IDs to be associated with the object. |
@@ -193,28 +197,20 @@ Create new deal | Output | Field ID | Format | Description | | :--- | :--- | :--- | :--- | -| Deal ID | `deal-id` | string | Deal ID. | +| Ticket ID | `ticket-id` | string | Ticket ID. | -### Update Deal +### Get All -Update existing deal +Get all the IDs for a specific object (e.g. all contact IDs)
| Input | Field ID | Format | Description | | :--- | :--- | :--- | :--- | -| Task ID (required) | `task` | string | `TASK_UPDATE_DEAL` | -| Deal ID (required) | `deal-id` | string | Input deal ID. | -| Owner ID | `owner-id` | string | The user who is assigned to the object. | -| Deal Name | `deal-name` | string | Deal name. | -| Pipeline | `pipeline` | string | A pipeline is the place where you document and manage how your prospects move through the steps of your sales process. HubSpot uses interval value rather than the name displayed in the view. | -| Deal Stage | `deal-stage` | string | Deal stages allow you to categorize and track the progress of the deals that you are working on. Default format is in small letters, all words are combined. Example: qualifiedtobuy. However, remember to check internal value for custom fields. | -| Amount | `amount` | number | The total amount of the deal. | -| Deal Type | `deal-type` | string | The type of deal. Default format is in small letters, all words are combined. Example: newbusiness. However, remember to check internal value for custom fields. | -| Close Date | `close-date` | string | Date the deal was closed. Set automatically by HubSpot. Format is in ISO 8601. Example: 2024-07-01T11:47:40.388Z. | -| Create Object -> Contact Association Using Contact IDs | `create-contacts-association` | array[string] | Existing contact IDs to be associated with the object. | +| Task ID (required) | `task` | string | `TASK_GET_ALL` | +| Object Type (required) | `object-type` | string | The object which you want to get all IDs for.
Enum values
  • `Contacts`
  • `Deals`
  • `Companies`
  • `Tickets`
  • `Threads`
  • `Owners`
|
@@ -226,8 +222,8 @@ Update existing deal | Output | Field ID | Format | Description | | :--- | :--- | :--- | :--- | -| Updated by User ID | `updated-by-user-id` | string | User ID that updated the deal. | -| Updated At | `updated-at` | string | The time when the deal was updated. | +| Object ID Array | `object-ids` | array[string] | An array of object ID. | +| Object IDs Length | `object-ids-length` | integer | The number of object IDs. | @@ -271,30 +267,16 @@ Get company information using company ID -### Create Company +### Get Contact -Create new company +Get contact information using contact ID or Email
| Input | Field ID | Format | Description | | :--- | :--- | :--- | :--- | -| Task ID (required) | `task` | string | `TASK_CREATE_COMPANY` | -| Owner ID | `owner-id` | string | The user who is assigned to the object. | -| Company Name | `company-name` | string | Company name. | -| Company Domain (required) | `company-domain` | string | The domain name of the company. | -| Description | `description` | string | Description of the company. | -| Phone Number | `phone-number` | string | Phone number of the company. If you plan to use the number formatting feature in HubSpot, use country code + phone number. Example: +886xxxxxxxxx. | -| Industry | `industry` | string | The industry the company belongs to. Default format is in capital letters, with _ as space. Example: BROADCAST_MEDIA. | -| Company Type | `company-type` | string | Type of company. Default format is capital letter. Example: RESELLER. | -| City | `city` | string | City. | -| State | `state` | string | State. | -| Country | `country` | string | Country. | -| Postal Code | `postal-code,` | string | Postal code. | -| Time Zone | `time-zone` | string | Time zone. | -| Annual Revenue | `annual-revenue` | number | Annual revenue. | -| Linkedin Page | `linkedin-page` | string | Linkedin page of the company. | -| Create Object -> Contact Association Using Contact IDs | `create-contacts-association` | array[string] | Existing contact IDs to be associated with the object. | +| Task ID (required) | `task` | string | `TASK_GET_CONTACT` | +| Contact ID or Email (required) | `contact-id-or-email` | string | Input contact ID or email. If the input has @, it will search the contact using email. |
@@ -306,20 +288,29 @@ Create new company | Output | Field ID | Format | Description | | :--- | :--- | :--- | :--- | -| Company ID | `company-id` | string | Company ID. | +| Owner ID (optional) | `owner-id` | string | The user who is assigned to the object. | +| Email Address (optional) | `email` | string | Email address. | +| First Name (optional) | `first-name` | string | First name. | +| Last Name (optional) | `last-name` | string | Last name. | +| Phone Number (optional) | `phone-number` | string | Phone number. If you plan to use the number formatting feature in HubSpot, use country code + phone number. Example: +886xxxxxxxxx. | +| Company (optional) | `company` | string | Company. | +| Job Title (optional) | `job-title` | string | Job title. | +| Lifecycle Stage (optional) | `lifecycle-stage` | string | Lifecycle stages are used to track how contacts or companies move forward in your process. Default format is in small letters, all words are combined. Example: salesqualifiedlead. However, remember to check internal value for custom fields. | +| Lead Status (optional) | `lead-status` | string | The contact's sales, prospecting or outreach status. Default format is in capital letters, with _ as space. Example: IN_PROGRESS. However, remember to check internal value for custom fields. | +| Contact ID | `contact-id` | string | Contact ID. | -### Get Ticket +### Get Deal -Get ticket information using ticket ID +Get deal information using deal ID
| Input | Field ID | Format | Description | | :--- | :--- | :--- | :--- | -| Task ID (required) | `task` | string | `TASK_GET_TICKET` | -| Ticket ID (required) | `ticket-id` | string | Input ticket ID. | +| Task ID (required) | `task` | string | `TASK_GET_DEAL` | +| Deal ID (required) | `deal-id` | string | Input deal ID. |
@@ -332,36 +323,28 @@ Get ticket information using ticket ID | Output | Field ID | Format | Description | | :--- | :--- | :--- | :--- | | Owner ID (optional) | `owner-id` | string | The user who is assigned to the object. | -| Ticket Name | `ticket-name` | string | Ticket name. | -| Ticket Status | `ticket-status` | string | The pipeline stage that contains this ticket. Default format is number. Example: 1. However, remember to check internal value for custom fields. Note: In Instill AI, ticket-status is displayed as string because of the possible custom internal value. | -| Pipeline | `pipeline` | string | A pipeline organizes and tracks the progression of tickets through various stages of resolution within your support process. HubSpot uses interval value rather than the name displayed in the view. | -| Categories (optional) | `categories` | array[string] | The main reason customer reached out for help. Default format is in capital letters. Example: BILLING_ISSUE. However, remember to check internal value for custom fields. | -| Priority (optional) | `priority` | string | The level of attention needed on the ticket. Default format is in capital letters. Example: MEDIUM. However, remember to check internal value for custom fields. | -| Source (optional) | `source` | string | Channel where ticket was originally submitted. Default format is in capital letters. Example: EMAIL. | -| Record Source (optional) | `record-source` | string | How this record was created. | +| Deal Name | `deal-name` | string | Deal name. | +| Pipeline | `pipeline` | string | A pipeline is the place where you document and manage how your prospects move through the steps of your sales process. HubSpot uses interval value rather than the name displayed in the view. | +| Deal Stage | `deal-stage` | string | Deal stages allow you to categorize and track the progress of the deals that you are working on. Default format is in small letters, all words are combined. Example: qualifiedtobuy. However, remember to check internal value for custom fields. | +| Amount (optional) | `amount` | number | The total amount of the deal. | +| Deal Type (optional) | `deal-type` | string | The type of deal. Default format is in small letters, all words are combined. Example: newbusiness. However, remember to check internal value for custom fields. | +| Close Date (optional) | `close-date` | string | Date the deal was closed. Set automatically by HubSpot. Format is in ISO 8601. Example: 2024-07-01T11:47:40.388Z. | | Create Date (optional) | `create-date` | string | Create date. Format is in ISO 8601. Example: 2024-07-01T11:47:40.388Z. | -| Last Modified Date (optional) | `last-modified-date` | string | Last modified date. Format is in ISO 8601. Example: 2024-07-01T11:47:40.388Z. | | Associated Contact IDs (optional) | `associated-contact-ids` | array[string] | Contact IDs associated with the object. | -### Create Ticket +### Get Owner -Create new ticket +Get information about HubSpot owner using either owner ID or user ID. For more information about owner, please go to [here](https://developers.hubspot.com/docs/api/crm/owners)
| Input | Field ID | Format | Description | | :--- | :--- | :--- | :--- | -| Task ID (required) | `task` | string | `TASK_CREATE_TICKET` | -| Owner ID | `owner-id` | string | The user who is assigned to the object. | -| Ticket Name (required) | `ticket-name` | string | Ticket name. | -| Ticket Status (required) | `ticket-status` | string | The pipeline stage that contains this ticket. Default format is number. Example: 1. However, remember to check internal value for custom fields. Note: In Instill AI, ticket-status is displayed as string because of the possible custom internal value. | -| Pipeline (required) | `pipeline` | string | A pipeline organizes and tracks the progression of tickets through various stages of resolution within your support process. HubSpot uses interval value rather than the name displayed in the view. | -| Categories | `categories` | array[string] | The main reason customer reached out for help. Default format is in capital letters. Example: BILLING_ISSUE. However, remember to check internal value for custom fields. | -| Priority | `priority` | string | The level of attention needed on the ticket. Default format is in capital letters. Example: MEDIUM. However, remember to check internal value for custom fields. | -| Source | `source` | string | Channel where ticket was originally submitted. Default format is in capital letters. Example: EMAIL. | -| Create Object -> Contact Association Using Contact IDs | `create-contacts-association` | array[string] | Existing contact IDs to be associated with the object. | +| Task ID (required) | `task` | string | `TASK_GET_OWNER` | +| ID Type (required) | `id-type` | string | Specify the type of ID you will use to get owner's information.
Enum values
  • `Owner ID`
  • `User ID`
| +| ID (required) | `id` | string | Can either be owner ID or user ID; according to the ID type you selected. |
@@ -373,41 +356,31 @@ Create new ticket | Output | Field ID | Format | Description | | :--- | :--- | :--- | :--- | -| Ticket ID | `ticket-id` | string | Ticket ID. | - - - -### Update Ticket - -Update existing ticket - -
- -| Input | Field ID | Format | Description | -| :--- | :--- | :--- | :--- | -| Task ID (required) | `task` | string | `TASK_UPDATE_TICKET` | -| Owner ID | `owner-id` | string | The user who is assigned to the object. | -| Ticket ID (required) | `ticket-id` | string | Input ticket ID. | -| Ticket Name | `ticket-name` | string | Ticket name. | -| Ticket Status | `ticket-status` | string | The pipeline stage that contains this ticket. Default format is number. Example: 1. However, remember to check internal value for custom fields. Note: In Instill AI, ticket-status is displayed as string because of the possible custom internal value. | -| Pipeline | `pipeline` | string | A pipeline organizes and tracks the progression of tickets through various stages of resolution within your support process. HubSpot uses interval value rather than the name displayed in the view. | -| Categories | `categories` | array[string] | The main reason customer reached out for help. Default format is in capital letters. Example: BILLING_ISSUE. However, remember to check internal value for custom fields. | -| Priority | `priority` | string | The level of attention needed on the ticket. Default format is in capital letters. Example: MEDIUM. However, remember to check internal value for custom fields. | -| Source | `source` | string | Channel where ticket was originally submitted. Default format is in capital letters. Example: EMAIL. | -| Create Object -> Contact Association Using Contact IDs | `create-contacts-association` | array[string] | Existing contact IDs to be associated with the object. | +| First Name | `first-name` | string | First name. | +| Last Name | `last-name` | string | Last name. | +| Email | `email` | string | Email. | +| Owner ID | `owner-id` | string | Owner ID. Usually used to associate the owner with other objects. | +| User ID | `user-id` | string | User ID. Usually used to indicate the owner who performed the action. User ID can be seen in Update Deal task output. | +| [Teams](#get-owner-teams) (optional) | `teams` | array[object] | The owner's teams information. | +| Created At | `created-at` | string | Created at. | +| Updated At | `updated-at` | string | Updated at. | +| Archived | `archived` | boolean | Archived. |
+
+ Output Objects in Get Owner - - - +

Teams

-| Output | Field ID | Format | Description | +| Field | Field ID | Format | Note | | :--- | :--- | :--- | :--- | -| Updated At | `updated-at` | string | The time when the ticket was updated. | +| Team ID | `team-id` | string | The ID of the team. | +| Team Name | `team-name` | string | The name of the team. | +| Team Primary | `team-primary` | boolean | Indicate whether this team is the primary team of the owner. |
+
### Get Thread @@ -478,6 +451,41 @@ Retrieve all the messages inside a thread (conversation inbox). The messages wil +### Get Ticket + +Get ticket information using ticket ID + +
+ +| Input | Field ID | Format | Description | +| :--- | :--- | :--- | :--- | +| Task ID (required) | `task` | string | `TASK_GET_TICKET` | +| Ticket ID (required) | `ticket-id` | string | Input ticket ID. | +
+ + + + + + +
+ +| Output | Field ID | Format | Description | +| :--- | :--- | :--- | :--- | +| Owner ID (optional) | `owner-id` | string | The user who is assigned to the object. | +| Ticket Name | `ticket-name` | string | Ticket name. | +| Ticket Status | `ticket-status` | string | The pipeline stage that contains this ticket. Default format is number. Example: 1. However, remember to check internal value for custom fields. Note: In Instill AI, ticket-status is displayed as string because of the possible custom internal value. | +| Pipeline | `pipeline` | string | A pipeline organizes and tracks the progression of tickets through various stages of resolution within your support process. HubSpot uses interval value rather than the name displayed in the view. | +| Categories (optional) | `categories` | array[string] | The main reason customer reached out for help. Default format is in capital letters. Example: BILLING_ISSUE. However, remember to check internal value for custom fields. | +| Priority (optional) | `priority` | string | The level of attention needed on the ticket. Default format is in capital letters. Example: MEDIUM. However, remember to check internal value for custom fields. | +| Source (optional) | `source` | string | Channel where ticket was originally submitted. Default format is in capital letters. Example: EMAIL. | +| Record Source (optional) | `record-source` | string | How this record was created. | +| Create Date (optional) | `create-date` | string | Create date. Format is in ISO 8601. Example: 2024-07-01T11:47:40.388Z. | +| Last Modified Date (optional) | `last-modified-date` | string | Last modified date. Format is in ISO 8601. Example: 2024-07-01T11:47:40.388Z. | +| Associated Contact IDs (optional) | `associated-contact-ids` | array[string] | Contact IDs associated with the object. | +
+ + ### Insert Message Insert message into a thread (only support email thread) @@ -535,17 +543,24 @@ Get the object IDs associated with contact ID (contact->objects). If you are try -### Get Owner +### Update Deal -Get information about HubSpot owner using either owner ID or user ID. For more information about owner, please go to [here](https://developers.hubspot.com/docs/api/crm/owners) +Update existing deal
| Input | Field ID | Format | Description | | :--- | :--- | :--- | :--- | -| Task ID (required) | `task` | string | `TASK_GET_OWNER` | -| ID Type (required) | `id-type` | string | Specify the type of ID you will use to get owner's information.
Enum values
  • `Owner ID`
  • `User ID`
| -| ID (required) | `id` | string | Can either be owner ID or user ID; according to the ID type you selected. | +| Task ID (required) | `task` | string | `TASK_UPDATE_DEAL` | +| Deal ID (required) | `deal-id` | string | Input deal ID. | +| Owner ID | `owner-id` | string | The user who is assigned to the object. | +| Deal Name | `deal-name` | string | Deal name. | +| Pipeline | `pipeline` | string | A pipeline is the place where you document and manage how your prospects move through the steps of your sales process. HubSpot uses interval value rather than the name displayed in the view. | +| Deal Stage | `deal-stage` | string | Deal stages allow you to categorize and track the progress of the deals that you are working on. Default format is in small letters, all words are combined. Example: qualifiedtobuy. However, remember to check internal value for custom fields. | +| Amount | `amount` | number | The total amount of the deal. | +| Deal Type | `deal-type` | string | The type of deal. Default format is in small letters, all words are combined. Example: newbusiness. However, remember to check internal value for custom fields. | +| Close Date | `close-date` | string | Date the deal was closed. Set automatically by HubSpot. Format is in ISO 8601. Example: 2024-07-01T11:47:40.388Z. | +| Create Object -> Contact Association Using Contact IDs | `create-contacts-association` | array[string] | Existing contact IDs to be associated with the object. |
@@ -557,43 +572,29 @@ Get information about HubSpot owner using either owner ID or user ID. For more i | Output | Field ID | Format | Description | | :--- | :--- | :--- | :--- | -| First Name | `first-name` | string | First name. | -| Last Name | `last-name` | string | Last name. | -| Email | `email` | string | Email. | -| Owner ID | `owner-id` | string | Owner ID. Usually used to associate the owner with other objects. | -| User ID | `user-id` | string | User ID. Usually used to indicate the owner who performed the action. User ID can be seen in Update Deal task output. | -| [Teams](#get-owner-teams) (optional) | `teams` | array[object] | The owner's teams information. | -| Created At | `created-at` | string | Created at. | -| Updated At | `updated-at` | string | Updated at. | -| Archived | `archived` | boolean | Archived. | - - -
- Output Objects in Get Owner - -

Teams

- -
- -| Field | Field ID | Format | Note | -| :--- | :--- | :--- | :--- | -| Team ID | `team-id` | string | The ID of the team. | -| Team Name | `team-name` | string | The name of the team. | -| Team Primary | `team-primary` | boolean | Indicate whether this team is the primary team of the owner. | +| Updated by User ID | `updated-by-user-id` | string | User ID that updated the deal. | +| Updated At | `updated-at` | string | The time when the deal was updated. |
-
-### Get All +### Update Ticket -Get all the IDs for a specific object (e.g. all contact IDs) +Update existing ticket
| Input | Field ID | Format | Description | | :--- | :--- | :--- | :--- | -| Task ID (required) | `task` | string | `TASK_GET_ALL` | -| Object Type (required) | `object-type` | string | The object which you want to get all IDs for.
Enum values
  • `Contacts`
  • `Deals`
  • `Companies`
  • `Tickets`
  • `Threads`
  • `Owners`
| +| Task ID (required) | `task` | string | `TASK_UPDATE_TICKET` | +| Owner ID | `owner-id` | string | The user who is assigned to the object. | +| Ticket ID (required) | `ticket-id` | string | Input ticket ID. | +| Ticket Name | `ticket-name` | string | Ticket name. | +| Ticket Status | `ticket-status` | string | The pipeline stage that contains this ticket. Default format is number. Example: 1. However, remember to check internal value for custom fields. Note: In Instill AI, ticket-status is displayed as string because of the possible custom internal value. | +| Pipeline | `pipeline` | string | A pipeline organizes and tracks the progression of tickets through various stages of resolution within your support process. HubSpot uses interval value rather than the name displayed in the view. | +| Categories | `categories` | array[string] | The main reason customer reached out for help. Default format is in capital letters. Example: BILLING_ISSUE. However, remember to check internal value for custom fields. | +| Priority | `priority` | string | The level of attention needed on the ticket. Default format is in capital letters. Example: MEDIUM. However, remember to check internal value for custom fields. | +| Source | `source` | string | Channel where ticket was originally submitted. Default format is in capital letters. Example: EMAIL. | +| Create Object -> Contact Association Using Contact IDs | `create-contacts-association` | array[string] | Existing contact IDs to be associated with the object. |
@@ -605,8 +606,7 @@ Get all the IDs for a specific object (e.g. all contact IDs) | Output | Field ID | Format | Description | | :--- | :--- | :--- | :--- | -| Object ID Array | `object-ids` | array[string] | An array of object ID. | -| Object IDs Length | `object-ids-length` | integer | The number of object IDs. | +| Updated At | `updated-at` | string | The time when the ticket was updated. | diff --git a/pkg/component/application/hubspot/v0/config/definition.yaml b/pkg/component/application/hubspot/v0/config/definition.yaml index 765ca4b2e..2c6d00539 100644 --- a/pkg/component/application/hubspot/v0/config/definition.yaml +++ b/pkg/component/application/hubspot/v0/config/definition.yaml @@ -1,19 +1,3 @@ -availableTasks: -- TASK_GET_CONTACT -- TASK_CREATE_CONTACT -- TASK_GET_DEAL -- TASK_CREATE_DEAL -- TASK_UPDATE_DEAL -- TASK_GET_COMPANY -- TASK_CREATE_COMPANY -- TASK_GET_TICKET -- TASK_CREATE_TICKET -- TASK_UPDATE_TICKET -- TASK_GET_THREAD -- TASK_INSERT_MESSAGE -- TASK_RETRIEVE_ASSOCIATION -- TASK_GET_OWNER -- TASK_GET_ALL documentationUrl: https://www.instill.tech/docs/component/application/hubspot icon: assets/hubspot.svg id: hubspot diff --git a/pkg/component/application/jira/v0/config/definition.yaml b/pkg/component/application/jira/v0/config/definition.yaml index 2d24f2715..f590576b6 100644 --- a/pkg/component/application/jira/v0/config/definition.yaml +++ b/pkg/component/application/jira/v0/config/definition.yaml @@ -1,13 +1,3 @@ -availableTasks: -- TASK_CREATE_ISSUE -- TASK_CREATE_SPRINT -- TASK_GET_ISSUE -- TASK_GET_SPRINT -- TASK_LIST_BOARDS -- TASK_LIST_ISSUES -- TASK_LIST_SPRINTS -- TASK_UPDATE_ISSUE -- TASK_UPDATE_SPRINT documentationUrl: https://www.instill.tech/docs/component/application/jira icon: assets/jira.svg id: jira diff --git a/pkg/component/application/leadiq/v0/config/definition.yaml b/pkg/component/application/leadiq/v0/config/definition.yaml index 8b7d18525..11845df1a 100644 --- a/pkg/component/application/leadiq/v0/config/definition.yaml +++ b/pkg/component/application/leadiq/v0/config/definition.yaml @@ -1,5 +1,3 @@ -availableTasks: -- TASK_FIND_PROSPECTS documentationUrl: https://www.instill.tech/docs/component/application/leadiq icon: assets/leadiq.svg id: leadiq diff --git a/pkg/component/application/numbers/v0/config/definition.yaml b/pkg/component/application/numbers/v0/config/definition.yaml index 11938101d..489af9d66 100644 --- a/pkg/component/application/numbers/v0/config/definition.yaml +++ b/pkg/component/application/numbers/v0/config/definition.yaml @@ -1,5 +1,3 @@ -availableTasks: -- TASK_REGISTER custom: false documentationUrl: https://www.instill.tech/docs/component/application/numbers icon: assets/numbers.svg diff --git a/pkg/component/application/slack/v0/config/definition.yaml b/pkg/component/application/slack/v0/config/definition.yaml index 423d7eb09..4e00755a4 100644 --- a/pkg/component/application/slack/v0/config/definition.yaml +++ b/pkg/component/application/slack/v0/config/definition.yaml @@ -1,8 +1,3 @@ -availableTasks: -- TASK_READ_MESSAGE -- TASK_WRITE_MESSAGE -availableEvents: -- EVENT_NEW_MESSAGE custom: false documentationUrl: https://www.instill.tech/docs/component/application/slack icon: assets/slack.svg diff --git a/pkg/component/application/smartlead/v0/README.mdx b/pkg/component/application/smartlead/v0/README.mdx index bf7ee7755..61deaa172 100644 --- a/pkg/component/application/smartlead/v0/README.mdx +++ b/pkg/component/application/smartlead/v0/README.mdx @@ -7,15 +7,15 @@ description: "Learn about how to set up a VDP Smartlead component https://github The Smartlead component is an application component that allows users to organize your leads and helps you close more deals. It can carry out the following tasks: -- [Create Campaign](#create-campaign) -- [Setup Campaign](#setup-campaign) -- [Save Sequences](#save-sequences) -- [Get Sequences](#get-sequences) - [Add Leads](#add-leads) - [Add Sender Email](#add-sender-email) -- [Update Campaign Status](#update-campaign-status) +- [Create Campaign](#create-campaign) - [Get Campaign Metric](#get-campaign-metric) +- [Get Sequences](#get-sequences) - [List Leads Status](#list-leads-status) +- [Save Sequences](#save-sequences) +- [Setup Campaign](#setup-campaign) +- [Update Campaign Status](#update-campaign-status) ## Use Cases @@ -65,20 +65,53 @@ ${connection.}`. ## Supported Tasks -### Create Campaign +### Add Leads -Create a new campaign. You have to create a campaign before you can start adding leads to it. Please check [Smartlead API document](https://api.smartlead.ai/reference/references#campaign). +Add leads to a campaign.
| Input | Field ID | Format | Description | | :--- | :--- | :--- | :--- | -| Task ID (required) | `task` | string | `TASK_CREATE_CAMPAIGN` | -| Name (required) | `name` | string | Name of the campaign. | +| Task ID (required) | `task` | string | `TASK_ADD_LEADS` | +| Campaign Name (required) | `campaign-name` | string | Name of the campaign. | +| [Leads](#add-leads-leads) (required) | `leads` | array[object] | Leads to add to the campaign. | +| [Settings](#add-leads-settings) | `settings` | object | Settings for adding leads. | +
+ + +
+ Input Objects in Add Leads + +

Leads

+ +Leads to add to the campaign. + +
+ +| Field | Field ID | Format | Note | +| :--- | :--- | :--- | :--- | +| Company | `company` | string | Company name of the lead. | +| Custom Fields | `custom-fields` | array | Custom fields of the lead. You can use custom fields to store additional information about the lead, which can be used in the variable in the sequence email template. | +| Email | `email` | string | Email of the lead. | +| First Name | `first-name` | string | First name of the lead. | +| Last Name | `last-name` | string | Last name of the lead. | +| Location | `location` | string | Location of the lead. |
+

Settings

+Settings for adding leads. +
+| Field | Field ID | Format | Note | +| :--- | :--- | :--- | :--- | +| Ignore Community Bounce List | `ignore-community-bounce-list` | boolean | Ignore the community bounce list and add the lead. If true, uploaded leads will BYPASS any leads that bounced across Smartlead entire user base and be uploaded to the campaign. | +| Ignore Duplicate Leads in Other Campaign | `ignore-duplicate-leads-in-other-campaign` | boolean | Ignore duplicate leads in other campaigns and add the lead. If true, leads will NOT BYPASS the comparison with other campaigns and NOT be added to the campaign if they are part of any other campaign. | +| Ignore Global Block List | `ignore-global-block-list` | boolean | Ignore the global block list and add the lead. If true, uploaded leads will BYPASS the global block list and be uploaded to the campaign. | +| Ignore Unsubscribe List | `ignore-unsubscribe-list` | boolean | Ignore the unsubscribe list and add the lead. If true, leads will BYPASS the comparison with unsubscribed leads and be uploaded to the campaign. | +
+
@@ -86,34 +119,25 @@ Create a new campaign. You have to create a campaign before you can start adding | Output | Field ID | Format | Description | | :--- | :--- | :--- | :--- | -| ID | `id` | string | ID of the campaign. | -| Created At | `created-at` | string | Created at timestamp of the campaign. | +| Upload Count | `upload-count` | number | Number of leads uploaded. | +| Total Leads | `total-leads` | number | Total number of leads in the campaign. | +| Already Added to Campaign | `already-added-to-campaign` | number | Number of leads already added to the campaign. | +| Invalid Email Count | `invalid-email-count` | number | Number of leads with invalid email. | +| Error (optional) | `error` | string | Error message from Smartlead if any. | -### Setup Campaign +### Add Sender Email -Setup a campaign. You can update campaign settings to this campaign. For Smartlead campaign, you will need to setup the schedule settings and general settings. +Add a sender email to the campaign. You have to configure the sender email in Smartlead console before adding it to the campaign.
| Input | Field ID | Format | Description | | :--- | :--- | :--- | :--- | -| Task ID (required) | `task` | string | `TASK_SETUP_CAMPAIGN` | +| Task ID (required) | `task` | string | `TASK_ADD_SENDER_EMAIL` | | Campaign Name (required) | `campaign-name` | string | Name of the campaign. | -| Timezone (required) | `timezone` | string | Timezone of the campaign. Please choose the value in [List of Timezones](https://help.smartlead.ai/Timezones-20fcff9ddbb5441790c7c8e5ce0e9233). | -| Days of the Week (required) | `days-of-the-week` | array[number] | Days of the week when the campaign will run. A number value ranging from 0 to 6; i.e [0,1,2,3,4,5,6]. 0 is Sunday, 1 is Monday, and so on. | -| Start Hour (required) | `start-hour` | string | Start hour of the campaign. Time to start the campaign in 24-hour format (HH:MM). | -| End Hour (required) | `end-hour` | string | End hour of the campaign. Time to end the campaign in 24-hour format (HH:MM). | -| Minimum Time Between Emails (required) | `min-time-btw-emails` | number | Minimum time between emails in minutes. The minimum value is 3 minutes. | -| Maximum New Leads per Day (required) | `max-new-leads-per-day` | number | Maximum new leads per day. | -| Schedule Start Time (required) | `schedule-start-time` | string | Schedule start time of the campaign. Please specify the campaign start time in standard ISO 8601 format. e.g. 2024-11-27T07:29:25.978Z. | -| Track Settings | `track-settings` | array[string] | Tracking settings like not tracking opens or link clicks.
Enum values
  • `DONT_TRACK_EMAIL_OPEN`
  • `DONT_TRACK_LINK_CLICK`
  • `DONT_TRACK_REPLY_TO_AN_EMAIL`
| -| Stop Lead Settings | `stop-lead-settings` | string | Stops lead if they do the action specified.
Enum values
  • `CLICK_ON_A_LINK`
  • `OPEN_AN_EMAIL`
| -| Send As Plain Text | `send-as-plain-text` | boolean | Send emails as plain text. | -| Follow up Percentage | `follow-up-percentage` | number | Specifies the percentage of leads in a campaign who should receive follow-up emails. | -| Add Unsubscribe Tag | `add-unsubscribe-tag` | boolean | Add an unsubscribe tag to the email. | -| Ignore Mailbox Sending Limit | `ignore-ss-mailbox-sending-limit` | boolean | Ignore mailbox sending limits, used when creating a subsequence. | +| Sender Email (required) | `sender-email` | string | Email address of the sender. You need to configure the sender email in [Smartlead console](https://app.smartlead.ai/app/email-accounts) before adding it to the campaign. |
@@ -125,41 +149,50 @@ Setup a campaign. You can update campaign settings to this campaign. For Smartle | Output | Field ID | Format | Description | | :--- | :--- | :--- | :--- | -| Result (optional) | `result` | string | Result of setting up a campaign. | +| Result | `result` | string | Result of adding a sender email. If you don't configure your sender email in Smartlead console, you will get an error. | -### Save Sequences +### Create Campaign -Save sequences to a campaign. A Smartlead sequence is a series of automated emails sent to potential customers based on specific actions, or triggers. +Create a new campaign. You have to create a campaign before you can start adding leads to it. Please check [Smartlead API document](https://api.smartlead.ai/reference/references#campaign).
| Input | Field ID | Format | Description | | :--- | :--- | :--- | :--- | -| Task ID (required) | `task` | string | `TASK_SAVE_SEQUENCES` | -| Campaign Name (required) | `campaign-name` | string | Name of the campaign. | -| [Sequences](#save-sequences-sequences) (required) | `sequences` | array[object] | A Smartlead sequence is a series of automated emails sent to potential customers based on specific actions, or triggers. | +| Task ID (required) | `task` | string | `TASK_CREATE_CAMPAIGN` | +| Name (required) | `name` | string | Name of the campaign. |
-
- Input Objects in Save Sequences -

Sequences

-A Smartlead sequence is a series of automated emails sent to potential customers based on specific actions, or triggers. +
-| Field | Field ID | Format | Note | +| Output | Field ID | Format | Description | | :--- | :--- | :--- | :--- | -| Email Body | `email-body` | string | Body of the email. If you want to set the variable according to different leads, you can use `{{variable_name}}`. It will be replaced by the actual value from the lead. | -| Sequence Number | `seq-number` | number | Sequence number means the order of the sequence. If you don't specify this, it will be automatically assigned by the order of the sequences. | -| Sequence Delay Days | `sequence-delay-days` | number | Number of days to wait before sending the next email. If you don't specify this, the default value is 1 day. | -| Subject | `subject` | string | Subject of the email. If you want to set the variable according to different leads, you can use `{{variable_name}}`. It will be replaced by the actual value from the lead. | +| ID | `id` | string | ID of the campaign. | +| Created At | `created-at` | string | Created at timestamp of the campaign. |
-
+ + +### Get Campaign Metric + +Get the metrics of a campaign. You can get the metrics like open count, click count, and reply count of the campaign. + +
+ +| Input | Field ID | Format | Description | +| :--- | :--- | :--- | :--- | +| Task ID (required) | `task` | string | `TASK_GET_CAMPAIGN_METRIC` | +| Campaign Name (required) | `campaign-name` | string | Name of the campaign. | +
+ + + @@ -167,7 +200,15 @@ A Smartlead sequence is a series of automated emails sent to potential customers | Output | Field ID | Format | Description | | :--- | :--- | :--- | :--- | -| Result | `result` | string | Result of saving sequences. | +| Sent Count (optional) | `sent-count` | number | Number of emails sent. | +| Unique Sent Count (optional) | `unique-sent-count` | number | Number of unique emails sent. | +| Open Count (optional) | `open-count` | number | Number of emails opened. | +| Unique Open Count (optional) | `unique-open-count` | number | Number of unique emails opened. | +| Click Count (optional) | `click-count` | number | Number of emails clicked. | +| Unique Click Count (optional) | `unique-click-count` | number | Number of unique emails clicked. | +| Reply Count (optional) | `reply-count` | number | Number of emails replied. | +| Total Count (optional) | `total-count` | number | Total number of emails. | +| Bounce Count (optional) | `bounce-count` | number | Number of emails bounced. | @@ -213,109 +254,77 @@ Get sequences of a campaign. If you want to add more sequences to the campaign, -### Add Leads +### List Leads Status -Add leads to a campaign. +List the status of leads in a campaign. You can get the status of leads like 'STARTED', 'INPROGRESS', 'COMPLETED', 'PAUSED', 'STOPPED'.
| Input | Field ID | Format | Description | | :--- | :--- | :--- | :--- | -| Task ID (required) | `task` | string | `TASK_ADD_LEADS` | +| Task ID (required) | `task` | string | `TASK_LIST_LEADS_STATUS` | | Campaign Name (required) | `campaign-name` | string | Name of the campaign. | -| [Leads](#add-leads-leads) (required) | `leads` | array[object] | Leads to add to the campaign. | -| [Settings](#add-leads-settings) | `settings` | object | Settings for adding leads. | +| Limit (required) | `limit` | number | Number of leads to list. The minimum value is 1. |
-
- Input Objects in Add Leads -

Leads

- -Leads to add to the campaign. -
- -| Field | Field ID | Format | Note | -| :--- | :--- | :--- | :--- | -| Company | `company` | string | Company name of the lead. | -| Custom Fields | `custom-fields` | array | Custom fields of the lead. You can use custom fields to store additional information about the lead, which can be used in the variable in the sequence email template. | -| Email | `email` | string | Email of the lead. | -| First Name | `first-name` | string | First name of the lead. | -| Last Name | `last-name` | string | Last name of the lead. | -| Location | `location` | string | Location of the lead. | -
-

Settings

-Settings for adding leads.
-| Field | Field ID | Format | Note | +| Output | Field ID | Format | Description | | :--- | :--- | :--- | :--- | -| Ignore Community Bounce List | `ignore-community-bounce-list` | boolean | Ignore the community bounce list and add the lead. If true, uploaded leads will BYPASS any leads that bounced across Smartlead entire user base and be uploaded to the campaign. | -| Ignore Duplicate Leads in Other Campaign | `ignore-duplicate-leads-in-other-campaign` | boolean | Ignore duplicate leads in other campaigns and add the lead. If true, leads will NOT BYPASS the comparison with other campaigns and NOT be added to the campaign if they are part of any other campaign. | -| Ignore Global Block List | `ignore-global-block-list` | boolean | Ignore the global block list and add the lead. If true, uploaded leads will BYPASS the global block list and be uploaded to the campaign. | -| Ignore Unsubscribe List | `ignore-unsubscribe-list` | boolean | Ignore the unsubscribe list and add the lead. If true, leads will BYPASS the comparison with unsubscribed leads and be uploaded to the campaign. | +| [Leads](#list-leads-status-leads) | `leads` | array[object] | Lead status in the campaign. |
-
+
+ Output Objects in List Leads Status +

Leads

-| Output | Field ID | Format | Description | +| Field | Field ID | Format | Note | | :--- | :--- | :--- | :--- | -| Upload Count | `upload-count` | number | Number of leads uploaded. | -| Total Leads | `total-leads` | number | Total number of leads in the campaign. | -| Already Added to Campaign | `already-added-to-campaign` | number | Number of leads already added to the campaign. | -| Invalid Email Count | `invalid-email-count` | number | Number of leads with invalid email. | -| Error (optional) | `error` | string | Error message from Smartlead if any. | +| Email | `email` | string | Email of the lead. | +| Status | `status` | string | Status of the lead. |
+
-### Add Sender Email +### Save Sequences -Add a sender email to the campaign. You have to configure the sender email in Smartlead console before adding it to the campaign. +Save sequences to a campaign. A Smartlead sequence is a series of automated emails sent to potential customers based on specific actions, or triggers.
| Input | Field ID | Format | Description | | :--- | :--- | :--- | :--- | -| Task ID (required) | `task` | string | `TASK_ADD_SENDER_EMAIL` | +| Task ID (required) | `task` | string | `TASK_SAVE_SEQUENCES` | | Campaign Name (required) | `campaign-name` | string | Name of the campaign. | -| Sender Email (required) | `sender-email` | string | Email address of the sender. You need to configure the sender email in [Smartlead console](https://app.smartlead.ai/app/email-accounts) before adding it to the campaign. | +| [Sequences](#save-sequences-sequences) (required) | `sequences` | array[object] | A Smartlead sequence is a series of automated emails sent to potential customers based on specific actions, or triggers. |
+
+ Input Objects in Save Sequences +

Sequences

- - -
- -| Output | Field ID | Format | Description | -| :--- | :--- | :--- | :--- | -| Result | `result` | string | Result of adding a sender email. If you don't configure your sender email in Smartlead console, you will get an error. | -
- - -### Update Campaign Status - -Update the status of a campaign. You need to start a campaign to send the emails to the leads. +A Smartlead sequence is a series of automated emails sent to potential customers based on specific actions, or triggers.
-| Input | Field ID | Format | Description | +| Field | Field ID | Format | Note | | :--- | :--- | :--- | :--- | -| Task ID (required) | `task` | string | `TASK_UPDATE_CAMPAIGN_STATUS` | -| Campaign Name (required) | `campaign-name` | string | Name of the campaign. | -| Status (required) | `status` | string | Status of the campaign.
Enum values
  • `START`
  • `PAUSED`
  • `STOPPED`
| +| Email Body | `email-body` | string | Body of the email. If you want to set the variable according to different leads, you can use `{{variable_name}}`. It will be replaced by the actual value from the lead. | +| Sequence Number | `seq-number` | number | Sequence number means the order of the sequence. If you don't specify this, it will be automatically assigned by the order of the sequences. | +| Sequence Delay Days | `sequence-delay-days` | number | Number of days to wait before sending the next email. If you don't specify this, the default value is 1 day. | +| Subject | `subject` | string | Subject of the email. If you want to set the variable according to different leads, you can use `{{variable_name}}`. It will be replaced by the actual value from the lead. |
- - - +
@@ -323,20 +332,33 @@ Update the status of a campaign. You need to start a campaign to send the emails | Output | Field ID | Format | Description | | :--- | :--- | :--- | :--- | -| Result | `result` | string | Result of updating the status of a campaign. | +| Result | `result` | string | Result of saving sequences. | -### Get Campaign Metric +### Setup Campaign -Get the metrics of a campaign. You can get the metrics like open count, click count, and reply count of the campaign. +Setup a campaign. You can update campaign settings to this campaign. For Smartlead campaign, you will need to setup the schedule settings and general settings.
| Input | Field ID | Format | Description | | :--- | :--- | :--- | :--- | -| Task ID (required) | `task` | string | `TASK_GET_CAMPAIGN_METRIC` | +| Task ID (required) | `task` | string | `TASK_SETUP_CAMPAIGN` | | Campaign Name (required) | `campaign-name` | string | Name of the campaign. | +| Timezone (required) | `timezone` | string | Timezone of the campaign. Please choose the value in [List of Timezones](https://help.smartlead.ai/Timezones-20fcff9ddbb5441790c7c8e5ce0e9233). | +| Days of the Week (required) | `days-of-the-week` | array[number] | Days of the week when the campaign will run. A number value ranging from 0 to 6; i.e [0,1,2,3,4,5,6]. 0 is Sunday, 1 is Monday, and so on. | +| Start Hour (required) | `start-hour` | string | Start hour of the campaign. Time to start the campaign in 24-hour format (HH:MM). | +| End Hour (required) | `end-hour` | string | End hour of the campaign. Time to end the campaign in 24-hour format (HH:MM). | +| Minimum Time Between Emails (required) | `min-time-btw-emails` | number | Minimum time between emails in minutes. The minimum value is 3 minutes. | +| Maximum New Leads per Day (required) | `max-new-leads-per-day` | number | Maximum new leads per day. | +| Schedule Start Time (required) | `schedule-start-time` | string | Schedule start time of the campaign. Please specify the campaign start time in standard ISO 8601 format. e.g. 2024-11-27T07:29:25.978Z. | +| Track Settings | `track-settings` | array[string] | Tracking settings like not tracking opens or link clicks.
Enum values
  • `DONT_TRACK_EMAIL_OPEN`
  • `DONT_TRACK_LINK_CLICK`
  • `DONT_TRACK_REPLY_TO_AN_EMAIL`
| +| Stop Lead Settings | `stop-lead-settings` | string | Stops lead if they do the action specified.
Enum values
  • `CLICK_ON_A_LINK`
  • `OPEN_AN_EMAIL`
| +| Send As Plain Text | `send-as-plain-text` | boolean | Send emails as plain text. | +| Follow up Percentage | `follow-up-percentage` | number | Specifies the percentage of leads in a campaign who should receive follow-up emails. | +| Add Unsubscribe Tag | `add-unsubscribe-tag` | boolean | Add an unsubscribe tag to the email. | +| Ignore Mailbox Sending Limit | `ignore-ss-mailbox-sending-limit` | boolean | Ignore mailbox sending limits, used when creating a subsequence. |
@@ -348,29 +370,21 @@ Get the metrics of a campaign. You can get the metrics like open count, click co | Output | Field ID | Format | Description | | :--- | :--- | :--- | :--- | -| Sent Count (optional) | `sent-count` | number | Number of emails sent. | -| Unique Sent Count (optional) | `unique-sent-count` | number | Number of unique emails sent. | -| Open Count (optional) | `open-count` | number | Number of emails opened. | -| Unique Open Count (optional) | `unique-open-count` | number | Number of unique emails opened. | -| Click Count (optional) | `click-count` | number | Number of emails clicked. | -| Unique Click Count (optional) | `unique-click-count` | number | Number of unique emails clicked. | -| Reply Count (optional) | `reply-count` | number | Number of emails replied. | -| Total Count (optional) | `total-count` | number | Total number of emails. | -| Bounce Count (optional) | `bounce-count` | number | Number of emails bounced. | +| Result (optional) | `result` | string | Result of setting up a campaign. | -### List Leads Status +### Update Campaign Status -List the status of leads in a campaign. You can get the status of leads like 'STARTED', 'INPROGRESS', 'COMPLETED', 'PAUSED', 'STOPPED'. +Update the status of a campaign. You need to start a campaign to send the emails to the leads.
| Input | Field ID | Format | Description | | :--- | :--- | :--- | :--- | -| Task ID (required) | `task` | string | `TASK_LIST_LEADS_STATUS` | +| Task ID (required) | `task` | string | `TASK_UPDATE_CAMPAIGN_STATUS` | | Campaign Name (required) | `campaign-name` | string | Name of the campaign. | -| Limit (required) | `limit` | number | Number of leads to list. The minimum value is 1. | +| Status (required) | `status` | string | Status of the campaign.
Enum values
  • `START`
  • `PAUSED`
  • `STOPPED`
|
@@ -382,22 +396,8 @@ List the status of leads in a campaign. You can get the status of leads like 'ST | Output | Field ID | Format | Description | | :--- | :--- | :--- | :--- | -| [Leads](#list-leads-status-leads) | `leads` | array[object] | Lead status in the campaign. | - - -
- Output Objects in List Leads Status - -

Leads

- -
- -| Field | Field ID | Format | Note | -| :--- | :--- | :--- | :--- | -| Email | `email` | string | Email of the lead. | -| Status | `status` | string | Status of the lead. | +| Result | `result` | string | Result of updating the status of a campaign. |
-
diff --git a/pkg/component/application/smartlead/v0/config/definition.yaml b/pkg/component/application/smartlead/v0/config/definition.yaml index 9f5fb4aa0..5bec6b5d2 100644 --- a/pkg/component/application/smartlead/v0/config/definition.yaml +++ b/pkg/component/application/smartlead/v0/config/definition.yaml @@ -1,13 +1,3 @@ -availableTasks: -- TASK_CREATE_CAMPAIGN -- TASK_SETUP_CAMPAIGN -- TASK_SAVE_SEQUENCES -- TASK_GET_SEQUENCES -- TASK_ADD_LEADS -- TASK_ADD_SENDER_EMAIL -- TASK_UPDATE_CAMPAIGN_STATUS -- TASK_GET_CAMPAIGN_METRIC -- TASK_LIST_LEADS_STATUS documentationUrl: https://www.instill.tech/docs/component/application/smartlead icon: assets/smartlead.svg id: smartlead diff --git a/pkg/component/application/whatsapp/v0/README.mdx b/pkg/component/application/whatsapp/v0/README.mdx index 1cd4df68a..1523d7189 100644 --- a/pkg/component/application/whatsapp/v0/README.mdx +++ b/pkg/component/application/whatsapp/v0/README.mdx @@ -7,15 +7,15 @@ description: "Learn about how to set up a VDP WhatsApp component https://github. The WhatsApp component is an application component that allows users to use WhatsApp Business Platform API to send template and messages. It can carry out the following tasks: -- [Send Text Based Template Message](#send-text-based-template-message) -- [Send Media Based Template Message](#send-media-based-template-message) -- [Send Location Based Template Message](#send-location-based-template-message) - [Send Authentication Template Message](#send-authentication-template-message) -- [Send Text Message](#send-text-message) -- [Send Media Message](#send-media-message) -- [Send Location Message](#send-location-message) - [Send Contact Message](#send-contact-message) - [Send Interactive Call to Action URL Button Message](#send-interactive-call-to-action-url-button-message) +- [Send Location Based Template Message](#send-location-based-template-message) +- [Send Location Message](#send-location-message) +- [Send Media Based Template Message](#send-media-based-template-message) +- [Send Media Message](#send-media-message) +- [Send Text Based Template Message](#send-text-based-template-message) +- [Send Text Message](#send-text-message) @@ -56,22 +56,20 @@ ${connection.}`. ## Supported Tasks -### Send Text Based Template Message +### Send Authentication Template Message -Send text-based template message. This task support header(text), body and button parameters. +Send authentication template message with one-time password button (The button is used to copy the password to clipboard). Authentication template has no header parameters.
| Input | Field ID | Format | Description | | :--- | :--- | :--- | :--- | -| Task ID (required) | `task` | string | `TASK_SEND_TEXT_BASED_TEMPLATE_MESSAGE` | +| Task ID (required) | `task` | string | `TASK_SEND_AUTHENTICATION_TEMPLATE_MESSAGE` | | Phone Number ID (required) | `phone-number-id` | string | Phone Number ID. Obtainable through the app dashboard. Note: This is for sender. | | Recipient Phone Number (required) | `to` | string | The number of the recipient you are sending the message to. | | Template Name (required) | `name` | string | Name of the template. | | Language Code (required) | `language-code` | string | 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). | -| Header Parameters | `header-parameters` | array[string] | Specify the parameters for the header section of the template. Leave this blank if there is no parameter. | -| Body Parameters | `body-parameters` | array[string] | Specify the parameters for the body section of the template. Leave this blank if there is no parameter. | -| Button Parameters | `button-parameters` | array[string] | Specify the parameters for button(s). Leave this blank if there is no parameter. Follow this format or it won't work: button_index;button_type;value_of_the_parameter. The seperator is a semicolon. button_index starts at 0. Example: 0;quick_reply;randomvalue. Note: This button parameter only support three types 'quick_reply', 'url' and 'copy_code'. | +| One-Time Password (required) | `one-time-password` | string | One-time password to be sent to the recipient. Maximum 15 characters. |
@@ -89,24 +87,25 @@ Send text-based template message. This task support header(text), body and butto -### Send Media Based Template Message +### Send Contact Message -Send media-based template message. This task support header(image, document & video), body and button parameters. +Send contact message. Note: Message can only be sent when the 24-hour customer service window is open. For more information, please visit [here](https://developers.facebook.com/docs/whatsapp/cloud-api/guides/send-messages#customer-service-windows)
| Input | Field ID | Format | Description | | :--- | :--- | :--- | :--- | -| Task ID (required) | `task` | string | `TASK_SEND_MEDIA_BASED_TEMPLATE_MESSAGE` | +| Task ID (required) | `task` | string | `TASK_SEND_CONTACT_MESSAGE` | | Phone Number ID (required) | `phone-number-id` | string | Phone Number ID. Obtainable through the app dashboard. Note: This is for sender. | | Recipient Phone Number (required) | `to` | string | The number of the recipient you are sending the message to. | -| Template Name (required) | `name` | string | Name of the template. | -| Language Code (required) | `language-code` | string | 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). | -| Header Type (required) | `media-type` | string | Specify the header(media) type for the header section of the template.
Enum values
  • `image`
  • `video`
  • `document`
| -| ID or Link (Header Parameter) (required) | `id-or-link` | string | Input either ID or link of the media. If the input has 'http', it will be considered as a link. | -| Filename (Header Parameter) | `filename` | string | 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. | -| Body Parameters | `body-parameters` | array[string] | Specify the parameters for the body section of the template. Leave this blank if there is no parameter. | -| Button Parameters | `button-parameters` | array[string] | Specify the parameters for button(s). Leave this blank if there is no parameter. Follow this format or it won't work: button_index;button_type;value_of_the_parameter. The seperator is a semicolon. button_index starts at 0. Example: 0;quick_reply;randomvalue. Note: This button parameter only support three types 'quick_reply', 'url' and 'copy_code'. | +| First Name (required) | `first-name` | string | First name of the contact. | +| Middle Name | `middle-name` | string | Middle name of the contact. | +| Last Name | `last-name` | string | Last name of the contact. | +| Phone Number | `phone-number` | string | Phone number of the contact. | +| Phone Number Type | `phone-number-type` | string | Phone number type of the contact. If there is no phone number, pick none.
Enum values
  • `none`
  • `CELL`
  • `MAIN`
  • `PHONE`
  • `HOME`
  • `WORK`
| +| Email | `email` | string | Email of the contact. | +| Email Type | `email-type` | string | Email type of the contact. If there is no email, pick none.
Enum values
  • `none`
  • `HOME`
  • `WORK`
| +| Birthday | `birthday` | string | Birthday of the contact. Format is in 'YYYY-MM-DD'. |
@@ -120,29 +119,25 @@ Send media-based template message. This task support header(image, document & vi | :--- | :--- | :--- | :--- | | Recipient WhatsApp ID | `recipient-wa-id` | string | The WhatsApp ID of the recipient. Most likely the same with their phone number. | | Message ID | `message-id` | string | The ID of the message. | -| Message Status | `message-status` | string | The status of the message. | -### Send Location Based Template Message +### Send Interactive Call to Action URL Button Message -Send location-based template message. This task support header(location), body and button parameters. +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, please visit [here](https://developers.facebook.com/docs/whatsapp/cloud-api/guides/send-messages#customer-service-windows).
| Input | Field ID | Format | Description | | :--- | :--- | :--- | :--- | -| Task ID (required) | `task` | string | `TASK_SEND_LOCATION_BASED_TEMPLATE_MESSAGE` | +| Task ID (required) | `task` | string | `TASK_SEND_INTERACTIVE_CALL_TO_ACTION_URL_BUTTON_MESSAGE` | | Phone Number ID (required) | `phone-number-id` | string | Phone Number ID. Obtainable through the app dashboard. Note: This is for sender. | | Recipient Phone Number (required) | `to` | string | The number of the recipient you are sending the message to. | -| Template Name (required) | `name` | string | Name of the template. | -| Language Code (required) | `language-code` | string | 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). | -| Latitude (Header Parameter) (required) | `latitude` | number | Location latitude. | -| Longitude (Header Parameter) (required) | `longitude` | number | Location longitude. | -| Location Name (Header Parameter) (required) | `location-name` | string | Name of the location. | -| Location Address (Header Parameter) (required) | `address` | string | Address of the location. | -| Body Parameters | `body-parameters` | array[string] | Specify the parameters for the body section of the template. Leave this blank if there is no parameter. | -| Button Parameters | `button-parameters` | array[string] | Specify the parameters for button(s). Leave this blank if there is no parameter. Follow this format or it won't work: button_index;button_type;value_of_the_parameter. The seperator is a semicolon. button_index starts at 0. Example: 0;quick_reply;randomvalue. Note: This button parameter only support three types 'quick_reply', 'url' and 'copy_code'. | +| Header Text | `header-text` | string | Message header text. | +| Body Text (required) | `body-text` | string | Message body text. | +| Footer Text | `footer-text` | string | Message footer text. | +| Button Display Text (required) | `button-display-text` | string | The text displayed on the button. | +| Button URL (required) | `button-url` | string | URL to load when the user tapped the button. |
@@ -156,24 +151,28 @@ Send location-based template message. This task support header(location), body a | :--- | :--- | :--- | :--- | | Recipient WhatsApp ID | `recipient-wa-id` | string | The WhatsApp ID of the recipient. Most likely the same with their phone number. | | Message ID | `message-id` | string | The ID of the message. | -| Message Status | `message-status` | string | The status of the message. | -### Send Authentication Template Message +### Send Location Based Template Message -Send authentication template message with one-time password button (The button is used to copy the password to clipboard). Authentication template has no header parameters. +Send location-based template message. This task support header(location), body and button parameters.
| Input | Field ID | Format | Description | | :--- | :--- | :--- | :--- | -| Task ID (required) | `task` | string | `TASK_SEND_AUTHENTICATION_TEMPLATE_MESSAGE` | +| Task ID (required) | `task` | string | `TASK_SEND_LOCATION_BASED_TEMPLATE_MESSAGE` | | Phone Number ID (required) | `phone-number-id` | string | Phone Number ID. Obtainable through the app dashboard. Note: This is for sender. | | Recipient Phone Number (required) | `to` | string | The number of the recipient you are sending the message to. | | Template Name (required) | `name` | string | Name of the template. | | Language Code (required) | `language-code` | string | 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). | -| One-Time Password (required) | `one-time-password` | string | One-time password to be sent to the recipient. Maximum 15 characters. | +| Latitude (Header Parameter) (required) | `latitude` | number | Location latitude. | +| Longitude (Header Parameter) (required) | `longitude` | number | Location longitude. | +| Location Name (Header Parameter) (required) | `location-name` | string | Name of the location. | +| Location Address (Header Parameter) (required) | `address` | string | Address of the location. | +| Body Parameters | `body-parameters` | array[string] | Specify the parameters for the body section of the template. Leave this blank if there is no parameter. | +| Button Parameters | `button-parameters` | array[string] | Specify the parameters for button(s). Leave this blank if there is no parameter. Follow this format or it won't work: button_index;button_type;value_of_the_parameter. The seperator is a semicolon. button_index starts at 0. Example: 0;quick_reply;randomvalue. Note: This button parameter only support three types 'quick_reply', 'url' and 'copy_code'. |
@@ -191,19 +190,21 @@ Send authentication template message with one-time password button (The button i -### Send Text Message +### Send Location Message -Send text message. Note: Message can only be sent when the 24-hour customer service window is open. For more information, please visit [here](https://developers.facebook.com/docs/whatsapp/cloud-api/guides/send-messages#customer-service-windows) +Send location message. Note: Message can only be sent when the 24-hour customer service window is open. For more information, please visit [here](https://developers.facebook.com/docs/whatsapp/cloud-api/guides/send-messages#customer-service-windows)
| Input | Field ID | Format | Description | | :--- | :--- | :--- | :--- | -| Task ID (required) | `task` | string | `TASK_SEND_TEXT_MESSAGE` | +| Task ID (required) | `task` | string | `TASK_SEND_LOCATION_MESSAGE` | | Phone Number ID (required) | `phone-number-id` | string | Phone Number ID. Obtainable through the app dashboard. Note: This is for sender. | | Recipient Phone Number (required) | `to` | string | The number of the recipient you are sending the message to. | -| Text (required) | `body` | string | Body of the message. | -| Preview URL (required) | `preview-url` | string | Specify whether URL should be previewed or not. This will have no affect if the message does not contain any URL.
Enum values
  • `false`
  • `true`
| +| Latitude (required) | `latitude` | number | Location latitude. | +| Longitude (required) | `longitude` | number | Location longitude. | +| Location Name (required) | `location-name` | string | Name of the location. | +| Location Address (required) | `address` | string | Address of the location. |
@@ -220,21 +221,24 @@ Send text message. Note: Message can only be sent when the 24-hour customer serv -### Send Media Message +### Send Media Based Template Message -Send media message. Media supported: video, audio, document, image. Note: Message can only be sent when the 24-hour customer service window is open. For more information, please visit [here](https://developers.facebook.com/docs/whatsapp/cloud-api/guides/send-messages#customer-service-windows) +Send media-based template message. This task support header(image, document & video), body and button parameters.
| Input | Field ID | Format | Description | | :--- | :--- | :--- | :--- | -| Task ID (required) | `task` | string | `TASK_SEND_MEDIA_MESSAGE` | +| Task ID (required) | `task` | string | `TASK_SEND_MEDIA_BASED_TEMPLATE_MESSAGE` | | Phone Number ID (required) | `phone-number-id` | string | Phone Number ID. Obtainable through the app dashboard. Note: This is for sender. | | Recipient Phone Number (required) | `to` | string | The number of the recipient you are sending the message to. | -| Media Type (required) | `media-type` | string | Specify what media to send.
Enum values
  • `image`
  • `audio`
  • `document`
  • `video`
| -| ID or Link (required) | `id-or-link` | string | Input either ID or link of the media. If the input has 'http', it will be considered as a link. | -| Caption | `caption` | string | 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. | -| Filename | `filename` | string | 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. | +| Template Name (required) | `name` | string | Name of the template. | +| Language Code (required) | `language-code` | string | 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). | +| Header Type (required) | `media-type` | string | Specify the header(media) type for the header section of the template.
Enum values
  • `image`
  • `video`
  • `document`
| +| ID or Link (Header Parameter) (required) | `id-or-link` | string | Input either ID or link of the media. If the input has 'http', it will be considered as a link. | +| Filename (Header Parameter) | `filename` | string | 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. | +| Body Parameters | `body-parameters` | array[string] | Specify the parameters for the body section of the template. Leave this blank if there is no parameter. | +| Button Parameters | `button-parameters` | array[string] | Specify the parameters for button(s). Leave this blank if there is no parameter. Follow this format or it won't work: button_index;button_type;value_of_the_parameter. The seperator is a semicolon. button_index starts at 0. Example: 0;quick_reply;randomvalue. Note: This button parameter only support three types 'quick_reply', 'url' and 'copy_code'. |
@@ -248,24 +252,25 @@ Send media message. Media supported: video, audio, document, image. Note: Messag | :--- | :--- | :--- | :--- | | Recipient WhatsApp ID | `recipient-wa-id` | string | The WhatsApp ID of the recipient. Most likely the same with their phone number. | | Message ID | `message-id` | string | The ID of the message. | +| Message Status | `message-status` | string | The status of the message. | -### Send Location Message +### Send Media Message -Send location message. Note: Message can only be sent when the 24-hour customer service window is open. For more information, please visit [here](https://developers.facebook.com/docs/whatsapp/cloud-api/guides/send-messages#customer-service-windows) +Send media message. Media supported: video, audio, document, image. Note: Message can only be sent when the 24-hour customer service window is open. For more information, please visit [here](https://developers.facebook.com/docs/whatsapp/cloud-api/guides/send-messages#customer-service-windows)
| Input | Field ID | Format | Description | | :--- | :--- | :--- | :--- | -| Task ID (required) | `task` | string | `TASK_SEND_LOCATION_MESSAGE` | +| Task ID (required) | `task` | string | `TASK_SEND_MEDIA_MESSAGE` | | Phone Number ID (required) | `phone-number-id` | string | Phone Number ID. Obtainable through the app dashboard. Note: This is for sender. | | Recipient Phone Number (required) | `to` | string | The number of the recipient you are sending the message to. | -| Latitude (required) | `latitude` | number | Location latitude. | -| Longitude (required) | `longitude` | number | Location longitude. | -| Location Name (required) | `location-name` | string | Name of the location. | -| Location Address (required) | `address` | string | Address of the location. | +| Media Type (required) | `media-type` | string | Specify what media to send.
Enum values
  • `image`
  • `audio`
  • `document`
  • `video`
| +| ID or Link (required) | `id-or-link` | string | Input either ID or link of the media. If the input has 'http', it will be considered as a link. | +| Caption | `caption` | string | 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. | +| Filename | `filename` | string | 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. |
@@ -282,25 +287,22 @@ Send location message. Note: Message can only be sent when the 24-hour customer -### Send Contact Message +### Send Text Based Template Message -Send contact message. Note: Message can only be sent when the 24-hour customer service window is open. For more information, please visit [here](https://developers.facebook.com/docs/whatsapp/cloud-api/guides/send-messages#customer-service-windows) +Send text-based template message. This task support header(text), body and button parameters.
| Input | Field ID | Format | Description | | :--- | :--- | :--- | :--- | -| Task ID (required) | `task` | string | `TASK_SEND_CONTACT_MESSAGE` | +| Task ID (required) | `task` | string | `TASK_SEND_TEXT_BASED_TEMPLATE_MESSAGE` | | Phone Number ID (required) | `phone-number-id` | string | Phone Number ID. Obtainable through the app dashboard. Note: This is for sender. | | Recipient Phone Number (required) | `to` | string | The number of the recipient you are sending the message to. | -| First Name (required) | `first-name` | string | First name of the contact. | -| Middle Name | `middle-name` | string | Middle name of the contact. | -| Last Name | `last-name` | string | Last name of the contact. | -| Phone Number | `phone-number` | string | Phone number of the contact. | -| Phone Number Type | `phone-number-type` | string | Phone number type of the contact. If there is no phone number, pick none.
Enum values
  • `none`
  • `CELL`
  • `MAIN`
  • `PHONE`
  • `HOME`
  • `WORK`
| -| Email | `email` | string | Email of the contact. | -| Email Type | `email-type` | string | Email type of the contact. If there is no email, pick none.
Enum values
  • `none`
  • `HOME`
  • `WORK`
| -| Birthday | `birthday` | string | Birthday of the contact. Format is in 'YYYY-MM-DD'. | +| Template Name (required) | `name` | string | Name of the template. | +| Language Code (required) | `language-code` | string | 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). | +| Header Parameters | `header-parameters` | array[string] | Specify the parameters for the header section of the template. Leave this blank if there is no parameter. | +| Body Parameters | `body-parameters` | array[string] | Specify the parameters for the body section of the template. Leave this blank if there is no parameter. | +| Button Parameters | `button-parameters` | array[string] | Specify the parameters for button(s). Leave this blank if there is no parameter. Follow this format or it won't work: button_index;button_type;value_of_the_parameter. The seperator is a semicolon. button_index starts at 0. Example: 0;quick_reply;randomvalue. Note: This button parameter only support three types 'quick_reply', 'url' and 'copy_code'. |
@@ -314,25 +316,23 @@ Send contact message. Note: Message can only be sent when the 24-hour customer s | :--- | :--- | :--- | :--- | | Recipient WhatsApp ID | `recipient-wa-id` | string | The WhatsApp ID of the recipient. Most likely the same with their phone number. | | Message ID | `message-id` | string | The ID of the message. | +| Message Status | `message-status` | string | The status of the message. | -### Send Interactive Call to Action URL Button Message +### Send Text Message -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, please visit [here](https://developers.facebook.com/docs/whatsapp/cloud-api/guides/send-messages#customer-service-windows). +Send text message. Note: Message can only be sent when the 24-hour customer service window is open. For more information, please visit [here](https://developers.facebook.com/docs/whatsapp/cloud-api/guides/send-messages#customer-service-windows)
| Input | Field ID | Format | Description | | :--- | :--- | :--- | :--- | -| Task ID (required) | `task` | string | `TASK_SEND_INTERACTIVE_CALL_TO_ACTION_URL_BUTTON_MESSAGE` | +| Task ID (required) | `task` | string | `TASK_SEND_TEXT_MESSAGE` | | Phone Number ID (required) | `phone-number-id` | string | Phone Number ID. Obtainable through the app dashboard. Note: This is for sender. | | Recipient Phone Number (required) | `to` | string | The number of the recipient you are sending the message to. | -| Header Text | `header-text` | string | Message header text. | -| Body Text (required) | `body-text` | string | Message body text. | -| Footer Text | `footer-text` | string | Message footer text. | -| Button Display Text (required) | `button-display-text` | string | The text displayed on the button. | -| Button URL (required) | `button-url` | string | URL to load when the user tapped the button. | +| Text (required) | `body` | string | Body of the message. | +| Preview URL (required) | `preview-url` | string | Specify whether URL should be previewed or not. This will have no affect if the message does not contain any URL.
Enum values
  • `false`
  • `true`
|
diff --git a/pkg/component/application/whatsapp/v0/config/definition.yaml b/pkg/component/application/whatsapp/v0/config/definition.yaml index 916669351..87e293a71 100644 --- a/pkg/component/application/whatsapp/v0/config/definition.yaml +++ b/pkg/component/application/whatsapp/v0/config/definition.yaml @@ -1,13 +1,3 @@ -availableTasks: -- TASK_SEND_TEXT_BASED_TEMPLATE_MESSAGE -- TASK_SEND_MEDIA_BASED_TEMPLATE_MESSAGE -- TASK_SEND_LOCATION_BASED_TEMPLATE_MESSAGE -- TASK_SEND_AUTHENTICATION_TEMPLATE_MESSAGE -- TASK_SEND_TEXT_MESSAGE -- TASK_SEND_MEDIA_MESSAGE -- TASK_SEND_LOCATION_MESSAGE -- TASK_SEND_CONTACT_MESSAGE -- TASK_SEND_INTERACTIVE_CALL_TO_ACTION_URL_BUTTON_MESSAGE documentationUrl: https://www.instill.tech/docs/component/application/whatsapp icon: assets/whatsapp.svg id: whatsapp diff --git a/pkg/component/base/component.go b/pkg/component/base/component.go index c7497cc39..990d43309 100644 --- a/pkg/component/base/component.go +++ b/pkg/component/base/component.go @@ -387,51 +387,56 @@ func EventIDToTitle(id string) string { return cases.Title(language.English).String(title) } -func generateComponentTaskCards(tasks []string, taskStructs map[string]*structpb.Struct) []*pb.ComponentTask { - taskCards := make([]*pb.ComponentTask, 0, len(tasks)) - for _, k := range tasks { - if v, ok := taskStructs[k]; ok { - title := v.Fields["title"].GetStringValue() - if title == "" { - title = TaskIDToTitle(k) - } +func generateComponentTaskCards(taskStructs map[string]*structpb.Struct) []*pb.ComponentTask { + taskCards := make([]*pb.ComponentTask, 0, len(taskStructs)) + for k, v := range taskStructs { - description := taskStructs[k].Fields["shortDescription"].GetStringValue() - if description == "" { - description = v.Fields["description"].GetStringValue() - } + if !strings.HasPrefix(k, "TASK_") { + continue + } + + title := v.Fields["title"].GetStringValue() + if title == "" { + title = TaskIDToTitle(k) + } - taskCards = append(taskCards, &pb.ComponentTask{ - Name: k, - Title: title, - Description: description, - }) + description := taskStructs[k].Fields["shortDescription"].GetStringValue() + if description == "" { + description = v.Fields["description"].GetStringValue() } + + taskCards = append(taskCards, &pb.ComponentTask{ + Name: k, + Title: title, + Description: description, + }) } return taskCards } -func generateComponentEventCards(events []string, eventStructs map[string]*structpb.Struct) []*pb.ComponentEvent { - eventCards := make([]*pb.ComponentEvent, 0, len(events)) - for _, k := range events { - if v, ok := eventStructs[k]; ok { - title := v.Fields["title"].GetStringValue() - if title == "" { - title = TaskIDToTitle(k) - } - - description := eventStructs[k].Fields["shortDescription"].GetStringValue() - if description == "" { - description = v.Fields["description"].GetStringValue() - } +func generateComponentEventCards(eventStructs map[string]*structpb.Struct) []*pb.ComponentEvent { + eventCards := make([]*pb.ComponentEvent, 0, len(eventStructs)) + for k, v := range eventStructs { + if !strings.HasPrefix(k, "EVENT_") { + continue + } + title := v.Fields["title"].GetStringValue() + if title == "" { + title = EventIDToTitle(k) + } - eventCards = append(eventCards, &pb.ComponentEvent{ - Name: k, - Title: title, - Description: description, - }) + description := eventStructs[k].Fields["shortDescription"].GetStringValue() + if description == "" { + description = v.Fields["description"].GetStringValue() } + + eventCards = append(eventCards, &pb.ComponentEvent{ + Name: k, + Title: title, + Description: description, + }) + } return eventCards } @@ -577,7 +582,7 @@ func generateDataSpecs(tasks map[string]*structpb.Struct) (map[string]*pb.DataSp return specs, nil } -func loadTasks(availableTasks []string, tasksJSONBytes []byte) ([]*pb.ComponentTask, map[string]*structpb.Struct, error) { +func loadTasks(tasksJSONBytes []byte) ([]*pb.ComponentTask, map[string]*structpb.Struct, error) { taskStructs := map[string]*structpb.Struct{} var err error @@ -588,20 +593,20 @@ func loadTasks(availableTasks []string, tasksJSONBytes []byte) ([]*pb.ComponentT return nil, nil, err } - for _, t := range availableTasks { - if v, ok := tasksJSONMap[t]; ok { - taskStructs[t], err = structpb.NewStruct(v) - if err != nil { - return nil, nil, err - } - + for t, v := range tasksJSONMap { + if !strings.HasPrefix(t, "TASK_") { + continue + } + taskStructs[t], err = structpb.NewStruct(v) + if err != nil { + return nil, nil, err } } - tasks := generateComponentTaskCards(availableTasks, taskStructs) + tasks := generateComponentTaskCards(taskStructs) return tasks, taskStructs, nil } -func loadEvents(availableEvents []string, eventsJSONBytes []byte) ([]*pb.ComponentEvent, error) { +func loadEvents(eventsJSONBytes []byte) ([]*pb.ComponentEvent, error) { eventStructs := map[string]*structpb.Struct{} var err error @@ -611,16 +616,16 @@ func loadEvents(availableEvents []string, eventsJSONBytes []byte) ([]*pb.Compone return nil, err } - for _, t := range availableEvents { - if v, ok := eventsJSONMap[t]; ok { - eventStructs[t], err = structpb.NewStruct(v) - if err != nil { - return nil, err - } - + for t, v := range eventsJSONMap { + if !strings.HasPrefix(t, "EVENT_") { + continue + } + eventStructs[t], err = structpb.NewStruct(v) + if err != nil { + return nil, err } } - events := generateComponentEventCards(availableEvents, eventStructs) + events := generateComponentEventCards(eventStructs) return events, nil } @@ -801,12 +806,7 @@ func (c *Component) LoadDefinition(definitionYAMLBytes, setupYAMLBytes, tasksYAM return err } - availableTasks := []string{} - for _, availableTask := range definitionJSON.(map[string]any)["availableTasks"].([]any) { - availableTasks = append(availableTasks, availableTask.(string)) - } - - tasks, taskStructs, err := loadTasks(availableTasks, renderedTasksJSON) + tasks, taskStructs, err := loadTasks(renderedTasksJSON) if err != nil { return err } @@ -851,11 +851,7 @@ func (c *Component) LoadDefinition(definitionYAMLBytes, setupYAMLBytes, tasksYAM } if eventsJSONBytes != nil { - availableEvents := []string{} - for _, availableEvent := range definitionJSON.(map[string]any)["availableEvents"].([]any) { - availableEvents = append(availableEvents, availableEvent.(string)) - } - events, err := loadEvents(availableEvents, eventsJSONBytes) + events, err := loadEvents(eventsJSONBytes) if err != nil { return err } diff --git a/pkg/component/base/testdata/componentDef.yaml b/pkg/component/base/testdata/componentDef.yaml index 52353dba0..6f7a0ef94 100644 --- a/pkg/component/base/testdata/componentDef.yaml +++ b/pkg/component/base/testdata/componentDef.yaml @@ -1,7 +1,5 @@ version: 1.0.0 sourceUrl: https://github.com/instill-ai/pipeline-backend/blob/main/pkg/component/base -availableTasks: -- TASK_TEXT_EMBEDDINGS custom: false documentationUrl: https://www.instill.tech/docs/component/ai/openai icon: OpenAI/openai.svg diff --git a/pkg/component/base/testdata/operatorDef.yaml b/pkg/component/base/testdata/operatorDef.yaml index eb61b054d..7c260e63d 100644 --- a/pkg/component/base/testdata/operatorDef.yaml +++ b/pkg/component/base/testdata/operatorDef.yaml @@ -1,7 +1,5 @@ version: 1.0.0 sourceUrl: https://github.com/instill-ai/pipeline-backend/blob/main/pkg/component/base -availableTasks: -- TASK_MARSHAL custom: false documentationUrl: https://www.instill.tech/docs/component/operator/json icon: Instill AI/json.svg diff --git a/pkg/component/data/bigquery/v0/config/definition.yaml b/pkg/component/data/bigquery/v0/config/definition.yaml index 74bd46a78..b17914a36 100644 --- a/pkg/component/data/bigquery/v0/config/definition.yaml +++ b/pkg/component/data/bigquery/v0/config/definition.yaml @@ -1,6 +1,3 @@ -availableTasks: -- TASK_INSERT -- TASK_READ custom: false documentationUrl: https://www.instill.tech/docs/component/data/bigquery icon: assets/bigquery.svg diff --git a/pkg/component/data/chroma/v0/README.mdx b/pkg/component/data/chroma/v0/README.mdx index 728f22414..377fb1156 100644 --- a/pkg/component/data/chroma/v0/README.mdx +++ b/pkg/component/data/chroma/v0/README.mdx @@ -8,11 +8,11 @@ description: "Learn about how to set up a VDP Chroma component https://github.co The Chroma component is a data component that allows users to build and search vector datasets. It can carry out the following tasks: - [Batch Upsert](#batch-upsert) -- [Upsert](#upsert) -- [Query](#query) -- [Delete](#delete) - [Create Collection](#create-collection) +- [Delete](#delete) - [Delete Collection](#delete-collection) +- [Query](#query) +- [Upsert](#upsert) @@ -84,21 +84,19 @@ Upsert multiple vector items into a collection, existing items will be updated -### Upsert +### Create Collection -Upsert a vector item into a collection, existing item will be updated +Create a collection
| Input | Field ID | Format | Description | | :--- | :--- | :--- | :--- | -| Task ID (required) | `task` | string | `TASK_UPSERT` | -| Collection Name (required) | `collection-name` | string | The name of the collection to upsert the item into. | -| ID (required) | `id` | string | The ID of the item. | -| Metadata (required) | `metadata` | object | The vector metadata. | -| Vector (required) | `vector` | array[number] | An array of dimensions for the vector value. | -| Document | `document` | string | The document string value. | -| URI | `uri` | string | The uri of the item. | +| Task ID (required) | `task` | string | `TASK_CREATE_COLLECTION` | +| Collection Name (required) | `collection-name` | string | The name of the collection to create. | +| Config | `metadata` | object | The metadata of the collection. Please refer to [creating-inspecting-and-deleting-collection](https://docs.trychroma.com/guides#creating,-inspecting,-and-deleting-collections). | +| Configuration | `configuration` | object | The configuration of the collection. Please refer to [creating-inspecting-and-deleting-collection](https://docs.trychroma.com/guides#creating,-inspecting,-and-deleting-collections). | +| Get or Create | `get-or-create` | boolean | If true, the collection will be created if it does not exist. |
@@ -110,25 +108,23 @@ Upsert a vector item into a collection, existing item will be updated | Output | Field ID | Format | Description | | :--- | :--- | :--- | :--- | -| Status | `status` | string | Add status. | +| Status | `status` | string | Create collection status. | -### Query +### Delete -Perform a vector search on a collection +Delete vector items from a collection
| Input | Field ID | Format | Description | | :--- | :--- | :--- | :--- | -| Task ID (required) | `task` | string | `TASK_QUERY` | -| Collection Name (required) | `collection-name` | string | The name of the collection to perform vector similarity search on. | -| Vector (required) | `vector` | array[number] | An array of dimensions for the vector query. | -| N Results (required) | `n-results` | integer | The N amount of items to return from the vector search operation. | +| Task ID (required) | `task` | string | `TASK_DELETE` | +| Collection Name (required) | `collection-name` | string | The name of the collection to delete the object from. | +| ID | `id` | string | The ID of the item. | | Filter | `filter` | object | The metadata filter to be applied to the data with Chroma where filter, please refer to [using-where-filters](https://docs.trychroma.com/guides#using-where-filters). | | Filter Document | `filter-document` | string | The document content filter to be applied to the data, please refer to [filtering-by-document-contents](https://docs.trychroma.com/guides#filtering-by-document-contents). | -| Fields | `fields` | array[string] | The fields to be returned from the vector search operation. |
@@ -140,40 +136,20 @@ Perform a vector search on a collection | Output | Field ID | Format | Description | | :--- | :--- | :--- | :--- | -| [Result](#query-result) | `result` | object | Result of the vector search operation. | -| Status | `status` | string | Vector search status. | - - -
- Output Objects in Query - -

Result

- -
- -| Field | Field ID | Format | Note | -| :--- | :--- | :--- | :--- | -| IDs | `ids` | array | The ids returned from the vector search operation. | -| [Items](#query-items) | `items` | array | The items returned from the vector search operation. | -| [Metadata](#query-metadata) | `metadata` | array | The metadata returned from the vector search operation. | -| Vectors | `vectors` | array | The vectors returned from the vector search operation. | +| Status | `status` | string | Delete status. |
-
-### Delete +### Delete Collection -Delete vector items from a collection +Delete a collection
| Input | Field ID | Format | Description | | :--- | :--- | :--- | :--- | -| Task ID (required) | `task` | string | `TASK_DELETE` | -| Collection Name (required) | `collection-name` | string | The name of the collection to delete the object from. | -| ID | `id` | string | The ID of the item. | -| Filter | `filter` | object | The metadata filter to be applied to the data with Chroma where filter, please refer to [using-where-filters](https://docs.trychroma.com/guides#using-where-filters). | -| Filter Document | `filter-document` | string | The document content filter to be applied to the data, please refer to [filtering-by-document-contents](https://docs.trychroma.com/guides#filtering-by-document-contents). | +| Task ID (required) | `task` | string | `TASK_DELETE_COLLECTION` | +| Collection Name (required) | `collection-name` | string | The name of the collection to delete. |
@@ -185,23 +161,25 @@ Delete vector items from a collection | Output | Field ID | Format | Description | | :--- | :--- | :--- | :--- | -| Status | `status` | string | Delete status. | +| Status | `status` | string | Delete collection status. | -### Create Collection +### Query -Create a collection +Perform a vector search on a collection
| Input | Field ID | Format | Description | | :--- | :--- | :--- | :--- | -| Task ID (required) | `task` | string | `TASK_CREATE_COLLECTION` | -| Collection Name (required) | `collection-name` | string | The name of the collection to create. | -| Config | `metadata` | object | The metadata of the collection. Please refer to [creating-inspecting-and-deleting-collection](https://docs.trychroma.com/guides#creating,-inspecting,-and-deleting-collections). | -| Configuration | `configuration` | object | The configuration of the collection. Please refer to [creating-inspecting-and-deleting-collection](https://docs.trychroma.com/guides#creating,-inspecting,-and-deleting-collections). | -| Get or Create | `get-or-create` | boolean | If true, the collection will be created if it does not exist. | +| Task ID (required) | `task` | string | `TASK_QUERY` | +| Collection Name (required) | `collection-name` | string | The name of the collection to perform vector similarity search on. | +| Vector (required) | `vector` | array[number] | An array of dimensions for the vector query. | +| N Results (required) | `n-results` | integer | The N amount of items to return from the vector search operation. | +| Filter | `filter` | object | The metadata filter to be applied to the data with Chroma where filter, please refer to [using-where-filters](https://docs.trychroma.com/guides#using-where-filters). | +| Filter Document | `filter-document` | string | The document content filter to be applied to the data, please refer to [filtering-by-document-contents](https://docs.trychroma.com/guides#filtering-by-document-contents). | +| Fields | `fields` | array[string] | The fields to be returned from the vector search operation. |
@@ -213,20 +191,42 @@ Create a collection | Output | Field ID | Format | Description | | :--- | :--- | :--- | :--- | -| Status | `status` | string | Create collection status. | +| [Result](#query-result) | `result` | object | Result of the vector search operation. | +| Status | `status` | string | Vector search status. | +
+ Output Objects in Query -### Delete Collection +

Result

-Delete a collection +
+ +| Field | Field ID | Format | Note | +| :--- | :--- | :--- | :--- | +| IDs | `ids` | array | The ids returned from the vector search operation. | +| [Items](#query-items) | `items` | array | The items returned from the vector search operation. | +| [Metadata](#query-metadata) | `metadata` | array | The metadata returned from the vector search operation. | +| Vectors | `vectors` | array | The vectors returned from the vector search operation. | +
+
+ + +### Upsert + +Upsert a vector item into a collection, existing item will be updated
| Input | Field ID | Format | Description | | :--- | :--- | :--- | :--- | -| Task ID (required) | `task` | string | `TASK_DELETE_COLLECTION` | -| Collection Name (required) | `collection-name` | string | The name of the collection to delete. | +| Task ID (required) | `task` | string | `TASK_UPSERT` | +| Collection Name (required) | `collection-name` | string | The name of the collection to upsert the item into. | +| ID (required) | `id` | string | The ID of the item. | +| Metadata (required) | `metadata` | object | The vector metadata. | +| Vector (required) | `vector` | array[number] | An array of dimensions for the vector value. | +| Document | `document` | string | The document string value. | +| URI | `uri` | string | The uri of the item. |
@@ -238,7 +238,7 @@ Delete a collection | Output | Field ID | Format | Description | | :--- | :--- | :--- | :--- | -| Status | `status` | string | Delete collection status. | +| Status | `status` | string | Add status. | diff --git a/pkg/component/data/chroma/v0/config/definition.yaml b/pkg/component/data/chroma/v0/config/definition.yaml index 5772061dc..e84a401c1 100644 --- a/pkg/component/data/chroma/v0/config/definition.yaml +++ b/pkg/component/data/chroma/v0/config/definition.yaml @@ -1,10 +1,3 @@ -availableTasks: -- TASK_BATCH_UPSERT -- TASK_UPSERT -- TASK_QUERY -- TASK_DELETE -- TASK_CREATE_COLLECTION -- TASK_DELETE_COLLECTION documentationUrl: https://www.instill.tech/docs/component/data/chroma icon: assets/chroma.svg id: chroma diff --git a/pkg/component/data/elasticsearch/v0/README.mdx b/pkg/component/data/elasticsearch/v0/README.mdx index 3fef0508b..7c0d6c415 100644 --- a/pkg/component/data/elasticsearch/v0/README.mdx +++ b/pkg/component/data/elasticsearch/v0/README.mdx @@ -7,14 +7,14 @@ description: "Learn about how to set up a VDP Elasticsearch component https://gi The Elasticsearch component is a data component that allows users to access the Elasticsearch database. It can carry out the following tasks: -- [Search](#search) -- [Vector Search](#vector-search) +- [Create Index](#create-index) +- [Delete](#delete) +- [Delete Index](#delete-index) - [Index](#index) - [Multi Index](#multi-index) +- [Search](#search) - [Update](#update) -- [Delete](#delete) -- [Create Index](#create-index) -- [Delete Index](#delete-index) +- [Vector Search](#vector-search) @@ -56,23 +56,17 @@ ${connection.}`. ## Supported Tasks -### Search +### Create Index -Search for documents in Elasticsearch, support full text search +Create an index in Elasticsearch
| Input | Field ID | Format | Description | | :--- | :--- | :--- | :--- | -| Task ID (required) | `task` | string | `TASK_SEARCH` | +| Task ID (required) | `task` | string | `TASK_CREATE_INDEX` | | Index Name (required) | `index-name` | string | Name of the Elasticsearch index. | -| ID | `id` | string | The ID of the document. | -| Query | `query` | string | Full text search query for search task, query will be prioritised over filter if both are provided, if both query and filter are not provided, all documents will be selected. | -| Filter | `filter` | object | The query dsl filter which starts with "query" field, please refer to [here](https://www.elastic.co/guide/en/elasticsearch/reference/current/query-filter-context.html). | -| Filter SQL | `filter-sql` | string | The filter to be applied to the data with SQL syntax, which starts with WHERE clause, empty for no filter. | -| Size | `size` | integer | Number of documents to return. If empty then all documents will be returned. | -| Fields | `fields` | array[string] | The fields to return in the documents. If empty then all fields will be returned. | -| Minimum Score | `min-score` | number | Minimum score to consider for search results. If empty then no minimum score will be considered. | +| Mappings | `mappings` | object | Index mappings which starts with \{"mappings":\{"properties"\}\} field, please refer to [here](https://www.elastic.co/guide/en/elasticsearch/reference/current/dense-vector.html) for vector search and [here](https://www.elastic.co/guide/en/elasticsearch/reference/current/mapping-types.html) for other mappings. |
@@ -84,74 +78,62 @@ Search for documents in Elasticsearch, support full text search | Output | Field ID | Format | Description | | :--- | :--- | :--- | :--- | -| Status | `status` | string | Search operation status. | -| [Result](#search-result) | `result` | object | Result of the search operation. | +| Status | `status` | string | Create index operation status. | -
- Output Objects in Search -

Result

+### Delete + +Delete documents from Elasticsearch
-| Field | Field ID | Format | Note | +| Input | Field ID | Format | Description | | :--- | :--- | :--- | :--- | -| [Data](#search-data) | `data` | array | The data returned from the search operation. | -| [Documents](#search-documents) | `documents` | array | The documents returned from the search operation. | -| IDs | `ids` | array | The ids returned from the search operation. | +| Task ID (required) | `task` | string | `TASK_DELETE` | +| Index Name (required) | `index-name` | string | Name of the Elasticsearch index. | +| ID | `id` | string | The ID of the document. | +| Query | `query` | string | Full text search query for delete task, query will be prioritised over filter if both are provided, if both query and filter are not provided, all documents will be selected. | +| Filter | `filter` | object | The query dsl filter which starts with "query" field, please refer to [here](https://www.elastic.co/guide/en/elasticsearch/reference/current/query-filter-context.html). | +| Filter SQL | `filter-sql` | string | The filter to be applied to the data with SQL syntax, which starts with WHERE clause, empty for no filter. |
-
-### Vector Search -Search for vector similarity search in Elasticsearch + +
-| Input | Field ID | Format | Description | +| Output | Field ID | Format | Description | | :--- | :--- | :--- | :--- | -| Task ID (required) | `task` | string | `TASK_VECTOR_SEARCH` | -| Index Name (required) | `index-name` | string | Name of the Elasticsearch index. | -| Field (required) | `field` | string | Field name of the vector to search for similar vectors. | -| Query Vector | `query-vector` | array[number] | Query vector to search for similar vectors. | -| K | `k` | integer | K of documents to do kNN vector search. | -| Num Candidates | `num-candidates` | integer | Number of candidates to be considered for kNN vector search. Default to 2 times of k. | -| Filter | `filter` | object | The query dsl filter which starts with "filter" field, please refer to [here](https://www.elastic.co/guide/en/elasticsearch/reference/current/knn-search.html#knn-search-filter-example). | -| Filter SQL | `filter-sql` | string | The filter to be applied to the data with SQL syntax, which starts with WHERE clause, empty for no filter. | -| Fields | `fields` | array[string] | The fields to return in the documents. If empty then all fields will be returned. | -| Minimum Score | `min-score` | number | Minimum score to consider for search results. If empty then no minimum score will be considered. | +| Status | `status` | string | Delete operation status. |
+### Delete Index - - +Delete an index in Elasticsearch
-| Output | Field ID | Format | Description | +| Input | Field ID | Format | Description | | :--- | :--- | :--- | :--- | -| Status | `status` | string | Search operation status. | -| [Result](#vector-search-result) | `result` | object | Result of the vector search operation. | +| Task ID (required) | `task` | string | `TASK_DELETE_INDEX` | +| Index Name (required) | `index-name` | string | Name of the Elasticsearch index. |
-
- Output Objects in Vector Search -

Result

+ + +
-| Field | Field ID | Format | Note | +| Output | Field ID | Format | Description | | :--- | :--- | :--- | :--- | -| [Documents](#vector-search-documents) | `documents` | array | The documents returned from the vector search operation. | -| IDs | `ids` | array | The ids returned from the vector search operation. | -| [Metadata](#vector-search-metadata) | `metadata` | array | The metadata returned from the vector search operation. | -| Vectors | `vectors` | array | The vectors returned from the vector search operation. | +| Status | `status` | string | Delete index operation status. |
-
### Index @@ -208,21 +190,23 @@ Index multiple documents into Elasticsearch with bulk API -### Update +### Search -Update a document in Elasticsearch +Search for documents in Elasticsearch, support full text search
| Input | Field ID | Format | Description | | :--- | :--- | :--- | :--- | -| Task ID (required) | `task` | string | `TASK_UPDATE` | +| Task ID (required) | `task` | string | `TASK_SEARCH` | | Index Name (required) | `index-name` | string | Name of the Elasticsearch index. | | ID | `id` | string | The ID of the document. | -| Query | `query` | string | Full text search query for update task, query will be prioritised over filter if both are provided, if both query and filter are not provided, all documents will be selected. | +| Query | `query` | string | Full text search query for search task, query will be prioritised over filter if both are provided, if both query and filter are not provided, all documents will be selected. | | Filter | `filter` | object | The query dsl filter which starts with "query" field, please refer to [here](https://www.elastic.co/guide/en/elasticsearch/reference/current/query-filter-context.html). | | Filter SQL | `filter-sql` | string | The filter to be applied to the data with SQL syntax, which starts with WHERE clause, empty for no filter. | -| Update (required) | `update-data` | object | Update data. | +| Size | `size` | integer | Number of documents to return. If empty then all documents will be returned. | +| Fields | `fields` | array[string] | The fields to return in the documents. If empty then all fields will be returned. | +| Minimum Score | `min-score` | number | Minimum score to consider for search results. If empty then no minimum score will be considered. |
@@ -234,24 +218,41 @@ Update a document in Elasticsearch | Output | Field ID | Format | Description | | :--- | :--- | :--- | :--- | -| Status | `status` | string | Update operation status. | +| Status | `status` | string | Search operation status. | +| [Result](#search-result) | `result` | object | Result of the search operation. | +
+ Output Objects in Search -### Delete +

Result

-Delete documents from Elasticsearch +
+ +| Field | Field ID | Format | Note | +| :--- | :--- | :--- | :--- | +| [Data](#search-data) | `data` | array | The data returned from the search operation. | +| [Documents](#search-documents) | `documents` | array | The documents returned from the search operation. | +| IDs | `ids` | array | The ids returned from the search operation. | +
+
+ + +### Update + +Update a document in Elasticsearch
| Input | Field ID | Format | Description | | :--- | :--- | :--- | :--- | -| Task ID (required) | `task` | string | `TASK_DELETE` | +| Task ID (required) | `task` | string | `TASK_UPDATE` | | Index Name (required) | `index-name` | string | Name of the Elasticsearch index. | | ID | `id` | string | The ID of the document. | -| Query | `query` | string | Full text search query for delete task, query will be prioritised over filter if both are provided, if both query and filter are not provided, all documents will be selected. | +| Query | `query` | string | Full text search query for update task, query will be prioritised over filter if both are provided, if both query and filter are not provided, all documents will be selected. | | Filter | `filter` | object | The query dsl filter which starts with "query" field, please refer to [here](https://www.elastic.co/guide/en/elasticsearch/reference/current/query-filter-context.html). | | Filter SQL | `filter-sql` | string | The filter to be applied to the data with SQL syntax, which starts with WHERE clause, empty for no filter. | +| Update (required) | `update-data` | object | Update data. |
@@ -263,21 +264,28 @@ Delete documents from Elasticsearch | Output | Field ID | Format | Description | | :--- | :--- | :--- | :--- | -| Status | `status` | string | Delete operation status. | +| Status | `status` | string | Update operation status. | -### Create Index +### Vector Search -Create an index in Elasticsearch +Search for vector similarity search in Elasticsearch
| Input | Field ID | Format | Description | | :--- | :--- | :--- | :--- | -| Task ID (required) | `task` | string | `TASK_CREATE_INDEX` | +| Task ID (required) | `task` | string | `TASK_VECTOR_SEARCH` | | Index Name (required) | `index-name` | string | Name of the Elasticsearch index. | -| Mappings | `mappings` | object | Index mappings which starts with \{"mappings":\{"properties"\}\} field, please refer to [here](https://www.elastic.co/guide/en/elasticsearch/reference/current/dense-vector.html) for vector search and [here](https://www.elastic.co/guide/en/elasticsearch/reference/current/mapping-types.html) for other mappings. | +| Field (required) | `field` | string | Field name of the vector to search for similar vectors. | +| Query Vector | `query-vector` | array[number] | Query vector to search for similar vectors. | +| K | `k` | integer | K of documents to do kNN vector search. | +| Num Candidates | `num-candidates` | integer | Number of candidates to be considered for kNN vector search. Default to 2 times of k. | +| Filter | `filter` | object | The query dsl filter which starts with "filter" field, please refer to [here](https://www.elastic.co/guide/en/elasticsearch/reference/current/knn-search.html#knn-search-filter-example). | +| Filter SQL | `filter-sql` | string | The filter to be applied to the data with SQL syntax, which starts with WHERE clause, empty for no filter. | +| Fields | `fields` | array[string] | The fields to return in the documents. If empty then all fields will be returned. | +| Minimum Score | `min-score` | number | Minimum score to consider for search results. If empty then no minimum score will be considered. |
@@ -289,33 +297,25 @@ Create an index in Elasticsearch | Output | Field ID | Format | Description | | :--- | :--- | :--- | :--- | -| Status | `status` | string | Create index operation status. | - - - -### Delete Index - -Delete an index in Elasticsearch - -
- -| Input | Field ID | Format | Description | -| :--- | :--- | :--- | :--- | -| Task ID (required) | `task` | string | `TASK_DELETE_INDEX` | -| Index Name (required) | `index-name` | string | Name of the Elasticsearch index. | +| Status | `status` | string | Search operation status. | +| [Result](#vector-search-result) | `result` | object | Result of the vector search operation. |
+
+ Output Objects in Vector Search - - - +

Result

-| Output | Field ID | Format | Description | +| Field | Field ID | Format | Note | | :--- | :--- | :--- | :--- | -| Status | `status` | string | Delete index operation status. | +| [Documents](#vector-search-documents) | `documents` | array | The documents returned from the vector search operation. | +| IDs | `ids` | array | The ids returned from the vector search operation. | +| [Metadata](#vector-search-metadata) | `metadata` | array | The metadata returned from the vector search operation. | +| Vectors | `vectors` | array | The vectors returned from the vector search operation. |
+
diff --git a/pkg/component/data/elasticsearch/v0/config/definition.yaml b/pkg/component/data/elasticsearch/v0/config/definition.yaml index 523442fc5..4f45a836c 100644 --- a/pkg/component/data/elasticsearch/v0/config/definition.yaml +++ b/pkg/component/data/elasticsearch/v0/config/definition.yaml @@ -1,12 +1,3 @@ -availableTasks: -- TASK_SEARCH -- TASK_VECTOR_SEARCH -- TASK_INDEX -- TASK_MULTI_INDEX -- TASK_UPDATE -- TASK_DELETE -- TASK_CREATE_INDEX -- TASK_DELETE_INDEX documentationUrl: https://www.instill.tech/docs/component/data/elasticsearch icon: assets/elasticsearch.svg id: elasticsearch diff --git a/pkg/component/data/googlecloudstorage/v0/README.mdx b/pkg/component/data/googlecloudstorage/v0/README.mdx index cbd60f2ec..6c34440f7 100644 --- a/pkg/component/data/googlecloudstorage/v0/README.mdx +++ b/pkg/component/data/googlecloudstorage/v0/README.mdx @@ -7,9 +7,9 @@ description: "Learn about how to set up a VDP Google Cloud Storage component htt The Google Cloud Storage component is a data component that allows users to upload data to Google's Cloud Storage. It can carry out the following tasks: -- [Upload](#upload) -- [Read Objects](#read-objects) - [Create Bucket](#create-bucket) +- [Read Objects](#read-objects) +- [Upload](#upload) @@ -50,18 +50,18 @@ ${connection.}`. ## Supported Tasks -### Upload +### Create Bucket -Upload data to Google Cloud Storage. +Read objects from Google Cloud Storage.
| Input | Field ID | Format | Description | | :--- | :--- | :--- | :--- | -| Task ID (required) | `task` | string | `TASK_UPLOAD` | +| Task ID (required) | `task` | string | `TASK_CREATE_BUCKET` | | Bucket Name (required) | `bucket-name` | string | Name of the bucket to be used for object storage. | -| Object Name (required) | `object-name` | string | The name of the object to be created. | -| Data (required) | `data` | string | The data to be saved in the object. | +| Project ID (required) | `project-id` | string | The project ID to create the bucket in. | +| Location | `location` | string | The location to create the bucket in. |
@@ -73,11 +73,9 @@ Upload data to Google Cloud Storage. | Output | Field ID | Format | Description | | :--- | :--- | :--- | :--- | -| Authenticated URL (optional) | `authenticated-url` | string | Only users granted permission can access the object with this link. | -| Gsutil URI (optional) | `gsutil-uri` | string | File path to this resource in Cloud Storage. | -| Public Access (optional) | `public-access` | boolean | Whether the object is publicly accessible. | -| Public URL (optional) | `public-url` | string | Anyone with this link can access the object on the public Internet. | -| Upload Status | `status` | string | Status of the upload operation. | +| Result (optional) | `result` | string | The result of the operation. | +| Bucket Name (optional) | `name` | string | The name of the bucket. | +| Location (optional) | `location` | string | The location of the bucket. | @@ -262,18 +260,18 @@ Read objects from Google Cloud Storage. -### Create Bucket +### Upload -Read objects from Google Cloud Storage. +Upload data to Google Cloud Storage.
| Input | Field ID | Format | Description | | :--- | :--- | :--- | :--- | -| Task ID (required) | `task` | string | `TASK_CREATE_BUCKET` | +| Task ID (required) | `task` | string | `TASK_UPLOAD` | | Bucket Name (required) | `bucket-name` | string | Name of the bucket to be used for object storage. | -| Project ID (required) | `project-id` | string | The project ID to create the bucket in. | -| Location | `location` | string | The location to create the bucket in. | +| Object Name (required) | `object-name` | string | The name of the object to be created. | +| Data (required) | `data` | string | The data to be saved in the object. |
@@ -285,9 +283,11 @@ Read objects from Google Cloud Storage. | Output | Field ID | Format | Description | | :--- | :--- | :--- | :--- | -| Result (optional) | `result` | string | The result of the operation. | -| Bucket Name (optional) | `name` | string | The name of the bucket. | -| Location (optional) | `location` | string | The location of the bucket. | +| Authenticated URL (optional) | `authenticated-url` | string | Only users granted permission can access the object with this link. | +| Gsutil URI (optional) | `gsutil-uri` | string | File path to this resource in Cloud Storage. | +| Public Access (optional) | `public-access` | boolean | Whether the object is publicly accessible. | +| Public URL (optional) | `public-url` | string | Anyone with this link can access the object on the public Internet. | +| Upload Status | `status` | string | Status of the upload operation. | diff --git a/pkg/component/data/googlecloudstorage/v0/config/definition.yaml b/pkg/component/data/googlecloudstorage/v0/config/definition.yaml index 612fc34dd..d87c4d4ab 100644 --- a/pkg/component/data/googlecloudstorage/v0/config/definition.yaml +++ b/pkg/component/data/googlecloudstorage/v0/config/definition.yaml @@ -1,7 +1,3 @@ -availableTasks: -- TASK_UPLOAD -- TASK_READ_OBJECTS -- TASK_CREATE_BUCKET custom: false documentationUrl: https://www.instill.tech/docs/component/data/gcs icon: assets/gcs.svg diff --git a/pkg/component/data/googledrive/v0/config/definition.yaml b/pkg/component/data/googledrive/v0/config/definition.yaml index fec7d70ee..9f40bb063 100644 --- a/pkg/component/data/googledrive/v0/config/definition.yaml +++ b/pkg/component/data/googledrive/v0/config/definition.yaml @@ -1,6 +1,3 @@ -availableTasks: -- TASK_READ_FILE -- TASK_READ_FOLDER custom: false documentationUrl: https://www.instill.tech/docs/component/data/google-drive icon: assets/google-drive.svg diff --git a/pkg/component/data/googlesheets/v0/README.mdx b/pkg/component/data/googlesheets/v0/README.mdx index 016af00e0..241b661fa 100644 --- a/pkg/component/data/googlesheets/v0/README.mdx +++ b/pkg/component/data/googlesheets/v0/README.mdx @@ -7,22 +7,22 @@ description: "Learn about how to set up a VDP Google Sheets component https://gi The Google Sheets component is a data component that allows users to connect to and interact with Google Sheets spreadsheets to read and write data. It can carry out the following tasks: -- [Create Spreadsheet](#create-spreadsheet) -- [Delete Spreadsheet](#delete-spreadsheet) - [Add Sheet](#add-sheet) -- [Delete Sheet](#delete-sheet) +- [Create Spreadsheet](#create-spreadsheet) - [Create Spreadsheet Column](#create-spreadsheet-column) +- [Delete Multiple Rows](#delete-multiple-rows) +- [Delete Row](#delete-row) +- [Delete Sheet](#delete-sheet) +- [Delete Spreadsheet](#delete-spreadsheet) - [Delete Spreadsheet Column](#delete-spreadsheet-column) -- [List Rows](#list-rows) -- [Lookup Rows](#lookup-rows) -- [Get Row](#get-row) - [Get Multiple Rows](#get-multiple-rows) -- [Insert Row](#insert-row) +- [Get Row](#get-row) - [Insert Multiple Rows](#insert-multiple-rows) -- [Update Row](#update-row) +- [Insert Row](#insert-row) +- [List Rows](#list-rows) +- [Lookup Rows](#lookup-rows) - [Update Multiple Rows](#update-multiple-rows) -- [Delete Row](#delete-row) -- [Delete Multiple Rows](#delete-multiple-rows) +- [Update Row](#update-row) @@ -63,6 +63,33 @@ ${connection.}`. ## Supported Tasks +### Add Sheet + +Add a new sheet to an existing Google Sheets spreadsheet. + +
+ +| Input | Field ID | Format | Description | +| :--- | :--- | :--- | :--- | +| Task ID (required) | `task` | string | `TASK_ADD_SHEET` | +| Spreadsheet ID (required) | `shared-link` | string | Shared link of the spreadsheet. You can get the shared link by clicking 'Share' button and selecting 'Copy link'. | +| Headers | `headers` | array[string] | Column headers for the sheet. | +| Sheet Name (required) | `sheet-name` | string | Name of the sheet. | +
+ + + + + + +
+ +| Output | Field ID | Format | Description | +| :--- | :--- | :--- | :--- | +| Success | `success` | boolean | Result of the operation. | +
+ + ### Create Spreadsheet Create a new Google Sheets spreadsheet with multiple sheets. @@ -103,16 +130,18 @@ Configuration for sheets to create. -### Delete Spreadsheet +### Create Spreadsheet Column -Delete a Google Sheets spreadsheet. +Add a new column to a Google Sheets spreadsheet.
| Input | Field ID | Format | Description | | :--- | :--- | :--- | :--- | -| Task ID (required) | `task` | string | `TASK_DELETE_SPREADSHEET` | +| Task ID (required) | `task` | string | `TASK_CREATE_SPREADSHEET_COLUMN` | | Spreadsheet ID (required) | `shared-link` | string | Shared link of the spreadsheet. You can get the shared link by clicking 'Share' button and selecting 'Copy link'. | +| Sheet Name (required) | `sheet-name` | string | Name of the sheet. | +| Column Name (required) | `column-name` | string | Name of the column. |
@@ -128,18 +157,18 @@ Delete a Google Sheets spreadsheet. -### Add Sheet +### Delete Multiple Rows -Add a new sheet to an existing Google Sheets spreadsheet. +Delete multiple rows from a Google Sheets spreadsheet.
| Input | Field ID | Format | Description | | :--- | :--- | :--- | :--- | -| Task ID (required) | `task` | string | `TASK_ADD_SHEET` | +| Task ID (required) | `task` | string | `TASK_DELETE_MULTIPLE_ROWS` | | Spreadsheet ID (required) | `shared-link` | string | Shared link of the spreadsheet. You can get the shared link by clicking 'Share' button and selecting 'Copy link'. | -| Headers | `headers` | array[string] | Column headers for the sheet. | | Sheet Name (required) | `sheet-name` | string | Name of the sheet. | +| Row Numbers (required) | `row-numbers` | array[integer] | Row numbers to update (1-based indices). |
@@ -155,17 +184,18 @@ Add a new sheet to an existing Google Sheets spreadsheet. -### Delete Sheet +### Delete Row -Remove a sheet from a Google Sheets spreadsheet. +Delete a row from a Google Sheets spreadsheet.
| Input | Field ID | Format | Description | | :--- | :--- | :--- | :--- | -| Task ID (required) | `task` | string | `TASK_DELETE_SHEET` | +| Task ID (required) | `task` | string | `TASK_DELETE_ROW` | | Spreadsheet ID (required) | `shared-link` | string | Shared link of the spreadsheet. You can get the shared link by clicking 'Share' button and selecting 'Copy link'. | | Sheet Name (required) | `sheet-name` | string | Name of the sheet. | +| Row Number (required) | `row-number` | number | Row number to update (1-based index). |
@@ -181,18 +211,17 @@ Remove a sheet from a Google Sheets spreadsheet. -### Create Spreadsheet Column +### Delete Sheet -Add a new column to a Google Sheets spreadsheet. +Remove a sheet from a Google Sheets spreadsheet.
| Input | Field ID | Format | Description | | :--- | :--- | :--- | :--- | -| Task ID (required) | `task` | string | `TASK_CREATE_SPREADSHEET_COLUMN` | +| Task ID (required) | `task` | string | `TASK_DELETE_SHEET` | | Spreadsheet ID (required) | `shared-link` | string | Shared link of the spreadsheet. You can get the shared link by clicking 'Share' button and selecting 'Copy link'. | | Sheet Name (required) | `sheet-name` | string | Name of the sheet. | -| Column Name (required) | `column-name` | string | Name of the column. |
@@ -208,18 +237,16 @@ Add a new column to a Google Sheets spreadsheet. -### Delete Spreadsheet Column +### Delete Spreadsheet -Delete a column from a Google Sheets spreadsheet. +Delete a Google Sheets spreadsheet.
| Input | Field ID | Format | Description | | :--- | :--- | :--- | :--- | -| Task ID (required) | `task` | string | `TASK_DELETE_SPREADSHEET_COLUMN` | +| Task ID (required) | `task` | string | `TASK_DELETE_SPREADSHEET` | | Spreadsheet ID (required) | `shared-link` | string | Shared link of the spreadsheet. You can get the shared link by clicking 'Share' button and selecting 'Copy link'. | -| Sheet Name (required) | `sheet-name` | string | Name of the sheet. | -| Column Name (required) | `column-name` | string | Name of the column. |
@@ -235,19 +262,18 @@ Delete a column from a Google Sheets spreadsheet. -### List Rows +### Delete Spreadsheet Column -List all rows in a Google Sheets spreadsheet. +Delete a column from a Google Sheets spreadsheet.
| Input | Field ID | Format | Description | | :--- | :--- | :--- | :--- | -| Task ID (required) | `task` | string | `TASK_LIST_ROWS` | +| Task ID (required) | `task` | string | `TASK_DELETE_SPREADSHEET_COLUMN` | | Spreadsheet ID (required) | `shared-link` | string | Shared link of the spreadsheet. You can get the shared link by clicking 'Share' button and selecting 'Copy link'. | -| Start Row | `start-row` | number | The starting row number to retrieve (1-based index). | -| End Row | `end-row` | number | The ending row number to retrieve (1-based index). | | Sheet Name (required) | `sheet-name` | string | Name of the sheet. | +| Column Name (required) | `column-name` | string | Name of the column. |
@@ -259,37 +285,22 @@ List all rows in a Google Sheets spreadsheet. | Output | Field ID | Format | Description | | :--- | :--- | :--- | :--- | -| [Rows Data](#list-rows-rows-data) | `rows` | array[object] | Multiple rows data with row numbers and data. | - - -
- Output Objects in List Rows - -

Rows Data

- -
- -| Field | Field ID | Format | Note | -| :--- | :--- | :--- | :--- | -| Row Number | `row-number` | number | Row number to update (1-based index) | -| Row Data | `row-value` | json | Row data in JSON format where keys are column names and values are the corresponding cell values | +| Success | `success` | boolean | Result of the operation. |
-
-### Lookup Rows +### Get Multiple Rows -Find multiple rows based on column value in a Google Sheets spreadsheet. +Get multiple rows from a Google Sheets spreadsheet.
| Input | Field ID | Format | Description | | :--- | :--- | :--- | :--- | -| Task ID (required) | `task` | string | `TASK_LOOKUP_ROWS` | +| Task ID (required) | `task` | string | `TASK_GET_MULTIPLE_ROWS` | +| Row Numbers (required) | `row-numbers` | array[integer] | The row numbers to retrieve (1-based indices). | | Spreadsheet ID (required) | `shared-link` | string | Shared link of the spreadsheet. You can get the shared link by clicking 'Share' button and selecting 'Copy link'. | | Sheet Name (required) | `sheet-name` | string | Name of the sheet. | -| Column Name (required) | `column-name` | string | Name of the column. | -| Search Value (required) | `value` | string | Value to search for in the specified column. |
@@ -301,13 +312,13 @@ Find multiple rows based on column value in a Google Sheets spreadsheet. | Output | Field ID | Format | Description | | :--- | :--- | :--- | :--- | -| [Rows Data](#lookup-rows-rows-data) | `rows` | array[object] | Multiple rows data with row numbers and data. | +| [Rows Data](#get-multiple-rows-rows-data) | `rows` | array[object] | Multiple rows data with row numbers and data. |
- Output Objects in Lookup Rows + Output Objects in Get Multiple Rows -

Rows Data

+

Rows Data

@@ -360,17 +371,17 @@ Get a single row from a Google Sheets spreadsheet.
-### Get Multiple Rows +### Insert Multiple Rows -Get multiple rows from a Google Sheets spreadsheet. +Insert multiple rows into a Google Sheets spreadsheet.
| Input | Field ID | Format | Description | | :--- | :--- | :--- | :--- | -| Task ID (required) | `task` | string | `TASK_GET_MULTIPLE_ROWS` | -| Row Numbers (required) | `row-numbers` | array[integer] | The row numbers to retrieve (1-based indices). | +| Task ID (required) | `task` | string | `TASK_INSERT_MULTIPLE_ROWS` | | Spreadsheet ID (required) | `shared-link` | string | Shared link of the spreadsheet. You can get the shared link by clicking 'Share' button and selecting 'Copy link'. | +| Row Values | `row-values` | array[json] | Array of row data in JSON format where keys are column names and values are the corresponding cell values | | Sheet Name (required) | `sheet-name` | string | Name of the sheet. |
@@ -383,13 +394,13 @@ Get multiple rows from a Google Sheets spreadsheet. | Output | Field ID | Format | Description | | :--- | :--- | :--- | :--- | -| [Rows Data](#get-multiple-rows-rows-data) | `rows` | array[object] | Multiple rows data with row numbers and data. | +| [Rows Data](#insert-multiple-rows-rows-data) | `rows` | array[object] | Multiple rows data with row numbers and data. |
- Output Objects in Get Multiple Rows + Output Objects in Insert Multiple Rows -

Rows Data

+

Rows Data

@@ -442,17 +453,18 @@ Insert a single row into a Google Sheets spreadsheet.
-### Insert Multiple Rows +### List Rows -Insert multiple rows into a Google Sheets spreadsheet. +List all rows in a Google Sheets spreadsheet.
| Input | Field ID | Format | Description | | :--- | :--- | :--- | :--- | -| Task ID (required) | `task` | string | `TASK_INSERT_MULTIPLE_ROWS` | +| Task ID (required) | `task` | string | `TASK_LIST_ROWS` | | Spreadsheet ID (required) | `shared-link` | string | Shared link of the spreadsheet. You can get the shared link by clicking 'Share' button and selecting 'Copy link'. | -| Row Values | `row-values` | array[json] | Array of row data in JSON format where keys are column names and values are the corresponding cell values | +| Start Row | `start-row` | number | The starting row number to retrieve (1-based index). | +| End Row | `end-row` | number | The ending row number to retrieve (1-based index). | | Sheet Name (required) | `sheet-name` | string | Name of the sheet. |
@@ -465,13 +477,13 @@ Insert multiple rows into a Google Sheets spreadsheet. | Output | Field ID | Format | Description | | :--- | :--- | :--- | :--- | -| [Rows Data](#insert-multiple-rows-rows-data) | `rows` | array[object] | Multiple rows data with row numbers and data. | +| [Rows Data](#list-rows-rows-data) | `rows` | array[object] | Multiple rows data with row numbers and data. |
- Output Objects in Insert Multiple Rows + Output Objects in List Rows -

Rows Data

+

Rows Data

@@ -483,36 +495,23 @@ Insert multiple rows into a Google Sheets spreadsheet.
-### Update Row +### Lookup Rows -Update a row in a Google Sheets spreadsheet. +Find multiple rows based on column value in a Google Sheets spreadsheet.
| Input | Field ID | Format | Description | | :--- | :--- | :--- | :--- | -| Task ID (required) | `task` | string | `TASK_UPDATE_ROW` | +| Task ID (required) | `task` | string | `TASK_LOOKUP_ROWS` | | Spreadsheet ID (required) | `shared-link` | string | Shared link of the spreadsheet. You can get the shared link by clicking 'Share' button and selecting 'Copy link'. | | Sheet Name (required) | `sheet-name` | string | Name of the sheet. | -| [Row Data](#update-row-row-data) (required) | `row` | object | Row data with row number and data. | +| Column Name (required) | `column-name` | string | Name of the column. | +| Search Value (required) | `value` | string | Value to search for in the specified column. |
-
- Input Objects in Update Row - -

Row Data

- -Row data with row number and data. - -
-| Field | Field ID | Format | Note | -| :--- | :--- | :--- | :--- | -| Row Number | `row-number` | number | Row number to update (1-based index) | -| Row Data | `row-value` | json | Row data in JSON format where keys are column names and values are the corresponding cell values | -
-
@@ -520,13 +519,13 @@ Row data with row number and data. | Output | Field ID | Format | Description | | :--- | :--- | :--- | :--- | -| [Row Data](#update-row-row-data) | `row` | object | Row data with row number and data. | +| [Rows Data](#lookup-rows-rows-data) | `rows` | array[object] | Multiple rows data with row numbers and data. |
- Output Objects in Update Row + Output Objects in Lookup Rows -

Row Data

+

Rows Data

@@ -593,58 +592,59 @@ Multiple rows data with row numbers and data.
-### Delete Row +### Update Row -Delete a row from a Google Sheets spreadsheet. +Update a row in a Google Sheets spreadsheet.
| Input | Field ID | Format | Description | | :--- | :--- | :--- | :--- | -| Task ID (required) | `task` | string | `TASK_DELETE_ROW` | +| Task ID (required) | `task` | string | `TASK_UPDATE_ROW` | | Spreadsheet ID (required) | `shared-link` | string | Shared link of the spreadsheet. You can get the shared link by clicking 'Share' button and selecting 'Copy link'. | | Sheet Name (required) | `sheet-name` | string | Name of the sheet. | -| Row Number (required) | `row-number` | number | Row number to update (1-based index). | +| [Row Data](#update-row-row-data) (required) | `row` | object | Row data with row number and data. |
+
+ Input Objects in Update Row +

Row Data

- +Row data with row number and data.
-| Output | Field ID | Format | Description | +| Field | Field ID | Format | Note | | :--- | :--- | :--- | :--- | -| Success | `success` | boolean | Result of the operation. | +| Row Number | `row-number` | number | Row number to update (1-based index) | +| Row Data | `row-value` | json | Row data in JSON format where keys are column names and values are the corresponding cell values |
+
-### Delete Multiple Rows - -Delete multiple rows from a Google Sheets spreadsheet.
-| Input | Field ID | Format | Description | +| Output | Field ID | Format | Description | | :--- | :--- | :--- | :--- | -| Task ID (required) | `task` | string | `TASK_DELETE_MULTIPLE_ROWS` | -| Spreadsheet ID (required) | `shared-link` | string | Shared link of the spreadsheet. You can get the shared link by clicking 'Share' button and selecting 'Copy link'. | -| Sheet Name (required) | `sheet-name` | string | Name of the sheet. | -| Row Numbers (required) | `row-numbers` | array[integer] | Row numbers to update (1-based indices). | +| [Row Data](#update-row-row-data) | `row` | object | Row data with row number and data. |
+
+ Output Objects in Update Row - - - +

Row Data

-| Output | Field ID | Format | Description | +| Field | Field ID | Format | Note | | :--- | :--- | :--- | :--- | -| Success | `success` | boolean | Result of the operation. | +| Row Number | `row-number` | number | Row number to update (1-based index) | +| Row Data | `row-value` | json | Row data in JSON format where keys are column names and values are the corresponding cell values |
+
diff --git a/pkg/component/data/googlesheets/v0/config/definition.yaml b/pkg/component/data/googlesheets/v0/config/definition.yaml index 5cf5ecee7..75161191e 100644 --- a/pkg/component/data/googlesheets/v0/config/definition.yaml +++ b/pkg/component/data/googlesheets/v0/config/definition.yaml @@ -1,20 +1,3 @@ -availableTasks: -- TASK_CREATE_SPREADSHEET -- TASK_DELETE_SPREADSHEET -- TASK_ADD_SHEET -- TASK_DELETE_SHEET -- TASK_CREATE_SPREADSHEET_COLUMN -- TASK_DELETE_SPREADSHEET_COLUMN -- TASK_LIST_ROWS -- TASK_LOOKUP_ROWS -- TASK_GET_ROW -- TASK_GET_MULTIPLE_ROWS -- TASK_INSERT_ROW -- TASK_INSERT_MULTIPLE_ROWS -- TASK_UPDATE_ROW -- TASK_UPDATE_MULTIPLE_ROWS -- TASK_DELETE_ROW -- TASK_DELETE_MULTIPLE_ROWS custom: false documentationUrl: https://www.instill.tech/docs/component/data/google-sheets icon: assets/google-sheets.svg diff --git a/pkg/component/data/instillartifact/v0/README.mdx b/pkg/component/data/instillartifact/v0/README.mdx index 637c1675e..c958367e4 100644 --- a/pkg/component/data/instillartifact/v0/README.mdx +++ b/pkg/component/data/instillartifact/v0/README.mdx @@ -7,14 +7,15 @@ description: "Learn about how to set up a VDP Instill Artifact component https:/ The Instill Artifact component is a data component that allows users to manipulate and smart search files and data in the artifact store. It can carry out the following tasks: -- [Upload File](#upload-file) -- [Upload Files](#upload-files) -- [Get Files Metadata](#get-files-metadata) +- [Ask](#ask) - [Get Chunks Metadata](#get-chunks-metadata) +- [Get Files Metadata](#get-files-metadata) - [Get File in Markdown](#get-file-in-markdown) - [Match File Status](#match-file-status) - [Retrieve](#retrieve) -- [Ask](#ask) +- [Sync Files](#sync-files) +- [Upload File](#upload-file) +- [Upload Files](#upload-files) To use Artifact Component, you will need to set up the OpenAI API key for self-hosted deployment of Instill Core. You can do this by setting the `OPENAI_API_KEY` environment variable. @@ -40,148 +41,126 @@ The component definition and tasks are defined in the [definition.yaml](https:// ## Supported Tasks -### Upload File +### Ask -Upload and process the files into chunks into Catalog. +Reply the questions based on the files in the catalog.
| Input | Field ID | Format | Description | | :--- | :--- | :--- | :--- | -| Task ID (required) | `task` | string | `TASK_UPLOAD_FILE` | -| [Options](#upload-file-options) (required) | `options` | object | Choose to upload the files to existing catalog or create a new catalog. | +| Task ID (required) | `task` | string | `TASK_ASK` | +| Catalog ID (required) | `catalog-id` | string | Catalog ID that you input to search files in the Catalog. | +| Namespace (required) | `namespace` | string | Fill in your namespace, you can get namespace through the tab of switching namespace. | +| Question (required) | `question` | string | The question to reply. | +| Top K | `top-k` | integer | The number of top answers to return. The range is from 1~20, and default is 5. |
-
-The options Object - -

Options

-`options` must fulfill one of the following schemas: - -
Existing Catalog
- -
- -| Field | Field ID | Format | Note | -| :--- | :--- | :--- | :--- | -| Catalog ID | `catalog-id` | string | Catalog ID that you input in the Catalog. | -| File | `file` | string | Base64 encoded PDF/DOCX/DOC/PPTX/PPT/HTML file to be uploaded into catalog. | -| File Name | `file-name` | string | Name of the file, including the extension (e.g. `example.pdf`). The length of this field is limited to 100 characters. | -| Namespace | `namespace` | string | Fill in your namespace, you can get namespace through the tab of switching namespace. | -| Option | `option` | string | Must be `"existing catalog"` | -
- -
Create New Catalog
- -
- -| Field | Field ID | Format | Note | -| :--- | :--- | :--- | :--- | -| Catalog ID | `catalog-id` | string | Catalog ID for new catalog you want to create. | -| Description | `description` | string | Description of the catalog. | -| File | `file` | string | Base64 encoded PDF/DOCX/DOC/PPTX/PPT/HTML file to be uploaded into catalog. | -| File Name | `file-name` | string | Name of the file, including the extension (e.g. `example.pdf`). The length of this field is limited to 100 characters. | -| Namespace | `namespace` | string | Fill in your namespace, you can get namespace through the tab of switching namespace. | -| Option | `option` | string | Must be `"create new catalog"` | -| Tags | `tags` | array | Tags for the catalog. | -
-
| Output | Field ID | Format | Description | | :--- | :--- | :--- | :--- | -| [File](#upload-file-file) | `file` | object | Result of uploading file into catalog. | -| Status | `status` | boolean | The status of trigger file processing, if succeeded, return true. | +| Answer | `answer` | string | Answers data from smart search. | +| [Chunks](#ask-chunks) (optional) | `chunks` | array[object] | Chunks data to answer question. |
- Output Objects in Upload File + Output Objects in Ask -

File

+

Chunks

| Field | Field ID | Format | Note | | :--- | :--- | :--- | :--- | -| Catalog ID | `catalog-id` | string | ID of the catalog that you upload files. | -| Create Time | `create-time` | string | Creation time of the file in ISO 8601 format. | -| File Name | `file-name` | string | Name of the file. | -| Type | `file-type` | string | Type of the file. | -| File UID | `file-uid` | string | Unique identifier of the file. | -| Size | `size` | number | Size of the file in bytes. | -| Update Time | `update-time` | string | Update time of the file in ISO 8601 format. | +| Chunk UID | `chunk-uid` | string | The unique identifier of the chunk. | +| Similarity | `similarity-score` | number | The similarity score of the chunk. | +| Source File Name | `source-file-name` | string | The name of the source file. | +| Text Content | `text-content` | string | The text content of the chunk. |
-### Upload Files +### Get Chunks Metadata -Upload and process the files into chunks into Catalog. +get the metadata of the chunks from a file in the catalog.
| Input | Field ID | Format | Description | | :--- | :--- | :--- | :--- | -| Task ID (required) | `task` | string | `TASK_UPLOAD_FILES` | -| [Options](#upload-files-options) (required) | `options` | object | Choose to upload the files to existing catalog or create a new catalog. | +| Task ID (required) | `task` | string | `TASK_GET_CHUNKS_METADATA` | +| Catalog ID (required) | `catalog-id` | string | Catalog ID that you input to search files in the Catalog. | +| Namespace (required) | `namespace` | string | Fill in your namespace, you can get namespace through the tab of switching namespace. | +| File UID (required) | `file-uid` | string | The unique identifier of the file. |
-
-The options Object -

Options

-`options` must fulfill one of the following schemas: +
-
Existing Catalog
+| Output | Field ID | Format | Description | +| :--- | :--- | :--- | :--- | +| [Chunks](#get-chunks-metadata-chunks) | `chunks` | array[object] | Chunks metadata of the file in catalog. | +
+ +
+ Output Objects in Get Chunks Metadata + +

Chunks

| Field | Field ID | Format | Note | | :--- | :--- | :--- | :--- | -| Catalog ID | `catalog-id` | string | Catalog ID that you input in the Catalog. | -| File Names | `file-names` | array | Name of the file, including the extension (e.g. `example.pdf`). The length of this field is limited to 100 characters. | -| Files | `files` | array | Base64 encoded PDF/DOCX/DOC/PPTX/PPT/HTML files to be uploaded into catalog. | -| Namespace | `namespace` | string | Fill in your namespace, you can get namespace through the tab of switching namespace. | -| Option | `option` | string | Must be `"existing catalog"` | +| Chunk UID | `chunk-uid` | string | The unique identifier of the chunk. | +| Create Time | `create-time` | string | The creation time of the chunk in ISO 8601 format. | +| End Position | `end-position` | integer | The end position of the chunk in the file. | +| File UID | `original-file-uid` | string | The unique identifier of the file. | +| Retrievable | `retrievable` | boolean | The retrievable status of the chunk. | +| Start Position | `start-position` | integer | The start position of the chunk in the file. | +| Token Count | `token-count` | integer | The token count of the chunk. |
+
-
Create New Catalog
+ +### Get Files Metadata + +get the metadata of the files in the catalog.
-| Field | Field ID | Format | Note | +| Input | Field ID | Format | Description | | :--- | :--- | :--- | :--- | -| Catalog ID | `catalog-id` | string | Catalog ID for new catalog you want to create. | -| Description | `description` | string | Description of the catalog. | -| File Names | `file-names` | array | Name of the file, including the extension (e.g. `example.pdf`). The length of this field is limited to 100 characters. | -| Files | `files` | array | Base64 encoded PDF/DOCX/DOC/PPTX/PPT/HTML files to be uploaded into catalog. | -| Namespace | `namespace` | string | Fill in your namespace, you can get namespace through the tab of switching namespace. | -| Option | `option` | string | Must be `"create new catalog"` | -| Tags | `tags` | array | Tags for the catalog. | +| Task ID (required) | `task` | string | `TASK_GET_FILES_METADATA` | +| Namespace (required) | `namespace` | string | Fill in your namespace, you can get namespace through the tab of switching namespace. | +| Catalog ID (required) | `catalog-id` | string | Catalog ID that you input to search files in the Catalog. |
-
+ + + + +
| Output | Field ID | Format | Description | | :--- | :--- | :--- | :--- | -| [Files](#upload-files-files) | `files` | array[object] | Files metadata in catalog. | -| Status | `status` | boolean | The status of trigger file processing, if ALL succeeded, return true. | +| [Files](#get-files-metadata-files) | `files` | array[object] | Files metadata in catalog. |
- Output Objects in Upload Files + Output Objects in Get Files Metadata -

Files

+

Files

@@ -198,17 +177,18 @@ Upload and process the files into chunks into Catalog.
-### Get Files Metadata +### Get File in Markdown -get the metadata of the files in the catalog. +get the file content in markdown format.
| Input | Field ID | Format | Description | | :--- | :--- | :--- | :--- | -| Task ID (required) | `task` | string | `TASK_GET_FILES_METADATA` | -| Namespace (required) | `namespace` | string | Fill in your namespace, you can get namespace through the tab of switching namespace. | +| Task ID (required) | `task` | string | `TASK_GET_FILE_IN_MARKDOWN` | | Catalog ID (required) | `catalog-id` | string | Catalog ID that you input to search files in the Catalog. | +| Namespace (required) | `namespace` | string | Fill in your namespace, you can get namespace through the tab of switching namespace. | +| File UID (required) | `file-uid` | string | The unique identifier of the file. |
@@ -220,41 +200,53 @@ get the metadata of the files in the catalog. | Output | Field ID | Format | Description | | :--- | :--- | :--- | :--- | -| [Files](#get-files-metadata-files) | `files` | array[object] | Files metadata in catalog. | +| File UID | `original-file-uid` | string | The unique identifier of the file. | +| Content | `content` | string | The content of the file in markdown format. | +| Create Time | `create-time` | string | The creation time of the source file in ISO 8601 format. | +| Update Time | `update-time` | string | The update time of the source file in ISO 8601 format. | -
- Output Objects in Get Files Metadata -

Files

+### Match File Status + +Check if the specified file's processing status is done.
-| Field | Field ID | Format | Note | +| Input | Field ID | Format | Description | | :--- | :--- | :--- | :--- | -| Catalog ID | `catalog-id` | string | ID of the catalog that you upload files. | -| Create Time | `create-time` | string | Creation time of the file in ISO 8601 format. | -| File Name | `file-name` | string | Name of the file. | -| Type | `file-type` | string | Type of the file. | -| File UID | `file-uid` | string | Unique identifier of the file. | -| Size | `size` | number | Size of the file in bytes. | -| Update Time | `update-time` | string | Update time of the file in ISO 8601 format. | +| Task ID (required) | `task` | string | `TASK_MATCH_FILE_STATUS` | +| Catalog ID (required) | `catalog-id` | string | Catalog ID that you input to check files' processing status in the Catalog. | +| Namespace (required) | `namespace` | string | Fill in your namespace, you can get namespace through the tab of switching namespace. | +| File UID (required) | `file-uid` | string | The unique identifier of the file. |
-
-### Get Chunks Metadata -get the metadata of the chunks from a file in the catalog. + + + +
+ +| Output | Field ID | Format | Description | +| :--- | :--- | :--- | :--- | +| Status | `succeeded` | boolean | The status of the file processing, if succeeded, return true. | +
+ + +### Retrieve + +search the chunks in the catalog.
| Input | Field ID | Format | Description | | :--- | :--- | :--- | :--- | -| Task ID (required) | `task` | string | `TASK_GET_CHUNKS_METADATA` | +| Task ID (required) | `task` | string | `TASK_RETRIEVE` | | Catalog ID (required) | `catalog-id` | string | Catalog ID that you input to search files in the Catalog. | | Namespace (required) | `namespace` | string | Fill in your namespace, you can get namespace through the tab of switching namespace. | -| File UID (required) | `file-uid` | string | The unique identifier of the file. | +| Text Prompt (required) | `text-prompt` | string | The prompt string to search the chunks. | +| Top K | `top-k` | integer | The number of top chunks to return. The range is from 1~20, and default is 5. |
@@ -266,45 +258,65 @@ get the metadata of the chunks from a file in the catalog. | Output | Field ID | Format | Description | | :--- | :--- | :--- | :--- | -| [Chunks](#get-chunks-metadata-chunks) | `chunks` | array[object] | Chunks metadata of the file in catalog. | +| [Chunks](#retrieve-chunks) | `chunks` | array[object] | Chunks data from smart search. |
- Output Objects in Get Chunks Metadata + Output Objects in Retrieve -

Chunks

+

Chunks

| Field | Field ID | Format | Note | | :--- | :--- | :--- | :--- | | Chunk UID | `chunk-uid` | string | The unique identifier of the chunk. | -| Create Time | `create-time` | string | The creation time of the chunk in ISO 8601 format. | -| End Position | `end-position` | integer | The end position of the chunk in the file. | -| File UID | `original-file-uid` | string | The unique identifier of the file. | -| Retrievable | `retrievable` | boolean | The retrievable status of the chunk. | -| Start Position | `start-position` | integer | The start position of the chunk in the file. | -| Token Count | `token-count` | integer | The token count of the chunk. | +| Similarity | `similarity-score` | number | The similarity score of the chunk. | +| Source File Name | `source-file-name` | string | The name of the source file. | +| Text Content | `text-content` | string | The text content of the chunk. |
-### Get File in Markdown +### Sync Files -get the file content in markdown format. +This task synchronizes files from third-party storage to Instill Catalog. New files are uploaded, and updated files are overwritten based on third-party metadata. Files added through other channels, like the Artifact API or additional storage services, will not be removed. Currently, only Google Drive is supported as a third-party storage service.
| Input | Field ID | Format | Description | | :--- | :--- | :--- | :--- | -| Task ID (required) | `task` | string | `TASK_GET_FILE_IN_MARKDOWN` | -| Catalog ID (required) | `catalog-id` | string | Catalog ID that you input to search files in the Catalog. | +| Task ID (required) | `task` | string | `TASK_SYNC_FILES` | | Namespace (required) | `namespace` | string | Fill in your namespace, you can get namespace through the tab of switching namespace. | -| File UID (required) | `file-uid` | string | The unique identifier of the file. | +| Catalog ID (required) | `catalog-id` | string | Catalog ID that you input to synchronize files from third-party data storage to catalog. | +| [Third Party Files](#sync-files-third-party-files) (required) | `third-party-files` | array[object] | File contents and metadata from third-part data storage. |
+
+ Input Objects in Sync Files +

Third Party Files

+ +File contents and metadata from third-part data storage. + +
+ +| Field | Field ID | Format | Note | +| :--- | :--- | :--- | :--- | +| Content | `content` | string | Base64 encoded content of the binary file without the `data:[MIME_TYPE];base64,` prefix. | +| Created time | `created-time` | string | Time when the file was created. Format: `YYYY-MM-DDTHH:MM:SSZ`. | +| ID | `id` | string | Unique ID of the file from third-party data storage. | +| MD5 checksum | `md5-checksum` | string | MD5 checksum of the file. This reflects every change made to the file on the server, even those not visible to the user. | +| MIME type | `mime-type` | string | MIME type of the file. | +| Modified time | `modified-time` | string | Time when the file was last modified. Format: `YYYY-MM-DDTHH:MM:SSZ`. It will be used to check if the file has been updated. | +| Name | `name` | string | Name of the file from third-party data storage. | +| Size | `size` | integer | Size of the file in bytes. | +| Version | `version` | integer | Version of the file. | +| Web Content Link | `web-content-link` | string | Link for downloading the content of the file in a browser. | +| Web View Link | `web-view-link` | string | Link for opening the file in a relevant third-party data storage editor or viewer in a browser. It will be used to check the source of the file. | +
+
@@ -312,125 +324,221 @@ get the file content in markdown format. | Output | Field ID | Format | Description | | :--- | :--- | :--- | :--- | -| File UID | `original-file-uid` | string | The unique identifier of the file. | -| Content | `content` | string | The content of the file in markdown format. | -| Create Time | `create-time` | string | The creation time of the source file in ISO 8601 format. | -| Update Time | `update-time` | string | The update time of the source file in ISO 8601 format. | +| [Uploaded Files](#sync-files-uploaded-files) (optional) | `uploaded-files` | array[object] | Files metadata in catalog. The metadata here is from Instill Artifact rather than third-party storage. | +| [Updated Files](#sync-files-updated-files) (optional) | `updated_files` | array[object] | Files that were updated. The metadata here is from Instill Artifact rather than third-party storage. | +| [Failure Files](#sync-files-failure-files) (optional) | `failure-files` | array[object] | Files that failed to upload or overwrite. The metadata here is from third-party storage. | +| Error Messages (optional) | `error-messages` | array[string] | Error messages for files that failed to upload or overwrite. | +| Status (optional) | `status` | boolean | The status of the triggering processing files, if succeeded, return true. | +
+ Output Objects in Sync Files -### Match File Status - -Check if the specified file's processing status is done. +

Uploaded Files

-| Input | Field ID | Format | Description | +| Field | Field ID | Format | Note | | :--- | :--- | :--- | :--- | -| Task ID (required) | `task` | string | `TASK_MATCH_FILE_STATUS` | -| Catalog ID (required) | `catalog-id` | string | Catalog ID that you input to check files' processing status in the Catalog. | -| Namespace (required) | `namespace` | string | Fill in your namespace, you can get namespace through the tab of switching namespace. | -| File UID (required) | `file-uid` | string | The unique identifier of the file. | +| Catalog ID | `catalog-id` | string | ID of the catalog that you upload files. | +| Create Time | `create-time` | string | Creation time of the file in ISO 8601 format. | +| File Name | `file-name` | string | Name of the file. | +| Type | `file-type` | string | Type of the file. | +| File UID | `file-uid` | string | Unique identifier of the file. | +| Size | `size` | number | Size of the file in bytes. | +| Update Time | `update-time` | string | Update time of the file in ISO 8601 format. |
+

Updated Files

+
+| Field | Field ID | Format | Note | +| :--- | :--- | :--- | :--- | +| Catalog ID | `catalog-id` | string | ID of the catalog that you upload files. | +| Create Time | `create-time` | string | Creation time of the file in ISO 8601 format. | +| File Name | `file-name` | string | Name of the file. | +| Type | `file-type` | string | Type of the file. | +| File UID | `file-uid` | string | Unique identifier of the file. | +| Size | `size` | number | Size of the file in bytes. | +| Update Time | `update-time` | string | Update time of the file in ISO 8601 format. | +
- +

Failure Files

-| Output | Field ID | Format | Description | +| Field | Field ID | Format | Note | | :--- | :--- | :--- | :--- | -| Status | `succeeded` | boolean | The status of the file processing, if succeeded, return true. | +| Content | `content` | string | Base64 encoded content of the binary file without the `data:[MIME_TYPE];base64,` prefix. | +| Created time | `created-time` | string | Time when the file was created. Format: `YYYY-MM-DDTHH:MM:SSZ`. | +| ID | `id` | string | Unique ID of the file from third-party data storage. | +| MD5 checksum | `md5-checksum` | string | MD5 checksum of the file. This reflects every change made to the file on the server, even those not visible to the user. | +| MIME type | `mime-type` | string | MIME type of the file. | +| Modified time | `modified-time` | string | Time when the file was last modified. Format: `YYYY-MM-DDTHH:MM:SSZ`. It will be used to check if the file has been updated. | +| Name | `name` | string | Name of the file from third-party data storage. | +| Size | `size` | integer | Size of the file in bytes. | +| Version | `version` | integer | Version of the file. | +| Web Content Link | `web-content-link` | string | Link for downloading the content of the file in a browser. | +| Web View Link | `web-view-link` | string | Link for opening the file in a relevant third-party data storage editor or viewer in a browser. It will be used to check the source of the file. |
+
-### Retrieve +### Upload File -search the chunks in the catalog. +Upload and process the files into chunks into Catalog.
| Input | Field ID | Format | Description | | :--- | :--- | :--- | :--- | -| Task ID (required) | `task` | string | `TASK_RETRIEVE` | -| Catalog ID (required) | `catalog-id` | string | Catalog ID that you input to search files in the Catalog. | -| Namespace (required) | `namespace` | string | Fill in your namespace, you can get namespace through the tab of switching namespace. | -| Text Prompt (required) | `text-prompt` | string | The prompt string to search the chunks. | -| Top K | `top-k` | integer | The number of top chunks to return. The range is from 1~20, and default is 5. | +| Task ID (required) | `task` | string | `TASK_UPLOAD_FILE` | +| [Options](#upload-file-options) (required) | `options` | object | Choose to upload the files to existing catalog or create a new catalog. |
+
+The options Object + +

Options

+ +`options` must fulfill one of the following schemas: + +
Existing Catalog
+ +
+ +| Field | Field ID | Format | Note | +| :--- | :--- | :--- | :--- | +| Catalog ID | `catalog-id` | string | Catalog ID that you input in the Catalog. | +| File | `file` | string | Base64 encoded PDF/DOCX/DOC/PPTX/PPT/HTML file to be uploaded into catalog. | +| File Name | `file-name` | string | Name of the file, including the extension (e.g. `example.pdf`). The length of this field is limited to 100 characters. | +| Namespace | `namespace` | string | Fill in your namespace, you can get namespace through the tab of switching namespace. | +| Option | `option` | string | Must be `"existing catalog"` | +
+ +
Create New Catalog
+ +
+| Field | Field ID | Format | Note | +| :--- | :--- | :--- | :--- | +| Catalog ID | `catalog-id` | string | Catalog ID for new catalog you want to create. | +| Description | `description` | string | Description of the catalog. | +| File | `file` | string | Base64 encoded PDF/DOCX/DOC/PPTX/PPT/HTML file to be uploaded into catalog. | +| File Name | `file-name` | string | Name of the file, including the extension (e.g. `example.pdf`). The length of this field is limited to 100 characters. | +| Namespace | `namespace` | string | Fill in your namespace, you can get namespace through the tab of switching namespace. | +| Option | `option` | string | Must be `"create new catalog"` | +| Tags | `tags` | array | Tags for the catalog. | +
+
| Output | Field ID | Format | Description | | :--- | :--- | :--- | :--- | -| [Chunks](#retrieve-chunks) | `chunks` | array[object] | Chunks data from smart search. | +| [File](#upload-file-file) | `file` | object | Result of uploading file into catalog. | +| Status | `status` | boolean | The status of trigger file processing, if succeeded, return true. |
- Output Objects in Retrieve + Output Objects in Upload File -

Chunks

+

File

| Field | Field ID | Format | Note | | :--- | :--- | :--- | :--- | -| Chunk UID | `chunk-uid` | string | The unique identifier of the chunk. | -| Similarity | `similarity-score` | number | The similarity score of the chunk. | -| Source File Name | `source-file-name` | string | The name of the source file. | -| Text Content | `text-content` | string | The text content of the chunk. | +| Catalog ID | `catalog-id` | string | ID of the catalog that you upload files. | +| Create Time | `create-time` | string | Creation time of the file in ISO 8601 format. | +| File Name | `file-name` | string | Name of the file. | +| Type | `file-type` | string | Type of the file. | +| File UID | `file-uid` | string | Unique identifier of the file. | +| Size | `size` | number | Size of the file in bytes. | +| Update Time | `update-time` | string | Update time of the file in ISO 8601 format. |
-### Ask +### Upload Files -Reply the questions based on the files in the catalog. +Upload and process the files into chunks into Catalog.
| Input | Field ID | Format | Description | | :--- | :--- | :--- | :--- | -| Task ID (required) | `task` | string | `TASK_ASK` | -| Catalog ID (required) | `catalog-id` | string | Catalog ID that you input to search files in the Catalog. | -| Namespace (required) | `namespace` | string | Fill in your namespace, you can get namespace through the tab of switching namespace. | -| Question (required) | `question` | string | The question to reply. | -| Top K | `top-k` | integer | The number of top answers to return. The range is from 1~20, and default is 5. | +| Task ID (required) | `task` | string | `TASK_UPLOAD_FILES` | +| [Options](#upload-files-options) (required) | `options` | object | Choose to upload the files to existing catalog or create a new catalog. |
+
+The options Object + +

Options

+`options` must fulfill one of the following schemas: + +
Existing Catalog
+ +
+ +| Field | Field ID | Format | Note | +| :--- | :--- | :--- | :--- | +| Catalog ID | `catalog-id` | string | Catalog ID that you input in the Catalog. | +| File Names | `file-names` | array | Name of the file, including the extension (e.g. `example.pdf`). The length of this field is limited to 100 characters. | +| Files | `files` | array | Base64 encoded PDF/DOCX/DOC/PPTX/PPT/HTML files to be uploaded into catalog. | +| Namespace | `namespace` | string | Fill in your namespace, you can get namespace through the tab of switching namespace. | +| Option | `option` | string | Must be `"existing catalog"` | +
+ +
Create New Catalog
+ +
+ +| Field | Field ID | Format | Note | +| :--- | :--- | :--- | :--- | +| Catalog ID | `catalog-id` | string | Catalog ID for new catalog you want to create. | +| Description | `description` | string | Description of the catalog. | +| File Names | `file-names` | array | Name of the file, including the extension (e.g. `example.pdf`). The length of this field is limited to 100 characters. | +| Files | `files` | array | Base64 encoded PDF/DOCX/DOC/PPTX/PPT/HTML files to be uploaded into catalog. | +| Namespace | `namespace` | string | Fill in your namespace, you can get namespace through the tab of switching namespace. | +| Option | `option` | string | Must be `"create new catalog"` | +| Tags | `tags` | array | Tags for the catalog. | +
+
| Output | Field ID | Format | Description | | :--- | :--- | :--- | :--- | -| Answer | `answer` | string | Answers data from smart search. | -| [Chunks](#ask-chunks) (optional) | `chunks` | array[object] | Chunks data to answer question. | +| [Files](#upload-files-files) | `files` | array[object] | Files metadata in catalog. | +| Status | `status` | boolean | The status of trigger file processing, if ALL succeeded, return true. |
- Output Objects in Ask + Output Objects in Upload Files -

Chunks

+

Files

| Field | Field ID | Format | Note | | :--- | :--- | :--- | :--- | -| Chunk UID | `chunk-uid` | string | The unique identifier of the chunk. | -| Similarity | `similarity-score` | number | The similarity score of the chunk. | -| Source File Name | `source-file-name` | string | The name of the source file. | -| Text Content | `text-content` | string | The text content of the chunk. | +| Catalog ID | `catalog-id` | string | ID of the catalog that you upload files. | +| Create Time | `create-time` | string | Creation time of the file in ISO 8601 format. | +| File Name | `file-name` | string | Name of the file. | +| Type | `file-type` | string | Type of the file. | +| File UID | `file-uid` | string | Unique identifier of the file. | +| Size | `size` | number | Size of the file in bytes. | +| Update Time | `update-time` | string | Update time of the file in ISO 8601 format. |
diff --git a/pkg/component/data/instillartifact/v0/config/definition.yaml b/pkg/component/data/instillartifact/v0/config/definition.yaml index ced5d36da..aca7d3c16 100644 --- a/pkg/component/data/instillartifact/v0/config/definition.yaml +++ b/pkg/component/data/instillartifact/v0/config/definition.yaml @@ -1,12 +1,3 @@ -availableTasks: -- TASK_UPLOAD_FILE -- TASK_UPLOAD_FILES -- TASK_GET_FILES_METADATA -- TASK_GET_CHUNKS_METADATA -- TASK_GET_FILE_IN_MARKDOWN -- TASK_MATCH_FILE_STATUS -- TASK_RETRIEVE -- TASK_ASK documentationUrl: https://www.instill.tech/docs/component/data/instill-artifact icon: assets/instill-artifact.svg id: instill-artifact diff --git a/pkg/component/data/milvus/v0/README.mdx b/pkg/component/data/milvus/v0/README.mdx index fd05703d6..76b8294f5 100644 --- a/pkg/component/data/milvus/v0/README.mdx +++ b/pkg/component/data/milvus/v0/README.mdx @@ -7,16 +7,16 @@ description: "Learn about how to set up a VDP Milvus component https://github.co The Milvus component is a data component that allows users to build and search vector datasets. It can carry out the following tasks: -- [Vector Search](#vector-search) -- [Upsert](#upsert) - [Batch Upsert](#batch-upsert) -- [Delete](#delete) - [Create Collection](#create-collection) -- [Drop Collection](#drop-collection) -- [Create Partition](#create-partition) -- [Drop Partition](#drop-partition) - [Create Index](#create-index) +- [Create Partition](#create-partition) +- [Delete](#delete) +- [Drop Collection](#drop-collection) - [Drop Index](#drop-index) +- [Drop Partition](#drop-partition) +- [Upsert](#upsert) +- [Vector Search](#vector-search) @@ -59,25 +59,18 @@ ${connection.}`. ## Supported Tasks -### Vector Search +### Batch Upsert -Perform a vector search on a collection +Insert a batch of vector data into a collection
| Input | Field ID | Format | Description | | :--- | :--- | :--- | :--- | -| Task ID (required) | `task` | string | `TASK_VECTOR_SEARCH` | -| Collection Name (required) | `collection-name` | string | The name of the collection to perform vector search on. | -| Partition Name | `partition-name` | string | The name of the partition to vector search the data from. | -| Vector (required) | `vector` | array[number] | An array of dimensions for the vector search. | -| Vector Field (required) | `vector-field` | string | The name of the field to perform vector search on. | -| Fields | `fields` | array[string] | The fields to return in the data. If empty then all fields will be returned. | -| Limit (required) | `limit` | integer | The limit of the data to return. | -| Filter | `filter` | string | The properties filter to be applied to the data with milvus scalar filter, please refer to [filter-search](https://milvus.io/docs/single-vector-search.md#Filtered-search). | -| Offset | `offset` | integer | The offset of the data to return. | -| Grouping Field | `grouping-field` | string | The name of the field to group the data by, please refer to [Grouping-search](https://milvus.io/docs/single-vector-search.md#Grouping-search). | -| Search Parameters | `search-params` | object | The search parameters to be applied to the data with milvus search parameters, please refer to [Search-parameters](https://milvus.io/docs/single-vector-search.md#Search-parameters). | +| Task ID (required) | `task` | string | `TASK_BATCH_UPSERT` | +| Collection Name (required) | `collection-name` | string | The name of the collection to upsert the data into. | +| Partition Name | `partition-name` | string | The name of the partition to upsert the data from. If empty then default partition will be used. | +| [Array Data](#batch-upsert-array-data) (required) | `array-data` | array[object] | The data. |
@@ -89,39 +82,27 @@ Perform a vector search on a collection | Output | Field ID | Format | Description | | :--- | :--- | :--- | :--- | -| [Result](#vector-search-result) | `result` | object | Result of the vector search operation. | -| Status | `status` | string | Vector search status. | - - -
- Output Objects in Vector Search - -

Result

- -
- -| Field | Field ID | Format | Note | -| :--- | :--- | :--- | :--- | -| [Data](#vector-search-data) | `data` | array | The points returned from the vector search operation. | -| IDs | `ids` | array | The ids returned from the vector search operation. | -| [Metadata](#vector-search-metadata) | `metadata` | array | The metadata returned from the vector search operation. | -| Vectors | `vectors` | array | The vectors returned from the vector search operation. | +| Status | `status` | string | Batch upsert status. |
-
-### Upsert +### Create Collection -Insert a vector data into a collection +Create a collectio, please refer to [Create-Collection](https://milvus.io/docs/manage-collections.md#Create-Collection)
| Input | Field ID | Format | Description | | :--- | :--- | :--- | :--- | -| Task ID (required) | `task` | string | `TASK_UPSERT` | -| Collection Name (required) | `collection-name` | string | The name of the collection to upsert the data into. | -| Partition Name | `partition-name` | string | The name of the partition to upsert the data from. If empty then default partition will be used. | -| Data (required) | `data` | object | The data. | +| Task ID (required) | `task` | string | `TASK_CREATE_COLLECTION` | +| Collection Name (required) | `collection-name` | string | The name of the collection to create. | +| Dimension (required) | `dimension` | integer | The dimension of the collection. | +| ID Type | `id-type` | string | The type of the id. | +| Schema | `schema` | object | The schema of the collection. | +| Auto ID | `auto-id` | boolean | Whether to auto generate id. | +| Metric Type | `metric-type` | string | The metric type of the collection.
Enum values
  • `L2`
  • `IP`
  • `COSINE`
| +| [Index Parameters](#create-collection-index-parameters) | `index-params` | array[object] | The index parameters to be applied to the collection with milvus index parameters, please refer to [Create](https://milvus.io/api-reference/restful/v2.4.x/v2/Collection%20(v2)/Create.md). | +| Parameters | `params` | object | The parameters to be applied to the collection with milvus parameters, please refer to [Parameters](https://milvus.io/docs/single-vector-search.md#Parameters). |
@@ -133,22 +114,21 @@ Insert a vector data into a collection | Output | Field ID | Format | Description | | :--- | :--- | :--- | :--- | -| Status | `status` | string | Upsert status. | +| Status | `status` | string | Create collection status. | -### Batch Upsert +### Create Index -Insert a batch of vector data into a collection +Create an index in a collection
| Input | Field ID | Format | Description | | :--- | :--- | :--- | :--- | -| Task ID (required) | `task` | string | `TASK_BATCH_UPSERT` | -| Collection Name (required) | `collection-name` | string | The name of the collection to upsert the data into. | -| Partition Name | `partition-name` | string | The name of the partition to upsert the data from. If empty then default partition will be used. | -| [Array Data](#batch-upsert-array-data) (required) | `array-data` | array[object] | The data. | +| Task ID (required) | `task` | string | `TASK_CREATE_INDEX` | +| Collection Name (required) | `collection-name` | string | The name of the collection to create the index in. | +| Index Parameters (required) | `index-params` | object | The index parameters to be applied to the collection with milvus index parameters, please refer to [Create](https://milvus.io/api-reference/restful/v2.4.x/v2/Index%20(v2)/Create.md). |
@@ -160,22 +140,21 @@ Insert a batch of vector data into a collection | Output | Field ID | Format | Description | | :--- | :--- | :--- | :--- | -| Status | `status` | string | Batch upsert status. | +| Status | `status` | string | Create index status. | -### Delete +### Create Partition -Delete vector data from a collection +Create a partition in a collection
| Input | Field ID | Format | Description | | :--- | :--- | :--- | :--- | -| Task ID (required) | `task` | string | `TASK_DELETE` | -| Collection Name (required) | `collection-name` | string | The name of the collection to delete the data from. | -| Partition Name | `partition-name` | string | The name of the partition to delete the data from. If empty then default partition will be used. | -| Filter | `filter` | string | The properties filter to be applied to the data with milvus scalar filter, please refer to [Filtered-search](https://milvus.io/docs/single-vector-search.md#Filtered-search). | +| Task ID (required) | `task` | string | `TASK_CREATE_PARTITION` | +| Collection Name (required) | `collection-name` | string | The name of the collection to create the partition in. | +| Partition Name (required) | `partition-name` | string | The name of the partition to create. |
@@ -187,27 +166,22 @@ Delete vector data from a collection | Output | Field ID | Format | Description | | :--- | :--- | :--- | :--- | -| Status | `status` | string | Delete status. | +| Status | `status` | string | Create partition status. | -### Create Collection +### Delete -Create a collectio, please refer to [Create-Collection](https://milvus.io/docs/manage-collections.md#Create-Collection) +Delete vector data from a collection
| Input | Field ID | Format | Description | | :--- | :--- | :--- | :--- | -| Task ID (required) | `task` | string | `TASK_CREATE_COLLECTION` | -| Collection Name (required) | `collection-name` | string | The name of the collection to create. | -| Dimension (required) | `dimension` | integer | The dimension of the collection. | -| ID Type | `id-type` | string | The type of the id. | -| Schema | `schema` | object | The schema of the collection. | -| Auto ID | `auto-id` | boolean | Whether to auto generate id. | -| Metric Type | `metric-type` | string | The metric type of the collection.
Enum values
  • `L2`
  • `IP`
  • `COSINE`
| -| [Index Parameters](#create-collection-index-parameters) | `index-params` | array[object] | The index parameters to be applied to the collection with milvus index parameters, please refer to [Create](https://milvus.io/api-reference/restful/v2.4.x/v2/Collection%20(v2)/Create.md). | -| Parameters | `params` | object | The parameters to be applied to the collection with milvus parameters, please refer to [Parameters](https://milvus.io/docs/single-vector-search.md#Parameters). | +| Task ID (required) | `task` | string | `TASK_DELETE` | +| Collection Name (required) | `collection-name` | string | The name of the collection to delete the data from. | +| Partition Name | `partition-name` | string | The name of the partition to delete the data from. If empty then default partition will be used. | +| Filter | `filter` | string | The properties filter to be applied to the data with milvus scalar filter, please refer to [Filtered-search](https://milvus.io/docs/single-vector-search.md#Filtered-search). |
@@ -219,7 +193,7 @@ Create a collectio, please refer to [Create-Collection](https://milvus.io/docs/m | Output | Field ID | Format | Description | | :--- | :--- | :--- | :--- | -| Status | `status` | string | Create collection status. | +| Status | `status` | string | Delete status. | @@ -248,17 +222,17 @@ Drop a collection -### Create Partition +### Drop Index -Create a partition in a collection +Drop an index from a collection
| Input | Field ID | Format | Description | | :--- | :--- | :--- | :--- | -| Task ID (required) | `task` | string | `TASK_CREATE_PARTITION` | -| Collection Name (required) | `collection-name` | string | The name of the collection to create the partition in. | -| Partition Name (required) | `partition-name` | string | The name of the partition to create. | +| Task ID (required) | `task` | string | `TASK_DROP_INDEX` | +| Collection Name (required) | `collection-name` | string | The name of the collection to drop the index from. | +| Index Name (required) | `index-name` | string | The name of the index to drop. |
@@ -270,7 +244,7 @@ Create a partition in a collection | Output | Field ID | Format | Description | | :--- | :--- | :--- | :--- | -| Status | `status` | string | Create partition status. | +| Status | `status` | string | Drop index status. | @@ -300,17 +274,18 @@ Drop a partition from a collection -### Create Index +### Upsert -Create an index in a collection +Insert a vector data into a collection
| Input | Field ID | Format | Description | | :--- | :--- | :--- | :--- | -| Task ID (required) | `task` | string | `TASK_CREATE_INDEX` | -| Collection Name (required) | `collection-name` | string | The name of the collection to create the index in. | -| Index Parameters (required) | `index-params` | object | The index parameters to be applied to the collection with milvus index parameters, please refer to [Create](https://milvus.io/api-reference/restful/v2.4.x/v2/Index%20(v2)/Create.md). | +| Task ID (required) | `task` | string | `TASK_UPSERT` | +| Collection Name (required) | `collection-name` | string | The name of the collection to upsert the data into. | +| Partition Name | `partition-name` | string | The name of the partition to upsert the data from. If empty then default partition will be used. | +| Data (required) | `data` | object | The data. |
@@ -322,21 +297,29 @@ Create an index in a collection | Output | Field ID | Format | Description | | :--- | :--- | :--- | :--- | -| Status | `status` | string | Create index status. | +| Status | `status` | string | Upsert status. | -### Drop Index +### Vector Search -Drop an index from a collection +Perform a vector search on a collection
| Input | Field ID | Format | Description | | :--- | :--- | :--- | :--- | -| Task ID (required) | `task` | string | `TASK_DROP_INDEX` | -| Collection Name (required) | `collection-name` | string | The name of the collection to drop the index from. | -| Index Name (required) | `index-name` | string | The name of the index to drop. | +| Task ID (required) | `task` | string | `TASK_VECTOR_SEARCH` | +| Collection Name (required) | `collection-name` | string | The name of the collection to perform vector search on. | +| Partition Name | `partition-name` | string | The name of the partition to vector search the data from. | +| Vector (required) | `vector` | array[number] | An array of dimensions for the vector search. | +| Vector Field (required) | `vector-field` | string | The name of the field to perform vector search on. | +| Fields | `fields` | array[string] | The fields to return in the data. If empty then all fields will be returned. | +| Limit (required) | `limit` | integer | The limit of the data to return. | +| Filter | `filter` | string | The properties filter to be applied to the data with milvus scalar filter, please refer to [filter-search](https://milvus.io/docs/single-vector-search.md#Filtered-search). | +| Offset | `offset` | integer | The offset of the data to return. | +| Grouping Field | `grouping-field` | string | The name of the field to group the data by, please refer to [Grouping-search](https://milvus.io/docs/single-vector-search.md#Grouping-search). | +| Search Parameters | `search-params` | object | The search parameters to be applied to the data with milvus search parameters, please refer to [Search-parameters](https://milvus.io/docs/single-vector-search.md#Search-parameters). |
@@ -348,8 +331,25 @@ Drop an index from a collection | Output | Field ID | Format | Description | | :--- | :--- | :--- | :--- | -| Status | `status` | string | Drop index status. | +| [Result](#vector-search-result) | `result` | object | Result of the vector search operation. | +| Status | `status` | string | Vector search status. | + + +
+ Output Objects in Vector Search + +

Result

+ +
+ +| Field | Field ID | Format | Note | +| :--- | :--- | :--- | :--- | +| [Data](#vector-search-data) | `data` | array | The points returned from the vector search operation. | +| IDs | `ids` | array | The ids returned from the vector search operation. | +| [Metadata](#vector-search-metadata) | `metadata` | array | The metadata returned from the vector search operation. | +| Vectors | `vectors` | array | The vectors returned from the vector search operation. |
+
diff --git a/pkg/component/data/milvus/v0/config/definition.yaml b/pkg/component/data/milvus/v0/config/definition.yaml index 542c172d5..85ef98a79 100644 --- a/pkg/component/data/milvus/v0/config/definition.yaml +++ b/pkg/component/data/milvus/v0/config/definition.yaml @@ -1,14 +1,3 @@ -availableTasks: -- TASK_VECTOR_SEARCH -- TASK_UPSERT -- TASK_BATCH_UPSERT -- TASK_DELETE -- TASK_CREATE_COLLECTION -- TASK_DROP_COLLECTION -- TASK_CREATE_PARTITION -- TASK_DROP_PARTITION -- TASK_CREATE_INDEX -- TASK_DROP_INDEX documentationUrl: https://www.instill.tech/docs/component/data/milvus icon: assets/milvus.svg id: milvus diff --git a/pkg/component/data/mongodb/v0/README.mdx b/pkg/component/data/mongodb/v0/README.mdx index 81239ec8d..131c4a7c0 100644 --- a/pkg/component/data/mongodb/v0/README.mdx +++ b/pkg/component/data/mongodb/v0/README.mdx @@ -7,15 +7,15 @@ description: "Learn about how to set up a VDP MongoDB component https://github.c The MongoDB component is a data component that allows users to access the MongoDB NoSQL database. It can carry out the following tasks: -- [Insert](#insert) -- [Insert Many](#insert-many) -- [Find](#find) -- [Update](#update) +- [Create Search Index](#create-search-index) - [Delete](#delete) - [Drop Collection](#drop-collection) - [Drop Database](#drop-database) -- [Create Search Index](#create-search-index) - [Drop Search Index](#drop-search-index) +- [Find](#find) +- [Insert](#insert) +- [Insert Many](#insert-many) +- [Update](#update) - [Vector Search](#vector-search) @@ -57,19 +57,20 @@ ${connection.}`. ## Supported Tasks -### Insert +### Create Search Index -Perform an insert operation +Create a search index, only works for M10 or larger clusters
| Input | Field ID | Format | Description | | :--- | :--- | :--- | :--- | -| Task ID (required) | `task` | string | `TASK_INSERT` | +| Task ID (required) | `task` | string | `TASK_CREATE_SEARCH_INDEX` | | Database Name (required) | `database-name` | string | The name of the database in MongoDB. | | Collection Name (required) | `collection-name` | string | The name of the collection in MongoDB. | -| ID | `id` | string | The ID of the document. | -| Data (required) | `data` | object | The data to be inserted. | +| Index Name (required) | `index-name` | string | The name of the index to be created. | +| Index Type (required) | `index-type` | string | The type of the index to be created.
Enum values
  • `search`
  • `vectorSearch`
| +| Syntax (required) | `syntax` | object | The syntax structure of the search index, please refer to the MongoDB documentation for more information. search [here](https://www.mongodb.com/docs/atlas/atlas-search/create-index/). vectorSearch [here](https://www.mongodb.com/docs/atlas/atlas-vector-search/vector-search-type/). |
@@ -81,23 +82,23 @@ Perform an insert operation | Output | Field ID | Format | Description | | :--- | :--- | :--- | :--- | -| Status | `status` | string | Insert status. | +| Status | `status` | string | Create index status. | -### Insert Many +### Delete -Perform an insert many operation +Perform a delete operation
| Input | Field ID | Format | Description | | :--- | :--- | :--- | :--- | -| Task ID (required) | `task` | string | `TASK_INSERT_MANY` | +| Task ID (required) | `task` | string | `TASK_DELETE` | | Database Name (required) | `database-name` | string | The name of the database in MongoDB. | | Collection Name (required) | `collection-name` | string | The name of the collection in MongoDB. | -| Array ID | `array-id` | array[string] | The array of id. | -| [Data](#insert-many-data) (required) | `array-data` | array[object] | The array data to be inserted. | +| ID | `id` | string | The ID of the document. | +| Filter | `filter` | object | 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. |
@@ -109,25 +110,21 @@ Perform an insert many operation | Output | Field ID | Format | Description | | :--- | :--- | :--- | :--- | -| Status | `status` | string | Insert many status. | +| Status | `status` | string | Delete status. | -### Find +### Drop Collection -Perform a find operation +Delete the collection
| Input | Field ID | Format | Description | | :--- | :--- | :--- | :--- | -| Task ID (required) | `task` | string | `TASK_FIND` | +| Task ID (required) | `task` | string | `TASK_DROP_COLLECTION` | | Database Name (required) | `database-name` | string | The name of the database in MongoDB. | | Collection Name (required) | `collection-name` | string | The name of the collection in MongoDB. | -| ID | `id` | string | The ID of the document. | -| Filter | `filter` | object | 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. | -| Limit | `limit` | integer | The number of documents to return. If empty then all documents will be returned. | -| Fields | `fields` | array[string] | The fields to return in the documents. If empty then all fields will be returned. |
@@ -139,40 +136,20 @@ Perform a find operation | Output | Field ID | Format | Description | | :--- | :--- | :--- | :--- | -| [Result](#find-result) | `result` | object | Result of the find operation. | -| Status | `status` | string | Find status. | - - -
- Output Objects in Find - -

Result

- -
- -| Field | Field ID | Format | Note | -| :--- | :--- | :--- | :--- | -| [Metadata](#find-metadata) | `data` | array | The data returned from the find operation. | -| [Documents](#find-documents) | `documents` | array | The documents returned from the find operation. | -| IDs | `ids` | array | The ids returned from the find operation. | +| Status | `status` | string | Delete collection status. |
-
-### Update +### Drop Database -Perform an update operation +Delete the database
| Input | Field ID | Format | Description | | :--- | :--- | :--- | :--- | -| Task ID (required) | `task` | string | `TASK_UPDATE` | +| Task ID (required) | `task` | string | `TASK_DROP_DATABASE` | | Database Name (required) | `database-name` | string | The name of the database in MongoDB. | -| Collection Name (required) | `collection-name` | string | The name of the collection in MongoDB. | -| ID | `id` | string | The ID of the document. | -| Filter | `filter` | object | 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. | -| Update (required) | `update-data` | object | The updated data to be applied to the documents. |
@@ -184,23 +161,22 @@ Perform an update operation | Output | Field ID | Format | Description | | :--- | :--- | :--- | :--- | -| Status | `status` | string | Update status. | +| Status | `status` | string | Delete database status. | -### Delete +### Drop Search Index -Perform a delete operation +Drop a search index, only works for M10 or larger clusters
| Input | Field ID | Format | Description | | :--- | :--- | :--- | :--- | -| Task ID (required) | `task` | string | `TASK_DELETE` | +| Task ID (required) | `task` | string | `TASK_DROP_SEARCH_INDEX` | | Database Name (required) | `database-name` | string | The name of the database in MongoDB. | | Collection Name (required) | `collection-name` | string | The name of the collection in MongoDB. | -| ID | `id` | string | The ID of the document. | -| Filter | `filter` | object | 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. | +| Index Name (required) | `index-name` | string | The name of the index to be dropped. |
@@ -212,21 +188,25 @@ Perform a delete operation | Output | Field ID | Format | Description | | :--- | :--- | :--- | :--- | -| Status | `status` | string | Delete status. | +| Status | `status` | string | Delete index status. | -### Drop Collection +### Find -Delete the collection +Perform a find operation
| Input | Field ID | Format | Description | | :--- | :--- | :--- | :--- | -| Task ID (required) | `task` | string | `TASK_DROP_COLLECTION` | +| Task ID (required) | `task` | string | `TASK_FIND` | | Database Name (required) | `database-name` | string | The name of the database in MongoDB. | | Collection Name (required) | `collection-name` | string | The name of the collection in MongoDB. | +| ID | `id` | string | The ID of the document. | +| Filter | `filter` | object | 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. | +| Limit | `limit` | integer | The number of documents to return. If empty then all documents will be returned. | +| Fields | `fields` | array[string] | The fields to return in the documents. If empty then all fields will be returned. |
@@ -238,20 +218,39 @@ Delete the collection | Output | Field ID | Format | Description | | :--- | :--- | :--- | :--- | -| Status | `status` | string | Delete collection status. | +| [Result](#find-result) | `result` | object | Result of the find operation. | +| Status | `status` | string | Find status. | +
+ Output Objects in Find -### Drop Database +

Result

-Delete the database +
+ +| Field | Field ID | Format | Note | +| :--- | :--- | :--- | :--- | +| [Metadata](#find-metadata) | `data` | array | The data returned from the find operation. | +| [Documents](#find-documents) | `documents` | array | The documents returned from the find operation. | +| IDs | `ids` | array | The ids returned from the find operation. | +
+
+ + +### Insert + +Perform an insert operation
| Input | Field ID | Format | Description | | :--- | :--- | :--- | :--- | -| Task ID (required) | `task` | string | `TASK_DROP_DATABASE` | +| Task ID (required) | `task` | string | `TASK_INSERT` | | Database Name (required) | `database-name` | string | The name of the database in MongoDB. | +| Collection Name (required) | `collection-name` | string | The name of the collection in MongoDB. | +| ID | `id` | string | The ID of the document. | +| Data (required) | `data` | object | The data to be inserted. |
@@ -263,24 +262,23 @@ Delete the database | Output | Field ID | Format | Description | | :--- | :--- | :--- | :--- | -| Status | `status` | string | Delete database status. | +| Status | `status` | string | Insert status. | -### Create Search Index +### Insert Many -Create a search index, only works for M10 or larger clusters +Perform an insert many operation
| Input | Field ID | Format | Description | | :--- | :--- | :--- | :--- | -| Task ID (required) | `task` | string | `TASK_CREATE_SEARCH_INDEX` | +| Task ID (required) | `task` | string | `TASK_INSERT_MANY` | | Database Name (required) | `database-name` | string | The name of the database in MongoDB. | | Collection Name (required) | `collection-name` | string | The name of the collection in MongoDB. | -| Index Name (required) | `index-name` | string | The name of the index to be created. | -| Index Type (required) | `index-type` | string | The type of the index to be created.
Enum values
  • `search`
  • `vectorSearch`
| -| Syntax (required) | `syntax` | object | The syntax structure of the search index, please refer to the MongoDB documentation for more information. search [here](https://www.mongodb.com/docs/atlas/atlas-search/create-index/). vectorSearch [here](https://www.mongodb.com/docs/atlas/atlas-vector-search/vector-search-type/). | +| Array ID | `array-id` | array[string] | The array of id. | +| [Data](#insert-many-data) (required) | `array-data` | array[object] | The array data to be inserted. |
@@ -292,22 +290,24 @@ Create a search index, only works for M10 or larger clusters | Output | Field ID | Format | Description | | :--- | :--- | :--- | :--- | -| Status | `status` | string | Create index status. | +| Status | `status` | string | Insert many status. | -### Drop Search Index +### Update -Drop a search index, only works for M10 or larger clusters +Perform an update operation
| Input | Field ID | Format | Description | | :--- | :--- | :--- | :--- | -| Task ID (required) | `task` | string | `TASK_DROP_SEARCH_INDEX` | +| Task ID (required) | `task` | string | `TASK_UPDATE` | | Database Name (required) | `database-name` | string | The name of the database in MongoDB. | | Collection Name (required) | `collection-name` | string | The name of the collection in MongoDB. | -| Index Name (required) | `index-name` | string | The name of the index to be dropped. | +| ID | `id` | string | The ID of the document. | +| Filter | `filter` | object | 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. | +| Update (required) | `update-data` | object | The updated data to be applied to the documents. |
@@ -319,7 +319,7 @@ Drop a search index, only works for M10 or larger clusters | Output | Field ID | Format | Description | | :--- | :--- | :--- | :--- | -| Status | `status` | string | Delete index status. | +| Status | `status` | string | Update status. | diff --git a/pkg/component/data/mongodb/v0/config/definition.yaml b/pkg/component/data/mongodb/v0/config/definition.yaml index aefb72698..aa0855681 100644 --- a/pkg/component/data/mongodb/v0/config/definition.yaml +++ b/pkg/component/data/mongodb/v0/config/definition.yaml @@ -1,14 +1,3 @@ -availableTasks: -- TASK_INSERT -- TASK_INSERT_MANY -- TASK_FIND -- TASK_UPDATE -- TASK_DELETE -- TASK_DROP_COLLECTION -- TASK_DROP_DATABASE -- TASK_CREATE_SEARCH_INDEX -- TASK_DROP_SEARCH_INDEX -- TASK_VECTOR_SEARCH documentationUrl: https://www.instill.tech/docs/component/data/mongodb icon: assets/mongodb.svg id: mongodb diff --git a/pkg/component/data/pinecone/v0/README.mdx b/pkg/component/data/pinecone/v0/README.mdx index 0a4a2497b..a9dff21c3 100644 --- a/pkg/component/data/pinecone/v0/README.mdx +++ b/pkg/component/data/pinecone/v0/README.mdx @@ -7,10 +7,10 @@ description: "Learn about how to set up a VDP Pinecone component https://github. The Pinecone component is a data component that allows users to build and search vector datasets. It can carry out the following tasks: -- [Query](#query) -- [Upsert](#upsert) - [Batch Upsert](#batch-upsert) +- [Query](#query) - [Rerank](#rerank) +- [Upsert](#upsert) @@ -52,6 +52,47 @@ ${connection.}`. ## Supported Tasks +### Batch Upsert + +Writes vectors into a namespace. If a new value is upserted for an existing vector ID, it will overwrite the previous value. + +
+ +| Input | Field ID | Format | Description | +| :--- | :--- | :--- | :--- | +| Task ID (required) | `task` | string | `TASK_BATCH_UPSERT` | +| [Vectors](#batch-upsert-vectors) (required) | `vectors` | array[object] | Array of vectors to upsert | +| Namespace | `namespace` | string | The namespace to query. | +
+ + +
+ Input Objects in Batch Upsert + +

Vectors

+ +Array of vectors to upsert + +
+ +| Field | Field ID | Format | Note | +| :--- | :--- | :--- | :--- | +| ID | `id` | string | The unique ID of the vector. | +| Metadata | `metadata` | object | The vector metadata. This is a set of key-value pairs that can be used to store additional information about the vector. The values can have the following types: string, number, boolean, or array of strings. | +| Values | `values` | array | An array of dimensions for the vector to be saved. | +
+
+ + + +
+ +| Output | Field ID | Format | Description | +| :--- | :--- | :--- | :--- | +| Upserted Count | `upserted-count` | integer | Number of records modified or added. | +
+ + ### Query Retrieve the ids of the most similar items in a namespace, along with their similarity scores. @@ -101,19 +142,18 @@ Retrieve the ids of the most similar items in a namespace, along with their simi -### Upsert +### Rerank -Writes vectors into a namespace. If a new value is upserted for an existing vector id, it will overwrite the previous value. This task will be soon replaced by `TASK_BATCH_UPSERT`, which extends its functionality. +Rerank documents, such as text passages, according to their relevance to a query. The input is a list of documents and a query. The output is a list of documents, sorted by relevance to the query.
| Input | Field ID | Format | Description | | :--- | :--- | :--- | :--- | -| Task ID (required) | `task` | string | `TASK_UPSERT` | -| ID (required) | `id` | string | This is the vector's unique id. | -| Values (required) | `values` | array[number] | An array of dimensions for the vector to be saved. | -| Namespace | `namespace` | string | The namespace to query. | -| Metadata | `metadata` | object | The vector metadata. | +| Task ID (required) | `task` | string | `TASK_RERANK` | +| Query (required) | `query` | string | The query to rerank the documents. | +| Documents (required) | `documents` | array[string] | The documents to rerank. | +| Top N | `top-n` | integer | The number of results to return sorted by relevance. Defaults to the number of inputs. |
@@ -125,40 +165,28 @@ Writes vectors into a namespace. If a new value is upserted for an existing vect | Output | Field ID | Format | Description | | :--- | :--- | :--- | :--- | -| Upserted Count | `upserted-count` | integer | Number of records modified or added. | +| Reranked Documents. | `documents` | array[string] | Reranked documents. | +| Scores | `scores` | array[number] | The relevance score of the documents normalized between 0 and 1. | -### Batch Upsert +### Upsert -Writes vectors into a namespace. If a new value is upserted for an existing vector ID, it will overwrite the previous value. +Writes vectors into a namespace. If a new value is upserted for an existing vector id, it will overwrite the previous value. This task will be soon replaced by `TASK_BATCH_UPSERT`, which extends its functionality.
| Input | Field ID | Format | Description | | :--- | :--- | :--- | :--- | -| Task ID (required) | `task` | string | `TASK_BATCH_UPSERT` | -| [Vectors](#batch-upsert-vectors) (required) | `vectors` | array[object] | Array of vectors to upsert | +| Task ID (required) | `task` | string | `TASK_UPSERT` | +| ID (required) | `id` | string | This is the vector's unique id. | +| Values (required) | `values` | array[number] | An array of dimensions for the vector to be saved. | | Namespace | `namespace` | string | The namespace to query. | +| Metadata | `metadata` | object | The vector metadata. |
-
- Input Objects in Batch Upsert - -

Vectors

- -Array of vectors to upsert - -
-| Field | Field ID | Format | Note | -| :--- | :--- | :--- | :--- | -| ID | `id` | string | The unique ID of the vector. | -| Metadata | `metadata` | object | The vector metadata. This is a set of key-value pairs that can be used to store additional information about the vector. The values can have the following types: string, number, boolean, or array of strings. | -| Values | `values` | array | An array of dimensions for the vector to be saved. | -
-
@@ -170,32 +198,4 @@ Array of vectors to upsert -### Rerank - -Rerank documents, such as text passages, according to their relevance to a query. The input is a list of documents and a query. The output is a list of documents, sorted by relevance to the query. - -
- -| Input | Field ID | Format | Description | -| :--- | :--- | :--- | :--- | -| Task ID (required) | `task` | string | `TASK_RERANK` | -| Query (required) | `query` | string | The query to rerank the documents. | -| Documents (required) | `documents` | array[string] | The documents to rerank. | -| Top N | `top-n` | integer | The number of results to return sorted by relevance. Defaults to the number of inputs. | -
- - - - - - -
- -| Output | Field ID | Format | Description | -| :--- | :--- | :--- | :--- | -| Reranked Documents. | `documents` | array[string] | Reranked documents. | -| Scores | `scores` | array[number] | The relevance score of the documents normalized between 0 and 1. | -
- - diff --git a/pkg/component/data/pinecone/v0/config/definition.yaml b/pkg/component/data/pinecone/v0/config/definition.yaml index 862b507f7..524c9be7f 100644 --- a/pkg/component/data/pinecone/v0/config/definition.yaml +++ b/pkg/component/data/pinecone/v0/config/definition.yaml @@ -1,8 +1,3 @@ -availableTasks: -- TASK_QUERY -- TASK_UPSERT -- TASK_BATCH_UPSERT -- TASK_RERANK custom: false documentationUrl: https://www.instill.tech/docs/component/data/pinecone icon: assets/pinecone.svg diff --git a/pkg/component/data/qdrant/v0/README.mdx b/pkg/component/data/qdrant/v0/README.mdx index 512e5efce..7c3587e0e 100644 --- a/pkg/component/data/qdrant/v0/README.mdx +++ b/pkg/component/data/qdrant/v0/README.mdx @@ -7,12 +7,12 @@ description: "Learn about how to set up a VDP Qdrant component https://github.co The Qdrant component is a data component that allows users to build and search vector datasets. It can carry out the following tasks: -- [Vector Search](#vector-search) - [Batch Upsert](#batch-upsert) -- [Upsert](#upsert) -- [Delete](#delete) - [Create Collection](#create-collection) +- [Delete](#delete) - [Delete Collection](#delete-collection) +- [Upsert](#upsert) +- [Vector Search](#vector-search) @@ -54,22 +54,20 @@ ${connection.}`. ## Supported Tasks -### Vector Search +### Batch Upsert -Perform a vector search on a collection +Insert multiple vector points into a collection
| Input | Field ID | Format | Description | | :--- | :--- | :--- | :--- | -| Task ID (required) | `task` | string | `TASK_VECTOR_SEARCH` | -| Collection Name (required) | `collection-name` | string | The name of the collection to perform vector similarity search on. | -| Vector (required) | `vector` | array[number] | An array of dimensions for the vector query. | -| Limit (required) | `limit` | integer | The limit of points, empty for all points. | -| Payloads | `payloads` | array[string] | The payloads to return in the points. If empty then all payloads will be returned. | -| Filter | `filter` | object | The properties filter to be applied to the data with Qdrant filter, please refer to [filter section](https://api.qdrant.tech/api-reference/search/points). | -| Params | `params` | object | The additional parameters to be passed to the search, please refer to [params section](https://api.qdrant.tech/api-reference/search/points). | -| Min Score | `min-score` | number | The minimum score of the points to be returned. | +| Task ID (required) | `task` | string | `TASK_BATCH_UPSERT` | +| Collection Name (required) | `collection-name` | string | The name of the collection to upsert the point into. | +| Array ID (required) | `array-id` | array[string] | The array of id. | +| [Array Metadata](#batch-upsert-array-metadata) | `array-metadata` | array[object] | The array of vector metadata payload. | +| Array Vector (required) | `array-vector` | array[array] | The array of vector values. | +| Ordering | `ordering` | string | The ordering guarantees of the batch upsert.
Enum values
  • `weak`
  • `medium`
  • `strong`
|
@@ -81,41 +79,21 @@ Perform a vector search on a collection | Output | Field ID | Format | Description | | :--- | :--- | :--- | :--- | -| [Result](#vector-search-result) | `result` | object | Result of the vector search operation. | -| Status | `status` | string | Vector search status. | - - -
- Output Objects in Vector Search - -

Result

- -
- -| Field | Field ID | Format | Note | -| :--- | :--- | :--- | :--- | -| IDs | `ids` | array | The ids returned from the vector search operation. | -| [Metadata](#vector-search-metadata) | `metadata` | array | The metadata returned from the vector search operation. | -| [Points](#vector-search-points) | `points` | array | The points returned from the vector search operation. | -| Vectors | `vectors` | array | The vectors returned from the vector search operation. | +| Status | `status` | string | Batch upsert status. |
-
-### Batch Upsert +### Create Collection -Insert multiple vector points into a collection +Create a collection
| Input | Field ID | Format | Description | | :--- | :--- | :--- | :--- | -| Task ID (required) | `task` | string | `TASK_BATCH_UPSERT` | -| Collection Name (required) | `collection-name` | string | The name of the collection to upsert the point into. | -| Array ID (required) | `array-id` | array[string] | The array of id. | -| [Array Metadata](#batch-upsert-array-metadata) | `array-metadata` | array[object] | The array of vector metadata payload. | -| Array Vector (required) | `array-vector` | array[array] | The array of vector values. | -| Ordering | `ordering` | string | The ordering guarantees of the batch upsert.
Enum values
  • `weak`
  • `medium`
  • `strong`
| +| Task ID (required) | `task` | string | `TASK_CREATE_COLLECTION` | +| Collection Name (required) | `collection-name` | string | The name of the collection to create. | +| Config (required) | `config` | object | The configuration of the collection. Please refer to [here](https://api.qdrant.tech/api-reference/collections/create-collection). |
@@ -127,23 +105,22 @@ Insert multiple vector points into a collection | Output | Field ID | Format | Description | | :--- | :--- | :--- | :--- | -| Status | `status` | string | Batch upsert status. | +| Status | `status` | string | Create collection status. | -### Upsert +### Delete -Upsert a vector point into a collection +Delete vector points from a collection
| Input | Field ID | Format | Description | | :--- | :--- | :--- | :--- | -| Task ID (required) | `task` | string | `TASK_UPSERT` | -| Collection Name (required) | `collection-name` | string | The name of the collection to upsert the point into. | -| ID (required) | `id` | string | The ID of the point. | -| Metadata | `metadata` | object | The vector metadata payload. | -| Vector (required) | `vector` | array[number] | An array of dimensions for the vector value. | +| Task ID (required) | `task` | string | `TASK_DELETE` | +| Collection Name (required) | `collection-name` | string | The name of the collection to delete the object from. | +| ID | `id` | string | The ID of the point. | +| Filter | `filter` | object | The properties filter to be applied to the data with Qdrant filter, please refer to [filter section](https://api.qdrant.tech/api-reference/points/delete-points). | | Ordering | `ordering` | string | The ordering guarantees of the batch upsert.
Enum values
  • `weak`
  • `medium`
  • `strong`
|
@@ -156,23 +133,20 @@ Upsert a vector point into a collection | Output | Field ID | Format | Description | | :--- | :--- | :--- | :--- | -| Status | `status` | string | Upsert status. | +| Status | `status` | string | Delete status. | -### Delete +### Delete Collection -Delete vector points from a collection +Delete a collection
| Input | Field ID | Format | Description | | :--- | :--- | :--- | :--- | -| Task ID (required) | `task` | string | `TASK_DELETE` | -| Collection Name (required) | `collection-name` | string | The name of the collection to delete the object from. | -| ID | `id` | string | The ID of the point. | -| Filter | `filter` | object | The properties filter to be applied to the data with Qdrant filter, please refer to [filter section](https://api.qdrant.tech/api-reference/points/delete-points). | -| Ordering | `ordering` | string | The ordering guarantees of the batch upsert.
Enum values
  • `weak`
  • `medium`
  • `strong`
| +| Task ID (required) | `task` | string | `TASK_DELETE_COLLECTION` | +| Collection Name (required) | `collection-name` | string | The name of the collection to delete. |
@@ -184,21 +158,24 @@ Delete vector points from a collection | Output | Field ID | Format | Description | | :--- | :--- | :--- | :--- | -| Status | `status` | string | Delete status. | +| Status | `status` | string | Delete collection status. | -### Create Collection +### Upsert -Create a collection +Upsert a vector point into a collection
| Input | Field ID | Format | Description | | :--- | :--- | :--- | :--- | -| Task ID (required) | `task` | string | `TASK_CREATE_COLLECTION` | -| Collection Name (required) | `collection-name` | string | The name of the collection to create. | -| Config (required) | `config` | object | The configuration of the collection. Please refer to [here](https://api.qdrant.tech/api-reference/collections/create-collection). | +| Task ID (required) | `task` | string | `TASK_UPSERT` | +| Collection Name (required) | `collection-name` | string | The name of the collection to upsert the point into. | +| ID (required) | `id` | string | The ID of the point. | +| Metadata | `metadata` | object | The vector metadata payload. | +| Vector (required) | `vector` | array[number] | An array of dimensions for the vector value. | +| Ordering | `ordering` | string | The ordering guarantees of the batch upsert.
Enum values
  • `weak`
  • `medium`
  • `strong`
|
@@ -210,20 +187,26 @@ Create a collection | Output | Field ID | Format | Description | | :--- | :--- | :--- | :--- | -| Status | `status` | string | Create collection status. | +| Status | `status` | string | Upsert status. | -### Delete Collection +### Vector Search -Delete a collection +Perform a vector search on a collection
| Input | Field ID | Format | Description | | :--- | :--- | :--- | :--- | -| Task ID (required) | `task` | string | `TASK_DELETE_COLLECTION` | -| Collection Name (required) | `collection-name` | string | The name of the collection to delete. | +| Task ID (required) | `task` | string | `TASK_VECTOR_SEARCH` | +| Collection Name (required) | `collection-name` | string | The name of the collection to perform vector similarity search on. | +| Vector (required) | `vector` | array[number] | An array of dimensions for the vector query. | +| Limit (required) | `limit` | integer | The limit of points, empty for all points. | +| Payloads | `payloads` | array[string] | The payloads to return in the points. If empty then all payloads will be returned. | +| Filter | `filter` | object | The properties filter to be applied to the data with Qdrant filter, please refer to [filter section](https://api.qdrant.tech/api-reference/search/points). | +| Params | `params` | object | The additional parameters to be passed to the search, please refer to [params section](https://api.qdrant.tech/api-reference/search/points). | +| Min Score | `min-score` | number | The minimum score of the points to be returned. |
@@ -235,8 +218,25 @@ Delete a collection | Output | Field ID | Format | Description | | :--- | :--- | :--- | :--- | -| Status | `status` | string | Delete collection status. | +| [Result](#vector-search-result) | `result` | object | Result of the vector search operation. | +| Status | `status` | string | Vector search status. | +
+ Output Objects in Vector Search + +

Result

+ +
+ +| Field | Field ID | Format | Note | +| :--- | :--- | :--- | :--- | +| IDs | `ids` | array | The ids returned from the vector search operation. | +| [Metadata](#vector-search-metadata) | `metadata` | array | The metadata returned from the vector search operation. | +| [Points](#vector-search-points) | `points` | array | The points returned from the vector search operation. | +| Vectors | `vectors` | array | The vectors returned from the vector search operation. | +
+
+ diff --git a/pkg/component/data/qdrant/v0/config/definition.yaml b/pkg/component/data/qdrant/v0/config/definition.yaml index e7941ca59..c663747ec 100644 --- a/pkg/component/data/qdrant/v0/config/definition.yaml +++ b/pkg/component/data/qdrant/v0/config/definition.yaml @@ -1,10 +1,3 @@ -availableTasks: -- TASK_VECTOR_SEARCH -- TASK_BATCH_UPSERT -- TASK_UPSERT -- TASK_DELETE -- TASK_CREATE_COLLECTION -- TASK_DELETE_COLLECTION documentationUrl: https://www.instill.tech/docs/component/data/qdrant icon: assets/qdrant.svg id: qdrant diff --git a/pkg/component/data/redis/v0/config/definition.yaml b/pkg/component/data/redis/v0/config/definition.yaml index a6a1d01cc..e30b22d86 100644 --- a/pkg/component/data/redis/v0/config/definition.yaml +++ b/pkg/component/data/redis/v0/config/definition.yaml @@ -1,7 +1,3 @@ -availableTasks: -- TASK_RETRIEVE_CHAT_HISTORY -- TASK_WRITE_CHAT_MESSAGE -- TASK_WRITE_MULTI_MODAL_CHAT_MESSAGE custom: false documentationUrl: https://www.instill.tech/docs/component/data/redis icon: assets/redis.svg diff --git a/pkg/component/data/sql/v0/README.mdx b/pkg/component/data/sql/v0/README.mdx index 730137009..715636691 100644 --- a/pkg/component/data/sql/v0/README.mdx +++ b/pkg/component/data/sql/v0/README.mdx @@ -7,13 +7,13 @@ description: "Learn about how to set up a VDP SQL component https://github.com/i The SQL component is a data component that allows users to access the SQL database of your choice. It can carry out the following tasks: +- [Create Table](#create-table) +- [Delete](#delete) +- [Drop Table](#drop-table) - [Insert](#insert) - [Insert Many](#insert-many) -- [Update](#update) - [Select](#select) -- [Delete](#delete) -- [Create Table](#create-table) -- [Drop Table](#drop-table) +- [Update](#update) @@ -98,17 +98,17 @@ ${connection.}`. ## Supported Tasks -### Insert +### Create Table -Perform insert operation +Create a table in the database
| Input | Field ID | Format | Description | | :--- | :--- | :--- | :--- | -| Task ID (required) | `task` | string | `TASK_INSERT` | -| Table Name (required) | `table-name` | string | The table name in the database to insert data into. | -| Data (required) | `data` | object | The data to be inserted. | +| Task ID (required) | `task` | string | `TASK_CREATE_TABLE` | +| Table Name (required) | `table-name` | string | The table name in the database to be created. | +| Columns (required) | `columns-structure` | object | The columns structure to be created in the table, json with value string, e.g \{"name": "VARCHAR(255)", "age": "INT not null"\}. |
@@ -120,21 +120,21 @@ Perform insert operation | Output | Field ID | Format | Description | | :--- | :--- | :--- | :--- | -| Status | `status` | string | Insert status. | +| Status | `status` | string | Create table status. | -### Insert Many +### Delete -Perform insert operation with multiple rows +Perform delete operation
| Input | Field ID | Format | Description | | :--- | :--- | :--- | :--- | -| Task ID (required) | `task` | string | `TASK_INSERT_MANY` | -| Table Name (required) | `table-name` | string | The table name in the database to insert data into. | -| [Data](#insert-many-data) (required) | `array-data` | array[object] | The array data to be inserted. | +| Task ID (required) | `task` | string | `TASK_DELETE` | +| Table Name (required) | `table-name` | string | The table name in the database to be deleted. | +| Filter (required) | `filter` | string | The filter to be applied to the data with SQL syntax, which starts with WHERE clause. |
@@ -146,22 +146,20 @@ Perform insert operation with multiple rows | Output | Field ID | Format | Description | | :--- | :--- | :--- | :--- | -| Status | `status` | string | Insert many status. | +| Status | `status` | string | Delete status. | -### Update +### Drop Table -Perform update operation +Drop a table in the database
| Input | Field ID | Format | Description | | :--- | :--- | :--- | :--- | -| Task ID (required) | `task` | string | `TASK_UPDATE` | -| Table Name (required) | `table-name` | string | The table name in the database to update data into. | -| Filter (required) | `filter` | string | The filter to be applied to the data with SQL syntax, which starts with WHERE clause. | -| Update (required) | `update-data` | object | The new data to be updated to. | +| Task ID (required) | `task` | string | `TASK_DROP_TABLE` | +| Table Name (required) | `table-name` | string | The table name in the database to be dropped. |
@@ -173,23 +171,21 @@ Perform update operation | Output | Field ID | Format | Description | | :--- | :--- | :--- | :--- | -| Status | `status` | string | Update status. | +| Status | `status` | string | Drop table status. | -### Select +### Insert -Perform select operation +Perform insert operation
| Input | Field ID | Format | Description | | :--- | :--- | :--- | :--- | -| Task ID (required) | `task` | string | `TASK_SELECT` | -| Table Name (required) | `table-name` | string | The table name in the database to be selected. | -| Filter | `filter` | string | The filter to be applied to the data with SQL syntax, which starts with WHERE clause, empty for all rows. | -| Limit | `limit` | integer | The limit of rows to be selected, empty for all rows. | -| Columns | `columns` | array[string] | The columns to return in the rows. If empty then all columns will be returned. | +| Task ID (required) | `task` | string | `TASK_INSERT` | +| Table Name (required) | `table-name` | string | The table name in the database to insert data into. | +| Data (required) | `data` | object | The data to be inserted. |
@@ -201,22 +197,21 @@ Perform select operation | Output | Field ID | Format | Description | | :--- | :--- | :--- | :--- | -| Rows | `rows` | array[json] | The rows returned from the select operation. | -| Status | `status` | string | Select status. | +| Status | `status` | string | Insert status. | -### Delete +### Insert Many -Perform delete operation +Perform insert operation with multiple rows
| Input | Field ID | Format | Description | | :--- | :--- | :--- | :--- | -| Task ID (required) | `task` | string | `TASK_DELETE` | -| Table Name (required) | `table-name` | string | The table name in the database to be deleted. | -| Filter (required) | `filter` | string | The filter to be applied to the data with SQL syntax, which starts with WHERE clause. | +| Task ID (required) | `task` | string | `TASK_INSERT_MANY` | +| Table Name (required) | `table-name` | string | The table name in the database to insert data into. | +| [Data](#insert-many-data) (required) | `array-data` | array[object] | The array data to be inserted. |
@@ -228,21 +223,23 @@ Perform delete operation | Output | Field ID | Format | Description | | :--- | :--- | :--- | :--- | -| Status | `status` | string | Delete status. | +| Status | `status` | string | Insert many status. | -### Create Table +### Select -Create a table in the database +Perform select operation
| Input | Field ID | Format | Description | | :--- | :--- | :--- | :--- | -| Task ID (required) | `task` | string | `TASK_CREATE_TABLE` | -| Table Name (required) | `table-name` | string | The table name in the database to be created. | -| Columns (required) | `columns-structure` | object | The columns structure to be created in the table, json with value string, e.g \{"name": "VARCHAR(255)", "age": "INT not null"\}. | +| Task ID (required) | `task` | string | `TASK_SELECT` | +| Table Name (required) | `table-name` | string | The table name in the database to be selected. | +| Filter | `filter` | string | The filter to be applied to the data with SQL syntax, which starts with WHERE clause, empty for all rows. | +| Limit | `limit` | integer | The limit of rows to be selected, empty for all rows. | +| Columns | `columns` | array[string] | The columns to return in the rows. If empty then all columns will be returned. |
@@ -254,20 +251,23 @@ Create a table in the database | Output | Field ID | Format | Description | | :--- | :--- | :--- | :--- | -| Status | `status` | string | Create table status. | +| Rows | `rows` | array[json] | The rows returned from the select operation. | +| Status | `status` | string | Select status. | -### Drop Table +### Update -Drop a table in the database +Perform update operation
| Input | Field ID | Format | Description | | :--- | :--- | :--- | :--- | -| Task ID (required) | `task` | string | `TASK_DROP_TABLE` | -| Table Name (required) | `table-name` | string | The table name in the database to be dropped. | +| Task ID (required) | `task` | string | `TASK_UPDATE` | +| Table Name (required) | `table-name` | string | The table name in the database to update data into. | +| Filter (required) | `filter` | string | The filter to be applied to the data with SQL syntax, which starts with WHERE clause. | +| Update (required) | `update-data` | object | The new data to be updated to. |
@@ -279,7 +279,7 @@ Drop a table in the database | Output | Field ID | Format | Description | | :--- | :--- | :--- | :--- | -| Status | `status` | string | Drop table status. | +| Status | `status` | string | Update status. | diff --git a/pkg/component/data/sql/v0/config/definition.yaml b/pkg/component/data/sql/v0/config/definition.yaml index 641b0aebe..4901d3465 100644 --- a/pkg/component/data/sql/v0/config/definition.yaml +++ b/pkg/component/data/sql/v0/config/definition.yaml @@ -1,11 +1,3 @@ -availableTasks: -- TASK_INSERT -- TASK_INSERT_MANY -- TASK_UPDATE -- TASK_SELECT -- TASK_DELETE -- TASK_CREATE_TABLE -- TASK_DROP_TABLE documentationUrl: https://www.instill.tech/docs/component/data/sql icon: assets/sql.svg id: sql diff --git a/pkg/component/data/weaviate/v0/README.mdx b/pkg/component/data/weaviate/v0/README.mdx index 61567b755..fa823d3c3 100644 --- a/pkg/component/data/weaviate/v0/README.mdx +++ b/pkg/component/data/weaviate/v0/README.mdx @@ -7,12 +7,12 @@ description: "Learn about how to set up a VDP Weaviate component https://github. The Weaviate component is a data component that allows users to build and search vector datasets. It can carry out the following tasks: -- [Vector Search](#vector-search) - [Batch Insert](#batch-insert) -- [Insert](#insert) -- [Update](#update) - [Delete](#delete) - [Delete Collection](#delete-collection) +- [Insert](#insert) +- [Update](#update) +- [Vector Search](#vector-search) @@ -54,21 +54,19 @@ ${connection.}`. ## Supported Tasks -### Vector Search +### Batch Insert -Perform a vector search on a collection +Insert multiple vector objects into a collection
| Input | Field ID | Format | Description | | :--- | :--- | :--- | :--- | -| Task ID (required) | `task` | string | `TASK_VECTOR_SEARCH` | -| Collection Name (required) | `collection-name` | string | The name of the collection to perform vector search on. | -| Vector | `vector` | array[number] | An array of dimensions for the vector query, optional. If not provided, all objects will be returned. | -| Limit | `limit` | integer | The limit of objects, empty for all objects. | -| Fields | `fields` | array[string] | The fields to return in the objects. If empty then all fields will be returned. | -| Filter | `filter` | object | The properties filter to be applied to the data with GraphQL queries, which starts with WHERE field, please refer to [here](https://weaviate.io/developers/weaviate/search/filters). | -| Tenant | `tenant` | string | The tenant to perform the vector search on. | +| Task ID (required) | `task` | string | `TASK_BATCH_INSERT` | +| Collection Name (required) | `collection-name` | string | The name of the collection to upsert the object into. | +| Array ID | `array-id` | array[string] | The array of id. | +| [Array Metadata](#batch-insert-array-metadata) (required) | `array-metadata` | array[object] | The array of vector metadata properties. | +| Array Vector (required) | `array-vector` | array[array] | The array of vector values. |
@@ -80,40 +78,47 @@ Perform a vector search on a collection | Output | Field ID | Format | Description | | :--- | :--- | :--- | :--- | -| [Result](#vector-search-result) | `result` | object | Result of the vector search operation. | -| Status | `status` | string | Upsert status. | +| Status | `status` | string | Batch insert status. | -
- Output Objects in Vector Search -

Result

+### Delete + +Delete vector objects from a collection
-| Field | Field ID | Format | Note | +| Input | Field ID | Format | Description | | :--- | :--- | :--- | :--- | -| IDs | `ids` | array | The ids returned from the vector search operation. | -| [Metadata](#vector-search-metadata) | `metadata` | array | The metadata returned from the vector search operation. | -| [Objects](#vector-search-objects) | `objects` | array | The objects returned from the vector search operation. | -| Vectors | `vectors` | array | The vectors returned from the vector search operation. | +| Task ID (required) | `task` | string | `TASK_DELETE` | +| Collection Name (required) | `collection-name` | string | The name of the collection to delete the object from. | +| ID | `id` | string | The ID of the object. | +| Filter | `filter` | object | The properties filter to be applied to the data with GraphQL queries, which starts with WHERE field, please refer to [here](https://weaviate.io/developers/weaviate/search/filters). |
-
-### Batch Insert -Insert multiple vector objects into a collection + + + +
+ +| Output | Field ID | Format | Description | +| :--- | :--- | :--- | :--- | +| Status | `status` | string | Delete status. | +
+ + +### Delete Collection + +Delete a collection
| Input | Field ID | Format | Description | | :--- | :--- | :--- | :--- | -| Task ID (required) | `task` | string | `TASK_BATCH_INSERT` | -| Collection Name (required) | `collection-name` | string | The name of the collection to upsert the object into. | -| Array ID | `array-id` | array[string] | The array of id. | -| [Array Metadata](#batch-insert-array-metadata) (required) | `array-metadata` | array[object] | The array of vector metadata properties. | -| Array Vector (required) | `array-vector` | array[array] | The array of vector values. | +| Task ID (required) | `task` | string | `TASK_DELETE_COLLECTION` | +| Collection Name (required) | `collection-name` | string | The name of the collection to delete. |
@@ -125,7 +130,7 @@ Insert multiple vector objects into a collection | Output | Field ID | Format | Description | | :--- | :--- | :--- | :--- | -| Status | `status` | string | Batch insert status. | +| Status | `status` | string | Delete collection status. | @@ -185,18 +190,21 @@ Update vector object in a collection -### Delete +### Vector Search -Delete vector objects from a collection +Perform a vector search on a collection
| Input | Field ID | Format | Description | | :--- | :--- | :--- | :--- | -| Task ID (required) | `task` | string | `TASK_DELETE` | -| Collection Name (required) | `collection-name` | string | The name of the collection to delete the object from. | -| ID | `id` | string | The ID of the object. | +| Task ID (required) | `task` | string | `TASK_VECTOR_SEARCH` | +| Collection Name (required) | `collection-name` | string | The name of the collection to perform vector search on. | +| Vector | `vector` | array[number] | An array of dimensions for the vector query, optional. If not provided, all objects will be returned. | +| Limit | `limit` | integer | The limit of objects, empty for all objects. | +| Fields | `fields` | array[string] | The fields to return in the objects. If empty then all fields will be returned. | | Filter | `filter` | object | The properties filter to be applied to the data with GraphQL queries, which starts with WHERE field, please refer to [here](https://weaviate.io/developers/weaviate/search/filters). | +| Tenant | `tenant` | string | The tenant to perform the vector search on. |
@@ -208,33 +216,25 @@ Delete vector objects from a collection | Output | Field ID | Format | Description | | :--- | :--- | :--- | :--- | -| Status | `status` | string | Delete status. | - - - -### Delete Collection - -Delete a collection - -
- -| Input | Field ID | Format | Description | -| :--- | :--- | :--- | :--- | -| Task ID (required) | `task` | string | `TASK_DELETE_COLLECTION` | -| Collection Name (required) | `collection-name` | string | The name of the collection to delete. | +| [Result](#vector-search-result) | `result` | object | Result of the vector search operation. | +| Status | `status` | string | Upsert status. |
+
+ Output Objects in Vector Search - - - +

Result

-| Output | Field ID | Format | Description | +| Field | Field ID | Format | Note | | :--- | :--- | :--- | :--- | -| Status | `status` | string | Delete collection status. | +| IDs | `ids` | array | The ids returned from the vector search operation. | +| [Metadata](#vector-search-metadata) | `metadata` | array | The metadata returned from the vector search operation. | +| [Objects](#vector-search-objects) | `objects` | array | The objects returned from the vector search operation. | +| Vectors | `vectors` | array | The vectors returned from the vector search operation. |
+
diff --git a/pkg/component/data/weaviate/v0/config/definition.yaml b/pkg/component/data/weaviate/v0/config/definition.yaml index 5388a19c8..5223557e7 100644 --- a/pkg/component/data/weaviate/v0/config/definition.yaml +++ b/pkg/component/data/weaviate/v0/config/definition.yaml @@ -1,10 +1,3 @@ -availableTasks: -- TASK_VECTOR_SEARCH -- TASK_BATCH_INSERT -- TASK_INSERT -- TASK_UPDATE -- TASK_DELETE -- TASK_DELETE_COLLECTION documentationUrl: https://www.instill.tech/docs/component/data/weaviate icon: assets/weaviate.svg id: weaviate diff --git a/pkg/component/data/zilliz/v0/README.mdx b/pkg/component/data/zilliz/v0/README.mdx index 70d35823e..c7f27a42d 100644 --- a/pkg/component/data/zilliz/v0/README.mdx +++ b/pkg/component/data/zilliz/v0/README.mdx @@ -7,14 +7,14 @@ description: "Learn about how to set up a VDP Zilliz component https://github.co The Zilliz component is a data component that allows users to build and search vector datasets. It can carry out the following tasks: -- [Vector Search](#vector-search) -- [Upsert](#upsert) - [Batch Upsert](#batch-upsert) -- [Delete](#delete) - [Create Collection](#create-collection) -- [Drop Collection](#drop-collection) - [Create Partition](#create-partition) +- [Delete](#delete) +- [Drop Collection](#drop-collection) - [Drop Partition](#drop-partition) +- [Upsert](#upsert) +- [Vector Search](#vector-search) @@ -56,25 +56,18 @@ ${connection.}`. ## Supported Tasks -### Vector Search +### Batch Upsert -Perform a vector search on a collection +Insert a batch of vector data into a collection
| Input | Field ID | Format | Description | | :--- | :--- | :--- | :--- | -| Task ID (required) | `task` | string | `TASK_VECTOR_SEARCH` | -| Collection Name (required) | `collection-name` | string | The name of the collection to perform vector search on. | -| Partition Name | `partition-name` | string | The name of the partition to vector search the data from. | -| Vector (required) | `vector` | array[number] | An array of dimensions for the vector search. | -| Vector Field (required) | `vector-field` | string | The name of the field to perform vector search on. | -| Fields | `fields` | array[string] | The fields to return in the data. If empty then all fields will be returned. | -| Limit (required) | `limit` | integer | The limit of the data to return. | -| Filter | `filter` | string | The properties filter to be applied to the data with zilliz scalar filter, please refer to [filtered-search](https://docs.zilliz.com/docs/single-vector-search?_highlight=filter/docs/single-vector-search#filtered-search). | -| Offset | `offset` | integer | The offset of the data to return. | -| Grouping Field | `grouping-field` | string | The name of the field to group the data by, please refer to [grouping-search](https://docs.zilliz.com/docs/release-notes-290?_highlight=grouping&_highlight=field/docs/release-notes-290#grouping-search). | -| Search Parameters | `search-params` | object | The search parameters to be applied to the data with zilliz search parameters, please refer to [search-parameters](https://docs.zilliz.com/docs/single-vector-search?_highlight=search&_highlight=params/docs/single-vector-search#search-parameters). | +| Task ID (required) | `task` | string | `TASK_BATCH_UPSERT` | +| Collection Name (required) | `collection-name` | string | The name of the collection to upsert the data into. | +| Partition Name | `partition-name` | string | The name of the partition to upsert the data from. If empty then default partition will be used. | +| [Array Data](#batch-upsert-array-data) (required) | `array-data` | array[object] | The data. |
@@ -86,39 +79,27 @@ Perform a vector search on a collection | Output | Field ID | Format | Description | | :--- | :--- | :--- | :--- | -| [Result](#vector-search-result) | `result` | object | Result of the vector search operation. | -| Status | `status` | string | Vector search status. | - - -
- Output Objects in Vector Search - -

Result

- -
- -| Field | Field ID | Format | Note | -| :--- | :--- | :--- | :--- | -| [Data](#vector-search-data) | `data` | array | The points returned from the vector search operation. | -| IDs | `ids` | array | The ids returned from the vector search operation. | -| [Metadata](#vector-search-metadata) | `metadata` | array | The metadata returned from the vector search operation. | -| Vectors | `vectors` | array | The vectors returned from the vector search operation. | +| Status | `status` | string | Batch upsert status. |
-
-### Upsert +### Create Collection -Insert a vector data into a collection +Create a collection, please refer to [create-collection-v2](https://docs.zilliz.com/reference/restful/create-collection-v2)
| Input | Field ID | Format | Description | | :--- | :--- | :--- | :--- | -| Task ID (required) | `task` | string | `TASK_UPSERT` | -| Collection Name (required) | `collection-name` | string | The name of the collection to upsert the data into. | -| Partition Name | `partition-name` | string | The name of the partition to upsert the data from. If empty then default partition will be used. | -| Data (required) | `data` | object | The data. | +| Task ID (required) | `task` | string | `TASK_CREATE_COLLECTION` | +| Collection Name (required) | `collection-name` | string | The name of the collection to create. | +| Dimension (required) | `dimension` | integer | The dimension of the collection. | +| ID Type | `id-type` | string | The type of the id. | +| Schema | `schema` | object | The schema of the collection. | +| Auto ID | `auto-id` | boolean | Whether to auto generate id. | +| Metric Type | `metric-type` | string | The metric type of the collection.
Enum values
  • `L2`
  • `IP`
  • `COSINE`
| +| Index Parameters | `index-params` | object | The index parameters to be applied to the collection with zilliz index parameters, please refer to [index-parameter](https://zilliz.io/docs/single-vector-search.md#Index-parameters). | +| Parameters | `params` | object | The parameters to be applied to the collection with zilliz parameters, please refer to [parameters](https://zilliz.io/docs/single-vector-search.md#Parameters). |
@@ -130,22 +111,21 @@ Insert a vector data into a collection | Output | Field ID | Format | Description | | :--- | :--- | :--- | :--- | -| Status | `status` | string | Upsert status. | +| Status | `status` | string | Create collection status. | -### Batch Upsert +### Create Partition -Insert a batch of vector data into a collection +Create a partition in a collection
| Input | Field ID | Format | Description | | :--- | :--- | :--- | :--- | -| Task ID (required) | `task` | string | `TASK_BATCH_UPSERT` | -| Collection Name (required) | `collection-name` | string | The name of the collection to upsert the data into. | -| Partition Name | `partition-name` | string | The name of the partition to upsert the data from. If empty then default partition will be used. | -| [Array Data](#batch-upsert-array-data) (required) | `array-data` | array[object] | The data. | +| Task ID (required) | `task` | string | `TASK_CREATE_PARTITION` | +| Collection Name (required) | `collection-name` | string | The name of the collection to create the partition in. | +| Partition Name (required) | `partition-name` | string | The name of the partition to create. |
@@ -157,7 +137,7 @@ Insert a batch of vector data into a collection | Output | Field ID | Format | Description | | :--- | :--- | :--- | :--- | -| Status | `status` | string | Batch upsert status. | +| Status | `status` | string | Create partition status. | @@ -188,23 +168,16 @@ Delete vector data from a collection -### Create Collection +### Drop Collection -Create a collection, please refer to [create-collection-v2](https://docs.zilliz.com/reference/restful/create-collection-v2) +Drop a collection
| Input | Field ID | Format | Description | | :--- | :--- | :--- | :--- | -| Task ID (required) | `task` | string | `TASK_CREATE_COLLECTION` | -| Collection Name (required) | `collection-name` | string | The name of the collection to create. | -| Dimension (required) | `dimension` | integer | The dimension of the collection. | -| ID Type | `id-type` | string | The type of the id. | -| Schema | `schema` | object | The schema of the collection. | -| Auto ID | `auto-id` | boolean | Whether to auto generate id. | -| Metric Type | `metric-type` | string | The metric type of the collection.
Enum values
  • `L2`
  • `IP`
  • `COSINE`
| -| Index Parameters | `index-params` | object | The index parameters to be applied to the collection with zilliz index parameters, please refer to [index-parameter](https://zilliz.io/docs/single-vector-search.md#Index-parameters). | -| Parameters | `params` | object | The parameters to be applied to the collection with zilliz parameters, please refer to [parameters](https://zilliz.io/docs/single-vector-search.md#Parameters). | +| Task ID (required) | `task` | string | `TASK_DROP_COLLECTION` | +| Collection Name (required) | `collection-name` | string | The name of the collection to drop. |
@@ -216,20 +189,21 @@ Create a collection, please refer to [create-collection-v2](https://docs.zilliz. | Output | Field ID | Format | Description | | :--- | :--- | :--- | :--- | -| Status | `status` | string | Create collection status. | +| Status | `status` | string | Drop collection status. | -### Drop Collection +### Drop Partition -Drop a collection +Drop a partition from a collection
| Input | Field ID | Format | Description | | :--- | :--- | :--- | :--- | -| Task ID (required) | `task` | string | `TASK_DROP_COLLECTION` | -| Collection Name (required) | `collection-name` | string | The name of the collection to drop. | +| Task ID (required) | `task` | string | `TASK_DROP_PARTITION` | +| Collection Name (required) | `collection-name` | string | The name of the collection to drop the partition from. | +| Partition Name (required) | `partition-name` | string | The name of the partition to drop. |
@@ -241,21 +215,22 @@ Drop a collection | Output | Field ID | Format | Description | | :--- | :--- | :--- | :--- | -| Status | `status` | string | Drop collection status. | +| Status | `status` | string | Drop partition status. | -### Create Partition +### Upsert -Create a partition in a collection +Insert a vector data into a collection
| Input | Field ID | Format | Description | | :--- | :--- | :--- | :--- | -| Task ID (required) | `task` | string | `TASK_CREATE_PARTITION` | -| Collection Name (required) | `collection-name` | string | The name of the collection to create the partition in. | -| Partition Name (required) | `partition-name` | string | The name of the partition to create. | +| Task ID (required) | `task` | string | `TASK_UPSERT` | +| Collection Name (required) | `collection-name` | string | The name of the collection to upsert the data into. | +| Partition Name | `partition-name` | string | The name of the partition to upsert the data from. If empty then default partition will be used. | +| Data (required) | `data` | object | The data. |
@@ -267,21 +242,29 @@ Create a partition in a collection | Output | Field ID | Format | Description | | :--- | :--- | :--- | :--- | -| Status | `status` | string | Create partition status. | +| Status | `status` | string | Upsert status. | -### Drop Partition +### Vector Search -Drop a partition from a collection +Perform a vector search on a collection
| Input | Field ID | Format | Description | | :--- | :--- | :--- | :--- | -| Task ID (required) | `task` | string | `TASK_DROP_PARTITION` | -| Collection Name (required) | `collection-name` | string | The name of the collection to drop the partition from. | -| Partition Name (required) | `partition-name` | string | The name of the partition to drop. | +| Task ID (required) | `task` | string | `TASK_VECTOR_SEARCH` | +| Collection Name (required) | `collection-name` | string | The name of the collection to perform vector search on. | +| Partition Name | `partition-name` | string | The name of the partition to vector search the data from. | +| Vector (required) | `vector` | array[number] | An array of dimensions for the vector search. | +| Vector Field (required) | `vector-field` | string | The name of the field to perform vector search on. | +| Fields | `fields` | array[string] | The fields to return in the data. If empty then all fields will be returned. | +| Limit (required) | `limit` | integer | The limit of the data to return. | +| Filter | `filter` | string | The properties filter to be applied to the data with zilliz scalar filter, please refer to [filtered-search](https://docs.zilliz.com/docs/single-vector-search?_highlight=filter/docs/single-vector-search#filtered-search). | +| Offset | `offset` | integer | The offset of the data to return. | +| Grouping Field | `grouping-field` | string | The name of the field to group the data by, please refer to [grouping-search](https://docs.zilliz.com/docs/release-notes-290?_highlight=grouping&_highlight=field/docs/release-notes-290#grouping-search). | +| Search Parameters | `search-params` | object | The search parameters to be applied to the data with zilliz search parameters, please refer to [search-parameters](https://docs.zilliz.com/docs/single-vector-search?_highlight=search&_highlight=params/docs/single-vector-search#search-parameters). |
@@ -293,8 +276,25 @@ Drop a partition from a collection | Output | Field ID | Format | Description | | :--- | :--- | :--- | :--- | -| Status | `status` | string | Drop partition status. | +| [Result](#vector-search-result) | `result` | object | Result of the vector search operation. | +| Status | `status` | string | Vector search status. | +
+ Output Objects in Vector Search + +

Result

+ +
+ +| Field | Field ID | Format | Note | +| :--- | :--- | :--- | :--- | +| [Data](#vector-search-data) | `data` | array | The points returned from the vector search operation. | +| IDs | `ids` | array | The ids returned from the vector search operation. | +| [Metadata](#vector-search-metadata) | `metadata` | array | The metadata returned from the vector search operation. | +| Vectors | `vectors` | array | The vectors returned from the vector search operation. | +
+
+ diff --git a/pkg/component/data/zilliz/v0/config/definition.yaml b/pkg/component/data/zilliz/v0/config/definition.yaml index f0a3b2240..731986608 100644 --- a/pkg/component/data/zilliz/v0/config/definition.yaml +++ b/pkg/component/data/zilliz/v0/config/definition.yaml @@ -1,12 +1,3 @@ -availableTasks: -- TASK_VECTOR_SEARCH -- TASK_UPSERT -- TASK_BATCH_UPSERT -- TASK_DELETE -- TASK_CREATE_COLLECTION -- TASK_DROP_COLLECTION -- TASK_CREATE_PARTITION -- TASK_DROP_PARTITION documentationUrl: https://www.instill.tech/docs/component/data/zilliz icon: assets/zilliz.svg id: zilliz diff --git a/pkg/component/generic/collection/v0/config/definition.yaml b/pkg/component/generic/collection/v0/config/definition.yaml index 7bdaf8620..3d80b1db5 100644 --- a/pkg/component/generic/collection/v0/config/definition.yaml +++ b/pkg/component/generic/collection/v0/config/definition.yaml @@ -1,12 +1,3 @@ -availableTasks: -- TASK_APPEND -- TASK_ASSIGN -- TASK_CONCAT -- TASK_DIFFERENCE -- TASK_INTERSECTION -- TASK_SPLIT -- TASK_SYMMETRIC_DIFFERENCE -- TASK_UNION custom: false documentationUrl: https://www.instill.tech/docs/component/generic/collection icon: assets/collection.svg diff --git a/pkg/component/generic/http/v0/README.mdx b/pkg/component/generic/http/v0/README.mdx index 4e8126f45..bf8e6583e 100644 --- a/pkg/component/generic/http/v0/README.mdx +++ b/pkg/component/generic/http/v0/README.mdx @@ -7,13 +7,13 @@ description: "Learn about how to set up a VDP HTTP component https://github.com/ The HTTP component is a generic component that allows users to make requests to external HTTP APIs. It can carry out the following tasks: -- [Get](#get) -- [Post](#post) -- [Patch](#patch) -- [Put](#put) - [Delete](#delete) +- [Get](#get) - [Head](#head) - [Options](#options) +- [Patch](#patch) +- [Post](#post) +- [Put](#put) @@ -103,17 +103,18 @@ ${connection.}`. ## Supported Tasks -### Get +### Delete -Send a HTTP GET request. +Send a HTTP DELETE request.
| Input | Field ID | Format | Description | | :--- | :--- | :--- | :--- | -| Task ID (required) | `task` | string | `TASK_GET` | +| Task ID (required) | `task` | string | `TASK_DELETE` | | Endpoint URL (required) | `endpoint-url` | string | The API endpoint url. | -| Body | `output-body-schema` | string | The request body. | +| Body | `body` | any | The request body. | +| Body | `output-body-schema` | string | The JSON schema of output body. |
@@ -131,18 +132,17 @@ Send a HTTP GET request. -### Post +### Get -Send a HTTP POST request. +Send a HTTP GET request.
| Input | Field ID | Format | Description | | :--- | :--- | :--- | :--- | -| Task ID (required) | `task` | string | `TASK_POST` | +| Task ID (required) | `task` | string | `TASK_GET` | | Endpoint URL (required) | `endpoint-url` | string | The API endpoint url. | -| Body | `body` | any | The request body. | -| Body | `output-body-schema` | string | The JSON schema of output body. | +| Body | `output-body-schema` | string | The request body. |
@@ -160,18 +160,17 @@ Send a HTTP POST request. -### Patch +### Head -Send a HTTP PATCH request. +Send a HTTP HEAD request.
| Input | Field ID | Format | Description | | :--- | :--- | :--- | :--- | -| Task ID (required) | `task` | string | `TASK_PATCH` | +| Task ID (required) | `task` | string | `TASK_HEAD` | | Endpoint URL (required) | `endpoint-url` | string | The API endpoint url. | -| Body | `body` | any | The request body. | -| Body | `output-body-schema` | string | The JSON schema of output body. | +| Body | `output-body-schema` | string | The request body. |
@@ -189,15 +188,15 @@ Send a HTTP PATCH request. -### Put +### Options -Send a HTTP PUT request. +Send a HTTP OPTIONS request.
| Input | Field ID | Format | Description | | :--- | :--- | :--- | :--- | -| Task ID (required) | `task` | string | `TASK_PUT` | +| Task ID (required) | `task` | string | `TASK_OPTIONS` | | Endpoint URL (required) | `endpoint-url` | string | The API endpoint url. | | Body | `body` | any | The request body. | | Body | `output-body-schema` | string | The JSON schema of output body. | @@ -218,15 +217,15 @@ Send a HTTP PUT request.
-### Delete +### Patch -Send a HTTP DELETE request. +Send a HTTP PATCH request.
| Input | Field ID | Format | Description | | :--- | :--- | :--- | :--- | -| Task ID (required) | `task` | string | `TASK_DELETE` | +| Task ID (required) | `task` | string | `TASK_PATCH` | | Endpoint URL (required) | `endpoint-url` | string | The API endpoint url. | | Body | `body` | any | The request body. | | Body | `output-body-schema` | string | The JSON schema of output body. | @@ -247,17 +246,18 @@ Send a HTTP DELETE request.
-### Head +### Post -Send a HTTP HEAD request. +Send a HTTP POST request.
| Input | Field ID | Format | Description | | :--- | :--- | :--- | :--- | -| Task ID (required) | `task` | string | `TASK_HEAD` | +| Task ID (required) | `task` | string | `TASK_POST` | | Endpoint URL (required) | `endpoint-url` | string | The API endpoint url. | -| Body | `output-body-schema` | string | The request body. | +| Body | `body` | any | The request body. | +| Body | `output-body-schema` | string | The JSON schema of output body. |
@@ -275,15 +275,15 @@ Send a HTTP HEAD request. -### Options +### Put -Send a HTTP OPTIONS request. +Send a HTTP PUT request.
| Input | Field ID | Format | Description | | :--- | :--- | :--- | :--- | -| Task ID (required) | `task` | string | `TASK_OPTIONS` | +| Task ID (required) | `task` | string | `TASK_PUT` | | Endpoint URL (required) | `endpoint-url` | string | The API endpoint url. | | Body | `body` | any | The request body. | | Body | `output-body-schema` | string | The JSON schema of output body. | diff --git a/pkg/component/generic/http/v0/config/definition.yaml b/pkg/component/generic/http/v0/config/definition.yaml index 4dcd8c07e..6bee4280e 100644 --- a/pkg/component/generic/http/v0/config/definition.yaml +++ b/pkg/component/generic/http/v0/config/definition.yaml @@ -1,11 +1,3 @@ -availableTasks: -- TASK_GET -- TASK_POST -- TASK_PATCH -- TASK_PUT -- TASK_DELETE -- TASK_HEAD -- TASK_OPTIONS custom: false documentationUrl: https://www.instill.tech/docs/component/generic/http icon: assets/http.svg diff --git a/pkg/component/generic/scheduler/v0/config/definition.yaml b/pkg/component/generic/scheduler/v0/config/definition.yaml index 52c700ac8..65b700beb 100644 --- a/pkg/component/generic/scheduler/v0/config/definition.yaml +++ b/pkg/component/generic/scheduler/v0/config/definition.yaml @@ -1,6 +1,3 @@ -availableTasks: [] -availableEvents: -- EVENT_CRON_JOB_TRIGGERED documentationUrl: https://www.instill.tech/docs/component/generic/scheduler icon: assets/scheduler.svg id: scheduler diff --git a/pkg/component/operator/audio/v0/config/definition.yaml b/pkg/component/operator/audio/v0/config/definition.yaml index 10571264c..9fa071c47 100644 --- a/pkg/component/operator/audio/v0/config/definition.yaml +++ b/pkg/component/operator/audio/v0/config/definition.yaml @@ -1,6 +1,3 @@ -availableTasks: -- TASK_DETECT_ACTIVITY -- TASK_SEGMENT documentationUrl: https://www.instill.tech/docs/component/operator/audio icon: assets/audio.svg id: audio diff --git a/pkg/component/operator/base64/v0/README.mdx b/pkg/component/operator/base64/v0/README.mdx index 5f1b3725b..f898fea7b 100644 --- a/pkg/component/operator/base64/v0/README.mdx +++ b/pkg/component/operator/base64/v0/README.mdx @@ -7,8 +7,8 @@ description: "Learn about how to set up a VDP Base64 component https://github.co The Base64 component is an operator component that allows users to encode or decode a string in Base64 format. It can carry out the following tasks: -- [Encode](#encode) - [Decode](#decode) +- [Encode](#encode) @@ -30,16 +30,16 @@ The component definition and tasks are defined in the [definition.yaml](https:// ## Supported Tasks -### Encode +### Decode -Encode data into base64 string +Decode the base64 string.
| Input | Field ID | Format | Description | | :--- | :--- | :--- | :--- | -| Task ID (required) | `task` | string | `TASK_ENCODE` | -| Data (required) | `data` | string | Data to be encoded. | +| Task ID (required) | `task` | string | `TASK_DECODE` | +| Data (required) | `data` | string | Base64 string to be decoded. |
@@ -55,16 +55,16 @@ Encode data into base64 string
-### Decode +### Encode -Decode the base64 string. +Encode data into base64 string
| Input | Field ID | Format | Description | | :--- | :--- | :--- | :--- | -| Task ID (required) | `task` | string | `TASK_DECODE` | -| Data (required) | `data` | string | Base64 string to be decoded. | +| Task ID (required) | `task` | string | `TASK_ENCODE` | +| Data (required) | `data` | string | Data to be encoded. |
diff --git a/pkg/component/operator/base64/v0/config/definition.yaml b/pkg/component/operator/base64/v0/config/definition.yaml index a87704bea..7ece91bfb 100644 --- a/pkg/component/operator/base64/v0/config/definition.yaml +++ b/pkg/component/operator/base64/v0/config/definition.yaml @@ -1,6 +1,3 @@ -availableTasks: -- TASK_ENCODE -- TASK_DECODE custom: false documentationUrl: https://www.instill.tech/docs/component/operator/base64 icon: assets/base64.svg diff --git a/pkg/component/operator/document/v0/README.mdx b/pkg/component/operator/document/v0/README.mdx index 5d6c1249b..b140d38ae 100644 --- a/pkg/component/operator/document/v0/README.mdx +++ b/pkg/component/operator/document/v0/README.mdx @@ -7,9 +7,9 @@ description: "Learn about how to set up a VDP Document component https://github. The Document component is an operator component that allows users to manipulate Document files. It can carry out the following tasks: +- [Convert to Images](#convert-to-images) - [Convert to Markdown](#convert-to-markdown) - [Convert to Text](#convert-to-text) -- [Convert to Images](#convert-to-images) @@ -31,19 +31,17 @@ The component definition and tasks are defined in the [definition.yaml](https:// ## Supported Tasks -### Convert to Markdown +### Convert to Images -Convert document to text in Markdown format. +Convert Document to images.
| Input | Field ID | Format | Description | | :--- | :--- | :--- | :--- | -| Task ID (required) | `task` | string | `TASK_CONVERT_TO_MARKDOWN` | -| Document (required) | `document` | string | Base64 encoded PDF/DOCX/DOC/PPTX/PPT/HTML/XLSX/XLS/CSV to be converted to text in Markdown format. | +| Task ID (required) | `task` | string | `TASK_CONVERT_TO_IMAGES` | +| PDF (required) | `document` | string | Base64 encoded PDF/DOCX/DOC/PPT/PPTX to be converted to images. | | Filename | `filename` | string | The name of the file, please remember to add the file extension in the end of file name. e.g. 'example.pdf'. | -| Display Image Tag | `display-image-tag` | boolean | Whether to display image tag in the markdown text. Default is 'false'. It is only applicable for convert-2024-08-28 converter. And, it is only applicable for the type of PPTX/PPT/DOCX/DOC/PDF. | -| Display All Page Image | `display-all-page-image` | boolean | Whether to respond the whole page as the images if we detect there could be images in the page. It will only support DOCX/DOC/PPTX/PPT/PDF. | | Resolution | `resolution` | number | Desired number pixels per inch. Defaults to 300. Minimum is 72. |
@@ -56,26 +54,25 @@ Convert document to text in Markdown format. | Output | Field ID | Format | Description | | :--- | :--- | :--- | :--- | -| Body | `body` | string | Markdown text converted from the PDF document. | -| Filename (optional) | `filename` | string | The name of the file. | -| Images (optional) | `images` | array[string] | Images extracted from the document. | -| Error (optional) | `error` | string | Error message if any during the conversion process. | -| All Page Images (optional) | `all-page-images` | array[string] | The image contains all the pages in the document if we detect there could be images in the page. It will only support DOCX/DOC/PPTX/PPT/PDF. | -| Markdowns (optional) | `markdowns` | array[string] | Markdown text converted from the PDF document, separated by page. | +| Images | `images` | array[string] | Images converted from the document. | +| Filenames (optional) | `filenames` | array[string] | The filenames of the images. The filenames will be appended with the page number. e.g. 'example-1.jpg'. | -### Convert to Text +### Convert to Markdown -Convert document to text. +Convert document to text in Markdown format.
| Input | Field ID | Format | Description | | :--- | :--- | :--- | :--- | -| Task ID (required) | `task` | string | `TASK_CONVERT_TO_TEXT` | -| Document (required) | `document` | string | Base64 encoded PDF/DOC/DOCX/XML/HTML/RTF/MD/PPTX/ODT/TIF/CSV/TXT/PNG document to be converted to plain text. | +| Task ID (required) | `task` | string | `TASK_CONVERT_TO_MARKDOWN` | +| Document (required) | `document` | string | Base64 encoded PDF/DOCX/DOC/PPTX/PPT/HTML/XLSX/XLS/CSV to be converted to text in Markdown format. | | Filename | `filename` | string | The name of the file, please remember to add the file extension in the end of file name. e.g. 'example.pdf'. | +| Display Image Tag | `display-image-tag` | boolean | Whether to display image tag in the markdown text. Default is 'false'. It is only applicable for convert-2024-08-28 converter. And, it is only applicable for the type of PPTX/PPT/DOCX/DOC/PDF. | +| Display All Page Image | `display-all-page-image` | boolean | Whether to respond the whole page as the images if we detect there could be images in the page. It will only support DOCX/DOC/PPTX/PPT/PDF. | +| Resolution | `resolution` | number | Desired number pixels per inch. Defaults to 300. Minimum is 72. |
@@ -87,26 +84,26 @@ Convert document to text. | Output | Field ID | Format | Description | | :--- | :--- | :--- | :--- | -| Body | `body` | string | Plain text converted from the document. | +| Body | `body` | string | Markdown text converted from the PDF document. | | Filename (optional) | `filename` | string | The name of the file. | -| Meta | `meta` | json | Metadata extracted from the document. | -| Milliseconds | `msecs` | number | Time taken to convert the document. | -| Error | `error` | string | Error message if any during the conversion process. | +| Images (optional) | `images` | array[string] | Images extracted from the document. | +| Error (optional) | `error` | string | Error message if any during the conversion process. | +| All Page Images (optional) | `all-page-images` | array[string] | The image contains all the pages in the document if we detect there could be images in the page. It will only support DOCX/DOC/PPTX/PPT/PDF. | +| Markdowns (optional) | `markdowns` | array[string] | Markdown text converted from the PDF document, separated by page. | -### Convert to Images +### Convert to Text -Convert Document to images. +Convert document to text.
| Input | Field ID | Format | Description | | :--- | :--- | :--- | :--- | -| Task ID (required) | `task` | string | `TASK_CONVERT_TO_IMAGES` | -| PDF (required) | `document` | string | Base64 encoded PDF/DOCX/DOC/PPT/PPTX to be converted to images. | +| Task ID (required) | `task` | string | `TASK_CONVERT_TO_TEXT` | +| Document (required) | `document` | string | Base64 encoded PDF/DOC/DOCX/XML/HTML/RTF/MD/PPTX/ODT/TIF/CSV/TXT/PNG document to be converted to plain text. | | Filename | `filename` | string | The name of the file, please remember to add the file extension in the end of file name. e.g. 'example.pdf'. | -| Resolution | `resolution` | number | Desired number pixels per inch. Defaults to 300. Minimum is 72. |
@@ -118,8 +115,11 @@ Convert Document to images. | Output | Field ID | Format | Description | | :--- | :--- | :--- | :--- | -| Images | `images` | array[string] | Images converted from the document. | -| Filenames (optional) | `filenames` | array[string] | The filenames of the images. The filenames will be appended with the page number. e.g. 'example-1.jpg'. | +| Body | `body` | string | Plain text converted from the document. | +| Filename (optional) | `filename` | string | The name of the file. | +| Meta | `meta` | json | Metadata extracted from the document. | +| Milliseconds | `msecs` | number | Time taken to convert the document. | +| Error | `error` | string | Error message if any during the conversion process. | diff --git a/pkg/component/operator/document/v0/config/definition.yaml b/pkg/component/operator/document/v0/config/definition.yaml index aac70b207..03d5222cf 100644 --- a/pkg/component/operator/document/v0/config/definition.yaml +++ b/pkg/component/operator/document/v0/config/definition.yaml @@ -1,7 +1,3 @@ -availableTasks: -- TASK_CONVERT_TO_MARKDOWN -- TASK_CONVERT_TO_TEXT -- TASK_CONVERT_TO_IMAGES custom: false documentationUrl: https://www.instill.tech/docs/component/operator/document icon: assets/document.svg diff --git a/pkg/component/operator/image/v0/README.mdx b/pkg/component/operator/image/v0/README.mdx index 3d836e427..a89ddd1b1 100644 --- a/pkg/component/operator/image/v0/README.mdx +++ b/pkg/component/operator/image/v0/README.mdx @@ -9,13 +9,13 @@ The Image component is an operator component that allows users to manipulate ima It can carry out the following tasks: - [Concat](#concat) - [Crop](#crop) -- [Resize](#resize) - [Draw Classification](#draw-classification) - [Draw Detection](#draw-detection) +- [Draw Instance Segmentation](#draw-instance-segmentation) - [Draw Keypoint](#draw-keypoint) - [Draw OCR](#draw-ocr) -- [Draw Instance Segmentation](#draw-instance-segmentation) - [Draw Semantic Segmentation](#draw-semantic-segmentation) +- [Resize](#resize) @@ -96,19 +96,19 @@ Crop image to the specified size. -### Resize +### Draw Classification -Resize image to the specified size. +Draw classification result on the image.
| Input | Field ID | Format | Description | | :--- | :--- | :--- | :--- | -| Task ID (required) | `task` | string | `TASK_RESIZE` | +| Task ID (required) | `task` | string | `TASK_DRAW_CLASSIFICATION` | +| Category (required) | `category` | string | The predicted category of the input. | | Image (required) | `image` | string | Input image. | -| Ratio | `ratio` | number | Resize ratio (e.g., 0.5 for half size, 2 for double size) to resize the image. If ratio is provided, width and height will be ignored. | -| Width | `width` | integer | Width of the output image. | -| Height | `height` | integer | Height of the output image. | +| Show Score | `show-score` | boolean | Show model confidence score on each instance. | +| Score (required) | `score` | number | The confidence score of the predicted category of the input. |
@@ -124,23 +124,50 @@ Resize image to the specified size. -### Draw Classification +### Draw Detection -Draw classification result on the image. +Draw detection result on the image.
| Input | Field ID | Format | Description | | :--- | :--- | :--- | :--- | -| Task ID (required) | `task` | string | `TASK_DRAW_CLASSIFICATION` | -| Category (required) | `category` | string | The predicted category of the input. | +| Task ID (required) | `task` | string | `TASK_DRAW_DETECTION` | | Image (required) | `image` | string | Input image. | +| [Objects](#draw-detection-objects) (required) | `objects` | array[object] | A list of detected objects. | | Show Score | `show-score` | boolean | Show model confidence score on each instance. | -| Score (required) | `score` | number | The confidence score of the predicted category of the input. |
+
+ Input Objects in Draw Detection + +

Objects

+ +A list of detected objects. + +
+ +| Field | Field ID | Format | Note | +| :--- | :--- | :--- | :--- | +| [Bounding box](#draw-detection-bounding-box) | `bounding-box` | object | The detected bounding box in (left, top, width, height) format. | +| Category | `category` | string | The predicted category of the bounding box. | +| Score | `score` | number | The confidence score of the predicted category of the bounding box. | +
+

Bounding Box

+ +The detected bounding box in (left, top, width, height) format. + +
+| Field | Field ID | Format | Note | +| :--- | :--- | :--- | :--- | +| Height | `height` | number | Bounding box height value | +| Left | `left` | number | Bounding box left x-axis value | +| Top | `top` | number | Bounding box top y-axis value | +| Width | `width` | number | Bounding box width value | +
+
@@ -152,37 +179,38 @@ Draw classification result on the image. -### Draw Detection +### Draw Instance Segmentation -Draw detection result on the image. +Draw instance segmentation result on the image.
| Input | Field ID | Format | Description | | :--- | :--- | :--- | :--- | -| Task ID (required) | `task` | string | `TASK_DRAW_DETECTION` | +| Task ID (required) | `task` | string | `TASK_DRAW_INSTANCE_SEGMENTATION` | | Image (required) | `image` | string | Input image. | -| [Objects](#draw-detection-objects) (required) | `objects` | array[object] | A list of detected objects. | +| [Objects](#draw-instance-segmentation-objects) (required) | `objects` | array[object] | A list of detected instance bounding boxes. | | Show Score | `show-score` | boolean | Show model confidence score on each instance. |
- Input Objects in Draw Detection + Input Objects in Draw Instance Segmentation -

Objects

+

Objects

-A list of detected objects. +A list of detected instance bounding boxes.
| Field | Field ID | Format | Note | | :--- | :--- | :--- | :--- | -| [Bounding box](#draw-detection-bounding-box) | `bounding-box` | object | The detected bounding box in (left, top, width, height) format. | +| [Bounding Box](#draw-instance-segmentation-bounding-box) | `bounding-box` | object | The detected bounding box in (left, top, width, height) format. | | Category | `category` | string | The predicted category of the bounding box. | -| Score | `score` | number | The confidence score of the predicted category of the bounding box. | +| RLE | `rle` | string | Run Length Encoding (RLE) of instance mask within the bounding box. | +| Score | `score` | number | The confidence score of the predicted instance object. |
-

Bounding Box

+

Bounding Box

The detected bounding box in (left, top, width, height) format. @@ -329,49 +357,33 @@ The detected bounding box in (left, top, width, height) format. -### Draw Instance Segmentation +### Draw Semantic Segmentation -Draw instance segmentation result on the image. +Draw semantic segmentation result on the image.
| Input | Field ID | Format | Description | | :--- | :--- | :--- | :--- | -| Task ID (required) | `task` | string | `TASK_DRAW_INSTANCE_SEGMENTATION` | +| Task ID (required) | `task` | string | `TASK_DRAW_SEMANTIC_SEGMENTATION` | | Image (required) | `image` | string | Input image. | -| [Objects](#draw-instance-segmentation-objects) (required) | `objects` | array[object] | A list of detected instance bounding boxes. | -| Show Score | `show-score` | boolean | Show model confidence score on each instance. | +| [Stuffs](#draw-semantic-segmentation-stuffs) (required) | `stuffs` | array[object] | A list of RLE binary masks. |
- Input Objects in Draw Instance Segmentation - -

Objects

- -A list of detected instance bounding boxes. - -
+ Input Objects in Draw Semantic Segmentation -| Field | Field ID | Format | Note | -| :--- | :--- | :--- | :--- | -| [Bounding Box](#draw-instance-segmentation-bounding-box) | `bounding-box` | object | The detected bounding box in (left, top, width, height) format. | -| Category | `category` | string | The predicted category of the bounding box. | -| RLE | `rle` | string | Run Length Encoding (RLE) of instance mask within the bounding box. | -| Score | `score` | number | The confidence score of the predicted instance object. | -
-

Bounding Box

+

Stuffs

-The detected bounding box in (left, top, width, height) format. +A list of RLE binary masks.
| Field | Field ID | Format | Note | | :--- | :--- | :--- | :--- | -| Height | `height` | number | Bounding box height value | -| Left | `left` | number | Bounding box left x-axis value | -| Top | `top` | number | Bounding box top y-axis value | -| Width | `width` | number | Bounding box width value | +| Category | `category` | string | Category text string corresponding to each stuff mask. | +| RLE | `rle` | string | Run Length Encoding (RLE) of each stuff mask within the image. |
@@ -385,35 +397,23 @@ The detected bounding box in (left, top, width, height) format. -### Draw Semantic Segmentation +### Resize -Draw semantic segmentation result on the image. +Resize image to the specified size.
| Input | Field ID | Format | Description | | :--- | :--- | :--- | :--- | -| Task ID (required) | `task` | string | `TASK_DRAW_SEMANTIC_SEGMENTATION` | +| Task ID (required) | `task` | string | `TASK_RESIZE` | | Image (required) | `image` | string | Input image. | -| [Stuffs](#draw-semantic-segmentation-stuffs) (required) | `stuffs` | array[object] | A list of RLE binary masks. | +| Ratio | `ratio` | number | Resize ratio (e.g., 0.5 for half size, 2 for double size) to resize the image. If ratio is provided, width and height will be ignored. | +| Width | `width` | integer | Width of the output image. | +| Height | `height` | integer | Height of the output image. |
-
- Input Objects in Draw Semantic Segmentation - -

Stuffs

- -A list of RLE binary masks. - -
-| Field | Field ID | Format | Note | -| :--- | :--- | :--- | :--- | -| Category | `category` | string | Category text string corresponding to each stuff mask. | -| RLE | `rle` | string | Run Length Encoding (RLE) of each stuff mask within the image. | -
-
diff --git a/pkg/component/operator/image/v0/config/definition.yaml b/pkg/component/operator/image/v0/config/definition.yaml index 00110ae99..70b37a2b2 100644 --- a/pkg/component/operator/image/v0/config/definition.yaml +++ b/pkg/component/operator/image/v0/config/definition.yaml @@ -1,13 +1,3 @@ -availableTasks: -- TASK_CONCAT -- TASK_CROP -- TASK_RESIZE -- TASK_DRAW_CLASSIFICATION -- TASK_DRAW_DETECTION -- TASK_DRAW_KEYPOINT -- TASK_DRAW_OCR -- TASK_DRAW_INSTANCE_SEGMENTATION -- TASK_DRAW_SEMANTIC_SEGMENTATION custom: false documentationUrl: https://www.instill.tech/docs/component/operator/image icon: assets/image.svg diff --git a/pkg/component/operator/json/v0/README.mdx b/pkg/component/operator/json/v0/README.mdx index da2b6211c..aac6f1f23 100644 --- a/pkg/component/operator/json/v0/README.mdx +++ b/pkg/component/operator/json/v0/README.mdx @@ -7,10 +7,10 @@ description: "Learn about how to set up a VDP JSON component https://github.com/ The JSON component is an operator component that allows users to manipulate and convert JSON entities. It can carry out the following tasks: -- [Marshal](#marshal) -- [Unmarshal](#unmarshal) - [jq](#jq) +- [Marshal](#marshal) - [Rename Fields](#rename-fields) +- [Unmarshal](#unmarshal) @@ -32,56 +32,6 @@ The component definition and tasks are defined in the [definition.yaml](https:// ## Supported Tasks -### Marshal - -Convert JSON to a string - -
- -| Input | Field ID | Format | Description | -| :--- | :--- | :--- | :--- | -| Task ID (required) | `task` | string | `TASK_MARSHAL` | -| JSON (required) | `json` | any | JSON entity to be marshaled. It can be any valid JSON datatype (e.g. number, string, hash, array). | -
- - - - - - -
- -| Output | Field ID | Format | Description | -| :--- | :--- | :--- | :--- | -| JSON String | `string` | string | String representation of the JSON input. | -
- - -### Unmarshal - -Convert a string to JSON - -
- -| Input | Field ID | Format | Description | -| :--- | :--- | :--- | :--- | -| Task ID (required) | `task` | string | `TASK_UNMARSHAL` | -| String (required) | `string` | string | JSON string to be unmarshaled. It can represent any valid JSON datatype (e.g. number, string, hash, array). | -
- - - - - - -
- -| Output | Field ID | Format | Description | -| :--- | :--- | :--- | :--- | -| JSON | `json` | json | JSON entity extracted from the string input. | -
- - ### jq Process JSON through a `jq` command @@ -131,6 +81,31 @@ to access such fields in a `jq` filter is by wrapping the key in double quotes: | :--- | :--- | :--- | | `[{"key-a": "value1"}, {"key-a": "value2"}]` | `.[] \| ."key-a"` | `["value1", "value2"]` | +### Marshal + +Convert JSON to a string + +
+ +| Input | Field ID | Format | Description | +| :--- | :--- | :--- | :--- | +| Task ID (required) | `task` | string | `TASK_MARSHAL` | +| JSON (required) | `json` | any | JSON entity to be marshaled. It can be any valid JSON datatype (e.g. number, string, hash, array). | +
+ + + + + + +
+ +| Output | Field ID | Format | Description | +| :--- | :--- | :--- | :--- | +| JSON String | `string` | string | String representation of the JSON input. | +
+ + ### Rename Fields Rename fields in a JSON object with a conflict resolution strategy. If the new field already exists, it will be overwritten by default. @@ -172,6 +147,31 @@ An array of objects specifying the fields to be renamed. +### Unmarshal + +Convert a string to JSON + +
+ +| Input | Field ID | Format | Description | +| :--- | :--- | :--- | :--- | +| Task ID (required) | `task` | string | `TASK_UNMARSHAL` | +| String (required) | `string` | string | JSON string to be unmarshaled. It can represent any valid JSON datatype (e.g. number, string, hash, array). | +
+ + + + + + +
+ +| Output | Field ID | Format | Description | +| :--- | :--- | :--- | :--- | +| JSON | `json` | json | JSON entity extracted from the string input. | +
+ + ## Example Recipes diff --git a/pkg/component/operator/json/v0/config/definition.yaml b/pkg/component/operator/json/v0/config/definition.yaml index ce1c0b515..afe7b741d 100644 --- a/pkg/component/operator/json/v0/config/definition.yaml +++ b/pkg/component/operator/json/v0/config/definition.yaml @@ -1,8 +1,3 @@ -availableTasks: -- TASK_MARSHAL -- TASK_UNMARSHAL -- TASK_JQ -- TASK_RENAME_FIELDS custom: false documentationUrl: https://www.instill.tech/docs/component/operator/json icon: assets/json.svg diff --git a/pkg/component/operator/text/v0/config/definition.yaml b/pkg/component/operator/text/v0/config/definition.yaml index 22ed94f83..f23152c03 100644 --- a/pkg/component/operator/text/v0/config/definition.yaml +++ b/pkg/component/operator/text/v0/config/definition.yaml @@ -1,5 +1,3 @@ -availableTasks: -- TASK_CHUNK_TEXT custom: false documentationUrl: https://www.instill.tech/docs/component/operator/text icon: assets/text.svg diff --git a/pkg/component/operator/video/v0/README.mdx b/pkg/component/operator/video/v0/README.mdx index fe1f0c25c..9483a7d10 100644 --- a/pkg/component/operator/video/v0/README.mdx +++ b/pkg/component/operator/video/v0/README.mdx @@ -7,11 +7,11 @@ description: "Learn about how to set up a VDP Video component https://github.com The Video component is an operator component that allows users to operate video data. It can carry out the following tasks: -- [Segment](#segment) -- [Subsample](#subsample) +- [Embed Audio](#embed-audio) - [Extract Audio](#extract-audio) - [Extract Frames](#extract-frames) -- [Embed Audio](#embed-audio) +- [Segment](#segment) +- [Subsample](#subsample) @@ -33,35 +33,21 @@ The component definition and tasks are defined in the [definition.yaml](https:// ## Supported Tasks -### Segment +### Embed Audio -Split a video into multiple shorter clips based on user-defined time segments. This task takes a video input and an optional list of time ranges, then produces an array of video segments corresponding to those ranges. Each segment becomes a separate video clip, enabling precise extraction of specific portions from the original content for targeted use or analysis. +Embed an audio to the existing video
| Input | Field ID | Format | Description | | :--- | :--- | :--- | :--- | -| Task ID (required) | `task` | string | `TASK_SEGMENT` | -| Video (required) | `video` | string | The source video file to be segmented. This video will be split into multiple clips based on the specified time segments. | -| [Segments](#segment-segments) | `segments` | array[object] | An array of time segments defining the portions of the video to be extracted. Each segment specifies a start and end time, and the task will create separate video clips for each of these segments. If not provided, the entire video will be treated as a single segment. | +| Task ID (required) | `task` | string | `TASK_EMBED_AUDIO` | +| Audio (required) | `audio` | any | Audio data to embed to video | +| Video (required) | `video` | any | Video input to be embedded with provided audio |
-
- Input Objects in Segment -

Segments

- -An array of time segments defining the portions of the video to be extracted. Each segment specifies a start and end time, and the task will create separate video clips for each of these segments. If not provided, the entire video will be treated as a single segment. - -
- -| Field | Field ID | Format | Note | -| :--- | :--- | :--- | :--- | -| End Time | `end-time` | number | The number of seconds from the beginning of the audio file to the end of this segment. | -| Start Time | `start-time` | number | The number of seconds from the beginning of the audio file to the start of this segment. | -
-
@@ -69,25 +55,20 @@ An array of time segments defining the portions of the video to be extracted. Ea | Output | Field ID | Format | Description | | :--- | :--- | :--- | :--- | -| Videos | `video-segments` | array[string] | An array of video clips resulting from the segmentation process. Each element in this array corresponds to one of the input segments and contains the video data for that specific time range from the original video. | +| Video | `video` | video | Final video embedded with audio | -### Subsample +### Extract Audio -Reduce video file size by adjusting frame rate, bitrate, and dimensions while maintaining visual content. This task optimizes storage and bandwidth requirements with minimal quality loss. +Extract the audio track from a video file, creating a standalone audio output. This task takes a video input and isolates its sound component, removing all visual elements. The resulting audio data is provided as a single output, suitable for further audio processing, analysis, or use in audio-only applications.
| Input | Field ID | Format | Description | | :--- | :--- | :--- | :--- | -| Task ID (required) | `task` | string | `TASK_SUBSAMPLE` | -| Video (required) | `video` | string | The source video file to be subsampled. | -| FPS | `fps` | number | The target frame rate for the subsampled video, in frames per second. Determines the number of frames in the output video. Must provide at least one of: video-bitrate, audio-bitrate, fps, width, or height. | -| Video Bitrate | `video-bitrate` | number | The target video bitrate for the subsampled video, in bits per second. Controls the output video's data rate, affecting file size and quality. Must provide at least one of: video-bitrate, audio-bitrate, fps, width, or height. | -| Width | `width` | integer | The width of the subsampled video, in pixels. Controls the output video's horizontal resolution. If only width is provided, height is auto-calculated to maintain aspect ratio. Must provide at least one of: video-bitrate, audio-bitrate, fps, width, or height. | -| Audio Bitrate | `audio-bitrate` | number | The target audio bitrate for the subsampled video, in bits per second. Controls the output video's audio data rate, affecting file size and quality. Must provide at least one of: video-bitrate, audio-bitrate, fps, width, or height. | -| Height | `height` | integer | The height of the subsampled video, in pixels. Controls the output video's vertical resolution. If only height is provided, width is auto-calculated to maintain aspect ratio. Must provide at least one of: video-bitrate, audio-bitrate, fps, width, or height. | +| Task ID (required) | `task` | string | `TASK_EXTRACT_AUDIO` | +| Video (required) | `video` | string | The source video file from which the audio will be extracted. The video's visual content will be discarded, and only the audio track will be processed. |
@@ -99,20 +80,22 @@ Reduce video file size by adjusting frame rate, bitrate, and dimensions while ma | Output | Field ID | Format | Description | | :--- | :--- | :--- | :--- | -| Video | `video` | video/* | The subsampled video data, processed according to the specified input parameters. Maintains the content of the original video with potentially reduced file size due to changes in frame rate, bitrate, or dimensions. | +| Audio | `audio` | audio/* | The extracted audio data from the input video. This is a standalone audio file containing only the sound component of the original video, with all visual elements removed. The audio format may vary depending on the original video's audio codec and the extraction process. | -### Extract Audio +### Extract Frames -Extract the audio track from a video file, creating a standalone audio output. This task takes a video input and isolates its sound component, removing all visual elements. The resulting audio data is provided as a single output, suitable for further audio processing, analysis, or use in audio-only applications. +Extract image frames from a video at regular intervals or specified timestamps. This task takes a video input and either an interval value or a list of timestamps. It then produces an array of image frames corresponding to these specifications, allowing for precise capture of key moments or creation of a sequence of still images from the video content.
| Input | Field ID | Format | Description | | :--- | :--- | :--- | :--- | -| Task ID (required) | `task` | string | `TASK_EXTRACT_AUDIO` | -| Video (required) | `video` | string | The source video file from which the audio will be extracted. The video's visual content will be discarded, and only the audio track will be processed. | +| Task ID (required) | `task` | string | `TASK_EXTRACT_FRAMES` | +| Video (required) | `video` | string | The source video file from which frames will be extracted. | +| Interval | `interval` | number | The time interval between extracted frames, in seconds. If specified, frames will be extracted at regular intervals throughout the video. This parameter is mutually exclusive with `timestamps`. | +| Timestamps | `timestamps` | array | An array of specific timestamps (in seconds) at which to extract frames from the video. If provided, frames will be extracted only at these exact times. This parameter is mutually exclusive with `interval`. |
@@ -124,26 +107,39 @@ Extract the audio track from a video file, creating a standalone audio output. T | Output | Field ID | Format | Description | | :--- | :--- | :--- | :--- | -| Audio | `audio` | audio/* | The extracted audio data from the input video. This is a standalone audio file containing only the sound component of the original video, with all visual elements removed. The audio format may vary depending on the original video's audio codec and the extraction process. | +| Frames | `frames` | array[string] | Extracted video frames. | -### Extract Frames +### Segment -Extract image frames from a video at regular intervals or specified timestamps. This task takes a video input and either an interval value or a list of timestamps. It then produces an array of image frames corresponding to these specifications, allowing for precise capture of key moments or creation of a sequence of still images from the video content. +Split a video into multiple shorter clips based on user-defined time segments. This task takes a video input and an optional list of time ranges, then produces an array of video segments corresponding to those ranges. Each segment becomes a separate video clip, enabling precise extraction of specific portions from the original content for targeted use or analysis.
| Input | Field ID | Format | Description | | :--- | :--- | :--- | :--- | -| Task ID (required) | `task` | string | `TASK_EXTRACT_FRAMES` | -| Video (required) | `video` | string | The source video file from which frames will be extracted. | -| Interval | `interval` | number | The time interval between extracted frames, in seconds. If specified, frames will be extracted at regular intervals throughout the video. This parameter is mutually exclusive with `timestamps`. | -| Timestamps | `timestamps` | array | An array of specific timestamps (in seconds) at which to extract frames from the video. If provided, frames will be extracted only at these exact times. This parameter is mutually exclusive with `interval`. | +| Task ID (required) | `task` | string | `TASK_SEGMENT` | +| Video (required) | `video` | string | The source video file to be segmented. This video will be split into multiple clips based on the specified time segments. | +| [Segments](#segment-segments) | `segments` | array[object] | An array of time segments defining the portions of the video to be extracted. Each segment specifies a start and end time, and the task will create separate video clips for each of these segments. If not provided, the entire video will be treated as a single segment. |
+
+ Input Objects in Segment +

Segments

+ +An array of time segments defining the portions of the video to be extracted. Each segment specifies a start and end time, and the task will create separate video clips for each of these segments. If not provided, the entire video will be treated as a single segment. + +
+ +| Field | Field ID | Format | Note | +| :--- | :--- | :--- | :--- | +| End Time | `end-time` | number | The number of seconds from the beginning of the audio file to the end of this segment. | +| Start Time | `start-time` | number | The number of seconds from the beginning of the audio file to the start of this segment. | +
+
@@ -151,21 +147,25 @@ Extract image frames from a video at regular intervals or specified timestamps. | Output | Field ID | Format | Description | | :--- | :--- | :--- | :--- | -| Frames | `frames` | array[string] | Extracted video frames. | +| Videos | `video-segments` | array[string] | An array of video clips resulting from the segmentation process. Each element in this array corresponds to one of the input segments and contains the video data for that specific time range from the original video. | -### Embed Audio +### Subsample -Embed an audio to the existing video +Reduce video file size by adjusting frame rate, bitrate, and dimensions while maintaining visual content. This task optimizes storage and bandwidth requirements with minimal quality loss.
| Input | Field ID | Format | Description | | :--- | :--- | :--- | :--- | -| Task ID (required) | `task` | string | `TASK_EMBED_AUDIO` | -| Audio (required) | `audio` | any | Audio data to embed to video | -| Video (required) | `video` | any | Video input to be embedded with provided audio | +| Task ID (required) | `task` | string | `TASK_SUBSAMPLE` | +| Video (required) | `video` | string | The source video file to be subsampled. | +| FPS | `fps` | number | The target frame rate for the subsampled video, in frames per second. Determines the number of frames in the output video. Must provide at least one of: video-bitrate, audio-bitrate, fps, width, or height. | +| Video Bitrate | `video-bitrate` | number | The target video bitrate for the subsampled video, in bits per second. Controls the output video's data rate, affecting file size and quality. Must provide at least one of: video-bitrate, audio-bitrate, fps, width, or height. | +| Width | `width` | integer | The width of the subsampled video, in pixels. Controls the output video's horizontal resolution. If only width is provided, height is auto-calculated to maintain aspect ratio. Must provide at least one of: video-bitrate, audio-bitrate, fps, width, or height. | +| Audio Bitrate | `audio-bitrate` | number | The target audio bitrate for the subsampled video, in bits per second. Controls the output video's audio data rate, affecting file size and quality. Must provide at least one of: video-bitrate, audio-bitrate, fps, width, or height. | +| Height | `height` | integer | The height of the subsampled video, in pixels. Controls the output video's vertical resolution. If only height is provided, width is auto-calculated to maintain aspect ratio. Must provide at least one of: video-bitrate, audio-bitrate, fps, width, or height. |
@@ -177,7 +177,7 @@ Embed an audio to the existing video | Output | Field ID | Format | Description | | :--- | :--- | :--- | :--- | -| Video | `video` | video | Final video embedded with audio | +| Video | `video` | video/* | The subsampled video data, processed according to the specified input parameters. Maintains the content of the original video with potentially reduced file size due to changes in frame rate, bitrate, or dimensions. | diff --git a/pkg/component/operator/video/v0/config/definition.yaml b/pkg/component/operator/video/v0/config/definition.yaml index 67a88753f..d746a5d54 100644 --- a/pkg/component/operator/video/v0/config/definition.yaml +++ b/pkg/component/operator/video/v0/config/definition.yaml @@ -1,9 +1,3 @@ -availableTasks: -- TASK_SEGMENT -- TASK_SUBSAMPLE -- TASK_EXTRACT_AUDIO -- TASK_EXTRACT_FRAMES -- TASK_EMBED_AUDIO documentationUrl: https://www.instill.tech/docs/component/operator/video icon: assets/video.svg id: video diff --git a/pkg/component/operator/web/v0/config/definition.yaml b/pkg/component/operator/web/v0/config/definition.yaml index 3a31a88dc..83a2ac00b 100644 --- a/pkg/component/operator/web/v0/config/definition.yaml +++ b/pkg/component/operator/web/v0/config/definition.yaml @@ -1,7 +1,3 @@ -availableTasks: -- TASK_CRAWL_SITE -- TASK_SCRAPE_PAGES -- TASK_SCRAPE_SITEMAP documentationUrl: https://www.instill.tech/docs/component/operator/web icon: assets/web.svg id: web diff --git a/pkg/component/tools/compogen/README.md b/pkg/component/tools/compogen/README.md index fdef08255..8368c6bf8 100644 --- a/pkg/component/tools/compogen/README.md +++ b/pkg/component/tools/compogen/README.md @@ -38,8 +38,6 @@ following fields must be present and comply with the following guidelines: [protobufs](https://github.com/instill-ai/protobufs/blob/main/vdp/pipeline/v1beta/component_definition.proto). - `type` - Component definitions must contain this field and its value must match one of the (string) values, defined in [protobufs](https://github.com/instill-ai/protobufs/blob/main/vdp/pipeline/v1beta/component_definition.proto). -- `availableTasks` - This array must have at least one value, which should be - one of the root-level keys in the `tasks.yaml` file. - `sourceUrl` - Must be a valid URL. It must not end with a slash, as the definitions path will be appended. diff --git a/pkg/component/tools/compogen/cmd/testdata/readme-component1.txt b/pkg/component/tools/compogen/cmd/testdata/readme-component1.txt index cadc976a8..2f2796d80 100644 --- a/pkg/component/tools/compogen/cmd/testdata/readme-component1.txt +++ b/pkg/component/tools/compogen/cmd/testdata/readme-component1.txt @@ -14,8 +14,6 @@ compogen readme ./pkg/dummy/config ./pkg/dummy/README.mdx --extraContents setup= cmp pkg/dummy/README.mdx want-readme.mdx -- definition.yaml -- -availableTasks: - - TASK_DUMMY public: true id: dummy title: Dummy diff --git a/pkg/component/tools/compogen/cmd/testdata/readme-component2.txt b/pkg/component/tools/compogen/cmd/testdata/readme-component2.txt index 556b6f87a..d3a4ca953 100644 --- a/pkg/component/tools/compogen/cmd/testdata/readme-component2.txt +++ b/pkg/component/tools/compogen/cmd/testdata/readme-component2.txt @@ -27,9 +27,6 @@ compogen readme ./pkg/dummy/config ./pkg/dummy/README.mdx --extraContents TASK_D cmp pkg/dummy/README.mdx want-readme.mdx -- definition.yaml -- -availableTasks: - - TASK_DUMMY - - TASK_DUMMIER_THAN_DUMMY public: true spec: {} id: dummy diff --git a/pkg/component/tools/compogen/go.mod b/pkg/component/tools/compogen/go.mod index 09053c162..aada64ad8 100644 --- a/pkg/component/tools/compogen/go.mod +++ b/pkg/component/tools/compogen/go.mod @@ -5,12 +5,14 @@ go 1.22.5 require ( github.com/frankban/quicktest v1.14.6 github.com/go-playground/validator/v10 v10.22.0 - github.com/instill-ai/pipeline-backend v0.49.1-beta.0.20241224134251-c4a675c31007 + github.com/instill-ai/pipeline-backend v0.49.1-beta.0.20241225070636-1d7ceb88b650 github.com/instill-ai/protogen-go v0.3.3-alpha.0.20241213145904-c3d8111872b5 github.com/rogpeppe/go-internal v1.12.0 github.com/russross/blackfriday/v2 v2.1.0 github.com/spf13/cobra v1.8.0 + github.com/wk8/go-ordered-map/v2 v2.1.8 golang.org/x/text v0.21.0 + gopkg.in/yaml.v3 v3.0.1 ) require ( @@ -22,6 +24,8 @@ require ( github.com/advancedlogic/GoOse v0.0.0-20191112112754-e742535969c1 // indirect github.com/andybalholm/cascadia v1.3.2 // indirect github.com/araddon/dateparse v0.0.0-20200409225146-d820a6159ab1 // indirect + github.com/bahlo/generic-list-go v0.2.0 // indirect + github.com/buger/jsonparser v1.1.1 // indirect github.com/cespare/xxhash/v2 v2.3.0 // indirect github.com/davecgh/go-spew v1.1.1 // indirect github.com/dgryski/go-rendezvous v0.0.0-20200823014737-9f7001d12a5f // indirect @@ -65,6 +69,7 @@ require ( github.com/lestrrat-go/pdebug v0.0.0-20210111095411-35b07dbf089b // indirect github.com/lestrrat-go/structinfo v0.0.0-20210312050401-7f8bd69d6acb // indirect github.com/levigross/exp-html v0.0.0-20120902181939-8df60c69a8f5 // indirect + github.com/mailru/easyjson v0.7.7 // indirect github.com/mattn/go-runewidth v0.0.15 // indirect github.com/minio/md5-simd v1.1.2 // indirect github.com/minio/minio-go/v7 v7.0.76 // indirect @@ -109,5 +114,4 @@ require ( google.golang.org/genproto/googleapis/rpc v0.0.0-20240722135656-d784300faade // indirect google.golang.org/grpc v1.65.0 // indirect google.golang.org/protobuf v1.34.2 // indirect - gopkg.in/yaml.v3 v3.0.1 // indirect ) diff --git a/pkg/component/tools/compogen/go.sum b/pkg/component/tools/compogen/go.sum index 7ce24b692..bc7980d2d 100644 --- a/pkg/component/tools/compogen/go.sum +++ b/pkg/component/tools/compogen/go.sum @@ -429,6 +429,8 @@ github.com/aws/aws-sdk-go-v2/service/internal/presigned-url v1.3.2/go.mod h1:72H github.com/aws/aws-sdk-go-v2/service/sso v1.4.2/go.mod h1:NBvT9R1MEF+Ud6ApJKM0G+IkPchKS7p7c2YPKwHmBOk= github.com/aws/aws-sdk-go-v2/service/sts v1.7.2/go.mod h1:8EzeIqfWt2wWT4rJVu3f21TfrhJ8AEMzVybRNSb/b4g= github.com/aws/smithy-go v1.8.0/go.mod h1:SObp3lf9smib00L/v3U2eAKG8FyQ7iLrJnQiAmR5n+E= +github.com/bahlo/generic-list-go v0.2.0 h1:5sz/EEAK+ls5wF+NeqDpk5+iNdMDXrh3z3nPnH1Wvgk= +github.com/bahlo/generic-list-go v0.2.0/go.mod h1:2KvAjgMlE5NNynlg/5iLrrCCZ2+5xWbdbCW3pNTGyYg= github.com/beorn7/perks v0.0.0-20180321164747-3a771d992973/go.mod h1:Dwedo/Wpr24TaqPxmxbtue+5NUziq4I4S80YR8gNf3Q= github.com/beorn7/perks v1.0.0/go.mod h1:KWe93zE9D1o94FZ5RNwFwVgaQK1VOXiVxmqh+CedLV8= github.com/beorn7/perks v1.0.1/go.mod h1:G2ZrVWU2WbWT9wwq4/hrbKbnv/1ERSJQ0ibhJ6rlkpw= @@ -437,6 +439,8 @@ github.com/bsm/ginkgo/v2 v2.12.0 h1:Ny8MWAHyOepLGlLKYmXG4IEkioBysk6GpaRTLC8zwWs= github.com/bsm/ginkgo/v2 v2.12.0/go.mod h1:SwYbGRRDovPVboqFv0tPTcG1sN61LM1Z4ARdbAV9g4c= github.com/bsm/gomega v1.27.10 h1:yeMWxP2pV2fG3FgAODIY8EiRE3dy0aeFYt4l7wh6yKA= github.com/bsm/gomega v1.27.10/go.mod h1:JyEr/xRbxbtgWNi8tIEVPUYZ5Dzef52k01W3YH0H+O0= +github.com/buger/jsonparser v1.1.1 h1:2PnMjfWD7wBILjqQbt530v576A/cAbQvEW9gGIpYMUs= +github.com/buger/jsonparser v1.1.1/go.mod h1:6RYKKt7H4d4+iWqouImQ9R2FZql3VbhNgx27UK13J/0= github.com/census-instrumentation/opencensus-proto v0.2.1/go.mod h1:f6KPmirojxKA12rnyqOA5BBL4O983OfeGPqjHWSTneU= github.com/census-instrumentation/opencensus-proto v0.3.0/go.mod h1:f6KPmirojxKA12rnyqOA5BBL4O983OfeGPqjHWSTneU= github.com/cespare/xxhash v1.1.0/go.mod h1:XrSqR1VqqWfGrhpAt58auRo0WTKS1nRRg3ghfAqPWnc= @@ -694,8 +698,8 @@ github.com/ianlancetaylor/demangle v0.0.0-20181102032728-5e5cf60278f6/go.mod h1: github.com/ianlancetaylor/demangle v0.0.0-20200824232613-28f6c0f3b639/go.mod h1:aSSvb/t6k1mPoxDqO4vJh6VOCGPwU4O0C2/Eqndh1Sc= github.com/inconshreveable/mousetrap v1.1.0 h1:wN+x4NVGpMsO7ErUn/mUI3vEoE6Jt13X2s0bqwp9tc8= github.com/inconshreveable/mousetrap v1.1.0/go.mod h1:vpF70FUmC8bwa3OWnCshd2FqLfsEA9PFc4w1p2J65bw= -github.com/instill-ai/pipeline-backend v0.49.1-beta.0.20241224134251-c4a675c31007 h1:YrF2mMKfyiJm+itKDLEH3cDWDZjS7JAmfAdISTVlmxM= -github.com/instill-ai/pipeline-backend v0.49.1-beta.0.20241224134251-c4a675c31007/go.mod h1:blCbRLxPUsNFFGldDRTQd4/Uu7KKNP0vfAT70STlS9E= +github.com/instill-ai/pipeline-backend v0.49.1-beta.0.20241225070636-1d7ceb88b650 h1:FKXLGmv3kfLsW0OEU9DjQgyezxnGzXdwixzR4fUP1H8= +github.com/instill-ai/pipeline-backend v0.49.1-beta.0.20241225070636-1d7ceb88b650/go.mod h1:blCbRLxPUsNFFGldDRTQd4/Uu7KKNP0vfAT70STlS9E= github.com/instill-ai/protogen-go v0.3.3-alpha.0.20241213145904-c3d8111872b5 h1:5338ZeuB/C50P8aUOUKstjBSAQaWqmrdrAK2i9AbWk8= github.com/instill-ai/protogen-go v0.3.3-alpha.0.20241213145904-c3d8111872b5/go.mod h1:rf0UY7VpEgpaLudYEcjx5rnbuwlBaaLyD4FQmWLtgAY= github.com/instill-ai/x v0.6.0-alpha h1:HaKCrRgQb4rY3K0c8A+EGp4oT5oxaoP760XtjPOrZPw= @@ -707,6 +711,7 @@ github.com/jmespath/go-jmespath v0.4.0/go.mod h1:T8mJZnbsbmF+m6zOOFylbeCJqk5+pHW github.com/jmespath/go-jmespath/internal/testify v1.5.1/go.mod h1:L3OGu8Wl2/fWfCI6z80xFu9LTZmf1ZRjMHUOPmWr69U= github.com/joho/godotenv v1.3.0 h1:Zjp+RcGpHhGlrMbJzXTrZZPrWj+1vfm90La1wgB6Bhc= github.com/joho/godotenv v1.3.0/go.mod h1:7hK45KPybAkOC6peb+G5yklZfMxEjkZhHbwpqxOKXbg= +github.com/josharian/intern v1.0.0/go.mod h1:5DoeVV0s6jJacbCEi61lwdGj/aVlrQvzHFFd8Hwg//Y= github.com/jpillora/backoff v1.0.0/go.mod h1:J/6gKK9jxlEcS3zixgDgUAsiuZ7yrSoa/FX5e0EB2j4= github.com/json-iterator/go v1.1.6/go.mod h1:+SdeFBvtyEkXs7REEP0seUULqWtbJapLOCVDaaPEHmU= github.com/json-iterator/go v1.1.10/go.mod h1:KdQUCv79m/52Kvf8AW2vK1V8akMuk1QjK/uOdHXbAo4= @@ -751,6 +756,8 @@ github.com/lestrrat-go/structinfo v0.0.0-20210312050401-7f8bd69d6acb h1:DDg5u5lk github.com/lestrrat-go/structinfo v0.0.0-20210312050401-7f8bd69d6acb/go.mod h1:i+E8Uf04vf2QjOWyJdGY75vmG+4rxiZW2kIj1lTB5mo= github.com/levigross/exp-html v0.0.0-20120902181939-8df60c69a8f5 h1:W7p+m/AECTL3s/YR5RpQ4hz5SjNeKzZBl1q36ws12s0= github.com/levigross/exp-html v0.0.0-20120902181939-8df60c69a8f5/go.mod h1:QMe2wuKJ0o7zIVE8AqiT8rd8epmm6WDIZ2wyuBqYPzM= +github.com/mailru/easyjson v0.7.7 h1:UGYAvKxe3sBsEDzO8ZeWOSlIQfWFlxbzLZe7hwFURr0= +github.com/mailru/easyjson v0.7.7/go.mod h1:xzfreul335JAWq5oZzymOObrkdz5UnU4kGfJJLY9Nlc= github.com/mattn/go-colorable v0.0.9/go.mod h1:9vuHe8Xs5qXnSaW/c/ABM9alt+Vo+STaOChaDxuIBZU= github.com/mattn/go-colorable v0.1.4/go.mod h1:U0ppj6V5qS13XJ6of8GYAs25YV2eR4EVcfRqFIhoBtE= github.com/mattn/go-colorable v0.1.6/go.mod h1:u6P/XSegPjTcexA+o6vUJrdnUu04hMope9wVRipJSqc= @@ -898,6 +905,8 @@ github.com/stretchr/testify v1.8.0/go.mod h1:yNjHg4UonilssWZ8iaSj1OCr/vHnekPRkoO github.com/stretchr/testify v1.8.1/go.mod h1:w2LPCIKwWwSfY2zedu0+kehJoqGctiVI29o6fzry7u4= github.com/stretchr/testify v1.9.0 h1:HtqpIVDClZ4nwg75+f6Lvsy/wHu+3BoSGCbBAcpTsTg= github.com/stretchr/testify v1.9.0/go.mod h1:r2ic/lqez/lEtzL7wO/rwa5dbSLXVDPFyf8C91i36aY= +github.com/wk8/go-ordered-map/v2 v2.1.8 h1:5h/BUHu93oj4gIdvHHHGsScSTMijfx5PeYkE/fJgbpc= +github.com/wk8/go-ordered-map/v2 v2.1.8/go.mod h1:5nJHM5DyteebpVlHnWMV0rPz6Zp7+xBAnxjb1X5vnTw= github.com/xuri/efp v0.0.0-20231025114914-d1ff6096ae53 h1:Chd9DkqERQQuHpXjR/HSV1jLZA6uaoiwwH3vSuF3IW0= github.com/xuri/efp v0.0.0-20231025114914-d1ff6096ae53/go.mod h1:ybY/Jr0T0GTCnYjKqmdwxyxn2BQf2RcQIIvex5QldPI= github.com/xuri/excelize/v2 v2.8.1 h1:pZLMEwK8ep+CLIUWpWmvW8IWE/yxqG0I1xcN6cVMGuQ= diff --git a/pkg/component/tools/compogen/pkg/gen/definition.go b/pkg/component/tools/compogen/pkg/gen/definition.go index 668779abb..15dcc1229 100644 --- a/pkg/component/tools/compogen/pkg/gen/definition.go +++ b/pkg/component/tools/compogen/pkg/gen/definition.go @@ -33,12 +33,11 @@ func (rs releaseStage) String() string { } type definition struct { - ID string `json:"id" validate:"required"` - Title string `json:"title" validate:"required"` - Description string `json:"description" validate:"required"` - ReleaseStage releaseStage `json:"releaseStage" validate:"required"` - AvailableTasks []string `json:"availableTasks"` - SourceURL string `json:"sourceUrl" validate:"url"` + ID string `json:"id" validate:"required"` + Title string `json:"title" validate:"required"` + Description string `json:"description" validate:"required"` + ReleaseStage releaseStage `json:"releaseStage" validate:"required"` + SourceURL string `json:"sourceUrl" validate:"url"` Public bool `json:"public"` Type string `json:"type"` diff --git a/pkg/component/tools/compogen/pkg/gen/definition_test.go b/pkg/component/tools/compogen/pkg/gen/definition_test.go index 032a4e397..d4caf2845 100644 --- a/pkg/component/tools/compogen/pkg/gen/definition_test.go +++ b/pkg/component/tools/compogen/pkg/gen/definition_test.go @@ -17,13 +17,12 @@ func TestDefinition_Validate(t *testing.T) { // Returns a valid struct validStruct := func() *definition { return &definition{ - ID: "foo", - Title: "Foo", - Description: "Foo bar", - Public: false, - ReleaseStage: 3, - AvailableTasks: []string{"TASK_1", "TASK_2"}, - SourceURL: "https://github.com/instill-ai", + ID: "foo", + Title: "Foo", + Description: "Foo bar", + Public: false, + ReleaseStage: 3, + SourceURL: "https://github.com/instill-ai", } } diff --git a/pkg/component/tools/compogen/pkg/gen/readme.go b/pkg/component/tools/compogen/pkg/gen/readme.go index a500e5e0e..6cd2388f2 100644 --- a/pkg/component/tools/compogen/pkg/gen/readme.go +++ b/pkg/component/tools/compogen/pkg/gen/readme.go @@ -18,6 +18,8 @@ import ( "github.com/go-playground/validator/v10" "github.com/russross/blackfriday/v2" + orderedmap "github.com/wk8/go-ordered-map/v2" + "github.com/instill-ai/pipeline-backend/pkg/component/resources/schemas" componentbase "github.com/instill-ai/pipeline-backend/pkg/component/base" @@ -109,7 +111,7 @@ func (g *READMEGenerator) parseSetup(configDir string) (s *objectSchema, err err return setup, nil } -func (g *READMEGenerator) parseTasks(configDir string) (map[string]task, error) { +func (g *READMEGenerator) parseTasks(configDir string) (*orderedmap.OrderedMap[string, task], error) { tasksYAML, err := os.ReadFile(filepath.Join(configDir, tasksFile)) if err != nil { return nil, err @@ -147,7 +149,7 @@ func (g *READMEGenerator) parseTasks(configDir string) (map[string]task, error) if err != nil { return nil, err } - tasks := map[string]task{} + tasks := orderedmap.New[string, task]() if err := json.Unmarshal(renderedTasksJSON, &tasks); err != nil { return nil, err } @@ -270,11 +272,11 @@ type readmeParams struct { // parseDefinition converts a component definition and its tasks to the README // template params. -func (p readmeParams) parseDefinition(d definition, s *objectSchema, tasks map[string]task) (readmeParams, error) { +func (p readmeParams) parseDefinition(d definition, s *objectSchema, tasks *orderedmap.OrderedMap[string, task]) (readmeParams, error) { p.ComponentType = toComponentType[d.Type] var err error - if p.Tasks, err = parseREADMETasks(d.AvailableTasks, tasks); err != nil { + if p.Tasks, err = parseREADMETasks(tasks); err != nil { return p, err } @@ -296,16 +298,16 @@ func (p readmeParams) parseDefinition(d definition, s *objectSchema, tasks map[s return p, nil } -func parseREADMETasks(availableTasks []string, tasks map[string]task) ([]readmeTask, error) { - readmeTasks := make([]readmeTask, len(availableTasks)) - for i, at := range availableTasks { - t, ok := tasks[at] - if !ok { - return nil, fmt.Errorf("invalid tasks file:\nmissing %s", at) +func parseREADMETasks(tasks *orderedmap.OrderedMap[string, task]) ([]readmeTask, error) { + readmeTasks := make([]readmeTask, 0, tasks.Len()) + for pair := tasks.Oldest(); pair != nil; pair = pair.Next() { + id := pair.Key + t := pair.Value + if !strings.HasPrefix(id, "TASK_") { + continue } - rt := readmeTask{ - ID: at, + ID: id, Description: t.Description, Input: parseResourceProperties(t.Input), Output: parseResourceProperties(t.Output), @@ -316,12 +318,10 @@ func parseREADMETasks(availableTasks []string, tasks map[string]task) ([]readmeT rt.parseOneOfsProperties(t.Input.Properties) if rt.Title = t.Title; rt.Title == "" { - rt.Title = titleCase(componentbase.TaskIDToTitle(at)) + rt.Title = titleCase(componentbase.TaskIDToTitle(id)) } - - readmeTasks[i] = rt + readmeTasks = append(readmeTasks, rt) } - return readmeTasks, nil }