Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

refactor(component): remove availableTasks and availableEvents from definition files #948

Closed
wants to merge 2 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 0 additions & 7 deletions pkg/component/CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand All @@ -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.
Expand Down
2 changes: 0 additions & 2 deletions pkg/component/ai/anthropic/v0/config/definition.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
availableTasks:
- TASK_TEXT_GENERATION_CHAT
custom: false
documentationUrl: https://www.instill.tech/docs/component/ai/anthropic
icon: assets/anthropic.svg
Expand Down
86 changes: 43 additions & 43 deletions pkg/component/ai/cohere/v0/README.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -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)


Expand Down Expand Up @@ -50,6 +50,48 @@ ${connection.<my-connection-id>}`.

## Supported Tasks

### Text Embeddings

An embedding is a list of floating point numbers that captures semantic information about the text that it represents.

<div class="markdown-col-no-wrap" data-col-1 data-col-2>

| 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. <br/><details><summary><strong>Enum values</strong></summary><ul><li>`float`</li><li>`int8`</li><li>`uint8`</li><li>`binary`</li><li>`ubinary`</li></ul></details> |
| Input Type (required) | `input-type` | string | Specifies the type of input passed to the model. <br/><details><summary><strong>Enum values</strong></summary><ul><li>`search_document`</li><li>`search_query`</li><li>`classification`</li><li>`clustering`</li></ul></details> |
| Model Name (required) | `model-name` | string | The Cohere embed model to be used. <br/><details><summary><strong>Enum values</strong></summary><ul><li>`embed-english-v3.0`</li><li>`embed-multilingual-v3.0`</li><li>`embed-english-light-v3.0`</li><li>`embed-multilingual-light-v3.0`</li></ul></details> |
| Text (required) | `text` | string | The text. |
</div>






<div class="markdown-col-no-wrap" data-col-1 data-col-2>

| 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. |
</div>

<details>
<summary> Output Objects in Text Embeddings</summary>

<h4 id="text-embeddings-usage">Usage</h4>

<div class="markdown-col-no-wrap" data-col-1 data-col-2>

| Field | Field ID | Format | Note |
| :--- | :--- | :--- | :--- |
| Token Count | `tokens` | number | The token count used by Cohere Models. |
</div>
</details>


### 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.
Expand Down Expand Up @@ -147,48 +189,6 @@ The image URL.
</details>


### Text Embeddings

An embedding is a list of floating point numbers that captures semantic information about the text that it represents.

<div class="markdown-col-no-wrap" data-col-1 data-col-2>

| 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. <br/><details><summary><strong>Enum values</strong></summary><ul><li>`float`</li><li>`int8`</li><li>`uint8`</li><li>`binary`</li><li>`ubinary`</li></ul></details> |
| Input Type (required) | `input-type` | string | Specifies the type of input passed to the model. <br/><details><summary><strong>Enum values</strong></summary><ul><li>`search_document`</li><li>`search_query`</li><li>`classification`</li><li>`clustering`</li></ul></details> |
| Model Name (required) | `model-name` | string | The Cohere embed model to be used. <br/><details><summary><strong>Enum values</strong></summary><ul><li>`embed-english-v3.0`</li><li>`embed-multilingual-v3.0`</li><li>`embed-english-light-v3.0`</li><li>`embed-multilingual-light-v3.0`</li></ul></details> |
| Text (required) | `text` | string | The text. |
</div>






<div class="markdown-col-no-wrap" data-col-1 data-col-2>

| 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. |
</div>

<details>
<summary> Output Objects in Text Embeddings</summary>

<h4 id="text-embeddings-usage">Usage</h4>

<div class="markdown-col-no-wrap" data-col-1 data-col-2>

| Field | Field ID | Format | Note |
| :--- | :--- | :--- | :--- |
| Token Count | `tokens` | number | The token count used by Cohere Models. |
</div>
</details>


### 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.
Expand Down
4 changes: 0 additions & 4 deletions pkg/component/ai/cohere/v0/config/definition.yaml
Original file line number Diff line number Diff line change
@@ -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
Expand Down
82 changes: 41 additions & 41 deletions pkg/component/ai/fireworksai/v0/README.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -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)



Expand Down Expand Up @@ -49,6 +49,46 @@ ${connection.<my-connection-id>}`.

## Supported Tasks

### Text Embeddings

An embedding is a list of floating point numbers that captures semantic information about the text that it represents.

<div class="markdown-col-no-wrap" data-col-1 data-col-2>

| 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. <br/><details><summary><strong>Enum values</strong></summary><ul><li>`nomic-ai/nomic-embed-text-v1.5`</li><li>`nomic-ai/nomic-embed-text-v1`</li><li>`WhereIsAI/UAE-Large-V1`</li><li>`thenlper/gte-large`</li><li>`thenlper/gte-base`</li></ul></details> |
| Text (required) | `text` | string | The text. |
</div>






<div class="markdown-col-no-wrap" data-col-1 data-col-2>

| 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. |
</div>

<details>
<summary> Output Objects in Text Embeddings</summary>

<h4 id="text-embeddings-usage">Usage</h4>

<div class="markdown-col-no-wrap" data-col-1 data-col-2>

| Field | Field ID | Format | Note |
| :--- | :--- | :--- | :--- |
| Token Count | `tokens` | number | The token count used by Fireworks AI models. |
</div>
</details>


### 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.
Expand Down Expand Up @@ -134,46 +174,6 @@ The image URL.
</details>


### Text Embeddings

An embedding is a list of floating point numbers that captures semantic information about the text that it represents.

<div class="markdown-col-no-wrap" data-col-1 data-col-2>

| 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. <br/><details><summary><strong>Enum values</strong></summary><ul><li>`nomic-ai/nomic-embed-text-v1.5`</li><li>`nomic-ai/nomic-embed-text-v1`</li><li>`WhereIsAI/UAE-Large-V1`</li><li>`thenlper/gte-large`</li><li>`thenlper/gte-base`</li></ul></details> |
| Text (required) | `text` | string | The text. |
</div>






<div class="markdown-col-no-wrap" data-col-1 data-col-2>

| 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. |
</div>

<details>
<summary> Output Objects in Text Embeddings</summary>

<h4 id="text-embeddings-usage">Usage</h4>

<div class="markdown-col-no-wrap" data-col-1 data-col-2>

| Field | Field ID | Format | Note |
| :--- | :--- | :--- | :--- |
| Token Count | `tokens` | number | The token count used by Fireworks AI models. |
</div>
</details>



## Example Recipes

Expand Down
3 changes: 0 additions & 3 deletions pkg/component/ai/fireworksai/v0/config/definition.yaml
Original file line number Diff line number Diff line change
@@ -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
Expand Down
2 changes: 0 additions & 2 deletions pkg/component/ai/groq/v0/config/definition.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
availableTasks:
- TASK_TEXT_GENERATION_CHAT
documentationUrl: https://www.instill.tech/docs/component/ai/groq
icon: assets/groq.svg
id: groq
Expand Down
Loading
Loading