From e69a7e3f764b0fec3faf3c6b553661f9ce884adf Mon Sep 17 00:00:00 2001 From: Ping-Lin Chang Date: Mon, 30 Dec 2024 20:55:19 +0000 Subject: [PATCH] ci(pre-commit): add yamlfmt --- .golangci.yaml | 4 +- .pre-commit-config.yaml | 13 + go.mod | 33 +- .../ai/anthropic/v0/config/definition.yaml | 2 +- .../ai/anthropic/v0/config/setup.yaml | 5 +- .../ai/anthropic/v0/config/tasks.yaml | 100 +- .../ai/cohere/v0/config/definition.yaml | 6 +- pkg/component/ai/cohere/v0/config/setup.yaml | 5 +- pkg/component/ai/cohere/v0/config/tasks.yaml | 227 +- .../ai/fireworksai/v0/config/definition.yaml | 4 +- .../ai/fireworksai/v0/config/setup.yaml | 5 +- .../ai/fireworksai/v0/config/tasks.yaml | 175 +- .../ai/groq/v0/config/definition.yaml | 2 +- pkg/component/ai/groq/v0/config/setup.yaml | 5 +- pkg/component/ai/groq/v0/config/tasks.yaml | 129 +- .../ai/huggingface/v0/config/definition.yaml | 34 +- .../ai/huggingface/v0/config/setup.yaml | 22 +- .../ai/huggingface/v0/config/tasks.yaml | 591 ++-- .../ai/instill/v0/config/definition.yaml | 24 +- pkg/component/ai/instill/v0/config/tasks.yaml | 338 ++- .../ai/mistralai/v0/config/definition.yaml | 4 +- .../ai/mistralai/v0/config/setup.yaml | 5 +- .../ai/mistralai/v0/config/tasks.yaml | 139 +- .../ai/ollama/v0/config/definition.yaml | 4 +- pkg/component/ai/ollama/v0/config/setup.yaml | 17 +- pkg/component/ai/ollama/v0/config/tasks.yaml | 86 +- .../ai/openai/v0/config/definition.yaml | 10 +- pkg/component/ai/openai/v0/config/setup.yaml | 10 +- pkg/component/ai/openai/v0/config/tasks.yaml | 415 ++- .../ai/perplexity/v0/config/definition.yaml | 2 +- .../ai/perplexity/v0/config/setup.yaml | 2 +- .../ai/perplexity/v0/config/tasks.yaml | 136 +- .../ai/stabilityai/v0/config/definition.yaml | 4 +- .../ai/stabilityai/v0/config/setup.yaml | 2 +- .../ai/stabilityai/v0/config/stabilityai.yaml | 2151 +++++++-------- .../ai/stabilityai/v0/config/tasks.yaml | 324 ++- .../ai/universalai/v0/config/definition.yaml | 5 +- .../ai/universalai/v0/config/setup.yaml | 72 +- .../ai/universalai/v0/config/tasks.yaml | 224 +- .../asana/v0/config/definition.yaml | 8 +- .../application/asana/v0/config/setup.yaml | 7 +- .../application/asana/v0/config/tasks.yaml | 2435 ++++++++--------- .../email/v0/config/definition.yaml | 4 +- .../application/email/v0/config/setup.yaml | 16 +- .../application/email/v0/config/tasks.yaml | 34 +- .../freshdesk/v0/config/definition.yaml | 30 +- .../freshdesk/v0/config/setup.yaml | 16 +- .../freshdesk/v0/config/tasks.yaml | 929 +++---- .../github/v0/config/definition.yaml | 20 +- .../application/github/v0/config/events.yaml | 659 +++-- .../application/github/v0/config/setup.yaml | 11 +- .../application/github/v0/config/tasks.yaml | 309 +-- .../googlesearch/v0/config/definition.yaml | 2 +- .../googlesearch/v0/config/setup.yaml | 13 +- .../googlesearch/v0/config/tasks.yaml | 43 +- .../hubspot/v0/config/definition.yaml | 30 +- .../application/hubspot/v0/config/setup.yaml | 7 +- .../application/hubspot/v0/config/tasks.yaml | 404 ++- .../jira/v0/config/definition.yaml | 18 +- .../application/jira/v0/config/setup.yaml | 18 +- .../application/jira/v0/config/tasks.yaml | 748 +++-- .../leadiq/v0/config/definition.yaml | 2 +- .../application/leadiq/v0/config/setup.yaml | 7 +- .../application/leadiq/v0/config/tasks.yaml | 117 +- .../numbers/v0/config/definition.yaml | 6 +- .../application/numbers/v0/config/setup.yaml | 9 +- .../application/numbers/v0/config/tasks.yaml | 52 +- .../slack/v0/config/definition.yaml | 6 +- .../application/slack/v0/config/events.yaml | 44 +- .../application/slack/v0/config/setup.yaml | 22 +- .../application/slack/v0/config/tasks.yaml | 41 +- .../smartlead/v0/config/definition.yaml | 18 +- .../smartlead/v0/config/setup.yaml | 7 +- .../smartlead/v0/config/tasks.yaml | 284 +- .../whatsapp/v0/config/definition.yaml | 18 +- .../application/whatsapp/v0/config/setup.yaml | 7 +- .../application/whatsapp/v0/config/tasks.yaml | 307 +-- .../base/testdata/componentAdditional.yaml | 4 +- .../base/testdata/componentConfig.yaml | 5 +- pkg/component/base/testdata/componentDef.yaml | 2 +- .../base/testdata/componentTasks.yaml | 10 +- pkg/component/base/testdata/operatorDef.yaml | 2 +- .../base/testdata/operatorTasks.yaml | 16 +- .../testdata/wantComponentDefinition.yaml | 150 +- .../base/testdata/wantOperatorDefinition.yaml | 91 +- .../data/bigquery/v0/config/definition.yaml | 4 +- .../data/bigquery/v0/config/setup.yaml | 16 +- .../data/bigquery/v0/config/tasks.yaml | 7 +- .../data/chroma/v0/config/definition.yaml | 12 +- .../data/chroma/v0/config/setup.yaml | 8 +- .../data/chroma/v0/config/tasks.yaml | 141 +- .../elasticsearch/v0/config/definition.yaml | 16 +- .../data/elasticsearch/v0/config/setup.yaml | 11 +- .../data/elasticsearch/v0/config/tasks.yaml | 218 +- .../v0/config/definition.yaml | 6 +- .../googlecloudstorage/v0/config/setup.yaml | 4 +- .../googlecloudstorage/v0/config/tasks.yaml | 55 +- .../googledrive/v0/config/definition.yaml | 4 +- .../data/googledrive/v0/config/setup.yaml | 16 +- .../data/googledrive/v0/config/tasks.yaml | 56 +- .../googlesheets/v0/config/definition.yaml | 35 +- .../data/googlesheets/v0/config/setup.yaml | 16 +- .../data/googlesheets/v0/config/tasks.yaml | 139 +- .../instillartifact/v0/config/definition.yaml | 16 +- .../data/instillartifact/v0/config/tasks.yaml | 560 ++-- .../data/milvus/v0/config/definition.yaml | 20 +- .../data/milvus/v0/config/setup.yaml | 12 +- .../data/milvus/v0/config/tasks.yaml | 190 +- .../data/mongodb/v0/config/definition.yaml | 20 +- .../data/mongodb/v0/config/setup.yaml | 4 +- .../data/mongodb/v0/config/tasks.yaml | 225 +- .../data/pinecone/v0/config/definition.yaml | 8 +- .../data/pinecone/v0/config/setup.yaml | 9 +- .../data/pinecone/v0/config/tasks.yaml | 124 +- .../data/qdrant/v0/config/definition.yaml | 12 +- .../data/qdrant/v0/config/setup.yaml | 14 +- .../data/qdrant/v0/config/tasks.yaml | 145 +- .../data/redis/v0/config/definition.yaml | 6 +- pkg/component/data/redis/v0/config/setup.yaml | 19 +- pkg/component/data/redis/v0/config/tasks.yaml | 46 +- .../data/sql/v0/config/definition.yaml | 14 +- pkg/component/data/sql/v0/config/setup.yaml | 184 +- pkg/component/data/sql/v0/config/tasks.yaml | 107 +- .../data/weaviate/v0/config/definition.yaml | 12 +- .../data/weaviate/v0/config/setup.yaml | 14 +- .../data/weaviate/v0/config/tasks.yaml | 116 +- .../data/zilliz/v0/config/definition.yaml | 16 +- .../data/zilliz/v0/config/setup.yaml | 8 +- .../data/zilliz/v0/config/tasks.yaml | 165 +- .../collection/v0/config/definition.yaml | 16 +- .../generic/collection/v0/config/tasks.yaml | 165 +- .../generic/http/v0/config/definition.yaml | 14 +- .../generic/http/v0/config/setup.yaml | 214 +- .../generic/http/v0/config/tasks.yaml | 20 +- .../scheduler/v0/config/definition.yaml | 2 +- .../generic/scheduler/v0/config/events.yaml | 6 +- .../operator/audio/v0/config/definition.yaml | 4 +- .../operator/audio/v0/config/tasks.yaml | 53 +- .../operator/base64/v0/config/definition.yaml | 4 +- .../operator/base64/v0/config/tasks.yaml | 12 +- .../document/v0/config/definition.yaml | 6 +- .../operator/document/v0/config/tasks.yaml | 59 +- .../operator/image/v0/config/definition.yaml | 18 +- .../operator/image/v0/config/schema.yaml | 88 +- .../operator/image/v0/config/tasks.yaml | 147 +- .../operator/json/v0/config/definition.yaml | 8 +- .../operator/json/v0/config/tasks.yaml | 87 +- .../operator/text/v0/config/definition.yaml | 2 +- .../operator/text/v0/config/tasks.yaml | 312 +-- .../operator/video/v0/config/definition.yaml | 10 +- .../operator/video/v0/config/tasks.yaml | 175 +- .../operator/web/v0/config/definition.yaml | 6 +- .../operator/web/v0/config/tasks.yaml | 167 +- pkg/component/resources/schemas/schema.yaml | 88 +- pkg/component/tools/compogen/go.mod | 2 +- pkg/component/tools/compogen/go.sum | 2 + 156 files changed, 7926 insertions(+), 8915 deletions(-) diff --git a/.golangci.yaml b/.golangci.yaml index e1faf06d3..b6f1368a9 100644 --- a/.golangci.yaml +++ b/.golangci.yaml @@ -4,6 +4,6 @@ linters: linters-settings: stylecheck: - checks: [ "all" ] + checks: ["all"] staticcheck: - checks: [ "all", "-SA1019" ] + checks: ["all", "-SA1019"] diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index cbcfa7b6d..f5b93b395 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -38,3 +38,16 @@ repos: entry: bash -c 'make gen-component-doc' language: system files: ^pkg/component/.*\.(json|mdx)$ + - repo: https://github.com/jumanjihouse/pre-commit-hook-yamlfmt + rev: 0.2.3 + hooks: + - id: yamlfmt + args: + - --mapping + - "2" + - --sequence + - "4" + - --offset + - "2" + - --preserve-quotes + - --implicit_start diff --git a/go.mod b/go.mod index 7b6e0fd74..db6261d21 100644 --- a/go.mod +++ b/go.mod @@ -100,22 +100,12 @@ require ( gorm.io/plugin/dbresolver v1.5.1 ) -require ( - github.com/apapsch/go-jsonmerge/v2 v2.0.0 // indirect - github.com/oapi-codegen/runtime v1.1.1 // indirect - github.com/pinecone-io/go-pinecone v1.1.1 -) - -require ( - github.com/machinebox/graphql v0.2.2 - github.com/matryer/is v1.4.1 // indirect -) - require ( cloud.google.com/go v0.115.0 // indirect cloud.google.com/go/auth v0.7.2 // indirect cloud.google.com/go/auth/oauth2adapt v0.2.3 // indirect cloud.google.com/go/compute/metadata v0.5.0 // indirect + code.sajari.com/docconv v1.3.8 filippo.io/edwards25519 v1.1.0 // indirect github.com/JalfResi/justext v0.0.0-20221106200834-be571e3e3052 // indirect github.com/PaesslerAG/gval v1.0.0 // indirect @@ -128,6 +118,8 @@ require ( github.com/antchfx/xmlquery v1.3.17 // indirect github.com/antchfx/xpath v1.2.4 // indirect github.com/apache/arrow/go/v15 v15.0.2 // indirect + github.com/apapsch/go-jsonmerge/v2 v2.0.0 // indirect + github.com/araddon/dateparse v0.0.0-20200409225146-d820a6159ab1 // indirect github.com/asaskevich/govalidator v0.0.0-20230301143203-a9d515a09cc2 // indirect github.com/aws/aws-sdk-go v1.55.1 // indirect github.com/aws/aws-sdk-go-v2 v1.30.3 // indirect @@ -209,7 +201,9 @@ require ( github.com/kr/text v0.2.0 // indirect github.com/levigross/exp-html v0.0.0-20120902181939-8df60c69a8f5 // indirect github.com/lib/pq v1.10.9 + github.com/machinebox/graphql v0.2.2 github.com/mailru/easyjson v0.7.7 // indirect + github.com/matryer/is v1.4.1 // indirect github.com/mattn/go-runewidth v0.0.15 // indirect github.com/minio/md5-simd v1.1.2 // indirect github.com/mitchellh/copystructure v1.2.0 // indirect @@ -219,11 +213,13 @@ require ( github.com/modern-go/reflect2 v1.0.2 // indirect github.com/mohae/deepcopy v0.0.0-20170929034955-c48cc78d4826 // indirect github.com/montanaflynn/stats v0.7.1 // indirect + github.com/oapi-codegen/runtime v1.1.1 // indirect github.com/oklog/ulid v1.3.1 // indirect github.com/olekukonko/tablewriter v0.0.4 // indirect github.com/otiai10/gosseract/v2 v2.4.1 // indirect github.com/pborman/uuid v1.2.1 // indirect github.com/pierrec/lz4/v4 v4.1.18 // indirect + github.com/pinecone-io/go-pinecone v1.1.1 github.com/pkg/errors v0.9.1 github.com/pmezard/go-difflib v1.0.0 // indirect github.com/remyoudompheng/bigfft v0.0.0-20230129092748-24d4a6f8daec // indirect @@ -265,24 +261,19 @@ require ( go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.49.0 // indirect go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.24.0 // indirect go.opentelemetry.io/otel/metric v1.24.0 // indirect - golang.org/x/sync v0.10.0 // indirect - golang.org/x/tools v0.21.1-0.20240508182429-e35e4ccd0d2d // indirect - golang.org/x/xerrors v0.0.0-20231012003039-104605ab7028 // indirect - google.golang.org/appengine v1.6.8 // indirect - modernc.org/mathutil v1.5.0 // indirect -) - -require ( - code.sajari.com/docconv v1.3.8 - github.com/araddon/dateparse v0.0.0-20200409225146-d820a6159ab1 // indirect go.opentelemetry.io/proto/otlp v1.1.0 // indirect go.uber.org/atomic v1.10.0 // indirect go.uber.org/multierr v1.10.0 // indirect golang.org/x/crypto v0.31.0 + golang.org/x/sync v0.10.0 // indirect golang.org/x/sys v0.28.0 // indirect golang.org/x/text v0.21.0 golang.org/x/time v0.5.0 // indirect + golang.org/x/tools v0.21.1-0.20240508182429-e35e4ccd0d2d // indirect + golang.org/x/xerrors v0.0.0-20231012003039-104605ab7028 // indirect + google.golang.org/appengine v1.6.8 // indirect google.golang.org/genproto v0.0.0-20240722135656-d784300faade // indirect gopkg.in/yaml.v3 v3.0.1 gorm.io/driver/mysql v1.4.7 // indirect + modernc.org/mathutil v1.5.0 // indirect ) diff --git a/pkg/component/ai/anthropic/v0/config/definition.yaml b/pkg/component/ai/anthropic/v0/config/definition.yaml index 4350ae2d2..8afad7b30 100644 --- a/pkg/component/ai/anthropic/v0/config/definition.yaml +++ b/pkg/component/ai/anthropic/v0/config/definition.yaml @@ -1,5 +1,5 @@ availableTasks: -- TASK_TEXT_GENERATION_CHAT + - 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/anthropic/v0/config/setup.yaml b/pkg/component/ai/anthropic/v0/config/setup.yaml index 75ac01eed..85e291856 100644 --- a/pkg/component/ai/anthropic/v0/config/setup.yaml +++ b/pkg/component/ai/anthropic/v0/config/setup.yaml @@ -1,10 +1,9 @@ additionalProperties: false properties: api-key: - description: Fill in your Anthropic API key. To find your keys, visit the Anthropic - console page. + description: Fill in your Anthropic API key. To find your keys, visit the Anthropic console page. acceptFormats: - - string + - string instillSecret: true instillCredential: true uiOrder: 0 diff --git a/pkg/component/ai/anthropic/v0/config/tasks.yaml b/pkg/component/ai/anthropic/v0/config/tasks.yaml index 4840b66c3..ac6b34947 100644 --- a/pkg/component/ai/anthropic/v0/config/tasks.yaml +++ b/pkg/component/ai/anthropic/v0/config/tasks.yaml @@ -10,7 +10,7 @@ $defs: uiOrder: 0 format: string required: - - url + - url title: Image URL description: The image URL. uiOrder: 0 @@ -23,13 +23,13 @@ $defs: type: description: The type of the content part. enum: - - text - - image_url + - text + - image_url title: Type uiOrder: 2 format: string required: - - type + - type format: object format: array chat-message: @@ -45,8 +45,8 @@ $defs: title: Role format: string required: - - role - - content + - role + - content title: Chat Message format: object usage: @@ -64,33 +64,28 @@ $defs: title: Output Tokens format: number required: - - input-tokens - - output-tokens + - input-tokens + - output-tokens title: Usage format: object TASK_TEXT_GENERATION_CHAT: shortDescription: Provide text outputs in response to text inputs. - description: Anthropic'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. + description: Anthropic'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. input: description: Input. uiOrder: 0 properties: chat-history: - description: 'Incorporate external chat history, specifically previous messages - within the conversation. Please note that System Message will be ignored - and will not have any effect when this field is populated. Each message - should adhere to the format: : {"role": "The message role, i.e. ''system'', - ''user'' or ''assistant''", "content": "message content"}.' + description: 'Incorporate external chat history, specifically previous messages within the conversation. Please note that System Message will be + ignored and will not have any effect when this field is populated. Each message should adhere to the format: : {"role": "The message role, i.e. + ''system'', ''user'' or ''assistant''", "content": "message content"}.' acceptFormats: - - object - shortDescription: 'Incorporate external chat history, specifically previous - messages within the conversation. (Note: Anthropic doesn''t support sending - images via image-url, use the ''prompt-images'' field instead)' + - object + shortDescription: 'Incorporate external chat history, specifically previous messages within the conversation. (Note: Anthropic doesn''t support + sending images via image-url, use the ''prompt-images'' field instead)' uiOrder: 4 items: $ref: '#/$defs/chat-message' @@ -100,48 +95,47 @@ TASK_TEXT_GENERATION_CHAT: default: 50 description: The maximum number of tokens for model to generate. acceptFormats: - - integer + - integer uiOrder: 6 title: Max New Tokens format: integer model-name: enum: - - claude-3-5-sonnet-latest - - claude-3-5-sonnet-20241022 - - claude-3-5-sonnet-20240620 - - claude-3-opus-20240229 - - claude-3-sonnet-20240229 - - claude-3-haiku-20240307 - example: claude-3-5-sonnet-latest - description: The Anthropic model to be used. - acceptFormats: - - string - uiOrder: 0 - instillCredentialMap: - values: - claude-3-5-sonnet-latest - claude-3-5-sonnet-20241022 - claude-3-5-sonnet-20240620 - claude-3-opus-20240229 - claude-3-sonnet-20240229 - claude-3-haiku-20240307 + example: claude-3-5-sonnet-latest + description: The Anthropic model to be used. + acceptFormats: + - string + uiOrder: 0 + instillCredentialMap: + values: + - claude-3-5-sonnet-latest + - claude-3-5-sonnet-20241022 + - claude-3-5-sonnet-20240620 + - claude-3-opus-20240229 + - claude-3-sonnet-20240229 + - claude-3-haiku-20240307 targets: - - setup.api-key + - setup.api-key title: Model Name format: string prompt: description: The prompt text. acceptFormats: - - string + - string uiOrder: 2 title: Prompt format: string prompt-images: - description: 'The prompt images (Note: The prompt images will be injected - in the order they are provided to the ''prompt'' message. Anthropic doesn''t + description: 'The prompt images (Note: The prompt images will be injected in the order they are provided to the ''prompt'' message. Anthropic doesn''t support sending images via image-url, use this field instead).' acceptFormats: - - array + - array uiOrder: 3 items: format: string @@ -150,19 +144,17 @@ TASK_TEXT_GENERATION_CHAT: seed: description: 'The seed (Note: Not supported by Anthropic Models).' acceptFormats: - - integer + - integer uiOrder: 4 title: Seed format: integer system-message: default: You are a helpful assistant. - description: The system message helps set the behavior of the assistant. For - example, you can modify the personality of the assistant or provide specific - instructions about how it should behave throughout the conversation. By - default, the model’s behavior is set using a generic message as "You are - a helpful assistant.". + description: The system message helps set the behavior of the assistant. For example, you can modify the personality of the assistant or provide + specific instructions about how it should behave throughout the conversation. By default, the model’s behavior is set using a generic message + as "You are a helpful assistant.". acceptFormats: - - string + - string shortDescription: The system message helps set the behavior of the assistant uiOrder: 2 title: System Message @@ -171,7 +163,7 @@ TASK_TEXT_GENERATION_CHAT: default: 0.7 description: The temperature for sampling. acceptFormats: - - number + - number uiOrder: 5 title: Temperature format: number @@ -179,13 +171,13 @@ TASK_TEXT_GENERATION_CHAT: default: 10 description: Top k for sampling. acceptFormats: - - integer + - integer uiOrder: 5 title: Top K format: integer required: - - prompt - - model-name + - prompt + - model-name title: Input format: object output: @@ -200,6 +192,6 @@ TASK_TEXT_GENERATION_CHAT: usage: $ref: '#/$defs/usage' required: - - text + - text title: Output format: object diff --git a/pkg/component/ai/cohere/v0/config/definition.yaml b/pkg/component/ai/cohere/v0/config/definition.yaml index d9d584eac..9eb480d8b 100644 --- a/pkg/component/ai/cohere/v0/config/definition.yaml +++ b/pkg/component/ai/cohere/v0/config/definition.yaml @@ -1,7 +1,7 @@ availableTasks: -- TASK_TEXT_GENERATION_CHAT -- TASK_TEXT_EMBEDDINGS -- TASK_TEXT_RERANKING + - 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/cohere/v0/config/setup.yaml b/pkg/component/ai/cohere/v0/config/setup.yaml index 4696dc677..613364c10 100644 --- a/pkg/component/ai/cohere/v0/config/setup.yaml +++ b/pkg/component/ai/cohere/v0/config/setup.yaml @@ -1,10 +1,9 @@ additionalProperties: false properties: api-key: - description: Fill in your Cohere API key. To find your keys, visit the Cohere - dashboard page. + description: Fill in your Cohere API key. To find your keys, visit the Cohere dashboard page. acceptFormats: - - string + - string instillSecret: true instillCredential: true uiOrder: 0 diff --git a/pkg/component/ai/cohere/v0/config/tasks.yaml b/pkg/component/ai/cohere/v0/config/tasks.yaml index 0a7249e1b..2f4c48430 100644 --- a/pkg/component/ai/cohere/v0/config/tasks.yaml +++ b/pkg/component/ai/cohere/v0/config/tasks.yaml @@ -10,7 +10,7 @@ $defs: uiOrder: 0 format: string required: - - url + - url title: Image URL description: The image URL. uiOrder: 0 @@ -23,13 +23,13 @@ $defs: type: description: The type of the content part. enum: - - text - - image_url + - text + - image_url title: Type uiOrder: 2 format: string required: - - type + - type format: object format: array chat-message: @@ -45,8 +45,8 @@ $defs: title: Role format: string required: - - role - - content + - role + - content title: Chat Message format: object common: @@ -56,20 +56,20 @@ $defs: image-base64: description: Image base64. acceptFormats: - - image/* + - image/* uiOrder: 2 title: Image format: string model-name: description: The Instill Model model to be used. acceptFormats: - - string + - string uiOrder: 0 title: Model Name format: string required: - - image-base64 - - model-name + - image-base64 + - model-name title: Input format: object citation: @@ -77,28 +77,28 @@ $defs: start: description: The start position of the citation. acceptFormats: - - integer + - integer uiOrder: 0 title: Start format: integer end: description: The end position of the citation. acceptFormats: - - integer + - integer uiOrder: 1 title: End format: integer text: description: The text body of the citation. acceptFormats: - - string + - string uiOrder: 2 title: Text format: string required: - - start - - end - - text + - start + - end + - text title: Citation format: object command-usage: @@ -116,8 +116,8 @@ $defs: title: Output Tokens format: number required: - - input-tokens - - output-tokens + - input-tokens + - output-tokens title: Usage format: object rerank-usage: @@ -130,7 +130,7 @@ $defs: title: Search Counts format: number required: - - search-counts + - search-counts title: Usage format: object embed-usage: @@ -143,29 +143,25 @@ $defs: title: Token Count format: number required: - - tokens + - tokens title: Usage format: object TASK_TEXT_GENERATION_CHAT: shortDescription: Provide text outputs in response to text inputs. - description: 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. + description: 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. input: description: Input. uiOrder: 0 properties: chat-history: - description: 'Incorporate external chat history, specifically previous messages - within the conversation. Each message should adhere to the format: : {"role": - "The message role, i.e. ''USER'' or ''CHATBOT''", "content": "message content"}.' + description: 'Incorporate external chat history, specifically previous messages within the conversation. Each message should adhere to the format: + : {"role": "The message role, i.e. ''USER'' or ''CHATBOT''", "content": "message content"}.' acceptFormats: - - object - shortDescription: 'Incorporate external chat history, specifically previous - messages within the conversation. (Note: As for 2024-06-24 Cohere models + - object + shortDescription: 'Incorporate external chat history, specifically previous messages within the conversation. (Note: As for 2024-06-24 Cohere models are not multimodal, so images will be ignored.)' uiOrder: 4 items: @@ -176,45 +172,44 @@ TASK_TEXT_GENERATION_CHAT: default: 50 description: The maximum number of tokens for model to generate (default=50). acceptFormats: - - integer + - integer uiOrder: 6 title: Max New Tokens format: integer model-name: enum: - - command-r-plus - - command-r - - command - - command-nightly - - command-light - - command-light-nightly + - command-r-plus + - command-r + - command + - command-nightly + - command-light + - command-light-nightly example: command-r-plus description: The Cohere command model to be used. acceptFormats: - - string + - string instillCredentialMap: values: - - command-r-plus - - command-r - - command - - command-light + - command-r-plus + - command-r + - command + - command-light targets: - - setup.api-key + - setup.api-key uiOrder: 0 title: Model Name format: string prompt: description: The prompt text. acceptFormats: - - string + - string uiOrder: 2 title: Prompt format: string prompt-images: - description: 'The prompt images (Note: As for 2024-06-24 Cohere models are - not multimodal, so images will be ignored.).' + description: 'The prompt images (Note: As for 2024-06-24 Cohere models are not multimodal, so images will be ignored.).' acceptFormats: - - array + - array uiOrder: 3 items: format: string @@ -224,19 +219,17 @@ TASK_TEXT_GENERATION_CHAT: default: 42 description: The seed (default=42). acceptFormats: - - integer + - integer uiOrder: 4 title: Seed format: integer system-message: default: You are a helpful assistant. - description: The system message helps set the behavior of the assistant. For - example, you can modify the personality of the assistant or provide specific - instructions about how it should behave throughout the conversation. By - default, the model’s behavior is using a generic message as "You are a helpful - assistant.". + description: The system message helps set the behavior of the assistant. For example, you can modify the personality of the assistant or provide + specific instructions about how it should behave throughout the conversation. By default, the model’s behavior is using a generic message as "You + are a helpful assistant.". acceptFormats: - - string + - string shortDescription: The system message helps set the behavior of the assistant uiOrder: 2 title: System Message @@ -245,7 +238,7 @@ TASK_TEXT_GENERATION_CHAT: default: 0.7 description: The temperature for sampling (default=0.7). acceptFormats: - - number + - number uiOrder: 5 title: Temperature format: number @@ -253,23 +246,22 @@ TASK_TEXT_GENERATION_CHAT: default: 10 description: Top k for sampling (default=10). acceptFormats: - - integer + - integer uiOrder: 5 title: Top K format: integer documents: - description: The documents to be used for the model, for optimal performance, - the length of each document should be less than 300 words. + description: The documents to be used for the model, for optimal performance, the length of each document should be less than 300 words. acceptFormats: - - array + - array uiOrder: 3 items: format: string title: Documents format: array required: - - prompt - - model-name + - prompt + - model-name title: Input format: object output: @@ -285,7 +277,7 @@ TASK_TEXT_GENERATION_CHAT: description: Citations. uiOrder: 1 acceptFormats: - - array + - array title: Citations items: $ref: '#/$defs/citation' @@ -294,80 +286,76 @@ TASK_TEXT_GENERATION_CHAT: $ref: '#/$defs/command-usage' uiOrder: 2 required: - - text + - text title: Output format: object TASK_TEXT_EMBEDDINGS: - shortDescription: Turn text into a vector of numbers that capture its meaning, unlocking - use cases like semantic search. - description: An embedding is a list of floating point numbers that captures semantic - information about the text that it represents. + shortDescription: Turn text into a vector of numbers that capture its meaning, unlocking use cases like semantic search. + description: An embedding is a list of floating point numbers that captures semantic information about the text that it represents. input: uiOrder: 0 properties: model-name: enum: - - embed-english-v3.0 - - embed-multilingual-v3.0 - - embed-english-light-v3.0 - - embed-multilingual-light-v3.0 + - embed-english-v3.0 + - embed-multilingual-v3.0 + - embed-english-light-v3.0 + - embed-multilingual-light-v3.0 example: embed-multilingual-v3.0 description: The Cohere embed model to be used. acceptFormats: - - string + - string instillCredentialMap: values: - - embed-english-v3.0 - - embed-multilingual-v3.0 - - embed-english-light-v3.0 - - embed-multilingual-light-v3.0 + - embed-english-v3.0 + - embed-multilingual-v3.0 + - embed-english-light-v3.0 + - embed-multilingual-light-v3.0 targets: - - setup.api-key + - setup.api-key uiOrder: 0 title: Model Name format: string text: description: The text. acceptFormats: - - string + - string uiOrder: 1 title: Text format: string input-type: enum: - - search_document - - search_query - - classification - - clustering + - search_document + - search_query + - classification + - clustering example: search_document description: Specifies the type of input passed to the model. acceptFormats: - - string + - string uiOrder: 0 title: Input Type format: string embedding-type: enum: - - float - - int8 - - uint8 - - binary - - ubinary + - float + - int8 + - uint8 + - binary + - ubinary example: float - description: 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. + description: 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. acceptFormats: - - string + - string uiOrder: 0 title: Embedding Type format: string required: - - text - - model-name - - input-type - - embedding-type + - text + - model-name + - input-type + - embedding-type title: Input format: object output: @@ -384,45 +372,44 @@ TASK_TEXT_EMBEDDINGS: usage: $ref: '#/$defs/embed-usage' required: - - embedding + - embedding title: Output format: object TASK_TEXT_RERANKING: shortDescription: Sort text inputs by semantic relevance to a specified query. - description: 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. + description: 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. input: uiOrder: 0 properties: model-name: enum: - - rerank-english-v3.0 - - rerank-multilingual-v3.0 + - rerank-english-v3.0 + - rerank-multilingual-v3.0 example: rerank-multilingual-v3.0 description: The Cohere rerank model to be used. acceptFormats: - - string + - string instillCredentialMap: values: - - rerank-english-v3.0 - - rerank-multilingual-v3.0 + - rerank-english-v3.0 + - rerank-multilingual-v3.0 targets: - - setup.api-key + - setup.api-key uiOrder: 0 title: Model Name format: string query: description: The query. acceptFormats: - - string + - string uiOrder: 1 title: Query format: string documents: description: The documents to be used for reranking. acceptFormats: - - array + - array uiOrder: 2 items: format: string @@ -430,26 +417,24 @@ TASK_TEXT_RERANKING: format: array top-n: default: 3 - description: The number of most relevant documents or indices to return. Defaults - to the length of the documents (default=3). + description: The number of most relevant documents or indices to return. Defaults to the length of the documents (default=3). acceptFormats: - - integer + - integer uiOrder: 3 title: Top N format: integer max-chunks-per-doc: default: 10 - description: The maximum number of chunks to produce internally from a document - (default=10). + description: The maximum number of chunks to produce internally from a document (default=10). acceptFormats: - - integer + - integer uiOrder: 4 title: Maximum number of chunks per document format: integer required: - - query - - model-name - - documents + - query + - model-name + - documents title: Input format: object output: @@ -474,6 +459,6 @@ TASK_TEXT_RERANKING: title: Reranked documents relevance format: array required: - - ranking + - ranking title: Output format: object diff --git a/pkg/component/ai/fireworksai/v0/config/definition.yaml b/pkg/component/ai/fireworksai/v0/config/definition.yaml index 64497f886..7d3bea2c9 100644 --- a/pkg/component/ai/fireworksai/v0/config/definition.yaml +++ b/pkg/component/ai/fireworksai/v0/config/definition.yaml @@ -1,6 +1,6 @@ availableTasks: -- TASK_TEXT_GENERATION_CHAT -- TASK_TEXT_EMBEDDINGS + - 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/fireworksai/v0/config/setup.yaml b/pkg/component/ai/fireworksai/v0/config/setup.yaml index 54277db2a..53fb8bd5b 100644 --- a/pkg/component/ai/fireworksai/v0/config/setup.yaml +++ b/pkg/component/ai/fireworksai/v0/config/setup.yaml @@ -1,10 +1,9 @@ additionalProperties: false properties: api-key: - description: Fill in your Fireworks AI API key. To find your keys, visit the Fireworks - AI API Keys page. + description: Fill in your Fireworks AI API key. To find your keys, visit the Fireworks AI API Keys page. acceptFormats: - - string + - string instillSecret: true instillCredential: true uiOrder: 0 diff --git a/pkg/component/ai/fireworksai/v0/config/tasks.yaml b/pkg/component/ai/fireworksai/v0/config/tasks.yaml index 3f6b0cc9f..f7af48315 100644 --- a/pkg/component/ai/fireworksai/v0/config/tasks.yaml +++ b/pkg/component/ai/fireworksai/v0/config/tasks.yaml @@ -10,7 +10,7 @@ $defs: uiOrder: 0 format: string required: - - url + - url title: Image URL description: The image URL. uiOrder: 0 @@ -23,13 +23,13 @@ $defs: type: description: The type of the content part. enum: - - text - - image_url + - text + - image_url title: Type uiOrder: 2 format: string required: - - type + - type format: object format: array chat-message: @@ -45,8 +45,8 @@ $defs: title: Role format: string required: - - role - - content + - role + - content title: Chat Message format: object chat-usage: @@ -64,8 +64,8 @@ $defs: title: Output Tokens format: number required: - - input-tokens - - output-tokens + - input-tokens + - output-tokens title: Usage format: object embedding-usage: @@ -78,33 +78,28 @@ $defs: title: Token Count format: number required: - - tokens + - tokens title: Usage format: object TASK_TEXT_GENERATION_CHAT: shortDescription: Provide text outputs in response to text inputs. - description: 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. + description: 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. input: description: Input. uiOrder: 0 properties: chat-history: - description: 'Incorporate external chat history, specifically previous messages - within the conversation. Please note that System Message will be ignored - and will not have any effect when this field is populated. Each message - should adhere to the format: : {"role": "The message role, i.e. ''system'', - ''user'' or ''assistant''", "content": "message content"}.' + description: 'Incorporate external chat history, specifically previous messages within the conversation. Please note that System Message will be + ignored and will not have any effect when this field is populated. Each message should adhere to the format: : {"role": "The message role, i.e. + ''system'', ''user'' or ''assistant''", "content": "message content"}.' acceptFormats: - - object - shortDescription: 'Incorporate external chat history, specifically previous - messages within the conversation. (Note: According to Fireworks AI documentation - on 2024-07-24, the total number of images included in a single API request - should not exceed 30, and all the images should be smaller than 5MB in size)' + - object + shortDescription: 'Incorporate external chat history, specifically previous messages within the conversation. (Note: According to Fireworks AI documentation + on 2024-07-24, the total number of images included in a single API request should not exceed 30, and all the images should be smaller than 5MB + in size)' uiOrder: 4 items: $ref: '#/$defs/chat-message' @@ -114,34 +109,12 @@ TASK_TEXT_GENERATION_CHAT: default: 50 description: The maximum number of tokens for model to generate. acceptFormats: - - integer + - integer uiOrder: 6 title: Max New Tokens format: integer model: enum: - - llama-v3p1-405b-instruct - - llama-v3p1-70b-instruct - - llama-v3p1-8b-instruct - - llama-v3-70b-instruct - - llama-v3-8b-instruct - - firellava-13b - - firefunction-v2 - - deepseek-coder-v2-instruct - - deepseek-coder-v2-lite-instruct - - starcoder-16b - - starcoder-7b - - phi-3-vision-128k-instruct - - qwen2-72b-instruct - - mythomax-l2-13b - - yi-large - example: llama-v3p1-8b-instruct - description: The OSS model to be used. - acceptFormats: - - string - uiOrder: 0 - instillCredentialMap: - values: - llama-v3p1-405b-instruct - llama-v3p1-70b-instruct - llama-v3p1-8b-instruct @@ -149,6 +122,7 @@ TASK_TEXT_GENERATION_CHAT: - llama-v3-8b-instruct - firellava-13b - firefunction-v2 + - deepseek-coder-v2-instruct - deepseek-coder-v2-lite-instruct - starcoder-16b - starcoder-7b @@ -156,23 +130,43 @@ TASK_TEXT_GENERATION_CHAT: - qwen2-72b-instruct - mythomax-l2-13b - yi-large + example: llama-v3p1-8b-instruct + description: The OSS model to be used. + acceptFormats: + - string + uiOrder: 0 + instillCredentialMap: + values: + - llama-v3p1-405b-instruct + - llama-v3p1-70b-instruct + - llama-v3p1-8b-instruct + - llama-v3-70b-instruct + - llama-v3-8b-instruct + - firellava-13b + - firefunction-v2 + - deepseek-coder-v2-lite-instruct + - starcoder-16b + - starcoder-7b + - phi-3-vision-128k-instruct + - qwen2-72b-instruct + - mythomax-l2-13b + - yi-large targets: - - setup.api-key + - setup.api-key title: Model Name format: string prompt: description: The prompt text. acceptFormats: - - string + - string uiOrder: 2 title: Prompt format: string prompt-images: - description: 'The prompt images (Note: According to Fireworks AI documentation - on 2024-07-24, the total number of images included in a single API request - should not exceed 30, and all the images should be smaller than 5MB in size).' + description: 'The prompt images (Note: According to Fireworks AI documentation on 2024-07-24, the total number of images included in a single API + request should not exceed 30, and all the images should be smaller than 5MB in size).' acceptFormats: - - array + - array uiOrder: 3 items: format: string @@ -181,19 +175,17 @@ TASK_TEXT_GENERATION_CHAT: seed: description: The seed. acceptFormats: - - integer + - integer uiOrder: 4 title: Seed format: integer system-message: default: You are a helpful assistant. - description: The system message helps set the behavior of the assistant. For - example, you can modify the personality of the assistant or provide specific - instructions about how it should behave throughout the conversation. By - default, the model’s behavior is set using a generic message as "You are - a helpful assistant.". + description: The system message helps set the behavior of the assistant. For example, you can modify the personality of the assistant or provide + specific instructions about how it should behave throughout the conversation. By default, the model’s behavior is set using a generic message + as "You are a helpful assistant.". acceptFormats: - - string + - string shortDescription: The system message helps set the behavior of the assistant uiOrder: 2 title: System Message @@ -202,35 +194,32 @@ TASK_TEXT_GENERATION_CHAT: default: 0.7 description: The temperature for sampling. acceptFormats: - - number + - number uiOrder: 5 title: Temperature format: number top-k: default: 10 - description: Integer to define the top tokens considered within the sample - operation to create new text. + description: Integer to define the top tokens considered within the sample operation to create new text. acceptFormats: - - integer + - integer uiOrder: 5 title: Top K format: integer top-p: default: 0.5 - description: Float to define the tokens that are within the sample operation - of text generation. Add tokens in the sample for more probable to least + description: 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 (default=0.5). acceptFormats: - - number - - integer - shortDescription: Float to define the tokens that are within the sample operation - of text generation + - number + - integer + shortDescription: Float to define the tokens that are within the sample operation of text generation uiOrder: 6 title: Top P format: number required: - - prompt - - model + - prompt + - model title: Input format: object output: @@ -245,50 +234,48 @@ TASK_TEXT_GENERATION_CHAT: usage: $ref: '#/$defs/chat-usage' required: - - text + - text title: Output format: object TASK_TEXT_EMBEDDINGS: - shortDescription: Turn text into a vector of numbers that capture its meaning, unlocking - use cases like semantic search. - description: An embedding is a list of floating point numbers that captures semantic - information about the text that it represents. + shortDescription: Turn text into a vector of numbers that capture its meaning, unlocking use cases like semantic search. + description: An embedding is a list of floating point numbers that captures semantic information about the text that it represents. input: uiOrder: 0 properties: model: enum: - - nomic-ai/nomic-embed-text-v1.5 - - nomic-ai/nomic-embed-text-v1 - - WhereIsAI/UAE-Large-V1 - - thenlper/gte-large - - thenlper/gte-base + - nomic-ai/nomic-embed-text-v1.5 + - nomic-ai/nomic-embed-text-v1 + - WhereIsAI/UAE-Large-V1 + - thenlper/gte-large + - thenlper/gte-base example: nomic-ai/nomic-embed-text-v1.5 description: The OSS embedding model to be used. acceptFormats: - - string + - string uiOrder: 0 title: Model Name instillCredentialMap: values: - - nomic-ai/nomic-embed-text-v1.5 - - nomic-ai/nomic-embed-text-v1 - - WhereIsAI/UAE-Large-V1 - - thenlper/gte-large - - thenlper/gte-base + - nomic-ai/nomic-embed-text-v1.5 + - nomic-ai/nomic-embed-text-v1 + - WhereIsAI/UAE-Large-V1 + - thenlper/gte-large + - thenlper/gte-base targets: - - setup.api-key + - setup.api-key format: string text: description: The text. acceptFormats: - - string + - string uiOrder: 1 title: Text format: string required: - - text - - model + - text + - model title: Input format: object output: @@ -305,6 +292,6 @@ TASK_TEXT_EMBEDDINGS: usage: $ref: '#/$defs/embedding-usage' required: - - embedding + - embedding title: Output format: object diff --git a/pkg/component/ai/groq/v0/config/definition.yaml b/pkg/component/ai/groq/v0/config/definition.yaml index 46c5fb10f..5b38eae56 100644 --- a/pkg/component/ai/groq/v0/config/definition.yaml +++ b/pkg/component/ai/groq/v0/config/definition.yaml @@ -1,5 +1,5 @@ availableTasks: -- TASK_TEXT_GENERATION_CHAT + - 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/groq/v0/config/setup.yaml b/pkg/component/ai/groq/v0/config/setup.yaml index e6ad78a20..83545225d 100644 --- a/pkg/component/ai/groq/v0/config/setup.yaml +++ b/pkg/component/ai/groq/v0/config/setup.yaml @@ -1,10 +1,9 @@ additionalProperties: false properties: api-key: - description: Fill in your GroqCloud API key. To find your keys, visit the GroqCloud - API Keys page. + description: Fill in your GroqCloud API key. To find your keys, visit the GroqCloud API Keys page. acceptFormats: - - string + - string instillSecret: true instillCredential: true uiOrder: 0 diff --git a/pkg/component/ai/groq/v0/config/tasks.yaml b/pkg/component/ai/groq/v0/config/tasks.yaml index 2eaf7edd9..102cc576c 100644 --- a/pkg/component/ai/groq/v0/config/tasks.yaml +++ b/pkg/component/ai/groq/v0/config/tasks.yaml @@ -10,7 +10,7 @@ $defs: uiOrder: 0 format: string required: - - url + - url title: Image URL description: The image URL. uiOrder: 0 @@ -23,13 +23,13 @@ $defs: type: description: The type of the content part. enum: - - text - - image_url + - text + - image_url title: Type uiOrder: 2 format: string required: - - type + - type format: object format: array chat-message: @@ -45,8 +45,8 @@ $defs: title: Role format: string required: - - role - - content + - role + - content title: Chat Message format: object chat-usage: @@ -64,34 +64,28 @@ $defs: title: Output Tokens format: number required: - - input-tokens - - output-tokens + - input-tokens + - output-tokens title: Usage format: object TASK_TEXT_GENERATION_CHAT: shortDescription: Provide text outputs in response to text inputs. - description: Groq serves open source 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. + description: Groq serves open source 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. input: description: Input. uiOrder: 0 properties: chat-history: - description: 'Incorporate external chat history, specifically previous messages - within the conversation. Please note that System Message will be ignored - and will not have any effect when this field is populated. Each message - should adhere to the format: : {"role": "The message role, i.e. ''system'', - ''user'' or ''assistant''", "content": "message content"}.' + description: 'Incorporate external chat history, specifically previous messages within the conversation. Please note that System Message will be + ignored and will not have any effect when this field is populated. Each message should adhere to the format: : {"role": "The message role, i.e. + ''system'', ''user'' or ''assistant''", "content": "message content"}.' acceptFormats: - - object - shortDescription: 'Incorporate external chat history, specifically previous - messages within the conversation. (Note: Only a subset of OSS models support - image inputs)' + - object + shortDescription: 'Incorporate external chat history, specifically previous messages within the conversation. (Note: Only a subset of OSS models + support image inputs)' uiOrder: 4 items: $ref: '#/$defs/chat-message' @@ -101,53 +95,52 @@ TASK_TEXT_GENERATION_CHAT: default: 50 description: The maximum number of tokens for model to generate. acceptFormats: - - integer + - integer uiOrder: 6 title: Max New Tokens format: integer model: enum: - - llama-3.1-405b-reasoning - - llama-3.1-70b-versatile - - llama-3.1-8b-instant - - llama3-groq-70b-8192-tool-use-preview - - llama3-groq-8b-8192-tool-use-preview - - llama3-70b-8192 - - llama-guard-3-8b - - llama3-8b-8192 - - mixtral-8x7b-32768 - - gemma2-9b-it - - gemma-7b-it - example: llama3-8b-8192 - description: The OSS model to be used. - acceptFormats: - - string - uiOrder: 0 - instillCredentialMap: - values: + - llama-3.1-405b-reasoning + - llama-3.1-70b-versatile + - llama-3.1-8b-instant - llama3-groq-70b-8192-tool-use-preview - llama3-groq-8b-8192-tool-use-preview - llama3-70b-8192 + - llama-guard-3-8b - llama3-8b-8192 - mixtral-8x7b-32768 - gemma2-9b-it - gemma-7b-it + example: llama3-8b-8192 + description: The OSS model to be used. + acceptFormats: + - string + uiOrder: 0 + instillCredentialMap: + values: + - llama3-groq-70b-8192-tool-use-preview + - llama3-groq-8b-8192-tool-use-preview + - llama3-70b-8192 + - llama3-8b-8192 + - mixtral-8x7b-32768 + - gemma2-9b-it + - gemma-7b-it targets: - - setup.api-key + - setup.api-key title: Model format: string prompt: description: The prompt text. acceptFormats: - - string + - string uiOrder: 2 title: Prompt format: string prompt-images: - description: 'The prompt images (Note: Only a subset of OSS models support - image inputs).' + description: 'The prompt images (Note: Only a subset of OSS models support image inputs).' acceptFormats: - - array + - array uiOrder: 3 items: format: string @@ -156,19 +149,17 @@ TASK_TEXT_GENERATION_CHAT: seed: description: The seed. acceptFormats: - - integer + - integer uiOrder: 4 title: Seed format: integer system-message: default: You are a helpful assistant. - description: The system message helps set the behavior of the assistant. For - example, you can modify the personality of the assistant or provide specific - instructions about how it should behave throughout the conversation. By - default, the model’s behavior is set using a generic message as "You are - a helpful assistant.". + description: The system message helps set the behavior of the assistant. For example, you can modify the personality of the assistant or provide + specific instructions about how it should behave throughout the conversation. By default, the model’s behavior is set using a generic message + as "You are a helpful assistant.". acceptFormats: - - string + - string shortDescription: The system message helps set the behavior of the assistant uiOrder: 2 title: System Message @@ -177,29 +168,26 @@ TASK_TEXT_GENERATION_CHAT: default: 0.7 description: The temperature for sampling. acceptFormats: - - number + - number uiOrder: 5 title: Temperature format: number top-k: default: 10 - description: Integer to define the top tokens considered within the sample - operation to create new text. + description: Integer to define the top tokens considered within the sample operation to create new text. acceptFormats: - - integer + - integer uiOrder: 5 title: Top K format: integer top-p: default: 0.5 - description: Float to define the tokens that are within the sample operation - of text generation. Add tokens in the sample for more probable to least + description: 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 (default=0.5). acceptFormats: - - number - - integer - shortDescription: Float to define the tokens that are within the sample operation - of text generation + - number + - integer + shortDescription: Float to define the tokens that are within the sample operation of text generation uiOrder: 6 title: Top P format: number @@ -207,15 +195,14 @@ TASK_TEXT_GENERATION_CHAT: default: instill-ai description: The user name passed to GroqPlatform. acceptFormats: - - string - shortDescription: A unique identifier representing your end-user, which can - help Groq monitor and detect abuse. + - string + shortDescription: A unique identifier representing your end-user, which can help Groq monitor and detect abuse. uiOrder: 7 title: User format: string required: - - prompt - - model + - prompt + - model title: Input format: object output: @@ -230,6 +217,6 @@ TASK_TEXT_GENERATION_CHAT: usage: $ref: '#/$defs/chat-usage' required: - - text + - text title: Output format: object diff --git a/pkg/component/ai/huggingface/v0/config/definition.yaml b/pkg/component/ai/huggingface/v0/config/definition.yaml index bfb1f4833..159373df0 100644 --- a/pkg/component/ai/huggingface/v0/config/definition.yaml +++ b/pkg/component/ai/huggingface/v0/config/definition.yaml @@ -1,21 +1,21 @@ 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 + - 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/huggingface/v0/config/setup.yaml b/pkg/component/ai/huggingface/v0/config/setup.yaml index 93764ae07..704d6c48e 100644 --- a/pkg/component/ai/huggingface/v0/config/setup.yaml +++ b/pkg/component/ai/huggingface/v0/config/setup.yaml @@ -1,37 +1,35 @@ additionalProperties: false properties: api-key: - description: Fill in your Hugging face API token. To find your token, visit here. + description: Fill in your Hugging face API token. To find your token, visit here. acceptFormats: - - string + - string instillSecret: true uiOrder: 0 title: API Key format: string base-url: default: https://api-inference.huggingface.co - description: Hostname for the endpoint. To use Inference API set to here, - for Inference Endpoint set to your custom endpoint. + description: Hostname for the endpoint. To use Inference API set to here, for Inference Endpoint + set to your custom endpoint. acceptFormats: - - string + - string instillSecret: false uiOrder: 1 title: Base URL format: string is-custom-endpoint: default: false - description: Fill true if you are using a custom Inference Endpoint and not the - Inference API. + description: Fill true if you are using a custom Inference Endpoint and not the Inference API. acceptFormats: - - boolean + - boolean instillSecret: false uiOrder: 2 title: Is Custom Endpoint format: boolean required: -- api-key -- base-url -- is-custom-endpoint + - api-key + - base-url + - is-custom-endpoint title: Hugging Face Connection format: object diff --git a/pkg/component/ai/huggingface/v0/config/tasks.yaml b/pkg/component/ai/huggingface/v0/config/tasks.yaml index 8f1b88d17..227bad854 100644 --- a/pkg/component/ai/huggingface/v0/config/tasks.yaml +++ b/pkg/component/ai/huggingface/v0/config/tasks.yaml @@ -2,30 +2,26 @@ $defs: model: description: The Hugging Face model to be used. acceptFormats: - - string + - string title: Model format: string options: properties: use-cache: - description: 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 + description: 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. acceptFormats: - - boolean + - boolean shortDescription: Enable the cache of inference API uiOrder: 1 title: Use Cache format: boolean wait-for-model: - description: 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. + description: 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. acceptFormats: - - boolean + - boolean shortDescription: Wait for model ready uiOrder: 0 title: Wait For Model @@ -37,23 +33,21 @@ $defs: string-input: description: String input. acceptFormats: - - string + - string uiOrder: 0 title: String Input format: string TASK_AUDIO_CLASSIFICATION: - shortDescription: Audio classification is the task of assigning a label or class - to a given audio. - description: 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. + shortDescription: Audio classification is the task of assigning a label or class to a given audio. + description: 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: uiOrder: 0 properties: audio: description: The audio file. acceptFormats: - - audio/* + - audio/* uiOrder: 1 title: Audio format: string @@ -61,8 +55,8 @@ TASK_AUDIO_CLASSIFICATION: $ref: '#/$defs/model' uiOrder: 0 required: - - audio - - model + - audio + - model title: Input format: object output: @@ -78,14 +72,13 @@ TASK_AUDIO_CLASSIFICATION: title: Label format: string score: - description: A float that represents how likely it is that the audio - file belongs to this class. + description: A float that represents how likely it is that the audio file belongs to this class. uiOrder: 1 title: Score format: number required: - - label - - score + - label + - score description: Class. title: Class format: object @@ -93,15 +86,14 @@ TASK_AUDIO_CLASSIFICATION: title: Classes format: array required: - - classes + - classes title: Output format: object TASK_CONVERSATIONAL: - shortDescription: Conversational response modelling is the task of generating conversational - text that is relevant, coherent and knowledgable given a prompt. - description: 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. + shortDescription: Conversational response modelling is the task of generating conversational text that is relevant, coherent and knowledgable given a + prompt. + description: 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: uiOrder: 0 properties: @@ -109,10 +101,9 @@ TASK_CONVERSATIONAL: uiOrder: 1 properties: generated-responses: - description: A list of strings corresponding to the earlier replies from - the model. + description: A list of strings corresponding to the earlier replies from the model. acceptFormats: - - array + - array uiOrder: 0 items: description: Items. @@ -120,12 +111,10 @@ TASK_CONVERSATIONAL: title: Generated Responses format: array past-user-inputs: - description: A list of strings corresponding to the earlier replies from - the user. Should be of the same length of generated-responses. + description: A list of strings corresponding to the earlier replies from the user. Should be of the same length of generated-responses. acceptFormats: - - array - shortDescription: A list of strings corresponding to the earlier replies - from the user. + - array + shortDescription: A list of strings corresponding to the earlier replies from the user. uiOrder: 1 items: description: Items. @@ -135,12 +124,12 @@ TASK_CONVERSATIONAL: text: description: The last input from the user in the conversation. acceptFormats: - - string + - string uiOrder: 2 title: Text format: string required: - - text + - text description: Inputs. title: Inputs format: object @@ -154,40 +143,35 @@ TASK_CONVERSATIONAL: uiOrder: 2 properties: max-length: - description: Integer to define the maximum length in tokens of the output - summary. + description: Integer to define the maximum length in tokens of the output summary. acceptFormats: - - integer + - integer uiOrder: 0 title: Max Length format: integer max-time: - description: The amount of time in seconds that the query should take - maximum. Network can cause some overhead so it will be a soft limit. + description: The amount of time in seconds that the query should take maximum. Network can cause some overhead so it will be a soft limit. acceptFormats: - - number - - integer - shortDescription: The amount of time in seconds that the query should - take maximum. + - number + - integer + shortDescription: The amount of time in seconds that the query should take maximum. uiOrder: 1 maximum: 120.0 minimum: 0.0 title: Max Time format: number min-length: - description: Integer to define the minimum length in tokens of the output - summary. + description: Integer to define the minimum length in tokens of the output summary. acceptFormats: - - integer + - integer uiOrder: 2 title: Min Length format: integer repetition-penalty: - description: The more a token is used within generation the more it is - penalized to not be picked in successive generation passes. + description: The more a token is used within generation the more it is penalized to not be picked in successive generation passes. acceptFormats: - - number - - integer + - number + - integer uiOrder: 3 maximum: 100.0 minimum: 0.0 @@ -195,12 +179,11 @@ TASK_CONVERSATIONAL: format: number temperature: default: 1.0 - description: The temperature of the sampling operation. 1 means regular - sampling, 0 means always take the highest score, 100.0 is getting closer + description: 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. acceptFormats: - - number - - integer + - number + - integer shortDescription: The temperature of the sampling operation. uiOrder: 4 maximum: 100.0 @@ -208,22 +191,19 @@ TASK_CONVERSATIONAL: title: Temperature format: number top-k: - description: Integer to define the top tokens considered within the sample - operation to create new text. + description: Integer to define the top tokens considered within the sample operation to create new text. acceptFormats: - - integer + - integer uiOrder: 5 title: Top K format: integer top-p: - description: 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. + description: 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. acceptFormats: - - number - - integer - shortDescription: Float to define the tokens that are within the sample - operation of text generation. + - number + - integer + shortDescription: Float to define the tokens that are within the sample operation of text generation. uiOrder: 6 title: Top P format: number @@ -232,21 +212,19 @@ TASK_CONVERSATIONAL: title: Parameters format: object required: - - inputs - - model + - inputs + - model title: Input format: object output: uiOrder: 0 properties: conversation: - description: A facility dictionary to send back for the next input (with the - new user input addition). + description: A facility dictionary to send back for the next input (with the new user input addition). uiOrder: 0 properties: generated-responses: - description: List of strings. The last outputs from the model in the conversation, - after the model has run. + description: List of strings. The last outputs from the model in the conversation, after the model has run. uiOrder: 0 items: title: Generated Response @@ -255,8 +233,7 @@ TASK_CONVERSATIONAL: title: Generated Responses format: array past-user-inputs: - description: List of strings. The last inputs from the user in the conversation, - after the model has run. + description: List of strings. The last inputs from the user in the conversation, after the model has run. uiOrder: 1 items: title: Past User Input @@ -265,8 +242,8 @@ TASK_CONVERSATIONAL: title: Past User Inputs format: array required: - - generated-responses - - past-user-inputs + - generated-responses + - past-user-inputs title: Conversation format: object generated-text: @@ -275,23 +252,19 @@ TASK_CONVERSATIONAL: title: Generated Text format: string required: - - generated-text + - generated-text title: Output format: object TASK_FILL_MASK: - shortDescription: Masked language modeling is the task of masking some of the words - in a sentence and predicting which words should replace those masks. - description: Masked language modeling is the task of masking some of the words in - a sentence and predicting which words should replace those masks. These models - are useful when we want to get a statistical understanding of the language in - which the model is trained in. + shortDescription: Masked language modeling is the task of masking some of the words in a sentence and predicting which words should replace those masks. + description: Masked language modeling is the task of masking some of the words in a sentence and predicting which words should replace those masks. These + models are useful when we want to get a statistical understanding of the language in which the model is trained in. input: uiOrder: 0 properties: inputs: $ref: '#/$defs/string-input' - description: a string to be filled from, must contain the [MASK] token (check - model card for exact name of the mask). + description: a string to be filled from, must contain the [MASK] token (check model card for exact name of the mask). uiOrder: 1 model: $ref: '#/$defs/model' @@ -300,8 +273,8 @@ TASK_FILL_MASK: $ref: '#/$defs/options' uiOrder: 2 required: - - inputs - - model + - inputs + - model title: Input format: object output: @@ -317,8 +290,7 @@ TASK_FILL_MASK: title: Score format: number sequence: - description: The actual sequence of tokens that ran against the model - (may contain special tokens). + description: The actual sequence of tokens that ran against the model (may contain special tokens). uiOrder: 1 title: Sequence format: string @@ -340,23 +312,20 @@ TASK_FILL_MASK: title: Results format: array required: - - results + - results title: Output format: object TASK_IMAGE_CLASSIFICATION: - shortDescription: Image classification is the task of assigning a label or class - to an entire image. - description: 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. + shortDescription: Image classification is the task of assigning a label or class to an entire image. + description: 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: uiOrder: 0 properties: image: description: The image file. acceptFormats: - - image/* + - image/* uiOrder: 1 title: Image format: string @@ -364,8 +333,8 @@ TASK_IMAGE_CLASSIFICATION: $ref: '#/$defs/model' uiOrder: 0 required: - - image - - model + - image + - model title: Input format: object output: @@ -381,14 +350,13 @@ TASK_IMAGE_CLASSIFICATION: title: Label format: string score: - description: A float that represents how likely it is that the image - file belongs to this class. + description: A float that represents how likely it is that the image file belongs to this class. uiOrder: 0 title: Score format: number required: - - label - - score + - label + - score description: Class. title: Class format: object @@ -396,22 +364,20 @@ TASK_IMAGE_CLASSIFICATION: title: Classes format: array required: - - classes + - classes title: Output format: object TASK_IMAGE_SEGMENTATION: - shortDescription: Image Segmentation divides an image into segments where each pixel - in the image is mapped to an object. - description: 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. + shortDescription: Image Segmentation divides an image into segments where each pixel in the image is mapped to an object. + description: 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: uiOrder: 0 properties: image: description: The image file. acceptFormats: - - image/* + - image/* uiOrder: 1 title: Image format: string @@ -419,8 +385,8 @@ TASK_IMAGE_SEGMENTATION: $ref: '#/$defs/model' uiOrder: 0 required: - - image - - model + - image + - model title: Input format: object output: @@ -436,21 +402,19 @@ TASK_IMAGE_SEGMENTATION: title: Label format: string mask: - description: A str (base64 str of a single channel black-and-white img) - representing the mask of a segment. + description: A str (base64 str of a single channel black-and-white img) representing the mask of a segment. uiOrder: 1 title: Mask format: image/png score: - description: A float that represents how likely it is that the segment - belongs to the given class. + description: A float that represents how likely it is that the segment belongs to the given class. uiOrder: 2 title: Score format: number required: - - label - - mask - - score + - label + - mask + - score description: Segment. title: Segment format: object @@ -458,21 +422,20 @@ TASK_IMAGE_SEGMENTATION: title: Segments format: array required: - - segments + - segments title: Output format: object TASK_IMAGE_TO_TEXT: shortDescription: Image to text models output a text from a given image. - description: 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. + description: 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: uiOrder: 0 properties: image: description: The image file. acceptFormats: - - image/* + - image/* uiOrder: 1 title: Image format: string @@ -480,8 +443,8 @@ TASK_IMAGE_TO_TEXT: $ref: '#/$defs/model' uiOrder: 0 required: - - image - - model + - image + - model title: Input format: object output: @@ -493,22 +456,20 @@ TASK_IMAGE_TO_TEXT: title: Text format: string required: - - text + - text title: Output format: object TASK_OBJECT_DETECTION: - shortDescription: Object Detection models allow users to identify objects of certain - defined classes. - description: 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. + shortDescription: Object Detection models allow users to identify objects of certain defined classes. + description: 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. input: uiOrder: 0 properties: image: description: The image file. acceptFormats: - - image/* + - image/* uiOrder: 1 title: Image format: string @@ -516,8 +477,8 @@ TASK_OBJECT_DETECTION: $ref: '#/$defs/model' uiOrder: 0 required: - - image - - model + - image + - model title: Input format: object output: @@ -528,8 +489,7 @@ TASK_OBJECT_DETECTION: items: properties: box: - description: A dict (with keys [xmin,ymin,xmax,ymax]) representing the - bounding box of a detected object. + description: A dict (with keys [xmin,ymin,xmax,ymax]) representing the bounding box of a detected object. uiOrder: 0 properties: xmax: @@ -553,28 +513,26 @@ TASK_OBJECT_DETECTION: title: Y min format: number required: - - xmax - - xmin - - ymax - - ymin + - xmax + - xmin + - ymax + - ymin title: Box format: object label: - description: The label for the class (model specific) of a detected - object. + description: The label for the class (model specific) of a detected object. uiOrder: 1 title: Label format: string score: - description: A float that represents how likely it is that the detected - object belongs to the given class. + description: A float that represents how likely it is that the detected object belongs to the given class. uiOrder: 2 title: Score format: number required: - - box - - label - - score + - box + - label + - score description: Object. title: Object format: object @@ -582,15 +540,14 @@ TASK_OBJECT_DETECTION: title: Objects format: array required: - - objects + - objects title: Output format: object TASK_QUESTION_ANSWERING: - shortDescription: 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. - description: 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!. + shortDescription: 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. + description: 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: uiOrder: 0 properties: @@ -600,20 +557,20 @@ TASK_QUESTION_ANSWERING: context: description: The context for answering the question. acceptFormats: - - string + - string uiOrder: 0 title: Context format: string question: description: The question. acceptFormats: - - string + - string uiOrder: 1 title: Question format: string required: - - question - - context + - question + - context description: Inputs. title: Inputs format: object @@ -624,8 +581,8 @@ TASK_QUESTION_ANSWERING: $ref: '#/$defs/options' uiOrder: 2 required: - - inputs - - model + - inputs + - model title: Input format: object output: @@ -652,16 +609,14 @@ TASK_QUESTION_ANSWERING: title: Stop format: integer required: - - answer + - answer title: Output format: object TASK_SENTENCE_SIMILARITY: - shortDescription: Sentence Similarity is the task of determining how similar two - texts are. - description: 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. + shortDescription: Sentence Similarity is the task of determining how similar two texts are. + description: 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: uiOrder: 0 properties: @@ -671,7 +626,7 @@ TASK_SENTENCE_SIMILARITY: sentences: description: A list of strings which will be compared against the source-sentence. acceptFormats: - - array + - array uiOrder: 0 items: description: Items. @@ -679,19 +634,17 @@ TASK_SENTENCE_SIMILARITY: title: Sentences format: array source-sentence: - description: The string that you wish to compare the other strings with. - This can be a phrase, sentence, or longer passage, depending on the + description: 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. acceptFormats: - - string - shortDescription: The string that you wish to compare the other strings - with. + - string + shortDescription: The string that you wish to compare the other strings with. uiOrder: 1 title: Source Sentence format: string required: - - source-sentence - - sentences + - source-sentence + - sentences description: Inputs. title: Inputs format: object @@ -702,8 +655,8 @@ TASK_SENTENCE_SIMILARITY: $ref: '#/$defs/options' uiOrder: 2 required: - - inputs - - model + - inputs + - model title: Input format: object output: @@ -719,22 +672,20 @@ TASK_SENTENCE_SIMILARITY: title: Scores format: array required: - - scores + - scores title: Output format: object TASK_SPEECH_RECOGNITION: - shortDescription: Automatic Speech Recognition (ASR), also known as Speech to Text - (STT), is the task of transcribing a given audio to text. - description: 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. + shortDescription: Automatic Speech Recognition (ASR), also known as Speech to Text (STT), is the task of transcribing a given audio to text. + description: 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: uiOrder: 0 properties: audio: description: The audio file. acceptFormats: - - audio/* + - audio/* uiOrder: 1 title: Audio format: string @@ -742,8 +693,8 @@ TASK_SPEECH_RECOGNITION: $ref: '#/$defs/model' uiOrder: 0 required: - - audio - - model + - audio + - model title: Input format: object output: @@ -755,15 +706,13 @@ TASK_SPEECH_RECOGNITION: title: Text format: string required: - - text + - text title: Output format: object TASK_SUMMARIZATION: - shortDescription: Summarization is the task of producing a shorter version of a - document while preserving its important information. - description: 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. + shortDescription: Summarization is the task of producing a shorter version of a document while preserving its important information. + description: 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: uiOrder: 0 properties: @@ -780,38 +729,34 @@ TASK_SUMMARIZATION: uiOrder: 2 properties: max-length: - description: Integer to define the maximum length in tokens of the output - summary. + description: Integer to define the maximum length in tokens of the output summary. acceptFormats: - - integer + - integer uiOrder: 0 title: Max Length format: integer max-time: acceptFormats: - - number - - integer + - number + - integer uiOrder: 1 maximum: 120.0 minimum: 0.0 - description: The amount of time in seconds that the query should take - maximum. Network can cause some overhead so it will be a soft limit. + description: The amount of time in seconds that the query should take maximum. Network can cause some overhead so it will be a soft limit. title: Max Time format: number min-length: - description: Integer to define the minimum length in tokens of the output - summary. + description: Integer to define the minimum length in tokens of the output summary. acceptFormats: - - integer + - integer uiOrder: 2 title: Min Length format: integer repetition-penalty: - description: The more a token is used within generation the more it is - penalized to not be picked in successive generation passes. + description: The more a token is used within generation the more it is penalized to not be picked in successive generation passes. acceptFormats: - - number - - integer + - number + - integer uiOrder: 3 maximum: 100.0 minimum: 0.0 @@ -819,12 +764,11 @@ TASK_SUMMARIZATION: format: number temperature: default: 1.0 - description: The temperature of the sampling operation. 1 means regular - sampling, 0 means always take the highest score, 100.0 is getting closer + description: 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. acceptFormats: - - number - - integer + - number + - integer shortDescription: The temperature of the sampling operation. uiOrder: 4 maximum: 100.0 @@ -832,22 +776,19 @@ TASK_SUMMARIZATION: title: Temperature format: number top-k: - description: Integer to define the top tokens considered within the sample - operation to create new text. + description: Integer to define the top tokens considered within the sample operation to create new text. acceptFormats: - - integer + - integer uiOrder: 5 title: Top K format: integer top-p: - description: 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. + description: 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. acceptFormats: - - number - - integer - shortDescription: Float to define the tokens that are within the sample - operation of text generation. + - number + - integer + shortDescription: Float to define the tokens that are within the sample operation of text generation. uiOrder: 6 title: Top P format: number @@ -856,8 +797,8 @@ TASK_SUMMARIZATION: title: Parameters format: object required: - - inputs - - model + - inputs + - model title: Input format: object output: @@ -869,12 +810,11 @@ TASK_SUMMARIZATION: title: Summary Text format: string required: - - summary-text + - summary-text title: Output format: object TASK_TABLE_QUESTION_ANSWERING: - shortDescription: Table Question Answering (Table QA) is the answering a question - about an information on a given table. + shortDescription: Table Question Answering (Table QA) is the answering a question about an information on a given table. input: uiOrder: 0 properties: @@ -884,23 +824,22 @@ TASK_TABLE_QUESTION_ANSWERING: query: description: The query in plain text that you want to ask the table. acceptFormats: - - string + - string uiOrder: 0 title: Query format: string table: - description: A table of data represented as a dict of list where entries - are headers and the lists are all the values, all lists must have the + description: A table of data represented as a dict of list where entries are headers and the lists are all the values, all lists must have the same size. acceptFormats: - - '*' + - '*' uiOrder: 1 required: [] title: Table format: object required: - - query - - table + - query + - table description: Inputs. title: Inputs format: object @@ -911,8 +850,8 @@ TASK_TABLE_QUESTION_ANSWERING: $ref: '#/$defs/options' uiOrder: 2 required: - - inputs - - model + - inputs + - model title: Input format: object output: @@ -949,14 +888,12 @@ TASK_TABLE_QUESTION_ANSWERING: title: Coordinates format: array required: - - answer + - answer title: Output format: object TASK_TEXT_CLASSIFICATION: - shortDescription: Text Classification is the task of assigning a label or class - to a given text. - description: Text Classification is the task of assigning a label or class to a - given text. Some use cases are sentiment analysis, natural language inference, + shortDescription: Text Classification is the task of assigning a label or class to a given text. + description: 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: uiOrder: 0 @@ -971,8 +908,8 @@ TASK_TEXT_CLASSIFICATION: $ref: '#/$defs/options' uiOrder: 2 required: - - inputs - - model + - inputs + - model title: Input format: object output: @@ -988,14 +925,13 @@ TASK_TEXT_CLASSIFICATION: title: Label format: string score: - description: A floats that represents how likely is that the text belongs - the this class. + description: A floats that represents how likely is that the text belongs the this class. uiOrder: 1 title: Score format: number required: - - label - - score + - label + - score description: Result. title: Result format: object @@ -1003,14 +939,12 @@ TASK_TEXT_CLASSIFICATION: title: Results format: array required: - - results + - results title: Output format: object TASK_TEXT_GENERATION: - shortDescription: Generating text is the task of producing new text. These models - can, for example, fill in incomplete text or paraphrase. - description: Generating text is the task of producing new text. These models can, - for example, fill in incomplete text or paraphrase. + shortDescription: Generating text is the task of producing new text. These models can, for example, fill in incomplete text or paraphrase. + description: Generating text is the task of producing new text. These models can, for example, fill in incomplete text or paraphrase. input: uiOrder: 0 properties: @@ -1029,85 +963,75 @@ TASK_TEXT_GENERATION: do-sample: description: Whether or not to use sampling, use greedy decoding otherwise. acceptFormats: - - boolean + - boolean uiOrder: 0 title: Do Sample format: boolean max-new-tokens: - description: 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. + description: 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. acceptFormats: - - integer + - integer shortDescription: The amount of new tokens to be generated. uiOrder: 1 title: Max New Tokens format: integer max-time: - description: 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. + description: 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. acceptFormats: - - number - - integer - shortDescription: The amount of time in seconds that the query should - take maximum. + - number + - integer + shortDescription: The amount of time in seconds that the query should take maximum. uiOrder: 2 title: Max Time format: number num-return-sequences: description: The number of proposition you want to be returned. acceptFormats: - - integer + - integer uiOrder: 3 title: Num Return Sequences format: integer repetition-penalty: - description: The more a token is used within generation the more it is - penalized to not be picked in successive generation passes. + description: The more a token is used within generation the more it is penalized to not be picked in successive generation passes. acceptFormats: - - number - - integer + - number + - integer uiOrder: 4 title: Repetition Penalty format: number return-full-text: - description: If set to False, the return results will not contain the - original query making it easier for prompting. + description: If set to False, the return results will not contain the original query making it easier for prompting. acceptFormats: - - boolean + - boolean uiOrder: 5 title: Return Full Text format: boolean temperature: - description: The temperature of the sampling operation. 1 means regular - sampling, 0 means always take the highest score, 100.0 is getting closer + description: 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. acceptFormats: - - number - - integer + - number + - integer shortDescription: The temperature of the sampling operation. uiOrder: 6 title: Temperature format: number top-k: - description: Integer to define the top tokens considered within the sample - operation to create new text. + description: Integer to define the top tokens considered within the sample operation to create new text. acceptFormats: - - integer + - integer uiOrder: 7 title: Top K format: integer top-p: - description: 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. + description: 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. acceptFormats: - - number - - integer - shortDescription: Float to define the tokens that are within the sample - operation of text generation. + - number + - integer + shortDescription: Float to define the tokens that are within the sample operation of text generation. uiOrder: 8 title: Top P format: number @@ -1116,8 +1040,8 @@ TASK_TEXT_GENERATION: title: Parameters format: object required: - - inputs - - model + - inputs + - model title: Input format: object output: @@ -1129,13 +1053,12 @@ TASK_TEXT_GENERATION: title: Generated Text format: string required: - - generated-text + - generated-text title: Output format: object TASK_TEXT_TO_IMAGE: shortDescription: Generates images from input text. - description: Generates images from input text. These models can be used to generate - and modify images based on text prompts. + description: Generates images from input text. These models can be used to generate and modify images based on text prompts. input: uiOrder: 0 properties: @@ -1154,36 +1077,36 @@ TASK_TEXT_TO_IMAGE: guidance-scale: description: Guidance scale. acceptFormats: - - number - - integer + - number + - integer uiOrder: 0 title: Guidance Scale format: number height: description: Image Height. acceptFormats: - - integer + - integer uiOrder: 1 title: Height format: integer negative-prompt: description: Negative prompt for generating the image. acceptFormats: - - string + - string uiOrder: 2 title: Negative Prompt format: string num-inference-steps: description: Number of inference steps. acceptFormats: - - integer + - integer uiOrder: 3 title: Num Inference Steps format: integer width: description: Image width. acceptFormats: - - integer + - integer uiOrder: 4 title: Width format: integer @@ -1192,8 +1115,8 @@ TASK_TEXT_TO_IMAGE: title: Parameters format: object required: - - inputs - - model + - inputs + - model title: Input format: object output: @@ -1205,18 +1128,14 @@ TASK_TEXT_TO_IMAGE: title: Image format: image/jpeg required: - - image + - image title: Output format: object TASK_TOKEN_CLASSIFICATION: - shortDescription: Token classification is a natural language understanding task - in which a label is assigned to some tokens in a text. - description: 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. + shortDescription: Token classification is a natural language understanding task in which a label is assigned to some tokens in a text. + description: 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. input: uiOrder: 0 properties: @@ -1241,9 +1160,8 @@ TASK_TOKEN_CLASSIFICATION: 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. acceptFormats: - - string - shortDescription: 'There are several aggregation strategies: none, simple, - first, average, and max.' + - string + shortDescription: 'There are several aggregation strategies: none, simple, first, average, and max.' uiOrder: 0 title: Aggregation Strategy format: string @@ -1252,8 +1170,8 @@ TASK_TOKEN_CLASSIFICATION: title: Parameters format: object required: - - inputs - - model + - inputs + - model title: Input format: object output: @@ -1264,8 +1182,7 @@ TASK_TOKEN_CLASSIFICATION: items: properties: end: - description: The offset stringwise where the answer is located. Useful - to disambiguate if word occurs multiple times. + description: The offset stringwise where the answer is located. Useful to disambiguate if word occurs multiple times. uiOrder: 0 title: End format: integer @@ -1280,8 +1197,7 @@ TASK_TOKEN_CLASSIFICATION: title: Score format: number start: - description: The offset stringwise where the answer is located. Useful - to disambiguate if word occurs multiple times. + description: The offset stringwise where the answer is located. Useful to disambiguate if word occurs multiple times. uiOrder: 3 title: Start format: integer @@ -1297,12 +1213,11 @@ TASK_TOKEN_CLASSIFICATION: title: Results format: array required: - - results + - results title: Output format: object TASK_TRANSLATION: - shortDescription: Translation is the task of converting text from one language to - another. + shortDescription: Translation is the task of converting text from one language to another. input: uiOrder: 0 properties: @@ -1316,8 +1231,8 @@ TASK_TRANSLATION: $ref: '#/$defs/options' uiOrder: 2 required: - - inputs - - model + - inputs + - model title: Input format: object output: @@ -1329,13 +1244,12 @@ TASK_TRANSLATION: title: Translation Text format: string required: - - translation-text + - translation-text title: Output format: object TASK_ZERO_SHOT_CLASSIFICATION: - shortDescription: 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. + shortDescription: 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. input: uiOrder: 0 properties: @@ -1352,10 +1266,8 @@ TASK_ZERO_SHOT_CLASSIFICATION: uiOrder: 2 properties: candidate-labels: - description: 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 + description: 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. ). shortDescription: a list of strings that are potential classes for inputs. uiOrder: 0 @@ -1368,18 +1280,18 @@ TASK_ZERO_SHOT_CLASSIFICATION: multi-label: description: Boolean that is set to True if classes can overlap. acceptFormats: - - boolean + - boolean uiOrder: 1 title: Multi Label format: boolean required: - - candidate-labels + - candidate-labels description: Parameters. title: Parameters format: object required: - - inputs - - model + - inputs + - model title: Input format: object output: @@ -1395,8 +1307,7 @@ TASK_ZERO_SHOT_CLASSIFICATION: title: Labels format: array scores: - description: a list of floats that correspond the the probability of label, - in the same order as labels. + description: a list of floats that correspond the the probability of label, in the same order as labels. uiOrder: 0 items: description: float that correspond the the probability of label. @@ -1410,7 +1321,7 @@ TASK_ZERO_SHOT_CLASSIFICATION: title: Sequence format: string required: - - labels - - scores + - labels + - scores title: Output format: object diff --git a/pkg/component/ai/instill/v0/config/definition.yaml b/pkg/component/ai/instill/v0/config/definition.yaml index a1380ed00..03dde69f9 100644 --- a/pkg/component/ai/instill/v0/config/definition.yaml +++ b/pkg/component/ai/instill/v0/config/definition.yaml @@ -1,16 +1,16 @@ 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 + - 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/instill/v0/config/tasks.yaml b/pkg/component/ai/instill/v0/config/tasks.yaml index 22dff2535..db96a4381 100644 --- a/pkg/component/ai/instill/v0/config/tasks.yaml +++ b/pkg/component/ai/instill/v0/config/tasks.yaml @@ -12,8 +12,8 @@ $defs: title: Role format: string required: - - role - - content + - role + - content title: Chat Message format: object common: @@ -23,20 +23,20 @@ $defs: image-base64: description: Image base64. acceptFormats: - - image/* + - image/* uiOrder: 2 title: Image format: string model-name: description: The Instill Model model to be used. acceptFormats: - - string + - string uiOrder: 0 title: Model Name format: string required: - - image-base64 - - model-name + - image-base64 + - model-name title: Input format: object TASK_CLASSIFICATION: @@ -115,40 +115,38 @@ TASK_TEXT_GENERATION: default: 50 description: The maximum number of tokens for model to generate. acceptFormats: - - integer + - integer uiOrder: 6 title: Max New Tokens format: integer model-name: description: The Instill Model model to be used. acceptFormats: - - string + - string uiOrder: 0 title: Model Name format: string prompt: description: The prompt text. acceptFormats: - - string + - string uiOrder: 2 title: Prompt format: string seed: description: The seed. acceptFormats: - - integer + - integer uiOrder: 4 title: Seed format: integer system-message: default: You are a helpful assistant. - description: The system message helps set the behavior of the assistant. For - example, you can modify the personality of the assistant or provide specific - instructions about how it should behave throughout the conversation. By - default, the model’s behavior is using a generic message as "You are a helpful - assistant.". + description: The system message helps set the behavior of the assistant. For example, you can modify the personality of the assistant or provide + specific instructions about how it should behave throughout the conversation. By default, the model’s behavior is using a generic message as "You + are a helpful assistant.". acceptFormats: - - string + - string shortDescription: The system message helps set the behavior of the assistant uiOrder: 2 title: System Message @@ -157,13 +155,13 @@ TASK_TEXT_GENERATION: default: 0.7 description: The temperature for sampling. acceptFormats: - - number + - number uiOrder: 5 title: Temperature format: number required: - - prompt - - model-name + - prompt + - model-name title: Input format: object output: @@ -176,7 +174,7 @@ TASK_TEXT_GENERATION: title: Text format: string required: - - text + - text title: Output format: object TASK_TEXT_GENERATION_CHAT: @@ -186,18 +184,14 @@ TASK_TEXT_GENERATION_CHAT: uiOrder: 0 properties: chat-history: - description: 'Incorporate external chat history, specifically previous messages - within the conversation. Please note that System Message will be ignored - and will not have any effect when this field is populated. Each message - should adhere to the format: : {"role": "The message role, i.e. ''system'', - ''user'' or ''assistant''", "content": "message content"}.' - acceptFormats: - - object - shortDescription: '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. + description: 'Incorporate external chat history, specifically previous messages within the conversation. Please note that System Message will be + ignored and will not have any effect when this field is populated. Each message should adhere to the format: : {"role": "The message role, i.e. ''system'', ''user'' or ''assistant''", "content": "message content"}.' + acceptFormats: + - object + shortDescription: '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"}.' uiOrder: 4 items: $ref: '#/$defs/chat-message' @@ -207,28 +201,28 @@ TASK_TEXT_GENERATION_CHAT: default: 50 description: The maximum number of tokens for model to generate. acceptFormats: - - integer + - integer uiOrder: 6 title: Max New Tokens format: integer model-name: description: The Instill Model model to be used. acceptFormats: - - string + - string uiOrder: 0 title: Model Name format: string prompt: description: The prompt text. acceptFormats: - - string + - string uiOrder: 2 title: Prompt format: string prompt-images: description: The prompt images. acceptFormats: - - array + - array uiOrder: 3 items: format: string @@ -237,19 +231,17 @@ TASK_TEXT_GENERATION_CHAT: seed: description: The seed. acceptFormats: - - integer + - integer uiOrder: 4 title: Seed format: integer system-message: default: You are a helpful assistant. - description: The system message helps set the behavior of the assistant. For - example, you can modify the personality of the assistant or provide specific - instructions about how it should behave throughout the conversation. By - default, the model’s behavior is using a generic message as "You are a helpful - assistant.". + description: The system message helps set the behavior of the assistant. For example, you can modify the personality of the assistant or provide + specific instructions about how it should behave throughout the conversation. By default, the model’s behavior is using a generic message as "You + are a helpful assistant.". acceptFormats: - - string + - string shortDescription: The system message helps set the behavior of the assistant uiOrder: 2 title: System Message @@ -258,13 +250,13 @@ TASK_TEXT_GENERATION_CHAT: default: 0.7 description: The temperature for sampling. acceptFormats: - - number + - number uiOrder: 5 title: Temperature format: number required: - - prompt - - model-name + - prompt + - model-name title: Input format: object output: @@ -277,7 +269,7 @@ TASK_TEXT_GENERATION_CHAT: title: Text format: string required: - - text + - text title: Output format: object TASK_TEXT_TO_IMAGE: @@ -289,28 +281,28 @@ TASK_TEXT_TO_IMAGE: model-name: description: The Instill Model model to be used. acceptFormats: - - string + - string uiOrder: 0 title: Model Name format: string prompt: description: The prompt text. acceptFormats: - - string + - string uiOrder: 2 title: Prompt format: string samples: description: The number of generated samples, default is 1. acceptFormats: - - integer + - integer uiOrder: 5 title: Samples format: integer seed: description: The seed, default is 0. acceptFormats: - - integer + - integer uiOrder: 6 title: Seed format: integer @@ -319,33 +311,31 @@ TASK_TEXT_TO_IMAGE: description: Keywords of what you do not wish to see in the output image. shortDescription: Keywords of what you do not wish to see in the output image. acceptFormats: - - string + - string uiOrder: 7 format: string aspect-ratio: title: Aspect ratio - description: Controls the aspect ratio of the generated image. Defaults to - 1:1. - shortDescription: Controls the aspect ratio of the generated image. Defaults - to 1:1. + description: Controls the aspect ratio of the generated image. Defaults to 1:1. + shortDescription: Controls the aspect ratio of the generated image. Defaults to 1:1. acceptFormats: - - string + - string uiOrder: 8 default: '1:1' enum: - - '16:9' - - '1:1' - - '21:9' - - '2:3' - - '3:2' - - '4:5' - - '5:4' - - '9:16' - - '9:21' + - '16:9' + - '1:1' + - '21:9' + - '2:3' + - '3:2' + - '4:5' + - '5:4' + - '9:16' + - '9:21' format: string required: - - prompt - - model-name + - prompt + - model-name title: Input format: object output: @@ -361,7 +351,7 @@ TASK_TEXT_TO_IMAGE: title: Images format: array required: - - images + - images title: Output format: object TASK_VISUAL_QUESTION_ANSWERING: @@ -372,11 +362,9 @@ TASK_CHAT: $ref: '#/TASK_TEXT_GENERATION_CHAT' TASK_EMBEDDING: title: Embedding - shortDescription: 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. + shortDescription: 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: title: Embedding Input description: Input schema of the embedding task. @@ -387,12 +375,11 @@ TASK_EMBEDDING: shortDescription: Input data. properties: model: - description: The model to be used for generating embeddings. It should - be `namespace/model-name/version`. i.e. `abrc/yolov7-stomata/v0.1.0`. + description: 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. shortDescription: The model to be used. acceptFormats: - - string + - string uiOrder: 0 title: Model format: string @@ -400,101 +387,92 @@ TASK_EMBEDDING: title: Embeddings items: oneOf: - - properties: - text: - title: Text Content - description: 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. - shortDescription: Text content. - acceptFormats: - - string - uiOrder: 1 - format: string - type: - title: Text - description: Text input content type. - shortDescription: Text input content type. - acceptFormats: - - string - const: text - uiOrder: 0 - format: string - title: Text - required: - - text - - type - format: object - - properties: - image-url: - title: Image URL - description: 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. - shortDescription: Image content URL. - acceptFormats: - - string - uiOrder: 1 - format: string - type: - title: Image URL - description: Image URL input content type. - shortDescription: Image URL input content type - acceptFormats: - - string - const: image-url - uiOrder: 0 - format: string - title: Image URL - required: - - image-url - - type - format: object - - properties: - image-base64: - title: Image File - description: 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. - shortDescription: Image file input. - acceptFormats: - - image/* - uiOrder: 1 - format: string - type: - title: Image File - description: Image file input content type. - shortDescription: Image file input content type. - acceptFormats: - - string - const: image-base64 - uiOrder: 0 - format: string - title: Image Base64 - required: - - image-base64 - - type - format: object + - properties: + text: + title: Text Content + description: 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. + shortDescription: Text content. + acceptFormats: + - string + uiOrder: 1 + format: string + type: + title: Text + description: Text input content type. + shortDescription: Text input content type. + acceptFormats: + - string + const: text + uiOrder: 0 + format: string + title: Text + required: + - text + - type + format: object + - properties: + image-url: + title: Image URL + description: 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. + shortDescription: Image content URL. + acceptFormats: + - string + uiOrder: 1 + format: string + type: + title: Image URL + description: Image URL input content type. + shortDescription: Image URL input content type + acceptFormats: + - string + const: image-url + uiOrder: 0 + format: string + title: Image URL + required: + - image-url + - type + format: object + - properties: + image-base64: + title: Image File + description: 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. + shortDescription: Image file input. + acceptFormats: + - image/* + uiOrder: 1 + format: string + type: + title: Image File + description: Image file input content type. + shortDescription: Image file input content type. + acceptFormats: + - string + const: image-base64 + uiOrder: 0 + format: string + title: Image Base64 + required: + - image-base64 + - type + format: object title: Embedding description: Input data to be embedded. uiOrder: 0 required: - - type + - type format: object description: List of input data to be embedded. uiOrder: 1 format: array required: - - model - - embeddings + - model + - embeddings uiOrder: 0 title: Data format: object @@ -507,10 +485,10 @@ TASK_EMBEDDING: description: The data format of the embeddings. Defaults to float. shortDescription: Data format acceptFormats: - - string + - string enum: - - float - - base64 + - float + - base64 default: float uiOrder: 0 format: string @@ -519,7 +497,7 @@ TASK_EMBEDDING: description: Number of dimensions in the output embedding vectors. shortDescription: Number of dimensions acceptFormats: - - integer + - integer default: 512 uiOrder: 1 format: integer @@ -528,20 +506,19 @@ TASK_EMBEDDING: description: The type of input data to be embedded (e.g., query, document). shortDescription: Type of input data acceptFormats: - - string + - string uiOrder: 2 format: string truncate: title: Truncate - description: How to handle inputs longer than the max token length. Defaults - to 'End'. + description: How to handle inputs longer than the max token length. Defaults to 'End'. shortDescription: Truncation handling acceptFormats: - - string + - string enum: - - None - - End - - Start + - None + - End + - Start default: End uiOrder: 3 format: string @@ -550,7 +527,7 @@ TASK_EMBEDDING: required: [] format: object required: - - data + - data format: object output: title: Embedding Output @@ -583,23 +560,22 @@ TASK_EMBEDDING: format: array created: title: Created - description: The Unix timestamp (in seconds) of when the embedding - was created. + description: The Unix timestamp (in seconds) of when the embedding was created. shortDescription: Timestamp of creation uiOrder: 2 format: integer required: - - index - - vector - - created + - index + - vector + - created format: object uiOrder: 0 format: array required: - - embeddings + - embeddings uiOrder: 0 title: Data format: object required: - - data + - data format: object diff --git a/pkg/component/ai/mistralai/v0/config/definition.yaml b/pkg/component/ai/mistralai/v0/config/definition.yaml index c293e2b6d..aa94de5ae 100644 --- a/pkg/component/ai/mistralai/v0/config/definition.yaml +++ b/pkg/component/ai/mistralai/v0/config/definition.yaml @@ -1,6 +1,6 @@ availableTasks: -- TASK_TEXT_GENERATION_CHAT -- TASK_TEXT_EMBEDDINGS + - 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/mistralai/v0/config/setup.yaml b/pkg/component/ai/mistralai/v0/config/setup.yaml index 7b9a1a572..f57ec69df 100644 --- a/pkg/component/ai/mistralai/v0/config/setup.yaml +++ b/pkg/component/ai/mistralai/v0/config/setup.yaml @@ -1,10 +1,9 @@ additionalProperties: false properties: api-key: - description: Fill in your Mistral API key. To find your keys, visit the Mistral - AI platform page. + description: Fill in your Mistral API key. To find your keys, visit the Mistral AI platform page. acceptFormats: - - string + - string instillSecret: true instillCredential: true uiOrder: 0 diff --git a/pkg/component/ai/mistralai/v0/config/tasks.yaml b/pkg/component/ai/mistralai/v0/config/tasks.yaml index 3473629f7..83f22fb2e 100644 --- a/pkg/component/ai/mistralai/v0/config/tasks.yaml +++ b/pkg/component/ai/mistralai/v0/config/tasks.yaml @@ -10,7 +10,7 @@ $defs: uiOrder: 0 format: string required: - - url + - url title: Image URL description: The image URL. uiOrder: 0 @@ -23,13 +23,13 @@ $defs: type: description: The type of the content part. enum: - - text - - image_url + - text + - image_url title: Type uiOrder: 2 format: string required: - - type + - type format: object format: array chat-message: @@ -45,8 +45,8 @@ $defs: title: Role format: string required: - - role - - content + - role + - content title: Chat Message format: object chat-usage: @@ -64,8 +64,8 @@ $defs: title: Output Tokens format: number required: - - input-tokens - - output-tokens + - input-tokens + - output-tokens title: Usage format: object embedding-usage: @@ -78,32 +78,27 @@ $defs: title: Token Count format: number required: - - tokens + - tokens title: Usage format: object TASK_TEXT_GENERATION_CHAT: shortDescription: Provide text outputs in response to text inputs. - description: 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. + description: 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. input: description: Input. uiOrder: 0 properties: chat-history: - description: 'Incorporate external chat history, specifically previous messages - within the conversation. Please note that System Message will be ignored - and will not have any effect when this field is populated. Each message - should adhere to the format: : {"role": "The message role, i.e. ''system'', - ''user'' or ''assistant''", "content": "message content"}.' + description: 'Incorporate external chat history, specifically previous messages within the conversation. Please note that System Message will be + ignored and will not have any effect when this field is populated. Each message should adhere to the format: : {"role": "The message role, i.e. + ''system'', ''user'' or ''assistant''", "content": "message content"}.' acceptFormats: - - object - shortDescription: 'Incorporate external chat history, specifically previous - messages within the conversation. (Note: The Mistral models are not trained - to process images, thus images will be omitted)' + - object + shortDescription: 'Incorporate external chat history, specifically previous messages within the conversation. (Note: The Mistral models are not + trained to process images, thus images will be omitted)' uiOrder: 4 items: $ref: '#/$defs/chat-message' @@ -113,47 +108,46 @@ TASK_TEXT_GENERATION_CHAT: default: 50 description: The maximum number of tokens for model to generate. acceptFormats: - - integer + - integer uiOrder: 6 title: Max New Tokens format: integer model-name: enum: - - open-mixtral-8x22b - - open-mixtral-8x7b - - open-mistral-7b - - mistral-large-latest - - mistral-small-latest - - codestral-latest - example: open-mixtral-8x22b - description: The Mistral model to be used. - acceptFormats: - - string - uiOrder: 0 - instillCredentialMap: - values: - open-mixtral-8x22b - open-mixtral-8x7b - open-mistral-7b - mistral-large-latest - mistral-small-latest - codestral-latest + example: open-mixtral-8x22b + description: The Mistral model to be used. + acceptFormats: + - string + uiOrder: 0 + instillCredentialMap: + values: + - open-mixtral-8x22b + - open-mixtral-8x7b + - open-mistral-7b + - mistral-large-latest + - mistral-small-latest + - codestral-latest targets: - - setup.api-key + - setup.api-key title: Model Name format: string prompt: description: The prompt text. acceptFormats: - - string + - string uiOrder: 2 title: Prompt format: string prompt-images: - description: 'The prompt images (Note: The Mistral models are not trained - to process images, thus images will be omitted).' + description: 'The prompt images (Note: The Mistral models are not trained to process images, thus images will be omitted).' acceptFormats: - - array + - array uiOrder: 3 items: format: string @@ -162,19 +156,17 @@ TASK_TEXT_GENERATION_CHAT: seed: description: The seed. acceptFormats: - - integer + - integer uiOrder: 4 title: Seed format: integer system-message: default: You are a helpful assistant. - description: The system message helps set the behavior of the assistant. For - example, you can modify the personality of the assistant or provide specific - instructions about how it should behave throughout the conversation. By - default, the model’s behavior is set using a generic message as "You are - a helpful assistant.". + description: The system message helps set the behavior of the assistant. For example, you can modify the personality of the assistant or provide + specific instructions about how it should behave throughout the conversation. By default, the model’s behavior is set using a generic message + as "You are a helpful assistant.". acceptFormats: - - string + - string shortDescription: The system message helps set the behavior of the assistant uiOrder: 2 title: System Message @@ -183,43 +175,40 @@ TASK_TEXT_GENERATION_CHAT: default: 0.7 description: The temperature for sampling. acceptFormats: - - number + - number uiOrder: 5 title: Temperature format: number top-k: default: 10 - description: 'Integer to define the top tokens considered within the sample - operation to create new text (Note: The Mistral models does not support + description: 'Integer to define the top tokens considered within the sample operation to create new text (Note: The Mistral models does not support top-k sampling).' acceptFormats: - - integer + - integer uiOrder: 5 title: Top K format: integer top-p: default: 0.5 - description: Float to define the tokens that are within the sample operation - of text generation. Add tokens in the sample for more probable to least + description: 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 (default=0.5). acceptFormats: - - number - - integer - shortDescription: Float to define the tokens that are within the sample operation - of text generation + - number + - integer + shortDescription: Float to define the tokens that are within the sample operation of text generation uiOrder: 6 title: Top P format: number safe: description: Safe generation mode. acceptFormats: - - boolean + - boolean uiOrder: 7 title: Safe format: boolean required: - - prompt - - model-name + - prompt + - model-name title: Input format: object output: @@ -234,42 +223,40 @@ TASK_TEXT_GENERATION_CHAT: usage: $ref: '#/$defs/chat-usage' required: - - text + - text title: Output format: object TASK_TEXT_EMBEDDINGS: - shortDescription: Turn text into a vector of numbers that capture its meaning, unlocking - use cases like semantic search. - description: An embedding is a list of floating point numbers that captures semantic - information about the text that it represents. + shortDescription: Turn text into a vector of numbers that capture its meaning, unlocking use cases like semantic search. + description: An embedding is a list of floating point numbers that captures semantic information about the text that it represents. input: uiOrder: 0 properties: model-name: enum: - - mistral-embed + - mistral-embed example: mistral-embed description: The Mistral embed model to be used. acceptFormats: - - string + - string uiOrder: 0 title: Model Name instillCredentialMap: values: - - mistral-embed + - mistral-embed targets: - - setup.api-key + - setup.api-key format: string text: description: The text. acceptFormats: - - string + - string uiOrder: 1 title: Text format: string required: - - text - - model-name + - text + - model-name title: Input format: object output: @@ -286,6 +273,6 @@ TASK_TEXT_EMBEDDINGS: usage: $ref: '#/$defs/embedding-usage' required: - - embedding + - embedding title: Output format: object diff --git a/pkg/component/ai/ollama/v0/config/definition.yaml b/pkg/component/ai/ollama/v0/config/definition.yaml index 45c0636ee..c1f0e92a4 100644 --- a/pkg/component/ai/ollama/v0/config/definition.yaml +++ b/pkg/component/ai/ollama/v0/config/definition.yaml @@ -1,6 +1,6 @@ availableTasks: -- TASK_TEXT_GENERATION_CHAT -- TASK_TEXT_EMBEDDINGS + - 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/ollama/v0/config/setup.yaml b/pkg/component/ai/ollama/v0/config/setup.yaml index 2e65741b1..85c2fc46a 100644 --- a/pkg/component/ai/ollama/v0/config/setup.yaml +++ b/pkg/component/ai/ollama/v0/config/setup.yaml @@ -1,26 +1,23 @@ additionalProperties: false properties: endpoint: - description: 'Fill in your Ollama hosting endpoint. ### WARNING ###: As of 2024-07-26, - the Ollama component does not support authentication methods. To prevent unauthorized - access to your Ollama serving resources, please implement additional security - measures such as IP whitelisting.' + description: 'Fill in your Ollama hosting endpoint. ### WARNING ###: As of 2024-07-26, the Ollama component does not support authentication methods. + To prevent unauthorized access to your Ollama serving resources, please implement additional security measures such as IP whitelisting.' acceptFormats: - - string + - string default: http://localhost:11434 uiOrder: 0 title: Endpoint format: string auto-pull: - description: Automatically pull the requested models from the Ollama server if - the model is not found in the local cache. + description: Automatically pull the requested models from the Ollama server if the model is not found in the local cache. acceptFormats: - - boolean + - boolean uiOrder: 1 title: Model Auto-Pull format: boolean required: -- endpoint -- auto-pull + - endpoint + - auto-pull title: Ollama Connection format: object diff --git a/pkg/component/ai/ollama/v0/config/tasks.yaml b/pkg/component/ai/ollama/v0/config/tasks.yaml index 3c60f8266..c8fc476b4 100644 --- a/pkg/component/ai/ollama/v0/config/tasks.yaml +++ b/pkg/component/ai/ollama/v0/config/tasks.yaml @@ -10,7 +10,7 @@ $defs: uiOrder: 0 format: string required: - - url + - url title: Image URL description: The image URL. uiOrder: 0 @@ -23,13 +23,13 @@ $defs: type: description: The type of the content part. enum: - - text - - image_url + - text + - image_url title: Type uiOrder: 2 format: string required: - - type + - type format: object format: array chat-message: @@ -45,32 +45,26 @@ $defs: title: Role format: string required: - - role - - content + - role + - content title: Chat Message format: object TASK_TEXT_GENERATION_CHAT: shortDescription: Provide text outputs in response to text/image inputs. - description: '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).' + description: '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).' input: description: Input. uiOrder: 0 properties: chat-history: - description: 'Incorporate external chat history, specifically previous messages - within the conversation. Please note that System Message will be ignored - and will not have any effect when this field is populated. Each message - should adhere to the format: : {"role": "The message role, i.e. ''system'', - ''user'' or ''assistant''", "content": "message content"}.' + description: 'Incorporate external chat history, specifically previous messages within the conversation. Please note that System Message will be + ignored and will not have any effect when this field is populated. Each message should adhere to the format: : {"role": "The message role, i.e. + ''system'', ''user'' or ''assistant''", "content": "message content"}.' acceptFormats: - - object - shortDescription: Incorporate external chat history, specifically previous - messages within the conversation. + - object + shortDescription: Incorporate external chat history, specifically previous messages within the conversation. uiOrder: 4 items: $ref: '#/$defs/chat-message' @@ -80,30 +74,29 @@ TASK_TEXT_GENERATION_CHAT: default: 50 description: The maximum number of tokens for model to generate. acceptFormats: - - integer + - integer uiOrder: 6 title: Max New Tokens format: integer model: example: moondream - description: The OSS model to be used, check [here](https://ollama.com/library) - for list of models available. + description: The OSS model to be used, check [here](https://ollama.com/library) for list of models available. acceptFormats: - - string + - string uiOrder: 0 title: Model Name format: string prompt: description: The prompt text. acceptFormats: - - string + - string uiOrder: 2 title: Prompt format: string prompt-images: description: The prompt images. acceptFormats: - - array + - array uiOrder: 3 items: format: string @@ -112,19 +105,17 @@ TASK_TEXT_GENERATION_CHAT: seed: description: The seed. acceptFormats: - - integer + - integer uiOrder: 4 title: Seed format: integer system-message: default: You are a helpful assistant. - description: The system message helps set the behavior of the assistant. For - example, you can modify the personality of the assistant or provide specific - instructions about how it should behave throughout the conversation. By - default, the model’s behavior is set using a generic message as "You are - a helpful assistant.". + description: The system message helps set the behavior of the assistant. For example, you can modify the personality of the assistant or provide + specific instructions about how it should behave throughout the conversation. By default, the model’s behavior is set using a generic message + as "You are a helpful assistant.". acceptFormats: - - string + - string shortDescription: The system message helps set the behavior of the assistant uiOrder: 2 title: System Message @@ -133,7 +124,7 @@ TASK_TEXT_GENERATION_CHAT: default: 0.7 description: The temperature for sampling. acceptFormats: - - number + - number uiOrder: 5 title: Temperature format: number @@ -141,13 +132,13 @@ TASK_TEXT_GENERATION_CHAT: default: 10 description: Top k for sampling. acceptFormats: - - integer + - integer uiOrder: 5 title: Top K format: integer required: - - prompt - - model + - prompt + - model title: Input format: object output: @@ -160,36 +151,33 @@ TASK_TEXT_GENERATION_CHAT: title: Text format: string required: - - text + - text title: Output format: object TASK_TEXT_EMBEDDINGS: - shortDescription: Turn text into a vector of numbers that capture its meaning, unlocking - use cases like semantic search. - description: An embedding is a list of floating point numbers that captures semantic - information about the text that it represents. + shortDescription: Turn text into a vector of numbers that capture its meaning, unlocking use cases like semantic search. + description: An embedding is a list of floating point numbers that captures semantic information about the text that it represents. input: uiOrder: 0 properties: model: example: snowflake-arctic-embed:22m - description: The OSS model to be used, check [here](https://ollama.com/library) - for list of models available. + description: The OSS model to be used, check [here](https://ollama.com/library) for list of models available. acceptFormats: - - string + - string uiOrder: 0 title: Model Name format: string text: description: The text. acceptFormats: - - string + - string uiOrder: 1 title: Text format: string required: - - text - - model + - text + - model title: Input format: object output: @@ -203,6 +191,6 @@ TASK_TEXT_EMBEDDINGS: title: Embedding format: array required: - - embedding + - embedding title: Output format: object diff --git a/pkg/component/ai/openai/v0/config/definition.yaml b/pkg/component/ai/openai/v0/config/definition.yaml index d9ede2fee..159e92421 100644 --- a/pkg/component/ai/openai/v0/config/definition.yaml +++ b/pkg/component/ai/openai/v0/config/definition.yaml @@ -1,9 +1,9 @@ availableTasks: -- TASK_TEXT_GENERATION -- TASK_TEXT_EMBEDDINGS -- TASK_SPEECH_RECOGNITION -- TASK_TEXT_TO_SPEECH -- TASK_TEXT_TO_IMAGE + - 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/openai/v0/config/setup.yaml b/pkg/component/ai/openai/v0/config/setup.yaml index 2c5ff84a0..99da4f5c9 100644 --- a/pkg/component/ai/openai/v0/config/setup.yaml +++ b/pkg/component/ai/openai/v0/config/setup.yaml @@ -1,20 +1,18 @@ additionalProperties: false properties: api-key: - description: Fill in your OpenAI API key. To find your keys, visit your OpenAI's - API Keys page. + description: Fill in your OpenAI API key. To find your keys, visit your OpenAI's API Keys page. acceptFormats: - - string + - string instillSecret: true instillCredential: true uiOrder: 0 title: API Key format: string organization: - description: Specify which organization is used for the requests. Usage will count - against the specified organization's subscription quota. + description: Specify which organization is used for the requests. Usage will count against the specified organization's subscription quota. acceptFormats: - - string + - string uiOrder: 1 title: Organization ID format: string diff --git a/pkg/component/ai/openai/v0/config/tasks.yaml b/pkg/component/ai/openai/v0/config/tasks.yaml index e7d913556..8b05dfc0d 100644 --- a/pkg/component/ai/openai/v0/config/tasks.yaml +++ b/pkg/component/ai/openai/v0/config/tasks.yaml @@ -12,8 +12,8 @@ $defs: title: Role format: string required: - - role - - content + - role + - content title: Chat Message format: object TASK_SPEECH_RECOGNITION: @@ -27,7 +27,7 @@ TASK_SPEECH_RECOGNITION: . format: string acceptFormats: - - audio/* + - audio/* uiOrder: 1 title: Audio language: @@ -35,7 +35,7 @@ TASK_SPEECH_RECOGNITION: The language of the input audio. Supplying the input language in ISO-639-1 format will improve accuracy and latency. . acceptFormats: - - string + - string shortDescription: The language of the input audio. uiOrder: 3 title: Language @@ -45,17 +45,17 @@ TASK_SPEECH_RECOGNITION: ID of the model to use. Only `whisper-1` is currently available. . enum: - - whisper-1 + - whisper-1 example: whisper-1 acceptFormats: - - string + - string shortDescription: ID of the model to use uiOrder: 0 instillCredentialMap: values: - - whisper-1 + - whisper-1 targets: - - setup.api-key + - setup.api-key title: Model format: string prompt: @@ -63,9 +63,8 @@ TASK_SPEECH_RECOGNITION: An optional text to guide the model's style or continue a previous audio segment. The prompt should match the audio language. . acceptFormats: - - string - shortDescription: An optional text to guide the model's style or continue - a previous audio segment. + - string + shortDescription: An optional text to guide the model's style or continue a previous audio segment. uiOrder: 2 title: Prompt format: string @@ -75,15 +74,15 @@ TASK_SPEECH_RECOGNITION: 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. . acceptFormats: - - number - - integer + - number + - integer shortDescription: The sampling temperature, between 0 and 1. uiOrder: 4 title: Temperature format: number required: - - audio - - model + - audio + - model title: Input format: object output: @@ -95,7 +94,7 @@ TASK_SPEECH_RECOGNITION: title: Text format: string required: - - text + - text title: Output format: object TASK_TEXT_EMBEDDINGS: @@ -106,40 +105,39 @@ TASK_TEXT_EMBEDDINGS: model: description: ID of the model to use. enum: - - text-embedding-ada-002 - - text-embedding-3-small - - text-embedding-3-large + - text-embedding-ada-002 + - text-embedding-3-small + - text-embedding-3-large example: text-embedding-3-small acceptFormats: - - string + - string shortDescription: ID of the model to use uiOrder: 0 instillCredentialMap: values: - - text-embedding-3-small - - text-embedding-3-large + - text-embedding-3-small + - text-embedding-3-large targets: - - setup.api-key + - setup.api-key title: Model format: string text: description: The text. acceptFormats: - - string + - string uiOrder: 1 title: Text format: string dimensions: - description: The number of dimensions the resulting output embeddings should - have. Only supported in text-embedding-3 and later models. + description: The number of dimensions the resulting output embeddings should have. Only supported in text-embedding-3 and later models. acceptFormats: - - integer + - integer uiOrder: 2 title: Dimensions format: integer required: - - text - - model + - text + - model title: Input format: object output: @@ -151,32 +149,26 @@ TASK_TEXT_EMBEDDINGS: uiOrder: 0 title: Embedding required: - - embedding + - embedding title: Output format: object TASK_TEXT_GENERATION: shortDescription: Provide text outputs in response to their inputs. - description: OpenAI's text generation models (often called generative pre-trained - transformers or large language models) have been trained to understand natural - language, code, and images. The models provide text outputs in response to their - inputs. The inputs to these models are also referred to as "prompts". Designing - a prompt is essentially how you “program” a large language model model, usually - by providing instructions or some examples of how to successfully complete a task. + description: OpenAI's text generation models (often called generative pre-trained transformers or large language models) have been trained to understand + natural language, code, and images. The models provide text outputs in response to their inputs. The inputs to these models are also referred to as + "prompts". Designing a prompt is essentially how you “program” a large language model model, usually by providing instructions or some examples of how + to successfully complete a task. input: uiOrder: 0 properties: chat-history: - description: 'Incorporate external chat history, specifically previous messages - within the conversation. Please note that System Message will be ignored - and will not have any effect when this field is populated. Each message - should adhere to the format {"role": "The message role, i.e. ''system'', + description: 'Incorporate external chat history, specifically previous messages within the conversation. Please note that System Message will be + ignored and will not have any effect when this field is populated. Each message should adhere to the format {"role": "The message role, i.e. ''system'', ''user'' or ''assistant''", "content": "message content"}.' acceptFormats: - - object - shortDescription: '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 be an ojbect adhere to the format: {"role": "The message + - object + shortDescription: '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 be an ojbect adhere to the format: {"role": "The message role, i.e. ''system'', ''user'' or ''assistant''", "content": "message content"}.' uiOrder: 4 items: @@ -185,15 +177,14 @@ TASK_TEXT_GENERATION: format: array frequency-penalty: default: 0 - description: Number between -2.0 and 2.0. Positive values penalize new tokens - based on their existing frequency in the text so far, decreasing the model's - likelihood to repeat the same line verbatim. + description: Number between -2.0 and 2.0. Positive values penalize new tokens based on their existing frequency in the text so far, decreasing the + model's likelihood to repeat the same line verbatim. maximum: 2 minimum: -2 nullable: true acceptFormats: - - number - - integer + - number + - integer shortDescription: Number between -2.0 and 2.0 uiOrder: 11 title: Frequency Penalty @@ -201,7 +192,7 @@ TASK_TEXT_GENERATION: images: description: The images. acceptFormats: - - array + - array uiOrder: 3 items: format: string @@ -214,7 +205,7 @@ TASK_TEXT_GENERATION: The total length of input tokens and generated tokens is limited by the model's context length. nullable: true acceptFormats: - - integer + - integer shortDescription: The maximum number of tokens to generate in the chat completion. uiOrder: 7 title: Max Tokens @@ -222,77 +213,75 @@ TASK_TEXT_GENERATION: model: description: ID of the model to use. enum: - - o1-preview - - o1-mini - - gpt-4o-mini - - gpt-4o - - gpt-4o-2024-05-13 - - gpt-4o-2024-08-06 - - gpt-4-turbo - - gpt-4-turbo-2024-04-09 - - gpt-4-0125-preview - - gpt-4-turbo-preview - - gpt-4-1106-preview - - gpt-4-vision-preview - - gpt-4 - - gpt-4-0314 - - gpt-4-0613 - - gpt-4-32k - - gpt-4-32k-0314 - - gpt-4-32k-0613 - - gpt-3.5-turbo - - gpt-3.5-turbo-16k - - gpt-3.5-turbo-0301 - - gpt-3.5-turbo-0613 - - gpt-3.5-turbo-1106 - - gpt-3.5-turbo-0125 - - gpt-3.5-turbo-16k-0613 - example: gpt-4o - acceptFormats: - - string - shortDescription: ID of the model to use - uiOrder: 0 - instillCredentialMap: - values: - o1-preview - o1-mini + - gpt-4o-mini - gpt-4o + - gpt-4o-2024-05-13 - gpt-4o-2024-08-06 - gpt-4-turbo + - gpt-4-turbo-2024-04-09 + - gpt-4-0125-preview + - gpt-4-turbo-preview + - gpt-4-1106-preview - gpt-4-vision-preview - gpt-4 + - gpt-4-0314 + - gpt-4-0613 - gpt-4-32k + - gpt-4-32k-0314 + - gpt-4-32k-0613 - gpt-3.5-turbo - - gpt-4o-mini + - gpt-3.5-turbo-16k + - gpt-3.5-turbo-0301 + - gpt-3.5-turbo-0613 + - gpt-3.5-turbo-1106 + - gpt-3.5-turbo-0125 + - gpt-3.5-turbo-16k-0613 + example: gpt-4o + acceptFormats: + - string + shortDescription: ID of the model to use + uiOrder: 0 + instillCredentialMap: + values: + - o1-preview + - o1-mini + - gpt-4o + - gpt-4o-2024-08-06 + - gpt-4-turbo + - gpt-4-vision-preview + - gpt-4 + - gpt-4-32k + - gpt-3.5-turbo + - gpt-4o-mini targets: - - setup.api-key + - setup.api-key title: Model format: string n: default: 1 - description: How many chat completion choices to generate for each input message. - Note that you will be charged based on the number of generated tokens across - all of the choices. Keep `n` as `1` to minimize costs. + description: How many chat completion choices to generate for each input message. Note that you will be charged based on the number of generated + tokens across all of the choices. Keep `n` as `1` to minimize costs. example: 1 maximum: 128 minimum: 1 nullable: true acceptFormats: - - integer + - integer uiOrder: 6 title: N format: integer presence-penalty: default: 0 - description: Number between -2.0 and 2.0. Positive values penalize new tokens - based on whether they appear in the text so far, increasing the model's + description: Number between -2.0 and 2.0. Positive values penalize new tokens based on whether they appear in the text so far, increasing the model's likelihood to talk about new topics. maximum: 2 minimum: -2 nullable: true acceptFormats: - - number - - integer + - number + - integer shortDescription: Number between -2.0 and 2.0 uiOrder: 10 title: Presence Penalty @@ -300,7 +289,7 @@ TASK_TEXT_GENERATION: prompt: description: The prompt text. acceptFormats: - - string + - string uiOrder: 1 title: Prompt format: string @@ -309,61 +298,59 @@ TASK_TEXT_GENERATION: uiOrder: 8 additionalProperties: true required: - - type - oneOf: - - properties: - type: - const: text - title: Type - description: Text. - uiOrder: 0 - format: string - required: - - type - title: Text - format: object - - properties: - type: - const: json_object - title: Type - description: JSON Object. - uiOrder: 0 - format: string - required: - - type - title: JSON Object - format: object - - properties: - type: - const: json_schema - title: Type - description: JSON Schema. - uiOrder: 0 - format: string - json-schema: - description: Set up the schema of the structured output. - acceptFormats: - - string - title: JSON Schema - shortDescription: Specify the schema of the structured output. - uiOrder: 1 - format: string - required: - type - - json-schema - title: JSON Schema - format: object + oneOf: + - properties: + type: + const: text + title: Type + description: Text. + uiOrder: 0 + format: string + required: + - type + title: Text + format: object + - properties: + type: + const: json_object + title: Type + description: JSON Object. + uiOrder: 0 + format: string + required: + - type + title: JSON Object + format: object + - properties: + type: + const: json_schema + title: Type + description: JSON Schema. + uiOrder: 0 + format: string + json-schema: + description: Set up the schema of the structured output. + acceptFormats: + - string + title: JSON Schema + shortDescription: Specify the schema of the structured output. + uiOrder: 1 + format: string + required: + - type + - json-schema + title: JSON Schema + format: object title: Response Format format: object system-message: default: You are a helpful assistant. - description: The system message helps set the behavior of the assistant. For - example, you can modify the personality of the assistant or provide specific - instructions about how it should behave throughout the conversation. By - default, the model’s behavior is using a generic message as "You are a helpful - assistant.". + description: The system message helps set the behavior of the assistant. For example, you can modify the personality of the assistant or provide + specific instructions about how it should behave throughout the conversation. By default, the model’s behavior is using a generic message as "You + are a helpful assistant.". acceptFormats: - - string + - string shortDescription: The system message helps set the behavior of the assistant uiOrder: 2 title: System Message @@ -380,8 +367,8 @@ TASK_TEXT_GENERATION: minimum: 0 nullable: true acceptFormats: - - number - - integer + - number + - integer shortDescription: What sampling temperature to use, between 0 and 2. uiOrder: 5 title: Temperature @@ -398,16 +385,15 @@ TASK_TEXT_GENERATION: minimum: 0 nullable: true acceptFormats: - - number - - integer - shortDescription: An alternative to sampling with temperature, called nucleus - sampling + - number + - integer + shortDescription: An alternative to sampling with temperature, called nucleus sampling uiOrder: 9 title: Top P format: number required: - - model - - prompt + - model + - prompt title: Input format: object output: @@ -441,11 +427,11 @@ TASK_TEXT_GENERATION: uiOrder: 2 format: integer required: - - total-tokens + - total-tokens title: Usage format: object required: - - texts + - texts title: Output format: object TASK_TEXT_TO_IMAGE: @@ -457,98 +443,92 @@ TASK_TEXT_TO_IMAGE: default: dall-e-2 description: The model to use for image generation. enum: - - dall-e-2 - - dall-e-3 + - dall-e-2 + - dall-e-3 example: dall-e-3 nullable: true instillCredentialMap: values: - - dall-e-3 + - dall-e-3 targets: - - setup.api-key + - setup.api-key acceptFormats: - - string + - string shortDescription: ID of the model to use uiOrder: 0 title: Model format: string n: default: 1 - description: The number of images to generate. Must be between 1 and 10. For - `dall-e-3`, only `n=1` is supported. + description: The number of images to generate. Must be between 1 and 10. For `dall-e-3`, only `n=1` is supported. example: 1 maximum: 10 minimum: 1 nullable: true acceptFormats: - - integer + - integer uiOrder: 2 title: N format: integer prompt: - description: 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`. + description: 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`. example: A cute baby sea otter acceptFormats: - - string + - string shortDescription: A text description of the desired image(s). uiOrder: 1 title: Prompt format: string quality: default: standard - description: The quality of the image that will be generated. `hd` creates - images with finer details and greater consistency across the image. This + description: 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: - - standard - - hd + - standard + - hd example: standard acceptFormats: - - string + - string shortDescription: The quality of the image that will be generated. uiOrder: 3 title: Quality format: string size: default: 1024x1024 - description: The size of the generated images. Must be one of `256x256`, `512x512`, - or `1024x1024` for `dall-e-2`. Must be one of `1024x1024`, `1792x1024`, + description: 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: - - 256x256 - - 512x512 - - 1024x1024 - - 1792x1024 - - 1024x1792 + - 256x256 + - 512x512 + - 1024x1024 + - 1792x1024 + - 1024x1792 example: 1024x1024 nullable: true acceptFormats: - - string + - string shortDescription: The size of the generated images. uiOrder: 4 title: Size format: string style: default: vivid - description: 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`. + description: 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: - - vivid - - natural + - vivid + - natural example: vivid nullable: true acceptFormats: - - string + - string shortDescription: The style of the generated images. uiOrder: 5 title: N format: string required: - - prompt - - model + - prompt + - model title: Input format: object output: @@ -571,14 +551,14 @@ TASK_TEXT_TO_IMAGE: uiOrder: 1 format: string required: - - image - - revised-prompt + - image + - revised-prompt title: Image format: object title: Images format: array required: - - results + - results title: Output format: object TASK_TEXT_TO_SPEECH: @@ -592,43 +572,41 @@ TASK_TEXT_TO_SPEECH: . default: tts-1 enum: - - tts-1 - - tts-1-hd + - tts-1 + - tts-1-hd acceptFormats: - - string + - string instillCredentialMap: values: - - tts-1 - - tts-1-hd + - tts-1 + - tts-1-hd targets: - - setup.api-key + - setup.api-key shortDescription: ID of the model to use uiOrder: 0 title: Model format: string response-format: default: mp3 - description: The format to audio in. Supported formats are `mp3`, `opus`, - `aac`, and `flac`. + description: The format to audio in. Supported formats are `mp3`, `opus`, `aac`, and `flac`. enum: - - mp3 - - opus - - aac - - flac + - mp3 + - opus + - aac + - flac acceptFormats: - - string + - string shortDescription: The format to audio uiOrder: 3 title: Response Format format: string speed: default: 1 - description: The speed of the generated audio. Select a value from `0.25` - to `4.0`. `1.0` is the default. + description: The speed of the generated audio. Select a value from `0.25` to `4.0`. `1.0` is the default. maximum: 4 minimum: 0.25 acceptFormats: - - number + - number shortDescription: The speed of the generated audio uiOrder: 4 title: Speed @@ -637,32 +615,31 @@ TASK_TEXT_TO_SPEECH: description: The text to generate audio for. The maximum length is 4096 characters. maxLength: 4096 acceptFormats: - - string + - string shortDescription: The text to generate audio for uiOrder: 1 title: Text format: string voice: - description: The voice to use when generating the audio. Supported voices - are `alloy`, `echo`, `fable`, `onyx`, `nova`, and `shimmer`. + description: The voice to use when generating the audio. Supported voices are `alloy`, `echo`, `fable`, `onyx`, `nova`, and `shimmer`. enum: - - alloy - - echo - - fable - - onyx - - nova - - shimmer + - alloy + - echo + - fable + - onyx + - nova + - shimmer acceptFormats: - - string + - string default: alloy shortDescription: The voice to use when generating the audio uiOrder: 2 title: Voice format: string required: - - text - - model - - voice + - text + - model + - voice title: Input format: object output: diff --git a/pkg/component/ai/perplexity/v0/config/definition.yaml b/pkg/component/ai/perplexity/v0/config/definition.yaml index ba7bd7e9a..912152b66 100644 --- a/pkg/component/ai/perplexity/v0/config/definition.yaml +++ b/pkg/component/ai/perplexity/v0/config/definition.yaml @@ -1,5 +1,5 @@ availableTasks: -- TASK_CHAT + - TASK_CHAT custom: false documentationUrl: https://www.instill.tech/docs/component/ai/perplexity icon: assets/perplexity.svg diff --git a/pkg/component/ai/perplexity/v0/config/setup.yaml b/pkg/component/ai/perplexity/v0/config/setup.yaml index 081625797..1245d0bb8 100644 --- a/pkg/component/ai/perplexity/v0/config/setup.yaml +++ b/pkg/component/ai/perplexity/v0/config/setup.yaml @@ -3,7 +3,7 @@ properties: api-key: description: Fill in your API key from the vendor's platform. acceptFormats: - - string + - string instillSecret: true instillCredential: true uiOrder: 0 diff --git a/pkg/component/ai/perplexity/v0/config/tasks.yaml b/pkg/component/ai/perplexity/v0/config/tasks.yaml index 7d63cd07a..472e76136 100644 --- a/pkg/component/ai/perplexity/v0/config/tasks.yaml +++ b/pkg/component/ai/perplexity/v0/config/tasks.yaml @@ -15,16 +15,16 @@ TASK_CHAT: description: The model to be used for `TASK_CHAT`. shortDescription: The model to be used. acceptFormats: - - string + - string enum: - - llama-3.1-sonar-small-128k-online - - llama-3.1-sonar-large-128k-online - - llama-3.1-sonar-huge-128k-online - instillCredentialMap: - values: - llama-3.1-sonar-small-128k-online - llama-3.1-sonar-large-128k-online - llama-3.1-sonar-huge-128k-online + instillCredentialMap: + values: + - llama-3.1-sonar-small-128k-online + - llama-3.1-sonar-large-128k-online + - llama-3.1-sonar-huge-128k-online title: Model Name uiOrder: 0 format: string @@ -43,7 +43,7 @@ TASK_CHAT: description: Text message. shortDescription: Text message. acceptFormats: - - string + - string uiOrder: 1 format: string type: @@ -51,7 +51,7 @@ TASK_CHAT: description: Text content type. shortDescription: Text content type. acceptFormats: - - string + - string const: text uiOrder: 0 format: string @@ -64,35 +64,32 @@ TASK_CHAT: description: The message role, i.e. 'system', 'user' or 'assistant'. shortDescription: The message role, i.e. 'system', 'user' or 'assistant'. acceptFormats: - - string + - string title: Role enum: - - system - - user - - assistant + - system + - user + - assistant uiOrder: 1 format: string name: - description: An optional name for the participant. Provides the - model information to differentiate between participants of the - same role. - shortDescription: An optional name for the participant. Provides - the model information to differentiate between participants of - the same role. + description: An optional name for the participant. Provides the model information to differentiate between participants of the same role. + shortDescription: An optional name for the participant. Provides the model information to differentiate between participants of the same + role. acceptFormats: - - string + - string title: Name uiOrder: 2 format: string required: - - content - - role + - content + - role format: object uiOrder: 1 description: List of chat messages. format: array required: - - messages + - messages uiOrder: 0 format: object parameter: @@ -101,98 +98,83 @@ TASK_CHAT: properties: max-tokens: title: Max New Tokens - description: The maximum number of completion tokens returned by the API. - The total number of tokens requested in max_tokens plus the number of - prompt tokens sent in messages must not exceed the context window token - limit of model requested. If left unspecified, then the model will generate - tokens until either it reaches its stop token or the end of its context - window. + description: The maximum number of completion tokens returned by the API. The total number of tokens requested in max_tokens plus the number + of prompt tokens sent in messages must not exceed the context window token limit of model requested. If left unspecified, then the model will + generate tokens until either it reaches its stop token or the end of its context window. shortDescription: The maximum number of tokens for model to generate. acceptFormats: - - integer + - integer default: 50 uiOrder: 0 format: integer temperature: title: Temperature - description: The amount of randomness in the response, valued between - 0 inclusive and 2 exclusive. Higher values are more random, and lower + description: The amount of randomness in the response, valued between 0 inclusive and 2 exclusive. Higher values are more random, and lower values are more deterministic. shortDescription: The temperature for sampling. acceptFormats: - - number + - number default: 0.2 uiOrder: 1 format: number top-p: title: Top P - description: The nucleus sampling threshold, valued between 0 and 1 inclusive. - For each subsequent token, the model considers the results of the tokens - with top_p probability mass. We recommend either altering top_k or top_p, - but not both. + description: The nucleus sampling threshold, valued between 0 and 1 inclusive. For each subsequent token, the model considers the results of + the tokens with top_p probability mass. We recommend either altering top_k or top_p, but not both. shortDescription: Nucleus sampling. acceptFormats: - - number + - number default: 0.9 uiOrder: 2 format: number stream: title: Stream - description: If set, partial message deltas will be sent. Tokens will - be sent as data-only server-sent events as they become available. + description: If set, partial message deltas will be sent. Tokens will be sent as data-only server-sent events as they become available. shortDescription: If set, partial message deltas will be sent. acceptFormats: - - boolean + - boolean default: false uiOrder: 3 format: boolean search-domain-filter: title: Search Domain Filter - description: Given a list of domains, limit the citations used by the - online model to URLs from the specified domains. Currently limited to - only 3 domains for whitelisting and blacklisting. For blacklisting add - a `-` to the beginning of the domain string. + description: Given a list of domains, limit the citations used by the online model to URLs from the specified domains. Currently limited to + only 3 domains for whitelisting and blacklisting. For blacklisting add a `-` to the beginning of the domain string. acceptFormats: - - array + - array uiOrder: 4 format: string search-recency-filter: title: Search Recency Filter - description: Returns search results within the specified time interval - - does not apply to images. Values include `month`, `week`, `day`, `hour`. + description: Returns search results within the specified time interval - does not apply to images. Values include `month`, `week`, `day`, `hour`. acceptFormats: - - string + - string uiOrder: 5 format: string top-k: title: Top K - description: The number of tokens to keep for highest top-k filtering, - specified as an integer between 0 and 2048 inclusive. If set to 0, top-k - filtering is disabled. We recommend either altering top_k or top_p, - but not both. + description: The number of tokens to keep for highest top-k filtering, specified as an integer between 0 and 2048 inclusive. If set to 0, top-k + filtering is disabled. We recommend either altering top_k or top_p, but not both. acceptFormats: - - number + - number default: 0 uiOrder: 6 format: number presence-penalty: title: Presence Penalty - description: A value between -2.0 and 2.0. Positive values penalize new - tokens based on whether they appear in the text so far, increasing the + description: A value between -2.0 and 2.0. Positive values penalize new tokens based on whether they appear in the text so far, increasing the model's likelihood to talk about new topics. Incompatible with `frequency_penalty`. acceptFormats: - - number + - number default: 0 uiOrder: 7 format: number frequency-penalty: title: Frequency Penalty - description: A multiplicative penalty greater than 0. Values greater than - 1.0 penalize new tokens based on their existing frequency in the text - so far, decreasing the model's likelihood to repeat the same line verbatim. - A value of 1.0 means no penalty. Incompatible with `presence_penalty`. + description: A multiplicative penalty greater than 0. Values greater than 1.0 penalize new tokens based on their existing frequency in the text + so far, decreasing the model's likelihood to repeat the same line verbatim. A value of 1.0 means no penalty. Incompatible with `presence_penalty`. acceptFormats: - - number + - number default: 1 uiOrder: 8 format: number @@ -201,7 +183,7 @@ TASK_CHAT: title: Input Parameter format: object required: - - data + - data format: object output: title: Chat Output @@ -252,17 +234,15 @@ TASK_CHAT: format: object created: title: Created - description: 'The timestamp of when the chat completion was created. - Format is in ISO 8601. Example: 2024-07-01T11:47:40.388Z.' - shortDescription: The Unix timestamp (in seconds) of when the chat - completion was created. + description: 'The timestamp of when the chat completion was created. Format is in ISO 8601. Example: 2024-07-01T11:47:40.388Z.' + shortDescription: The Unix timestamp (in seconds) of when the chat completion was created. uiOrder: 3 format: integer required: - - finish-reason - - index - - message - - created + - finish-reason + - index + - message + - created format: object uiOrder: 0 format: array @@ -275,7 +255,7 @@ TASK_CHAT: uiOrder: 1 format: array required: - - choices + - choices uiOrder: 0 title: Output Data format: object @@ -301,16 +281,14 @@ TASK_CHAT: format: integer total-tokens: title: Total Tokens - description: Total number of tokens used in the request (prompt + - completion). - shortDescription: Total number of tokens used in the request (prompt - + completion). + description: Total number of tokens used in the request (prompt + completion). + shortDescription: Total number of tokens used in the request (prompt + completion). uiOrder: 2 format: integer required: - - completion-tokens - - prompt-tokens - - total-tokens + - completion-tokens + - prompt-tokens + - total-tokens uiOrder: 0 title: Usage format: object @@ -319,5 +297,5 @@ TASK_CHAT: uiOrder: 1 format: object required: - - data + - data format: object diff --git a/pkg/component/ai/stabilityai/v0/config/definition.yaml b/pkg/component/ai/stabilityai/v0/config/definition.yaml index 7dd539af3..ac2d31571 100644 --- a/pkg/component/ai/stabilityai/v0/config/definition.yaml +++ b/pkg/component/ai/stabilityai/v0/config/definition.yaml @@ -1,6 +1,6 @@ availableTasks: -- TASK_TEXT_TO_IMAGE -- TASK_IMAGE_TO_IMAGE + - 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/stabilityai/v0/config/setup.yaml b/pkg/component/ai/stabilityai/v0/config/setup.yaml index 5f4e0abb0..c29df14b0 100644 --- a/pkg/component/ai/stabilityai/v0/config/setup.yaml +++ b/pkg/component/ai/stabilityai/v0/config/setup.yaml @@ -3,7 +3,7 @@ properties: api-key: description: Fill in your Stability AI API key. To find your keys, visit here. acceptFormats: - - string + - string instillSecret: true instillCredential: true uiOrder: 0 diff --git a/pkg/component/ai/stabilityai/v0/config/stabilityai.yaml b/pkg/component/ai/stabilityai/v0/config/stabilityai.yaml index 87833d9df..a918034f5 100644 --- a/pkg/component/ai/stabilityai/v0/config/stabilityai.yaml +++ b/pkg/component/ai/stabilityai/v0/config/stabilityai.yaml @@ -8,16 +8,15 @@ components: required: true schema: enum: - - application/json - - image/png + - application/json + - image/png type: string Finish-Reason: schema: $ref: '#/components/schemas/FinishReason' Seed: - description: The seed used to generate the image. This header is only present - when the `Accept` is set to `image/png`. Otherwise it is returned in the - response body. + description: The seed used to generate the image. This header is only present when the `Accept` is set to `image/png`. Otherwise it is returned + in the response body. example: 3817857576 schema: example: 787078103 @@ -25,15 +24,14 @@ components: parameters: accept: allowEmptyValue: false - description: The format of the response. Leave blank for JSON, or set to 'image/png' - for a PNG image. + description: The format of the response. Leave blank for JSON, or set to 'image/png' for a PNG image. in: header name: Accept schema: default: application/json enum: - - application/json - - image/png + - application/json + - image/png type: string engineID: example: stable-diffusion-v1-6 @@ -45,9 +43,8 @@ components: type: string organization: allowEmptyValue: false - description: Allows for requests to be scoped to an organization other than - the user's default. If not provided, the user's default organization will - be used. + description: Allows for requests to be scoped to an organization other than the user's default. If not provided, the user's default organization + will be used. example: org-123456 in: header name: Organization @@ -56,8 +53,8 @@ components: x-go-name: OrganizationID stabilityClientID: allowEmptyValue: false - description: Used to identify the source of requests, such as the client application - or sub-organization. Optional, but recommended for organizational clarity. + description: Used to identify the source of requests, such as the client application or sub-organization. Optional, but recommended for organizational + clarity. example: my-great-plugin in: header name: Stability-Client-ID @@ -65,8 +62,7 @@ components: type: string stabilityClientVersion: allowEmptyValue: false - description: Used to identify the version of the application or service making - the requests. Optional, but recommended for organizational clarity. + description: Used to identify the version of the application or service making the requests. Optional, but recommended for organizational clarity. example: 1.2.1 in: header name: Stability-Client-Version @@ -95,25 +91,16 @@ components: name: bad_request schema: $ref: '#/components/schemas/Error' - description: "General error for invalid parameters, see below for specific errors.\n\ - \ - bad_request: one or more provided parameters are invalid (see error description\ - \ for details)\n - invalid_samples: Sample count may only be greater than\ - \ 1 when the accept header is set to `application/json`\n - invalid_height_or_width:\ - \ Height and width must be specified in increments of 64\n - invalid_file_size:\ - \ The file size of one or more of the provided files is invalid\n - invalid_mime_type:\ - \ The mime type of one or more of the provided files is invalid\n - invalid_image_dimensions:\ - \ The dimensions of the provided `init_image` and `mask_image` do not match\n\ - \ - invalid_mask_image: The parameter `mask_source` was set to `MASK_IMAGE_WHITE`\ - \ or `MASK_IMAGE_BLACK` but no `mask_image` was provided\n - invalid_prompts:\ - \ One or more of the prompts contains filtered words\n - invalid_pixel_count:\ - \ Incorrect number of pixels specified.\n - invalid_sdxl_v222_dimensions:\ - \ Incorrect dimensions specified for SDXL v2-2-2 engine. Requirements:\n \ - \ - Neither `height` nor `width` may be below 128\n - Only one of `height`\ - \ or `width` may be above 512 (e.g. 512x768 is valid but 578x768 is not)\n\ - \ - Maximum dimensions supported are 512x896 or 896x512 \n -\ - \ invalid_sdxl_v1_dimensions: Incorrect dimensions specified for SDXL v0.9\ - \ or v1.0 engine. Valid dimensions:\n - 1024x1024, 1152x896, 1216x832,\ - \ 1344x768, 1536x640, 640x1536, 768x1344, 832x1216, or 896x1152" + description: "General error for invalid parameters, see below for specific errors.\n - bad_request: one or more provided parameters are invalid (see\ + \ error description for details)\n - invalid_samples: Sample count may only be greater than 1 when the accept header is set to `application/json`\n\ + \ - invalid_height_or_width: Height and width must be specified in increments of 64\n - invalid_file_size: The file size of one or more of the\ + \ provided files is invalid\n - invalid_mime_type: The mime type of one or more of the provided files is invalid\n - invalid_image_dimensions:\ + \ The dimensions of the provided `init_image` and `mask_image` do not match\n - invalid_mask_image: The parameter `mask_source` was set to `MASK_IMAGE_WHITE`\ + \ or `MASK_IMAGE_BLACK` but no `mask_image` was provided\n - invalid_prompts: One or more of the prompts contains filtered words\n - invalid_pixel_count:\ + \ Incorrect number of pixels specified.\n - invalid_sdxl_v222_dimensions: Incorrect dimensions specified for SDXL v2-2-2 engine. Requirements:\n\ + \ - Neither `height` nor `width` may be below 128\n - Only one of `height` or `width` may be above 512 (e.g. 512x768 is valid but 578x768\ + \ is not)\n - Maximum dimensions supported are 512x896 or 896x512 \n - invalid_sdxl_v1_dimensions: Incorrect dimensions specified for\ + \ SDXL v0.9 or v1.0 engine. Valid dimensions:\n - 1024x1024, 1152x896, 1216x832, 1344x768, 1536x640, 640x1536, 768x1344, 832x1216, or 896x1152" 400FromUpscale: content: application/json: @@ -149,8 +136,7 @@ components: name: permission_denied schema: $ref: '#/components/schemas/Error' - description: 'permission_denied: You lack the necessary permissions to perform - this action' + description: 'permission_denied: You lack the necessary permissions to perform this action' '404': content: application/json: @@ -160,8 +146,7 @@ components: name: not_found schema: $ref: '#/components/schemas/Error' - description: 'not_found: The requested resource was not found (e.g. specifing - a model that does not exist)' + description: 'not_found: The requested resource was not found (e.g. specifing a model that does not exist)' '500': content: application/json: @@ -176,8 +161,7 @@ components: content: application/json: schema: - description: An array of results from the generation request, where each - image is a base64 encoded PNG. + description: An array of results from the generation request, where each image is a base64 encoded PNG. properties: artifacts: items: @@ -217,14 +201,14 @@ components: organizations: description: The user's organizations example: - - id: org-5678 - is_default: true - name: Another Organization - role: MEMBER - - id: org-1234 - is_default: false - name: My Organization - role: MEMBER + - id: org-5678 + is_default: true + name: Another Organization + role: MEMBER + - id: org-1234 + is_default: false + name: My Organization + role: MEMBER items: $ref: '#/components/schemas/OrganizationMembership' type: array @@ -234,27 +218,25 @@ components: format: uri type: string required: - - id - - email - - organizations + - id + - email + - organizations type: object BalanceResponseBody: example: credits: 0.07903292496944721 properties: credits: - description: The balance of the account/organization associated with the - API key + description: The balance of the account/organization associated with the API key example: 0.41122252265928866 format: double type: number required: - - credits + - credits type: object CfgScale: default: 7 - description: How strictly the diffusion process adheres to the prompt text (higher - values keep your image closer to your prompt) + description: How strictly the diffusion process adheres to the prompt text (higher values keep your image closer to your prompt) example: 7 maximum: 35 minimum: 0 @@ -262,23 +244,20 @@ components: ClipGuidancePreset: default: NONE enum: - - FAST_BLUE - - FAST_GREEN - - NONE - - SIMPLE - - SLOW - - SLOWER - - SLOWEST + - FAST_BLUE + - FAST_GREEN + - NONE + - SIMPLE + - SLOW + - SLOWER + - SLOWEST example: FAST_BLUE type: string DiffuseImageHeight: default: 1024 - description: "Height of the image to generate, in pixels, in an increment divible\ - \ by 64.\n\nEngine-specific dimension validation:\n- SDXL Beta: must be between\ - \ 128x128 and 512x896 (or 896x512); only one dimension can be greater than\ - \ 512. \n- SDXL v0.9: must be one of 1024x1024, 1152x896, 1216x832, 1344x768,\ - \ 1536x640, 640x1536, 768x1344, 832x1216, or 896x1152\n- SDXL v1.0: same as\ - \ SDXL v0.9\n- SD v1.6: must be between 320x320 and 1536x1536" + description: "Height of the image to generate, in pixels, in an increment divible by 64.\n\nEngine-specific dimension validation:\n- SDXL Beta: must\ + \ be between 128x128 and 512x896 (or 896x512); only one dimension can be greater than 512. \n- SDXL v0.9: must be one of 1024x1024, 1152x896, 1216x832,\ + \ 1344x768, 1536x640, 640x1536, 768x1344, 832x1216, or 896x1152\n- SDXL v1.0: same as SDXL v0.9\n- SD v1.6: must be between 320x320 and 1536x1536" example: 1024 minimum: 128 multipleOf: 64 @@ -286,12 +265,9 @@ components: x-go-type: uint64 DiffuseImageWidth: default: 1024 - description: "Width of the image to generate, in pixels, in an increment divible\ - \ by 64.\n\nEngine-specific dimension validation:\n- SDXL Beta: must be between\ - \ 128x128 and 512x896 (or 896x512); only one dimension can be greater than\ - \ 512. \n- SDXL v0.9: must be one of 1024x1024, 1152x896, 1216x832, 1344x768,\ - \ 1536x640, 640x1536, 768x1344, 832x1216, or 896x1152\n- SDXL v1.0: same as\ - \ SDXL v0.9\n- SD v1.6: must be between 320x320 and 1536x1536" + description: "Width of the image to generate, in pixels, in an increment divible by 64.\n\nEngine-specific dimension validation:\n- SDXL Beta: must\ + \ be between 128x128 and 512x896 (or 896x512); only one dimension can be greater than 512. \n- SDXL v0.9: must be one of 1024x1024, 1152x896, 1216x832,\ + \ 1344x768, 1536x640, 640x1536, 768x1344, 832x1216, or 896x1152\n- SDXL v1.0: same as SDXL v0.9\n- SD v1.6: must be between 320x320 and 1536x1536" example: 1024 minimum: 128 multipleOf: 64 @@ -313,19 +289,19 @@ components: type: description: The type of content this engine produces enum: - - AUDIO - - CLASSIFICATION - - PICTURE - - STORAGE - - TEXT - - VIDEO + - AUDIO + - CLASSIFICATION + - PICTURE + - STORAGE + - TEXT + - VIDEO example: PICTURE type: string required: - - id - - name - - description - - type + - id + - name + - description + - type type: object Error: properties: @@ -335,8 +311,7 @@ components: type: string x-go-name: ID message: - description: A human-readable explanation specific to this occurrence of - the problem. + description: A human-readable explanation specific to this occurrence of the problem. example: Header parameter Authorization is required, but not found type: string name: @@ -344,10 +319,10 @@ components: example: bad_request type: string required: - - name - - id - - message - - status + - name + - id + - message + - status type: object x-go-name: RESTError Extras: @@ -365,13 +340,12 @@ components: This header is only present when the `Accept` is set to `image/png`. Otherwise it is returned in the response body. enum: - - SUCCESS - - ERROR - - CONTENT_FILTERED + - SUCCESS + - ERROR + - CONTENT_FILTERED type: string GenerationRequestOptionalParams: - description: Represents the optional parameters that can be passed to any generation - request. + description: Represents the optional parameters that can be passed to any generation request. properties: cfg_scale: $ref: '#/components/schemas/CfgScale' @@ -392,12 +366,12 @@ components: type: object Image: example: - - base64: '...very long string...' - finishReason: SUCCESS - seed: 1050625087 - - base64: '...very long string...' - finishReason: CONTENT_FILTERED - seed: 1229191277 + - base64: '...very long string...' + finishReason: SUCCESS + seed: 1050625087 + - base64: '...very long string...' + finishReason: CONTENT_FILTERED + seed: 1229191277 properties: base64: description: Image encoded in base64 @@ -405,9 +379,9 @@ components: x-go-type-skip-optional-pointer: true finishReason: enum: - - SUCCESS - - ERROR - - CONTENT_FILTERED + - SUCCESS + - ERROR + - CONTENT_FILTERED example: CONTENT_FILTERED type: string x-go-type-skip-optional-pointer: true @@ -453,57 +427,55 @@ components: text_prompts: $ref: '#/components/schemas/TextPrompts' required: - - text_prompts - - init_image + - text_prompts + - init_image type: object ImageToImageUsingImageStrengthRequestBody: allOf: - - properties: - image_strength: - $ref: '#/components/schemas/InitImageStrength' - init_image: - $ref: '#/components/schemas/InitImage' - init_image_mode: - $ref: '#/components/schemas/InitImageMode' - text_prompts: - $ref: '#/components/schemas/TextPrompts' - required: - - text_prompts - - init_image - type: object - - $ref: '#/components/schemas/GenerationRequestOptionalParams' + - properties: + image_strength: + $ref: '#/components/schemas/InitImageStrength' + init_image: + $ref: '#/components/schemas/InitImage' + init_image_mode: + $ref: '#/components/schemas/InitImageMode' + text_prompts: + $ref: '#/components/schemas/TextPrompts' + required: + - text_prompts + - init_image + type: object + - $ref: '#/components/schemas/GenerationRequestOptionalParams' ImageToImageUsingStepScheduleRequestBody: allOf: - - properties: - init_image: - $ref: '#/components/schemas/InitImage' - init_image_mode: - $ref: '#/components/schemas/InitImageMode' - step_schedule_end: - $ref: '#/components/schemas/StepScheduleEnd' - step_schedule_start: - $ref: '#/components/schemas/StepScheduleStart' - text_prompts: - $ref: '#/components/schemas/TextPrompts' - required: - - text_prompts - - init_image - type: object - - $ref: '#/components/schemas/GenerationRequestOptionalParams' + - properties: + init_image: + $ref: '#/components/schemas/InitImage' + init_image_mode: + $ref: '#/components/schemas/InitImageMode' + step_schedule_end: + $ref: '#/components/schemas/StepScheduleEnd' + step_schedule_start: + $ref: '#/components/schemas/StepScheduleStart' + text_prompts: + $ref: '#/components/schemas/TextPrompts' + required: + - text_prompts + - init_image + type: object + - $ref: '#/components/schemas/GenerationRequestOptionalParams' InitImage: - description: Image used to initialize the diffusion process, in lieu of random - noise. + description: Image used to initialize the diffusion process, in lieu of random noise. example: format: binary type: string x-go-type: '[]byte' InitImageMode: default: IMAGE_STRENGTH - description: Whether to use `image_strength` or `step_schedule_*` to control - how much influence the `init_image` has on the result. + description: Whether to use `image_strength` or `step_schedule_*` to control how much influence the `init_image` has on the result. enum: - - IMAGE_STRENGTH - - STEP_SCHEDULE + - IMAGE_STRENGTH + - STEP_SCHEDULE type: string InitImageStrength: default: 0.35 @@ -536,27 +508,25 @@ components: width: $ref: '#/components/schemas/UpscaleImageWidth' required: - - image + - image type: object ListEnginesResponseBody: description: The engines available to your user/organization example: - - description: Stability-AI Stable Diffusion v1.6 - id: stable-diffusion-v1-6 - name: Stable Diffusion v1.6 - type: PICTURE - - description: Stability-AI Stable Diffusion XL v1.0 - id: stable-diffusion-xl-1024-v1-0 - name: Stable Diffusion XL v1.0 - type: PICTURE + - description: Stability-AI Stable Diffusion v1.6 + id: stable-diffusion-v1-6 + name: Stable Diffusion v1.6 + type: PICTURE + - description: Stability-AI Stable Diffusion XL v1.0 + id: stable-diffusion-xl-1024-v1-0 + name: Stable Diffusion XL v1.0 + type: PICTURE items: $ref: '#/components/schemas/Engine' type: array MaskImage: - description: Optional grayscale mask that allows for influence over which pixels - are eligible for diffusion and at what strength. Must be the same dimensions - as the `init_image`. Use the `mask_source` option to specify whether the white - or black pixels should be inpainted. + description: Optional grayscale mask that allows for influence over which pixels are eligible for diffusion and at what strength. Must be the same + dimensions as the `init_image`. Use the `mask_source` option to specify whether the white or black pixels should be inpainted. example: format: binary type: string @@ -601,43 +571,43 @@ components: text_prompts: $ref: '#/components/schemas/TextPrompts' required: - - text_prompts - - init_image - - mask_source + - text_prompts + - init_image + - mask_source type: object MaskingUsingInitImageAlphaRequestBody: allOf: - - properties: - init_image: - $ref: '#/components/schemas/InitImage' - mask_source: - $ref: '#/components/schemas/MaskSource' - text_prompts: - $ref: '#/components/schemas/TextPrompts' - required: - - init_image - - text_prompts - - mask_source - type: object - - $ref: '#/components/schemas/GenerationRequestOptionalParams' + - properties: + init_image: + $ref: '#/components/schemas/InitImage' + mask_source: + $ref: '#/components/schemas/MaskSource' + text_prompts: + $ref: '#/components/schemas/TextPrompts' + required: + - init_image + - text_prompts + - mask_source + type: object + - $ref: '#/components/schemas/GenerationRequestOptionalParams' MaskingUsingMaskImageRequestBody: allOf: - - properties: - init_image: - $ref: '#/components/schemas/InitImage' - mask_image: - $ref: '#/components/schemas/MaskImage' - mask_source: - $ref: '#/components/schemas/MaskSource' - text_prompts: - $ref: '#/components/schemas/TextPrompts' - required: - - init_image - - mask_image - - text_prompts - - mask_source - type: object - - $ref: '#/components/schemas/GenerationRequestOptionalParams' + - properties: + init_image: + $ref: '#/components/schemas/InitImage' + mask_image: + $ref: '#/components/schemas/MaskImage' + mask_source: + $ref: '#/components/schemas/MaskSource' + text_prompts: + $ref: '#/components/schemas/TextPrompts' + required: + - init_image + - mask_image + - text_prompts + - mask_source + type: object + - $ref: '#/components/schemas/GenerationRequestOptionalParams' OrganizationMembership: properties: id: @@ -654,10 +624,10 @@ components: example: MEMBER type: string required: - - id - - name - - role - - is_default + - id + - name + - role + - is_default type: object RealESRGANUpscaleRequestBody: properties: @@ -668,22 +638,21 @@ components: width: $ref: '#/components/schemas/UpscaleImageWidth' required: - - image + - image type: object Sampler: - description: Which sampler to use for the diffusion process. If this value is - omitted we'll automatically select an appropriate sampler for you. + description: Which sampler to use for the diffusion process. If this value is omitted we'll automatically select an appropriate sampler for you. enum: - - 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 + - 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 example: K_DPM_2_ANCESTRAL type: string Samples: @@ -703,22 +672,17 @@ components: type: integer x-go-type: uint32 StepScheduleEnd: - description: 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. + description: 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. example: 0.01 maximum: 1 minimum: 0 type: number StepScheduleStart: default: 0.65 - description: 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.) + description: 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.) example: 0.4 maximum: 1 minimum: 0 @@ -736,23 +700,23 @@ components: Pass in a style preset to guide the image model towards a particular style. This list of style presets is subject to change. enum: - - 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 + - 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 type: string TextPrompt: description: Text prompt for image generation @@ -768,21 +732,16 @@ components: format: float type: number required: - - text + - text type: object TextPrompts: - description: "An array of text prompts to use for generation.\n\nDue to how\ - \ arrays are represented in `multipart/form-data` requests, prompts must adhere\ - \ to the format `text_prompts[index][text|weight]`,\nwhere `index` is some\ - \ integer used to tie the text and weight together. While `index` does not\ - \ have to be sequential, duplicate entries \nwill override previous entries,\ - \ so it is recommended to use sequential indices.\n\nGiven a text prompt with\ - \ the text `A lighthouse on a cliff` and a weight of `0.5`, it would be represented\ - \ as:\n```\ntext_prompts[0][text]: \"A lighthouse on a cliff\"\ntext_prompts[0][weight]:\ - \ 0.5\n```\n\nTo add another prompt to that request simply provide the values\ - \ under a new `index`:\n\n```\ntext_prompts[0][text]: \"A lighthouse on a\ - \ cliff\"\ntext_prompts[0][weight]: 0.5\ntext_prompts[1][text]: \"land, ground,\ - \ dirt, grass\"\ntext_prompts[1][weight]: -0.9\n```" + description: "An array of text prompts to use for generation.\n\nDue to how arrays are represented in `multipart/form-data` requests, prompts must\ + \ adhere to the format `text_prompts[index][text|weight]`,\nwhere `index` is some integer used to tie the text and weight together. While `index`\ + \ does not have to be sequential, duplicate entries \nwill override previous entries, so it is recommended to use sequential indices.\n\nGiven a\ + \ text prompt with the text `A lighthouse on a cliff` and a weight of `0.5`, it would be represented as:\n```\ntext_prompts[0][text]: \"A lighthouse\ + \ on a cliff\"\ntext_prompts[0][weight]: 0.5\n```\n\nTo add another prompt to that request simply provide the values under a new `index`:\n\n```\n\ + text_prompts[0][text]: \"A lighthouse on a cliff\"\ntext_prompts[0][weight]: 0.5\ntext_prompts[1][text]: \"land, ground, dirt, grass\"\ntext_prompts[1][weight]:\ + \ -0.9\n```" items: $ref: '#/components/schemas/TextPrompt' minItems: 1 @@ -808,17 +767,17 @@ components: type: array TextToImageRequestBody: allOf: - - properties: - height: - $ref: '#/components/schemas/DiffuseImageHeight' - text_prompts: - $ref: '#/components/schemas/TextPromptsForTextToImage' - width: - $ref: '#/components/schemas/DiffuseImageWidth' - required: - - text_prompts - type: object - - $ref: '#/components/schemas/GenerationRequestOptionalParams' + - properties: + height: + $ref: '#/components/schemas/DiffuseImageHeight' + text_prompts: + $ref: '#/components/schemas/TextPromptsForTextToImage' + width: + $ref: '#/components/schemas/DiffuseImageWidth' + required: + - text_prompts + type: object + - $ref: '#/components/schemas/GenerationRequestOptionalParams' example: cfg_scale: 7 clip_guidance_preset: FAST_BLUE @@ -828,21 +787,19 @@ components: seed: 0 steps: 30 text_prompts: - - text: A lighthouse on a cliff - weight: 1 + - text: A lighthouse on a cliff + weight: 1 width: 512 required: - - text_prompts + - text_prompts type: object UpscaleImageHeight: - description: Desired height of the output image. Only one of `width` or `height` - may be specified. + description: Desired height of the output image. Only one of `width` or `height` may be specified. minimum: 512 type: integer x-go-type: uint64 UpscaleImageWidth: - description: Desired width of the output image. Only one of `width` or `height` - may be specified. + description: Desired width of the output image. Only one of `width` or `height` may be specified. minimum: 512 type: integer x-go-type: uint64 @@ -852,19 +809,13 @@ components: name: Authorization type: apiKey info: - description: "Welcome to the official Stability AI REST API!\n\n#### Authentication\n\ - \nYou will need your Stability\ - \ API key in order to make requests to this API.\nMake sure you never share\ - \ your API key with anyone, and you never commit it to a public repository. Include\ - \ this key in \nthe `Authorization` header of your requests.\n\n#### Rate limiting\n\ - \nThis API is rate-limited to 150 requests every 10 seconds. If you exceed this\ - \ limit, you will receive a `429` response.\nIf you find this limit too restrictive,\ - \ please reach out to us via email at [platform@stability.ai](mailto:platform@stability.ai).\n\ - \n#### Support\n\nCheck our Status\ - \ Page to view the current health of our REST/gRPC APIs.\n\nIf you run into\ - \ issues, please reach out to us:\n - Support Form\n - [platform@stability.ai](mailto:platform@stability.ai) \n\ - \ - Stability API key in order to make requests to this API.\nMake sure you never share your API key with anyone, and you never commit it to a public\ + \ repository. Include this key in \nthe `Authorization` header of your requests.\n\n#### Rate limiting\n\nThis API is rate-limited to 150 requests every\ + \ 10 seconds. If you exceed this limit, you will receive a `429` response.\nIf you find this limit too restrictive, please reach out to us via email\ + \ at [platform@stability.ai](mailto:platform@stability.ai).\n\n#### Support\n\nCheck our Status Page\ + \ to view the current health of our REST/gRPC APIs.\n\nIf you run into issues, please reach out to us:\n - Support Form\n - [platform@stability.ai](mailto:platform@stability.ai) \n - Discord\n" termsOfService: https://platform.stability.ai/docs/terms-of-service title: Stability.ai REST API @@ -879,9 +830,9 @@ paths: description: List all engines available to your organization/user operationId: listEngines parameters: - - $ref: '#/components/parameters/organization' - - $ref: '#/components/parameters/stabilityClientID' - - $ref: '#/components/parameters/stabilityClientVersion' + - $ref: '#/components/parameters/organization' + - $ref: '#/components/parameters/stabilityClientID' + - $ref: '#/components/parameters/stabilityClientVersion' responses: '200': content: @@ -894,102 +845,97 @@ paths: '500': $ref: '#/components/responses/500' security: - - STABILITY_API_KEY: [] + - STABILITY_API_KEY: [] summary: list tags: - - v1/engines + - v1/engines x-codeSamples: - - lang: Python - source: |+ - import os - import requests + - lang: Python + source: |+ + import os + import requests - api_host = os.getenv('API_HOST', 'https://api.stability.ai') - url = f"{api_host}/v1/engines/list" + api_host = os.getenv('API_HOST', 'https://api.stability.ai') + url = f"{api_host}/v1/engines/list" - api_key = os.getenv("STABILITY_API_KEY") - if api_key is None: - raise Exception("Missing Stability API key.") + api_key = os.getenv("STABILITY_API_KEY") + if api_key is None: + raise Exception("Missing Stability API key.") - response = requests.get(url, headers={ - "Authorization": f"Bearer {api_key}" - }) + response = requests.get(url, headers={ + "Authorization": f"Bearer {api_key}" + }) - if response.status_code != 200: - raise Exception("Non-200 response: " + str(response.text)) + if response.status_code != 200: + raise Exception("Non-200 response: " + str(response.text)) - # Do something with the payload... - payload = response.json() + # Do something with the payload... + payload = response.json() - - label: TypeScript - lang: Javascript - source: | - import fetch from 'node-fetch' + - label: TypeScript + lang: Javascript + source: | + import fetch from 'node-fetch' - const apiHost = process.env.API_HOST ?? 'https://api.stability.ai' - const url = `${apiHost}/v1/engines/list` + const apiHost = process.env.API_HOST ?? 'https://api.stability.ai' + const url = `${apiHost}/v1/engines/list` - const apiKey = process.env.STABILITY_API_KEY - if (!apiKey) throw new Error('Missing Stability API key.') + const apiKey = process.env.STABILITY_API_KEY + if (!apiKey) throw new Error('Missing Stability API key.') - const response = await fetch(url, { - method: 'GET', - headers: { - Authorization: `Bearer ${apiKey}`, - }, - }) + const response = await fetch(url, { + method: 'GET', + headers: { + Authorization: `Bearer ${apiKey}`, + }, + }) - if (!response.ok) { - throw new Error(`Non-200 response: ${await response.text()}`) - } + if (!response.ok) { + throw new Error(`Non-200 response: ${await response.text()}`) + } - interface Payload { - engines: Array<{ - id: string - name: string - description: string - type: string - }> - } + interface Payload { + engines: Array<{ + id: string + name: string + description: string + type: string + }> + } - // Do something with the payload... - const payload = (await response.json()) as Payload - - lang: Go - source: "package main\n\nimport (\n\t\"io\"\n\t\"net/http\"\n\t\"os\"\n)\n\ - \nfunc main() {\n\t// Build REST endpoint URL\n\tapiHost, hasApiHost :=\ - \ os.LookupEnv(\"API_HOST\")\n\tif !hasApiHost {\n\t\tapiHost = \"https://api.stability.ai\"\ - \n\t}\n\treqUrl := apiHost + \"/v1/engines/list\"\n\n\t// Acquire an API\ - \ key from the environment\n\tapiKey, hasAPIKey := os.LookupEnv(\"STABILITY_API_KEY\"\ - )\n\tif !hasAPIKey {\n\t\tpanic(\"Missing STABILITY_API_KEY environment\ - \ variable\")\n\t}\n\n\t// Execute the request & read all the bytes of the\ - \ response\n\treq, _ := http.NewRequest(\"GET\", reqUrl, nil)\n\treq.Header.Add(\"\ - Authorization\", \"Bearer \"+apiKey)\n\tres, _ := http.DefaultClient.Do(req)\n\ - \tdefer res.Body.Close()\n\tbody, _ := io.ReadAll(res.Body)\n\n\tif res.StatusCode\ - \ != 200 {\n\t\tpanic(\"Non-200 response: \" + string(body))\n\t}\n\n\t\ - // Do something with the payload...\n\t// payload := string(body)\n}\n" - - lang: cURL - source: | - if [ -z "$STABILITY_API_KEY" ]; then - echo "STABILITY_API_KEY environment variable is not set" - exit 1 - fi - - BASE_URL=${API_HOST:-https://api.stability.ai} - URL="$BASE_URL/v1/engines/list" - - curl -f -sS "$URL" \ - -H 'Accept: application/json' \ - -H "Authorization: Bearer $STABILITY_API_KEY" + // Do something with the payload... + const payload = (await response.json()) as Payload + - lang: Go + source: "package main\n\nimport (\n\t\"io\"\n\t\"net/http\"\n\t\"os\"\n)\n\nfunc main() {\n\t// Build REST endpoint URL\n\tapiHost, hasApiHost\ + \ := os.LookupEnv(\"API_HOST\")\n\tif !hasApiHost {\n\t\tapiHost = \"https://api.stability.ai\"\n\t}\n\treqUrl := apiHost + \"/v1/engines/list\"\ + \n\n\t// Acquire an API key from the environment\n\tapiKey, hasAPIKey := os.LookupEnv(\"STABILITY_API_KEY\")\n\tif !hasAPIKey {\n\t\tpanic(\"\ + Missing STABILITY_API_KEY environment variable\")\n\t}\n\n\t// Execute the request & read all the bytes of the response\n\treq, _ := http.NewRequest(\"\ + GET\", reqUrl, nil)\n\treq.Header.Add(\"Authorization\", \"Bearer \"+apiKey)\n\tres, _ := http.DefaultClient.Do(req)\n\tdefer res.Body.Close()\n\ + \tbody, _ := io.ReadAll(res.Body)\n\n\tif res.StatusCode != 200 {\n\t\tpanic(\"Non-200 response: \" + string(body))\n\t}\n\n\t// Do something\ + \ with the payload...\n\t// payload := string(body)\n}\n" + - lang: cURL + source: | + if [ -z "$STABILITY_API_KEY" ]; then + echo "STABILITY_API_KEY environment variable is not set" + exit 1 + fi + + BASE_URL=${API_HOST:-https://api.stability.ai} + URL="$BASE_URL/v1/engines/list" + + curl -f -sS "$URL" \ + -H 'Accept: application/json' \ + -H "Authorization: Bearer $STABILITY_API_KEY" /v1/generation/{engine_id}/image-to-image: post: description: Modify an image based on a text prompt operationId: imageToImage parameters: - - $ref: '#/components/parameters/engineID' - - $ref: '#/components/parameters/accept' - - $ref: '#/components/parameters/organization' - - $ref: '#/components/parameters/stabilityClientID' - - $ref: '#/components/parameters/stabilityClientVersion' + - $ref: '#/components/parameters/engineID' + - $ref: '#/components/parameters/accept' + - $ref: '#/components/parameters/organization' + - $ref: '#/components/parameters/stabilityClientID' + - $ref: '#/components/parameters/stabilityClientVersion' requestBody: content: multipart/form-data: @@ -1039,187 +985,169 @@ paths: '500': $ref: '#/components/responses/500' security: - - STABILITY_API_KEY: [] + - STABILITY_API_KEY: [] summary: image-to-image tags: - - v1/generation + - v1/generation x-codeSamples: - - lang: Python - source: | - import base64 - import os - import requests - - engine_id = "stable-diffusion-xl-1024-v1-0" - api_host = os.getenv("API_HOST", "https://api.stability.ai") - api_key = os.getenv("STABILITY_API_KEY") - - if api_key is None: - raise Exception("Missing Stability API key.") - - response = requests.post( - f"{api_host}/v1/generation/{engine_id}/image-to-image", - headers={ - "Accept": "application/json", - "Authorization": f"Bearer {api_key}" - }, - files={ - "init_image": open("../init_image_1024.png", "rb") - }, - data={ - "image_strength": 0.35, - "init_image_mode": "IMAGE_STRENGTH", - "text_prompts[0][text]": "Galactic dog with a cape", - "cfg_scale": 7, - "samples": 1, - "steps": 30, - } - ) - - if response.status_code != 200: - raise Exception("Non-200 response: " + str(response.text)) - - data = response.json() - - for i, image in enumerate(data["artifacts"]): - with open(f"./out/v1_img2img_{i}.png", "wb") as f: - f.write(base64.b64decode(image["base64"])) - - label: TypeScript - lang: Javascript - source: | - import fetch from 'node-fetch' - import FormData from 'form-data' - import fs from 'node:fs' - - const engineId = 'stable-diffusion-xl-1024-v1-0' - const apiHost = process.env.API_HOST ?? 'https://api.stability.ai' - const apiKey = process.env.STABILITY_API_KEY - - if (!apiKey) throw new Error('Missing Stability API key.') - - // NOTE: This example is using a NodeJS FormData library. - // Browsers should use their native FormData class. - // React Native apps should also use their native FormData class. - const formData = new FormData() - formData.append('init_image', fs.readFileSync('../init_image_1024.png')) - formData.append('init_image_mode', 'IMAGE_STRENGTH') - formData.append('image_strength', 0.35) - formData.append('text_prompts[0][text]', 'Galactic dog wearing a cape') - formData.append('cfg_scale', 7) - formData.append('samples', 1) - formData.append('steps', 30) - - const response = await fetch( - `${apiHost}/v1/generation/${engineId}/image-to-image`, - { - method: 'POST', - headers: { - ...formData.getHeaders(), - Accept: 'application/json', - Authorization: `Bearer ${apiKey}`, - }, - body: formData, - } - ) + - lang: Python + source: | + import base64 + import os + import requests + + engine_id = "stable-diffusion-xl-1024-v1-0" + api_host = os.getenv("API_HOST", "https://api.stability.ai") + api_key = os.getenv("STABILITY_API_KEY") + + if api_key is None: + raise Exception("Missing Stability API key.") + + response = requests.post( + f"{api_host}/v1/generation/{engine_id}/image-to-image", + headers={ + "Accept": "application/json", + "Authorization": f"Bearer {api_key}" + }, + files={ + "init_image": open("../init_image_1024.png", "rb") + }, + data={ + "image_strength": 0.35, + "init_image_mode": "IMAGE_STRENGTH", + "text_prompts[0][text]": "Galactic dog with a cape", + "cfg_scale": 7, + "samples": 1, + "steps": 30, + } + ) - if (!response.ok) { - throw new Error(`Non-200 response: ${await response.text()}`) - } + if response.status_code != 200: + raise Exception("Non-200 response: " + str(response.text)) + + data = response.json() + + for i, image in enumerate(data["artifacts"]): + with open(f"./out/v1_img2img_{i}.png", "wb") as f: + f.write(base64.b64decode(image["base64"])) + - label: TypeScript + lang: Javascript + source: | + import fetch from 'node-fetch' + import FormData from 'form-data' + import fs from 'node:fs' + + const engineId = 'stable-diffusion-xl-1024-v1-0' + const apiHost = process.env.API_HOST ?? 'https://api.stability.ai' + const apiKey = process.env.STABILITY_API_KEY + + if (!apiKey) throw new Error('Missing Stability API key.') + + // NOTE: This example is using a NodeJS FormData library. + // Browsers should use their native FormData class. + // React Native apps should also use their native FormData class. + const formData = new FormData() + formData.append('init_image', fs.readFileSync('../init_image_1024.png')) + formData.append('init_image_mode', 'IMAGE_STRENGTH') + formData.append('image_strength', 0.35) + formData.append('text_prompts[0][text]', 'Galactic dog wearing a cape') + formData.append('cfg_scale', 7) + formData.append('samples', 1) + formData.append('steps', 30) + + const response = await fetch( + `${apiHost}/v1/generation/${engineId}/image-to-image`, + { + method: 'POST', + headers: { + ...formData.getHeaders(), + Accept: 'application/json', + Authorization: `Bearer ${apiKey}`, + }, + body: formData, + } + ) - interface GenerationResponse { - artifacts: Array<{ - base64: string - seed: number - finishReason: string - }> - } + if (!response.ok) { + throw new Error(`Non-200 response: ${await response.text()}`) + } - const responseJSON = (await response.json()) as GenerationResponse + interface GenerationResponse { + artifacts: Array<{ + base64: string + seed: number + finishReason: string + }> + } - responseJSON.artifacts.forEach((image, index) => { - fs.writeFileSync( - `out/v1_img2img_${index}.png`, - Buffer.from(image.base64, 'base64') - ) - }) - - lang: Go - source: "package main\n\nimport (\n\t\"bytes\"\n\t\"encoding/base64\"\n\t\"\ - encoding/json\"\n\t\"fmt\"\n\t\"io\"\n\t\"mime/multipart\"\n\t\"net/http\"\ - \n\t\"os\"\n)\n\ntype ImageToImageImage struct {\n\tBase64 string\ - \ `json:\"base64\"`\n\tSeed uint32 `json:\"seed\"`\n\tFinishReason\ - \ string `json:\"finishReason\"`\n}\n\ntype ImageToImageResponse struct\ - \ {\n\tImages []ImageToImageImage `json:\"artifacts\"`\n}\n\nfunc main()\ - \ {\n\tengineId := \"stable-diffusion-xl-1024-v1-0\"\n\n\t// Build REST\ - \ endpoint URL\n\tapiHost, hasApiHost := os.LookupEnv(\"API_HOST\")\n\t\ - if !hasApiHost {\n\t\tapiHost = \"https://api.stability.ai\"\n\t}\n\treqUrl\ - \ := apiHost + \"/v1/generation/\" + engineId + \"/image-to-image\"\n\n\t\ - // Acquire an API key from the environment\n\tapiKey, hasAPIKey := os.LookupEnv(\"\ - STABILITY_API_KEY\")\n\tif !hasAPIKey {\n\t\tpanic(\"Missing STABILITY_API_KEY\ - \ environment variable\")\n\t}\n\n\tdata := &bytes.Buffer{}\n\twriter :=\ - \ multipart.NewWriter(data)\n\n\t// Write the init image to the request\n\ - \tinitImageWriter, _ := writer.CreateFormField(\"init_image\")\n\tinitImageFile,\ - \ initImageErr := os.Open(\"../init_image_1024.png\")\n\tif initImageErr\ - \ != nil {\n\t\tpanic(\"Could not open init_image.png\")\n\t}\n\t_, _ =\ - \ io.Copy(initImageWriter, initImageFile)\n\n\t// Write the options to the\ - \ request\n\t_ = writer.WriteField(\"init_image_mode\", \"IMAGE_STRENGTH\"\ - )\n\t_ = writer.WriteField(\"image_strength\", \"0.35\")\n\t_ = writer.WriteField(\"\ - text_prompts[0][text]\", \"Galactic dog with a cape\")\n\t_ = writer.WriteField(\"\ - cfg_scale\", \"7\")\n\t_ = writer.WriteField(\"samples\", \"1\")\n\t_ =\ - \ writer.WriteField(\"steps\", \"30\")\n\twriter.Close()\n\n\t// Execute\ - \ the request\n\tpayload := bytes.NewReader(data.Bytes())\n\treq, _ := http.NewRequest(\"\ - POST\", reqUrl, payload)\n\treq.Header.Add(\"Content-Type\", writer.FormDataContentType())\n\ - \treq.Header.Add(\"Accept\", \"application/json\")\n\treq.Header.Add(\"\ - Authorization\", \"Bearer \"+apiKey)\n\tres, _ := http.DefaultClient.Do(req)\n\ - \tdefer res.Body.Close()\n\n\tif res.StatusCode != 200 {\n\t\tvar body map[string]interface{}\n\ - \t\tif err := json.NewDecoder(res.Body).Decode(&body); err != nil {\n\t\t\ - \tpanic(err)\n\t\t}\n\t\tpanic(fmt.Sprintf(\"Non-200 response: %s\", body))\n\ - \t}\n\n\t// Decode the JSON body\n\tvar body ImageToImageResponse\n\tif\ - \ err := json.NewDecoder(res.Body).Decode(&body); err != nil {\n\t\tpanic(err)\n\ - \t}\n\n\t// Write the images to disk\n\tfor i, image := range body.Images\ - \ {\n\t\toutFile := fmt.Sprintf(\"./out/v1_img2img_%d.png\", i)\n\t\tfile,\ - \ err := os.Create(outFile)\n\t\tif err != nil {\n\t\t\tpanic(err)\n\t\t\ - }\n\n\t\timageBytes, err := base64.StdEncoding.DecodeString(image.Base64)\n\ - \t\tif err != nil {\n\t\t\tpanic(err)\n\t\t}\n\n\t\tif _, err := file.Write(imageBytes);\ - \ err != nil {\n\t\t\tpanic(err)\n\t\t}\n\n\t\tif err := file.Close(); err\ - \ != nil {\n\t\t\tpanic(err)\n\t\t}\n\t}\n}\n" - - lang: cURL - source: | - if [ -z "$STABILITY_API_KEY" ]; then - echo "STABILITY_API_KEY environment variable is not set" - exit 1 - fi - - OUTPUT_FILE=./out/v1_img2img.png - BASE_URL=${API_HOST:-https://api.stability.ai} - URL="$BASE_URL/v1/generation/stable-diffusion-xl-1024-v1-0/image-to-image" - - curl -f -sS -X POST "$URL" \ - -H 'Content-Type: multipart/form-data' \ - -H 'Accept: image/png' \ - -H "Authorization: Bearer $STABILITY_API_KEY" \ - -F 'init_image=@"../init_image_1024.png"' \ - -F 'init_image_mode=IMAGE_STRENGTH' \ - -F 'image_strength=0.35' \ - -F 'text_prompts[0][text]=A galactic dog in space' \ - -F 'cfg_scale=7' \ - -F 'samples=1' \ - -F 'steps=30' \ - -o "$OUTPUT_FILE" + const responseJSON = (await response.json()) as GenerationResponse + + responseJSON.artifacts.forEach((image, index) => { + fs.writeFileSync( + `out/v1_img2img_${index}.png`, + Buffer.from(image.base64, 'base64') + ) + }) + - lang: Go + source: "package main\n\nimport (\n\t\"bytes\"\n\t\"encoding/base64\"\n\t\"encoding/json\"\n\t\"fmt\"\n\t\"io\"\n\t\"mime/multipart\"\n\t\"net/http\"\ + \n\t\"os\"\n)\n\ntype ImageToImageImage struct {\n\tBase64 string `json:\"base64\"`\n\tSeed uint32 `json:\"seed\"`\n\tFinishReason\ + \ string `json:\"finishReason\"`\n}\n\ntype ImageToImageResponse struct {\n\tImages []ImageToImageImage `json:\"artifacts\"`\n}\n\nfunc main()\ + \ {\n\tengineId := \"stable-diffusion-xl-1024-v1-0\"\n\n\t// Build REST endpoint URL\n\tapiHost, hasApiHost := os.LookupEnv(\"API_HOST\")\n\t\ + if !hasApiHost {\n\t\tapiHost = \"https://api.stability.ai\"\n\t}\n\treqUrl := apiHost + \"/v1/generation/\" + engineId + \"/image-to-image\"\ + \n\n\t// Acquire an API key from the environment\n\tapiKey, hasAPIKey := os.LookupEnv(\"STABILITY_API_KEY\")\n\tif !hasAPIKey {\n\t\tpanic(\"\ + Missing STABILITY_API_KEY environment variable\")\n\t}\n\n\tdata := &bytes.Buffer{}\n\twriter := multipart.NewWriter(data)\n\n\t// Write the\ + \ init image to the request\n\tinitImageWriter, _ := writer.CreateFormField(\"init_image\")\n\tinitImageFile, initImageErr := os.Open(\"../init_image_1024.png\"\ + )\n\tif initImageErr != nil {\n\t\tpanic(\"Could not open init_image.png\")\n\t}\n\t_, _ = io.Copy(initImageWriter, initImageFile)\n\n\t// Write\ + \ the options to the request\n\t_ = writer.WriteField(\"init_image_mode\", \"IMAGE_STRENGTH\")\n\t_ = writer.WriteField(\"image_strength\",\ + \ \"0.35\")\n\t_ = writer.WriteField(\"text_prompts[0][text]\", \"Galactic dog with a cape\")\n\t_ = writer.WriteField(\"cfg_scale\", \"7\"\ + )\n\t_ = writer.WriteField(\"samples\", \"1\")\n\t_ = writer.WriteField(\"steps\", \"30\")\n\twriter.Close()\n\n\t// Execute the request\n\t\ + payload := bytes.NewReader(data.Bytes())\n\treq, _ := http.NewRequest(\"POST\", reqUrl, payload)\n\treq.Header.Add(\"Content-Type\", writer.FormDataContentType())\n\ + \treq.Header.Add(\"Accept\", \"application/json\")\n\treq.Header.Add(\"Authorization\", \"Bearer \"+apiKey)\n\tres, _ := http.DefaultClient.Do(req)\n\ + \tdefer res.Body.Close()\n\n\tif res.StatusCode != 200 {\n\t\tvar body map[string]interface{}\n\t\tif err := json.NewDecoder(res.Body).Decode(&body);\ + \ err != nil {\n\t\t\tpanic(err)\n\t\t}\n\t\tpanic(fmt.Sprintf(\"Non-200 response: %s\", body))\n\t}\n\n\t// Decode the JSON body\n\tvar body\ + \ ImageToImageResponse\n\tif err := json.NewDecoder(res.Body).Decode(&body); err != nil {\n\t\tpanic(err)\n\t}\n\n\t// Write the images to disk\n\ + \tfor i, image := range body.Images {\n\t\toutFile := fmt.Sprintf(\"./out/v1_img2img_%d.png\", i)\n\t\tfile, err := os.Create(outFile)\n\t\t\ + if err != nil {\n\t\t\tpanic(err)\n\t\t}\n\n\t\timageBytes, err := base64.StdEncoding.DecodeString(image.Base64)\n\t\tif err != nil {\n\t\t\t\ + panic(err)\n\t\t}\n\n\t\tif _, err := file.Write(imageBytes); err != nil {\n\t\t\tpanic(err)\n\t\t}\n\n\t\tif err := file.Close(); err != nil\ + \ {\n\t\t\tpanic(err)\n\t\t}\n\t}\n}\n" + - lang: cURL + source: | + if [ -z "$STABILITY_API_KEY" ]; then + echo "STABILITY_API_KEY environment variable is not set" + exit 1 + fi + + OUTPUT_FILE=./out/v1_img2img.png + BASE_URL=${API_HOST:-https://api.stability.ai} + URL="$BASE_URL/v1/generation/stable-diffusion-xl-1024-v1-0/image-to-image" + + curl -f -sS -X POST "$URL" \ + -H 'Content-Type: multipart/form-data' \ + -H 'Accept: image/png' \ + -H "Authorization: Bearer $STABILITY_API_KEY" \ + -F 'init_image=@"../init_image_1024.png"' \ + -F 'init_image_mode=IMAGE_STRENGTH' \ + -F 'image_strength=0.35' \ + -F 'text_prompts[0][text]=A galactic dog in space' \ + -F 'cfg_scale=7' \ + -F 'samples=1' \ + -F 'steps=30' \ + -o "$OUTPUT_FILE" /v1/generation/{engine_id}/image-to-image/masking: post: description: Selectively modify portions of an image using a mask operationId: masking parameters: - - example: stable-diffusion-xl-1024-v1-0 - in: path - name: engine_id - required: true - schema: - type: string - - $ref: '#/components/parameters/accept' - - $ref: '#/components/parameters/organization' - - $ref: '#/components/parameters/stabilityClientID' - - $ref: '#/components/parameters/stabilityClientVersion' + - example: stable-diffusion-xl-1024-v1-0 + in: path + name: engine_id + required: true + schema: + type: string + - $ref: '#/components/parameters/accept' + - $ref: '#/components/parameters/organization' + - $ref: '#/components/parameters/stabilityClientID' + - $ref: '#/components/parameters/stabilityClientVersion' requestBody: content: multipart/form-data: @@ -1276,188 +1204,167 @@ paths: '500': $ref: '#/components/responses/500' security: - - STABILITY_API_KEY: [] + - STABILITY_API_KEY: [] summary: image-to-image/masking tags: - - v1/generation + - v1/generation x-codeSamples: - - lang: Python - source: | - import base64 - import os - import requests - - engine_id = "stable-diffusion-xl-1024-v1-0" - api_host = os.getenv('API_HOST', 'https://api.stability.ai') - api_key = os.getenv("STABILITY_API_KEY") - - if api_key is None: - raise Exception("Missing Stability API key.") - - response = requests.post( - f"{api_host}/v1/generation/{engine_id}/image-to-image/masking", - headers={ - "Accept": 'application/json', - "Authorization": f"Bearer {api_key}" - }, - files={ - 'init_image': open("../init_image_1024.png", 'rb'), - 'mask_image': open("../mask_image_black_1024.png", 'rb'), - }, - data={ - "mask_source": "MASK_IMAGE_BLACK", - "text_prompts[0][text]": "A large spiral galaxy with a bright central bulge and a ring of stars around it", - "cfg_scale": 7, - "clip_guidance_preset": "FAST_BLUE", - "samples": 1, - "steps": 30, - } - ) - - if response.status_code != 200: - raise Exception("Non-200 response: " + str(response.text)) - - data = response.json() - - for i, image in enumerate(data["artifacts"]): - with open(f"./out/v1_img2img_masking_{i}.png", "wb") as f: - f.write(base64.b64decode(image["base64"])) - - label: TypeScript - lang: Javascript - source: | - import fetch from 'node-fetch' - import FormData from 'form-data' - import fs from 'node:fs' - - const engineId = 'stable-diffusion-xl-1024-v1-0' - const apiHost = process.env.API_HOST ?? 'https://api.stability.ai' - const apiKey = process.env.STABILITY_API_KEY - - if (!apiKey) throw new Error('Missing Stability API key.') - - // NOTE: This example is using a NodeJS FormData library. Browser - // implementations should use their native FormData class. React Native - // implementations should also use their native FormData class. - const formData = new FormData() - formData.append('init_image', fs.readFileSync('../init_image_1024.png')) - formData.append('mask_image', fs.readFileSync('../mask_image_black_1024.png')) - formData.append('mask_source', 'MASK_IMAGE_BLACK') - formData.append( - 'text_prompts[0][text]', - 'A large spiral galaxy with a bright central bulge and a ring of stars around it' - ) - formData.append('cfg_scale', '7') - formData.append('clip_guidance_preset', 'FAST_BLUE') - formData.append('samples', 1) - formData.append('steps', 30) - - const response = await fetch( - `${apiHost}/v1/generation/${engineId}/image-to-image/masking`, - { - method: 'POST', - headers: { - ...formData.getHeaders(), - Accept: 'application/json', - Authorization: `Bearer ${apiKey}`, - }, - body: formData, - } - ) + - lang: Python + source: | + import base64 + import os + import requests + + engine_id = "stable-diffusion-xl-1024-v1-0" + api_host = os.getenv('API_HOST', 'https://api.stability.ai') + api_key = os.getenv("STABILITY_API_KEY") + + if api_key is None: + raise Exception("Missing Stability API key.") + + response = requests.post( + f"{api_host}/v1/generation/{engine_id}/image-to-image/masking", + headers={ + "Accept": 'application/json', + "Authorization": f"Bearer {api_key}" + }, + files={ + 'init_image': open("../init_image_1024.png", 'rb'), + 'mask_image': open("../mask_image_black_1024.png", 'rb'), + }, + data={ + "mask_source": "MASK_IMAGE_BLACK", + "text_prompts[0][text]": "A large spiral galaxy with a bright central bulge and a ring of stars around it", + "cfg_scale": 7, + "clip_guidance_preset": "FAST_BLUE", + "samples": 1, + "steps": 30, + } + ) - if (!response.ok) { - throw new Error(`Non-200 response: ${await response.text()}`) - } + if response.status_code != 200: + raise Exception("Non-200 response: " + str(response.text)) + + data = response.json() + + for i, image in enumerate(data["artifacts"]): + with open(f"./out/v1_img2img_masking_{i}.png", "wb") as f: + f.write(base64.b64decode(image["base64"])) + - label: TypeScript + lang: Javascript + source: | + import fetch from 'node-fetch' + import FormData from 'form-data' + import fs from 'node:fs' + + const engineId = 'stable-diffusion-xl-1024-v1-0' + const apiHost = process.env.API_HOST ?? 'https://api.stability.ai' + const apiKey = process.env.STABILITY_API_KEY + + if (!apiKey) throw new Error('Missing Stability API key.') + + // NOTE: This example is using a NodeJS FormData library. Browser + // implementations should use their native FormData class. React Native + // implementations should also use their native FormData class. + const formData = new FormData() + formData.append('init_image', fs.readFileSync('../init_image_1024.png')) + formData.append('mask_image', fs.readFileSync('../mask_image_black_1024.png')) + formData.append('mask_source', 'MASK_IMAGE_BLACK') + formData.append( + 'text_prompts[0][text]', + 'A large spiral galaxy with a bright central bulge and a ring of stars around it' + ) + formData.append('cfg_scale', '7') + formData.append('clip_guidance_preset', 'FAST_BLUE') + formData.append('samples', 1) + formData.append('steps', 30) + + const response = await fetch( + `${apiHost}/v1/generation/${engineId}/image-to-image/masking`, + { + method: 'POST', + headers: { + ...formData.getHeaders(), + Accept: 'application/json', + Authorization: `Bearer ${apiKey}`, + }, + body: formData, + } + ) - interface GenerationResponse { - artifacts: Array<{ - base64: string - seed: number - finishReason: string - }> - } + if (!response.ok) { + throw new Error(`Non-200 response: ${await response.text()}`) + } - const responseJSON = (await response.json()) as GenerationResponse + interface GenerationResponse { + artifacts: Array<{ + base64: string + seed: number + finishReason: string + }> + } - responseJSON.artifacts.forEach((image, index) => { - fs.writeFileSync( - `out/v1_img2img_masking_${index}.png`, - Buffer.from(image.base64, 'base64') - ) - }) - - lang: Go - source: "package main\n\nimport (\n\t\"bytes\"\n\t\"encoding/base64\"\n\t\"\ - encoding/json\"\n\t\"fmt\"\n\t\"io\"\n\t\"mime/multipart\"\n\t\"net/http\"\ - \n\t\"os\"\n)\n\ntype MaskingImage struct {\n\tBase64 string `json:\"\ - base64\"`\n\tSeed uint32 `json:\"seed\"`\n\tFinishReason string\ - \ `json:\"finishReason\"`\n}\n\ntype MaskingResponse struct {\n\tImages\ - \ []MaskingImage `json:\"artifacts\"`\n}\n\nfunc main() {\n\tengineId :=\ - \ \"stable-diffusion-xl-1024-v1-0\"\n\n\t// Build REST endpoint URL\n\t\ - apiHost, hasApiHost := os.LookupEnv(\"API_HOST\")\n\tif !hasApiHost {\n\t\ - \tapiHost = \"https://api.stability.ai\"\n\t}\n\treqUrl := apiHost + \"\ - /v1/generation/\" + engineId + \"/image-to-image/masking\"\n\n\t// Acquire\ - \ an API key from the environment\n\tapiKey, hasAPIKey := os.LookupEnv(\"\ - STABILITY_API_KEY\")\n\tif !hasAPIKey {\n\t\tpanic(\"Missing STABILITY_API_KEY\ - \ environment variable\")\n\t}\n\n\tdata := &bytes.Buffer{}\n\twriter :=\ - \ multipart.NewWriter(data)\n\n\t// Write the init image to the request\n\ - \tinitImageWriter, _ := writer.CreateFormField(\"init_image\")\n\tinitImageFile,\ - \ initImageErr := os.Open(\"../init_image_1024.png\")\n\tif initImageErr\ - \ != nil {\n\t\tpanic(\"Could not open init_image.png\")\n\t}\n\t_, _ =\ - \ io.Copy(initImageWriter, initImageFile)\n\n\t// Write the mask image to\ - \ the request\n\tmaskImageWriter, _ := writer.CreateFormField(\"mask_image\"\ - )\n\tmaskImageFile, maskImageErr := os.Open(\"../mask_image_black_1024.png\"\ - )\n\tif maskImageErr != nil {\n\t\tpanic(\"Could not open mask_image_white.png\"\ - )\n\t}\n\t_, _ = io.Copy(maskImageWriter, maskImageFile)\n\n\t// Write the\ - \ options to the request\n\t_ = writer.WriteField(\"mask_source\", \"MASK_IMAGE_BLACK\"\ - )\n\t_ = writer.WriteField(\"text_prompts[0][text]\", \"A large spiral galaxy\ - \ with a bright central bulge and a ring of stars around it\")\n\t_ = writer.WriteField(\"\ - cfg_scale\", \"7\")\n\t_ = writer.WriteField(\"clip_guidance_preset\", \"\ - FAST_BLUE\")\n\t_ = writer.WriteField(\"samples\", \"1\")\n\t_ = writer.WriteField(\"\ - steps\", \"30\")\n\twriter.Close()\n\n\t// Execute the request & read all\ - \ the bytes of the response\n\tpayload := bytes.NewReader(data.Bytes())\n\ - \treq, _ := http.NewRequest(\"POST\", reqUrl, payload)\n\treq.Header.Add(\"\ - Content-Type\", writer.FormDataContentType())\n\treq.Header.Add(\"Accept\"\ - , \"application/json\")\n\treq.Header.Add(\"Authorization\", \"Bearer \"\ - +apiKey)\n\tres, _ := http.DefaultClient.Do(req)\n\tdefer res.Body.Close()\n\ - \n\tif res.StatusCode != 200 {\n\t\tvar body map[string]interface{}\n\t\t\ - if err := json.NewDecoder(res.Body).Decode(&body); err != nil {\n\t\t\t\ - panic(err)\n\t\t}\n\t\tpanic(fmt.Sprintf(\"Non-200 response: %s\", body))\n\ - \t}\n\n\t// Decode the JSON body\n\tvar body MaskingResponse\n\tif err :=\ - \ json.NewDecoder(res.Body).Decode(&body); err != nil {\n\t\tpanic(err)\n\ - \t}\n\n\t// Write the images to disk\n\tfor i, image := range body.Images\ - \ {\n\t\toutFile := fmt.Sprintf(\"./out/v1_img2img_masking_%d.png\", i)\n\ - \t\tfile, err := os.Create(outFile)\n\t\tif err != nil {\n\t\t\tpanic(err)\n\ - \t\t}\n\n\t\timageBytes, err := base64.StdEncoding.DecodeString(image.Base64)\n\ - \t\tif err != nil {\n\t\t\tpanic(err)\n\t\t}\n\n\t\tif _, err := file.Write(imageBytes);\ - \ err != nil {\n\t\t\tpanic(err)\n\t\t}\n\n\t\tif err := file.Close(); err\ - \ != nil {\n\t\t\tpanic(err)\n\t\t}\n\t}\n}\n" - - lang: cURL - source: | - #!/bin/sh - - set -e - - if [ -z "$STABILITY_API_KEY" ]; then - echo "STABILITY_API_KEY environment variable is not set" - exit 1 - fi - - OUTPUT_FILE=./out/v1_img2img_masking.png - BASE_URL=${API_HOST:-https://api.stability.ai} - URL="$BASE_URL/v1/generation/stable-diffusion-xl-1024-v1-0/image-to-image/masking" - - curl -f -sS -X POST "$URL" \ - -H 'Content-Type: multipart/form-data' \ - -H 'Accept: image/png' \ - -H "Authorization: Bearer $STABILITY_API_KEY" \ - -F 'init_image=@"../init_image_1024.png"' \ - -F 'mask_image=@"../mask_image_black_1024.png"' \ - -F 'mask_source=MASK_IMAGE_BLACK' \ - -F 'text_prompts[0][text]=A large spiral galaxy with a bright central bulge and a ring of stars around it' \ - -F 'cfg_scale=7' \ - -F 'clip_guidance_preset=FAST_BLUE' \ - -F 'samples=1' \ - -F 'steps=30' \ - -o "$OUTPUT_FILE" + const responseJSON = (await response.json()) as GenerationResponse + + responseJSON.artifacts.forEach((image, index) => { + fs.writeFileSync( + `out/v1_img2img_masking_${index}.png`, + Buffer.from(image.base64, 'base64') + ) + }) + - lang: Go + source: "package main\n\nimport (\n\t\"bytes\"\n\t\"encoding/base64\"\n\t\"encoding/json\"\n\t\"fmt\"\n\t\"io\"\n\t\"mime/multipart\"\n\t\"net/http\"\ + \n\t\"os\"\n)\n\ntype MaskingImage struct {\n\tBase64 string `json:\"base64\"`\n\tSeed uint32 `json:\"seed\"`\n\tFinishReason\ + \ string `json:\"finishReason\"`\n}\n\ntype MaskingResponse struct {\n\tImages []MaskingImage `json:\"artifacts\"`\n}\n\nfunc main() {\n\tengineId\ + \ := \"stable-diffusion-xl-1024-v1-0\"\n\n\t// Build REST endpoint URL\n\tapiHost, hasApiHost := os.LookupEnv(\"API_HOST\")\n\tif !hasApiHost\ + \ {\n\t\tapiHost = \"https://api.stability.ai\"\n\t}\n\treqUrl := apiHost + \"/v1/generation/\" + engineId + \"/image-to-image/masking\"\n\n\ + \t// Acquire an API key from the environment\n\tapiKey, hasAPIKey := os.LookupEnv(\"STABILITY_API_KEY\")\n\tif !hasAPIKey {\n\t\tpanic(\"Missing\ + \ STABILITY_API_KEY environment variable\")\n\t}\n\n\tdata := &bytes.Buffer{}\n\twriter := multipart.NewWriter(data)\n\n\t// Write the init\ + \ image to the request\n\tinitImageWriter, _ := writer.CreateFormField(\"init_image\")\n\tinitImageFile, initImageErr := os.Open(\"../init_image_1024.png\"\ + )\n\tif initImageErr != nil {\n\t\tpanic(\"Could not open init_image.png\")\n\t}\n\t_, _ = io.Copy(initImageWriter, initImageFile)\n\n\t// Write\ + \ the mask image to the request\n\tmaskImageWriter, _ := writer.CreateFormField(\"mask_image\")\n\tmaskImageFile, maskImageErr := os.Open(\"\ + ../mask_image_black_1024.png\")\n\tif maskImageErr != nil {\n\t\tpanic(\"Could not open mask_image_white.png\")\n\t}\n\t_, _ = io.Copy(maskImageWriter,\ + \ maskImageFile)\n\n\t// Write the options to the request\n\t_ = writer.WriteField(\"mask_source\", \"MASK_IMAGE_BLACK\")\n\t_ = writer.WriteField(\"\ + text_prompts[0][text]\", \"A large spiral galaxy with a bright central bulge and a ring of stars around it\")\n\t_ = writer.WriteField(\"cfg_scale\"\ + , \"7\")\n\t_ = writer.WriteField(\"clip_guidance_preset\", \"FAST_BLUE\")\n\t_ = writer.WriteField(\"samples\", \"1\")\n\t_ = writer.WriteField(\"\ + steps\", \"30\")\n\twriter.Close()\n\n\t// Execute the request & read all the bytes of the response\n\tpayload := bytes.NewReader(data.Bytes())\n\ + \treq, _ := http.NewRequest(\"POST\", reqUrl, payload)\n\treq.Header.Add(\"Content-Type\", writer.FormDataContentType())\n\treq.Header.Add(\"\ + Accept\", \"application/json\")\n\treq.Header.Add(\"Authorization\", \"Bearer \"+apiKey)\n\tres, _ := http.DefaultClient.Do(req)\n\tdefer res.Body.Close()\n\ + \n\tif res.StatusCode != 200 {\n\t\tvar body map[string]interface{}\n\t\tif err := json.NewDecoder(res.Body).Decode(&body); err != nil {\n\t\ + \t\tpanic(err)\n\t\t}\n\t\tpanic(fmt.Sprintf(\"Non-200 response: %s\", body))\n\t}\n\n\t// Decode the JSON body\n\tvar body MaskingResponse\n\ + \tif err := json.NewDecoder(res.Body).Decode(&body); err != nil {\n\t\tpanic(err)\n\t}\n\n\t// Write the images to disk\n\tfor i, image := range\ + \ body.Images {\n\t\toutFile := fmt.Sprintf(\"./out/v1_img2img_masking_%d.png\", i)\n\t\tfile, err := os.Create(outFile)\n\t\tif err != nil\ + \ {\n\t\t\tpanic(err)\n\t\t}\n\n\t\timageBytes, err := base64.StdEncoding.DecodeString(image.Base64)\n\t\tif err != nil {\n\t\t\tpanic(err)\n\ + \t\t}\n\n\t\tif _, err := file.Write(imageBytes); err != nil {\n\t\t\tpanic(err)\n\t\t}\n\n\t\tif err := file.Close(); err != nil {\n\t\t\t\ + panic(err)\n\t\t}\n\t}\n}\n" + - lang: cURL + source: | + #!/bin/sh + + set -e + + if [ -z "$STABILITY_API_KEY" ]; then + echo "STABILITY_API_KEY environment variable is not set" + exit 1 + fi + + OUTPUT_FILE=./out/v1_img2img_masking.png + BASE_URL=${API_HOST:-https://api.stability.ai} + URL="$BASE_URL/v1/generation/stable-diffusion-xl-1024-v1-0/image-to-image/masking" + + curl -f -sS -X POST "$URL" \ + -H 'Content-Type: multipart/form-data' \ + -H 'Accept: image/png' \ + -H "Authorization: Bearer $STABILITY_API_KEY" \ + -F 'init_image=@"../init_image_1024.png"' \ + -F 'mask_image=@"../mask_image_black_1024.png"' \ + -F 'mask_source=MASK_IMAGE_BLACK' \ + -F 'text_prompts[0][text]=A large spiral galaxy with a bright central bulge and a ring of stars around it' \ + -F 'cfg_scale=7' \ + -F 'clip_guidance_preset=FAST_BLUE' \ + -F 'samples=1' \ + -F 'steps=30' \ + -o "$OUTPUT_FILE" /v1/generation/{engine_id}/image-to-image/upscale: post: description: | @@ -1472,24 +1379,22 @@ paths: For more details on the upscaler engines, refer to the [documentation on the Platform site.](https://platform.stability.ai/docs/features/image-upscaling?tab=python) operationId: upscaleImage parameters: - - $ref: '#/components/parameters/upscaleEngineID' - - $ref: '#/components/parameters/accept' - - $ref: '#/components/parameters/organization' - - $ref: '#/components/parameters/stabilityClientID' - - $ref: '#/components/parameters/stabilityClientVersion' + - $ref: '#/components/parameters/upscaleEngineID' + - $ref: '#/components/parameters/accept' + - $ref: '#/components/parameters/organization' + - $ref: '#/components/parameters/stabilityClientID' + - $ref: '#/components/parameters/stabilityClientVersion' requestBody: content: multipart/form-data: examples: DESIRED_HEIGHT: - description: Upscale input image to desired height with ESRGAN or - the Latent Upscaler. + description: Upscale input image to desired height with ESRGAN or the Latent Upscaler. value: height: 1024 image: DESIRED_WIDTH: - description: Upscale input image to desired width with ESRGAN or the - Latent Upscaler. + description: Upscale input image to desired width with ESRGAN or the Latent Upscaler. value: image: width: 1024 @@ -1498,8 +1403,7 @@ paths: value: image: LATENT_UPSCALER: - description: Request using the Latent Upscaler. Refer to the LatentUpscalerUpscaleRequestBody - for reference. + description: Request using the Latent Upscaler. Refer to the LatentUpscalerUpscaleRequestBody for reference. value: cfg_scale: 7 image: @@ -1509,8 +1413,8 @@ paths: text_prompts[0][weight]: 1 schema: oneOf: - - $ref: '#/components/schemas/RealESRGANUpscaleRequestBody' - - $ref: '#/components/schemas/LatentUpscalerUpscaleRequestBody' + - $ref: '#/components/schemas/RealESRGANUpscaleRequestBody' + - $ref: '#/components/schemas/LatentUpscalerUpscaleRequestBody' required: true responses: '200': @@ -1526,135 +1430,124 @@ paths: '500': $ref: '#/components/responses/500' security: - - STABILITY_API_KEY: [] + - STABILITY_API_KEY: [] summary: image-to-image/upscale tags: - - v1/generation + - v1/generation x-codeSamples: - - lang: Python - source: | - import os - import requests - - engine_id = "esrgan-v1-x2plus" - api_host = os.getenv("API_HOST", "https://api.stability.ai") - api_key = os.getenv("STABILITY_API_KEY") - - if api_key is None: - raise Exception("Missing Stability API key.") - - response = requests.post( - f"{api_host}/v1/generation/{engine_id}/image-to-image/upscale", - headers={ - "Accept": "image/png", - "Authorization": f"Bearer {api_key}" - }, - files={ - "image": open("../init_image.png", "rb") - }, - data={ - "width": 1024, + - lang: Python + source: | + import os + import requests + + engine_id = "esrgan-v1-x2plus" + api_host = os.getenv("API_HOST", "https://api.stability.ai") + api_key = os.getenv("STABILITY_API_KEY") + + if api_key is None: + raise Exception("Missing Stability API key.") + + response = requests.post( + f"{api_host}/v1/generation/{engine_id}/image-to-image/upscale", + headers={ + "Accept": "image/png", + "Authorization": f"Bearer {api_key}" + }, + files={ + "image": open("../init_image.png", "rb") + }, + data={ + "width": 1024, + } + ) + + if response.status_code != 200: + raise Exception("Non-200 response: " + str(response.text)) + + with open(f"./out/v1_upscaled_image.png", "wb") as f: + f.write(response.content) + - label: TypeScript + lang: Javascript + source: | + import fetch from 'node-fetch' + import FormData from 'form-data' + import fs from 'node:fs' + + const engineId = 'esrgan-v1-x2plus' + const apiHost = process.env.API_HOST ?? 'https://api.stability.ai' + const apiKey = process.env.STABILITY_API_KEY + + if (!apiKey) throw new Error('Missing Stability API key.') + + // NOTE: This example is using a NodeJS FormData library. + // Browsers should use their native FormData class. + // React Native apps should also use their native FormData class. + const formData = new FormData() + formData.append('image', fs.readFileSync('../init_image.png')) + formData.append('width', 1024) + + const response = await fetch( + `${apiHost}/v1/generation/${engineId}/image-to-image/upscale`, + { + method: 'POST', + headers: { + ...formData.getHeaders(), + Accept: 'image/png', + Authorization: `Bearer ${apiKey}`, + }, + body: formData, } - ) - - if response.status_code != 200: - raise Exception("Non-200 response: " + str(response.text)) - - with open(f"./out/v1_upscaled_image.png", "wb") as f: - f.write(response.content) - - label: TypeScript - lang: Javascript - source: | - import fetch from 'node-fetch' - import FormData from 'form-data' - import fs from 'node:fs' - - const engineId = 'esrgan-v1-x2plus' - const apiHost = process.env.API_HOST ?? 'https://api.stability.ai' - const apiKey = process.env.STABILITY_API_KEY - - if (!apiKey) throw new Error('Missing Stability API key.') - - // NOTE: This example is using a NodeJS FormData library. - // Browsers should use their native FormData class. - // React Native apps should also use their native FormData class. - const formData = new FormData() - formData.append('image', fs.readFileSync('../init_image.png')) - formData.append('width', 1024) - - const response = await fetch( - `${apiHost}/v1/generation/${engineId}/image-to-image/upscale`, - { - method: 'POST', - headers: { - ...formData.getHeaders(), - Accept: 'image/png', - Authorization: `Bearer ${apiKey}`, - }, - body: formData, - } - ) + ) - if (!response.ok) { - throw new Error(`Non-200 response: ${await response.text()}`) - } + if (!response.ok) { + throw new Error(`Non-200 response: ${await response.text()}`) + } - const image = await response.arrayBuffer() - fs.writeFileSync('./out/v1_upscaled_image.png', Buffer.from(image)) - - lang: Go - source: "package main\n\nimport (\n\t\"bytes\"\n\t\"encoding/json\"\n\t\"\ - fmt\"\n\t\"io\"\n\t\"mime/multipart\"\n\t\"net/http\"\n\t\"os\"\n)\n\nfunc\ - \ main() {\n\tengineId := \"esrgan-v1-x2plus\"\n\n\t// Build REST endpoint\ - \ URL\n\tapiHost, hasApiHost := os.LookupEnv(\"API_HOST\")\n\tif !hasApiHost\ - \ {\n\t\tapiHost = \"https://api.stability.ai\"\n\t}\n\treqUrl := apiHost\ - \ + \"/v1/generation/\" + engineId + \"/image-to-image/upscale\"\n\n\t//\ - \ Acquire an API key from the environment\n\tapiKey, hasAPIKey := os.LookupEnv(\"\ - STABILITY_API_KEY\")\n\tif !hasAPIKey {\n\t\tpanic(\"Missing STABILITY_API_KEY\ - \ environment variable\")\n\t}\n\n\tdata := &bytes.Buffer{}\n\twriter :=\ - \ multipart.NewWriter(data)\n\n\t// Write the init image to the request\n\ - \tinitImageWriter, _ := writer.CreateFormField(\"image\")\n\tinitImageFile,\ - \ initImageErr := os.Open(\"../init_image.png\")\n\tif initImageErr != nil\ - \ {\n\t\tpanic(\"Could not open init_image.png\")\n\t}\n\t_, _ = io.Copy(initImageWriter,\ - \ initImageFile)\n\n\t// Write the options to the request\n\t_ = writer.WriteField(\"\ - width\", \"1024\")\n\twriter.Close()\n\n\t// Execute the request\n\tpayload\ - \ := bytes.NewReader(data.Bytes())\n\treq, _ := http.NewRequest(\"POST\"\ - , reqUrl, payload)\n\treq.Header.Add(\"Content-Type\", writer.FormDataContentType())\n\ - \treq.Header.Add(\"Accept\", \"image/png\")\n\treq.Header.Add(\"Authorization\"\ - , \"Bearer \"+apiKey)\n\tres, _ := http.DefaultClient.Do(req)\n\tdefer res.Body.Close()\n\ - \n\tif res.StatusCode != 200 {\n\t\tvar body map[string]interface{}\n\t\t\ - if err := json.NewDecoder(res.Body).Decode(&body); err != nil {\n\t\t\t\ - panic(err)\n\t\t}\n\t\tpanic(fmt.Sprintf(\"Non-200 response: %s\", body))\n\ - \t}\n\n\t// Write the response to a file\n\tout, err := os.Create(\"./out/v1_upscaled_image.png\"\ - )\n\tdefer out.Close()\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\n\t_, err\ - \ = io.Copy(out, res.Body)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n}\n" - - lang: cURL - source: | - if [ -z "$STABILITY_API_KEY" ]; then - echo "STABILITY_API_KEY environment variable is not set" - exit 1 - fi - - OUTPUT_FILE=./out/v1_upscaled_image.png - BASE_URL=${API_HOST:-https://api.stability.ai} - URL="$BASE_URL/v1/generation/esrgan-v1-x2plus/image-to-image/upscale" - - curl -f -sS -X POST "$URL" \ - -H 'Content-Type: multipart/form-data' \ - -H 'Accept: image/png' \ - -H "Authorization: Bearer $STABILITY_API_KEY" \ - -F 'image=@"../init_image.png"' \ - -F 'width=1024' \ - -o "$OUTPUT_FILE" + const image = await response.arrayBuffer() + fs.writeFileSync('./out/v1_upscaled_image.png', Buffer.from(image)) + - lang: Go + source: "package main\n\nimport (\n\t\"bytes\"\n\t\"encoding/json\"\n\t\"fmt\"\n\t\"io\"\n\t\"mime/multipart\"\n\t\"net/http\"\n\t\"os\"\n)\n\n\ + func main() {\n\tengineId := \"esrgan-v1-x2plus\"\n\n\t// Build REST endpoint URL\n\tapiHost, hasApiHost := os.LookupEnv(\"API_HOST\")\n\tif\ + \ !hasApiHost {\n\t\tapiHost = \"https://api.stability.ai\"\n\t}\n\treqUrl := apiHost + \"/v1/generation/\" + engineId + \"/image-to-image/upscale\"\ + \n\n\t// Acquire an API key from the environment\n\tapiKey, hasAPIKey := os.LookupEnv(\"STABILITY_API_KEY\")\n\tif !hasAPIKey {\n\t\tpanic(\"\ + Missing STABILITY_API_KEY environment variable\")\n\t}\n\n\tdata := &bytes.Buffer{}\n\twriter := multipart.NewWriter(data)\n\n\t// Write the\ + \ init image to the request\n\tinitImageWriter, _ := writer.CreateFormField(\"image\")\n\tinitImageFile, initImageErr := os.Open(\"../init_image.png\"\ + )\n\tif initImageErr != nil {\n\t\tpanic(\"Could not open init_image.png\")\n\t}\n\t_, _ = io.Copy(initImageWriter, initImageFile)\n\n\t// Write\ + \ the options to the request\n\t_ = writer.WriteField(\"width\", \"1024\")\n\twriter.Close()\n\n\t// Execute the request\n\tpayload := bytes.NewReader(data.Bytes())\n\ + \treq, _ := http.NewRequest(\"POST\", reqUrl, payload)\n\treq.Header.Add(\"Content-Type\", writer.FormDataContentType())\n\treq.Header.Add(\"\ + Accept\", \"image/png\")\n\treq.Header.Add(\"Authorization\", \"Bearer \"+apiKey)\n\tres, _ := http.DefaultClient.Do(req)\n\tdefer res.Body.Close()\n\ + \n\tif res.StatusCode != 200 {\n\t\tvar body map[string]interface{}\n\t\tif err := json.NewDecoder(res.Body).Decode(&body); err != nil {\n\t\ + \t\tpanic(err)\n\t\t}\n\t\tpanic(fmt.Sprintf(\"Non-200 response: %s\", body))\n\t}\n\n\t// Write the response to a file\n\tout, err := os.Create(\"\ + ./out/v1_upscaled_image.png\")\n\tdefer out.Close()\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\n\t_, err = io.Copy(out, res.Body)\n\tif err !=\ + \ nil {\n\t\tpanic(err)\n\t}\n}\n" + - lang: cURL + source: | + if [ -z "$STABILITY_API_KEY" ]; then + echo "STABILITY_API_KEY environment variable is not set" + exit 1 + fi + + OUTPUT_FILE=./out/v1_upscaled_image.png + BASE_URL=${API_HOST:-https://api.stability.ai} + URL="$BASE_URL/v1/generation/esrgan-v1-x2plus/image-to-image/upscale" + + curl -f -sS -X POST "$URL" \ + -H 'Content-Type: multipart/form-data' \ + -H 'Accept: image/png' \ + -H "Authorization: Bearer $STABILITY_API_KEY" \ + -F 'image=@"../init_image.png"' \ + -F 'width=1024' \ + -o "$OUTPUT_FILE" /v1/generation/{engine_id}/text-to-image: post: description: Generate a new image from a text prompt operationId: textToImage parameters: - - $ref: '#/components/parameters/engineID' - - $ref: '#/components/parameters/accept' - - $ref: '#/components/parameters/organization' - - $ref: '#/components/parameters/stabilityClientID' - - $ref: '#/components/parameters/stabilityClientVersion' + - $ref: '#/components/parameters/engineID' + - $ref: '#/components/parameters/accept' + - $ref: '#/components/parameters/organization' + - $ref: '#/components/parameters/stabilityClientID' + - $ref: '#/components/parameters/stabilityClientVersion' requestBody: content: application/json: @@ -1666,8 +1559,8 @@ paths: samples: 1 steps: 30 text_prompts: - - text: A lighthouse on a cliff - weight: 1 + - text: A lighthouse on a cliff + weight: 1 width: 512 schema: $ref: '#/components/schemas/TextToImageRequestBody' @@ -1686,173 +1579,158 @@ paths: '500': $ref: '#/components/responses/500' security: - - STABILITY_API_KEY: [] + - STABILITY_API_KEY: [] summary: text-to-image tags: - - v1/generation + - v1/generation x-codeSamples: - - lang: Python - source: | - import base64 - import os - import requests - - engine_id = "stable-diffusion-v1-6" - api_host = os.getenv('API_HOST', 'https://api.stability.ai') - api_key = os.getenv("STABILITY_API_KEY") - - if api_key is None: - raise Exception("Missing Stability API key.") - - response = requests.post( - f"{api_host}/v1/generation/{engine_id}/text-to-image", - headers={ - "Content-Type": "application/json", - "Accept": "application/json", - "Authorization": f"Bearer {api_key}" - }, - json={ - "text_prompts": [ - { - "text": "A lighthouse on a cliff" - } - ], - "cfg_scale": 7, - "height": 1024, - "width": 1024, - "samples": 1, - "steps": 30, - }, - ) - - if response.status_code != 200: - raise Exception("Non-200 response: " + str(response.text)) - - data = response.json() + - lang: Python + source: | + import base64 + import os + import requests + + engine_id = "stable-diffusion-v1-6" + api_host = os.getenv('API_HOST', 'https://api.stability.ai') + api_key = os.getenv("STABILITY_API_KEY") + + if api_key is None: + raise Exception("Missing Stability API key.") + + response = requests.post( + f"{api_host}/v1/generation/{engine_id}/text-to-image", + headers={ + "Content-Type": "application/json", + "Accept": "application/json", + "Authorization": f"Bearer {api_key}" + }, + json={ + "text_prompts": [ + { + "text": "A lighthouse on a cliff" + } + ], + "cfg_scale": 7, + "height": 1024, + "width": 1024, + "samples": 1, + "steps": 30, + }, + ) - for i, image in enumerate(data["artifacts"]): - with open(f"./out/v1_txt2img_{i}.png", "wb") as f: - f.write(base64.b64decode(image["base64"])) - - label: TypeScript - lang: Javascript - source: | - import fetch from 'node-fetch' - import fs from 'node:fs' + if response.status_code != 200: + raise Exception("Non-200 response: " + str(response.text)) + + data = response.json() + + for i, image in enumerate(data["artifacts"]): + with open(f"./out/v1_txt2img_{i}.png", "wb") as f: + f.write(base64.b64decode(image["base64"])) + - label: TypeScript + lang: Javascript + source: | + import fetch from 'node-fetch' + import fs from 'node:fs' + + const engineId = 'stable-diffusion-v1-6' + const apiHost = process.env.API_HOST ?? 'https://api.stability.ai' + const apiKey = process.env.STABILITY_API_KEY + + if (!apiKey) throw new Error('Missing Stability API key.') + + const response = await fetch( + `${apiHost}/v1/generation/${engineId}/text-to-image`, + { + method: 'POST', + headers: { + 'Content-Type': 'application/json', + Accept: 'application/json', + Authorization: `Bearer ${apiKey}`, + }, + body: JSON.stringify({ + text_prompts: [ + { + text: 'A lighthouse on a cliff', + }, + ], + cfg_scale: 7, + height: 1024, + width: 1024, + steps: 30, + samples: 1, + }), + } + ) - const engineId = 'stable-diffusion-v1-6' - const apiHost = process.env.API_HOST ?? 'https://api.stability.ai' - const apiKey = process.env.STABILITY_API_KEY + if (!response.ok) { + throw new Error(`Non-200 response: ${await response.text()}`) + } - if (!apiKey) throw new Error('Missing Stability API key.') + interface GenerationResponse { + artifacts: Array<{ + base64: string + seed: number + finishReason: string + }> + } - const response = await fetch( - `${apiHost}/v1/generation/${engineId}/text-to-image`, - { - method: 'POST', - headers: { - 'Content-Type': 'application/json', - Accept: 'application/json', - Authorization: `Bearer ${apiKey}`, - }, - body: JSON.stringify({ - text_prompts: [ + const responseJSON = (await response.json()) as GenerationResponse + + responseJSON.artifacts.forEach((image, index) => { + fs.writeFileSync( + `./out/v1_txt2img_${index}.png`, + Buffer.from(image.base64, 'base64') + ) + }) + - lang: Go + source: "package main\n\nimport (\n\t\"bytes\"\n\t\"encoding/base64\"\n\t\"encoding/json\"\n\t\"fmt\"\n\t\"net/http\"\n\t\"os\"\n)\n\ntype TextToImageImage\ + \ struct {\n\tBase64 string `json:\"base64\"`\n\tSeed uint32 `json:\"seed\"`\n\tFinishReason string `json:\"finishReason\"`\n\ + }\n\ntype TextToImageResponse struct {\n\tImages []TextToImageImage `json:\"artifacts\"`\n}\n\nfunc main() {\n\t// Build REST endpoint URL w/\ + \ specified engine\n\tengineId := \"stable-diffusion-v1-6\"\n\tapiHost, hasApiHost := os.LookupEnv(\"API_HOST\")\n\tif !hasApiHost {\n\t\tapiHost\ + \ = \"https://api.stability.ai\"\n\t}\n\treqUrl := apiHost + \"/v1/generation/\" + engineId + \"/text-to-image\"\n\n\t// Acquire an API key\ + \ from the environment\n\tapiKey, hasAPIKey := os.LookupEnv(\"STABILITY_API_KEY\")\n\tif !hasAPIKey {\n\t\tpanic(\"Missing STABILITY_API_KEY\ + \ environment variable\")\n\t}\n\n\tvar data = []byte(`{\n\t\t\"text_prompts\": [\n\t\t {\n\t\t\t\"text\": \"A lighthouse on a cliff\"\n\t\t\ + \ }\n\t\t],\n\t\t\"cfg_scale\": 7,\n\t\t\"height\": 1024,\n\t\t\"width\": 1024,\n\t\t\"samples\": 1,\n\t\t\"steps\": 30\n \t}`)\n\n\treq,\ + \ _ := http.NewRequest(\"POST\", reqUrl, bytes.NewBuffer(data))\n\treq.Header.Add(\"Content-Type\", \"application/json\")\n\treq.Header.Add(\"\ + Accept\", \"application/json\")\n\treq.Header.Add(\"Authorization\", \"Bearer \"+apiKey)\n\n\t// Execute the request & read all the bytes of\ + \ the body\n\tres, _ := http.DefaultClient.Do(req)\n\tdefer res.Body.Close()\n\n\tif res.StatusCode != 200 {\n\t\tvar body map[string]interface{}\n\ + \t\tif err := json.NewDecoder(res.Body).Decode(&body); err != nil {\n\t\t\tpanic(err)\n\t\t}\n\t\tpanic(fmt.Sprintf(\"Non-200 response: %s\"\ + , body))\n\t}\n\n\t// Decode the JSON body\n\tvar body TextToImageResponse\n\tif err := json.NewDecoder(res.Body).Decode(&body); err != nil\ + \ {\n\t\tpanic(err)\n\t}\n\n\t// Write the images to disk\n\tfor i, image := range body.Images {\n\t\toutFile := fmt.Sprintf(\"./out/v1_txt2img_%d.png\"\ + , i)\n\t\tfile, err := os.Create(outFile)\n\t\tif err != nil {\n\t\t\tpanic(err)\n\t\t}\n\n\t\timageBytes, err := base64.StdEncoding.DecodeString(image.Base64)\n\ + \t\tif err != nil {\n\t\t\tpanic(err)\n\t\t}\n\n\t\tif _, err := file.Write(imageBytes); err != nil {\n\t\t\tpanic(err)\n\t\t}\n\n\t\tif err\ + \ := file.Close(); err != nil {\n\t\t\tpanic(err)\n\t\t}\n\t}\n}\n" + - lang: cURL + source: | + if [ -z "$STABILITY_API_KEY" ]; then + echo "STABILITY_API_KEY environment variable is not set" + exit 1 + fi + + OUTPUT_FILE=./out/v1_txt2img.png + BASE_URL=${API_HOST:-https://api.stability.ai} + URL="$BASE_URL/v1/generation/stable-diffusion-v1-6/text-to-image" + + curl -f -sS -X POST "$URL" \ + -H 'Content-Type: application/json' \ + -H 'Accept: image/png' \ + -H "Authorization: Bearer $STABILITY_API_KEY" \ + --data-raw '{ + "text_prompts": [ { - text: 'A lighthouse on a cliff', - }, + "text": "A lighthouse on a cliff" + } ], - cfg_scale: 7, - height: 1024, - width: 1024, - steps: 30, - samples: 1, - }), - } - ) - - if (!response.ok) { - throw new Error(`Non-200 response: ${await response.text()}`) - } - - interface GenerationResponse { - artifacts: Array<{ - base64: string - seed: number - finishReason: string - }> - } - - const responseJSON = (await response.json()) as GenerationResponse - - responseJSON.artifacts.forEach((image, index) => { - fs.writeFileSync( - `./out/v1_txt2img_${index}.png`, - Buffer.from(image.base64, 'base64') - ) - }) - - lang: Go - source: "package main\n\nimport (\n\t\"bytes\"\n\t\"encoding/base64\"\n\t\"\ - encoding/json\"\n\t\"fmt\"\n\t\"net/http\"\n\t\"os\"\n)\n\ntype TextToImageImage\ - \ struct {\n\tBase64 string `json:\"base64\"`\n\tSeed uint32\ - \ `json:\"seed\"`\n\tFinishReason string `json:\"finishReason\"`\n}\n\n\ - type TextToImageResponse struct {\n\tImages []TextToImageImage `json:\"\ - artifacts\"`\n}\n\nfunc main() {\n\t// Build REST endpoint URL w/ specified\ - \ engine\n\tengineId := \"stable-diffusion-v1-6\"\n\tapiHost, hasApiHost\ - \ := os.LookupEnv(\"API_HOST\")\n\tif !hasApiHost {\n\t\tapiHost = \"https://api.stability.ai\"\ - \n\t}\n\treqUrl := apiHost + \"/v1/generation/\" + engineId + \"/text-to-image\"\ - \n\n\t// Acquire an API key from the environment\n\tapiKey, hasAPIKey :=\ - \ os.LookupEnv(\"STABILITY_API_KEY\")\n\tif !hasAPIKey {\n\t\tpanic(\"Missing\ - \ STABILITY_API_KEY environment variable\")\n\t}\n\n\tvar data = []byte(`{\n\ - \t\t\"text_prompts\": [\n\t\t {\n\t\t\t\"text\": \"A lighthouse on a cliff\"\ - \n\t\t }\n\t\t],\n\t\t\"cfg_scale\": 7,\n\t\t\"height\": 1024,\n\t\t\"\ - width\": 1024,\n\t\t\"samples\": 1,\n\t\t\"steps\": 30\n \t}`)\n\n\treq,\ - \ _ := http.NewRequest(\"POST\", reqUrl, bytes.NewBuffer(data))\n\treq.Header.Add(\"\ - Content-Type\", \"application/json\")\n\treq.Header.Add(\"Accept\", \"application/json\"\ - )\n\treq.Header.Add(\"Authorization\", \"Bearer \"+apiKey)\n\n\t// Execute\ - \ the request & read all the bytes of the body\n\tres, _ := http.DefaultClient.Do(req)\n\ - \tdefer res.Body.Close()\n\n\tif res.StatusCode != 200 {\n\t\tvar body map[string]interface{}\n\ - \t\tif err := json.NewDecoder(res.Body).Decode(&body); err != nil {\n\t\t\ - \tpanic(err)\n\t\t}\n\t\tpanic(fmt.Sprintf(\"Non-200 response: %s\", body))\n\ - \t}\n\n\t// Decode the JSON body\n\tvar body TextToImageResponse\n\tif err\ - \ := json.NewDecoder(res.Body).Decode(&body); err != nil {\n\t\tpanic(err)\n\ - \t}\n\n\t// Write the images to disk\n\tfor i, image := range body.Images\ - \ {\n\t\toutFile := fmt.Sprintf(\"./out/v1_txt2img_%d.png\", i)\n\t\tfile,\ - \ err := os.Create(outFile)\n\t\tif err != nil {\n\t\t\tpanic(err)\n\t\t\ - }\n\n\t\timageBytes, err := base64.StdEncoding.DecodeString(image.Base64)\n\ - \t\tif err != nil {\n\t\t\tpanic(err)\n\t\t}\n\n\t\tif _, err := file.Write(imageBytes);\ - \ err != nil {\n\t\t\tpanic(err)\n\t\t}\n\n\t\tif err := file.Close(); err\ - \ != nil {\n\t\t\tpanic(err)\n\t\t}\n\t}\n}\n" - - lang: cURL - source: | - if [ -z "$STABILITY_API_KEY" ]; then - echo "STABILITY_API_KEY environment variable is not set" - exit 1 - fi - - OUTPUT_FILE=./out/v1_txt2img.png - BASE_URL=${API_HOST:-https://api.stability.ai} - URL="$BASE_URL/v1/generation/stable-diffusion-v1-6/text-to-image" - - curl -f -sS -X POST "$URL" \ - -H 'Content-Type: application/json' \ - -H 'Accept: image/png' \ - -H "Authorization: Bearer $STABILITY_API_KEY" \ - --data-raw '{ - "text_prompts": [ - { - "text": "A lighthouse on a cliff" - } - ], - "cfg_scale": 7, - "height": 1024, - "width": 1024, - "samples": 1, - "steps": 30 - }' \ - -o "$OUTPUT_FILE" + "cfg_scale": 7, + "height": 1024, + "width": 1024, + "samples": 1, + "steps": 30 + }' \ + -o "$OUTPUT_FILE" /v1/user/account: get: - description: Get information about the account associated with the provided - API key + description: Get information about the account associated with the provided API key operationId: userAccount responses: '200': @@ -1866,105 +1744,99 @@ paths: '500': $ref: '#/components/responses/500' security: - - STABILITY_API_KEY: [] + - STABILITY_API_KEY: [] summary: account tags: - - v1/user + - v1/user x-codeSamples: - - lang: Python - source: |+ - import os - import requests + - lang: Python + source: |+ + import os + import requests - api_host = os.getenv('API_HOST', 'https://api.stability.ai') - url = f"{api_host}/v1/user/account" + api_host = os.getenv('API_HOST', 'https://api.stability.ai') + url = f"{api_host}/v1/user/account" - api_key = os.getenv("STABILITY_API_KEY") - if api_key is None: - raise Exception("Missing Stability API key.") + api_key = os.getenv("STABILITY_API_KEY") + if api_key is None: + raise Exception("Missing Stability API key.") - response = requests.get(url, headers={ - "Authorization": f"Bearer {api_key}" - }) + response = requests.get(url, headers={ + "Authorization": f"Bearer {api_key}" + }) - if response.status_code != 200: - raise Exception("Non-200 response: " + str(response.text)) + if response.status_code != 200: + raise Exception("Non-200 response: " + str(response.text)) - # Do something with the payload... - payload = response.json() + # Do something with the payload... + payload = response.json() - - label: TypeScript - lang: Javascript - source: | - import fetch from 'node-fetch' + - label: TypeScript + lang: Javascript + source: | + import fetch from 'node-fetch' - const apiHost = process.env.API_HOST ?? 'https://api.stability.ai' - const url = `${apiHost}/v1/user/account` + const apiHost = process.env.API_HOST ?? 'https://api.stability.ai' + const url = `${apiHost}/v1/user/account` - const apiKey = process.env.STABILITY_API_KEY - if (!apiKey) throw new Error('Missing Stability API key.') + const apiKey = process.env.STABILITY_API_KEY + if (!apiKey) throw new Error('Missing Stability API key.') - const response = await fetch(url, { - method: 'GET', - headers: { - Authorization: `Bearer ${apiKey}`, - }, - }) + const response = await fetch(url, { + method: 'GET', + headers: { + Authorization: `Bearer ${apiKey}`, + }, + }) - if (!response.ok) { - throw new Error(`Non-200 response: ${await response.text()}`) - } + if (!response.ok) { + throw new Error(`Non-200 response: ${await response.text()}`) + } - interface User { - id: string - profile_picture: string - email: string - organizations?: Array<{ + interface User { id: string - name: string - role: string - is_default: boolean - }> - } + profile_picture: string + email: string + organizations?: Array<{ + id: string + name: string + role: string + is_default: boolean + }> + } - // Do something with the user... - const user = (await response.json()) as User - - lang: Go - source: "package main\n\nimport (\n\t\"io\"\n\t\"net/http\"\n\t\"os\"\n)\n\ - \nfunc main() {\n\t// Build REST endpoint URL\n\tapiHost, hasApiHost :=\ - \ os.LookupEnv(\"API_HOST\")\n\tif !hasApiHost {\n\t\tapiHost = \"https://api.stability.ai\"\ - \n\t}\n\treqUrl := apiHost + \"/v1/user/account\"\n\n\t// Acquire an API\ - \ key from the environment\n\tapiKey, hasAPIKey := os.LookupEnv(\"STABILITY_API_KEY\"\ - )\n\tif !hasAPIKey {\n\t\tpanic(\"Missing STABILITY_API_KEY environment\ - \ variable\")\n\t}\n\n\t// Build the request\n\treq, _ := http.NewRequest(\"\ - GET\", reqUrl, nil)\n\treq.Header.Add(\"Authorization\", \"Bearer \"+apiKey)\n\ - \n\t// Execute the request\n\tres, _ := http.DefaultClient.Do(req)\n\tdefer\ - \ res.Body.Close()\n\tbody, _ := io.ReadAll(res.Body)\n\n\tif res.StatusCode\ - \ != 200 {\n\t\tpanic(\"Non-200 response: \" + string(body))\n\t}\n\n\t\ - // Do something with the payload...\n\t// payload := string(body)\n}\n" - - lang: cURL - source: | - if [ -z "$STABILITY_API_KEY" ]; then - echo "STABILITY_API_KEY environment variable is not set" - exit 1 - fi - - # Determine the URL to use for the request - BASE_URL=${API_HOST:-https://api.stability.ai} - URL="$BASE_URL/v1/user/account" - - curl -f -sS "$URL" \ - -H 'Accept: application/json' \ - -H "Authorization: Bearer $STABILITY_API_KEY" + // Do something with the user... + const user = (await response.json()) as User + - lang: Go + source: "package main\n\nimport (\n\t\"io\"\n\t\"net/http\"\n\t\"os\"\n)\n\nfunc main() {\n\t// Build REST endpoint URL\n\tapiHost, hasApiHost\ + \ := os.LookupEnv(\"API_HOST\")\n\tif !hasApiHost {\n\t\tapiHost = \"https://api.stability.ai\"\n\t}\n\treqUrl := apiHost + \"/v1/user/account\"\ + \n\n\t// Acquire an API key from the environment\n\tapiKey, hasAPIKey := os.LookupEnv(\"STABILITY_API_KEY\")\n\tif !hasAPIKey {\n\t\tpanic(\"\ + Missing STABILITY_API_KEY environment variable\")\n\t}\n\n\t// Build the request\n\treq, _ := http.NewRequest(\"GET\", reqUrl, nil)\n\treq.Header.Add(\"\ + Authorization\", \"Bearer \"+apiKey)\n\n\t// Execute the request\n\tres, _ := http.DefaultClient.Do(req)\n\tdefer res.Body.Close()\n\tbody,\ + \ _ := io.ReadAll(res.Body)\n\n\tif res.StatusCode != 200 {\n\t\tpanic(\"Non-200 response: \" + string(body))\n\t}\n\n\t// Do something with\ + \ the payload...\n\t// payload := string(body)\n}\n" + - lang: cURL + source: | + if [ -z "$STABILITY_API_KEY" ]; then + echo "STABILITY_API_KEY environment variable is not set" + exit 1 + fi + + # Determine the URL to use for the request + BASE_URL=${API_HOST:-https://api.stability.ai} + URL="$BASE_URL/v1/user/account" + + curl -f -sS "$URL" \ + -H 'Accept: application/json' \ + -H "Authorization: Bearer $STABILITY_API_KEY" /v1/user/balance: get: - description: Get the credit balance of the account/organization associated with - the API key + description: Get the credit balance of the account/organization associated with the API key operationId: userBalance parameters: - - $ref: '#/components/parameters/organization' - - $ref: '#/components/parameters/stabilityClientID' - - $ref: '#/components/parameters/stabilityClientVersion' + - $ref: '#/components/parameters/organization' + - $ref: '#/components/parameters/stabilityClientID' + - $ref: '#/components/parameters/stabilityClientVersion' responses: '200': content: @@ -1979,94 +1851,89 @@ paths: '500': $ref: '#/components/responses/500' security: - - STABILITY_API_KEY: [] + - STABILITY_API_KEY: [] summary: balance tags: - - v1/user + - v1/user x-codeSamples: - - lang: Python - source: |+ - import os - import requests + - lang: Python + source: |+ + import os + import requests - api_host = os.getenv('API_HOST', 'https://api.stability.ai') - url = f"{api_host}/v1/user/balance" + api_host = os.getenv('API_HOST', 'https://api.stability.ai') + url = f"{api_host}/v1/user/balance" - api_key = os.getenv("STABILITY_API_KEY") - if api_key is None: - raise Exception("Missing Stability API key.") + api_key = os.getenv("STABILITY_API_KEY") + if api_key is None: + raise Exception("Missing Stability API key.") - response = requests.get(url, headers={ - "Authorization": f"Bearer {api_key}" - }) + response = requests.get(url, headers={ + "Authorization": f"Bearer {api_key}" + }) - if response.status_code != 200: - raise Exception("Non-200 response: " + str(response.text)) + if response.status_code != 200: + raise Exception("Non-200 response: " + str(response.text)) - # Do something with the payload... - payload = response.json() + # Do something with the payload... + payload = response.json() - - label: TypeScript - lang: Javascript - source: | - import fetch from 'node-fetch' + - label: TypeScript + lang: Javascript + source: | + import fetch from 'node-fetch' - const apiHost = process.env.API_HOST ?? 'https://api.stability.ai' - const url = `${apiHost}/v1/user/balance` + const apiHost = process.env.API_HOST ?? 'https://api.stability.ai' + const url = `${apiHost}/v1/user/balance` - const apiKey = process.env.STABILITY_API_KEY - if (!apiKey) throw new Error('Missing Stability API key.') + const apiKey = process.env.STABILITY_API_KEY + if (!apiKey) throw new Error('Missing Stability API key.') - const response = await fetch(url, { - method: 'GET', - headers: { - Authorization: `Bearer ${apiKey}`, - }, - }) + const response = await fetch(url, { + method: 'GET', + headers: { + Authorization: `Bearer ${apiKey}`, + }, + }) - if (!response.ok) { - throw new Error(`Non-200 response: ${await response.text()}`) - } + if (!response.ok) { + throw new Error(`Non-200 response: ${await response.text()}`) + } - interface Balance { - credits: number - } + interface Balance { + credits: number + } - // Do something with the balance... - const balance = (await response.json()) as Balance - - lang: Go - source: "package main\n\nimport (\n\t\"io\"\n\t\"net/http\"\n\t\"os\"\n)\n\ - \nfunc main() {\n\t// Build REST endpoint URL\n\tapiHost, hasApiHost :=\ - \ os.LookupEnv(\"API_HOST\")\n\tif !hasApiHost {\n\t\tapiHost = \"https://api.stability.ai\"\ - \n\t}\n\treqUrl := apiHost + \"/v1/user/balance\"\n\n\t// Acquire an API\ - \ key from the environment\n\tapiKey, hasAPIKey := os.LookupEnv(\"STABILITY_API_KEY\"\ - )\n\tif !hasAPIKey {\n\t\tpanic(\"Missing STABILITY_API_KEY environment\ - \ variable\")\n\t}\n\n\t// Build the request\n\treq, _ := http.NewRequest(\"\ - GET\", reqUrl, nil)\n\treq.Header.Add(\"Authorization\", \"Bearer \"+apiKey)\n\ - \n\t// Execute the request\n\tres, _ := http.DefaultClient.Do(req)\n\tdefer\ - \ res.Body.Close()\n\tbody, _ := io.ReadAll(res.Body)\n\n\tif res.StatusCode\ - \ != 200 {\n\t\tpanic(\"Non-200 response: \" + string(body))\n\t}\n\n\t\ - // Do something with the payload...\n\t// payload := string(body)\n}\n" - - lang: cURL - source: | - if [ -z "$STABILITY_API_KEY" ]; then - echo "STABILITY_API_KEY environment variable is not set" - exit 1 - fi - - # Determine the URL to use for the request - BASE_URL=${API_HOST:-https://api.stability.ai} - URL="$BASE_URL/v1/user/balance" - - curl -f -sS "$URL" \ - -H 'Content-Type: application/json' \ - -H "Authorization: Bearer $STABILITY_API_KEY" + // Do something with the balance... + const balance = (await response.json()) as Balance + - lang: Go + source: "package main\n\nimport (\n\t\"io\"\n\t\"net/http\"\n\t\"os\"\n)\n\nfunc main() {\n\t// Build REST endpoint URL\n\tapiHost, hasApiHost\ + \ := os.LookupEnv(\"API_HOST\")\n\tif !hasApiHost {\n\t\tapiHost = \"https://api.stability.ai\"\n\t}\n\treqUrl := apiHost + \"/v1/user/balance\"\ + \n\n\t// Acquire an API key from the environment\n\tapiKey, hasAPIKey := os.LookupEnv(\"STABILITY_API_KEY\")\n\tif !hasAPIKey {\n\t\tpanic(\"\ + Missing STABILITY_API_KEY environment variable\")\n\t}\n\n\t// Build the request\n\treq, _ := http.NewRequest(\"GET\", reqUrl, nil)\n\treq.Header.Add(\"\ + Authorization\", \"Bearer \"+apiKey)\n\n\t// Execute the request\n\tres, _ := http.DefaultClient.Do(req)\n\tdefer res.Body.Close()\n\tbody,\ + \ _ := io.ReadAll(res.Body)\n\n\tif res.StatusCode != 200 {\n\t\tpanic(\"Non-200 response: \" + string(body))\n\t}\n\n\t// Do something with\ + \ the payload...\n\t// payload := string(body)\n}\n" + - lang: cURL + source: | + if [ -z "$STABILITY_API_KEY" ]; then + echo "STABILITY_API_KEY environment variable is not set" + exit 1 + fi + + # Determine the URL to use for the request + BASE_URL=${API_HOST:-https://api.stability.ai} + URL="$BASE_URL/v1/user/balance" + + curl -f -sS "$URL" \ + -H 'Content-Type: application/json' \ + -H "Authorization: Bearer $STABILITY_API_KEY" servers: -- url: https://api.stability.ai + - url: https://api.stability.ai tags: -- description: Manage your Stability.ai account, and view account/organization balances - name: v1/user -- description: Enumerate available engines - name: v1/engines -- description: Generate images from text, existing images, or both - name: v1/generation + - description: Manage your Stability.ai account, and view account/organization balances + name: v1/user + - description: Enumerate available engines + name: v1/engines + - description: Generate images from text, existing images, or both + name: v1/generation diff --git a/pkg/component/ai/stabilityai/v0/config/tasks.yaml b/pkg/component/ai/stabilityai/v0/config/tasks.yaml index 7e9dd0d23..940b089ac 100644 --- a/pkg/component/ai/stabilityai/v0/config/tasks.yaml +++ b/pkg/component/ai/stabilityai/v0/config/tasks.yaml @@ -7,46 +7,45 @@ TASK_IMAGE_TO_IMAGE: properties: cfg-scale: default: 7 - description: How strictly the diffusion process adheres to the prompt text - (higher values keep your image closer to your prompt) + description: How strictly the diffusion process adheres to the prompt text (higher values keep your image closer to your prompt) example: 7 maximum: 35 minimum: 0 format: number acceptFormats: - - number - - integer + - number + - integer uiOrder: 6 title: Cfg Scale clip-guidance-preset: default: NONE enum: - - FAST_BLUE - - FAST_GREEN - - NONE - - SIMPLE - - SLOW - - SLOWER - - SLOWEST + - FAST_BLUE + - FAST_GREEN + - NONE + - SIMPLE + - SLOW + - SLOWER + - SLOWEST example: FAST_BLUE format: string description: Clip guidance preset. acceptFormats: - - string + - string uiOrder: 3 title: Clip Guidance Preset engine: default: stable-diffusion-xl-1024-v1-0 description: Stability AI Engine (model) to be used. enum: - - 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 + - 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 acceptFormats: - - string + - string uiOrder: 0 title: Engine format: string @@ -59,36 +58,33 @@ TASK_IMAGE_TO_IMAGE: minimum: 0 format: number acceptFormats: - - number - - integer - shortDescription: How much influence the `init-image` has on the diffusion - process. + - number + - integer + shortDescription: How much influence the `init-image` has on the diffusion process. uiOrder: 5 title: Image Strength init-image: - description: Image used to initialize the diffusion process, in lieu of random - noise. + description: Image used to initialize the diffusion process, in lieu of random noise. format: image acceptFormats: - - image/* + - image/* uiOrder: 2 title: Init Image init-image-mode: default: IMAGE_STRENGTH - description: Whether to use `image_strength` or `step_schedule_*` to control - how much influence the `init_image` has on the result. + description: Whether to use `image_strength` or `step_schedule_*` to control how much influence the `init_image` has on the result. enum: - - IMAGE_STRENGTH - - STEP_SCHEDULE + - IMAGE_STRENGTH + - STEP_SCHEDULE format: string acceptFormats: - - string + - string uiOrder: 7 title: Init Image Mode prompts: description: An array of prompts to use for generation. acceptFormats: - - array + - array uiOrder: 1 items: description: The prompt itself @@ -99,23 +95,22 @@ TASK_IMAGE_TO_IMAGE: title: Prompts format: array sampler: - description: Which sampler to use for the diffusion process. If this value - is omitted we'll automatically select an appropriate sampler for you. + description: Which sampler to use for the diffusion process. If this value is omitted we'll automatically select an appropriate sampler for you. enum: - - 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 + - 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 example: K_DPM_2_ANCESTRAL format: string acceptFormats: - - string + - string shortDescription: Which sampler to use for the diffusion process uiOrder: 8 title: Sampler @@ -127,7 +122,7 @@ TASK_IMAGE_TO_IMAGE: minimum: 1 format: integer acceptFormats: - - integer + - integer uiOrder: 9 title: Samples seed: @@ -138,40 +133,35 @@ TASK_IMAGE_TO_IMAGE: minimum: 0 format: integer acceptFormats: - - number - - integer + - number + - integer uiOrder: 10 title: Seed step-schedule-end: - description: 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. + description: 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. example: 0.01 maximum: 1 minimum: 0 format: number acceptFormats: - - number - - integer + - number + - integer shortDescription: Skips a proportion of the end of the diffusion steps uiOrder: 12 title: Step Schedule End step-schedule-start: default: 0.65 - description: 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.) + description: 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.) example: 0.4 maximum: 1 minimum: 0 format: number acceptFormats: - - number - - integer + - number + - integer shortDescription: Skips a proportion of the start of the diffusion steps uiOrder: 11 title: Step Schedule Start @@ -183,7 +173,7 @@ TASK_IMAGE_TO_IMAGE: minimum: 10 format: integer acceptFormats: - - integer + - integer uiOrder: 13 title: Steps style-preset: @@ -191,45 +181,44 @@ TASK_IMAGE_TO_IMAGE: Pass in a style preset to guide the image model towards a particular style. This list of style presets is subject to change. enum: - - 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 + - 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 acceptFormats: - - string + - string uiOrder: 14 title: Style Preset weights: - description: An array of weights to use for generation. If unspecified, the - model will automatically assign a default weight of 1.0 to each prompt. + description: An array of weights to use for generation. If unspecified, the model will automatically assign a default weight of 1.0 to each prompt. acceptFormats: - - array + - array uiOrder: 2 items: description: Weight of the prompt (use negative numbers for negative prompts) example: 0.8167237 acceptFormats: - - number - - integer + - number + - integer minItems: 1 title: Weights format: array required: - - prompts - - engine + - prompts + - engine title: Input format: object output: @@ -243,104 +232,99 @@ TASK_TEXT_TO_IMAGE: properties: cfg-scale: default: 7 - description: How strictly the diffusion process adheres to the prompt text - (higher values keep your image closer to your prompt) + description: How strictly the diffusion process adheres to the prompt text (higher values keep your image closer to your prompt) example: 7 maximum: 35 minimum: 0 format: number acceptFormats: - - number - - integer + - number + - integer uiOrder: 3 title: CFG Scale clip-guidance-preset: default: NONE enum: - - FAST_BLUE - - FAST_GREEN - - NONE - - SIMPLE - - SLOW - - SLOWER - - SLOWEST + - FAST_BLUE + - FAST_GREEN + - NONE + - SIMPLE + - SLOW + - SLOWER + - SLOWEST example: FAST_BLUE format: string description: Clip guidance preset. acceptFormats: - - string + - string uiOrder: 4 title: Clip Guidance Preset engine: default: stable-diffusion-xl-1024-v1-0 description: Stability AI Engine (model) to be used. enum: - - 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 - instillCredentialMap: - 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 + instillCredentialMap: + values: + - stable-diffusion-xl-1024-v1-0 + - stable-diffusion-v1-6 targets: - - setup.api-key + - setup.api-key acceptFormats: - - string + - string uiOrder: 0 title: Engine format: string height: default: 1024 - description: "Height of the image to generate, in pixels, in an increment\ - \ divible by 64.\n\nEngine-specific dimension validation:\n- SDXL Beta:\ - \ must be between 128x128 and 512x896 (or 896x512); only one dimension can\ - \ be greater than 512. \n- SDXL v0.9: must be one of 1024x1024, 1152x896,\ - \ 1216x832, 1344x768, 1536x640, 640x1536, 768x1344, 832x1216, or 896x1152\n\ - - SDXL v1.0: same as SDXL v0.9\n- SD v1.6: must be between 320x320 and\ - \ 1536x1536" + description: "Height of the image to generate, in pixels, in an increment divible by 64.\n\nEngine-specific dimension validation:\n- SDXL Beta:\ + \ must be between 128x128 and 512x896 (or 896x512); only one dimension can be greater than 512. \n- SDXL v0.9: must be one of 1024x1024, 1152x896,\ + \ 1216x832, 1344x768, 1536x640, 640x1536, 768x1344, 832x1216, or 896x1152\n- SDXL v1.0: same as SDXL v0.9\n- SD v1.6: must be between 320x320\ + \ and 1536x1536" example: 1024 minimum: 128 multipleOf: 64 format: integer acceptFormats: - - integer + - integer uiOrder: 5 title: Height prompts: description: An array of prompts to use for generation. acceptFormats: - - array + - array uiOrder: 1 items: description: The prompt itself example: A lighthouse on a cliff maxLength: 2000 acceptFormats: - - string + - string minItems: 1 title: Prompts format: array sampler: - description: Which sampler to use for the diffusion process. If this value - is omitted we'll automatically select an appropriate sampler for you. + description: Which sampler to use for the diffusion process. If this value is omitted we'll automatically select an appropriate sampler for you. enum: - - 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 + - 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 example: K_DPM_2_ANCESTRAL format: string acceptFormats: - - string + - string uiOrder: 6 title: Sampler samples: @@ -351,7 +335,7 @@ TASK_TEXT_TO_IMAGE: minimum: 1 format: integer acceptFormats: - - integer + - integer uiOrder: 7 title: Samples seed: @@ -362,8 +346,8 @@ TASK_TEXT_TO_IMAGE: minimum: 0 format: integer acceptFormats: - - number - - integer + - number + - integer uiOrder: 8 title: Seed steps: @@ -374,7 +358,7 @@ TASK_TEXT_TO_IMAGE: minimum: 10 format: integer acceptFormats: - - integer + - integer uiOrder: 9 title: Steps style-preset: @@ -382,62 +366,60 @@ TASK_TEXT_TO_IMAGE: Pass in a style preset to guide the image model towards a particular style. This list of style presets is subject to change. enum: - - 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 + - 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 format: string acceptFormats: - - string + - string uiOrder: 10 title: Style Preset weights: description: An array of weights to use for generation. acceptFormats: - - array + - array uiOrder: 2 items: description: Weight of the prompt (use negative numbers for negative prompts) example: 0.8167237 format: float acceptFormats: - - number - - integer + - number + - integer minItems: 1 title: Weights format: array width: default: 1024 - description: "Width of the image to generate, in pixels, in an increment divible\ - \ by 64.\n\nEngine-specific dimension validation:\n- SDXL Beta: must be\ - \ between 128x128 and 512x896 (or 896x512); only one dimension can be greater\ - \ than 512. \n- SDXL v0.9: must be one of 1024x1024, 1152x896, 1216x832,\ - \ 1344x768, 1536x640, 640x1536, 768x1344, 832x1216, or 896x1152\n- SDXL\ - \ v1.0: same as SDXL v0.9\n- SD v1.6: must be between 320x320 and 1536x1536" + description: "Width of the image to generate, in pixels, in an increment divible by 64.\n\nEngine-specific dimension validation:\n- SDXL Beta: must\ + \ be between 128x128 and 512x896 (or 896x512); only one dimension can be greater than 512. \n- SDXL v0.9: must be one of 1024x1024, 1152x896,\ + \ 1216x832, 1344x768, 1536x640, 640x1536, 768x1344, 832x1216, or 896x1152\n- SDXL v1.0: same as SDXL v0.9\n- SD v1.6: must be between 320x320\ + \ and 1536x1536" example: 1024 minimum: 128 multipleOf: 64 format: integer acceptFormats: - - integer + - integer uiOrder: 5 title: Width required: - - prompts - - engine + - prompts + - engine title: Input format: object output: @@ -461,14 +443,14 @@ TASK_TEXT_TO_IMAGE: example: 1229191277 format: number acceptFormats: - - number - - integer + - number + - integer title: Seed x-go-type-skip-optional-pointer: true title: Seeds format: array required: - - images - - seeds + - images + - seeds title: Output format: object diff --git a/pkg/component/ai/universalai/v0/config/definition.yaml b/pkg/component/ai/universalai/v0/config/definition.yaml index 4de217a4d..a05d8447e 100644 --- a/pkg/component/ai/universalai/v0/config/definition.yaml +++ b/pkg/component/ai/universalai/v0/config/definition.yaml @@ -1,12 +1,11 @@ availableTasks: -- TASK_CHAT + - TASK_CHAT custom: false icon: assets/universal-ai.svg id: universal-ai public: true title: Universal AI -description: Connect the AI models served on the different platforms with standardized - input and output formats. +description: Connect the AI models served on the different platforms with standardized input and output formats. type: COMPONENT_TYPE_AI uid: 7656cb11-d504-4ca0-b481-6ef80964f2c9 vendorAttributes: {} diff --git a/pkg/component/ai/universalai/v0/config/setup.yaml b/pkg/component/ai/universalai/v0/config/setup.yaml index 660b85e83..1627f04bd 100644 --- a/pkg/component/ai/universalai/v0/config/setup.yaml +++ b/pkg/component/ai/universalai/v0/config/setup.yaml @@ -1,72 +1,70 @@ additionalProperties: true properties: model: - description: The model to be used. Now, it only supports OpenAI model, and will - support more models in the future. + description: The model to be used. Now, it only supports OpenAI model, and will support more models in the future. shortDescription: The model to be used. acceptFormats: - - string + - string enum: - - o1-preview - - o1-mini - - gpt-4o-mini - - gpt-4o - - gpt-4o-2024-05-13 - - gpt-4o-2024-08-06 - - gpt-4-turbo - - gpt-4-turbo-2024-04-09 - - gpt-4-0125-preview - - gpt-4-turbo-preview - - gpt-4-1106-preview - - gpt-4-vision-preview - - gpt-4 - - gpt-4-0314 - - gpt-4-0613 - - gpt-4-32k - - gpt-4-32k-0314 - - gpt-4-32k-0613 - - gpt-3.5-turbo - - gpt-3.5-turbo-16k - - gpt-3.5-turbo-0301 - - gpt-3.5-turbo-0613 - - gpt-3.5-turbo-1106 - - gpt-3.5-turbo-0125 - - gpt-3.5-turbo-16k-0613 - instillCredentialMap: - values: - o1-preview - o1-mini + - gpt-4o-mini - gpt-4o + - gpt-4o-2024-05-13 - gpt-4o-2024-08-06 - gpt-4-turbo + - gpt-4-turbo-2024-04-09 + - gpt-4-0125-preview + - gpt-4-turbo-preview + - gpt-4-1106-preview - gpt-4-vision-preview - gpt-4 + - gpt-4-0314 + - gpt-4-0613 - gpt-4-32k + - gpt-4-32k-0314 + - gpt-4-32k-0613 - gpt-3.5-turbo - - gpt-4o-mini + - gpt-3.5-turbo-16k + - gpt-3.5-turbo-0301 + - gpt-3.5-turbo-0613 + - gpt-3.5-turbo-1106 + - gpt-3.5-turbo-0125 + - gpt-3.5-turbo-16k-0613 + instillCredentialMap: + values: + - o1-preview + - o1-mini + - gpt-4o + - gpt-4o-2024-08-06 + - gpt-4-turbo + - gpt-4-vision-preview + - gpt-4 + - gpt-4-32k + - gpt-3.5-turbo + - gpt-4o-mini targets: - - setup.api-key + - setup.api-key uiOrder: 0 title: Model Name format: string api-key: description: Fill in your API key from the vendor's platform. acceptFormats: - - string + - string instillSecret: true instillCredential: true uiOrder: 1 title: API Key format: string organization: - description: Specify which organization is used for the requests. Usage will count - against the specified organization's subscription quota. + description: Specify which organization is used for the requests. Usage will count against the specified organization's subscription quota. acceptFormats: - - string + - string uiOrder: 2 title: Organization ID format: string required: -- model + - model title: Universal AI Connection format: object diff --git a/pkg/component/ai/universalai/v0/config/tasks.yaml b/pkg/component/ai/universalai/v0/config/tasks.yaml index 4d99463a0..44da07290 100644 --- a/pkg/component/ai/universalai/v0/config/tasks.yaml +++ b/pkg/component/ai/universalai/v0/config/tasks.yaml @@ -21,75 +21,75 @@ TASK_CHAT: title: Content items: oneOf: - - properties: - text: - title: Text Message - description: Text message. - shortDescription: Text message. - acceptFormats: - - string - uiOrder: 1 - format: string - type: - title: Text - description: Text content type. - shortDescription: Text content type. - acceptFormats: - - string - const: text - uiOrder: 0 - format: string - required: - - text - - type - title: Text - format: object - - properties: - image-url: - title: Image URL - description: Image message URL. - shortDescription: Image message URL. - acceptFormats: - - string - uiOrder: 1 - format: string - type: - title: Image URL - description: Image URL content type. - shortDescription: Image URL content type - acceptFormats: - - string - const: image-url - uiOrder: 0 - format: string - required: - - image-url - - type - title: Image URL - format: object - - properties: - image-base64: - title: Image Base64 - description: Image base64 encoded string. - shortDescription: Image base64 encoded string. - acceptFormats: - - image/* - uiOrder: 1 - format: string - type: - title: Image File - description: Image file input content type. - shortDescription: Image file input content type - acceptFormats: - - string - const: image-base64 - uiOrder: 0 - format: string - required: - - image-base64 - - type - title: Image Base64 - format: object + - properties: + text: + title: Text Message + description: Text message. + shortDescription: Text message. + acceptFormats: + - string + uiOrder: 1 + format: string + type: + title: Text + description: Text content type. + shortDescription: Text content type. + acceptFormats: + - string + const: text + uiOrder: 0 + format: string + required: + - text + - type + title: Text + format: object + - properties: + image-url: + title: Image URL + description: Image message URL. + shortDescription: Image message URL. + acceptFormats: + - string + uiOrder: 1 + format: string + type: + title: Image URL + description: Image URL content type. + shortDescription: Image URL content type + acceptFormats: + - string + const: image-url + uiOrder: 0 + format: string + required: + - image-url + - type + title: Image URL + format: object + - properties: + image-base64: + title: Image Base64 + description: Image base64 encoded string. + shortDescription: Image base64 encoded string. + acceptFormats: + - image/* + uiOrder: 1 + format: string + type: + title: Image File + description: Image file input content type. + shortDescription: Image file input content type + acceptFormats: + - string + const: image-base64 + uiOrder: 0 + format: string + required: + - image-base64 + - type + title: Image Base64 + format: object required: [] format: object uiOrder: 0 @@ -98,35 +98,32 @@ TASK_CHAT: description: The message role, i.e. 'system', 'user' or 'assistant'. shortDescription: The message role, i.e. 'system', 'user' or 'assistant' acceptFormats: - - string + - string title: Role enum: - - system - - user - - assistant + - system + - user + - assistant uiOrder: 1 format: string name: - description: An optional name for the participant. Provides the - model information to differentiate between participants of the - same role. - shortDescription: An optional name for the participant. Provides - the model information to differentiate between participants of - the same role. + description: An optional name for the participant. Provides the model information to differentiate between participants of the same role. + shortDescription: An optional name for the participant. Provides the model information to differentiate between participants of the same + role. acceptFormats: - - string + - string title: Name uiOrder: 2 format: string required: - - content - - role + - content + - role format: object uiOrder: 0 description: List of chat messages. format: array required: - - messages + - messages uiOrder: 0 format: object parameter: @@ -138,7 +135,7 @@ TASK_CHAT: description: The maximum number of tokens for model to generate. shortDescription: The maximum number of tokens for model to generate acceptFormats: - - integer + - integer default: 50 uiOrder: 0 format: integer @@ -147,18 +144,16 @@ TASK_CHAT: description: The seed, default is 0. shortDescription: The seed, default is 0 acceptFormats: - - integer + - integer default: 0 uiOrder: 1 format: integer n: title: Number of Choices - description: How many chat completion choices to generate for each input - message. - shortDescription: How many chat completion choices to generate for each - input message. + description: How many chat completion choices to generate for each input message. + shortDescription: How many chat completion choices to generate for each input message. acceptFormats: - - integer + - integer default: 1 uiOrder: 2 format: integer @@ -167,30 +162,27 @@ TASK_CHAT: description: The temperature for sampling. shortDescription: The temperature for sampling acceptFormats: - - number + - number default: 0.7 uiOrder: 3 format: number top-p: title: Top P - description: An alternative to sampling with temperature, called nucleus - sampling, where the model considers the results of the tokens with top_p - probability mass. So 0.1 means only the tokens comprising the top 10% - probability mass are considered. We generally recommend altering this - or temperature but not both. + description: An alternative to sampling with temperature, called nucleus sampling, where the model considers the results of the tokens with + top_p probability mass. So 0.1 means only the tokens comprising the top 10% probability mass are considered. We generally recommend altering + this or temperature but not both. shortDescription: Nucleus sampling acceptFormats: - - number + - number default: 1 uiOrder: 4 format: number stream: title: Stream - description: If set, partial message deltas will be sent. Tokens will - be sent as data-only server-sent events as they become available. + description: If set, partial message deltas will be sent. Tokens will be sent as data-only server-sent events as they become available. shortDescription: If set, partial message deltas will be sent acceptFormats: - - boolean + - boolean default: false uiOrder: 5 format: boolean @@ -199,7 +191,7 @@ TASK_CHAT: title: Input Parameter format: object required: - - data + - data format: object output: title: Chat output @@ -250,22 +242,20 @@ TASK_CHAT: format: object created: title: Created - description: The Unix timestamp (in seconds) of when the chat completion - was created. - shortDescription: The Unix timestamp (in seconds) of when the chat - completion was created. + description: The Unix timestamp (in seconds) of when the chat completion was created. + shortDescription: The Unix timestamp (in seconds) of when the chat completion was created. uiOrder: 3 format: integer required: - - finish-reason - - index - - message - - created + - finish-reason + - index + - message + - created format: object uiOrder: 0 format: array required: - - choices + - choices uiOrder: 0 title: Output Data format: object @@ -291,16 +281,14 @@ TASK_CHAT: format: integer total-tokens: title: Total Tokens - description: Total number of tokens used in the request (prompt + - completion). - shortDescription: Total number of tokens used in the request (prompt - + completion). + description: Total number of tokens used in the request (prompt + completion). + shortDescription: Total number of tokens used in the request (prompt + completion). uiOrder: 2 format: integer required: - - completion-tokens - - prompt-tokens - - total-tokens + - completion-tokens + - prompt-tokens + - total-tokens uiOrder: 0 title: Usage format: object @@ -309,5 +297,5 @@ TASK_CHAT: uiOrder: 1 format: object required: - - data + - data format: object diff --git a/pkg/component/application/asana/v0/config/definition.yaml b/pkg/component/application/asana/v0/config/definition.yaml index 1e4c742e5..866d0f557 100644 --- a/pkg/component/application/asana/v0/config/definition.yaml +++ b/pkg/component/application/asana/v0/config/definition.yaml @@ -1,8 +1,8 @@ availableTasks: -- TASK_CRUD_GOAL -- TASK_CRUD_TASK -- TASK_CRUD_PROJECT -- TASK_CRUD_PORTFOLIO + - 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/asana/v0/config/setup.yaml b/pkg/component/application/asana/v0/config/setup.yaml index afd1e0fee..83900adf5 100644 --- a/pkg/component/application/asana/v0/config/setup.yaml +++ b/pkg/component/application/asana/v0/config/setup.yaml @@ -1,15 +1,14 @@ additionalProperties: false properties: token: - description: Fill in your Asana Personal Access Token (PAT). You can generate - one from developer console. + description: Fill in your Asana Personal Access Token (PAT). You can generate one from developer console. acceptFormats: - - string + - string instillSecret: true uiOrder: 0 title: Token format: string required: -- token + - token title: Asana Connection format: object diff --git a/pkg/component/application/asana/v0/config/tasks.yaml b/pkg/component/application/asana/v0/config/tasks.yaml index 7cec4bdd2..b896d4596 100644 --- a/pkg/component/application/asana/v0/config/tasks.yaml +++ b/pkg/component/application/asana/v0/config/tasks.yaml @@ -11,228 +11,217 @@ TASK_CRUD_GOAL: uiOrder: 1 additionalProperties: true required: - - action - oneOf: - - properties: - action: - title: Action - const: get - description: Get Goal. - uiOrder: 0 - format: string - goal-gid: - description: Globally unique identifier (GID) for the goal. You can - find the GID of a goal from the URL of the goal in Asana. For example, - if the URL of the goal is https://app.asana.com/0/goal/1234567890, - then the GID is 1234567890. - shortDescription: Goal ID - uiOrder: 0 - title: Goal ID - acceptFormats: - - string - format: string - required: - - action - - goal-gid - title: Get - description: Get Goal. - uiOrder: 0 - format: object - - properties: - action: - title: Action - const: update - description: Update Goal. - uiOrder: 0 - format: string - goal-gid: - description: Globally unique identifier (GID) for the goal. You can - find the GID of a goal from the URL of the goal in Asana. For example, - if the URL of the goal is https://app.asana.com/0/goal/1234567890, - then the GID is 1234567890. - shortDescription: Goal ID - uiOrder: 0 - title: Goal ID - acceptFormats: - - string - format: string - name: - description: The name of the goal. - shortDescription: Update Goal Name - uiOrder: 1 - title: Goal Name - acceptFormats: - - string - format: string - notes: - description: The notes of the goal. - shortDescription: Update Goal Note - uiOrder: 2 - title: Goal Note - acceptFormats: - - string - format: string - due-on: - description: The date on which the goal is due. In the format YYYY-MM-DD. - shortDescription: Update Due Date - uiOrder: 2 - title: Due Date - acceptFormats: - - string - format: string - start-on: - description: The date on which the goal starts. In the format YYYY-MM-DD. - shortDescription: Update Start Date - uiOrder: 3 - title: Start Date - acceptFormats: - - string - format: string - liked: - description: Whether the goal is liked by the user. - shortDescription: Liked - uiOrder: 4 - title: Liked - acceptFormats: - - boolean - format: boolean - status: - description: The current status of this goal. When the goal is open, - its status can be green, yellow, and red to reflect "On Track", "At - Risk", and "Off Track", respectively. When the goal is closed, the - value can be missed, achieved, partial, or dropped. - shortDescription: Update Status - uiOrder: 5 - enum: - - green - - yellow - - red - - missed - - achieved - - partial - - dropped - title: Status - acceptFormats: - - string - format: string - required: - - action - - goal-gid - - liked - title: Update - description: Update Goal. - uiOrder: 0 - format: object - - properties: - action: - title: Action - const: delete - uiOrder: 0 - description: Delete goal. - format: string - goal-gid: - description: Globally unique identifier (GID) for the goal. You can - find the GID of a goal from the URL of the goal in Asana. For example, - if the URL of the goal is https://app.asana.com/0/goal/1234567890, - then the GID is 1234567890. - shortDescription: Goal ID - uiOrder: 0 - title: Goal ID - acceptFormats: - - string - format: string - required: - - action - - goal-gid - title: Delete - description: Delete Goal. - uiOrder: 0 - format: object - - properties: - action: - title: Action - const: create - description: Create Goal. - uiOrder: 0 - format: string - name: - description: The name of the goal. - shortDescription: Goal Name - uiOrder: 1 - title: Goal Name - acceptFormats: - - string - format: string - notes: - description: The notes of the goal. - shortDescription: Goal Note - uiOrder: 2 - title: Goal Note - acceptFormats: - - string - format: string - due-on: - description: The date on which the goal is due. In the format YYYY-MM-DD. - shortDescription: Due Date - uiOrder: 2 - title: Due Date - acceptFormats: - - string - format: string - start-on: - description: The date on which the goal starts. In the format YYYY-MM-DD. - shortDescription: Start Date - uiOrder: 3 - title: Start Date - acceptFormats: - - string - format: string - liked: - description: Whether the goal is liked by the user. - shortDescription: Liked - uiOrder: 4 - title: Liked - acceptFormats: - - boolean - format: boolean - workspace: - description: GID of the workspace. You can find one by filling the - access token in the Asana - API Playground. - shortDescription: GID of the workspace - uiOrder: 5 - title: Workspace - acceptFormats: - - string - format: string - time-period: - description: GID of the time period. You can find one by filling the - workspace id in the Asana - API Playground. - shortDescription: Time Period - uiOrder: 6 - title: Time Period - acceptFormats: - - string - format: string - owner: - description: User GID of the Owner. You can find one by filling the - workspace id in the Asana - API Playground. - shortDescription: Owner - uiOrder: 7 - title: Owner - acceptFormats: - - string - format: string - required: - action - - name - - liked - title: Create - description: Create Goal. - uiOrder: 0 - format: object + oneOf: + - properties: + action: + title: Action + const: get + description: Get Goal. + uiOrder: 0 + format: string + goal-gid: + description: Globally unique identifier (GID) for the goal. You can find the GID of a goal from the URL of the goal in Asana. For example, + if the URL of the goal is https://app.asana.com/0/goal/1234567890, then the GID is 1234567890. + shortDescription: Goal ID + uiOrder: 0 + title: Goal ID + acceptFormats: + - string + format: string + required: + - action + - goal-gid + title: Get + description: Get Goal. + uiOrder: 0 + format: object + - properties: + action: + title: Action + const: update + description: Update Goal. + uiOrder: 0 + format: string + goal-gid: + description: Globally unique identifier (GID) for the goal. You can find the GID of a goal from the URL of the goal in Asana. For example, + if the URL of the goal is https://app.asana.com/0/goal/1234567890, then the GID is 1234567890. + shortDescription: Goal ID + uiOrder: 0 + title: Goal ID + acceptFormats: + - string + format: string + name: + description: The name of the goal. + shortDescription: Update Goal Name + uiOrder: 1 + title: Goal Name + acceptFormats: + - string + format: string + notes: + description: The notes of the goal. + shortDescription: Update Goal Note + uiOrder: 2 + title: Goal Note + acceptFormats: + - string + format: string + due-on: + description: The date on which the goal is due. In the format YYYY-MM-DD. + shortDescription: Update Due Date + uiOrder: 2 + title: Due Date + acceptFormats: + - string + format: string + start-on: + description: The date on which the goal starts. In the format YYYY-MM-DD. + shortDescription: Update Start Date + uiOrder: 3 + title: Start Date + acceptFormats: + - string + format: string + liked: + description: Whether the goal is liked by the user. + shortDescription: Liked + uiOrder: 4 + title: Liked + acceptFormats: + - boolean + format: boolean + status: + description: The current status of this goal. When the goal is open, its status can be green, yellow, and red to reflect "On Track", "At + Risk", and "Off Track", respectively. When the goal is closed, the value can be missed, achieved, partial, or dropped. + shortDescription: Update Status + uiOrder: 5 + enum: + - green + - yellow + - red + - missed + - achieved + - partial + - dropped + title: Status + acceptFormats: + - string + format: string + required: + - action + - goal-gid + - liked + title: Update + description: Update Goal. + uiOrder: 0 + format: object + - properties: + action: + title: Action + const: delete + uiOrder: 0 + description: Delete goal. + format: string + goal-gid: + description: Globally unique identifier (GID) for the goal. You can find the GID of a goal from the URL of the goal in Asana. For example, + if the URL of the goal is https://app.asana.com/0/goal/1234567890, then the GID is 1234567890. + shortDescription: Goal ID + uiOrder: 0 + title: Goal ID + acceptFormats: + - string + format: string + required: + - action + - goal-gid + title: Delete + description: Delete Goal. + uiOrder: 0 + format: object + - properties: + action: + title: Action + const: create + description: Create Goal. + uiOrder: 0 + format: string + name: + description: The name of the goal. + shortDescription: Goal Name + uiOrder: 1 + title: Goal Name + acceptFormats: + - string + format: string + notes: + description: The notes of the goal. + shortDescription: Goal Note + uiOrder: 2 + title: Goal Note + acceptFormats: + - string + format: string + due-on: + description: The date on which the goal is due. In the format YYYY-MM-DD. + shortDescription: Due Date + uiOrder: 2 + title: Due Date + acceptFormats: + - string + format: string + start-on: + description: The date on which the goal starts. In the format YYYY-MM-DD. + shortDescription: Start Date + uiOrder: 3 + title: Start Date + acceptFormats: + - string + format: string + liked: + description: Whether the goal is liked by the user. + shortDescription: Liked + uiOrder: 4 + title: Liked + acceptFormats: + - boolean + format: boolean + workspace: + description: GID of the workspace. You can find one by filling the access token in the Asana + API Playground. + shortDescription: GID of the workspace + uiOrder: 5 + title: Workspace + acceptFormats: + - string + format: string + time-period: + description: GID of the time period. You can find one by filling the workspace id in the Asana + API Playground. + shortDescription: Time Period + uiOrder: 6 + title: Time Period + acceptFormats: + - string + format: string + owner: + description: User GID of the Owner. You can find one by filling the workspace id in the Asana + API Playground. + shortDescription: Owner + uiOrder: 7 + title: Owner + acceptFormats: + - string + format: string + required: + - action + - name + - liked + title: Create + description: Create Goal. + uiOrder: 0 + format: object format: object required: [] title: Input @@ -272,8 +261,8 @@ TASK_CRUD_GOAL: title: Owner Name format: string required: - - gid - - name + - gid + - name format: object notes: description: The notes of the goal. @@ -331,9 +320,9 @@ TASK_CRUD_GOAL: title: User Name format: string required: - - like-gid - - user-gid - - name + - like-gid + - user-gid + - name format: object format: array required: [] @@ -353,479 +342,467 @@ TASK_CRUD_TASK: uiOrder: 1 additionalProperties: true required: - - action - oneOf: - - properties: - action: - title: Action - const: get - description: Get Task. - uiOrder: 0 - format: string - task-gid: - description: Globally unique identifier (GID) for the task. - shortDescription: Task ID - uiOrder: 0 - title: Task ID - acceptFormats: - - string - format: string - required: - - action - - task-gid - title: Get - description: Get Task. - uiOrder: 0 - format: object - - properties: - action: - title: Action - const: update - description: Update Task. - uiOrder: 0 - format: string - task-gid: - description: Globally unique identifier (GID) for the task. - shortDescription: Task ID - uiOrder: 0 - title: Task ID - acceptFormats: - - string - format: string - name: - description: 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. - shortDescription: Name of the task - uiOrder: 1 - title: Name of the task - acceptFormats: - - string - format: string - resource-subtype: - description: 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. - shortDescription: The subtype of this resource - uiOrder: 2 - title: Resource Subtype - enum: - - default_task - - milestone - - section - - approval - - custom - acceptFormats: - - string - format: string - approval-status: - description: The approval status of the task. If you set completed to - true, this field will be set to approved. - shortDescription: The approval status of the task - uiOrder: 3 - title: Approval Status - enum: - - pending - - approved - - rejected - - changes_requested - acceptFormats: - - string - format: string - completed: - description: Whether the task is currently marked complete. - shortDescription: Whether the task is currently marked complete - uiOrder: 4 - title: Completed - acceptFormats: - - boolean - format: boolean - liked: - description: Whether the task is liked by the user. - shortDescription: Whether the task is liked by the user - uiOrder: 5 - title: Liked - acceptFormats: - - boolean - format: boolean - notes: - description: Free-form textual information associated with the task - (i.e. its description). - shortDescription: Notes of the task - uiOrder: 6 - title: Notes of the task - acceptFormats: - - string - format: string - assignee: - description: GID of the assignee. - shortDescription: GID of the assignee - uiOrder: 7 - title: Assignee - acceptFormats: - - string - format: string - parent: - description: GID of the parent task. - shortDescription: GID of the parent task - uiOrder: 8 - title: Parent Task - acceptFormats: - - string - format: string - required: - action - - task-gid - - liked - description: Update Task. - uiOrder: 0 - title: Update - format: object - - properties: - action: - title: Action - const: delete - description: Delete Task. - uiOrder: 0 - format: string - task-gid: - description: Globally unique identifier (GID) for the task. - shortDescription: Task ID - uiOrder: 0 - title: Task ID - acceptFormats: - - string - format: string - required: - - action - - task-gid - description: Delete Task. - uiOrder: 0 - title: Delete - format: object - - properties: - action: - title: Action - const: create - description: Create Task. - uiOrder: 0 - format: string - name: - description: The name of the task. - shortDescription: Task Name - uiOrder: 1 - title: Task Name - acceptFormats: - - string - format: string - notes: - description: The notes of the task. - shortDescription: Task Notes - uiOrder: 2 - title: Task Notes - acceptFormats: - - string - format: string - resource-subtype: - default: default_task - description: 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. - shortDescription: The subtype of this resource - uiOrder: 2 - title: Resource Subtype - enum: - - default_task - - milestone - - section - - approval - - custom - acceptFormats: - - string - format: string - approval-status: - description: The approval status of the task. If you set completed to - true, this field will be set to approved. - shortDescription: The approval status of the task - uiOrder: 3 - title: Approval Status - enum: - - pending - - approved - - rejected - - changes_requested - acceptFormats: - - string - format: string - completed: - description: Whether the task is currently marked complete. - shortDescription: Whether the task is currently marked complete - uiOrder: 4 - title: Completed - acceptFormats: - - boolean - format: boolean - liked: - description: Whether the task is liked by the user. - shortDescription: Whether the task is liked by the user - uiOrder: 5 - title: Liked - acceptFormats: - - boolean - format: boolean - assignee: - description: GID of the assignee. - shortDescription: GID of the assignee - uiOrder: 7 - title: Assignee - acceptFormats: - - string - format: string - parent: - description: GID of the parent task. - shortDescription: GID of the parent task - uiOrder: 8 - title: Parent Task - acceptFormats: - - string - format: string - start-at: - description: 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. - shortDescription: Start Date & Time. In format like 2021-09-01T00:00:00Z - uiOrder: 9 - title: Start Date & Time - acceptFormats: - - string - format: string - due-at: - description: 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. - shortDescription: Due Date & Time. In format like 2021-09-01T00:00:00Z - uiOrder: 10 - title: Due Date & Time - acceptFormats: - - string - format: string - workspace: - description: GID of the workspace. You can find one by filling the - access token in the Asana - API Playground. - shortDescription: GID of the workspace - uiOrder: 11 - title: Workspace - acceptFormats: - - string - format: string - required: - - action - - workspace - - name - - liked - description: Create Task. - uiOrder: 0 - title: Create - format: object - - properties: - action: - title: Action - const: duplicate - description: Duplicate Task. - uiOrder: 0 - format: string - task-gid: - description: Globally unique identifier (GID) for the task. - shortDescription: Task ID - uiOrder: 0 - title: Task ID - acceptFormats: - - string - format: string - name: - description: 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. - shortDescription: Name of the new task - uiOrder: 1 - title: Name - acceptFormats: - - string - format: string - required: - - action - - task-gid - - name - description: Duplicate Task. - uiOrder: 0 - title: Duplicate - format: object - - properties: - action: - title: Action - const: set parent - description: Set Parent Task. - uiOrder: 0 - format: string - task-gid: - description: Globally unique identifier (GID) for the task. - shortDescription: Task ID - uiOrder: 0 - title: Task ID - acceptFormats: - - string - format: string - parent: - description: GID of the parent task. - shortDescription: GID of the parent task - uiOrder: 1 - title: Parent Task - acceptFormats: - - string - format: string - required: - - action - - task-gid - - parent - description: Set Parent Task. - uiOrder: 0 - title: Set Parent - format: object - - properties: - action: - title: Action - const: edit tag - description: Edit Tag. - uiOrder: 0 - format: string - task-gid: - description: Globally unique identifier (GID) for the task. - shortDescription: Task ID - uiOrder: 0 - title: Task ID - acceptFormats: - - string - format: string - tag-gid: - description: Globally unique identifier (GID) for the tag. - shortDescription: Tag ID - uiOrder: 1 - title: Tag ID - acceptFormats: - - string - format: string - edit-option: - default: add - description: Edit option. You can choose to add or remove the tag. - shortDescription: Edit option - uiOrder: 2 - title: Edit option - enum: - - add - - remove - acceptFormats: - - string - format: string - required: - - action - - task-gid - - tag-gid - - edit-option - description: Edit Tag. - uiOrder: 0 - title: Edit Tag - format: object - - properties: - action: - title: Action - const: edit follower - description: Edit follower. - uiOrder: 0 - format: string - task-gid: - description: Globally unique identifier (GID) for the task. - shortDescription: Task ID - uiOrder: 0 - title: Task ID - acceptFormats: - - string - format: string - followers: - description: This can either be the string "me", an email, or the gid - of a user. For multiple followers, separate them with commas. - shortDescription: Followers' Identifications, can either be the string - "me", an email, or the gid of a user. - uiOrder: 1 - title: Followers - acceptFormats: - - string - format: string - edit-option: - default: add - description: Edit option. You can choose to add or remove the follower. - shortDescription: Edit option - uiOrder: 2 - title: Edit option - enum: - - add - - remove - acceptFormats: - - string - format: string - required: - - action - - task-gid - - followers - - edit-option - description: Edit Follower. - uiOrder: 0 - title: Edit Follower - format: object - - properties: - action: - title: Action - const: edit project - description: Edit project. - uiOrder: 0 - format: string - task-gid: - description: Globally unique identifier (GID) for the task. - shortDescription: Task ID - uiOrder: 0 - title: Task ID - acceptFormats: - - string - format: string - project-gid: - description: Globally unique identifier (GID) for the project. - shortDescription: Project ID - uiOrder: 1 - title: Project ID - acceptFormats: - - string - format: string - edit-option: - default: add - description: Edit option. You can choose to add or remove the project. - shortDescription: Edit option - uiOrder: 2 - title: Edit option - enum: - - add - - remove - acceptFormats: - - string - format: string - required: - - action - - task-gid - - project-gid - - edit-option - description: Edit Project. - uiOrder: 0 - title: Edit Project - format: object + oneOf: + - properties: + action: + title: Action + const: get + description: Get Task. + uiOrder: 0 + format: string + task-gid: + description: Globally unique identifier (GID) for the task. + shortDescription: Task ID + uiOrder: 0 + title: Task ID + acceptFormats: + - string + format: string + required: + - action + - task-gid + title: Get + description: Get Task. + uiOrder: 0 + format: object + - properties: + action: + title: Action + const: update + description: Update Task. + uiOrder: 0 + format: string + task-gid: + description: Globally unique identifier (GID) for the task. + shortDescription: Task ID + uiOrder: 0 + title: Task ID + acceptFormats: + - string + format: string + name: + description: 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. + shortDescription: Name of the task + uiOrder: 1 + title: Name of the task + acceptFormats: + - string + format: string + resource-subtype: + description: 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. + shortDescription: The subtype of this resource + uiOrder: 2 + title: Resource Subtype + enum: + - default_task + - milestone + - section + - approval + - custom + acceptFormats: + - string + format: string + approval-status: + description: The approval status of the task. If you set completed to true, this field will be set to approved. + shortDescription: The approval status of the task + uiOrder: 3 + title: Approval Status + enum: + - pending + - approved + - rejected + - changes_requested + acceptFormats: + - string + format: string + completed: + description: Whether the task is currently marked complete. + shortDescription: Whether the task is currently marked complete + uiOrder: 4 + title: Completed + acceptFormats: + - boolean + format: boolean + liked: + description: Whether the task is liked by the user. + shortDescription: Whether the task is liked by the user + uiOrder: 5 + title: Liked + acceptFormats: + - boolean + format: boolean + notes: + description: Free-form textual information associated with the task (i.e. its description). + shortDescription: Notes of the task + uiOrder: 6 + title: Notes of the task + acceptFormats: + - string + format: string + assignee: + description: GID of the assignee. + shortDescription: GID of the assignee + uiOrder: 7 + title: Assignee + acceptFormats: + - string + format: string + parent: + description: GID of the parent task. + shortDescription: GID of the parent task + uiOrder: 8 + title: Parent Task + acceptFormats: + - string + format: string + required: + - action + - task-gid + - liked + description: Update Task. + uiOrder: 0 + title: Update + format: object + - properties: + action: + title: Action + const: delete + description: Delete Task. + uiOrder: 0 + format: string + task-gid: + description: Globally unique identifier (GID) for the task. + shortDescription: Task ID + uiOrder: 0 + title: Task ID + acceptFormats: + - string + format: string + required: + - action + - task-gid + description: Delete Task. + uiOrder: 0 + title: Delete + format: object + - properties: + action: + title: Action + const: create + description: Create Task. + uiOrder: 0 + format: string + name: + description: The name of the task. + shortDescription: Task Name + uiOrder: 1 + title: Task Name + acceptFormats: + - string + format: string + notes: + description: The notes of the task. + shortDescription: Task Notes + uiOrder: 2 + title: Task Notes + acceptFormats: + - string + format: string + resource-subtype: + default: default_task + description: 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. + shortDescription: The subtype of this resource + uiOrder: 2 + title: Resource Subtype + enum: + - default_task + - milestone + - section + - approval + - custom + acceptFormats: + - string + format: string + approval-status: + description: The approval status of the task. If you set completed to true, this field will be set to approved. + shortDescription: The approval status of the task + uiOrder: 3 + title: Approval Status + enum: + - pending + - approved + - rejected + - changes_requested + acceptFormats: + - string + format: string + completed: + description: Whether the task is currently marked complete. + shortDescription: Whether the task is currently marked complete + uiOrder: 4 + title: Completed + acceptFormats: + - boolean + format: boolean + liked: + description: Whether the task is liked by the user. + shortDescription: Whether the task is liked by the user + uiOrder: 5 + title: Liked + acceptFormats: + - boolean + format: boolean + assignee: + description: GID of the assignee. + shortDescription: GID of the assignee + uiOrder: 7 + title: Assignee + acceptFormats: + - string + format: string + parent: + description: GID of the parent task. + shortDescription: GID of the parent task + uiOrder: 8 + title: Parent Task + acceptFormats: + - string + format: string + start-at: + description: 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. + shortDescription: Start Date & Time. In format like 2021-09-01T00:00:00Z + uiOrder: 9 + title: Start Date & Time + acceptFormats: + - string + format: string + due-at: + description: 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. + shortDescription: Due Date & Time. In format like 2021-09-01T00:00:00Z + uiOrder: 10 + title: Due Date & Time + acceptFormats: + - string + format: string + workspace: + description: GID of the workspace. You can find one by filling the access token in the Asana + API Playground. + shortDescription: GID of the workspace + uiOrder: 11 + title: Workspace + acceptFormats: + - string + format: string + required: + - action + - workspace + - name + - liked + description: Create Task. + uiOrder: 0 + title: Create + format: object + - properties: + action: + title: Action + const: duplicate + description: Duplicate Task. + uiOrder: 0 + format: string + task-gid: + description: Globally unique identifier (GID) for the task. + shortDescription: Task ID + uiOrder: 0 + title: Task ID + acceptFormats: + - string + format: string + name: + description: 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. + shortDescription: Name of the new task + uiOrder: 1 + title: Name + acceptFormats: + - string + format: string + required: + - action + - task-gid + - name + description: Duplicate Task. + uiOrder: 0 + title: Duplicate + format: object + - properties: + action: + title: Action + const: set parent + description: Set Parent Task. + uiOrder: 0 + format: string + task-gid: + description: Globally unique identifier (GID) for the task. + shortDescription: Task ID + uiOrder: 0 + title: Task ID + acceptFormats: + - string + format: string + parent: + description: GID of the parent task. + shortDescription: GID of the parent task + uiOrder: 1 + title: Parent Task + acceptFormats: + - string + format: string + required: + - action + - task-gid + - parent + description: Set Parent Task. + uiOrder: 0 + title: Set Parent + format: object + - properties: + action: + title: Action + const: edit tag + description: Edit Tag. + uiOrder: 0 + format: string + task-gid: + description: Globally unique identifier (GID) for the task. + shortDescription: Task ID + uiOrder: 0 + title: Task ID + acceptFormats: + - string + format: string + tag-gid: + description: Globally unique identifier (GID) for the tag. + shortDescription: Tag ID + uiOrder: 1 + title: Tag ID + acceptFormats: + - string + format: string + edit-option: + default: add + description: Edit option. You can choose to add or remove the tag. + shortDescription: Edit option + uiOrder: 2 + title: Edit option + enum: + - add + - remove + acceptFormats: + - string + format: string + required: + - action + - task-gid + - tag-gid + - edit-option + description: Edit Tag. + uiOrder: 0 + title: Edit Tag + format: object + - properties: + action: + title: Action + const: edit follower + description: Edit follower. + uiOrder: 0 + format: string + task-gid: + description: Globally unique identifier (GID) for the task. + shortDescription: Task ID + uiOrder: 0 + title: Task ID + acceptFormats: + - string + format: string + followers: + description: This can either be the string "me", an email, or the gid of a user. For multiple followers, separate them with commas. + shortDescription: Followers' Identifications, can either be the string "me", an email, or the gid of a user. + uiOrder: 1 + title: Followers + acceptFormats: + - string + format: string + edit-option: + default: add + description: Edit option. You can choose to add or remove the follower. + shortDescription: Edit option + uiOrder: 2 + title: Edit option + enum: + - add + - remove + acceptFormats: + - string + format: string + required: + - action + - task-gid + - followers + - edit-option + description: Edit Follower. + uiOrder: 0 + title: Edit Follower + format: object + - properties: + action: + title: Action + const: edit project + description: Edit project. + uiOrder: 0 + format: string + task-gid: + description: Globally unique identifier (GID) for the task. + shortDescription: Task ID + uiOrder: 0 + title: Task ID + acceptFormats: + - string + format: string + project-gid: + description: Globally unique identifier (GID) for the project. + shortDescription: Project ID + uiOrder: 1 + title: Project ID + acceptFormats: + - string + format: string + edit-option: + default: add + description: Edit option. You can choose to add or remove the project. + shortDescription: Edit option + uiOrder: 2 + title: Edit option + enum: + - add + - remove + acceptFormats: + - string + format: string + required: + - action + - task-gid + - project-gid + - edit-option + description: Edit Project. + uiOrder: 0 + title: Edit Project + format: object format: object required: [] title: Input @@ -878,8 +855,8 @@ TASK_CRUD_TASK: title: Project Name format: string required: - - gid - - name + - gid + - name format: object format: array due-on: @@ -926,21 +903,19 @@ TASK_CRUD_TASK: title: User Name format: string required: - - like-gid - - user-gid - - name + - like-gid + - user-gid + - name format: object format: array approval-status: - description: The approval status of the task. If you set completed to true, - this field will be set to approved. + description: The approval status of the task. If you set completed to true, this field will be set to approved. shortDescription: The approval status of the task uiOrder: 8 title: Approval Status format: string resource-subtype: - description: The subtype of this resource. Different subtypes retain many - of the same fields and behavior, but may render differently in Asana or + description: 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. shortDescription: The subtype of this resource uiOrder: 9 @@ -980,337 +955,327 @@ TASK_CRUD_PROJECT: uiOrder: 1 additionalProperties: true required: - - action - oneOf: - - properties: - action: - title: Action - const: get - description: Get Project. - uiOrder: 0 - format: string - project-gid: - description: Globally unique identifier (GID) for the project. - shortDescription: Project ID - uiOrder: 0 - title: Project ID - acceptFormats: - - string - format: string - required: - - action - - project-gid - description: Get Project. - uiOrder: 0 - title: Get - format: object - - properties: - action: - title: Action - const: update - description: Update Project. - uiOrder: 0 - format: string - project-gid: - description: Globally unique identifier (GID) for the project. - shortDescription: Project ID - uiOrder: 0 - title: Project ID - acceptFormats: - - string - format: string - name: - description: The name of the project. - shortDescription: Update Project Name - uiOrder: 1 - title: Project Name - acceptFormats: - - string - format: string - notes: - description: The notes of the project. - shortDescription: Update Project Note - uiOrder: 2 - title: Project Note - acceptFormats: - - string - format: string - due-on: - description: The date on which the project is due. In the format YYYY-MM-DD. - shortDescription: Update Due Date - uiOrder: 2 - title: Due Date - acceptFormats: - - string - format: string - start-on: - description: The date on which the project starts. In the format YYYY-MM-DD. - shortDescription: Update Start Date - uiOrder: 3 - title: Start Date - acceptFormats: - - string - format: string - color: - description: The color of the project. - shortDescription: Update Color - uiOrder: 5 - enum: - - 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' - title: Update Color - acceptFormats: - - string - format: string - privacy-setting: - description: The privacy setting of the project. - shortDescription: Update Privacy Setting - uiOrder: 6 - title: Update Privacy Setting - enum: - - public to workspace - - private to team - - private - acceptFormats: - - string - format: string - archived: - description: Whether the project is archived. - shortDescription: Whether the project is archived - uiOrder: 7 - title: Archived - acceptFormats: - - boolean - format: boolean - required: - - action - - project-gid - - archived - description: Update Project. - uiOrder: 0 - title: Update - format: object - - properties: - action: - title: Action - const: delete - description: Delete project. - uiOrder: 0 - format: string - project-gid: - description: Globally unique identifier (GID) for the project. - shortDescription: Project ID - uiOrder: 0 - title: Project ID - acceptFormats: - - string - format: string - required: - - action - - project-gid - description: Delete Project. - uiOrder: 0 - title: Delete - format: object - - properties: - action: - title: Action - const: create - description: Create project. - uiOrder: 0 - format: string - name: - description: The name of the project. - shortDescription: Update Project Name - uiOrder: 1 - title: Project Name - acceptFormats: - - string - format: string - notes: - description: The notes of the project. - shortDescription: Update Project Note - uiOrder: 2 - title: Project Note - acceptFormats: - - string - format: string - due-on: - description: The date on which the project is due. In the format YYYY-MM-DD. - shortDescription: Update Due Date - uiOrder: 2 - title: Due Date - acceptFormats: - - string - format: string - start-on: - description: The date on which the project starts. In the format YYYY-MM-DD. - shortDescription: Update Start Date - uiOrder: 3 - title: Start Date - acceptFormats: - - string - format: string - color: - description: The color of the project. - shortDescription: Update Color - uiOrder: 5 - enum: - - 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' - title: Update Color - acceptFormats: - - string - format: string - privacy-setting: - description: The privacy setting of the project. - shortDescription: Update Privacy Setting - uiOrder: 6 - title: Update Privacy Setting - enum: - - public to workspace - - private to team - - private - acceptFormats: - - string - format: string - workspace: - description: Globally unique identifier (GID) for the workspace. You - can find one by filling the access token in the Asana - API Playground. - shortDescription: Workspace ID - uiOrder: 7 - title: Workspace ID - acceptFormats: - - string - format: string - team: - description: Globally unique identifier (GID) for the team of the new - project. - shortDescription: Team ID of the new project - uiOrder: 8 - title: Team ID - acceptFormats: - - string - format: string - required: - - action - - name - description: Create Project. - uiOrder: 0 - title: Create - format: object - - properties: - action: - title: Action - const: duplicate - description: Duplicate project. - uiOrder: 0 - format: string - project-gid: - description: Globally unique identifier (GID) for the project. You can - find the GID of a goal from the URL of the project in Asana. For example, - if the URL of the project is https://app.asana.com/0/goal/1234567890, - then the GID is 1234567890. - shortDescription: Project ID - uiOrder: 0 - title: Project ID - acceptFormats: - - string - format: string - name: - description: The name of the new project. - shortDescription: New Project Name - uiOrder: 1 - title: New Project Name - acceptFormats: - - string - format: string - team: - description: Globally unique identifier (GID) for the team of the new - project. If team is not defined, the new project will be in the same - team as the the original project. - shortDescription: Team ID of the new project - uiOrder: 2 - title: Team ID - acceptFormats: - - string - format: string - due-on: - description: Sets the last due date in the duplicated project to the - given date. The rest of the due dates will be offset by the same amount - as the due dates in the original project. In the format YYYY-MM-DD. - shortDescription: Due Date (You should only specify exactly one of due-on - or start-on) - uiOrder: 3 - title: Due Date - acceptFormats: - - string - format: string - start-on: - description: Sets the first start date in the duplicated project to - the given date. The rest of the start dates will be offset by the - same amount as the start dates in the original project. In the format - YYYY-MM-DD. - shortDescription: Start Date (You should only specify exactly one of - due-on or start-on) - uiOrder: 4 - title: Start Date - acceptFormats: - - string - format: string - should-skip-weekends: - description: Determines if the auto-shifted dates should skip weekends. - shortDescription: Determines if the auto-shifted dates should skip weekends. - uiOrder: 5 - title: Should Skip Weekends (For auto-shifted dates) - acceptFormats: - - boolean - format: boolean - required: - action - - project-gid - - name - description: Duplicate Project. - uiOrder: 0 - title: Duplicate - format: object + oneOf: + - properties: + action: + title: Action + const: get + description: Get Project. + uiOrder: 0 + format: string + project-gid: + description: Globally unique identifier (GID) for the project. + shortDescription: Project ID + uiOrder: 0 + title: Project ID + acceptFormats: + - string + format: string + required: + - action + - project-gid + description: Get Project. + uiOrder: 0 + title: Get + format: object + - properties: + action: + title: Action + const: update + description: Update Project. + uiOrder: 0 + format: string + project-gid: + description: Globally unique identifier (GID) for the project. + shortDescription: Project ID + uiOrder: 0 + title: Project ID + acceptFormats: + - string + format: string + name: + description: The name of the project. + shortDescription: Update Project Name + uiOrder: 1 + title: Project Name + acceptFormats: + - string + format: string + notes: + description: The notes of the project. + shortDescription: Update Project Note + uiOrder: 2 + title: Project Note + acceptFormats: + - string + format: string + due-on: + description: The date on which the project is due. In the format YYYY-MM-DD. + shortDescription: Update Due Date + uiOrder: 2 + title: Due Date + acceptFormats: + - string + format: string + start-on: + description: The date on which the project starts. In the format YYYY-MM-DD. + shortDescription: Update Start Date + uiOrder: 3 + title: Start Date + acceptFormats: + - string + format: string + color: + description: The color of the project. + shortDescription: Update Color + uiOrder: 5 + enum: + - 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' + title: Update Color + acceptFormats: + - string + format: string + privacy-setting: + description: The privacy setting of the project. + shortDescription: Update Privacy Setting + uiOrder: 6 + title: Update Privacy Setting + enum: + - public to workspace + - private to team + - private + acceptFormats: + - string + format: string + archived: + description: Whether the project is archived. + shortDescription: Whether the project is archived + uiOrder: 7 + title: Archived + acceptFormats: + - boolean + format: boolean + required: + - action + - project-gid + - archived + description: Update Project. + uiOrder: 0 + title: Update + format: object + - properties: + action: + title: Action + const: delete + description: Delete project. + uiOrder: 0 + format: string + project-gid: + description: Globally unique identifier (GID) for the project. + shortDescription: Project ID + uiOrder: 0 + title: Project ID + acceptFormats: + - string + format: string + required: + - action + - project-gid + description: Delete Project. + uiOrder: 0 + title: Delete + format: object + - properties: + action: + title: Action + const: create + description: Create project. + uiOrder: 0 + format: string + name: + description: The name of the project. + shortDescription: Update Project Name + uiOrder: 1 + title: Project Name + acceptFormats: + - string + format: string + notes: + description: The notes of the project. + shortDescription: Update Project Note + uiOrder: 2 + title: Project Note + acceptFormats: + - string + format: string + due-on: + description: The date on which the project is due. In the format YYYY-MM-DD. + shortDescription: Update Due Date + uiOrder: 2 + title: Due Date + acceptFormats: + - string + format: string + start-on: + description: The date on which the project starts. In the format YYYY-MM-DD. + shortDescription: Update Start Date + uiOrder: 3 + title: Start Date + acceptFormats: + - string + format: string + color: + description: The color of the project. + shortDescription: Update Color + uiOrder: 5 + enum: + - 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' + title: Update Color + acceptFormats: + - string + format: string + privacy-setting: + description: The privacy setting of the project. + shortDescription: Update Privacy Setting + uiOrder: 6 + title: Update Privacy Setting + enum: + - public to workspace + - private to team + - private + acceptFormats: + - string + format: string + workspace: + description: Globally unique identifier (GID) for the workspace. You can find one by filling the access token in the Asana + API Playground. + shortDescription: Workspace ID + uiOrder: 7 + title: Workspace ID + acceptFormats: + - string + format: string + team: + description: Globally unique identifier (GID) for the team of the new project. + shortDescription: Team ID of the new project + uiOrder: 8 + title: Team ID + acceptFormats: + - string + format: string + required: + - action + - name + description: Create Project. + uiOrder: 0 + title: Create + format: object + - properties: + action: + title: Action + const: duplicate + description: Duplicate project. + uiOrder: 0 + format: string + project-gid: + description: Globally unique identifier (GID) for the project. You can find the GID of a goal from the URL of the project in Asana. For + example, if the URL of the project is https://app.asana.com/0/goal/1234567890, then the GID is 1234567890. + shortDescription: Project ID + uiOrder: 0 + title: Project ID + acceptFormats: + - string + format: string + name: + description: The name of the new project. + shortDescription: New Project Name + uiOrder: 1 + title: New Project Name + acceptFormats: + - string + format: string + team: + description: Globally unique identifier (GID) for the team of the new project. If team is not defined, the new project will be in the same + team as the the original project. + shortDescription: Team ID of the new project + uiOrder: 2 + title: Team ID + acceptFormats: + - string + format: string + due-on: + description: Sets the last due date in the duplicated project to the given date. The rest of the due dates will be offset by the same amount + as the due dates in the original project. In the format YYYY-MM-DD. + shortDescription: Due Date (You should only specify exactly one of due-on or start-on) + uiOrder: 3 + title: Due Date + acceptFormats: + - string + format: string + start-on: + description: Sets the first start date in the duplicated project to the given date. The rest of the start dates will be offset by the same + amount as the start dates in the original project. In the format YYYY-MM-DD. + shortDescription: Start Date (You should only specify exactly one of due-on or start-on) + uiOrder: 4 + title: Start Date + acceptFormats: + - string + format: string + should-skip-weekends: + description: Determines if the auto-shifted dates should skip weekends. + shortDescription: Determines if the auto-shifted dates should skip weekends. + uiOrder: 5 + title: Should Skip Weekends (For auto-shifted dates) + acceptFormats: + - boolean + format: boolean + required: + - action + - project-gid + - name + description: Duplicate Project. + uiOrder: 0 + title: Duplicate + format: object format: object required: [] title: Input @@ -1350,8 +1315,8 @@ TASK_CRUD_PROJECT: title: Owner Name format: string required: - - gid - - name + - gid + - name format: object notes: description: The notes of the project. @@ -1420,8 +1385,8 @@ TASK_CRUD_PROJECT: title: User Name format: string required: - - gid - - name + - gid + - name format: object current-status: description: The current status of the project. @@ -1478,198 +1443,196 @@ TASK_CRUD_PORTFOLIO: uiOrder: 1 additionalProperties: true required: - - action - oneOf: - - properties: - action: - title: Action - const: get - description: Get portfolio. - uiOrder: 0 - format: string - portfolio-gid: - description: Globally unique identifier (GID) for the portfolio. - shortDescription: Portfolio ID - uiOrder: 0 - title: Portfolio ID - acceptFormats: - - string - format: string - required: - action - - portfolio-gid - description: Get Portfolio. - uiOrder: 0 - title: Get - format: object - - properties: - action: - title: Action - const: update - description: Update portfolio. - uiOrder: 0 - format: string - portfolio-gid: - description: Globally unique identifier (GID) for the portfolio. - shortDescription: Portfolio ID - uiOrder: 0 - title: Portfolio ID - acceptFormats: - - string - format: string - name: - description: The name of the portfolio. - shortDescription: Update Portfolio Name - uiOrder: 1 - title: Portfolio Name - acceptFormats: - - string - format: string - color: - description: The color of the portfolio. - shortDescription: Update Color - uiOrder: 5 - enum: - - 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' - title: Update Color - acceptFormats: - - string - format: string - public: - description: Whether the portfolio is public. - shortDescription: Whether the portfolio is public - uiOrder: 6 - title: Public - acceptFormats: - - boolean - format: boolean - workspace: - description: The workspace of the portfolio. Please fill in the Globally - unique identifier (GID) for the workspace. - shortDescription: The workspace of the portfolio. - uiOrder: 7 - title: Workspace - acceptFormats: - - string - format: string - required: - - action - - portfolio-gid - description: Update Portfolio. - uiOrder: 0 - title: Update - format: object - - properties: - action: - title: Action - const: delete - description: Delete portfolio. - uiOrder: 0 - format: string - portfolio-gid: - description: Globally unique identifier (GID) for the portfolio. - shortDescription: Portfolio ID - uiOrder: 0 - title: Portfolio ID - acceptFormats: - - string - format: string - required: - - action - - portfolio-gid - description: Delete Portfolio. - uiOrder: 0 - title: Delete - format: object - - properties: - action: - title: Action - const: create - description: Create portfolio. - uiOrder: 0 - format: string - name: - description: The name of the portfolio. - shortDescription: Portfolio Name - uiOrder: 1 - title: Portfolio Name - acceptFormats: - - string - format: string - color: - description: The color of the portfolio. - shortDescription: Color - uiOrder: 5 - enum: - - 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' - title: Color - acceptFormats: - - string - format: string - public: - description: Whether the portfolio is public. - shortDescription: Whether the portfolio is public - uiOrder: 6 - title: Public - acceptFormats: - - boolean - format: boolean - workspace: - description: The workspace of the portfolio. Please fill in the Globally - unique identifier (GID) for the workspace. - shortDescription: The workspace of the portfolio. - uiOrder: 7 - title: Workspace - acceptFormats: - - string - format: string - required: - - action - - workspace - - name - - public - description: Create Portfolio. - uiOrder: 0 - title: Create - format: object + oneOf: + - properties: + action: + title: Action + const: get + description: Get portfolio. + uiOrder: 0 + format: string + portfolio-gid: + description: Globally unique identifier (GID) for the portfolio. + shortDescription: Portfolio ID + uiOrder: 0 + title: Portfolio ID + acceptFormats: + - string + format: string + required: + - action + - portfolio-gid + description: Get Portfolio. + uiOrder: 0 + title: Get + format: object + - properties: + action: + title: Action + const: update + description: Update portfolio. + uiOrder: 0 + format: string + portfolio-gid: + description: Globally unique identifier (GID) for the portfolio. + shortDescription: Portfolio ID + uiOrder: 0 + title: Portfolio ID + acceptFormats: + - string + format: string + name: + description: The name of the portfolio. + shortDescription: Update Portfolio Name + uiOrder: 1 + title: Portfolio Name + acceptFormats: + - string + format: string + color: + description: The color of the portfolio. + shortDescription: Update Color + uiOrder: 5 + enum: + - 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' + title: Update Color + acceptFormats: + - string + format: string + public: + description: Whether the portfolio is public. + shortDescription: Whether the portfolio is public + uiOrder: 6 + title: Public + acceptFormats: + - boolean + format: boolean + workspace: + description: The workspace of the portfolio. Please fill in the Globally unique identifier (GID) for the workspace. + shortDescription: The workspace of the portfolio. + uiOrder: 7 + title: Workspace + acceptFormats: + - string + format: string + required: + - action + - portfolio-gid + description: Update Portfolio. + uiOrder: 0 + title: Update + format: object + - properties: + action: + title: Action + const: delete + description: Delete portfolio. + uiOrder: 0 + format: string + portfolio-gid: + description: Globally unique identifier (GID) for the portfolio. + shortDescription: Portfolio ID + uiOrder: 0 + title: Portfolio ID + acceptFormats: + - string + format: string + required: + - action + - portfolio-gid + description: Delete Portfolio. + uiOrder: 0 + title: Delete + format: object + - properties: + action: + title: Action + const: create + description: Create portfolio. + uiOrder: 0 + format: string + name: + description: The name of the portfolio. + shortDescription: Portfolio Name + uiOrder: 1 + title: Portfolio Name + acceptFormats: + - string + format: string + color: + description: The color of the portfolio. + shortDescription: Color + uiOrder: 5 + enum: + - 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' + title: Color + acceptFormats: + - string + format: string + public: + description: Whether the portfolio is public. + shortDescription: Whether the portfolio is public + uiOrder: 6 + title: Public + acceptFormats: + - boolean + format: boolean + workspace: + description: The workspace of the portfolio. Please fill in the Globally unique identifier (GID) for the workspace. + shortDescription: The workspace of the portfolio. + uiOrder: 7 + title: Workspace + acceptFormats: + - string + format: string + required: + - action + - workspace + - name + - public + description: Create Portfolio. + uiOrder: 0 + title: Create + format: object format: object required: [] title: Input @@ -1709,8 +1672,8 @@ TASK_CRUD_PORTFOLIO: title: Owner Name format: string required: - - gid - - name + - gid + - name format: object due-on: description: The date on which the portfolio is due. In the format YYYY-MM-DD. @@ -1755,8 +1718,8 @@ TASK_CRUD_PORTFOLIO: title: User Name format: string required: - - gid - - name + - gid + - name format: object current-status: description: The current status of the portfolio. diff --git a/pkg/component/application/email/v0/config/definition.yaml b/pkg/component/application/email/v0/config/definition.yaml index f5f186049..a13e3e23f 100644 --- a/pkg/component/application/email/v0/config/definition.yaml +++ b/pkg/component/application/email/v0/config/definition.yaml @@ -1,6 +1,6 @@ availableTasks: -- TASK_SEND_EMAIL -- TASK_READ_EMAILS + - 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/email/v0/config/setup.yaml b/pkg/component/application/email/v0/config/setup.yaml index 8a9338473..1ccb57db0 100644 --- a/pkg/component/application/email/v0/config/setup.yaml +++ b/pkg/component/application/email/v0/config/setup.yaml @@ -3,7 +3,7 @@ properties: email-address: description: The email address of the user. acceptFormats: - - string + - string instillSecret: false uiOrder: 2 title: Email Address @@ -11,7 +11,7 @@ properties: password: description: The password of the App passwords in Gmail settings. acceptFormats: - - string + - string instillSecret: true uiOrder: 3 title: App Password @@ -19,21 +19,21 @@ properties: server-address: description: The address of the email server. acceptFormats: - - string + - string uiOrder: 0 title: Server Address format: string server-port: description: The port of the email server. acceptFormats: - - integer + - integer uiOrder: 1 title: Server Port format: integer required: -- email-address -- password -- server-address -- server-port + - email-address + - password + - server-address + - server-port title: Email format: object diff --git a/pkg/component/application/email/v0/config/tasks.yaml b/pkg/component/application/email/v0/config/tasks.yaml index a03bd54e9..6fbf71c1a 100644 --- a/pkg/component/application/email/v0/config/tasks.yaml +++ b/pkg/component/application/email/v0/config/tasks.yaml @@ -2,42 +2,42 @@ $defs: search-subject: description: Search for emails with a specific subject. acceptFormats: - - string + - string uiOrder: 4 title: Search Subject format: string search-from: description: Search for emails from a specific email address. acceptFormats: - - string + - string uiOrder: 2 title: Search From format: string search-to: description: Search for emails to a specific email address. acceptFormats: - - string + - string uiOrder: 3 title: Search To format: string limit: description: The maximum number of emails to search for. acceptFormats: - - integer + - integer uiOrder: 5 title: Limit format: integer date: description: Search for emails with the date the email was sent. acceptFormats: - - string + - string uiOrder: 6 title: Search Date format: string search-email-message: description: Search for emails with a specific message. acceptFormats: - - string + - string uiOrder: 7 title: Search Message format: string @@ -50,7 +50,7 @@ TASK_SEND_EMAIL: recipients: description: The email addresses of the recipients. acceptFormats: - - array + - array items: format: string uiOrder: 2 @@ -59,7 +59,7 @@ TASK_SEND_EMAIL: cc: description: The email addresses for Carbon Copy. acceptFormats: - - array + - array items: format: string uiOrder: 3 @@ -68,7 +68,7 @@ TASK_SEND_EMAIL: bcc: description: The email addresses for Blind Carbon Copy. acceptFormats: - - array + - array items: format: string uiOrder: 4 @@ -77,20 +77,20 @@ TASK_SEND_EMAIL: subject: description: The subject of the email. acceptFormats: - - string + - string uiOrder: 5 title: Subject format: string message: description: The message to be sent. acceptFormats: - - string + - string uiOrder: 6 title: Message format: string required: - - recipients - - message + - recipients + - message title: Input format: object output: @@ -103,7 +103,7 @@ TASK_SEND_EMAIL: title: Result format: string required: - - result + - result title: Output format: object TASK_READ_EMAILS: @@ -119,7 +119,7 @@ TASK_READ_EMAILS: mailbox: description: The mailbox to search for emails. acceptFormats: - - string + - string uiOrder: 1 title: Mailbox format: string @@ -136,7 +136,7 @@ TASK_READ_EMAILS: search-email-message: $ref: '#/$defs/search-email-message' required: - - mailbox + - mailbox title: Search format: object required: [] @@ -184,6 +184,6 @@ TASK_READ_EMAILS: title: Emails format: array required: - - emails + - emails title: Output format: object diff --git a/pkg/component/application/freshdesk/v0/config/definition.yaml b/pkg/component/application/freshdesk/v0/config/definition.yaml index 6538709cc..e3443285f 100644 --- a/pkg/component/application/freshdesk/v0/config/definition.yaml +++ b/pkg/component/application/freshdesk/v0/config/definition.yaml @@ -1,19 +1,19 @@ 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 + - 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/freshdesk/v0/config/setup.yaml b/pkg/component/application/freshdesk/v0/config/setup.yaml index 7d50211ff..56ded0bfc 100644 --- a/pkg/component/application/freshdesk/v0/config/setup.yaml +++ b/pkg/component/application/freshdesk/v0/config/setup.yaml @@ -1,27 +1,25 @@ additionalProperties: false properties: api-key: - description: Fill in your Freshdesk API key. To find your key, go to profile settigs - and on the right pane, you can get your key once you have completed the captcha - verification. + description: Fill in your Freshdesk API key. To find your key, go to profile settigs and on the right pane, you can get your key once you have completed + the captcha verification. acceptFormats: - - string + - string instillSecret: true uiOrder: 0 title: API key format: string domain: - description: Your Freshdesk domain. You can find this by going to Admin -> Search - for "Portals" -> Portal URL. Your portal URL will look like "yourdomain.freshdesk.com". + description: Your Freshdesk domain. You can find this by going to Admin -> Search for "Portals" -> Portal URL. Your portal URL will look like "yourdomain.freshdesk.com". Please only input your domain and not the whole URL. acceptFormats: - - string + - string instillSecret: true uiOrder: 1 title: Domain format: string required: -- api-key -- domain + - api-key + - domain title: Freshdesk Connection format: object diff --git a/pkg/component/application/freshdesk/v0/config/tasks.yaml b/pkg/component/application/freshdesk/v0/config/tasks.yaml index 47ba9804d..edb984a73 100644 --- a/pkg/component/application/freshdesk/v0/config/tasks.yaml +++ b/pkg/component/application/freshdesk/v0/config/tasks.yaml @@ -1,201 +1,201 @@ $defs: language: enum: - - 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 + - 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 example: English time-zone: enum: - - 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. + - 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. example: Eastern Time (US & Canada) ticket: ticket-id: @@ -223,13 +223,11 @@ $defs: title: Priority format: string ticket-type: - description: Used to categorize the ticket. To check the possible types a ticket - can have, please go to Admin -> Ticket Fields. + description: Used to categorize the ticket. To check the possible types a ticket can have, please go to Admin -> Ticket Fields. title: Ticket Type format: string association-type: - description: Used to determine whether a ticket is a parent, child, tracker - or related ticket. + description: Used to determine whether a ticket is a parent, child, tracker or related ticket. title: Association Type format: string associated-ticket-list: @@ -241,13 +239,11 @@ $defs: title: Tags format: array cc-emails: - description: Email addresses added in the 'cc' field of the incoming ticket - email. + description: Email addresses added in the 'cc' field of the incoming ticket email. title: CC Emails format: array bcc-emails: - description: Email addresses added in the 'bcc' field of the incoming ticket - email. + description: Email addresses added in the 'bcc' field of the incoming ticket email. title: BCC Emails format: array forward-emails: @@ -263,8 +259,7 @@ $defs: title: Requester ID format: integer responder-id: - description: ID of the agent to whom the ticket has been assigned. List of agents - can be found in Admin -> Agents. + description: ID of the agent to whom the ticket has been assigned. List of agents can be found in Admin -> Agents. title: Responder ID format: integer company-id: @@ -272,18 +267,15 @@ $defs: title: Company ID format: integer group-id: - description: ID of the group to which the ticket has been assigned. List of - groups can be found in Admin -> Groups. + description: ID of the group to which the ticket has been assigned. List of groups can be found in Admin -> Groups. title: Group ID format: integer product-id: - description: ID of the product to which the ticket is associated. List of products - can be found in Admin -> Multiple Products. + description: ID of the product to which the ticket is associated. List of products can be found in Admin -> Multiple Products. title: Product ID format: integer support-email: - description: Support email address. You can find it in Admin -> Email (under - channel). + description: Support email address. You can find it in Admin -> Email (under channel). title: Support Email format: string to-emails: @@ -295,8 +287,7 @@ $defs: title: Spam format: boolean due-by: - description: Timestamp that denotes when the ticket is due to be resolved. In - UTC format. + description: Timestamp that denotes when the ticket is due to be resolved. In UTC format. title: Due By format: string is-escalated: @@ -304,33 +295,27 @@ $defs: title: Is Escalated format: boolean first-response-due-by: - description: Timestamp that denotes when the first response is due. In UTC format. - You can adjust this by going to Admin -> SLA policy (under Workflows). + description: Timestamp that denotes when the first response is due. In UTC format. You can adjust this by going to Admin -> SLA policy (under Workflows). title: First Response Due By format: string first-response-escalated: - description: Set to true if the ticket has been escalated as the result of first - response time being breached. + description: Set to true if the ticket has been escalated as the result of first response time being breached. title: First Response Escalated format: boolean next-response-due-by: - description: Timestamp that denotes when the next response is due. In UTC format. - You can adjust this by going to Admin -> SLA policy (under Workflows). + description: Timestamp that denotes when the next response is due. In UTC format. You can adjust this by going to Admin -> SLA policy (under Workflows). title: Next Response Due By format: string next-response-escalated: - description: Set to true if the ticket has been escalated as the result of next - response time being breached. + description: Set to true if the ticket has been escalated as the result of next response time being breached. title: Next Response Escalated format: boolean created-at: - description: Timestamp that denotes when the ticket/conversation was created. - In UTC format. + description: Timestamp that denotes when the ticket/conversation was created. In UTC format. title: Created At format: string updated-at: - description: Timestamp that denotes when the ticket was last updated. In UTC - format. + description: Timestamp that denotes when the ticket was last updated. In UTC format. title: Updated At format: string attachments: @@ -338,8 +323,7 @@ $defs: title: Attachments format: array sentiment-score: - description: Freshdesk uses AI to assess the emotional tone and attitude expressed - in customer interaction. + description: Freshdesk uses AI to assess the emotional tone and attitude expressed in customer interaction. title: Sentiment Score format: integer initial-sentiment-score: @@ -347,8 +331,7 @@ $defs: title: Initial Sentiment Score format: integer custom-fields: - description: Custom fields that the ticket have. Custom fields can be created - or modified in Admin -> Ticket Fields. + description: Custom fields that the ticket have. Custom fields can be created or modified in Admin -> Ticket Fields. title: Custom Fields format: object conversation-id: @@ -413,8 +396,7 @@ $defs: title: Twitter ID format: string view-all-tickets: - description: Set to true if the contact can see all the tickets that are associated - with the primary company. + description: Set to true if the contact can see all the tickets that are associated with the primary company. title: View All Tickets format: boolean deleted: @@ -442,13 +424,11 @@ $defs: title: Created At format: string updated-at: - description: Timestamp that denotes when the contact was last updated. In UTC - format. + description: Timestamp that denotes when the contact was last updated. In UTC format. title: Updated At format: string custom-fields: - description: Custom fields that the contact have. Custom fields can be created - or modified in Admin -> Customer Fields. + description: Custom fields that the contact have. Custom fields can be created or modified in Admin -> Customer Fields. title: Custom Fields format: object company: @@ -473,25 +453,22 @@ $defs: title: Domains format: array health-score: - description: '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".' + description: '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".' title: Health Score format: string account-tier: - description: '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".' + description: '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".' title: Account Tier format: string renewal-date: - description: Date when your contract or relationship with the company is due - for renewal. + description: Date when your contract or relationship with the company is due for renewal. title: Renewal Date format: string industry: - description: The industry in which the company operates. To look at all the - possible values or create custom values, please go to Admin -> Customer Fields. + description: The industry in which the company operates. To look at all the possible values or create custom values, please go to Admin -> Customer + Fields. title: Industry format: string created-at: @@ -499,13 +476,11 @@ $defs: title: Created At format: string updated-at: - description: Timestamp that denotes when the company was last updated. In UTC - format. + description: Timestamp that denotes when the company was last updated. In UTC format. title: Updated At format: string custom-fields: - description: Custom fields that the company have. Custom fields can be created - or modified in Admin -> Customer Fields. + description: Custom fields that the company have. Custom fields can be created or modified in Admin -> Customer Fields. title: Custom Fields format: object TASK_GET_TICKET: @@ -517,10 +492,10 @@ TASK_GET_TICKET: ticket-id: $ref: '#/$defs/ticket/ticket-id' acceptFormats: - - integer + - integer uiOrder: 0 required: - - ticket-id + - ticket-id title: Input format: object output: @@ -575,8 +550,7 @@ TASK_GET_TICKET: $ref: '#/$defs/ticket/cc-emails' items: title: CC Email - description: One of the email address added in the 'cc' field of the incoming - ticket email. + description: One of the email address added in the 'cc' field of the incoming ticket email. format: string uiOrder: 9 format: array @@ -624,8 +598,7 @@ TASK_GET_TICKET: $ref: '#/$defs/ticket/to-emails' items: title: To Email - description: One of the email address to which the ticket was originally - sent. + description: One of the email address to which the ticket was originally sent. format: string uiOrder: 18 format: array @@ -686,9 +659,9 @@ TASK_GET_TICKET: title: Attachment URL format: string required: - - name - - content-type - - url + - name + - content-type + - url format: object uiOrder: 28 format: array @@ -706,14 +679,14 @@ TASK_GET_TICKET: uiOrder: 31 format: json required: - - requester-id - - subject - - description-text - - source - - status - - priority - - created-at - - updated-at + - requester-id + - subject + - description-text + - source + - status + - priority + - created-at + - updated-at title: Output format: object TASK_CREATE_TICKET: @@ -723,139 +696,134 @@ TASK_CREATE_TICKET: uiOrder: 0 properties: requester-id: - description: ID of the requester. Must be an existing contact. If you fill - in this field, you don't need to fill in the email field. Only one of the - two fields is required. + description: ID of the requester. Must be an existing contact. If you fill in this field, you don't need to fill in the email field. Only one of + the two fields is required. title: Requester ID uiOrder: 0 acceptFormats: - - integer + - integer format: integer email: - description: Email address of the requester. If you fill in the Requester - ID above, it will be ignored. Only one of the two fields is required. If - no contact exists with this email address in Freshdesk, it will be added - as a new contact. + description: Email address of the requester. If you fill in the Requester ID above, it will be ignored. Only one of the two fields is required. + If no contact exists with this email address in Freshdesk, it will be added as a new contact. title: Email uiOrder: 1 acceptFormats: - - string + - string format: string subject: $ref: '#/$defs/ticket/subject' uiOrder: 2 acceptFormats: - - string + - string description: description: Content of the ticket. You can use HTML tags in the content. title: Description uiOrder: 3 acceptFormats: - - string + - string format: string source: $ref: '#/$defs/ticket/source' enum: - - Email - - Portal - - Phone - - Twitter - - Facebook - - Chat - - Feedback Widget - - Outbound Email - - Ecommerce + - Email + - Portal + - Phone + - Twitter + - Facebook + - Chat + - Feedback Widget + - Outbound Email + - Ecommerce example: Portal uiOrder: 4 acceptFormats: - - string + - string status: $ref: '#/$defs/ticket/status' enum: - - Open - - Pending - - Resolved - - Closed - - Waiting on Customer - - Waiting on Third Party + - Open + - Pending + - Resolved + - Closed + - Waiting on Customer + - Waiting on Third Party example: Open uiOrder: 5 acceptFormats: - - string + - string priority: $ref: '#/$defs/ticket/priority' enum: - - Low - - Medium - - High - - Urgent + - Low + - Medium + - High + - Urgent example: Low uiOrder: 6 acceptFormats: - - string + - string ticket-type: $ref: '#/$defs/ticket/ticket-type' uiOrder: 7 acceptFormats: - - string + - string company-id: $ref: '#/$defs/ticket/company-id' uiOrder: 8 acceptFormats: - - integer + - integer product-id: $ref: '#/$defs/ticket/product-id' uiOrder: 9 acceptFormats: - - integer + - integer group-id: $ref: '#/$defs/ticket/group-id' uiOrder: 10 acceptFormats: - - integer + - integer responder-id: $ref: '#/$defs/ticket/responder-id' uiOrder: 11 acceptFormats: - - integer + - integer tags: $ref: '#/$defs/ticket/tags' uiOrder: 12 acceptFormats: - - array + - array items: format: string cc-emails: $ref: '#/$defs/ticket/cc-emails' uiOrder: 13 acceptFormats: - - array + - array items: format: string parent-id: - description: ID of the parent ticket. Need to be filled out if you want to - create a child ticket. + description: ID of the parent ticket. Need to be filled out if you want to create a child ticket. title: Parent ID uiOrder: 14 acceptFormats: - - integer + - integer format: integer related-ticket-ids: - description: List of related ticket IDs. Need to be filled out if you want - to create a tracker ticket. + description: List of related ticket IDs. Need to be filled out if you want to create a tracker ticket. title: Related Ticket IDs uiOrder: 15 acceptFormats: - - array + - array items: format: integer format: array required: - - subject - - description - - source - - status - - priority + - subject + - description + - source + - status + - priority title: Input format: object output: @@ -871,8 +839,8 @@ TASK_CREATE_TICKET: uiOrder: 1 format: string required: - - ticket-id - - created-at + - ticket-id + - created-at title: Output format: object TASK_REPLY_TO_TICKET: @@ -885,54 +853,50 @@ TASK_REPLY_TO_TICKET: $ref: '#/$defs/ticket/ticket-id' uiOrder: 0 acceptFormats: - - integer + - integer body: description: Content of the reply. Can be in HTML format. title: Body uiOrder: 0 acceptFormats: - - string + - string format: string from-email: - description: Email address that is replying to the ticket. You need to have - this email address registered in Freshdesk by going to Admin -> Emails. + description: 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. title: From Email uiOrder: 1 acceptFormats: - - string + - string format: string user-id: - description: 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. + description: 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. title: User ID uiOrder: 2 acceptFormats: - - integer + - integer format: integer cc-emails: - description: Email addresses added in the 'cc' field of the outgoing ticket - email. + description: Email addresses added in the 'cc' field of the outgoing ticket email. title: CC Emails uiOrder: 3 acceptFormats: - - array + - array items: format: string format: array bcc-emails: - description: Email addresses added in the 'bcc' field of the outgoing ticket - email. + description: Email addresses added in the 'bcc' field of the outgoing ticket email. title: BCC Emails uiOrder: 4 acceptFormats: - - array + - array items: format: string format: array required: - - ticket-id - - body + - ticket-id + - body title: Input format: object output: @@ -948,8 +912,8 @@ TASK_REPLY_TO_TICKET: uiOrder: 1 format: string required: - - conversation-id - - created-at + - conversation-id + - created-at title: Output format: object TASK_CREATE_TICKET_NOTE: @@ -962,22 +926,21 @@ TASK_CREATE_TICKET_NOTE: $ref: '#/$defs/ticket/ticket-id' uiOrder: 0 acceptFormats: - - integer + - integer body: description: Content of the note. Can be in HTML format. title: Body uiOrder: 1 acceptFormats: - - string + - string format: string notify-emails: - description: 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. + description: 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. title: Notify Emails uiOrder: 2 acceptFormats: - - array + - array items: format: string format: array @@ -986,26 +949,25 @@ TASK_CREATE_TICKET_NOTE: title: User ID uiOrder: 3 acceptFormats: - - integer + - integer format: integer private: description: Set to true if the note is private. title: Private uiOrder: 4 acceptFormats: - - boolean + - boolean format: boolean incoming: - description: Set to true if a particular note should appear as being created - from outside (i.e., not through web portal). + description: Set to true if a particular note should appear as being created from outside (i.e., not through web portal). title: Incoming uiOrder: 5 acceptFormats: - - boolean + - boolean format: boolean required: - - ticket-id - - body + - ticket-id + - body title: Input format: object output: @@ -1021,13 +983,12 @@ TASK_CREATE_TICKET_NOTE: uiOrder: 1 format: string required: - - conversation-id - - created-at + - conversation-id + - created-at title: Output format: object TASK_GET_ALL_CONVERSATIONS: - shortDescription: Get all the conversations in a ticket. (Conversations are replies - and notes that are added to a ticket) + shortDescription: Get all the conversations in a ticket. (Conversations are replies and notes that are added to a ticket) input: description: Ticket ID. uiOrder: 0 @@ -1037,10 +998,10 @@ TASK_GET_ALL_CONVERSATIONS: title: Ticket ID uiOrder: 2 acceptFormats: - - integer + - integer format: integer required: - - ticket-id + - ticket-id title: Input format: object output: @@ -1068,31 +1029,27 @@ TASK_GET_ALL_CONVERSATIONS: uiOrder: 2 format: string to-emails: - description: Email addresses of agents/users who need to be notified - about this conversation. + description: Email addresses of agents/users who need to be notified about this conversation. title: To Emails uiOrder: 3 items: title: To Email - description: One of the email addresses of agents/users who need to - be notified about this conversation. + description: One of the email addresses of agents/users who need to be notified about this conversation. format: string format: array from-email: - description: Email address that is replying to the ticket or adding - the note. + description: Email address that is replying to the ticket or adding the note. title: From Email uiOrder: 4 acceptFormats: - - string + - string format: string cc-emails: $ref: '#/$defs/ticket/cc-emails' uiOrder: 5 items: title: CC Email - description: One of the email address added in the 'cc' field of the - incoming ticket email. + description: One of the email address added in the 'cc' field of the incoming ticket email. format: string format: array bcc-emails: @@ -1100,13 +1057,11 @@ TASK_GET_ALL_CONVERSATIONS: uiOrder: 6 items: title: BCC Email - description: One of the email address added in the 'bcc' field of - the incoming ticket email. + description: One of the email address added in the 'bcc' field of the incoming ticket email. format: string format: array incoming: - description: Set to true if a particular conversation should appear - as being created from outside. + description: Set to true if a particular conversation should appear as being created from outside. title: Incoming uiOrder: 7 format: boolean @@ -1125,8 +1080,8 @@ TASK_GET_ALL_CONVERSATIONS: uiOrder: 10 format: string required: - - body-text - - created-at + - body-text + - created-at format: object format: array conversations-length: @@ -1135,8 +1090,8 @@ TASK_GET_ALL_CONVERSATIONS: uiOrder: 1 format: integer required: - - conversations - - conversations-length + - conversations + - conversations-length title: Output format: object TASK_GET_CONTACT: @@ -1148,10 +1103,10 @@ TASK_GET_CONTACT: contact-id: $ref: '#/$defs/contact/contact-id' acceptFormats: - - integer + - integer uiOrder: 0 required: - - contact-id + - contact-id title: Input format: object output: @@ -1245,14 +1200,13 @@ TASK_GET_CONTACT: title: Company ID format: integer view-all-tickets: - description: Set to true if the contact can see all the tickets that - are associated with the company. + description: Set to true if the contact can see all the tickets that are associated with the company. uiOrder: 1 title: View All Tickets format: boolean required: - - company-id - - view-all-tickets + - company-id + - view-all-tickets format: object uiOrder: 17 format: array @@ -1278,7 +1232,7 @@ TASK_GET_CONTACT: uiOrder: 21 format: json required: - - name + - name title: Output format: object TASK_CREATE_CONTACT: @@ -1291,42 +1245,42 @@ TASK_CREATE_CONTACT: $ref: '#/$defs/contact/name' uiOrder: 0 acceptFormats: - - string + - string email: $ref: '#/$defs/contact/email' uiOrder: 1 acceptFormats: - - string + - string phone: $ref: '#/$defs/contact/phone' uiOrder: 2 acceptFormats: - - string + - string mobile: $ref: '#/$defs/contact/mobile' uiOrder: 3 acceptFormats: - - string + - string description: $ref: '#/$defs/contact/description' uiOrder: 4 acceptFormats: - - string + - string address: $ref: '#/$defs/contact/address' uiOrder: 5 acceptFormats: - - string + - string job-title: $ref: '#/$defs/contact/job-title' uiOrder: 6 acceptFormats: - - string + - string tags: $ref: '#/$defs/contact/tags' uiOrder: 7 acceptFormats: - - array + - array items: format: string language: @@ -1335,7 +1289,7 @@ TASK_CREATE_CONTACT: $ref: '#/$defs/language' uiOrder: 8 acceptFormats: - - string + - string format: string time-zone: description: Time zone of the contact. @@ -1343,44 +1297,42 @@ TASK_CREATE_CONTACT: $ref: '#/$defs/time-zone' uiOrder: 9 acceptFormats: - - string + - string format: string company-id: $ref: '#/$defs/contact/company-id' uiOrder: 10 acceptFormats: - - integer + - integer unique-external-id: $ref: '#/$defs/contact/unique-external-id' uiOrder: 11 acceptFormats: - - string + - string twitter-id: $ref: '#/$defs/contact/twitter-id' uiOrder: 12 acceptFormats: - - string + - string view-all-tickets: - description: '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.' + description: '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.' title: View All Tickets uiOrder: 13 acceptFormats: - - boolean + - boolean format: boolean other-emails: $ref: '#/$defs/contact/other-emails' uiOrder: 14 acceptFormats: - - array + - array items: format: string other-companies: title: Other Companies - description: '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.' + description: '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.' items: format: string uiOrder: 15 @@ -1389,11 +1341,11 @@ TASK_CREATE_CONTACT: $ref: '#/$defs/contact/other-phone-numbers' uiOrder: 16 acceptFormats: - - array + - array items: format: string required: - - name + - name title: Input format: object output: @@ -1409,8 +1361,8 @@ TASK_CREATE_CONTACT: uiOrder: 1 format: string required: - - contact-id - - created-at + - contact-id + - created-at title: Output format: object TASK_GET_COMPANY: @@ -1422,10 +1374,10 @@ TASK_GET_COMPANY: company-id: $ref: '#/$defs/contact/company-id' acceptFormats: - - integer + - integer uiOrder: 0 required: - - company-id + - company-id title: Input format: object output: @@ -1482,9 +1434,9 @@ TASK_GET_COMPANY: uiOrder: 10 format: json required: - - name - - created-at - - updated-at + - name + - created-at + - updated-at title: Output format: object TASK_CREATE_COMPANY: @@ -1497,49 +1449,48 @@ TASK_CREATE_COMPANY: $ref: '#/$defs/company/name' uiOrder: 0 acceptFormats: - - string + - string description: $ref: '#/$defs/company/description' uiOrder: 1 acceptFormats: - - string + - string note: $ref: '#/$defs/company/note' uiOrder: 2 acceptFormats: - - string + - string domains: $ref: '#/$defs/company/domains' uiOrder: 3 acceptFormats: - - array + - array items: format: string health-score: $ref: '#/$defs/company/health-score' uiOrder: 4 acceptFormats: - - string + - string account-tier: $ref: '#/$defs/company/account-tier' uiOrder: 5 acceptFormats: - - string + - string renewal-date: - description: Date when your contract or relationship with the company is due - for renewal. Enter in the format YYYY-MM-DD. + description: Date when your contract or relationship with the company is due for renewal. Enter in the format YYYY-MM-DD. title: Renewal Date uiOrder: 6 acceptFormats: - - string + - string format: string industry: $ref: '#/$defs/company/industry' uiOrder: 7 acceptFormats: - - string + - string required: - - name + - name title: Input format: object output: @@ -1555,15 +1506,13 @@ TASK_CREATE_COMPANY: uiOrder: 1 format: string required: - - company-id - - created-at + - company-id + - created-at title: Output format: object TASK_GET_ALL: - shortDescription: '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.' + shortDescription: '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: description: Object type. uiOrder: 0 @@ -1572,29 +1521,28 @@ TASK_GET_ALL: description: Type of object to get IDs for. title: Object Type enum: - - Contacts - - Companies - - Tickets - - Products - - Agents - - Roles - - Skills + - Contacts + - Companies + - Tickets + - Products + - Agents + - Roles + - Skills uiOrder: 0 acceptFormats: - - string + - string format: string length: - description: The maximum number of IDs allowed is 500. The most recent IDs - will be retrieved. + description: The maximum number of IDs allowed is 500. The most recent IDs will be retrieved. default: 500 title: Length uiOrder: 1 acceptFormats: - - integer + - integer format: integer required: - - object-type - - length + - object-type + - length title: Input format: object output: @@ -1616,13 +1564,12 @@ TASK_GET_ALL: uiOrder: 1 format: integer required: - - ids - - id-length + - ids + - id-length title: Output format: object TASK_GET_PRODUCT: - shortDescription: Get product using ID. This task will only work if you have admin - privileges. + shortDescription: Get product using ID. This task will only work if you have admin privileges. input: description: Product ID. uiOrder: 0 @@ -1632,10 +1579,10 @@ TASK_GET_PRODUCT: title: Product ID uiOrder: 0 acceptFormats: - - integer + - integer format: integer required: - - product-id + - product-id title: Input format: object output: @@ -1673,17 +1620,16 @@ TASK_GET_PRODUCT: uiOrder: 5 format: boolean required: - - name - - description - - primary-email - - created-at - - updated-at - - default + - name + - description + - primary-email + - created-at + - updated-at + - default title: Output format: object TASK_GET_AGENT: - shortDescription: 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. + shortDescription: 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: description: Agent ID. uiOrder: 0 @@ -1693,10 +1639,10 @@ TASK_GET_AGENT: title: Agent ID uiOrder: 0 acceptFormats: - - integer + - integer format: integer required: - - agent-id + - agent-id title: Input format: object output: @@ -1744,14 +1690,12 @@ TASK_GET_AGENT: uiOrder: 7 format: string ticket-scope: - description: Ticket permission of the agent. Can be "Global Access", "Group - Access" or "Restricted Access". + description: Ticket permission of the agent. Can be "Global Access", "Group Access" or "Restricted Access". title: Ticket Scope uiOrder: 9 format: string available: - description: Set to true if the agent is in a group that has enabled "Automatic - Ticket Assignment". + description: Set to true if the agent is in a group that has enabled "Automatic Ticket Assignment". title: Available uiOrder: 10 format: boolean @@ -1818,15 +1762,14 @@ TASK_GET_AGENT: uiOrder: 8 format: string required: - - email - - type - - ticket-scope - - occasional + - email + - type + - ticket-scope + - occasional title: Output format: object TASK_GET_ROLE: - shortDescription: Get role using ID. This task will only work if you have admin - privileges. Roles allow agents/collaborators to have different privileges. + shortDescription: Get role using ID. This task will only work if you have admin privileges. Roles allow agents/collaborators to have different privileges. input: description: Role ID. uiOrder: 0 @@ -1836,10 +1779,10 @@ TASK_GET_ROLE: title: Role ID uiOrder: 0 acceptFormats: - - integer + - integer format: integer required: - - role-id + - role-id title: Input format: object output: @@ -1877,17 +1820,16 @@ TASK_GET_ROLE: uiOrder: 5 format: string required: - - name - - description - - default - - agent-type - - created-at - - updated-at + - name + - description + - default + - agent-type + - created-at + - updated-at title: Output format: object TASK_GET_GROUP: - shortDescription: Get group using ID. This task will only work if you have admin - privileges. Agents can be classified into groups such as Customer Support. + shortDescription: 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: description: Group ID. uiOrder: 0 @@ -1897,10 +1839,10 @@ TASK_GET_GROUP: title: Group ID uiOrder: 0 acceptFormats: - - integer + - integer format: integer required: - - group-id + - group-id title: Input format: object output: @@ -1932,8 +1874,7 @@ TASK_GET_GROUP: uiOrder: 3 format: string escalate-to: - description: The ID of the user to whom an escalation email is sent if a ticket - is unassigned. + description: The ID of the user to whom an escalation email is sent if a ticket is unassigned. title: Escalate To uiOrder: 4 format: integer @@ -1948,8 +1889,7 @@ TASK_GET_GROUP: uiOrder: 6 format: string agent-availability-status: - description: The availability status of the agent in the group. Automatically - set to true if the group has enabled "Automatic Ticket Assignment". + description: The availability status of the agent in the group. Automatically set to true if the group has enabled "Automatic Ticket Assignment". title: Agent Availability Status uiOrder: 7 format: boolean @@ -1964,17 +1904,16 @@ TASK_GET_GROUP: uiOrder: 9 format: string required: - - name - - description - - auto-ticket-assign - - created-at - - updated-at + - name + - description + - auto-ticket-assign + - created-at + - updated-at title: Output format: object TASK_GET_SKILL: - shortDescription: 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. + shortDescription: 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: description: Skill ID. uiOrder: 0 @@ -1984,10 +1923,10 @@ TASK_GET_SKILL: title: Skill ID uiOrder: 0 acceptFormats: - - integer + - integer format: integer required: - - skill-id + - skill-id title: Input format: object output: @@ -2028,11 +1967,11 @@ TASK_GET_SKILL: uiOrder: 5 format: string required: - - name - - rank - - condition-match-type - - conditions - - created-at - - updated-at + - name + - rank + - condition-match-type + - conditions + - created-at + - updated-at title: Output format: object diff --git a/pkg/component/application/github/v0/config/definition.yaml b/pkg/component/application/github/v0/config/definition.yaml index 6e6884e67..387107f5e 100644 --- a/pkg/component/application/github/v0/config/definition.yaml +++ b/pkg/component/application/github/v0/config/definition.yaml @@ -1,15 +1,15 @@ 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 + - 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 + - EVENT_STAR_CREATED documentationUrl: https://www.instill.tech/docs/component/application/github icon: assets/github.svg id: github diff --git a/pkg/component/application/github/v0/config/events.yaml b/pkg/component/application/github/v0/config/events.yaml index 9f3460209..cfefea4ef 100644 --- a/pkg/component/application/github/v0/config/events.yaml +++ b/pkg/component/application/github/v0/config/events.yaml @@ -9,100 +9,99 @@ EVENT_STAR_CREATED: messageSchema: $schema: http://json-schema.org/draft-07/schema required: - - action - - starred-at - - repository - - sender + - action + - starred-at + - repository + - sender properties: action: enum: - - created + - created format: string starred-at: format: string - description: 'The time the star was created. This is a timestamp in ISO 8601 - format: `YYYY-MM-DDTHH:MM:SSZ`. Will be `null` for the `deleted` action.' + description: 'The time the star was created. This is a timestamp in ISO 8601 format: `YYYY-MM-DDTHH:MM:SSZ`. Will be `null` for the `deleted` action.' repository: $schema: http://json-schema.org/draft-07/schema description: A git repository required: - - id - - node-id - - name - - full-name - - private - - owner - - html-url - - description - - fork - - url - - forks-url - - keys-url - - collaborators-url - - teams-url - - hooks-url - - issue-events-url - - events-url - - assignees-url - - branches-url - - tags-url - - blobs-url - - git-tags-url - - git-refs-url - - trees-url - - statuses-url - - languages-url - - stargazers-url - - contributors-url - - subscribers-url - - subscription-url - - commits-url - - git-commits-url - - comments-url - - issue-comment-url - - contents-url - - compare-url - - merges-url - - archive-url - - downloads-url - - issues-url - - pulls-url - - milestones-url - - notifications-url - - labels-url - - releases-url - - deployments-url - - created-at - - updated-at - - pushed-at - - git-url - - ssh-url - - clone-url - - svn-url - - homepage - - size - - stargazers-count - - watchers-count - - language - - has-issues - - has-projects - - has-downloads - - has-wiki - - has-pages - - forks-count - - mirror-url - - archived - - open-issues-count - - license - - forks - - open-issues - - watchers - - default-branch - - is-template - - web-commit-signoff-required - - topics - - visibility - - custom-properties + - id + - node-id + - name + - full-name + - private + - owner + - html-url + - description + - fork + - url + - forks-url + - keys-url + - collaborators-url + - teams-url + - hooks-url + - issue-events-url + - events-url + - assignees-url + - branches-url + - tags-url + - blobs-url + - git-tags-url + - git-refs-url + - trees-url + - statuses-url + - languages-url + - stargazers-url + - contributors-url + - subscribers-url + - subscription-url + - commits-url + - git-commits-url + - comments-url + - issue-comment-url + - contents-url + - compare-url + - merges-url + - archive-url + - downloads-url + - issues-url + - pulls-url + - milestones-url + - notifications-url + - labels-url + - releases-url + - deployments-url + - created-at + - updated-at + - pushed-at + - git-url + - ssh-url + - clone-url + - svn-url + - homepage + - size + - stargazers-count + - watchers-count + - language + - has-issues + - has-projects + - has-downloads + - has-wiki + - has-pages + - forks-count + - mirror-url + - archived + - open-issues-count + - license + - forks + - open-issues + - watchers + - default-branch + - is-template + - web-commit-signoff-required + - topics + - visibility + - custom-properties properties: id: description: Unique identifier of the repository @@ -122,24 +121,24 @@ EVENT_STAR_CREATED: owner: $schema: http://json-schema.org/draft-07/schema required: - - login - - id - - node-id - - avatar-url - - gravatar-id - - url - - html-url - - followers-url - - following-url - - gists-url - - starred-url - - subscriptions-url - - organizations-url - - repos-url - - events-url - - received-events-url - - type - - site-admin + - login + - id + - node-id + - avatar-url + - gravatar-id + - url + - html-url + - followers-url + - following-url + - gists-url + - starred-url + - subscriptions-url + - organizations-url + - repos-url + - events-url + - received-events-url + - type + - site-admin properties: login: format: string @@ -151,8 +150,8 @@ EVENT_STAR_CREATED: format: string email: format: - - string - - 'null' + - string + - 'null' avatar-url: format: string gravatar-id: @@ -183,9 +182,9 @@ EVENT_STAR_CREATED: format: boolean type: enum: - - Bot - - User - - Organization + - Bot + - User + - Organization format: string additionalProperties: false title: User @@ -196,26 +195,23 @@ EVENT_STAR_CREATED: description: description: The repository description. format: - - string - - 'null' + - string + - 'null' fork: description: Whether the repository is a fork. format: boolean url: format: string - description: The URL to get more information about the repository from - the GitHub API. + description: The URL to get more information about the repository from the GitHub API. forks-url: format: string description: The API URL to list the forks of the repository. keys-url: format: string - description: A template for the API URL to get information about deploy - keys on the repository. + description: A template for the API URL to get information about deploy keys on the repository. collaborators-url: format: string - description: A template for the API URL to get information about collaborators - of the repository. + description: A template for the API URL to get information about collaborators of the repository. teams-url: format: string description: The API URL to list the teams on the repository. @@ -224,53 +220,43 @@ EVENT_STAR_CREATED: description: The API URL to list the hooks on the repository. issue-events-url: format: string - description: A template for the API URL to get information about issue - events on the repository. + description: A template for the API URL to get information about issue events on the repository. events-url: format: string description: The API URL to list the events of the repository. assignees-url: format: string - description: A template for the API URL to list the available assignees - for issues in the repository. + description: A template for the API URL to list the available assignees for issues in the repository. branches-url: format: string - description: A template for the API URL to get information about branches - in the repository. + description: A template for the API URL to get information about branches in the repository. tags-url: format: string description: The API URL to get information about tags on the repository. blobs-url: format: string - description: A template for the API URL to create or retrieve a raw Git - blob in the repository. + description: A template for the API URL to create or retrieve a raw Git blob in the repository. git-tags-url: format: string - description: A template for the API URL to get information about Git tags - of the repository. + description: A template for the API URL to get information about Git tags of the repository. git-refs-url: format: string - description: A template for the API URL to get information about Git refs - of the repository. + description: A template for the API URL to get information about Git refs of the repository. trees-url: format: string - description: A template for the API URL to create or retrieve a raw Git - tree of the repository. + description: A template for the API URL to create or retrieve a raw Git tree of the repository. statuses-url: format: string - description: A template for the API URL to get information about statuses - of a commit. + description: A template for the API URL to get information about statuses of a commit. languages-url: format: string - description: The API URL to get information about the languages of the - repository. + description: The API URL to get information about the languages of the repository. stargazers-url: format: string description: The API URL to list the stargazers on the repository. contributors-url: format: string - description: A template for the API URL to list the contributors to the - repository. + description: A template for the API URL to list the contributors to the repository. subscribers-url: format: string description: The API URL to list the subscribers on the repository. @@ -279,20 +265,16 @@ EVENT_STAR_CREATED: description: The API URL to subscribe to notifications for this repository. commits-url: format: string - description: A template for the API URL to get information about commits - on the repository. + description: A template for the API URL to get information about commits on the repository. git-commits-url: format: string - description: A template for the API URL to get information about Git commits - of the repository. + description: A template for the API URL to get information about Git commits of the repository. comments-url: format: string - description: A template for the API URL to get information about comments - on the repository. + description: A template for the API URL to get information about comments on the repository. issue-comment-url: format: string - description: A template for the API URL to get information about issue - comments on the repository. + description: A template for the API URL to get information about issue comments on the repository. contents-url: format: string description: A template for the API URL to get the contents of the repository. @@ -304,49 +286,42 @@ EVENT_STAR_CREATED: description: The API URL to merge branches in the repository. archive-url: format: string - description: A template for the API URL to download the repository as - an archive. + description: A template for the API URL to download the repository as an archive. downloads-url: format: string description: The API URL to list the downloads on the repository. issues-url: format: string - description: A template for the API URL to get information about issues - on the repository. + description: A template for the API URL to get information about issues on the repository. pulls-url: format: string - description: A template for the API URL to get information about pull - requests on the repository. + description: A template for the API URL to get information about pull requests on the repository. milestones-url: format: string - description: A template for the API URL to get information about milestones - of the repository. + description: A template for the API URL to get information about milestones of the repository. notifications-url: format: string - description: A template for the API URL to get information about notifications - on the repository. + description: A template for the API URL to get information about notifications on the repository. labels-url: format: string - description: A template for the API URL to get information about labels - of the repository. + description: A template for the API URL to get information about labels of the repository. releases-url: format: string - description: A template for the API URL to get information about releases - on the repository. + description: A template for the API URL to get information about releases on the repository. deployments-url: format: string description: The API URL to list the deployments of the repository. created-at: oneOf: - - format: integer - - format: string + - format: integer + - format: string updated-at: format: string pushed-at: oneOf: - - format: integer - - format: string - - format: 'null' + - format: integer + - format: string + - format: 'null' git-url: format: string ssh-url: @@ -357,8 +332,8 @@ EVENT_STAR_CREATED: format: string homepage: format: - - string - - 'null' + - string + - 'null' size: format: integer stargazers-count: @@ -367,8 +342,8 @@ EVENT_STAR_CREATED: format: integer language: format: - - string - - 'null' + - string + - 'null' has-issues: description: Whether issues are enabled. default: true @@ -395,8 +370,8 @@ EVENT_STAR_CREATED: format: integer mirror-url: format: - - string - - 'null' + - string + - 'null' archived: description: Whether the repository is archived. default: false @@ -408,30 +383,30 @@ EVENT_STAR_CREATED: format: integer license: oneOf: - - $schema: http://json-schema.org/draft-07/schema - required: - - key - - name - - spdx-id - - url - - node-id - properties: - key: - format: string - name: - format: string - spdx-id: - format: string - url: - format: - - string - - 'null' - node-id: - format: string - additionalProperties: false - title: License - format: object - - format: 'null' + - $schema: http://json-schema.org/draft-07/schema + required: + - key + - name + - spdx-id + - url + - node-id + properties: + key: + format: string + name: + format: string + spdx-id: + format: string + url: + format: + - string + - 'null' + node-id: + format: string + additionalProperties: false + title: License + format: object + - format: 'null' forks: format: integer open-issues: @@ -484,9 +459,9 @@ EVENT_STAR_CREATED: format: array visibility: enum: - - public - - private - - internal + - public + - private + - internal format: string delete-branch-on-merge: description: Whether to delete head branches when pull requests are merged @@ -496,9 +471,9 @@ EVENT_STAR_CREATED: format: string permissions: required: - - pull - - push - - admin + - pull + - push + - admin properties: pull: format: boolean @@ -519,11 +494,11 @@ EVENT_STAR_CREATED: custom-properties: additionalProperties: oneOf: - - format: 'null' - - format: string - - items: - format: string - format: array + - format: 'null' + - format: string + - items: + format: string + format: array format: object additionalProperties: false title: Repository @@ -531,24 +506,24 @@ EVENT_STAR_CREATED: sender: $schema: http://json-schema.org/draft-07/schema required: - - login - - id - - node-id - - avatar-url - - gravatar-id - - url - - html-url - - followers-url - - following-url - - gists-url - - starred-url - - subscriptions-url - - organizations-url - - repos-url - - events-url - - received-events-url - - type - - site-admin + - login + - id + - node-id + - avatar-url + - gravatar-id + - url + - html-url + - followers-url + - following-url + - gists-url + - starred-url + - subscriptions-url + - organizations-url + - repos-url + - events-url + - received-events-url + - type + - site-admin properties: login: format: string @@ -560,8 +535,8 @@ EVENT_STAR_CREATED: format: string email: format: - - string - - 'null' + - string + - 'null' avatar-url: format: string gravatar-id: @@ -592,9 +567,9 @@ EVENT_STAR_CREATED: format: boolean type: enum: - - Bot - - User - - Organization + - Bot + - User + - Organization format: string additionalProperties: false title: User @@ -602,18 +577,18 @@ EVENT_STAR_CREATED: organization: $schema: http://json-schema.org/draft-07/schema required: - - login - - id - - node-id - - url - - repos-url - - events-url - - hooks-url - - issues-url - - members-url - - public-members-url - - avatar-url - - description + - login + - id + - node-id + - url + - repos-url + - events-url + - hooks-url + - issues-url + - members-url + - public-members-url + - avatar-url + - description properties: login: format: string @@ -641,8 +616,8 @@ EVENT_STAR_CREATED: format: string description: format: - - string - - 'null' + - string + - 'null' additionalProperties: false title: Organization format: object @@ -650,8 +625,8 @@ EVENT_STAR_CREATED: $schema: http://json-schema.org/draft-07/schema description: Installation required: - - id - - node-id + - id + - node-id properties: id: description: The ID of the installation. @@ -665,15 +640,106 @@ EVENT_STAR_CREATED: title: star created event format: object messageExamples: - - action: created - starred-at: '2019-05-15T15:20:40Z' - repository: - id: 186853002 - node-id: MDEwOlJlcG9zaXRvcnkxODY4NTMwMDI= - name: Hello-World - full-name: Codertocat/Hello-World - private: false - owner: + - action: created + starred-at: '2019-05-15T15:20:40Z' + repository: + id: 186853002 + node-id: MDEwOlJlcG9zaXRvcnkxODY4NTMwMDI= + name: Hello-World + full-name: Codertocat/Hello-World + private: false + owner: + login: Codertocat + id: 21031067 + node-id: MDQ6VXNlcjIxMDMxMDY3 + avatar-url: https://avatars1.githubusercontent.com/u/21031067?v=4 + gravatar-id: '' + url: https://api.github.com/users/Codertocat + html-url: https://github.com/Codertocat + followers-url: https://api.github.com/users/Codertocat/followers + following-url: https://api.github.com/users/Codertocat/following{/other_user} + gists-url: https://api.github.com/users/Codertocat/gists{/gist_id} + starred-url: https://api.github.com/users/Codertocat/starred{/owner}{/repo} + subscriptions-url: https://api.github.com/users/Codertocat/subscriptions + organizations-url: https://api.github.com/users/Codertocat/orgs + repos-url: https://api.github.com/users/Codertocat/repos + events-url: https://api.github.com/users/Codertocat/events{/privacy} + received-events-url: https://api.github.com/users/Codertocat/received_events + site-admin: false + format: User + html-url: https://github.com/Codertocat/Hello-World + description: + fork: false + url: https://api.github.com/repos/Codertocat/Hello-World + forks-url: https://api.github.com/repos/Codertocat/Hello-World/forks + keys-url: https://api.github.com/repos/Codertocat/Hello-World/keys{/key_id} + collaborators-url: https://api.github.com/repos/Codertocat/Hello-World/collaborators{/collaborator} + teams-url: https://api.github.com/repos/Codertocat/Hello-World/teams + hooks-url: https://api.github.com/repos/Codertocat/Hello-World/hooks + issue-events-url: https://api.github.com/repos/Codertocat/Hello-World/issues/events{/number} + events-url: https://api.github.com/repos/Codertocat/Hello-World/events + assignees-url: https://api.github.com/repos/Codertocat/Hello-World/assignees{/user} + branches-url: https://api.github.com/repos/Codertocat/Hello-World/branches{/branch} + tags-url: https://api.github.com/repos/Codertocat/Hello-World/tags + blobs-url: https://api.github.com/repos/Codertocat/Hello-World/git/blobs{/sha} + git-tags-url: https://api.github.com/repos/Codertocat/Hello-World/git/tags{/sha} + git-refs-url: https://api.github.com/repos/Codertocat/Hello-World/git/refs{/sha} + trees-url: https://api.github.com/repos/Codertocat/Hello-World/git/trees{/sha} + statuses-url: https://api.github.com/repos/Codertocat/Hello-World/statuses/{sha} + languages-url: https://api.github.com/repos/Codertocat/Hello-World/languages + stargazers-url: https://api.github.com/repos/Codertocat/Hello-World/stargazers + contributors-url: https://api.github.com/repos/Codertocat/Hello-World/contributors + subscribers-url: https://api.github.com/repos/Codertocat/Hello-World/subscribers + subscription-url: https://api.github.com/repos/Codertocat/Hello-World/subscription + commits-url: https://api.github.com/repos/Codertocat/Hello-World/commits{/sha} + git-commits-url: https://api.github.com/repos/Codertocat/Hello-World/git/commits{/sha} + comments-url: https://api.github.com/repos/Codertocat/Hello-World/comments{/number} + issue-comment-url: https://api.github.com/repos/Codertocat/Hello-World/issues/comments{/number} + contents-url: https://api.github.com/repos/Codertocat/Hello-World/contents/{+path} + compare-url: https://api.github.com/repos/Codertocat/Hello-World/compare/{base}...{head} + merges-url: https://api.github.com/repos/Codertocat/Hello-World/merges + archive-url: https://api.github.com/repos/Codertocat/Hello-World/{archive_format}{/ref} + downloads-url: https://api.github.com/repos/Codertocat/Hello-World/downloads + issues-url: https://api.github.com/repos/Codertocat/Hello-World/issues{/number} + pulls-url: https://api.github.com/repos/Codertocat/Hello-World/pulls{/number} + milestones-url: https://api.github.com/repos/Codertocat/Hello-World/milestones{/number} + notifications-url: https://api.github.com/repos/Codertocat/Hello-World/notifications{?since,all,participating} + labels-url: https://api.github.com/repos/Codertocat/Hello-World/labels{/name} + releases-url: https://api.github.com/repos/Codertocat/Hello-World/releases{/id} + deployments-url: https://api.github.com/repos/Codertocat/Hello-World/deployments + created-at: '2019-05-15T15:19:25Z' + updated-at: '2019-05-15T15:20:40Z' + pushed-at: '2019-05-15T15:20:33Z' + git-url: git://github.com/Codertocat/Hello-World.git + ssh-url: git@github.com:Codertocat/Hello-World.git + clone-url: https://github.com/Codertocat/Hello-World.git + svn-url: https://github.com/Codertocat/Hello-World + homepage: + size: 0 + stargazers-count: 1 + watchers-count: 1 + language: Ruby + has-issues: true + has-projects: true + has-downloads: true + has-wiki: true + has-pages: true + forks-count: 0 + mirror-url: + archived: false + disabled: false + open-issues-count: 2 + license: + forks: 0 + open-issues: 2 + watchers: 1 + default-branch: master + is-template: false + topics: [] + visibility: public + web-commit-signoff-required: false + custom-properties: {} + sender: login: Codertocat id: 21031067 node-id: MDQ6VXNlcjIxMDMxMDY3 @@ -692,94 +758,3 @@ EVENT_STAR_CREATED: received-events-url: https://api.github.com/users/Codertocat/received_events site-admin: false format: User - html-url: https://github.com/Codertocat/Hello-World - description: null - fork: false - url: https://api.github.com/repos/Codertocat/Hello-World - forks-url: https://api.github.com/repos/Codertocat/Hello-World/forks - keys-url: https://api.github.com/repos/Codertocat/Hello-World/keys{/key_id} - collaborators-url: https://api.github.com/repos/Codertocat/Hello-World/collaborators{/collaborator} - teams-url: https://api.github.com/repos/Codertocat/Hello-World/teams - hooks-url: https://api.github.com/repos/Codertocat/Hello-World/hooks - issue-events-url: https://api.github.com/repos/Codertocat/Hello-World/issues/events{/number} - events-url: https://api.github.com/repos/Codertocat/Hello-World/events - assignees-url: https://api.github.com/repos/Codertocat/Hello-World/assignees{/user} - branches-url: https://api.github.com/repos/Codertocat/Hello-World/branches{/branch} - tags-url: https://api.github.com/repos/Codertocat/Hello-World/tags - blobs-url: https://api.github.com/repos/Codertocat/Hello-World/git/blobs{/sha} - git-tags-url: https://api.github.com/repos/Codertocat/Hello-World/git/tags{/sha} - git-refs-url: https://api.github.com/repos/Codertocat/Hello-World/git/refs{/sha} - trees-url: https://api.github.com/repos/Codertocat/Hello-World/git/trees{/sha} - statuses-url: https://api.github.com/repos/Codertocat/Hello-World/statuses/{sha} - languages-url: https://api.github.com/repos/Codertocat/Hello-World/languages - stargazers-url: https://api.github.com/repos/Codertocat/Hello-World/stargazers - contributors-url: https://api.github.com/repos/Codertocat/Hello-World/contributors - subscribers-url: https://api.github.com/repos/Codertocat/Hello-World/subscribers - subscription-url: https://api.github.com/repos/Codertocat/Hello-World/subscription - commits-url: https://api.github.com/repos/Codertocat/Hello-World/commits{/sha} - git-commits-url: https://api.github.com/repos/Codertocat/Hello-World/git/commits{/sha} - comments-url: https://api.github.com/repos/Codertocat/Hello-World/comments{/number} - issue-comment-url: https://api.github.com/repos/Codertocat/Hello-World/issues/comments{/number} - contents-url: https://api.github.com/repos/Codertocat/Hello-World/contents/{+path} - compare-url: https://api.github.com/repos/Codertocat/Hello-World/compare/{base}...{head} - merges-url: https://api.github.com/repos/Codertocat/Hello-World/merges - archive-url: https://api.github.com/repos/Codertocat/Hello-World/{archive_format}{/ref} - downloads-url: https://api.github.com/repos/Codertocat/Hello-World/downloads - issues-url: https://api.github.com/repos/Codertocat/Hello-World/issues{/number} - pulls-url: https://api.github.com/repos/Codertocat/Hello-World/pulls{/number} - milestones-url: https://api.github.com/repos/Codertocat/Hello-World/milestones{/number} - notifications-url: https://api.github.com/repos/Codertocat/Hello-World/notifications{?since,all,participating} - labels-url: https://api.github.com/repos/Codertocat/Hello-World/labels{/name} - releases-url: https://api.github.com/repos/Codertocat/Hello-World/releases{/id} - deployments-url: https://api.github.com/repos/Codertocat/Hello-World/deployments - created-at: '2019-05-15T15:19:25Z' - updated-at: '2019-05-15T15:20:40Z' - pushed-at: '2019-05-15T15:20:33Z' - git-url: git://github.com/Codertocat/Hello-World.git - ssh-url: git@github.com:Codertocat/Hello-World.git - clone-url: https://github.com/Codertocat/Hello-World.git - svn-url: https://github.com/Codertocat/Hello-World - homepage: null - size: 0 - stargazers-count: 1 - watchers-count: 1 - language: Ruby - has-issues: true - has-projects: true - has-downloads: true - has-wiki: true - has-pages: true - forks-count: 0 - mirror-url: null - archived: false - disabled: false - open-issues-count: 2 - license: null - forks: 0 - open-issues: 2 - watchers: 1 - default-branch: master - is-template: false - topics: [] - visibility: public - web-commit-signoff-required: false - custom-properties: {} - sender: - login: Codertocat - id: 21031067 - node-id: MDQ6VXNlcjIxMDMxMDY3 - avatar-url: https://avatars1.githubusercontent.com/u/21031067?v=4 - gravatar-id: '' - url: https://api.github.com/users/Codertocat - html-url: https://github.com/Codertocat - followers-url: https://api.github.com/users/Codertocat/followers - following-url: https://api.github.com/users/Codertocat/following{/other_user} - gists-url: https://api.github.com/users/Codertocat/gists{/gist_id} - starred-url: https://api.github.com/users/Codertocat/starred{/owner}{/repo} - subscriptions-url: https://api.github.com/users/Codertocat/subscriptions - organizations-url: https://api.github.com/users/Codertocat/orgs - repos-url: https://api.github.com/users/Codertocat/repos - events-url: https://api.github.com/users/Codertocat/events{/privacy} - received-events-url: https://api.github.com/users/Codertocat/received_events - site-admin: false - format: User diff --git a/pkg/component/application/github/v0/config/setup.yaml b/pkg/component/application/github/v0/config/setup.yaml index 3557cec59..7dc5bb093 100644 --- a/pkg/component/application/github/v0/config/setup.yaml +++ b/pkg/component/application/github/v0/config/setup.yaml @@ -1,22 +1,21 @@ additionalProperties: false properties: token: - description: Fill in your GitHub access token for advanced usages. For more information - about how to create tokens, please refer to the github + description: Fill in your GitHub access token for advanced usages. For more information about how to create tokens, please refer to the github settings. acceptFormats: - - string + - string instillSecret: true uiOrder: 0 title: Token format: string required: -- token + - token instillOAuthConfig: authUrl: https://github.com/login/oauth/authorize accessUrl: https://github.com/login/oauth/access_token scopes: - - repo - - admin:repo_hook + - repo + - admin:repo_hook title: GitHub Connection format: object diff --git a/pkg/component/application/github/v0/config/tasks.yaml b/pkg/component/application/github/v0/config/tasks.yaml index 7fff24ef3..9cd4f996b 100644 --- a/pkg/component/application/github/v0/config/tasks.yaml +++ b/pkg/component/application/github/v0/config/tasks.yaml @@ -142,14 +142,14 @@ $defs: description: Owner of the repository. uiOrder: 0 acceptFormats: - - string + - string title: Owner format: string repository: description: Repository name. uiOrder: 1 acceptFormats: - - string + - string title: Repository format: string reviewComments: @@ -181,59 +181,49 @@ $defs: title: Comment path format: string line: - shortDescription: The last line of the range that your comment applies to. - Your comment will be placed under this line. - description: 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. + shortDescription: The last line of the range that your comment applies to. Your comment will be placed under this line. + description: 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. uiOrder: 6 title: Comment end line format: integer start-line: - description: The first line in the pull request diff that your multi-line - comment applies to. Only multi-line comment needs to fill this field. + description: The first line in the pull request diff that your multi-line comment applies to. Only multi-line comment needs to fill this field. uiOrder: 7 title: Comment start line format: integer side: - shortDescription: 'Side of the end line, can be one of: LEFT, RIGHT, side. - Default is side.' - description: '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.' + shortDescription: 'Side of the end line, can be one of: LEFT, RIGHT, side. Default is side.' + description: '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.' default: side enum: - - LEFT - - RIGHT - - side + - LEFT + - RIGHT + - side uiOrder: 8 title: Comment end side format: string start-side: - shortDescription: 'Side of the start line, can be one of: LEFT, RIGHT, side. - Default is side.' - description: '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.' + shortDescription: 'Side of the start line, can be one of: LEFT, RIGHT, side. Default is side.' + description: '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.' default: side enum: - - LEFT - - RIGHT - - side + - LEFT + - RIGHT + - side uiOrder: 9 title: Comment start side format: string subject-type: - description: 'Subject type of the comment, can be one of: line, file. Default - is line.' + description: 'Subject type of the comment, can be one of: line, file. Default is line.' uiOrder: 10 title: Comment type default: line enum: - - line - - file + - line + - file format: string created-at: description: Time the comment was created. @@ -323,7 +313,7 @@ $defs: uiOrder: 100 title: Page acceptFormats: - - integer + - integer format: integer per-page: default: 30 @@ -331,7 +321,7 @@ $defs: uiOrder: 101 title: Per Page acceptFormats: - - integer + - integer format: integer format: object TASK_CREATE_ISSUE: @@ -344,17 +334,17 @@ TASK_CREATE_ISSUE: title: $ref: '#/$defs/issue/properties/title' acceptFormats: - - string + - string uiOrder: 3 body: $ref: '#/$defs/issue/properties/body' acceptFormats: - - string + - string uiOrder: 4 assignees: $ref: '#/$defs/issue/properties/assignees' acceptFormats: - - array + - array items: format: string title: Assignees @@ -362,16 +352,16 @@ TASK_CREATE_ISSUE: labels: $ref: '#/$defs/issue/properties/labels' acceptFormats: - - array + - array items: format: string title: Labels uiOrder: 6 required: - - owner - - repository - - title - - body + - owner + - repository + - title + - body title: Input format: object output: @@ -384,9 +374,8 @@ TASK_CREATE_ISSUE: format: object TASK_CREATE_REVIEW_COMMENT: shortDescription: Create a review comment in pull request. - description: 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. + description: 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: description: Please input the repository name and owner, and the PR number. uiOrder: 0 @@ -396,7 +385,7 @@ TASK_CREATE_REVIEW_COMMENT: title: PR Number description: Number of the PR. acceptFormats: - - integer + - integer uiOrder: 3 format: integer comment: @@ -407,53 +396,53 @@ TASK_CREATE_REVIEW_COMMENT: commit-id: $ref: '#/$defs/reviewComments/properties/commit-id' acceptFormats: - - string + - string uiOrder: 0 body: $ref: '#/$defs/reviewComments/properties/body' acceptFormats: - - string + - string uiOrder: 1 path: $ref: '#/$defs/reviewComments/properties/path' acceptFormats: - - string + - string uiOrder: 2 start-line: $ref: '#/$defs/reviewComments/properties/start-line' acceptFormats: - - integer + - integer uiOrder: 3 line: $ref: '#/$defs/reviewComments/properties/line' acceptFormats: - - integer + - integer uiOrder: 4 start-side: $ref: '#/$defs/reviewComments/properties/start-side' acceptFormats: - - string + - string uiOrder: 5 side: $ref: '#/$defs/reviewComments/properties/side' acceptFormats: - - string + - string uiOrder: 6 subject-type: $ref: '#/$defs/reviewComments/properties/subject-type' acceptFormats: - - string + - string uiOrder: 7 required: - - body - - path - - commit-id + - body + - path + - commit-id format: object required: - - owner - - repository - - pr-number - - comment + - owner + - repository + - pr-number + - comment title: Input format: object output: @@ -475,19 +464,19 @@ TASK_CREATE_WEBHOOK: title: Webhook URL description: URL to send the payload to. acceptFormats: - - string + - string uiOrder: 3 format: string events: title: Events - description: Events to trigger the webhook. Please see the - github document for more information. + description: Events to trigger the webhook. Please see the github document + for more information. acceptFormats: - - array + - array uiOrder: 4 items: acceptFormats: - - string + - string format: string format: array active: @@ -495,36 +484,34 @@ TASK_CREATE_WEBHOOK: default: false description: Whether the webhook is active. Default is false. acceptFormats: - - boolean + - boolean uiOrder: 5 format: boolean content-type: default: json title: Content Type - description: 'Content type of the webhook, can be one of: json, form. Default - is json.' + description: 'Content type of the webhook, can be one of: json, form. Default is json.' enum: - - json - - form + - json + - form acceptFormats: - - string + - string uiOrder: 6 format: string hook-secret: title: Hook Secret - description: If provided, the secret will be used as the key to generate the - HMAC hex digest value for delivery signature headers. (see the + description: If provided, the secret will be used as the key to generate the HMAC hex digest value for delivery signature headers. (see the document). instillSecret: true acceptFormats: - - string + - string uiOrder: 7 format: string required: - - owner - - repository - - hook-url - - events + - owner + - repository + - hook-url + - events title: Input format: object output: @@ -586,12 +573,12 @@ TASK_GET_COMMIT: sha: $ref: '#/$defs/commit/properties/sha' acceptFormats: - - string + - string uiOrder: 3 required: - - owner - - repository - - sha + - owner + - repository + - sha title: Input format: object output: @@ -603,8 +590,7 @@ TASK_GET_COMMIT: title: Output format: object TASK_GET_ISSUE: - description: Get an issue. This can be a pull request or a general issue, and you - can tell by the `is-pull-request` field. + description: Get an issue. This can be a pull request or a general issue, and you can tell by the `is-pull-request` field. shortDescription: Get an issue. input: description: Please input the repository name and owner. @@ -616,13 +602,13 @@ TASK_GET_ISSUE: title: Issue Number description: Number of the issue. acceptFormats: - - integer + - integer uiOrder: 4 format: integer required: - - owner - - repository - - issue-number + - owner + - repository + - issue-number title: Input format: object output: @@ -634,8 +620,7 @@ TASK_GET_ISSUE: title: Output format: object TASK_GET_PULL_REQUEST: - shortDescription: Get a pull request from a repository, given the PR number. This - will default to the latest PR if no PR number is provided. + shortDescription: Get a pull request from a repository, given the PR number. This will default to the latest PR if no PR number is provided. input: description: Please input the repository name and owner, and the PR number. uiOrder: 0 @@ -646,12 +631,12 @@ TASK_GET_PULL_REQUEST: title: PR Number description: Number of the PR. `0` for the latest PR. acceptFormats: - - integer + - integer uiOrder: 4 format: integer required: - - owner - - repository + - owner + - repository title: Input format: object output: @@ -662,8 +647,7 @@ TASK_GET_PULL_REQUEST: title: Output format: object TASK_LIST_ISSUES: - description: Get the list of all issues in a repository,This can be a pull request - or a general issue, and you can tell by the `is-pull-request` field. + description: Get the list of all issues in a repository,This can be a pull request or a general issue, and you can tell by the `is-pull-request` field. shortDescription: Get the list of all issues in a repository input: description: Please input the repository name and owner. @@ -673,58 +657,53 @@ TASK_LIST_ISSUES: state: default: open title: State - description: 'State of the issues, can be one of: open, closed, all. Default - is open.' + description: 'State of the issues, can be one of: open, closed, all. Default is open.' enum: - - open - - closed - - all + - open + - closed + - all acceptFormats: - - string + - string uiOrder: 10 format: string sort: default: created title: Sort - description: Sort the issues by created, updated, popularity, or long-running. - Default is created. + description: Sort the issues by created, updated, popularity, or long-running. Default is created. enum: - - created - - updated - - popularity - - long-running + - created + - updated + - popularity + - long-running acceptFormats: - - string + - string uiOrder: 11 format: string direction: default: desc title: Direction - description: 'Direction of the sort, can be one of: asc, desc. Default is - desc.' + description: 'Direction of the sort, can be one of: asc, desc. Default is desc.' enum: - - asc - - desc + - asc + - desc acceptFormats: - - string + - string uiOrder: 12 format: string since: default: '2021-01-01' title: Since - description: Date (in `YYYY-MM-DD` format) from which issues will start to - be fetched. The date will be in the UTC timezone. + description: Date (in `YYYY-MM-DD` format) from which issues will start to be fetched. The date will be in the UTC timezone. acceptFormats: - - string + - string uiOrder: 13 format: string no-pull-request: title: No Pull Request - description: Whether to `not` include pull requests in the response. Since - issue and pr use the same indexing system in GitHub, the API returns all - relevant objects (issues and pr). Default is false. + description: Whether to `not` include pull requests in the response. Since issue and pr use the same indexing system in GitHub, the API returns + all relevant objects (issues and pr). Default is false. acceptFormats: - - boolean + - boolean uiOrder: 14 format: boolean page: @@ -733,7 +712,7 @@ TASK_LIST_ISSUES: uiOrder: 100 title: Page acceptFormats: - - integer + - integer format: integer per-page: default: 30 @@ -741,11 +720,11 @@ TASK_LIST_ISSUES: uiOrder: 101 title: Per Page acceptFormats: - - integer + - integer format: integer required: - - owner - - repository + - owner + - repository title: Input format: object output: @@ -762,14 +741,13 @@ TASK_LIST_ISSUES: description: An issue in GitHub. format: array required: - - issues + - issues title: Output format: object TASK_LIST_PULL_REQUESTS: shortDescription: Get the list of all pull requests in a repository - description: 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. + description: 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: description: Please input the repository name and owner. uiOrder: 0 @@ -780,25 +758,24 @@ TASK_LIST_PULL_REQUESTS: title: State description: State of the PRs, including open, closed, all. Default is open. enum: - - open - - closed - - all + - open + - closed + - all acceptFormats: - - string + - string uiOrder: 10 format: string sort: default: created title: Sort - description: Sort the PRs by created, updated, popularity, or long-running. - Default is created. + description: Sort the PRs by created, updated, popularity, or long-running. Default is created. enum: - - created - - updated - - popularity - - long-running + - created + - updated + - popularity + - long-running acceptFormats: - - string + - string uiOrder: 11 format: string direction: @@ -806,10 +783,10 @@ TASK_LIST_PULL_REQUESTS: title: Direction description: Direction of the sort, including asc or desc. Default is desc. enum: - - asc - - desc + - asc + - desc acceptFormats: - - string + - string uiOrder: 12 format: string page: @@ -818,7 +795,7 @@ TASK_LIST_PULL_REQUESTS: uiOrder: 100 title: Page acceptFormats: - - integer + - integer format: integer per-page: default: 30 @@ -826,11 +803,11 @@ TASK_LIST_PULL_REQUESTS: uiOrder: 101 title: Per Page acceptFormats: - - integer + - integer format: integer required: - - owner - - repository + - owner + - repository title: Input format: object output: @@ -847,26 +824,23 @@ TASK_LIST_PULL_REQUESTS: description: A pull request in GitHub. format: array required: - - pull-requests + - pull-requests title: Output format: object TASK_LIST_REVIEW_COMMENTS: shortDescription: Get the review comments in a pull request - description: Get the review comments in a pull request. The comments can be on a - specific line or on the PR as a whole. + description: Get the review comments in a pull request. The comments can be on a specific line or on the PR as a whole. input: - description: Please input the repository name and owner, and the PR number. Set - PR number as`0` to get all comments on all PRs in the repository. + description: Please input the repository name and owner, and the PR number. Set PR number as`0` to get all comments on all PRs in the repository. uiOrder: 0 properties: $ref: '#/$defs/repositoryInfo' pr-number: default: 0 title: PR Number - description: Number of the PR. Default is `0`, which retrieves all comments - on all PRs in the repository. + description: Number of the PR. Default is `0`, which retrieves all comments on all PRs in the repository. acceptFormats: - - integer + - integer uiOrder: 4 format: integer sort: @@ -874,10 +848,10 @@ TASK_LIST_REVIEW_COMMENTS: title: Sort description: Sort the comments by created, updated. Default is created. enum: - - created - - updated + - created + - updated acceptFormats: - - string + - string uiOrder: 11 format: string direction: @@ -885,19 +859,18 @@ TASK_LIST_REVIEW_COMMENTS: title: Direction description: Direction of the sort, including asc or desc. Default is desc. enum: - - asc - - desc + - asc + - desc acceptFormats: - - string + - string uiOrder: 12 format: string since: default: '2021-01-01' title: Since - description: Date (in `YYYY-MM-DD` format) from which comments will start - to be fetched. The date will be in the UTC timezone. + description: Date (in `YYYY-MM-DD` format) from which comments will start to be fetched. The date will be in the UTC timezone. acceptFormats: - - string + - string uiOrder: 13 format: string page: @@ -906,7 +879,7 @@ TASK_LIST_REVIEW_COMMENTS: uiOrder: 100 title: Page acceptFormats: - - integer + - integer format: integer per-page: default: 30 @@ -914,11 +887,11 @@ TASK_LIST_REVIEW_COMMENTS: uiOrder: 101 title: Per Page acceptFormats: - - integer + - integer format: integer required: - - owner - - repository + - owner + - repository title: Input format: object output: @@ -936,6 +909,6 @@ TASK_LIST_REVIEW_COMMENTS: description: Comments in the PR. format: array required: - - comments + - comments title: Output format: object diff --git a/pkg/component/application/googlesearch/v0/config/definition.yaml b/pkg/component/application/googlesearch/v0/config/definition.yaml index a0eac5ae5..20e7025bb 100644 --- a/pkg/component/application/googlesearch/v0/config/definition.yaml +++ b/pkg/component/application/googlesearch/v0/config/definition.yaml @@ -1,5 +1,5 @@ availableTasks: -- TASK_SEARCH + - 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/googlesearch/v0/config/setup.yaml b/pkg/component/application/googlesearch/v0/config/setup.yaml index 9cc691683..d9811e038 100644 --- a/pkg/component/application/googlesearch/v0/config/setup.yaml +++ b/pkg/component/application/googlesearch/v0/config/setup.yaml @@ -7,19 +7,16 @@ properties: title: API Key format: string cse-id: - description: 'ID of the Search Engine to use. Before using the Custom Search JSON - API you will first need to create and configure your Programmable Search Engine. - If you have not already created a Programmable Search Engine, you can start - by visiting [the Programmable Search Engine control panel](https://programmablesearchengine.google.com/controlpanel/all). -
You can find this in the URL of your Search Engine. For example, if the - URL of your search engine is `https://cse.google.com/cse.js?cx=012345678910`, + description: 'ID of the Search Engine to use. Before using the Custom Search JSON API you will first need to create and configure your Programmable + Search Engine. If you have not already created a Programmable Search Engine, you can start by visiting [the Programmable Search Engine control panel](https://programmablesearchengine.google.com/controlpanel/all). +
You can find this in the URL of your Search Engine. For example, if the URL of your search engine is `https://cse.google.com/cse.js?cx=012345678910`, the ID value is: `012345678910`.' instillSecret: false uiOrder: 1 title: Search Engine ID format: string required: -- api-key -- cse-id + - api-key + - cse-id title: Google Search Connection format: object diff --git a/pkg/component/application/googlesearch/v0/config/tasks.yaml b/pkg/component/application/googlesearch/v0/config/tasks.yaml index 151949595..848804782 100644 --- a/pkg/component/application/googlesearch/v0/config/tasks.yaml +++ b/pkg/component/application/googlesearch/v0/config/tasks.yaml @@ -4,45 +4,42 @@ $defs: link: description: The full URL to which the search result is pointing, e.g., http://www.example.com/foo/bar. acceptFormats: - - string + - string uiOrder: 1 title: Link format: string link-html: - description: The scraped raw html of the link associated with this search - result. + description: The scraped raw html of the link associated with this search result. acceptFormats: - - string + - string uiOrder: 4 title: Link HTML format: string link-text: - description: The scraped text of the link associated with this search result, - in plain text. + description: The scraped text of the link associated with this search result, in plain text. acceptFormats: - - string + - string uiOrder: 3 title: Link Text format: string snippet: - description: The snippet from the page associated with this search result, - in plain text. + description: The snippet from the page associated with this search result, in plain text. acceptFormats: - - string + - string uiOrder: 2 title: Snippet format: string title: description: The title of a search result, in plain text. acceptFormats: - - string + - string uiOrder: 0 title: Title format: string required: - - title - - link - - snippet + - title + - link + - snippet title: Result format: object TASK_SEARCH: @@ -52,26 +49,24 @@ TASK_SEARCH: properties: include-link-html: default: false - description: Indicate whether to scrape the link and include the raw HTML - of the link associated with this search result in the 'link-html' field. + description: Indicate whether to scrape the link and include the raw HTML of the link associated with this search result in the 'link-html' field. acceptFormats: - - boolean + - boolean uiOrder: 3 title: Include Link HTML format: boolean include-link-text: default: false - description: Indicate whether to scrape the link and include the text of the - link associated with this search result in the 'link-text' field. + description: Indicate whether to scrape the link and include the text of the link associated with this search result in the 'link-text' field. acceptFormats: - - boolean + - boolean uiOrder: 2 title: Include Link Text format: boolean query: description: The search query for Google. acceptFormats: - - string + - string uiOrder: 0 title: Query format: string @@ -79,14 +74,14 @@ TASK_SEARCH: default: 10 description: The number of results to return for each query. acceptFormats: - - integer + - integer uiOrder: 1 maximum: 100 minimum: 1 title: Top K format: integer required: - - query + - query title: Input format: object output: @@ -100,6 +95,6 @@ TASK_SEARCH: title: Results format: array required: - - results + - results title: Output format: object diff --git a/pkg/component/application/hubspot/v0/config/definition.yaml b/pkg/component/application/hubspot/v0/config/definition.yaml index 765ca4b2e..9af8d1e92 100644 --- a/pkg/component/application/hubspot/v0/config/definition.yaml +++ b/pkg/component/application/hubspot/v0/config/definition.yaml @@ -1,19 +1,19 @@ 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 + - 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/hubspot/v0/config/setup.yaml b/pkg/component/application/hubspot/v0/config/setup.yaml index 26d3d3515..f484ea118 100644 --- a/pkg/component/application/hubspot/v0/config/setup.yaml +++ b/pkg/component/application/hubspot/v0/config/setup.yaml @@ -1,15 +1,14 @@ additionalProperties: false properties: token: - description: Fill in your HubSpot private app access token. Go here for [more - information](https://developers.hubspot.com/docs/api/private-apps). + description: Fill in your HubSpot private app access token. Go here for [more information](https://developers.hubspot.com/docs/api/private-apps). acceptFormats: - - string + - string instillSecret: true uiOrder: 0 title: Token format: string required: -- token + - token title: HubSpot Connection format: object diff --git a/pkg/component/application/hubspot/v0/config/tasks.yaml b/pkg/component/application/hubspot/v0/config/tasks.yaml index 8d284f1e4..fafc6a024 100644 --- a/pkg/component/application/hubspot/v0/config/tasks.yaml +++ b/pkg/component/application/hubspot/v0/config/tasks.yaml @@ -17,7 +17,7 @@ $defs: description: Existing contact IDs to be associated with the object. title: Create Object -> Contact Association using contact IDs acceptFormats: - - array + - array items: format: string format: array @@ -25,7 +25,7 @@ $defs: description: Existing deal IDs to be associated with the object. title: Create Object -> Deal Association using deal IDs acceptFormats: - - array + - array items: format: string format: array @@ -33,7 +33,7 @@ $defs: description: Existing company IDs to be associated with the object. title: Create Object -> Company Association using company IDs acceptFormats: - - array + - array items: format: string format: array @@ -41,7 +41,7 @@ $defs: description: Existing ticket IDs to be associated with the object. title: Create Object -> Ticket Association using ticket IDs acceptFormats: - - array + - array items: format: string format: array @@ -62,8 +62,7 @@ $defs: title: Last Name format: string phone-number: - description: 'Phone number. If you plan to use the number formatting feature - in HubSpot, use country code + phone number. Example: +886xxxxxxxxx.' + description: 'Phone number. If you plan to use the number formatting feature in HubSpot, use country code + phone number. Example: +886xxxxxxxxx.' uiOrder: 4 title: Phone Number format: string @@ -78,16 +77,13 @@ $defs: title: Job Title format: string lifecycle-stage: - description: '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.' + description: '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.' uiOrder: 7 title: Lifecycle Stage format: string lead-status: - description: 'The contact''s sales, prospecting or outreach status. Default - format is in capital letters, with _ as space. Example: IN_PROGRESS. However, + description: '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.' uiOrder: 8 title: Lead Status @@ -99,17 +95,14 @@ $defs: title: Deal Name format: string pipeline: - description: A pipeline is the place where you document and manage how your - prospects move through the steps of your sales process. HubSpot uses interval + description: 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. uiOrder: 2 title: Pipeline format: string deal-stage: - description: '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.' + description: '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.' uiOrder: 3 title: Deal Stage format: string @@ -119,15 +112,13 @@ $defs: title: Amount format: number deal-type: - description: '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.' + description: '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.' uiOrder: 5 title: Deal Type format: string close-date: - description: 'Date the deal was closed. Set automatically by HubSpot. Format - is in ISO 8601. Example: 2024-07-01T11:47:40.388Z.' + description: 'Date the deal was closed. Set automatically by HubSpot. Format is in ISO 8601. Example: 2024-07-01T11:47:40.388Z.' uiOrder: 6 title: Close Date format: string @@ -153,14 +144,13 @@ $defs: title: Description format: string phone-number: - description: 'Phone number of the company. If you plan to use the number formatting - feature in HubSpot, use country code + phone number. Example: +886xxxxxxxxx.' + description: 'Phone number of the company. If you plan to use the number formatting feature in HubSpot, use country code + phone number. Example: + +886xxxxxxxxx.' uiOrder: 4 title: Phone Number format: string industry: - description: 'The industry the company belongs to. Default format is in capital - letters, with _ as space. Example: BROADCAST_MEDIA.' + description: 'The industry the company belongs to. Default format is in capital letters, with _ as space. Example: BROADCAST_MEDIA.' uiOrder: 5 title: Industry format: string @@ -216,37 +206,31 @@ $defs: title: Ticket Name format: string ticket-status: - description: '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.' + description: '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.' uiOrder: 2 title: Ticket Status format: string pipeline: - description: 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. + description: 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. uiOrder: 3 title: Pipeline format: string categories: - description: 'The main reason customer reached out for help. Default format - is in capital letters. Example: BILLING_ISSUE. However, remember to check + description: '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.' uiOrder: 4 title: Categories format: array priority: - description: '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.' + description: '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.' uiOrder: 5 title: Priority format: string source: - description: 'Channel where ticket was originally submitted. Default format - is in capital letters. Example: EMAIL.' + description: 'Channel where ticket was originally submitted. Default format is in capital letters. Example: EMAIL.' uiOrder: 6 title: Source format: string @@ -272,15 +256,14 @@ TASK_GET_CONTACT: uiOrder: 0 properties: contact-id-or-email: - description: Input contact ID or email. If the input has @, it will search - the contact using email. + description: Input contact ID or email. If the input has @, it will search the contact using email. acceptFormats: - - string + - string uiOrder: 0 title: Contact ID or Email format: string required: - - contact-id-or-email + - contact-id-or-email title: Input format: object output: @@ -330,7 +313,7 @@ TASK_GET_CONTACT: title: Contact ID format: string required: - - contact-id + - contact-id title: Output format: object TASK_CREATE_CONTACT: @@ -342,39 +325,39 @@ TASK_CREATE_CONTACT: owner-id: $ref: '#/$defs/common/owner-id' acceptFormats: - - string + - string email: $ref: '#/$defs/contact/email' acceptFormats: - - string + - string first-name: $ref: '#/$defs/contact/first-name' acceptFormats: - - string + - string last-name: $ref: '#/$defs/contact/last-name' acceptFormats: - - string + - string phone-number: $ref: '#/$defs/contact/phone-number' acceptFormats: - - string + - string company: $ref: '#/$defs/contact/company' acceptFormats: - - string + - string job-title: $ref: '#/$defs/contact/job-title' acceptFormats: - - string + - string lifecycle-stage: $ref: '#/$defs/contact/lifecycle-stage' acceptFormats: - - string + - string lead-status: $ref: '#/$defs/contact/lead-status' acceptFormats: - - string + - string create-deals-association: $ref: '#/$defs/common/create-deals-association' uiOrder: 9 @@ -385,7 +368,7 @@ TASK_CREATE_CONTACT: $ref: '#/$defs/common/create-tickets-association' uiOrder: 11 required: - - email + - email title: Input format: object output: @@ -399,7 +382,7 @@ TASK_CREATE_CONTACT: title: Contact ID format: string required: - - contact-id + - contact-id title: Output format: object TASK_GET_DEAL: @@ -411,12 +394,12 @@ TASK_GET_DEAL: deal-id: description: Input deal ID. acceptFormats: - - string + - string uiOrder: 0 title: Deal ID format: string required: - - deal-id + - deal-id title: Input format: object output: @@ -459,9 +442,9 @@ TASK_GET_DEAL: $ref: '#/$defs/common/associated-contact-ids' uiOrder: 8 required: - - deal-name - - pipeline - - deal-stage + - deal-name + - pipeline + - deal-stage title: Output format: object TASK_CREATE_DEAL: @@ -473,38 +456,38 @@ TASK_CREATE_DEAL: owner-id: $ref: '#/$defs/common/owner-id' acceptFormats: - - string + - string deal-name: $ref: '#/$defs/deal/deal-name' acceptFormats: - - string + - string pipeline: $ref: '#/$defs/deal/pipeline' acceptFormats: - - string + - string deal-stage: $ref: '#/$defs/deal/deal-stage' acceptFormats: - - string + - string amount: $ref: '#/$defs/deal/amount' acceptFormats: - - number + - number deal-type: $ref: '#/$defs/deal/deal-type' acceptFormats: - - string + - string close-date: $ref: '#/$defs/deal/close-date' acceptFormats: - - string + - string create-contacts-association: $ref: '#/$defs/common/create-contacts-association' uiOrder: 7 required: - - deal-name - - pipeline - - deal-stage + - deal-name + - pipeline + - deal-stage title: Input format: object output: @@ -518,7 +501,7 @@ TASK_CREATE_DEAL: title: Deal ID format: string required: - - deal-id + - deal-id title: Output format: object TASK_UPDATE_DEAL: @@ -530,43 +513,43 @@ TASK_UPDATE_DEAL: deal-id: description: Input deal ID. acceptFormats: - - string + - string uiOrder: 0 title: Deal ID format: string owner-id: $ref: '#/$defs/common/owner-id' acceptFormats: - - string + - string deal-name: $ref: '#/$defs/deal/deal-name' acceptFormats: - - string + - string pipeline: $ref: '#/$defs/deal/pipeline' acceptFormats: - - string + - string deal-stage: $ref: '#/$defs/deal/deal-stage' acceptFormats: - - string + - string amount: $ref: '#/$defs/deal/amount' acceptFormats: - - number + - number deal-type: $ref: '#/$defs/deal/deal-type' acceptFormats: - - string + - string close-date: $ref: '#/$defs/deal/close-date' acceptFormats: - - string + - string create-contacts-association: $ref: '#/$defs/common/create-contacts-association' uiOrder: 7 required: - - deal-id + - deal-id title: Input format: object output: @@ -586,8 +569,8 @@ TASK_UPDATE_DEAL: title: Updated At format: string required: - - updated-by-user-id - - updated-at + - updated-by-user-id + - updated-at title: Output format: object TASK_GET_COMPANY: @@ -599,12 +582,12 @@ TASK_GET_COMPANY: company-id: description: Input company ID. acceptFormats: - - string + - string uiOrder: 0 title: Company ID format: string required: - - company-id + - company-id title: Input format: object output: @@ -686,64 +669,64 @@ TASK_CREATE_COMPANY: owner-id: $ref: '#/$defs/common/owner-id' acceptFormats: - - string + - string company-name: $ref: '#/$defs/company/company-name' acceptFormats: - - string + - string company-domain: $ref: '#/$defs/company/company-domain' acceptFormats: - - string + - string description: $ref: '#/$defs/company/description' acceptFormats: - - string + - string phone-number: $ref: '#/$defs/company/phone-number' acceptFormats: - - string + - string industry: $ref: '#/$defs/company/industry' acceptFormats: - - string + - string company-type: $ref: '#/$defs/company/company-type' acceptFormats: - - string + - string city: $ref: '#/$defs/company/city' acceptFormats: - - string + - string state: $ref: '#/$defs/company/state' acceptFormats: - - string + - string country: $ref: '#/$defs/company/country' acceptFormats: - - string + - string postal-code,: $ref: '#/$defs/company/postal-code' acceptFormats: - - string + - string time-zone: $ref: '#/$defs/company/time-zone' acceptFormats: - - string + - string annual-revenue: $ref: '#/$defs/company/annual-revenue' acceptFormats: - - number + - number linkedin-page: $ref: '#/$defs/company/linkedin-page' acceptFormats: - - string + - string create-contacts-association: $ref: '#/$defs/common/create-contacts-association' uiOrder: 15 required: - - company-domain + - company-domain title: Input format: object output: @@ -757,7 +740,7 @@ TASK_CREATE_COMPANY: title: Company ID format: string required: - - company-id + - company-id title: Output format: object TASK_GET_TICKET: @@ -769,12 +752,12 @@ TASK_GET_TICKET: ticket-id: description: Input ticket ID. acceptFormats: - - string + - string uiOrder: 0 title: Ticket ID format: string required: - - ticket-id + - ticket-id title: Input format: object output: @@ -828,9 +811,9 @@ TASK_GET_TICKET: $ref: '#/$defs/common/associated-contact-ids' uiOrder: 10 required: - - ticket-name - - ticket-status - - pipeline + - ticket-name + - ticket-status + - pipeline title: Output format: object TASK_CREATE_TICKET: @@ -842,40 +825,40 @@ TASK_CREATE_TICKET: owner-id: $ref: '#/$defs/common/owner-id' acceptFormats: - - string + - string ticket-name: $ref: '#/$defs/ticket/ticket-name' acceptFormats: - - string + - string ticket-status: $ref: '#/$defs/ticket/ticket-status' acceptFormats: - - string + - string pipeline: $ref: '#/$defs/ticket/pipeline' acceptFormats: - - string + - string categories: $ref: '#/$defs/ticket/categories' acceptFormats: - - array + - array items: format: string priority: $ref: '#/$defs/ticket/priority' acceptFormats: - - string + - string source: $ref: '#/$defs/ticket/source' acceptFormats: - - string + - string create-contacts-association: $ref: '#/$defs/common/create-contacts-association' uiOrder: 7 required: - - ticket-name - - ticket-status - - pipeline + - ticket-name + - ticket-status + - pipeline title: Input format: object output: @@ -889,7 +872,7 @@ TASK_CREATE_TICKET: title: Ticket ID format: string required: - - ticket-id + - ticket-id title: Output format: object TASK_UPDATE_TICKET: @@ -901,45 +884,45 @@ TASK_UPDATE_TICKET: ticket-id: description: Input ticket ID. acceptFormats: - - string + - string uiOrder: 0 title: Ticket ID format: string owner-id: $ref: '#/$defs/common/owner-id' acceptFormats: - - string + - string ticket-name: $ref: '#/$defs/ticket/ticket-name' acceptFormats: - - string + - string ticket-status: $ref: '#/$defs/ticket/ticket-status' acceptFormats: - - string + - string pipeline: $ref: '#/$defs/ticket/pipeline' acceptFormats: - - string + - string categories: $ref: '#/$defs/ticket/categories' acceptFormats: - - array + - array items: format: string priority: $ref: '#/$defs/ticket/priority' acceptFormats: - - string + - string source: $ref: '#/$defs/ticket/source' acceptFormats: - - string + - string create-contacts-association: $ref: '#/$defs/common/create-contacts-association' uiOrder: 7 required: - - ticket-id + - ticket-id title: Input format: object output: @@ -953,13 +936,12 @@ TASK_UPDATE_TICKET: title: Updated At format: string required: - - updated-at + - updated-at title: Output format: object TASK_GET_THREAD: - shortDescription: 'Retrieve all the messages inside a thread (conversation inbox). - The messages will be sorted from most recent to least recent. Note: This task - uses Conversation API from HubSpot, which is still in BETA.' + shortDescription: 'Retrieve all the messages inside a thread (conversation inbox). The messages will be sorted from most recent to least recent. Note: + This task uses Conversation API from HubSpot, which is still in BETA.' input: description: Input thread ID. uiOrder: 0 @@ -967,12 +949,12 @@ TASK_GET_THREAD: thread-id: description: Input thread ID. acceptFormats: - - string + - string uiOrder: 0 title: Thread ID format: string required: - - thread-id + - thread-id title: Input format: object output: @@ -1007,8 +989,7 @@ TASK_GET_THREAD: title: Type format: string sender-value: - description: 'Contains the actual sender information (e.g.: email - address).' + description: 'Contains the actual sender information (e.g.: email address).' uiOrder: 2 title: Value format: string @@ -1018,7 +999,7 @@ TASK_GET_THREAD: title: Actor ID format: string required: - - sender-actor-id + - sender-actor-id format: object recipients: description: Recipients' information. @@ -1033,8 +1014,7 @@ TASK_GET_THREAD: title: Name format: string value: - description: 'Contains the actual recipient information (e.g.: - email address).' + description: 'Contains the actual recipient information (e.g.: email address).' uiOrder: 2 title: Value format: string @@ -1059,9 +1039,8 @@ TASK_GET_THREAD: title: Subject format: string channel-id: - description: The ID of a generic channel returned from the channels - endpoint, like 1000 for live chat, 1001 for Facebook Messenger, 1002 - for email, etc. + description: The ID of a generic channel returned from the channels endpoint, like 1000 for live chat, 1001 for Facebook Messenger, 1002 for + email, etc. uiOrder: 5 required: [] title: Channel ID @@ -1073,10 +1052,10 @@ TASK_GET_THREAD: title: Channel Account ID format: string required: - - created-at - - text - - channel-id - - channel-account-id + - created-at + - text + - channel-id + - channel-account-id format: object format: array no-of-messages: @@ -1086,8 +1065,8 @@ TASK_GET_THREAD: title: Number of Messages format: integer required: - - results - - no-of-messages + - results + - no-of-messages title: Output format: object TASK_INSERT_MESSAGE: @@ -1099,17 +1078,15 @@ TASK_INSERT_MESSAGE: thread-id: description: Input thread ID. acceptFormats: - - string + - string uiOrder: 0 title: Thread ID format: string sender-actor-id: - description: 'Input sender actor id. Example: A-12345678. To obtain this, - it is recommended to use and copy the ''Get Thread task'' sender output. - For [more information](https://developers.hubspot.com/beta-docs/guides/api/conversations/inbox-and-messages#get-actors) - about actor id.' + description: 'Input sender actor id. Example: A-12345678. To obtain this, it is recommended to use and copy the ''Get Thread task'' sender output. + For [more information](https://developers.hubspot.com/beta-docs/guides/api/conversations/inbox-and-messages#get-actors) about actor id.' acceptFormats: - - string + - string uiOrder: 1 title: Sender Actor ID format: string @@ -1117,41 +1094,40 @@ TASK_INSERT_MESSAGE: description: Recipients of the message. title: Recipients acceptFormats: - - array + - array uiOrder: 2 items: format: string format: array channel-account-id: - description: The ID of an account that is part of the channel-id channel. - On an existing thread, it is recommended to copy channel-account-id of the - most recent message on the thread. + description: The ID of an account that is part of the channel-id channel. On an existing thread, it is recommended to copy channel-account-id of + the most recent message on the thread. acceptFormats: - - string + - string uiOrder: 3 title: Channel Account ID format: string subject: description: The subject of the message. acceptFormats: - - string + - string uiOrder: 4 title: Subject format: string text: description: The body of the message. acceptFormats: - - string + - string uiOrder: 5 title: Text format: string required: - - thread-id - - sender-actor-id - - recipients - - channel-account-id - - subject - - text + - thread-id + - sender-actor-id + - recipients + - channel-account-id + - subject + - text title: Input format: object output: @@ -1165,15 +1141,13 @@ TASK_INSERT_MESSAGE: title: Status format: string required: - - status + - status title: Output format: object TASK_RETRIEVE_ASSOCIATION: - shortDescription: 'Get the object IDs associated with contact ID (contact->objects). - If you are trying to do the opposite (object->contacts), it is possible using - the other tasks. Example: Go to get deal task to obtain deal->contacts. Remember - to check that the contact ID you input exists, because there won''t be an error - message if the contact ID doesn''t exist.' + shortDescription: 'Get the object IDs associated with contact ID (contact->objects). If you are trying to do the opposite (object->contacts), it is possible + using the other tasks. Example: Go to get deal task to obtain deal->contacts. Remember to check that the contact ID you input exists, because there + won''t be an error message if the contact ID doesn''t exist.' input: description: Contact ID and object type (CRM objects or Thread). uiOrder: 0 @@ -1181,27 +1155,26 @@ TASK_RETRIEVE_ASSOCIATION: contact-id: description: Input contact ID. acceptFormats: - - string + - string uiOrder: 0 title: Contact ID format: string object-type: enum: - - Deals - - Companies - - Tickets - - Threads + - Deals + - Companies + - Tickets + - Threads example: Deals - description: 'Input object type (CRM objects or ''Threads''). Note: CRM objects - include ''Deals'', ''Companies'', ''Tickets'', etc.' + description: 'Input object type (CRM objects or ''Threads''). Note: CRM objects include ''Deals'', ''Companies'', ''Tickets'', etc.' acceptFormats: - - string + - string uiOrder: 1 title: Object Type format: string required: - - contact-id - - object-type + - contact-id + - object-type title: Input format: object output: @@ -1224,39 +1197,37 @@ TASK_RETRIEVE_ASSOCIATION: title: Object IDs Length format: integer required: - - object-ids - - object-ids-length + - object-ids + - object-ids-length title: Output format: object TASK_GET_OWNER: - shortDescription: 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) + shortDescription: 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: description: Owner information and type. uiOrder: 0 properties: id-type: enum: - - Owner ID - - User ID + - Owner ID + - User ID example: Owner ID description: Specify the type of ID you will use to get owner's information. acceptFormats: - - string + - string uiOrder: 0 title: ID Type format: string id: - description: Can either be owner ID or user ID; according to the ID type you - selected. + description: Can either be owner ID or user ID; according to the ID type you selected. acceptFormats: - - string + - string uiOrder: 1 title: ID format: string required: - - id-type - - id + - id-type + - id title: Input format: object output: @@ -1288,8 +1259,7 @@ TASK_GET_OWNER: title: Owner ID format: string user-id: - description: User ID. Usually used to indicate the owner who performed the - action. User ID can be seen in Update Deal task output. + description: User ID. Usually used to indicate the owner who performed the action. User ID can be seen in Update Deal task output. uiOrder: 4 required: [] title: User ID @@ -1317,9 +1287,9 @@ TASK_GET_OWNER: title: Team Primary format: boolean required: - - team-name - - team-id - - team-primary + - team-name + - team-id + - team-primary format: object format: array created-at: @@ -1341,14 +1311,14 @@ TASK_GET_OWNER: title: Archived format: boolean required: - - first-name - - last-name - - email - - owner-id - - user-id - - created-at - - updated-at - - archived + - first-name + - last-name + - email + - owner-id + - user-id + - created-at + - updated-at + - archived title: Output format: object TASK_GET_ALL: @@ -1359,21 +1329,21 @@ TASK_GET_ALL: properties: object-type: enum: - - Contacts - - Deals - - Companies - - Tickets - - Threads - - Owners + - Contacts + - Deals + - Companies + - Tickets + - Threads + - Owners example: Contacts description: The object which you want to get all IDs for. acceptFormats: - - string + - string uiOrder: 0 title: Object Type format: string required: - - object-type + - object-type title: Input format: object output: @@ -1396,7 +1366,7 @@ TASK_GET_ALL: title: Object IDs Length format: integer required: - - object-ids - - object-ids-length + - object-ids + - object-ids-length title: Output format: object diff --git a/pkg/component/application/jira/v0/config/definition.yaml b/pkg/component/application/jira/v0/config/definition.yaml index 2d24f2715..8bfc2bfc6 100644 --- a/pkg/component/application/jira/v0/config/definition.yaml +++ b/pkg/component/application/jira/v0/config/definition.yaml @@ -1,13 +1,13 @@ 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 + - 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/jira/v0/config/setup.yaml b/pkg/component/application/jira/v0/config/setup.yaml index 9ea65efca..e522d7a0e 100644 --- a/pkg/component/application/jira/v0/config/setup.yaml +++ b/pkg/component/application/jira/v0/config/setup.yaml @@ -1,10 +1,9 @@ additionalProperties: false properties: token: - description: Fill in your Jira API token. You can generate one from your Jira - account "settings > security > API tokens". + description: Fill in your Jira API token. You can generate one from your Jira account "settings > security > API tokens". acceptFormats: - - string + - string instillSecret: true uiOrder: 0 title: Token @@ -12,21 +11,20 @@ properties: email: description: Fill in your Jira email address. acceptFormats: - - string + - string uiOrder: 1 title: Email format: string base-url: - description: Fill in your Jira base URL. For example, if your Jira URL is "https://mycompany.atlassian.net/...", - then your base URL is https://mycompany.atlassian.net. + description: Fill in your Jira base URL. For example, if your Jira URL is "https://mycompany.atlassian.net/...", then your base URL is https://mycompany.atlassian.net. acceptFormats: - - string + - string uiOrder: 1 title: Base URL format: string required: -- token -- email -- base-url + - token + - email + - base-url title: Jira Connection format: object diff --git a/pkg/component/application/jira/v0/config/tasks.yaml b/pkg/component/application/jira/v0/config/tasks.yaml index 96161f706..ffa8d24ec 100644 --- a/pkg/component/application/jira/v0/config/tasks.yaml +++ b/pkg/component/application/jira/v0/config/tasks.yaml @@ -2,12 +2,11 @@ $defs: common-query-params: start-at: default: 0 - description: 'The starting index of the returned boards. Base index: 0. Default - is 0.' + description: 'The starting index of the returned boards. Base index: 0. Default is 0.' uiOrder: 3 title: Start At acceptFormats: - - integer + - integer format: integer max-results: default: 50 @@ -15,15 +14,14 @@ $defs: uiOrder: 4 title: Max Results acceptFormats: - - integer + - integer format: integer update-history: - description: Whether the action taken is added to the user's Recent history, - as shown under `Your Work` in Jira. + description: Whether the action taken is added to the user's Recent history, as shown under `Your Work` in Jira. title: Update History uiOrder: 5 acceptFormats: - - boolean + - boolean format: boolean issue: properties: @@ -38,7 +36,7 @@ $defs: shortDescription: The key of the issue uiOrder: 1 acceptFormats: - - string + - string format: string self: description: The URL of the issue. @@ -72,10 +70,10 @@ $defs: title: Status format: string required: - - id - - key - - self - - fields + - id + - key + - self + - fields title: Issue format: object sprint: @@ -102,22 +100,19 @@ $defs: format: string start-date: title: Start Date - description: The start date of the sprint, e.g. 2018-03-05 (default 00:00 - UTC+0). To adjust your time zone, please provide a more detailed RFC3339 + description: The start date of the sprint, e.g. 2018-03-05 (default 00:00 UTC+0). To adjust your time zone, please provide a more detailed RFC3339 format like `2018-03-05T09:00:00Z0000`. uiOrder: 4 format: string end-date: title: End Date - description: The end date of the sprint, e.g. 2018-03-05 (default 00:00 UTC+0). - To adjust your time zone, please provide a more detailed RFC3339 format - like `2018-03-05T09:00:00Z0000`. + description: The end date of the sprint, e.g. 2018-03-05 (default 00:00 UTC+0). To adjust your time zone, please provide a more detailed RFC3339 + format like `2018-03-05T09:00:00Z0000`. uiOrder: 5 format: string complete-date: title: Complete Date - description: The complete date of the sprint, e.g. 2018-03-05 (default 00:00 - UTC+0). To adjust your time zone, please provide a more detailed RFC3339 + description: The complete date of the sprint, e.g. 2018-03-05 (default 00:00 UTC+0). To adjust your time zone, please provide a more detailed RFC3339 format like `2018-03-05T09:00:00Z0000`. uiOrder: 6 format: string @@ -132,8 +127,8 @@ $defs: uiOrder: 8 format: string required: - - id - - self + - id + - self title: Sprint format: object TASK_CREATE_ISSUE: @@ -149,7 +144,7 @@ TASK_CREATE_ISSUE: shortDescription: The key of the project uiOrder: 0 acceptFormats: - - string + - string format: string issue-type: title: Issue Type @@ -157,79 +152,78 @@ TASK_CREATE_ISSUE: uiOrder: 1 additionalProperties: true required: - - issue-type - oneOf: - - properties: - issue-type: - title: Issue Type - const: Epic - description: Epic. - uiOrder: 0 - format: string - required: - - issue-type - description: Epic. - uiOrder: 0 - title: Epic - format: object - - properties: - issue-type: - title: Issue Type - const: Task - description: Task. - uiOrder: 0 - format: string - required: - - issue-type - description: Task. - uiOrder: 0 - title: Task - format: object - - properties: - issue-type: - title: Issue Type - const: Subtask - description: Subtask. - uiOrder: 0 - format: string - parent-key: - title: Parent Key - description: The key of the parent issue, e.g. `JRA-1330`. - shortDescription: The key of the parent issue - uiOrder: 10 - acceptFormats: - - string - format: string - required: - - issue-type - - parent-key - description: Subtask. - uiOrder: 0 - title: Subtask - format: object - - properties: - issue-type: - title: Issue Type - const: Other - description: Other. - uiOrder: 0 - format: string - custom-issue-type: - title: Issue Type - description: 'The type of the issue, can be: `Task`, `Epic`, `Subtask`, - etc.' - shortDescription: The type of the issue - uiOrder: 1 - acceptFormats: - - string - format: string - required: - issue-type - - custom-issue-type - description: Other. - uiOrder: 0 - title: Other - format: object + oneOf: + - properties: + issue-type: + title: Issue Type + const: Epic + description: Epic. + uiOrder: 0 + format: string + required: + - issue-type + description: Epic. + uiOrder: 0 + title: Epic + format: object + - properties: + issue-type: + title: Issue Type + const: Task + description: Task. + uiOrder: 0 + format: string + required: + - issue-type + description: Task. + uiOrder: 0 + title: Task + format: object + - properties: + issue-type: + title: Issue Type + const: Subtask + description: Subtask. + uiOrder: 0 + format: string + parent-key: + title: Parent Key + description: The key of the parent issue, e.g. `JRA-1330`. + shortDescription: The key of the parent issue + uiOrder: 10 + acceptFormats: + - string + format: string + required: + - issue-type + - parent-key + description: Subtask. + uiOrder: 0 + title: Subtask + format: object + - properties: + issue-type: + title: Issue Type + const: Other + description: Other. + uiOrder: 0 + format: string + custom-issue-type: + title: Issue Type + description: 'The type of the issue, can be: `Task`, `Epic`, `Subtask`, etc.' + shortDescription: The type of the issue + uiOrder: 1 + acceptFormats: + - string + format: string + required: + - issue-type + - custom-issue-type + description: Other. + uiOrder: 0 + title: Other + format: object format: object summary: title: Summary @@ -237,7 +231,7 @@ TASK_CREATE_ISSUE: shortDescription: The summary of the issue uiOrder: 2 acceptFormats: - - string + - string format: string description: title: Description @@ -245,11 +239,11 @@ TASK_CREATE_ISSUE: shortDescription: The description of the issue uiOrder: 3 acceptFormats: - - string + - string format: string required: - - project-key - - issue-type + - project-key + - issue-type title: Input format: object output: @@ -272,7 +266,7 @@ TASK_CREATE_SPRINT: shortDescription: The name of the board uiOrder: 0 acceptFormats: - - string + - string format: string name: title: Name @@ -280,7 +274,7 @@ TASK_CREATE_SPRINT: shortDescription: The name of the sprint uiOrder: 1 acceptFormats: - - string + - string format: string goal: title: Goal @@ -288,34 +282,32 @@ TASK_CREATE_SPRINT: shortDescription: The goal of the sprint uiOrder: 2 acceptFormats: - - string + - string format: string start-date: title: Start Date - description: The start date of the sprint, e.g. 2018-03-05 (default 00:00 - UTC+0). To adjust your time zone, please provide a more detailed RFC3339 + description: The start date of the sprint, e.g. 2018-03-05 (default 00:00 UTC+0). To adjust your time zone, please provide a more detailed RFC3339 format like `2018-03-05T09:00:00Z0000`. shortDescription: The start date of the sprint uiOrder: 3 acceptFormats: - - string + - string format: string end-date: title: End Date - description: The end date of the sprint, e.g. 2018-03-05 (default 00:00 UTC+0). - To adjust your time zone, please provide a more detailed RFC3339 format - like `2018-03-05T09:00:00Z0000`. + description: The end date of the sprint, e.g. 2018-03-05 (default 00:00 UTC+0). To adjust your time zone, please provide a more detailed RFC3339 + format like `2018-03-05T09:00:00Z0000`. shortDescription: The end date of the sprint uiOrder: 4 acceptFormats: - - string + - string format: string required: - - board-name - - name - - goal - - start-date - - end-date + - board-name + - name + - goal + - start-date + - end-date title: Input format: object output: @@ -326,9 +318,8 @@ TASK_CREATE_SPRINT: format: object format: object TASK_GET_ISSUE: - description: Get an issue in Jira. The issue will only be returned if the user has - permission to view it. Issues returned from this resource include Agile fields, - like sprint, closedSprints, flagged, and epic. + description: Get an issue in Jira. The issue will only be returned if the user has permission to view it. Issues returned from this resource include Agile + fields, like sprint, closedSprints, flagged, and epic. shortDescription: Get an issue in Jira input: description: Get an issue in Jira. @@ -340,13 +331,13 @@ TASK_GET_ISSUE: shortDescription: The key of the issue uiOrder: 0 acceptFormats: - - string + - string format: string update-history: $ref: '#/$defs/common-query-params/update-history' uiOrder: 1 required: - - issue-key + - issue-key title: Input format: object output: @@ -357,9 +348,8 @@ TASK_GET_ISSUE: format: object format: object TASK_GET_SPRINT: - description: Get a sprint in Jira. The sprint will only be returned if the user - can view the board that the sprint was created on, or view at least one of the - issues in the sprint. + description: Get a sprint in Jira. The sprint will only be returned if the user can view the board that the sprint was created on, or view at least one + of the issues in the sprint. shortDescription: Get a sprint in Jira input: description: Get an sprint in Jira. @@ -367,16 +357,15 @@ TASK_GET_SPRINT: properties: sprint-id: title: Sprint ID - description: The ID of the sprint. The sprint will only be returned if you - can view the board that the sprint was created on, or view at least one + description: The ID of the sprint. The sprint will only be returned if you can view the board that the sprint was created on, or view at least one of the issues in the sprint. shortDescription: The ID of the sprint uiOrder: 0 acceptFormats: - - integer + - integer format: integer required: - - sprint-id + - sprint-id title: Input format: object output: @@ -396,35 +385,32 @@ TASK_LIST_BOARDS: project-key-or-id: default: '' title: Project Key or ID - description: This filters results to boards that are relevant to a project. - Relevance meaning that the JQL filter defined in board contains a reference + description: This filters results to boards that are relevant to a project. Relevance meaning that the JQL filter defined in board contains a reference to a project. shortDescription: The project key or ID, e.g. `INS`. Default is empty uiOrder: 0 acceptFormats: - - string + - string format: string board-type: default: simple - description: 'The type of board, can be: scrum, kanban, simple. Default is - simple.' + description: 'The type of board, can be: scrum, kanban, simple. Default is simple.' uiOrder: 1 enum: - - scrum - - kanban - - simple + - scrum + - kanban + - simple title: Board Type acceptFormats: - - string + - string format: string name: default: '' - description: Name filters results to boards that match or partially match - the specified name. Default is empty. + description: Name filters results to boards that match or partially match the specified name. Default is empty. uiOrder: 2 title: Name acceptFormats: - - string + - string format: string start-at: $ref: '#/$defs/common-query-params/start-at' @@ -466,10 +452,10 @@ TASK_LIST_BOARDS: title: Type format: string required: - - id - - name - - type - - self + - id + - name + - type + - self format: object format: array start-at: @@ -493,10 +479,10 @@ TASK_LIST_BOARDS: title: Is Last format: boolean required: - - start-at - - max-results - - total - - is-last + - start-at + - max-results + - total + - is-last title: Output format: object format: object @@ -513,7 +499,7 @@ TASK_LIST_ISSUES: shortDescription: The name of the board uiOrder: 0 acceptFormats: - - string + - string format: string range: title: Range @@ -521,141 +507,140 @@ TASK_LIST_ISSUES: uiOrder: 1 additionalProperties: true required: - - range - oneOf: - - properties: - range: - title: Range - const: All - description: All issues. - uiOrder: 0 - format: string - required: - - range - description: All issues. - uiOrder: 0 - title: All - format: object - - properties: - range: - title: Range - const: Standard Issues - description: Standard issues. - uiOrder: 0 - format: string - required: - - range - description: Standard issues. - uiOrder: 0 - title: Standard Issues - format: object - - properties: - range: - title: Range - const: Epics only - description: Epics only. - uiOrder: 0 - format: string - required: - - range - description: Epics only. - uiOrder: 0 - title: Epics only - format: object - - properties: - range: - title: Range - const: In backlog only - description: In backlog only. - uiOrder: 0 - format: string - required: - - range - description: In backlog only. - uiOrder: 0 - title: In Backlog Only - format: object - - properties: - range: - title: Range - const: Issues of an epic - description: Issues of an epic. - uiOrder: 0 - format: string - epic-key: - title: Epic Key - description: The Key of the epic, e.g. `JRA-1330`. - shortDescription: The Key of the epic - uiOrder: 10 - acceptFormats: - - string - format: string - required: - - range - - epic-key - description: Issues of an epic. - uiOrder: 0 - title: Issues of an Epic - format: object - - properties: - range: - title: Range - const: Issues of a sprint - description: Issues of a sprint. - uiOrder: 0 - format: string - sprint-name: - title: Sprint Name - description: The name of the sprint. - shortDescription: The Name of the sprint - uiOrder: 10 - acceptFormats: - - string - format: string - required: - - range - - sprint-name - description: Issues of a sprint. - uiOrder: 0 - title: Issues of a Sprint - format: object - - properties: - range: - title: Range - const: Issues without epic assigned - description: Issues without epic assigned. - uiOrder: 0 - format: string - required: - - range - description: Issues without Epic Assigned. - uiOrder: 0 - title: Issues without Epic Assigned - format: object - - properties: - range: - title: Range - const: JQL query - description: JQL query. - uiOrder: 0 - format: string - jql: - title: JQL - description: The JQL query. For example, `type = "Task" AND status = - "Done"`. For more information, see Advanced - searching. - shortDescription: The JQL query - uiOrder: 10 - acceptFormats: - - string - format: string - required: - range - - jql - description: JQL query. - uiOrder: 0 - title: JQL Query - format: object + oneOf: + - properties: + range: + title: Range + const: All + description: All issues. + uiOrder: 0 + format: string + required: + - range + description: All issues. + uiOrder: 0 + title: All + format: object + - properties: + range: + title: Range + const: Standard Issues + description: Standard issues. + uiOrder: 0 + format: string + required: + - range + description: Standard issues. + uiOrder: 0 + title: Standard Issues + format: object + - properties: + range: + title: Range + const: Epics only + description: Epics only. + uiOrder: 0 + format: string + required: + - range + description: Epics only. + uiOrder: 0 + title: Epics only + format: object + - properties: + range: + title: Range + const: In backlog only + description: In backlog only. + uiOrder: 0 + format: string + required: + - range + description: In backlog only. + uiOrder: 0 + title: In Backlog Only + format: object + - properties: + range: + title: Range + const: Issues of an epic + description: Issues of an epic. + uiOrder: 0 + format: string + epic-key: + title: Epic Key + description: The Key of the epic, e.g. `JRA-1330`. + shortDescription: The Key of the epic + uiOrder: 10 + acceptFormats: + - string + format: string + required: + - range + - epic-key + description: Issues of an epic. + uiOrder: 0 + title: Issues of an Epic + format: object + - properties: + range: + title: Range + const: Issues of a sprint + description: Issues of a sprint. + uiOrder: 0 + format: string + sprint-name: + title: Sprint Name + description: The name of the sprint. + shortDescription: The Name of the sprint + uiOrder: 10 + acceptFormats: + - string + format: string + required: + - range + - sprint-name + description: Issues of a sprint. + uiOrder: 0 + title: Issues of a Sprint + format: object + - properties: + range: + title: Range + const: Issues without epic assigned + description: Issues without epic assigned. + uiOrder: 0 + format: string + required: + - range + description: Issues without Epic Assigned. + uiOrder: 0 + title: Issues without Epic Assigned + format: object + - properties: + range: + title: Range + const: JQL query + description: JQL query. + uiOrder: 0 + format: string + jql: + title: JQL + description: The JQL query. For example, `type = "Task" AND status = "Done"`. For more information, see Advanced + searching. + shortDescription: The JQL query + uiOrder: 10 + acceptFormats: + - string + format: string + required: + - range + - jql + description: JQL query. + uiOrder: 0 + title: JQL Query + format: object format: object start-at: $ref: '#/$defs/common-query-params/start-at' @@ -664,7 +649,7 @@ TASK_LIST_ISSUES: $ref: '#/$defs/common-query-params/max-results' uiOrder: 4 required: - - board-name + - board-name title: Input format: object output: @@ -694,9 +679,9 @@ TASK_LIST_ISSUES: title: Total format: integer required: - - start-at - - max-results - - total + - start-at + - max-results + - total title: Output format: object format: object @@ -713,7 +698,7 @@ TASK_LIST_SPRINTS: shortDescription: The ID of the board uiOrder: 0 acceptFormats: - - integer + - integer format: integer start-at: $ref: '#/$defs/common-query-params/start-at' @@ -722,7 +707,7 @@ TASK_LIST_SPRINTS: $ref: '#/$defs/common-query-params/max-results' uiOrder: 2 required: - - board-id + - board-id title: Input format: object output: @@ -752,9 +737,9 @@ TASK_LIST_SPRINTS: title: Total format: integer required: - - start-at - - max-results - - total + - start-at + - max-results + - total title: Output format: object format: object @@ -774,7 +759,7 @@ TASK_UPDATE_ISSUE: description: Whether to notify users. uiOrder: 1 acceptFormats: - - boolean + - boolean format: boolean update: title: Update @@ -782,82 +767,81 @@ TASK_UPDATE_ISSUE: uiOrder: 1 additionalProperties: true required: - - update - oneOf: - - properties: - update: - title: Update - const: Custom Update - description: Custom update. - uiOrder: 0 - format: string - update-fields: - title: Update Fields - description: The fields to update. - acceptFormats: - - array - items: - properties: - action: - description: 'The action to perform, can be: `add`, `copy`, `edit`, - `remove`, `set`.' - enum: - - add - - copy - - edit - - remove - - set - uiOrder: 3 - title: Action - format: string - field-name: - description: The name of the field to update. - uiOrder: 4 - title: Field Name - format: string - value: - description: The value of the field to update. - uiOrder: 5 - title: Value - format: string - required: - - action - - field-name - format: object - uiOrder: 1 - format: array - required: - update - - update-fields - description: Custom update. - uiOrder: 0 - title: Custom Update - format: object - - properties: - update: - title: Update - const: Move Issue to Epic - description: Move issue to epic. - uiOrder: 0 - format: string - epic-key: - title: Epic Key - description: The key of the epic, e.g. `JRA-1330`. - shortDescription: The key of the epic - uiOrder: 11 - acceptFormats: - - string - format: string - required: - - update - - epic-key - description: Move issue to epic. - uiOrder: 0 - title: Move Issue to Epic - format: object + oneOf: + - properties: + update: + title: Update + const: Custom Update + description: Custom update. + uiOrder: 0 + format: string + update-fields: + title: Update Fields + description: The fields to update. + acceptFormats: + - array + items: + properties: + action: + description: 'The action to perform, can be: `add`, `copy`, `edit`, `remove`, `set`.' + enum: + - add + - copy + - edit + - remove + - set + uiOrder: 3 + title: Action + format: string + field-name: + description: The name of the field to update. + uiOrder: 4 + title: Field Name + format: string + value: + description: The value of the field to update. + uiOrder: 5 + title: Value + format: string + required: + - action + - field-name + format: object + uiOrder: 1 + format: array + required: + - update + - update-fields + description: Custom update. + uiOrder: 0 + title: Custom Update + format: object + - properties: + update: + title: Update + const: Move Issue to Epic + description: Move issue to epic. + uiOrder: 0 + format: string + epic-key: + title: Epic Key + description: The key of the epic, e.g. `JRA-1330`. + shortDescription: The key of the epic + uiOrder: 11 + acceptFormats: + - string + format: string + required: + - update + - epic-key + description: Move issue to epic. + uiOrder: 0 + title: Move Issue to Epic + format: object format: object required: - - issue-key + - issue-key title: Input format: object output: @@ -880,7 +864,7 @@ TASK_UPDATE_SPRINT: shortDescription: The ID of the sprint uiOrder: 0 acceptFormats: - - integer + - integer format: integer name: title: Name @@ -888,7 +872,7 @@ TASK_UPDATE_SPRINT: shortDescription: The name of the sprint uiOrder: 1 acceptFormats: - - string + - string format: string goal: title: Goal @@ -896,52 +880,48 @@ TASK_UPDATE_SPRINT: shortDescription: The goal of the sprint uiOrder: 2 acceptFormats: - - string + - string format: string start-date: title: Start Date - description: The start date of the sprint, e.g. 2018-03-05 (default 00:00 - UTC+0). To adjust your time zone, please provide a more detailed RFC3339 + description: The start date of the sprint, e.g. 2018-03-05 (default 00:00 UTC+0). To adjust your time zone, please provide a more detailed RFC3339 format like `2018-03-05T09:00:00Z0000`. shortDescription: The start date of the sprint uiOrder: 3 acceptFormats: - - string + - string format: string end-date: title: End Date - description: The end date of the sprint, e.g. 2018-03-05 (default 00:00 UTC+0). - To adjust your time zone, please provide a more detailed RFC3339 format - like `2018-03-05T09:00:00Z0000`. + description: The end date of the sprint, e.g. 2018-03-05 (default 00:00 UTC+0). To adjust your time zone, please provide a more detailed RFC3339 + format like `2018-03-05T09:00:00Z0000`. shortDescription: The end date of the sprint uiOrder: 4 acceptFormats: - - string + - string format: string current-state: title: Current State - description: 'The current state of the sprint, can be: `future`, `active`, - `closed`.' + description: 'The current state of the sprint, can be: `future`, `active`, `closed`.' shortDescription: The current state of the sprint uiOrder: 5 acceptFormats: - - string + - string format: string enter-next-state: title: Enter Next State - description: Whether to enter the next state. If `true`, the sprint will enter - the next state, i.e., `future` -> `active` -> `closed`. + description: Whether to enter the next state. If `true`, the sprint will enter the next state, i.e., `future` -> `active` -> `closed`. shortDescription: Whether to enter the next state uiOrder: 6 acceptFormats: - - boolean + - boolean format: boolean required: - - sprint-id - - name - - start-date - - end-date - - current-state + - sprint-id + - name + - start-date + - end-date + - current-state title: Input format: object output: diff --git a/pkg/component/application/leadiq/v0/config/definition.yaml b/pkg/component/application/leadiq/v0/config/definition.yaml index 8b7d18525..7cc66cf9b 100644 --- a/pkg/component/application/leadiq/v0/config/definition.yaml +++ b/pkg/component/application/leadiq/v0/config/definition.yaml @@ -1,5 +1,5 @@ availableTasks: -- TASK_FIND_PROSPECTS + - TASK_FIND_PROSPECTS documentationUrl: https://www.instill.tech/docs/component/application/leadiq icon: assets/leadiq.svg id: leadiq diff --git a/pkg/component/application/leadiq/v0/config/setup.yaml b/pkg/component/application/leadiq/v0/config/setup.yaml index 5774318ab..c625699ab 100644 --- a/pkg/component/application/leadiq/v0/config/setup.yaml +++ b/pkg/component/application/leadiq/v0/config/setup.yaml @@ -1,15 +1,14 @@ additionalProperties: false properties: api-key: - description: Fill in your LeadIQ Secret Base64 API key, you can find it in [API - Key](https://account.leadiq.com/app/settings/api-keys). + description: Fill in your LeadIQ Secret Base64 API key, you can find it in [API Key](https://account.leadiq.com/app/settings/api-keys). acceptFormats: - - string + - string instillSecret: true uiOrder: 0 title: API Key format: string required: -- api-key + - api-key title: LeadIQ Connection format: object diff --git a/pkg/component/application/leadiq/v0/config/tasks.yaml b/pkg/component/application/leadiq/v0/config/tasks.yaml index 2b53de037..8081d7c13 100644 --- a/pkg/component/application/leadiq/v0/config/tasks.yaml +++ b/pkg/component/application/leadiq/v0/config/tasks.yaml @@ -1,9 +1,8 @@ TASK_FIND_PROSPECTS: title: Find Prospects - shortDescription: Find prospects' contact information based on the company name - you provide. - description: Find prospects' contact information based on the company name you provide. - And, it will filter out the prospects who are not relevant to your search. + shortDescription: Find prospects' contact information based on the company name you provide. + description: Find prospects' contact information based on the company name you provide. And, it will filter out the prospects who are not relevant to + your search. input: title: Input description: Provide the information for which you want to find prospects. @@ -16,30 +15,26 @@ TASK_FIND_PROSPECTS: title: Names description: Provide the company names for which you want to find prospects. acceptFormats: - - array + - array uiOrder: 0 format: array revenue-size: title: Revenue Size - description: Provide the min or max revenue size of the company you want - to find prospects. If you don't provide any value, it will return all - the prospects. If you set the company names, the revenue size will be - ignored. + description: Provide the min or max revenue size of the company you want to find prospects. If you don't provide any value, it will return all + the prospects. If you set the company names, the revenue size will be ignored. properties: min: title: Min - description: Provide the minimum revenue size of the company you want - to find prospects. + description: Provide the minimum revenue size of the company you want to find prospects. acceptFormats: - - integer + - integer uiOrder: 0 format: integer max: title: Max - description: Provide the maximum revenue size of the company you want - to find prospects. + description: Provide the maximum revenue size of the company you want to find prospects. acceptFormats: - - integer + - integer uiOrder: 1 format: integer required: [] @@ -47,52 +42,46 @@ TASK_FIND_PROSPECTS: format: object countries: title: Countries - description: Provide the countries of the company you want to find prospects. - If you don't provide any value, it will return all the prospects. + description: Provide the countries of the company you want to find prospects. If you don't provide any value, it will return all the prospects. acceptFormats: - - array + - array uiOrder: 2 format: array states: title: States - description: Provide the states of the company you want to find prospects. - If you don't provide any value, it will return all the prospects. + description: Provide the states of the company you want to find prospects. If you don't provide any value, it will return all the prospects. acceptFormats: - - array + - array uiOrder: 3 format: array cities: title: Cities - description: Provide the cities of the company you want to find prospects. - If you don't provide any value, it will return all the prospects. + description: Provide the cities of the company you want to find prospects. If you don't provide any value, it will return all the prospects. acceptFormats: - - array + - array uiOrder: 4 format: array industries: title: Industries - description: Provide the industries of the company you want to find prospects. - If you don't provide any value, it will return all the prospects. + description: Provide the industries of the company you want to find prospects. If you don't provide any value, it will return all the prospects. acceptFormats: - - array + - array uiOrder: 5 format: array descriptions: title: Descriptions - description: Provide the descriptions of the company you want to find - prospects. In LeadIQ, it will return the similar companies based on - the descriptions. + description: Provide the descriptions of the company you want to find prospects. In LeadIQ, it will return the similar companies based on the + descriptions. acceptFormats: - - array + - array uiOrder: 6 format: array technologies: title: Technologies - description: Provide the technologies used by the company you want to - find prospects. If you don't provide any value, it will return all the + description: Provide the technologies used by the company you want to find prospects. If you don't provide any value, it will return all the prospects. acceptFormats: - - array + - array uiOrder: 7 format: array required: [] @@ -100,51 +89,46 @@ TASK_FIND_PROSPECTS: format: object limit: title: Limit - description: Provide the number of prospects you want to find. If you don't - provide any value, it will return 10 prospects. The maximum limit is 60. - The minimum limit is 1. + description: Provide the number of prospects you want to find. If you don't provide any value, it will return 10 prospects. The maximum limit is + 60. The minimum limit is 1. default: 10 maximum: 60 minimum: 1 acceptFormats: - - integer + - integer uiOrder: 1 format: integer filter-by: title: Filter By - description: Provide the information about the prospects you want to filter. - You can filter the prospects based on job title, name, seniority, and function. - When it matches, the prospect will be included in the output. If you don't - provide any value, it will return all the prospects. + description: Provide the information about the prospects you want to filter. You can filter the prospects based on job title, name, seniority, and + function. When it matches, the prospect will be included in the output. If you don't provide any value, it will return all the prospects. properties: job-title: title: Job Title - description: Provide the job title of the prospects you want to filter - with [regular expression](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Guide/Regular_expressions). + description: Provide the job title of the prospects you want to filter with [regular expression](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Guide/Regular_expressions). acceptFormats: - - string + - string uiOrder: 0 format: string seniorities: title: Seniorities description: Provide the seniorities of the prospects you want to filter. acceptFormats: - - array + - array enum: - - Executive - - Director - - SeniorIndividualContributor - - VP - - Manager - - Other + - Executive + - Director + - SeniorIndividualContributor + - VP + - Manager + - Other uiOrder: 1 format: array function: title: Function - description: Provide the function of the prospects you want to filter - with [regular expression](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Guide/Regular_expressions). + description: Provide the function of the prospects you want to filter with [regular expression](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Guide/Regular_expressions). acceptFormats: - - string + - string uiOrder: 2 format: string required: [] @@ -152,20 +136,17 @@ TASK_FIND_PROSPECTS: format: object uiOrder: 0 required: - - company - - limit + - company + - limit format: object output: title: Output - description: The output will be the list of prospects' contact information based - on the company name you provide. It will include the name, job title, seniority, - and email address of the prospects, and other company information from LeadIQ - provided in the response. + description: The output will be the list of prospects' contact information based on the company name you provide. It will include the name, job title, + seniority, and email address of the prospects, and other company information from LeadIQ provided in the response. properties: prospects: title: Prospects - description: The list of prospects' contact information based on the company - information you provide. + description: The list of prospects' contact information based on the company information you provide. items: properties: name: @@ -210,8 +191,7 @@ TASK_FIND_PROSPECTS: format: string company-address: title: Company Address - description: The address of the company from LeadIQ. It combines the - city, state, and country. + description: The address of the company from LeadIQ. It combines the city, state, and country. uiOrder: 8 format: string company-technologies: @@ -232,20 +212,19 @@ TASK_FIND_PROSPECTS: title: Min description: The minimum revenue size of the company from LeadIQ. acceptFormats: - - integer + - integer uiOrder: 0 format: integer max: title: Max description: The maximum revenue size of the company from LeadIQ. acceptFormats: - - integer + - integer uiOrder: 1 format: integer description: title: Description - description: The description of the revenue size of the company - from LeadIQ. + description: The description of the revenue size of the company from LeadIQ. uiOrder: 2 format: string required: [] diff --git a/pkg/component/application/numbers/v0/config/definition.yaml b/pkg/component/application/numbers/v0/config/definition.yaml index 11938101d..89201cf06 100644 --- a/pkg/component/application/numbers/v0/config/definition.yaml +++ b/pkg/component/application/numbers/v0/config/definition.yaml @@ -1,5 +1,5 @@ availableTasks: -- TASK_REGISTER + - TASK_REGISTER custom: false documentationUrl: https://www.instill.tech/docs/component/application/numbers icon: assets/numbers.svg @@ -7,8 +7,8 @@ iconUrl: '' id: numbers public: true title: Numbers Protocol -description: Seamlessly integrate third-party blockchain services through the Numbers - Protocol, providing security, verifiability and traceability to data management. +description: Seamlessly integrate third-party blockchain services through the Numbers Protocol, providing security, verifiability and traceability to data + management. tombstone: false type: COMPONENT_TYPE_APPLICATION uid: 70d8664a-d512-4517-a5e8-5d4da81756a7 diff --git a/pkg/component/application/numbers/v0/config/setup.yaml b/pkg/component/application/numbers/v0/config/setup.yaml index 93b10786b..6898b3c5f 100644 --- a/pkg/component/application/numbers/v0/config/setup.yaml +++ b/pkg/component/application/numbers/v0/config/setup.yaml @@ -1,16 +1,15 @@ additionalProperties: false properties: capture-token: - description: Fill in your Capture token in the Capture App. To access your tokens, - you need a Capture App account and you can sign in with email or wallet to acquire - the Capture Token. + description: Fill in your Capture token in the Capture App. To access your tokens, you need a Capture App account and you can sign in with email or + wallet to acquire the Capture Token. acceptFormats: - - string + - string instillSecret: true uiOrder: 0 title: Capture token format: string required: -- capture-token + - capture-token title: Numbers Protocol Connection format: object diff --git a/pkg/component/application/numbers/v0/config/tasks.yaml b/pkg/component/application/numbers/v0/config/tasks.yaml index 1ad9ebb3b..b79bdceba 100644 --- a/pkg/component/application/numbers/v0/config/tasks.yaml +++ b/pkg/component/application/numbers/v0/config/tasks.yaml @@ -7,7 +7,7 @@ TASK_REGISTER: images: description: The images you want to upload to blockchain. acceptFormats: - - array + - array uiOrder: 0 items: contentEncoding: base64 @@ -17,21 +17,21 @@ TASK_REGISTER: headline: description: Headline of the asset. acceptFormats: - - string + - string uiOrder: 2 title: Headline format: string caption: description: Caption of the asset. acceptFormats: - - string + - string uiOrder: 1 title: Caption format: string asset-creator: description: Name of the asset creator. acceptFormats: - - string + - string uiOrder: 2 title: Asset Creator format: string @@ -39,20 +39,20 @@ TASK_REGISTER: default: trainedAlgorithmicMedia description: Specify the type of the source. More details here. enum: - - trainedAlgorithmicMedia - - trainedAlgorithmicData - - digitalCapture - - digitalArt - - algorithmicMedia + - trainedAlgorithmicMedia + - trainedAlgorithmicData + - digitalCapture + - digitalArt + - algorithmicMedia acceptFormats: - - string + - string uiOrder: 5 title: Digital Source Type format: string generated-by: description: The AI model used to generate the content. acceptFormats: - - string + - string uiOrder: 6 title: Generated By format: string @@ -63,7 +63,7 @@ TASK_REGISTER: document: description: URL of the license file. acceptFormats: - - string + - string instillEnableCopyButton: true uiOrder: 0 title: License Document @@ -71,7 +71,7 @@ TASK_REGISTER: name: description: License of the asset file. acceptFormats: - - string + - string uiOrder: 1 title: License Name format: string @@ -80,26 +80,24 @@ TASK_REGISTER: format: object mining-preference: default: notAllowed - description: Designates the selection made by the asset creators or licensed - owners to decide if the asset is suitable for inclusion in a data mining + description: Designates the selection made by the asset creators or licensed owners to decide if the asset is suitable for inclusion in a data mining or AI/ML training workflow. More details here. enum: - - dataMining - - aiInference - - notAllowed - - aiGenerativeTraining - - aiGenerativeTrainingWithAuthorship - - aiTraining - - aiTrainingWithAuthorship + - dataMining + - aiInference + - notAllowed + - aiGenerativeTraining + - aiGenerativeTrainingWithAuthorship + - aiTraining + - aiTrainingWithAuthorship acceptFormats: - - string - shortDescription: Designates the selection made by the asset creators or licensed - owners. More details here + - string + shortDescription: Designates the selection made by the asset creators or licensed owners. More details here uiOrder: 8 title: Mining Preference format: string required: - - images + - images title: Input format: object output: @@ -117,6 +115,6 @@ TASK_REGISTER: title: Asset Urls format: array required: - - asset-urls + - asset-urls title: Output format: object diff --git a/pkg/component/application/slack/v0/config/definition.yaml b/pkg/component/application/slack/v0/config/definition.yaml index 423d7eb09..172747b49 100644 --- a/pkg/component/application/slack/v0/config/definition.yaml +++ b/pkg/component/application/slack/v0/config/definition.yaml @@ -1,8 +1,8 @@ availableTasks: -- TASK_READ_MESSAGE -- TASK_WRITE_MESSAGE + - TASK_READ_MESSAGE + - TASK_WRITE_MESSAGE availableEvents: -- EVENT_NEW_MESSAGE + - EVENT_NEW_MESSAGE custom: false documentationUrl: https://www.instill.tech/docs/component/application/slack icon: assets/slack.svg diff --git a/pkg/component/application/slack/v0/config/events.yaml b/pkg/component/application/slack/v0/config/events.yaml index 59e00be38..ba33e2aed 100644 --- a/pkg/component/application/slack/v0/config/events.yaml +++ b/pkg/component/application/slack/v0/config/events.yaml @@ -30,8 +30,8 @@ EVENT_NEW_MESSAGE: title: Channel Name format: string required: - - id - - name + - id + - name title: Channel format: object user: @@ -58,14 +58,14 @@ EVENT_NEW_MESSAGE: title: Display Name format: string required: - - display-name + - display-name title: Profile format: object required: - - id - - name - - real-name - - profile + - id + - name + - real-name + - profile title: User format: object text: @@ -73,21 +73,21 @@ EVENT_NEW_MESSAGE: title: Message Text format: string required: - - timestamp - - channel - - user - - text + - timestamp + - channel + - user + - text title: New Message Event format: object messageExamples: - - timestamp: '1715159446.644219' - channel: - id: G0AKFJBEU - name: test_channel - user: - id: user123 - name: testuser - real-name: Test User - profile: - display-name: testuser - text: Hello, world! + - timestamp: '1715159446.644219' + channel: + id: G0AKFJBEU + name: test_channel + user: + id: user123 + name: testuser + real-name: Test User + profile: + display-name: testuser + text: Hello, world! diff --git a/pkg/component/application/slack/v0/config/setup.yaml b/pkg/component/application/slack/v0/config/setup.yaml index 25a33ccd1..11e049196 100644 --- a/pkg/component/application/slack/v0/config/setup.yaml +++ b/pkg/component/application/slack/v0/config/setup.yaml @@ -3,7 +3,7 @@ properties: bot-token: description: Token associated to the application bot. acceptFormats: - - string + - string instillSecret: true uiOrder: 0 title: Bot OAuth Token @@ -11,24 +11,24 @@ properties: user-token: description: Token to act on behalf of a Slack user. acceptFormats: - - string + - string instillSecret: true uiOrder: 1 title: User OAuth Token format: string required: -- bot-token + - bot-token instillOAuthConfig: authUrl: https://slack.com/oauth/v2/authorize accessUrl: https://slack.com/api/oauth.v2.access scopes: - - channels:history - - channels:read - - groups:history - - groups:read - - chat:write - - users:read - - users:read.email - - users.profile:read + - channels:history + - channels:read + - groups:history + - groups:read + - chat:write + - users:read + - users:read.email + - users.profile:read title: Slack Connection format: object diff --git a/pkg/component/application/slack/v0/config/tasks.yaml b/pkg/component/application/slack/v0/config/tasks.yaml index 44f01bd0b..30b5dc98c 100644 --- a/pkg/component/application/slack/v0/config/tasks.yaml +++ b/pkg/component/application/slack/v0/config/tasks.yaml @@ -12,28 +12,26 @@ $defs: TASK_READ_MESSAGE: shortDescription: Get the latest message since specific date input: - description: Please input the channel name and the date that we want to start - to read. + description: Please input the channel name and the date that we want to start to read. uiOrder: 0 properties: channel-name: description: Channel name, as displayed on Slack. acceptFormats: - - string + - string uiOrder: 0 title: Channel Name format: string start-to-read-date: - description: Date (in `YYYY-MM-DD` format) from which messages will start - to be fetched. If not provided, it will be 7 days before the current date. + description: Date (in `YYYY-MM-DD` format) from which messages will start to be fetched. If not provided, it will be 7 days before the current date. The date will be in the UTC timezone. acceptFormats: - - string + - string uiOrder: 1 title: Start to read date format: string required: - - channel-name + - channel-name title: Input format: object output: @@ -90,19 +88,19 @@ TASK_READ_MESSAGE: title: Replied Message format: string required: - - user-id - - datetime - - message + - user-id + - datetime + - message format: object format: array required: - - user-id - - message - - start-date + - user-id + - message + - start-date format: object format: array required: - - conversations + - conversations title: Output format: object TASK_WRITE_MESSAGE: @@ -115,29 +113,28 @@ TASK_WRITE_MESSAGE: channel-name: description: Channel name, as displayed on Slack. acceptFormats: - - string + - string uiOrder: 0 title: Channel Name format: string message: description: The message to be sent to the target channel. acceptFormats: - - string + - string uiOrder: 1 title: Message format: string as-user: default: false - description: Send the message on behalf of the user identified by the setup.user-token - field. + description: Send the message on behalf of the user identified by the setup.user-token field. uiOrder: 2 title: Send As User acceptFormats: - - boolean + - boolean format: boolean required: - - channel-name - - message + - channel-name + - message title: Input format: object output: @@ -151,6 +148,6 @@ TASK_WRITE_MESSAGE: title: Result format: string required: - - result + - result title: Output format: object diff --git a/pkg/component/application/smartlead/v0/config/definition.yaml b/pkg/component/application/smartlead/v0/config/definition.yaml index 9f5fb4aa0..4b1edbd3d 100644 --- a/pkg/component/application/smartlead/v0/config/definition.yaml +++ b/pkg/component/application/smartlead/v0/config/definition.yaml @@ -1,13 +1,13 @@ 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 + - 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/smartlead/v0/config/setup.yaml b/pkg/component/application/smartlead/v0/config/setup.yaml index 4349a66b8..96c2c786f 100644 --- a/pkg/component/application/smartlead/v0/config/setup.yaml +++ b/pkg/component/application/smartlead/v0/config/setup.yaml @@ -1,15 +1,14 @@ additionalProperties: false properties: api-key: - description: Fill in your Smartlead API key. You can generate one from your [Smartlead - account](https://app.smartlead.ai/app/settings/profile). + description: Fill in your Smartlead API key. You can generate one from your [Smartlead account](https://app.smartlead.ai/app/settings/profile). acceptFormats: - - string + - string instillSecret: true uiOrder: 0 title: API Key format: string required: -- api-key + - api-key title: Smartlead Connection format: object diff --git a/pkg/component/application/smartlead/v0/config/tasks.yaml b/pkg/component/application/smartlead/v0/config/tasks.yaml index dc41cd5ac..0c44386fa 100644 --- a/pkg/component/application/smartlead/v0/config/tasks.yaml +++ b/pkg/component/application/smartlead/v0/config/tasks.yaml @@ -1,7 +1,6 @@ TASK_CREATE_CAMPAIGN: title: Create Campaign - shortDescription: 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). + shortDescription: 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: title: Input description: Input parameters for creating a campaign. @@ -10,16 +9,15 @@ TASK_CREATE_CAMPAIGN: title: Name description: Name of the campaign. acceptFormats: - - string + - string uiOrder: 0 format: string required: - - name + - name format: object output: title: Output - description: Output for creating a campaign. You can use this output in the next - task. + description: Output for creating a campaign. You can use this output in the next task. properties: id: title: ID @@ -32,14 +30,13 @@ TASK_CREATE_CAMPAIGN: uiOrder: 1 format: string required: - - id - - created-at + - id + - created-at format: object TASK_SETUP_CAMPAIGN: title: Setup Campaign - shortDescription: 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. + shortDescription: 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: title: Input description: Input parameters for setting up a campaign. @@ -48,49 +45,45 @@ TASK_SETUP_CAMPAIGN: title: Campaign Name description: Name of the campaign. acceptFormats: - - string + - string uiOrder: 0 format: string timezone: title: Timezone - description: Timezone of the campaign. Please choose the value in [List of - Timezones](https://help.smartlead.ai/Timezones-20fcff9ddbb5441790c7c8e5ce0e9233). + description: Timezone of the campaign. Please choose the value in [List of Timezones](https://help.smartlead.ai/Timezones-20fcff9ddbb5441790c7c8e5ce0e9233). acceptFormats: - - string + - string uiOrder: 1 format: string days-of-the-week: title: Days of the Week - description: 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. + description: 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. items: acceptFormats: - - number + - number format: number uiOrder: 2 format: array start-hour: title: Start Hour - description: Start hour of the campaign. Time to start the campaign in 24-hour - format (HH:MM). + description: Start hour of the campaign. Time to start the campaign in 24-hour format (HH:MM). acceptFormats: - - string + - string uiOrder: 3 format: string end-hour: title: End Hour - description: End hour of the campaign. Time to end the campaign in 24-hour - format (HH:MM). + description: End hour of the campaign. Time to end the campaign in 24-hour format (HH:MM). acceptFormats: - - string + - string uiOrder: 4 format: string min-time-btw-emails: title: Minimum Time Between Emails - description: Minimum time between emails in minutes. The minimum value is - 3 minutes. + description: Minimum time between emails in minutes. The minimum value is 3 minutes. acceptFormats: - - number + - number minimum: 3 uiOrder: 5 format: number @@ -98,23 +91,22 @@ TASK_SETUP_CAMPAIGN: title: Maximum New Leads Per Day description: Maximum new leads per day. acceptFormats: - - number + - number uiOrder: 6 format: number schedule-start-time: title: Schedule Start Time - description: 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. + description: 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. acceptFormats: - - string + - string uiOrder: 7 format: string track-settings: title: Track Settings enum: - - DONT_TRACK_EMAIL_OPEN - - DONT_TRACK_LINK_CLICK - - DONT_TRACK_REPLY_TO_AN_EMAIL + - DONT_TRACK_EMAIL_OPEN + - DONT_TRACK_LINK_CLICK + - DONT_TRACK_REPLY_TO_AN_EMAIL description: Tracking settings like not tracking opens or link clicks. items: format: string @@ -124,8 +116,8 @@ TASK_SETUP_CAMPAIGN: title: Stop Lead Settings description: Stops lead if they do the action specified. enum: - - CLICK_ON_A_LINK - - OPEN_AN_EMAIL + - CLICK_ON_A_LINK + - OPEN_AN_EMAIL uiOrder: 9 format: string send-as-plain-text: @@ -135,10 +127,9 @@ TASK_SETUP_CAMPAIGN: format: boolean follow-up-percentage: title: Follow Up Percentage - description: Specifies the percentage of leads in a campaign who should receive - follow-up emails. + description: Specifies the percentage of leads in a campaign who should receive follow-up emails. acceptFormats: - - number + - number uiOrder: 11 format: number add-unsubscribe-tag: @@ -152,14 +143,14 @@ TASK_SETUP_CAMPAIGN: uiOrder: 13 format: boolean required: - - campaign-name - - timezone - - days-of-the-week - - start-hour - - end-hour - - min-time-btw-emails - - max-new-leads-per-day - - schedule-start-time + - campaign-name + - timezone + - days-of-the-week + - start-hour + - end-hour + - min-time-btw-emails + - max-new-leads-per-day + - schedule-start-time format: object output: title: Output @@ -171,14 +162,13 @@ TASK_SETUP_CAMPAIGN: uiOrder: 0 format: string required: - - schedule-setting-result - - general-setting-result + - schedule-setting-result + - general-setting-result format: object TASK_SAVE_SEQUENCES: title: Save Sequences - shortDescription: Save sequences to a campaign. A Smartlead sequence is a series - of automated emails sent to potential customers based on specific actions, or - triggers. + shortDescription: 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: title: Input description: Input parameters for saving sequences. @@ -187,51 +177,46 @@ TASK_SAVE_SEQUENCES: title: Campaign Name description: Name of the campaign. acceptFormats: - - string + - string uiOrder: 0 format: string sequences: title: Sequences - description: A Smartlead sequence is a series of automated emails sent to - potential customers based on specific actions, or triggers. + description: A Smartlead sequence is a series of automated emails sent to potential customers based on specific actions, or triggers. acceptFormats: - - array + - array items: properties: seq-number: title: Sequence Number - description: 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. + description: 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. acceptFormats: - - number + - number uiOrder: 0 format: number sequence-delay-days: title: Sequence Delay Days - description: Number of days to wait before sending the next email. If - you don't specify this, the default value is 1 day. + description: Number of days to wait before sending the next email. If you don't specify this, the default value is 1 day. acceptFormats: - - number + - number uiOrder: 1 default: 1 format: number subject: title: Subject - description: 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. + description: 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. acceptFormats: - - string + - string uiOrder: 2 format: string email-body: title: Email Body - description: Body of the email. If you want to set the variable according - to different leads, you can use {{variable_name}}. It will be replaced + description: 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. acceptFormats: - - string + - string uiOrder: 3 format: string required: [] @@ -239,8 +224,8 @@ TASK_SAVE_SEQUENCES: uiOrder: 1 format: array required: - - campaign-name - - sequences + - campaign-name + - sequences format: object output: title: Output @@ -252,13 +237,12 @@ TASK_SAVE_SEQUENCES: uiOrder: 0 format: string required: - - result + - result format: object TASK_GET_SEQUENCES: title: Get Sequences - shortDescription: Get sequences of a campaign. If you want to add more sequences - to the campaign, you can get the existing sequences and add new sequences to them. - And, you can execute `TASK_SAVE_SEQUENCES` to save the sequences. + shortDescription: Get sequences of a campaign. If you want to add more sequences to the campaign, you can get the existing sequences and add new sequences + to them. And, you can execute `TASK_SAVE_SEQUENCES` to save the sequences. input: title: Input description: Input parameters for getting sequences. @@ -267,11 +251,11 @@ TASK_GET_SEQUENCES: title: Campaign Name description: Name of the campaign. acceptFormats: - - string + - string uiOrder: 0 format: string required: - - campaign-name + - campaign-name format: object output: title: Output @@ -281,42 +265,42 @@ TASK_GET_SEQUENCES: title: Sequences description: Sequences of the campaign. acceptFormats: - - array + - array items: properties: seq-id: title: Sequence ID description: ID of the sequence. acceptFormats: - - string + - string uiOrder: 0 format: string seq-number: title: Sequence Number description: Sequence number means the order of the sequence. acceptFormats: - - number + - number uiOrder: 0 format: number sequence-delay-days: title: Sequence Delay Days description: Number of days to wait before sending the next email. acceptFormats: - - number + - number uiOrder: 1 format: number subject: title: Subject description: Subject of the email when you save the sequence. acceptFormats: - - string + - string uiOrder: 2 format: string email-body: title: Email Body description: Body of the email when you save the sequence. acceptFormats: - - string + - string uiOrder: 3 format: string required: [] @@ -324,7 +308,7 @@ TASK_GET_SEQUENCES: uiOrder: 1 format: array required: - - sequences + - sequences format: object TASK_ADD_LEADS: title: Add Leads @@ -337,80 +321,79 @@ TASK_ADD_LEADS: title: Campaign Name description: Name of the campaign. acceptFormats: - - string + - string uiOrder: 0 format: string leads: title: Leads description: Leads to add to the campaign. acceptFormats: - - array + - array items: properties: email: title: Email description: Email of the lead. acceptFormats: - - string + - string uiOrder: 0 format: string first-name: title: First Name description: First name of the lead. acceptFormats: - - string + - string uiOrder: 1 format: string last-name: title: Last Name description: Last name of the lead. acceptFormats: - - string + - string uiOrder: 2 format: string company: title: Company description: Company name of the lead. acceptFormats: - - string + - string uiOrder: 3 format: string location: title: Location description: Location of the lead. acceptFormats: - - string + - string uiOrder: 4 format: string custom-fields: title: Custom Fields - description: 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. + description: 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. items: properties: key: title: Key description: Key of the custom field. acceptFormats: - - string + - string uiOrder: 0 format: string value: title: Value description: Value of the custom field. acceptFormats: - - string + - string uiOrder: 1 format: string required: - - key - - value + - key + - value required: [] uiOrder: 5 format: array required: - - email + - email format: object uiOrder: 1 format: array @@ -420,46 +403,43 @@ TASK_ADD_LEADS: properties: ignore-global-block-list: title: Ignore Global Block List - description: 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. + description: 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. acceptFormats: - - boolean + - boolean uiOrder: 0 format: boolean ignore-unsubscribe-list: title: Ignore Unsubscribe List - description: Ignore the unsubscribe list and add the lead. If true, leads - will BYPASS the comparison with unsubscribed leads and be uploaded to - the campaign. + description: Ignore the unsubscribe list and add the lead. If true, leads will BYPASS the comparison with unsubscribed leads and be uploaded + to the campaign. acceptFormats: - - boolean + - boolean uiOrder: 1 format: boolean ignore-community-bounce-list: title: Ignore Community Bounce List - description: 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. + description: 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. acceptFormats: - - boolean + - boolean uiOrder: 2 format: boolean ignore-duplicate-leads-in-other-campaign: title: Ignore Duplicate Leads in Other Campaign - description: '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. ' + description: '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. ' acceptFormats: - - boolean + - boolean uiOrder: 3 format: boolean uiOrder: 2 required: - - ignore-duplicate-leads-in-other-campaign + - ignore-duplicate-leads-in-other-campaign format: object required: - - campaign-name - - leads + - campaign-name + - leads format: object output: title: Output @@ -491,15 +471,14 @@ TASK_ADD_LEADS: uiOrder: 4 format: string required: - - upload-count - - total-leads - - already-added-to-campaign - - invalid-email-count + - upload-count + - total-leads + - already-added-to-campaign + - invalid-email-count format: object TASK_ADD_SENDER_EMAIL: title: Add Sender Email - shortDescription: Add a sender email to the campaign. You have to configure the - sender email in Smartlead console before adding it to the campaign. + shortDescription: Add a sender email to the campaign. You have to configure the sender email in Smartlead console before adding it to the campaign. input: title: Input description: Input parameters for adding a sender email. @@ -508,21 +487,20 @@ TASK_ADD_SENDER_EMAIL: title: Campaign Name description: Name of the campaign. acceptFormats: - - string + - string uiOrder: 0 format: string sender-email: title: Sender Email - description: Email address of the sender. You need to configure the sender - email in [Smartlead console](https://app.smartlead.ai/app/email-accounts) + description: 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. acceptFormats: - - string + - string uiOrder: 1 format: string required: - - campaign-name - - sender-email + - campaign-name + - sender-email format: object output: title: Output @@ -530,17 +508,15 @@ TASK_ADD_SENDER_EMAIL: properties: result: title: Result - description: Result of adding a sender email. If you don't configure your - sender email in Smartlead console, you will get an error. + description: Result of adding a sender email. If you don't configure your sender email in Smartlead console, you will get an error. uiOrder: 0 format: string required: - - result + - result format: object TASK_UPDATE_CAMPAIGN_STATUS: title: Update Campaign Status - shortDescription: Update the status of a campaign. You need to start a campaign - to send the emails to the leads. + shortDescription: Update the status of a campaign. You need to start a campaign to send the emails to the leads. input: title: Input description: Input parameters for updating the status of a campaign. @@ -549,21 +525,21 @@ TASK_UPDATE_CAMPAIGN_STATUS: title: Campaign Name description: Name of the campaign. acceptFormats: - - string + - string uiOrder: 0 format: string status: title: Status description: Status of the campaign. enum: - - START - - PAUSED - - STOPPED + - START + - PAUSED + - STOPPED uiOrder: 1 format: string required: - - campaign-name - - status + - campaign-name + - status format: object output: title: Output @@ -575,12 +551,11 @@ TASK_UPDATE_CAMPAIGN_STATUS: uiOrder: 0 format: string required: - - result + - result format: object TASK_GET_CAMPAIGN_METRIC: title: Get Campaign Metric - shortDescription: Get the metrics of a campaign. You can get the metrics like open - count, click count, and reply count of the campaign. + shortDescription: Get the metrics of a campaign. You can get the metrics like open count, click count, and reply count of the campaign. input: title: Input description: Input parameters for getting the metrics of a campaign. @@ -589,11 +564,11 @@ TASK_GET_CAMPAIGN_METRIC: title: Campaign Name description: Name of the campaign. acceptFormats: - - string + - string uiOrder: 0 format: string required: - - campaign-name + - campaign-name format: object output: title: Output @@ -648,8 +623,7 @@ TASK_GET_CAMPAIGN_METRIC: format: object TASK_LIST_LEADS_STATUS: title: List Leads Status - shortDescription: List the status of leads in a campaign. You can get the status - of leads like 'STARTED', 'INPROGRESS', 'COMPLETED', 'PAUSED', 'STOPPED'. + shortDescription: List the status of leads in a campaign. You can get the status of leads like 'STARTED', 'INPROGRESS', 'COMPLETED', 'PAUSED', 'STOPPED'. input: title: Input description: Input parameters for listing the status of leads. @@ -658,7 +632,7 @@ TASK_LIST_LEADS_STATUS: title: Campaign Name description: Name of the campaign. acceptFormats: - - string + - string uiOrder: 0 format: string limit: @@ -666,12 +640,12 @@ TASK_LIST_LEADS_STATUS: description: Number of leads to list. The minimum value is 1. minimum: 1 acceptFormats: - - number + - number uiOrder: 1 format: number required: - - campaign-name - - limit + - campaign-name + - limit format: object output: title: Output @@ -693,11 +667,11 @@ TASK_LIST_LEADS_STATUS: uiOrder: 1 format: string required: - - email - - status + - email + - status format: object uiOrder: 0 format: array required: - - leads + - leads format: object diff --git a/pkg/component/application/whatsapp/v0/config/definition.yaml b/pkg/component/application/whatsapp/v0/config/definition.yaml index 916669351..266cdfedc 100644 --- a/pkg/component/application/whatsapp/v0/config/definition.yaml +++ b/pkg/component/application/whatsapp/v0/config/definition.yaml @@ -1,13 +1,13 @@ 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 + - 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/application/whatsapp/v0/config/setup.yaml b/pkg/component/application/whatsapp/v0/config/setup.yaml index d650d33f7..e7b36caa7 100644 --- a/pkg/component/application/whatsapp/v0/config/setup.yaml +++ b/pkg/component/application/whatsapp/v0/config/setup.yaml @@ -1,15 +1,14 @@ additionalProperties: false properties: token: - description: Fill in your WhatsApp access token. Go [here](https://developers.facebook.com/docs/whatsapp/cloud-api/get-started) - for more information. + description: Fill in your WhatsApp access token. Go [here](https://developers.facebook.com/docs/whatsapp/cloud-api/get-started) for more information. acceptFormats: - - string + - string instillSecret: true uiOrder: 0 title: Token format: string required: -- token + - token title: WhatsApp Connection format: object diff --git a/pkg/component/application/whatsapp/v0/config/tasks.yaml b/pkg/component/application/whatsapp/v0/config/tasks.yaml index 70a4064ae..780a55088 100644 --- a/pkg/component/application/whatsapp/v0/config/tasks.yaml +++ b/pkg/component/application/whatsapp/v0/config/tasks.yaml @@ -1,17 +1,16 @@ $defs: def-input: phone-number-id: - description: 'Phone Number ID. Obtainable through the app dashboard. Note: This - is for sender.' + description: 'Phone Number ID. Obtainable through the app dashboard. Note: This is for sender.' acceptFormats: - - string + - string uiOrder: 0 title: Phone Number ID format: string to: description: The number of the recipient you are sending the message to. acceptFormats: - - string + - string uiOrder: 1 title: Recipient Phone Number format: string @@ -19,19 +18,17 @@ $defs: name: description: Name of the template. acceptFormats: - - string + - string title: Template Name format: string language-code: - description: The code of the language in which the template is used. [Supported - languages](https://developers.facebook.com/docs/whatsapp/api/messages/message-templates#supported-languages). + description: The code of the language in which the template is used. [Supported languages](https://developers.facebook.com/docs/whatsapp/api/messages/message-templates#supported-languages). acceptFormats: - - string + - string title: Language Code format: string body-parameters: - description: Specify the parameters for the body section of the template. - Leave this blank if there is no parameter. + description: Specify the parameters for the body section of the template. Leave this blank if there is no parameter. title: Body Parameters items: title: Body Parameter @@ -39,11 +36,9 @@ $defs: format: string format: array button-parameters: - description: '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''.' + description: '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''.' title: Button Parameters items: title: Button Parameter @@ -52,50 +47,46 @@ $defs: format: array media: id-or-link: - description: Input either ID or link of the media. If the input has 'http', - it will be considered as a link. + description: Input either ID or link of the media. If the input has 'http', it will be considered as a link. acceptFormats: - - string + - string format: string caption: - description: Media asset caption. Description of the media. This property - cannot be used when the media type is audio. If audio tried to use this + description: Media asset caption. Description of the media. This property cannot be used when the media type is audio. If audio tried to use this property, it will be ignored. acceptFormats: - - string + - string format: string filename: - description: The filename of the document. Only document can use this property. - This property will specify what format the document is displayed as in WhatsApp. - If other media type tried to use this property, it will be ignored. + description: The filename of the document. Only document can use this property. This property will specify what format the document is displayed + as in WhatsApp. If other media type tried to use this property, it will be ignored. acceptFormats: - - string + - string format: string location: latitude: description: Location latitude. acceptFormats: - - number + - number format: number longitude: description: Location longitude. acceptFormats: - - number + - number format: number location-name: description: Name of the location. acceptFormats: - - string + - string format: string address: description: Address of the location. acceptFormats: - - string + - string format: string def-output: recipient-wa-id: - description: The WhatsApp ID of the recipient. Most likely the same with their - phone number. + description: The WhatsApp ID of the recipient. Most likely the same with their phone number. uiOrder: 0 title: Recipient WhatsApp ID format: string @@ -110,8 +101,7 @@ $defs: title: Message Status format: string TASK_SEND_TEXT_BASED_TEMPLATE_MESSAGE: - shortDescription: Send text-based template message. This task support header(text), - body and button parameters. + shortDescription: Send text-based template message. This task support header(text), body and button parameters. input: description: Template information. uiOrder: 0 @@ -127,8 +117,7 @@ TASK_SEND_TEXT_BASED_TEMPLATE_MESSAGE: $ref: '#/$defs/def-input/template/language-code' uiOrder: 3 header-parameters: - description: Specify the parameters for the header section of the template. - Leave this blank if there is no parameter. + description: Specify the parameters for the header section of the template. Leave this blank if there is no parameter. uiOrder: 4 title: Header Parameters items: @@ -143,10 +132,10 @@ TASK_SEND_TEXT_BASED_TEMPLATE_MESSAGE: $ref: '#/$defs/def-input/template/button-parameters' uiOrder: 6 required: - - phone-number-id - - to - - name - - language-code + - phone-number-id + - to + - name + - language-code title: Input format: object output: @@ -160,14 +149,13 @@ TASK_SEND_TEXT_BASED_TEMPLATE_MESSAGE: message-status: $ref: '#/$defs/def-output/message-status' required: - - recipient-wa-id - - message-id - - message-status + - recipient-wa-id + - message-id + - message-status title: Output format: object TASK_SEND_MEDIA_BASED_TEMPLATE_MESSAGE: - shortDescription: Send media-based template message. This task support header(image, - document & video), body and button parameters. + shortDescription: Send media-based template message. This task support header(image, document & video), body and button parameters. input: description: Template information. uiOrder: 0 @@ -184,14 +172,13 @@ TASK_SEND_MEDIA_BASED_TEMPLATE_MESSAGE: uiOrder: 3 media-type: enum: - - image - - video - - document + - image + - video + - document example: none - description: Specify the header(media) type for the header section of the - template. + description: Specify the header(media) type for the header section of the template. acceptFormats: - - string + - string uiOrder: 4 title: Header Type format: string @@ -210,12 +197,12 @@ TASK_SEND_MEDIA_BASED_TEMPLATE_MESSAGE: $ref: '#/$defs/def-input/template/button-parameters' uiOrder: 8 required: - - phone-number-id - - to - - name - - language-code - - media-type - - id-or-link + - phone-number-id + - to + - name + - language-code + - media-type + - id-or-link title: Input format: object output: @@ -229,14 +216,13 @@ TASK_SEND_MEDIA_BASED_TEMPLATE_MESSAGE: message-status: $ref: '#/$defs/def-output/message-status' required: - - recipient-wa-id - - message-id - - message-status + - recipient-wa-id + - message-id + - message-status title: Output format: object TASK_SEND_LOCATION_BASED_TEMPLATE_MESSAGE: - shortDescription: Send location-based template message. This task support header(location), - body and button parameters. + shortDescription: Send location-based template message. This task support header(location), body and button parameters. input: description: Template information. uiOrder: 0 @@ -274,14 +260,14 @@ TASK_SEND_LOCATION_BASED_TEMPLATE_MESSAGE: $ref: '#/$defs/def-input/template/button-parameters' uiOrder: 9 required: - - phone-number-id - - to - - name - - language-code - - latitude - - longitude - - location-name - - address + - phone-number-id + - to + - name + - language-code + - latitude + - longitude + - location-name + - address title: Input format: object output: @@ -295,15 +281,14 @@ TASK_SEND_LOCATION_BASED_TEMPLATE_MESSAGE: message-status: $ref: '#/$defs/def-output/message-status' required: - - recipient-wa-id - - message-id - - message-status + - recipient-wa-id + - message-id + - message-status title: Output format: object TASK_SEND_AUTHENTICATION_TEMPLATE_MESSAGE: - shortDescription: 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. + shortDescription: 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: description: Template information. uiOrder: 0 @@ -321,16 +306,16 @@ TASK_SEND_AUTHENTICATION_TEMPLATE_MESSAGE: one-time-password: description: One-time password to be sent to the recipient. Maximum 15 characters. acceptFormats: - - string + - string uiOrder: 4 title: One-Time Password format: string required: - - phone-number-id - - to - - name - - language-code - - one-time-password + - phone-number-id + - to + - name + - language-code + - one-time-password title: Input format: object output: @@ -344,14 +329,14 @@ TASK_SEND_AUTHENTICATION_TEMPLATE_MESSAGE: message-status: $ref: '#/$defs/def-output/message-status' required: - - recipient-wa-id - - message-id - - message-status + - recipient-wa-id + - message-id + - message-status title: Output format: object TASK_SEND_TEXT_MESSAGE: - shortDescription: '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)' + shortDescription: '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: description: Text input. uiOrder: 0 @@ -363,27 +348,26 @@ TASK_SEND_TEXT_MESSAGE: body: description: Body of the message. acceptFormats: - - string + - string uiOrder: 2 title: Text format: string preview-url: enum: - - 'false' - - 'true' + - 'false' + - 'true' example: 'false' - description: Specify whether URL should be previewed or not. This will have - no affect if the message does not contain any URL. + description: Specify whether URL should be previewed or not. This will have no affect if the message does not contain any URL. acceptFormats: - - string + - string uiOrder: 3 title: Preview URL format: string required: - - phone-number-id - - to - - body - - preview-url + - phone-number-id + - to + - body + - preview-url title: Input format: object output: @@ -395,14 +379,13 @@ TASK_SEND_TEXT_MESSAGE: message-id: $ref: '#/$defs/def-output/message-id' required: - - recipient-wa-id - - message-id + - recipient-wa-id + - message-id title: Output format: object TASK_SEND_MEDIA_MESSAGE: - shortDescription: '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)' + shortDescription: '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: description: Media input. uiOrder: 0 @@ -413,14 +396,14 @@ TASK_SEND_MEDIA_MESSAGE: $ref: '#/$defs/def-input/to' media-type: enum: - - image - - audio - - document - - video + - image + - audio + - document + - video example: image description: Specify what media to send. acceptFormats: - - string + - string uiOrder: 2 title: Media Type format: string @@ -437,10 +420,10 @@ TASK_SEND_MEDIA_MESSAGE: $ref: '#/$defs/def-input/media/filename' uiOrder: 5 required: - - phone-number-id - - to - - media-type - - id-or-link + - phone-number-id + - to + - media-type + - id-or-link title: Input format: object output: @@ -452,13 +435,13 @@ TASK_SEND_MEDIA_MESSAGE: message-id: $ref: '#/$defs/def-output/message-id' required: - - recipient-wa-id - - message-id + - recipient-wa-id + - message-id title: Output format: object TASK_SEND_LOCATION_MESSAGE: - shortDescription: '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)' + shortDescription: '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: description: Location input. uiOrder: 0 @@ -484,12 +467,12 @@ TASK_SEND_LOCATION_MESSAGE: $ref: '#/$defs/def-input/location/address' uiOrder: 5 required: - - phone-number-id - - to - - latitude - - longitude - - location-name - - address + - phone-number-id + - to + - latitude + - longitude + - location-name + - address title: Input format: object output: @@ -501,13 +484,13 @@ TASK_SEND_LOCATION_MESSAGE: message-id: $ref: '#/$defs/def-output/message-id' required: - - recipient-wa-id - - message-id + - recipient-wa-id + - message-id title: Output format: object TASK_SEND_CONTACT_MESSAGE: - shortDescription: '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)' + shortDescription: '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: description: Contact input. uiOrder: 0 @@ -519,77 +502,76 @@ TASK_SEND_CONTACT_MESSAGE: first-name: description: First name of the contact. acceptFormats: - - string + - string uiOrder: 2 title: First Name format: string middle-name: description: Middle name of the contact. acceptFormats: - - string + - string uiOrder: 3 title: Middle Name format: string last-name: description: Last name of the contact. acceptFormats: - - string + - string uiOrder: 4 title: Last Name format: string phone-number: description: Phone number of the contact. acceptFormats: - - string + - string uiOrder: 5 title: Phone Number format: string phone-number-type: enum: - - none - - CELL - - MAIN - - PHONE - - HOME - - WORK + - none + - CELL + - MAIN + - PHONE + - HOME + - WORK example: none - description: Phone number type of the contact. If there is no phone number, - pick none. + description: Phone number type of the contact. If there is no phone number, pick none. acceptFormats: - - string + - string uiOrder: 6 title: Phone Number Type format: string email: description: Email of the contact. acceptFormats: - - string + - string uiOrder: 7 title: Email format: string email-type: enum: - - none - - HOME - - WORK + - none + - HOME + - WORK example: none description: Email type of the contact. If there is no email, pick none. acceptFormats: - - string + - string uiOrder: 8 title: Email Type format: string birthday: description: Birthday of the contact. Format is in 'YYYY-MM-DD'. acceptFormats: - - string + - string uiOrder: 9 title: Birthday format: string required: - - phone-number-id - - to - - first-name + - phone-number-id + - to + - first-name title: Input format: object output: @@ -601,14 +583,13 @@ TASK_SEND_CONTACT_MESSAGE: message-id: $ref: '#/$defs/def-output/message-id' required: - - recipient-wa-id - - message-id + - recipient-wa-id + - message-id title: Output format: object TASK_SEND_INTERACTIVE_CALL_TO_ACTION_URL_BUTTON_MESSAGE: - shortDescription: '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).' + shortDescription: '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: description: Interactive CTA URL button input. uiOrder: 0 @@ -620,44 +601,44 @@ TASK_SEND_INTERACTIVE_CALL_TO_ACTION_URL_BUTTON_MESSAGE: header-text: description: Message header text. acceptFormats: - - string + - string uiOrder: 2 title: Header Text format: string body-text: description: Message body text. acceptFormats: - - string + - string uiOrder: 3 title: Body Text format: string footer-text: description: Message footer text. acceptFormats: - - string + - string uiOrder: 4 title: Footer Text format: string button-display-text: description: The text displayed on the button. acceptFormats: - - string + - string uiOrder: 5 title: Button Display Text format: string button-url: description: URL to load when the user tapped the button. acceptFormats: - - string + - string uiOrder: 6 title: Button URL format: string required: - - phone-number-id - - to - - body-text - - button-display-text - - button-url + - phone-number-id + - to + - body-text + - button-display-text + - button-url title: Input format: object output: @@ -669,7 +650,7 @@ TASK_SEND_INTERACTIVE_CALL_TO_ACTION_URL_BUTTON_MESSAGE: message-id: $ref: '#/$defs/def-output/message-id' required: - - recipient-wa-id - - message-id + - recipient-wa-id + - message-id title: Output format: object diff --git a/pkg/component/base/testdata/componentAdditional.yaml b/pkg/component/base/testdata/componentAdditional.yaml index 21dc95cc4..7201d5686 100644 --- a/pkg/component/base/testdata/componentAdditional.yaml +++ b/pkg/component/base/testdata/componentAdditional.yaml @@ -6,8 +6,8 @@ components: model: description: ID of the model to use enum: - - text-embedding-ada-002 + - text-embedding-ada-002 type: string required: - - model + - model type: object diff --git a/pkg/component/base/testdata/componentConfig.yaml b/pkg/component/base/testdata/componentConfig.yaml index 95f48245b..f0037f11f 100644 --- a/pkg/component/base/testdata/componentConfig.yaml +++ b/pkg/component/base/testdata/componentConfig.yaml @@ -1,13 +1,12 @@ additionalProperties: true properties: api-key: - description: Fill in your OpenAI API key. To find your keys, visit your OpenAI's - API Keys page. + description: Fill in your OpenAI API key. To find your keys, visit your OpenAI's API Keys page. instillSecret: true uiOrder: 0 title: API Key type: string required: -- api-key + - api-key title: OpenAI Connection type: object diff --git a/pkg/component/base/testdata/componentDef.yaml b/pkg/component/base/testdata/componentDef.yaml index 52353dba0..8430e2d56 100644 --- a/pkg/component/base/testdata/componentDef.yaml +++ b/pkg/component/base/testdata/componentDef.yaml @@ -1,7 +1,7 @@ version: 1.0.0 sourceUrl: https://github.com/instill-ai/pipeline-backend/blob/main/pkg/component/base availableTasks: -- TASK_TEXT_EMBEDDINGS + - 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/componentTasks.yaml b/pkg/component/base/testdata/componentTasks.yaml index a2c8eaaa7..dea0dbd76 100644 --- a/pkg/component/base/testdata/componentTasks.yaml +++ b/pkg/component/base/testdata/componentTasks.yaml @@ -6,20 +6,20 @@ TASK_TEXT_EMBEDDINGS: model: $ref: additional.yaml#/components/schemas/CreateEmbeddingRequest/properties/model acceptFormats: - - string + - string shortDescription: ID of the model to use uiOrder: 0 title: Model text: description: The text acceptFormats: - - string + - string uiOrder: 1 title: Text type: string required: - - text - - model + - text + - model title: Input type: object output: @@ -30,6 +30,6 @@ TASK_TEXT_EMBEDDINGS: uiOrder: 0 title: Embedding required: - - embedding + - embedding title: Output type: object diff --git a/pkg/component/base/testdata/operatorDef.yaml b/pkg/component/base/testdata/operatorDef.yaml index eb61b054d..356ab7fb5 100644 --- a/pkg/component/base/testdata/operatorDef.yaml +++ b/pkg/component/base/testdata/operatorDef.yaml @@ -1,7 +1,7 @@ version: 1.0.0 sourceUrl: https://github.com/instill-ai/pipeline-backend/blob/main/pkg/component/base availableTasks: -- TASK_MARSHAL + - TASK_MARSHAL custom: false documentationUrl: https://www.instill.tech/docs/component/operator/json icon: Instill AI/json.svg diff --git a/pkg/component/base/testdata/operatorTasks.yaml b/pkg/component/base/testdata/operatorTasks.yaml index ba2d99ec1..161c4618a 100644 --- a/pkg/component/base/testdata/operatorTasks.yaml +++ b/pkg/component/base/testdata/operatorTasks.yaml @@ -2,30 +2,30 @@ TASK_MARSHAL: input: description: Input instillEditOnNodeFields: - - object + - object uiOrder: 0 properties: object: description: Json object to be marshaled instillAcceptFormats: - - object - - semi-structured/* - - structured/* + - object + - semi-structured/* + - structured/* instillEditOnNodeFields: [] uiOrder: 0 instillUpstreamTypes: - - reference + - reference required: [] title: Object type: object required: - - object + - object title: Input type: object output: description: Output instillEditOnNodeFields: - - string + - string uiOrder: 0 properties: string: @@ -36,6 +36,6 @@ TASK_MARSHAL: title: Data type: string required: - - string + - string title: Output type: object diff --git a/pkg/component/base/testdata/wantComponentDefinition.yaml b/pkg/component/base/testdata/wantComponentDefinition.yaml index d44c00d91..635fb4513 100644 --- a/pkg/component/base/testdata/wantComponentDefinition.yaml +++ b/pkg/component/base/testdata/wantComponentDefinition.yaml @@ -8,90 +8,86 @@ spec: componentSpecification: instillFormat: object oneOf: - - instillFormat: object - properties: - condition: - instillAcceptFormats: - - string - instillShortDescription: config whether the component will be executed or - skipped - instillUIOrder: 1 - instillUpstreamTypes: - - value - - template - type: string - input: - instillUIOrder: 0 - properties: - model: - anyOf: - - enum: - - text-embedding-ada-002 - instillUpstreamType: value - type: string - - instillUpstreamType: reference - pattern: ^\{.*\}$ - type: string - - instillUpstreamType: template - type: string - description: ID of the model to use - instillAcceptFormats: + - instillFormat: object + properties: + condition: + instillAcceptFormats: - string - instillShortDescription: ID of the model to use - instillUIOrder: 0 - instillUpstreamTypes: + instillShortDescription: config whether the component will be executed or skipped + instillUIOrder: 1 + instillUpstreamTypes: - value - - reference - template - title: Model - type: string - text: - anyOf: - - instillUpstreamType: value - type: string - - instillUpstreamType: reference - pattern: ^\{.*\}$ + type: string + input: + instillUIOrder: 0 + properties: + model: + anyOf: + - enum: + - text-embedding-ada-002 + instillUpstreamType: value + type: string + - instillUpstreamType: reference + pattern: ^\{.*\}$ + type: string + - instillUpstreamType: template + type: string + description: ID of the model to use + instillAcceptFormats: + - string + instillShortDescription: ID of the model to use + instillUIOrder: 0 + instillUpstreamTypes: + - value + - reference + - template + title: Model type: string - - instillUpstreamType: template + text: + anyOf: + - instillUpstreamType: value + type: string + - instillUpstreamType: reference + pattern: ^\{.*\}$ + type: string + - instillUpstreamType: template + type: string + description: The text + instillAcceptFormats: + - string + instillShortDescription: The text + instillUIOrder: 1 + instillUpstreamTypes: + - value + - reference + - template + title: Text type: string - description: The text - instillAcceptFormats: - - string - instillShortDescription: The text - instillUIOrder: 1 - instillUpstreamTypes: - - value - - reference - - template - title: Text - type: string - required: - - text - - model - title: Input - type: object - task: - const: TASK_TEXT_EMBEDDINGS - instillShortDescription: Turn text into numbers, unlocking use cases like - search. - title: Text Embeddings - type: object + required: + - text + - model + title: Input + type: object + task: + const: TASK_TEXT_EMBEDDINGS + instillShortDescription: Turn text into numbers, unlocking use cases like search. + title: Text Embeddings + type: object properties: setup: additionalProperties: true instillShortDescription: '' properties: api-key: - description: Fill in your OpenAI API key. To find your keys, visit your - OpenAI's API Keys page. + description: Fill in your OpenAI API key. To find your keys, visit your OpenAI's API Keys page. instillSecret: true - instillShortDescription: Fill in your OpenAI API key. To find your keys, - visit your OpenAI's API Keys page. + instillShortDescription: Fill in your OpenAI API key. To find your keys, visit your OpenAI's API Keys page. instillUIOrder: 0 title: API Key type: string required: - - api-key + - api-key title: OpenAI Connection type: object title: OpenAI Component @@ -104,9 +100,9 @@ spec: model: description: ID of the model to use instillAcceptFormats: - - string + - string enum: - - text-embedding-ada-002 + - text-embedding-ada-002 instillShortDescription: ID of the model to use instillUIOrder: 0 title: Model @@ -114,14 +110,14 @@ spec: text: description: The text instillAcceptFormats: - - string + - string instillShortDescription: The text instillUIOrder: 1 title: Text type: string required: - - text - - model + - text + - model title: Input type: object output: @@ -137,7 +133,7 @@ spec: title: Embedding type: array required: - - embedding + - embedding title: Output type: object type: COMPONENT_TYPE_AI @@ -145,8 +141,8 @@ public: true vendor: OpenAI vendorAttributes: {} tasks: -- name: TASK_TEXT_EMBEDDINGS - title: Text Embeddings - description: Turn text into numbers, unlocking use cases like search. + - name: TASK_TEXT_EMBEDDINGS + title: Text Embeddings + description: Turn text into numbers, unlocking use cases like search. version: 1.0.0 sourceUrl: https://github.com/instill-ai/pipeline-backend/blob/main/pkg/component/base diff --git a/pkg/component/base/testdata/wantOperatorDefinition.yaml b/pkg/component/base/testdata/wantOperatorDefinition.yaml index 654a9490b..2f95bd8f6 100644 --- a/pkg/component/base/testdata/wantOperatorDefinition.yaml +++ b/pkg/component/base/testdata/wantOperatorDefinition.yaml @@ -7,45 +7,44 @@ icon: Instill AI/json.svg spec: componentSpecification: oneOf: - - properties: - condition: - instillAcceptFormats: - - string - instillShortDescription: config whether the component will be executed or - skipped - instillUIOrder: 1 - instillUpstreamTypes: - - value - - template - type: string - input: - description: Input - instillUIOrder: 0 - properties: - object: - anyOf: - - instillUpstreamType: reference - pattern: ^\{.*\}$ - type: string - description: Json object to be marshaled - instillAcceptFormats: + - properties: + condition: + instillAcceptFormats: + - string + instillShortDescription: config whether the component will be executed or skipped + instillUIOrder: 1 + instillUpstreamTypes: + - value + - template + type: string + input: + description: Input + instillUIOrder: 0 + properties: + object: + anyOf: + - instillUpstreamType: reference + pattern: ^\{.*\}$ + type: string + description: Json object to be marshaled + instillAcceptFormats: + - object + - semi-structured/* + - structured/* + instillShortDescription: Json object to be marshaled + instillUIOrder: 0 + instillUpstreamTypes: + - reference + title: Object + required: - object - - semi-structured/* - - structured/* - instillShortDescription: Json object to be marshaled - instillUIOrder: 0 - instillUpstreamTypes: - - reference - title: Object - required: - - object - title: Input - type: object - task: - const: TASK_MARSHAL - title: Marshal - title: Marshal - type: object + title: Input + type: object + task: + const: TASK_MARSHAL + title: Marshal + title: Marshal + type: object title: JSON Component type: object dataSpecifications: @@ -57,17 +56,17 @@ spec: object: description: Json object to be marshaled instillAcceptFormats: - - object - - semi-structured/* - - structured/* + - object + - semi-structured/* + - structured/* instillUIOrder: 0 instillUpstreamTypes: - - reference + - reference required: [] title: Object type: object required: - - object + - object title: Input type: object output: @@ -82,12 +81,12 @@ spec: title: Data type: string required: - - string + - string title: Output type: object public: true version: 1.0.0 sourceUrl: https://github.com/instill-ai/pipeline-backend/blob/main/pkg/component/base tasks: -- name: TASK_MARSHAL - title: Marshal + - name: TASK_MARSHAL + title: Marshal diff --git a/pkg/component/data/bigquery/v0/config/definition.yaml b/pkg/component/data/bigquery/v0/config/definition.yaml index 74bd46a78..17b526adc 100644 --- a/pkg/component/data/bigquery/v0/config/definition.yaml +++ b/pkg/component/data/bigquery/v0/config/definition.yaml @@ -1,6 +1,6 @@ availableTasks: -- TASK_INSERT -- TASK_READ + - 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/bigquery/v0/config/setup.yaml b/pkg/component/data/bigquery/v0/config/setup.yaml index c3198ecbb..d0587c9b5 100644 --- a/pkg/component/data/bigquery/v0/config/setup.yaml +++ b/pkg/component/data/bigquery/v0/config/setup.yaml @@ -3,14 +3,14 @@ properties: dataset-id: description: Fill in your BigQuery Dataset ID. acceptFormats: - - string + - string uiOrder: 2 title: BigQuery Dataset ID format: string json-key: description: Contents of the JSON key file with access to the bucket. acceptFormats: - - string + - string instillSecret: true uiOrder: 0 title: JSON Key File contents @@ -18,21 +18,21 @@ properties: project-id: description: Fill in your BigQuery Project ID. acceptFormats: - - string + - string uiOrder: 1 title: BigQuery Project ID format: string table-name: description: Fill in your BigQuery Table Name. acceptFormats: - - string + - string uiOrder: 3 title: BigQuery Table Name format: string required: -- json-key -- project-id -- dataset-id -- table-name + - json-key + - project-id + - dataset-id + - table-name title: BigQuery Connection format: object diff --git a/pkg/component/data/bigquery/v0/config/tasks.yaml b/pkg/component/data/bigquery/v0/config/tasks.yaml index 2115d6b7d..bff3aabd1 100644 --- a/pkg/component/data/bigquery/v0/config/tasks.yaml +++ b/pkg/component/data/bigquery/v0/config/tasks.yaml @@ -23,7 +23,7 @@ TASK_INSERT: title: Status format: string required: - - status + - status title: Output format: object TASK_READ: @@ -33,8 +33,7 @@ TASK_READ: properties: filtering: shortDescription: The filter to be applied to the data - description: The filter to be applied to the data with SQL syntax, which starts - with WHERE clause. + description: The filter to be applied to the data with SQL syntax, which starts with WHERE clause. uiOrder: 0 required: [] title: Filtering @@ -56,6 +55,6 @@ TASK_READ: format: object format: array required: - - data + - data title: Output format: object diff --git a/pkg/component/data/chroma/v0/config/definition.yaml b/pkg/component/data/chroma/v0/config/definition.yaml index 5772061dc..95fafd075 100644 --- a/pkg/component/data/chroma/v0/config/definition.yaml +++ b/pkg/component/data/chroma/v0/config/definition.yaml @@ -1,10 +1,10 @@ availableTasks: -- TASK_BATCH_UPSERT -- TASK_UPSERT -- TASK_QUERY -- TASK_DELETE -- TASK_CREATE_COLLECTION -- TASK_DELETE_COLLECTION + - 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/chroma/v0/config/setup.yaml b/pkg/component/data/chroma/v0/config/setup.yaml index eaa4a2890..5457b8dc6 100644 --- a/pkg/component/data/chroma/v0/config/setup.yaml +++ b/pkg/component/data/chroma/v0/config/setup.yaml @@ -3,7 +3,7 @@ properties: api-key: description: Fill in your Chroma API key. acceptFormats: - - string + - string instillSecret: true uiOrder: 0 title: API Key @@ -11,13 +11,13 @@ properties: url: description: Fill in your Chroma hosted public URL endpoint with port, e.g http://1.2.3:8000. acceptFormats: - - string + - string instillSecret: false uiOrder: 1 title: Chroma URL Endpoint format: string required: -- api-key -- url + - api-key + - url title: Chroma Connection format: object diff --git a/pkg/component/data/chroma/v0/config/tasks.yaml b/pkg/component/data/chroma/v0/config/tasks.yaml index dc780af12..5ae684abb 100644 --- a/pkg/component/data/chroma/v0/config/tasks.yaml +++ b/pkg/component/data/chroma/v0/config/tasks.yaml @@ -4,18 +4,17 @@ TASK_QUERY: uiOrder: 0 properties: collection-name: - description: The name of the collection to perform vector similarity search - on. + description: The name of the collection to perform vector similarity search on. acceptFormats: - - string + - string uiOrder: 0 title: Collection Name format: string vector: description: An array of dimensions for the vector query. acceptFormats: - - array - - array + - array + - array uiOrder: 1 items: description: A dimension of the vector. @@ -27,32 +26,30 @@ TASK_QUERY: n-results: description: The N amount of items to return from the vector search operation. acceptFormats: - - integer + - integer uiOrder: 2 title: N Results format: integer filter: - description: 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). + description: 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). acceptFormats: - - json - - object + - json + - object uiOrder: 3 title: Filter required: [] format: object filter-document: - description: 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). + description: 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). acceptFormats: - - string + - string uiOrder: 4 title: Filter Document format: string fields: description: The fields to be returned from the vector search operation. acceptFormats: - - array + - array uiOrder: 5 items: description: A field to be returned. @@ -62,9 +59,9 @@ TASK_QUERY: title: Fields format: array required: - - collection-name - - vector - - n-results + - collection-name + - vector + - n-results title: Input format: object output: @@ -127,27 +124,26 @@ TASK_QUERY: required: [] format: object required: - - status - - result + - status + - result title: Output format: object TASK_BATCH_UPSERT: - shortDescription: Upsert multiple vector items into a collection, existing items - will be updated + shortDescription: Upsert multiple vector items into a collection, existing items will be updated input: uiOrder: 0 properties: collection-name: description: The name of the collection to upsert the item into. acceptFormats: - - string + - string uiOrder: 0 title: Collection Name format: string array-id: description: The array of id. acceptFormats: - - array + - array uiOrder: 1 items: description: An id of the point. @@ -159,10 +155,10 @@ TASK_BATCH_UPSERT: array-metadata: description: The array of vector metadata. acceptFormats: - - array - - array - - array - - array + - array + - array + - array + - array uiOrder: 2 minItems: 1 title: Array Metadata @@ -175,13 +171,13 @@ TASK_BATCH_UPSERT: array-vector: description: The array of vector values. acceptFormats: - - array + - array uiOrder: 3 items: description: An array of dimensions for the vector value. acceptFormats: - - array - - array + - array + - array items: description: A dimension of the vector. example: 0.8167237 @@ -193,7 +189,7 @@ TASK_BATCH_UPSERT: array-document: description: The array of document string values. acceptFormats: - - array + - array uiOrder: 4 items: description: A document string value. @@ -205,7 +201,7 @@ TASK_BATCH_UPSERT: array-uri: description: The array of uri. acceptFormats: - - array + - array uiOrder: 5 items: description: An uri of the point. @@ -214,10 +210,10 @@ TASK_BATCH_UPSERT: title: Array URI format: array required: - - collection-name - - array-id - - array-metadata - - array-vector + - collection-name + - array-id + - array-metadata + - array-vector title: Input format: object output: @@ -229,34 +225,33 @@ TASK_BATCH_UPSERT: title: Status format: string required: - - status + - status title: Output format: object TASK_UPSERT: - shortDescription: Upsert a vector item into a collection, existing item will be - updated + shortDescription: Upsert a vector item into a collection, existing item will be updated input: uiOrder: 0 properties: collection-name: description: The name of the collection to upsert the item into. acceptFormats: - - string + - string uiOrder: 0 title: Collection Name format: string id: description: The ID of the item. acceptFormats: - - string + - string uiOrder: 1 title: ID format: string metadata: description: The vector metadata. acceptFormats: - - json - - object + - json + - object uiOrder: 2 title: Metadata required: [] @@ -264,8 +259,8 @@ TASK_UPSERT: vector: description: An array of dimensions for the vector value. acceptFormats: - - array - - array + - array + - array uiOrder: 3 items: description: A dimension of the vector. @@ -277,22 +272,22 @@ TASK_UPSERT: document: description: The document string value. acceptFormats: - - string + - string uiOrder: 4 title: Document format: string uri: description: The uri of the item. acceptFormats: - - string + - string uiOrder: 5 title: URI format: string required: - - collection-name - - id - - metadata - - vector + - collection-name + - id + - metadata + - vector title: Input format: object output: @@ -304,7 +299,7 @@ TASK_UPSERT: title: Status format: string required: - - status + - status title: Output format: object TASK_DELETE: @@ -315,37 +310,35 @@ TASK_DELETE: collection-name: description: The name of the collection to delete the object from. acceptFormats: - - string + - string uiOrder: 0 title: Collection Name format: string id: description: The ID of the item. acceptFormats: - - string + - string uiOrder: 1 title: ID format: string filter: - description: 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). + description: 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). acceptFormats: - - json - - object + - json + - object uiOrder: 2 title: Filter required: [] format: object filter-document: - description: 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). + description: 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). acceptFormats: - - string + - string uiOrder: 3 title: Filter Document format: string required: - - collection-name + - collection-name title: Input format: object output: @@ -357,7 +350,7 @@ TASK_DELETE: title: Status format: string required: - - status + - status title: Output format: object TASK_CREATE_COLLECTION: @@ -368,15 +361,15 @@ TASK_CREATE_COLLECTION: collection-name: description: The name of the collection to create. acceptFormats: - - string + - string uiOrder: 0 title: Collection Name format: string metadata: description: The metadata of the collection. Please refer to [creating-inspecting-and-deleting-collection](https://docs.trychroma.com/guides#creating,-inspecting,-and-deleting-collections). acceptFormats: - - json - - object + - json + - object uiOrder: 1 title: Config required: [] @@ -384,8 +377,8 @@ TASK_CREATE_COLLECTION: configuration: description: The configuration of the collection. Please refer to [creating-inspecting-and-deleting-collection](https://docs.trychroma.com/guides#creating,-inspecting,-and-deleting-collections). acceptFormats: - - json - - object + - json + - object uiOrder: 2 title: Configuration required: [] @@ -393,13 +386,13 @@ TASK_CREATE_COLLECTION: get-or-create: description: If true, the collection will be created if it does not exist. acceptFormats: - - boolean + - boolean uiOrder: 3 title: Get or Create default: false format: boolean required: - - collection-name + - collection-name title: Input format: object output: @@ -411,7 +404,7 @@ TASK_CREATE_COLLECTION: title: Status format: string required: - - status + - status title: Output format: object TASK_DELETE_COLLECTION: @@ -422,12 +415,12 @@ TASK_DELETE_COLLECTION: collection-name: description: The name of the collection to delete. acceptFormats: - - string + - string uiOrder: 0 title: Collection Name format: string required: - - collection-name + - collection-name title: Input format: object output: @@ -439,6 +432,6 @@ TASK_DELETE_COLLECTION: title: Status format: string required: - - status + - status title: Output format: object diff --git a/pkg/component/data/elasticsearch/v0/config/definition.yaml b/pkg/component/data/elasticsearch/v0/config/definition.yaml index 523442fc5..0793c636b 100644 --- a/pkg/component/data/elasticsearch/v0/config/definition.yaml +++ b/pkg/component/data/elasticsearch/v0/config/definition.yaml @@ -1,12 +1,12 @@ availableTasks: -- TASK_SEARCH -- TASK_VECTOR_SEARCH -- TASK_INDEX -- TASK_MULTI_INDEX -- TASK_UPDATE -- TASK_DELETE -- TASK_CREATE_INDEX -- TASK_DELETE_INDEX + - 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/elasticsearch/v0/config/setup.yaml b/pkg/component/data/elasticsearch/v0/config/setup.yaml index 0fe5ca9e8..0dae05871 100644 --- a/pkg/component/data/elasticsearch/v0/config/setup.yaml +++ b/pkg/component/data/elasticsearch/v0/config/setup.yaml @@ -1,10 +1,9 @@ additionalProperties: false properties: api-key: - description: Fill in the API key for the Elasticsearch instance (please use encoded - one). + description: Fill in the API key for the Elasticsearch instance (please use encoded one). acceptFormats: - - string + - string instillSecret: true uiOrder: 1 title: API Key @@ -12,13 +11,13 @@ properties: cloud-id: description: Fill in the Cloud ID for the Elasticsearch instance. acceptFormats: - - string + - string instillSecret: true uiOrder: 0 title: Cloud ID format: string required: -- api-key -- cloud-id + - api-key + - cloud-id title: Elasticsearch Connection format: object diff --git a/pkg/component/data/elasticsearch/v0/config/tasks.yaml b/pkg/component/data/elasticsearch/v0/config/tasks.yaml index c30c699de..41670ff14 100644 --- a/pkg/component/data/elasticsearch/v0/config/tasks.yaml +++ b/pkg/component/data/elasticsearch/v0/config/tasks.yaml @@ -6,29 +6,29 @@ TASK_INDEX: index-name: description: Name of the Elasticsearch index. acceptFormats: - - string + - string uiOrder: 0 title: Index Name format: string id: description: The ID of the document. acceptFormats: - - string + - string uiOrder: 1 title: ID format: string data: description: Data to be indexed. acceptFormats: - - json - - object + - json + - object uiOrder: 2 title: Data required: [] format: object required: - - index-name - - data + - index-name + - data title: Input format: object output: @@ -41,7 +41,7 @@ TASK_INDEX: title: Status format: string required: - - status + - status title: Output format: object TASK_MULTI_INDEX: @@ -52,14 +52,14 @@ TASK_MULTI_INDEX: index-name: description: Name of the Elasticsearch index. acceptFormats: - - string + - string uiOrder: 0 title: Index Name format: string array-id: description: The array of id. acceptFormats: - - array + - array uiOrder: 1 items: description: An id of the document. @@ -71,10 +71,10 @@ TASK_MULTI_INDEX: array-data: description: Array data to be indexed. acceptFormats: - - array - - array - - array - - array + - array + - array + - array + - array uiOrder: 2 title: Array Data items: @@ -85,8 +85,8 @@ TASK_MULTI_INDEX: minItems: 1 format: array required: - - index-name - - array-data + - index-name + - array-data title: Input format: object output: @@ -99,7 +99,7 @@ TASK_MULTI_INDEX: title: Status format: string required: - - status + - status title: Output format: object TASK_UPDATE: @@ -110,59 +110,55 @@ TASK_UPDATE: index-name: description: Name of the Elasticsearch index. acceptFormats: - - string + - string uiOrder: 0 title: Index Name format: string id: description: The ID of the document. acceptFormats: - - string + - string uiOrder: 1 title: ID format: string query: - description: 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. + description: 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. acceptFormats: - - string + - string shortDescription: Full text search query, (empty for all documents) uiOrder: 2 title: Query format: string filter: - description: 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). + description: 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). acceptFormats: - - json - - object + - json + - object uiOrder: 3 title: Filter required: [] format: object filter-sql: - shortDescription: The filter sql to be applied to the data, if filter or id - is provided, this field will be ignored - description: The filter to be applied to the data with SQL syntax, which starts - with WHERE clause, empty for no filter. + shortDescription: The filter sql to be applied to the data, if filter or id is provided, this field will be ignored + description: The filter to be applied to the data with SQL syntax, which starts with WHERE clause, empty for no filter. uiOrder: 4 acceptFormats: - - string + - string title: Filter SQL format: string update-data: description: Update data. acceptFormats: - - json - - object + - json + - object uiOrder: 4 title: Update required: [] format: object required: - - index-name - - update-data + - index-name + - update-data title: Input format: object output: @@ -175,7 +171,7 @@ TASK_UPDATE: title: Status format: string required: - - status + - status title: Output format: object TASK_SEARCH: @@ -186,61 +182,55 @@ TASK_SEARCH: index-name: description: Name of the Elasticsearch index. acceptFormats: - - string + - string uiOrder: 1 title: Index Name format: string id: description: The ID of the document. acceptFormats: - - string + - string uiOrder: 2 title: ID format: string query: - description: 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. + description: 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. acceptFormats: - - string + - string shortDescription: Full text search query, (empty for all documents) uiOrder: 3 title: Query format: string filter: - description: 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). + description: 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). acceptFormats: - - json - - object + - json + - object uiOrder: 4 title: Filter required: [] format: object filter-sql: - shortDescription: The filter sql to be applied to the data, if filter or id - is provided, this field will be ignored - description: The filter to be applied to the data with SQL syntax, which starts - with WHERE clause, empty for no filter. + shortDescription: The filter sql to be applied to the data, if filter or id is provided, this field will be ignored + description: The filter to be applied to the data with SQL syntax, which starts with WHERE clause, empty for no filter. uiOrder: 5 acceptFormats: - - string + - string title: Filter SQL format: string size: - description: Number of documents to return. If empty then all documents will - be returned. + description: Number of documents to return. If empty then all documents will be returned. acceptFormats: - - integer + - integer shortDescription: Size of documents to return, (empty for all documents) uiOrder: 6 title: Size format: integer fields: - description: The fields to return in the documents. If empty then all fields - will be returned. + description: The fields to return in the documents. If empty then all fields will be returned. acceptFormats: - - array + - array shortDescription: Fields to be returned, empty for all fields uiOrder: 7 title: Fields @@ -250,16 +240,15 @@ TASK_SEARCH: minItems: 1 format: array min-score: - description: Minimum score to consider for search results. If empty then no - minimum score will be considered. + description: Minimum score to consider for search results. If empty then no minimum score will be considered. acceptFormats: - - number + - number shortDescription: Minimum Score uiOrder: 8 title: Minimum Score format: number required: - - index-name + - index-name title: Input format: object output: @@ -309,8 +298,8 @@ TASK_SEARCH: required: [] format: object required: - - result - - status + - result + - status title: Output format: object TASK_VECTOR_SEARCH: @@ -321,14 +310,14 @@ TASK_VECTOR_SEARCH: index-name: description: Name of the Elasticsearch index. acceptFormats: - - string + - string uiOrder: 1 title: Index Name format: string field: description: Field name of the vector to search for similar vectors. acceptFormats: - - string + - string shortDescription: Field name of the vector uiOrder: 2 title: Field @@ -336,8 +325,8 @@ TASK_VECTOR_SEARCH: query-vector: description: Query vector to search for similar vectors. acceptFormats: - - array - - array + - array + - array shortDescription: '' uiOrder: 3 items: @@ -350,46 +339,40 @@ TASK_VECTOR_SEARCH: k: description: K of documents to do kNN vector search. acceptFormats: - - integer + - integer shortDescription: K of documents to return uiOrder: 4 title: K format: integer num-candidates: - description: Number of candidates to be considered for kNN vector search. - Default to 2 times of k. + description: Number of candidates to be considered for kNN vector search. Default to 2 times of k. acceptFormats: - - integer - shortDescription: Number of candidates to be considered for kNN, default to - 2 times of k + - integer + shortDescription: Number of candidates to be considered for kNN, default to 2 times of k uiOrder: 5 title: Num Candidates format: integer filter: - description: 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). + description: 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). acceptFormats: - - json - - object + - json + - object uiOrder: 6 title: Filter required: [] format: object filter-sql: - shortDescription: The filter sql to be applied to the data, if filter or id - is provided, this field will be ignored - description: The filter to be applied to the data with SQL syntax, which starts - with WHERE clause, empty for no filter. + shortDescription: The filter sql to be applied to the data, if filter or id is provided, this field will be ignored + description: The filter to be applied to the data with SQL syntax, which starts with WHERE clause, empty for no filter. uiOrder: 7 acceptFormats: - - string + - string title: Filter SQL format: string fields: - description: The fields to return in the documents. If empty then all fields - will be returned. + description: The fields to return in the documents. If empty then all fields will be returned. acceptFormats: - - array + - array shortDescription: Fields to be returned, empty for all fields uiOrder: 8 title: Fields @@ -399,17 +382,16 @@ TASK_VECTOR_SEARCH: minItems: 1 format: array min-score: - description: Minimum score to consider for search results. If empty then no - minimum score will be considered. + description: Minimum score to consider for search results. If empty then no minimum score will be considered. acceptFormats: - - number + - number shortDescription: Minimum Score uiOrder: 9 title: Minimum Score format: number required: - - index-name - - field + - index-name + - field title: Input format: object output: @@ -473,8 +455,8 @@ TASK_VECTOR_SEARCH: required: [] format: object required: - - result - - status + - result + - status title: Output format: object TASK_DELETE: @@ -485,50 +467,46 @@ TASK_DELETE: index-name: description: Name of the Elasticsearch index. acceptFormats: - - string + - string uiOrder: 0 title: Index Name format: string id: description: The ID of the document. acceptFormats: - - string + - string uiOrder: 1 title: ID format: string query: - description: 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. + description: 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. acceptFormats: - - string + - string shortDescription: Full text search query, (empty for all documents) uiOrder: 2 title: Query format: string filter: - description: 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). + description: 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). acceptFormats: - - json - - object + - json + - object uiOrder: 3 title: Filter required: [] format: object filter-sql: - shortDescription: The filter sql to be applied to the data, if filter or id - is provided, this field will be ignored - description: The filter to be applied to the data with SQL syntax, which starts - with WHERE clause, empty for no filter. + shortDescription: The filter sql to be applied to the data, if filter or id is provided, this field will be ignored + description: The filter to be applied to the data with SQL syntax, which starts with WHERE clause, empty for no filter. uiOrder: 4 acceptFormats: - - string + - string required: [] title: Filter SQL format: string required: - - index-name + - index-name title: Input format: object output: @@ -541,7 +519,7 @@ TASK_DELETE: title: Status format: string required: - - status + - status title: Output format: object TASK_CREATE_INDEX: @@ -552,24 +530,22 @@ TASK_CREATE_INDEX: index-name: description: Name of the Elasticsearch index. acceptFormats: - - string + - string uiOrder: 0 title: Index Name format: string mappings: - description: 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. + description: 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. acceptFormats: - - json - - object + - json + - object uiOrder: 1 title: Mappings required: [] format: object required: - - index-name + - index-name title: Input format: object output: @@ -582,7 +558,7 @@ TASK_CREATE_INDEX: title: Status format: string required: - - status + - status title: Output format: object TASK_DELETE_INDEX: @@ -593,12 +569,12 @@ TASK_DELETE_INDEX: index-name: description: Name of the Elasticsearch index. acceptFormats: - - string + - string uiOrder: 0 title: Index Name format: string required: - - index-name + - index-name title: Input format: object output: @@ -611,6 +587,6 @@ TASK_DELETE_INDEX: title: Status format: string required: - - status + - status title: Output format: object diff --git a/pkg/component/data/googlecloudstorage/v0/config/definition.yaml b/pkg/component/data/googlecloudstorage/v0/config/definition.yaml index 612fc34dd..fb69b15a4 100644 --- a/pkg/component/data/googlecloudstorage/v0/config/definition.yaml +++ b/pkg/component/data/googlecloudstorage/v0/config/definition.yaml @@ -1,7 +1,7 @@ availableTasks: -- TASK_UPLOAD -- TASK_READ_OBJECTS -- TASK_CREATE_BUCKET + - 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/googlecloudstorage/v0/config/setup.yaml b/pkg/component/data/googlecloudstorage/v0/config/setup.yaml index 8f421e321..2a09e9b79 100644 --- a/pkg/component/data/googlecloudstorage/v0/config/setup.yaml +++ b/pkg/component/data/googlecloudstorage/v0/config/setup.yaml @@ -3,12 +3,12 @@ properties: json-key: description: Contents of the JSON key file with access to the bucket. acceptFormats: - - string + - string instillSecret: true uiOrder: 1 title: JSON Key File contents format: string required: -- json-key + - json-key title: Google Cloud Storage Connection format: object diff --git a/pkg/component/data/googlecloudstorage/v0/config/tasks.yaml b/pkg/component/data/googlecloudstorage/v0/config/tasks.yaml index 7ed1783ee..a21f396e6 100644 --- a/pkg/component/data/googlecloudstorage/v0/config/tasks.yaml +++ b/pkg/component/data/googlecloudstorage/v0/config/tasks.yaml @@ -2,7 +2,7 @@ $defs: bucket-name: description: Name of the bucket to be used for object storage. acceptFormats: - - string + - string instillSecret: false uiOrder: 0 title: Bucket Name @@ -67,7 +67,7 @@ $defs: title: Storage Class format: string acceptFormats: - - object + - object required: [] uiOrder: 1 title: Attributes @@ -82,29 +82,28 @@ TASK_UPLOAD: data: description: The data to be saved in the object. acceptFormats: - - '*' + - '*' uiOrder: 1 title: Data format: string object-name: description: The name of the object to be created. acceptFormats: - - string + - string uiOrder: 0 title: Object Name format: string required: - - object-name - - bucket-name - - data + - object-name + - bucket-name + - data title: Input format: object output: uiOrder: 0 properties: authenticated-url: - description: Only users granted permission can access the object with this - link. + description: Only users granted permission can access the object with this link. format: string uiOrder: 0 title: Authenticated URL @@ -129,7 +128,7 @@ TASK_UPLOAD: title: Upload Status format: string required: - - status + - status title: Output format: object TASK_READ_OBJECTS: @@ -142,61 +141,61 @@ TASK_READ_OBJECTS: delimiter: description: The delimiter to use when listing objects. acceptFormats: - - string + - string uiOrder: 1 title: Delimiter format: string prefix: description: The prefix to use when listing objects. acceptFormats: - - string + - string uiOrder: 2 title: Prefix format: string versions: description: Whether to list all versions of an object. acceptFormats: - - boolean + - boolean uiOrder: 3 title: Versions format: boolean start-offset: description: The offset to start listing objects from. acceptFormats: - - string + - string uiOrder: 4 title: Start Offset format: string end-offset: description: The offset to stop listing objects at. acceptFormats: - - string + - string uiOrder: 5 title: End Offset format: string include-trailing-delimiter: description: Whether to include the delimiter in the object name. acceptFormats: - - boolean + - boolean uiOrder: 6 title: Include Trailing Delimiter format: boolean match-glob: description: Whether to match objects using a glob pattern. acceptFormats: - - string + - string uiOrder: 7 title: Match Glob format: string include-folders-as-prefixes: description: Whether to include folders as prefixes. acceptFormats: - - boolean + - boolean uiOrder: 8 title: Include Folders As Prefixes format: boolean required: - - bucket-name + - bucket-name title: Input format: object output: @@ -205,7 +204,7 @@ TASK_READ_OBJECTS: text-objects: description: The text objects in the bucket. acceptFormats: - - array + - array uiOrder: 0 title: Text Objects items: @@ -220,7 +219,7 @@ TASK_READ_OBJECTS: image-objects: description: The image objects in the bucket. acceptFormats: - - array + - array uiOrder: 1 title: Image Objects items: @@ -235,7 +234,7 @@ TASK_READ_OBJECTS: document-objects: description: The document objects in the bucket. acceptFormats: - - array + - array uiOrder: 2 title: Document Objects items: @@ -251,7 +250,7 @@ TASK_READ_OBJECTS: audio-objects: description: The audio objects in the bucket. acceptFormats: - - array + - array uiOrder: 3 title: Audio Objects items: @@ -267,7 +266,7 @@ TASK_READ_OBJECTS: video-objects: description: The video objects in the bucket. acceptFormats: - - array + - array uiOrder: 4 title: Video Objects items: @@ -293,20 +292,20 @@ TASK_CREATE_BUCKET: project-id: description: The project ID to create the bucket in. acceptFormats: - - string + - string uiOrder: 1 title: Project ID format: string location: description: The location to create the bucket in. acceptFormats: - - string + - string uiOrder: 2 title: Location format: string required: - - bucket-name - - project-id + - bucket-name + - project-id title: Input format: object output: diff --git a/pkg/component/data/googledrive/v0/config/definition.yaml b/pkg/component/data/googledrive/v0/config/definition.yaml index fec7d70ee..06afac131 100644 --- a/pkg/component/data/googledrive/v0/config/definition.yaml +++ b/pkg/component/data/googledrive/v0/config/definition.yaml @@ -1,6 +1,6 @@ availableTasks: -- TASK_READ_FILE -- TASK_READ_FOLDER + - 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/googledrive/v0/config/setup.yaml b/pkg/component/data/googledrive/v0/config/setup.yaml index 50ec74404..dbe993ac1 100644 --- a/pkg/component/data/googledrive/v0/config/setup.yaml +++ b/pkg/component/data/googledrive/v0/config/setup.yaml @@ -1,11 +1,9 @@ properties: refresh-token: - description: Refresh token for the Google Drive API. For more information about - how to create tokens, please refer to the Google - Drive API documentation and OAuth 2.0 documentation. + description: Refresh token for the Google Drive API. For more information about how to create tokens, please refer to the Google + Drive API documentation and OAuth 2.0 documentation. acceptFormats: - - string + - string instillSecret: true uiOrder: 1 title: Refresh Token @@ -15,9 +13,9 @@ instillOAuthConfig: authUrl: https://accounts.google.com/o/oauth2/auth accessUrl: https://oauth2.googleapis.com/token scopes: - - https://www.googleapis.com/auth/drive.readonly - - https://www.googleapis.com/auth/drive.file - - https://www.googleapis.com/auth/userinfo.email - - https://www.googleapis.com/auth/userinfo.profile + - https://www.googleapis.com/auth/drive.readonly + - https://www.googleapis.com/auth/drive.file + - https://www.googleapis.com/auth/userinfo.email + - https://www.googleapis.com/auth/userinfo.profile title: Google Drive Connection format: object diff --git a/pkg/component/data/googledrive/v0/config/tasks.yaml b/pkg/component/data/googledrive/v0/config/tasks.yaml index eb1481ad7..8b0144cf4 100644 --- a/pkg/component/data/googledrive/v0/config/tasks.yaml +++ b/pkg/component/data/googledrive/v0/config/tasks.yaml @@ -9,19 +9,15 @@ $defs: title: ID format: string name: - description: Name of the file. The file extension will be added automatically - based on the exported MIME type. For example, Google Sheets will be exported - as CSV, Google Docs as PDF, and Google Slides as PDF. If the file is a Google - Sheet and the name is `MySheet`, the exported file will be `MySheet.csv`. - If the file is not a Google file, the name will be used as is. + description: Name of the file. The file extension will be added automatically based on the exported MIME type. For example, Google Sheets will be + exported as CSV, Google Docs as PDF, and Google Slides as PDF. If the file is a Google Sheet and the name is `MySheet`, the exported file will + be `MySheet.csv`. If the file is not a Google file, the name will be used as is. uiOrder: 1 title: Name format: string content: - description: Base64 encoded content of the binary file without the `data:[MIME_TYPE];base64,` - prefix. Google Sheets will be exported as CSV, Google Docs as PDF, and Google - Slides as PDF. If the file is not a Google file, the content will be the - same as the original file. + description: Base64 encoded content of the binary file without the `data:[MIME_TYPE];base64,` prefix. Google Sheets will be exported as CSV, Google + Docs as PDF, and Google Slides as PDF. If the file is not a Google file, the content will be the same as the original file. uiOrder: 2 title: Content format: string @@ -41,14 +37,12 @@ $defs: title: Size format: integer mime-type: - description: MIME type of the file. For example, `application/pdf`, `text/csv`, - `image/jpeg`, etc. + description: MIME type of the file. For example, `application/pdf`, `text/csv`, `image/jpeg`, etc. uiOrder: 6 title: MIME type format: string md5-checksum: - description: MD5 checksum of the file. This reflects every change made to - the file on the server, even those not visible to the user. + description: MD5 checksum of the file. This reflects every change made to the file on the server, even those not visible to the user. uiOrder: 7 title: MD5 checksum format: string @@ -58,8 +52,7 @@ $defs: title: Version format: integer web-view-link: - description: Link for opening the file in a relevant Google editor or viewer - in a browser. Usually, web view link is same as shared link. + description: Link for opening the file in a relevant Google editor or viewer in a browser. Usually, web view link is same as shared link. uiOrder: 9 title: Web View Link format: string @@ -69,19 +62,18 @@ $defs: title: Web Content Link format: string required: - - id - - name - - created-time - - modified-time - - size - - mime-type - - version - - web-view-link + - id + - name + - created-time + - modified-time + - size + - mime-type + - version + - web-view-link title: File format: object shared-link: - description: Shared link of the file. You can get the shared link by right-clicking - on the file and selecting `Copy link`. + description: Shared link of the file. You can get the shared link by right-clicking on the file and selecting `Copy link`. uiOrder: 0 title: File ID format: string @@ -94,7 +86,7 @@ TASK_READ_FILE: shared-link: $ref: '#/$defs/shared-link' required: - - shared-link + - shared-link title: Input format: object output: @@ -103,15 +95,13 @@ TASK_READ_FILE: file: $ref: '#/$defs/file' required: - - file + - file title: Output format: object TASK_READ_FOLDER: - shortDescription: Read metadata and content of files under the specified folder - in Google Drive. + shortDescription: Read metadata and content of files under the specified folder in Google Drive. input: - description: Please provide the shared link of the folder to read from Google - Drive. + description: Please provide the shared link of the folder to read from Google Drive. uiOrder: 0 properties: shared-link: @@ -122,7 +112,7 @@ TASK_READ_FOLDER: title: Read Content format: boolean required: - - shared-link + - shared-link title: Input format: object output: @@ -138,6 +128,6 @@ TASK_READ_FOLDER: title: Files format: array required: - - files + - files title: Output format: object diff --git a/pkg/component/data/googlesheets/v0/config/definition.yaml b/pkg/component/data/googlesheets/v0/config/definition.yaml index 5cf5ecee7..8d5031c4d 100644 --- a/pkg/component/data/googlesheets/v0/config/definition.yaml +++ b/pkg/component/data/googlesheets/v0/config/definition.yaml @@ -1,28 +1,27 @@ 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 + - 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 id: google-sheets public: true title: Google Sheets -description: Connect to and interact with Google Sheets spreadsheets to read and write - data. +description: Connect to and interact with Google Sheets spreadsheets to read and write data. tombstone: false type: COMPONENT_TYPE_DATA uid: c4f8e3d2-a1b9-4c7e-9f5d-6b2e8a7d3c1f diff --git a/pkg/component/data/googlesheets/v0/config/setup.yaml b/pkg/component/data/googlesheets/v0/config/setup.yaml index e45a35759..25b883b66 100644 --- a/pkg/component/data/googlesheets/v0/config/setup.yaml +++ b/pkg/component/data/googlesheets/v0/config/setup.yaml @@ -1,11 +1,9 @@ properties: refresh-token: - description: Refresh token for the Google Sheets API. For more information about - how to create tokens, please refer to the Google - Sheets API documentation and OAuth 2.0 documentation. + description: Refresh token for the Google Sheets API. For more information about how to create tokens, please refer to the Google + Sheets API documentation and OAuth 2.0 documentation. acceptFormats: - - string + - string instillSecret: true uiOrder: 1 title: Refresh Token @@ -15,9 +13,9 @@ instillOAuthConfig: authUrl: https://accounts.google.com/o/oauth2/auth accessUrl: https://oauth2.googleapis.com/token scopes: - - https://www.googleapis.com/auth/spreadsheets - - https://www.googleapis.com/auth/drive.file - - https://www.googleapis.com/auth/userinfo.email - - https://www.googleapis.com/auth/userinfo.profile + - https://www.googleapis.com/auth/spreadsheets + - https://www.googleapis.com/auth/drive.file + - https://www.googleapis.com/auth/userinfo.email + - https://www.googleapis.com/auth/userinfo.profile title: Google Drive Connection format: object diff --git a/pkg/component/data/googlesheets/v0/config/tasks.yaml b/pkg/component/data/googlesheets/v0/config/tasks.yaml index 33e3d6a86..7acfc791d 100644 --- a/pkg/component/data/googlesheets/v0/config/tasks.yaml +++ b/pkg/component/data/googlesheets/v0/config/tasks.yaml @@ -1,7 +1,6 @@ $defs: shared-link: - description: Shared link of the spreadsheet. You can get the shared link by clicking - 'Share' button and selecting 'Copy link'. + description: Shared link of the spreadsheet. You can get the shared link by clicking 'Share' button and selecting 'Copy link'. uiOrder: 0 title: Spreadsheet ID format: string @@ -35,8 +34,7 @@ $defs: title: Row Numbers format: array row-value: - description: Row data in JSON format where keys are column names and values are - the corresponding cell values + description: Row data in JSON format where keys are column names and values are the corresponding cell values title: Row Data uiOrder: 6 additionalProperties: @@ -58,8 +56,8 @@ $defs: $ref: '#/$defs/row-value' uiOrder: 1 required: - - row-number - - data + - row-number + - data format: object rows: description: Multiple rows data with row numbers and data. @@ -93,13 +91,13 @@ TASK_CREATE_SPREADSHEET: headers: $ref: '#/$defs/headers' required: - - name + - name format: object uiOrder: 1 format: array required: - - name - - sheets + - name + - sheets title: Input format: object output: @@ -107,7 +105,7 @@ TASK_CREATE_SPREADSHEET: shared-link: $ref: '#/$defs/shared-link' required: - - shared-link + - shared-link title: Output format: object TASK_DELETE_SPREADSHEET: @@ -118,7 +116,7 @@ TASK_DELETE_SPREADSHEET: shared-link: $ref: '#/$defs/shared-link' required: - - shared-link + - shared-link title: Input format: object output: @@ -126,7 +124,7 @@ TASK_DELETE_SPREADSHEET: success: $ref: '#/$defs/success' required: - - success + - success title: Output format: object TASK_ADD_SHEET: @@ -141,8 +139,8 @@ TASK_ADD_SHEET: headers: $ref: '#/$defs/headers' required: - - shared-link - - sheet-name + - shared-link + - sheet-name title: Input format: object output: @@ -150,7 +148,7 @@ TASK_ADD_SHEET: success: $ref: '#/$defs/success' required: - - success + - success title: Output format: object TASK_DELETE_SHEET: @@ -163,8 +161,8 @@ TASK_DELETE_SHEET: sheet-name: $ref: '#/$defs/sheet-name' required: - - shared-link - - sheet-name + - shared-link + - sheet-name title: Input format: object output: @@ -172,7 +170,7 @@ TASK_DELETE_SHEET: success: $ref: '#/$defs/success' required: - - success + - success title: Output format: object TASK_CREATE_SPREADSHEET_COLUMN: @@ -187,9 +185,9 @@ TASK_CREATE_SPREADSHEET_COLUMN: column-name: $ref: '#/$defs/column-name' required: - - shared-link - - column-name - - sheet-name + - shared-link + - column-name + - sheet-name title: Input format: object output: @@ -197,7 +195,7 @@ TASK_CREATE_SPREADSHEET_COLUMN: success: $ref: '#/$defs/success' required: - - success + - success title: Output format: object TASK_DELETE_SPREADSHEET_COLUMN: @@ -212,9 +210,9 @@ TASK_DELETE_SPREADSHEET_COLUMN: column-name: $ref: '#/$defs/column-name' required: - - shared-link - - column-name - - sheet-name + - shared-link + - column-name + - sheet-name title: Input format: object output: @@ -222,7 +220,7 @@ TASK_DELETE_SPREADSHEET_COLUMN: success: $ref: '#/$defs/success' required: - - success + - success title: Output format: object TASK_GET_ROW: @@ -241,9 +239,9 @@ TASK_GET_ROW: uiOrder: 0 format: number required: - - shared-link - - row-number - - sheet-name + - shared-link + - row-number + - sheet-name title: Input format: object output: @@ -251,7 +249,7 @@ TASK_GET_ROW: row: $ref: '#/$defs/row' required: - - row + - row title: Output format: object TASK_GET_MULTIPLE_ROWS: @@ -272,9 +270,9 @@ TASK_GET_MULTIPLE_ROWS: uiOrder: 0 format: array required: - - shared-link - - row-numbers - - sheet-name + - shared-link + - row-numbers + - sheet-name title: Input format: object output: @@ -282,7 +280,7 @@ TASK_GET_MULTIPLE_ROWS: rows: $ref: '#/$defs/rows' required: - - rows + - rows title: Output format: object TASK_LIST_ROWS: @@ -308,8 +306,8 @@ TASK_LIST_ROWS: uiOrder: 1 format: number required: - - shared-link - - sheet-name + - shared-link + - sheet-name title: Input format: object output: @@ -317,7 +315,7 @@ TASK_LIST_ROWS: rows: $ref: '#/$defs/rows' required: - - rows + - rows title: Output format: object TASK_LOOKUP_ROWS: @@ -337,10 +335,10 @@ TASK_LOOKUP_ROWS: uiOrder: 10 format: string required: - - shared-link - - column-name - - value - - sheet-name + - shared-link + - column-name + - value + - sheet-name title: Input format: object output: @@ -348,7 +346,7 @@ TASK_LOOKUP_ROWS: rows: $ref: '#/$defs/rows' required: - - rows + - rows title: Output format: object TASK_INSERT_ROW: @@ -363,9 +361,9 @@ TASK_INSERT_ROW: row-value: $ref: '#/$defs/row-value' required: - - shared-link - - row - - sheet-name + - shared-link + - row + - sheet-name title: Input format: object output: @@ -373,8 +371,8 @@ TASK_INSERT_ROW: row: $ref: '#/$defs/row' required: - - row - - row-number + - row + - row-number title: Output format: object TASK_INSERT_MULTIPLE_ROWS: @@ -387,17 +385,16 @@ TASK_INSERT_MULTIPLE_ROWS: sheet-name: $ref: '#/$defs/sheet-name' row-values: - description: Array of row data in JSON format where keys are column names - and values are the corresponding cell values + description: Array of row data in JSON format where keys are column names and values are the corresponding cell values items: $ref: '#/$defs/row-value' uiOrder: 2 title: Row Values format: array required: - - shared-link - - rows - - sheet-name + - shared-link + - rows + - sheet-name title: Input format: object output: @@ -405,7 +402,7 @@ TASK_INSERT_MULTIPLE_ROWS: rows: $ref: '#/$defs/rows' required: - - rows + - rows title: Output format: object TASK_UPDATE_ROW: @@ -420,10 +417,10 @@ TASK_UPDATE_ROW: row: $ref: '#/$defs/row' required: - - shared-link - - row-number - - row - - sheet-name + - shared-link + - row-number + - row + - sheet-name title: Input format: object output: @@ -431,7 +428,7 @@ TASK_UPDATE_ROW: row: $ref: '#/$defs/row' required: - - row + - row title: Output format: object TASK_UPDATE_MULTIPLE_ROWS: @@ -446,10 +443,10 @@ TASK_UPDATE_MULTIPLE_ROWS: rows: $ref: '#/$defs/rows' required: - - shared-link - - row-numbers - - rows - - sheet-name + - shared-link + - row-numbers + - rows + - sheet-name title: Input format: object output: @@ -457,7 +454,7 @@ TASK_UPDATE_MULTIPLE_ROWS: rows: $ref: '#/$defs/rows' required: - - rows + - rows title: Output format: object TASK_DELETE_ROW: @@ -472,9 +469,9 @@ TASK_DELETE_ROW: row-number: $ref: '#/$defs/row-number' required: - - shared-link - - row-number - - sheet-name + - shared-link + - row-number + - sheet-name title: Input format: object output: @@ -482,7 +479,7 @@ TASK_DELETE_ROW: success: $ref: '#/$defs/success' required: - - success + - success title: Output format: object TASK_DELETE_MULTIPLE_ROWS: @@ -497,9 +494,9 @@ TASK_DELETE_MULTIPLE_ROWS: row-numbers: $ref: '#/$defs/row-numbers' required: - - shared-link - - row-numbers - - sheet-name + - shared-link + - row-numbers + - sheet-name title: Input format: object output: @@ -507,6 +504,6 @@ TASK_DELETE_MULTIPLE_ROWS: success: $ref: '#/$defs/success' required: - - success + - success title: Output format: object diff --git a/pkg/component/data/instillartifact/v0/config/definition.yaml b/pkg/component/data/instillartifact/v0/config/definition.yaml index ced5d36da..c4d761cdc 100644 --- a/pkg/component/data/instillartifact/v0/config/definition.yaml +++ b/pkg/component/data/instillartifact/v0/config/definition.yaml @@ -1,12 +1,12 @@ 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 + - 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/instillartifact/v0/config/tasks.yaml b/pkg/component/data/instillartifact/v0/config/tasks.yaml index 829bacc2f..f983d46db 100644 --- a/pkg/component/data/instillartifact/v0/config/tasks.yaml +++ b/pkg/component/data/instillartifact/v0/config/tasks.yaml @@ -1,18 +1,16 @@ $defs: file: - description: Base64 encoded PDF/DOCX/DOC/PPTX/PPT/HTML file to be uploaded into - catalog. + description: Base64 encoded PDF/DOCX/DOC/PPTX/PPT/HTML file to be uploaded into catalog. uiOrder: 2 acceptFormats: - - '*/*' + - '*/*' title: File format: string files: - description: Base64 encoded PDF/DOCX/DOC/PPTX/PPT/HTML files to be uploaded into - catalog. + description: Base64 encoded PDF/DOCX/DOC/PPTX/PPT/HTML files to be uploaded into catalog. uiOrder: 2 acceptFormats: - - array + - array items: format: string title: Files @@ -55,7 +53,7 @@ $defs: title: Catalog ID format: string required: - - catalog-id + - catalog-id title: File format: object chunk-item: @@ -81,17 +79,16 @@ $defs: title: Source File Name format: string required: - - chunk-uid - - similarity-score - - text-content - - source-file-name + - chunk-uid + - similarity-score + - text-content + - source-file-name title: Chunk format: object namespace: - description: Fill in your namespace, you can get namespace through the tab of - switching namespace. + description: Fill in your namespace, you can get namespace through the tab of switching namespace. acceptFormats: - - string + - string uiOrder: 0 title: Namespace format: string @@ -99,7 +96,7 @@ $defs: description: File contents and metadata from third-part data storage. uiOrder: 2 acceptFormats: - - array + - array items: properties: id: @@ -113,8 +110,7 @@ $defs: title: Name format: string content: - description: Base64 encoded content of the binary file without the `data:[MIME_TYPE];base64,` - prefix. + description: Base64 encoded content of the binary file without the `data:[MIME_TYPE];base64,` prefix. uiOrder: 2 title: Content format: string @@ -124,8 +120,7 @@ $defs: title: Created time format: string modified-time: - description: '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.' + description: '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.' uiOrder: 4 title: Modified time format: string @@ -140,8 +135,7 @@ $defs: title: MIME type format: string md5-checksum: - description: MD5 checksum of the file. This reflects every change made to - the file on the server, even those not visible to the user. + description: MD5 checksum of the file. This reflects every change made to the file on the server, even those not visible to the user. uiOrder: 7 title: MD5 checksum format: string @@ -151,9 +145,8 @@ $defs: title: Version format: integer web-view-link: - description: 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. + description: 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. uiOrder: 9 title: Web View Link format: string @@ -163,14 +156,14 @@ $defs: title: Web Content Link format: string required: - - id - - name - - created-time - - modified-time - - size - - mime-type - - version - - web-view-link + - id + - name + - created-time + - modified-time + - size + - mime-type + - version + - web-view-link title: Third Party File format: object title: Third Party Files @@ -182,101 +175,98 @@ TASK_UPLOAD_FILE: uiOrder: 0 properties: options: - description: Choose to upload the files to existing catalog or create a new - catalog. + description: Choose to upload the files to existing catalog or create a new catalog. title: Options additionalProperties: true uiOrder: 0 required: - - option - oneOf: - - properties: - option: - const: existing catalog - title: Option - description: Existing catalog. - uiOrder: 0 - format: string - namespace: - $ref: '#/$defs/namespace' - catalog-id: - description: Catalog ID that you input in the Catalog. - uiOrder: 1 - acceptFormats: - - string - title: Catalog ID - format: string - file: - $ref: '#/$defs/file' - file-name: - description: Name of the file, including the extension (e.g. `example.pdf`). - The length of this field is limited to 100 characters. - uiOrder: 2 - acceptFormats: - - string - title: File Name - format: string - required: - option - - namespace - - catalog-id - - file - - file-name - title: Existing Catalog - format: object - - properties: - option: - const: create new catalog - title: Option - description: Create new catalog. - uiOrder: 0 - format: string - namespace: - $ref: '#/$defs/namespace' - catalog-id: - description: Catalog ID for new catalog you want to create. - uiOrder: 1 - acceptFormats: - - string - title: Catalog ID - format: string - file: - $ref: '#/$defs/file' - file-name: - description: Name of the file, including the extension (e.g. `example.pdf`). - The length of this field is limited to 100 characters. - uiOrder: 3 - acceptFormats: - - string - title: File Name - format: string - description: - description: Description of the catalog. - uiOrder: 4 - acceptFormats: - - string - title: Description - format: string - tags: - description: Tags for the catalog. - uiOrder: 5 - acceptFormats: - - array - items: + oneOf: + - properties: + option: + const: existing catalog + title: Option + description: Existing catalog. + uiOrder: 0 format: string - title: Tags - format: array - required: - - option - - namespace - - catalog-id - - file - - file-name - title: Create New Catalog - format: object + namespace: + $ref: '#/$defs/namespace' + catalog-id: + description: Catalog ID that you input in the Catalog. + uiOrder: 1 + acceptFormats: + - string + title: Catalog ID + format: string + file: + $ref: '#/$defs/file' + file-name: + description: Name of the file, including the extension (e.g. `example.pdf`). The length of this field is limited to 100 characters. + uiOrder: 2 + acceptFormats: + - string + title: File Name + format: string + required: + - option + - namespace + - catalog-id + - file + - file-name + title: Existing Catalog + format: object + - properties: + option: + const: create new catalog + title: Option + description: Create new catalog. + uiOrder: 0 + format: string + namespace: + $ref: '#/$defs/namespace' + catalog-id: + description: Catalog ID for new catalog you want to create. + uiOrder: 1 + acceptFormats: + - string + title: Catalog ID + format: string + file: + $ref: '#/$defs/file' + file-name: + description: Name of the file, including the extension (e.g. `example.pdf`). The length of this field is limited to 100 characters. + uiOrder: 3 + acceptFormats: + - string + title: File Name + format: string + description: + description: Description of the catalog. + uiOrder: 4 + acceptFormats: + - string + title: Description + format: string + tags: + description: Tags for the catalog. + uiOrder: 5 + acceptFormats: + - array + items: + format: string + title: Tags + format: array + required: + - option + - namespace + - catalog-id + - file + - file-name + title: Create New Catalog + format: object format: object required: - - options + - options title: Input format: object output: @@ -288,13 +278,13 @@ TASK_UPLOAD_FILE: properties: $ref: '#/$defs/file-item/properties' required: - - file-uid - - file-name - - file-type - - create-time - - update-time - - size - - catalog-id + - file-uid + - file-name + - file-type + - create-time + - update-time + - size + - catalog-id title: File format: object status: @@ -303,8 +293,8 @@ TASK_UPLOAD_FILE: title: Status format: boolean required: - - file - - status + - file + - status title: Output format: object TASK_UPLOAD_FILES: @@ -314,105 +304,102 @@ TASK_UPLOAD_FILES: uiOrder: 0 properties: options: - description: Choose to upload the files to existing catalog or create a new - catalog. + description: Choose to upload the files to existing catalog or create a new catalog. title: Options additionalProperties: true uiOrder: 0 required: - - option + - option oneOf: - - properties: - option: - const: existing catalog - title: Option - description: Existing catalog. - uiOrder: 0 - format: string - namespace: - $ref: '#/$defs/namespace' - catalog-id: - description: Catalog ID that you input in the Catalog. - uiOrder: 1 - acceptFormats: - - string - title: Catalog ID - format: string - files: - $ref: '#/$defs/files' - file-names: - description: Name of the file, including the extension (e.g. `example.pdf`). - The length of this field is limited to 100 characters. - uiOrder: 2 - acceptFormats: - - array - items: + - properties: + option: + const: existing catalog + title: Option + description: Existing catalog. + uiOrder: 0 format: string - title: File Names - format: array - required: - - option - - namespace - - catalog-id - - files - - file-names - title: Existing Catalog - format: object - - properties: - option: - const: create new catalog - title: Option - description: Create new catalog. - uiOrder: 0 - format: string - namespace: - $ref: '#/$defs/namespace' - catalog-id: - description: Catalog ID for new catalog you want to create. - uiOrder: 1 - acceptFormats: - - string - title: Catalog ID - format: string - files: - $ref: '#/$defs/files' - file-names: - description: Name of the file, including the extension (e.g. `example.pdf`). - The length of this field is limited to 100 characters. - uiOrder: 3 - acceptFormats: - - array - items: + namespace: + $ref: '#/$defs/namespace' + catalog-id: + description: Catalog ID that you input in the Catalog. + uiOrder: 1 + acceptFormats: + - string + title: Catalog ID format: string - title: File Names - format: array - description: - description: Description of the catalog. - uiOrder: 4 - acceptFormats: - - string - title: Description - format: string - tags: - description: Tags for the catalog. - uiOrder: 5 - acceptFormats: - - array - items: + files: + $ref: '#/$defs/files' + file-names: + description: Name of the file, including the extension (e.g. `example.pdf`). The length of this field is limited to 100 characters. + uiOrder: 2 + acceptFormats: + - array + items: + format: string + title: File Names + format: array + required: + - option + - namespace + - catalog-id + - files + - file-names + title: Existing Catalog + format: object + - properties: + option: + const: create new catalog + title: Option + description: Create new catalog. + uiOrder: 0 format: string - title: Tags - format: array - required: - - option - - namespace - - catalog-id - - files - - file-names - title: Create New Catalog - format: object + namespace: + $ref: '#/$defs/namespace' + catalog-id: + description: Catalog ID for new catalog you want to create. + uiOrder: 1 + acceptFormats: + - string + title: Catalog ID + format: string + files: + $ref: '#/$defs/files' + file-names: + description: Name of the file, including the extension (e.g. `example.pdf`). The length of this field is limited to 100 characters. + uiOrder: 3 + acceptFormats: + - array + items: + format: string + title: File Names + format: array + description: + description: Description of the catalog. + uiOrder: 4 + acceptFormats: + - string + title: Description + format: string + tags: + description: Tags for the catalog. + uiOrder: 5 + acceptFormats: + - array + items: + format: string + title: Tags + format: array + required: + - option + - namespace + - catalog-id + - files + - file-names + title: Create New Catalog + format: object format: object required: - - options + - options title: Input format: object output: @@ -426,14 +413,13 @@ TASK_UPLOAD_FILES: title: Files format: array status: - description: The status of trigger file processing, if ALL succeeded, return - true. + description: The status of trigger file processing, if ALL succeeded, return true. uiOrder: 1 title: Status format: boolean required: - - files - - status + - files + - status title: Output format: object TASK_GET_FILES_METADATA: @@ -447,12 +433,12 @@ TASK_GET_FILES_METADATA: description: Catalog ID that you input to search files in the Catalog. uiOrder: 1 acceptFormats: - - string + - string title: Catalog ID format: string required: - - namespace - - catalog-id + - namespace + - catalog-id title: Input format: object output: @@ -467,7 +453,7 @@ TASK_GET_FILES_METADATA: title: Files format: array required: - - files + - files title: Output format: object TASK_GET_CHUNKS_METADATA: @@ -481,20 +467,20 @@ TASK_GET_CHUNKS_METADATA: description: Catalog ID that you input to search files in the Catalog. uiOrder: 0 acceptFormats: - - string + - string title: Catalog ID format: string file-uid: description: The unique identifier of the file. uiOrder: 1 acceptFormats: - - string + - string title: File UID format: string required: - - namespace - - catalog-id - - file-uid + - namespace + - catalog-id + - file-uid title: Input format: object output: @@ -542,19 +528,19 @@ TASK_GET_CHUNKS_METADATA: title: File UID format: string required: - - chunk-uid - - retrievable - - start-position - - end-position - - token-count - - create-time - - original-file-uid + - chunk-uid + - retrievable + - start-position + - end-position + - token-count + - create-time + - original-file-uid title: Chunk format: object title: Chunks format: array required: - - chunks + - chunks title: Output format: object TASK_GET_FILE_IN_MARKDOWN: @@ -568,20 +554,20 @@ TASK_GET_FILE_IN_MARKDOWN: description: Catalog ID that you input to search files in the Catalog. uiOrder: 0 acceptFormats: - - string + - string title: Catalog ID format: string file-uid: description: The unique identifier of the file. uiOrder: 1 acceptFormats: - - string + - string title: File UID format: string required: - - namespace - - catalog-id - - file-uid + - namespace + - catalog-id + - file-uid title: Input format: object output: @@ -609,10 +595,10 @@ TASK_GET_FILE_IN_MARKDOWN: title: Update Time format: string required: - - original-file-uid - - content - - create-time - - update-time + - original-file-uid + - content + - create-time + - update-time title: Output format: object TASK_RETRIEVE: @@ -626,29 +612,28 @@ TASK_RETRIEVE: description: Catalog ID that you input to search files in the Catalog. uiOrder: 0 acceptFormats: - - string + - string title: Catalog ID format: string text-prompt: description: The prompt string to search the chunks. uiOrder: 1 acceptFormats: - - string + - string title: Text Prompt format: string top-k: - description: The number of top chunks to return. The range is from 1~20, and - default is 5. + description: The number of top chunks to return. The range is from 1~20, and default is 5. default: 5 uiOrder: 2 acceptFormats: - - integer + - integer title: Top K format: integer required: - - namespace - - catalog-id - - text-prompt + - namespace + - catalog-id + - text-prompt title: Input format: object output: @@ -662,7 +647,7 @@ TASK_RETRIEVE: title: Chunks format: array required: - - chunks + - chunks title: Output format: object TASK_ASK: @@ -676,29 +661,28 @@ TASK_ASK: description: Catalog ID that you input to search files in the Catalog. uiOrder: 0 acceptFormats: - - string + - string title: Catalog ID format: string question: description: The question to reply. uiOrder: 1 acceptFormats: - - string + - string title: Question format: string top-k: - description: The number of top answers to return. The range is from 1~20, - and default is 5. + description: The number of top answers to return. The range is from 1~20, and default is 5. default: 5 uiOrder: 2 acceptFormats: - - integer + - integer title: Top K format: integer required: - - namespace - - catalog-id - - question + - namespace + - catalog-id + - question title: Input format: object output: @@ -717,7 +701,7 @@ TASK_ASK: title: Chunks format: array required: - - answer + - answer title: Output format: object TASK_MATCH_FILE_STATUS: @@ -728,24 +712,23 @@ TASK_MATCH_FILE_STATUS: namespace: $ref: '#/$defs/namespace' catalog-id: - description: Catalog ID that you input to check files' processing status in - the Catalog. + description: Catalog ID that you input to check files' processing status in the Catalog. uiOrder: 0 acceptFormats: - - string + - string title: Catalog ID format: string file-uid: description: The unique identifier of the file. uiOrder: 1 acceptFormats: - - string + - string title: File UID format: string required: - - namespace - - catalog-id - - file-uid + - namespace + - catalog-id + - file-uid title: Input format: object output: @@ -757,58 +740,52 @@ TASK_MATCH_FILE_STATUS: title: Status format: boolean required: - - succeeded + - succeeded title: Output format: object TASK_SYNC_FILES: - shortDescription: 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. + shortDescription: 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: uiOrder: 0 properties: namespace: $ref: '#/$defs/namespace' catalog-id: - description: Catalog ID that you input to synchronize files from third-party - data storage to catalog. + description: Catalog ID that you input to synchronize files from third-party data storage to catalog. uiOrder: 1 acceptFormats: - - string + - string title: Catalog ID format: string third-party-files: $ref: '#/$defs/third-party-files' required: - - namespace - - catalog-id - - third-party-files + - namespace + - catalog-id + - third-party-files title: Input format: object output: uiOrder: 1 properties: uploaded-files: - description: Files metadata in catalog. The metadata here is from Instill - Artifact rather than third-party storage. + description: Files metadata in catalog. The metadata here is from Instill Artifact rather than third-party storage. uiOrder: 0 items: $ref: '#/$defs/file-item' title: Uploaded Files format: array updated_files: - description: Files that were updated. The metadata here is from Instill Artifact - rather than third-party storage. + description: Files that were updated. The metadata here is from Instill Artifact rather than third-party storage. uiOrder: 1 items: $ref: '#/$defs/file-item' title: Updated Files format: array failure-files: - description: Files that failed to upload or overwrite. The metadata here is - from third-party storage. + description: Files that failed to upload or overwrite. The metadata here is from third-party storage. uiOrder: 2 items: $ref: '#/$defs/third-party-files/items' @@ -822,8 +799,7 @@ TASK_SYNC_FILES: title: Error Messages format: array status: - description: The status of the triggering processing files, if succeeded, - return true. + description: The status of the triggering processing files, if succeeded, return true. uiOrder: 4 title: Status format: boolean diff --git a/pkg/component/data/milvus/v0/config/definition.yaml b/pkg/component/data/milvus/v0/config/definition.yaml index 542c172d5..43b90685b 100644 --- a/pkg/component/data/milvus/v0/config/definition.yaml +++ b/pkg/component/data/milvus/v0/config/definition.yaml @@ -1,14 +1,14 @@ 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 + - 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/milvus/v0/config/setup.yaml b/pkg/component/data/milvus/v0/config/setup.yaml index 0fa4e9c82..2e5acff19 100644 --- a/pkg/component/data/milvus/v0/config/setup.yaml +++ b/pkg/component/data/milvus/v0/config/setup.yaml @@ -3,7 +3,7 @@ properties: url: description: Fill in your Milvus public URL endpoint with port number, e.g http://3.25.202.142:19530. acceptFormats: - - string + - string instillSecret: false uiOrder: 0 title: Milvus URL Endpoint @@ -11,7 +11,7 @@ properties: username: description: Fill in your Milvus username. acceptFormats: - - string + - string instillSecret: false uiOrder: 1 title: Milvus Username @@ -19,14 +19,14 @@ properties: password: description: Fill in your Milvus password. acceptFormats: - - string + - string instillSecret: true uiOrder: 2 title: Milvus Password format: string required: -- url -- username -- password + - url + - username + - password title: Milvus Connection format: object diff --git a/pkg/component/data/milvus/v0/config/tasks.yaml b/pkg/component/data/milvus/v0/config/tasks.yaml index b309231ba..4660bcbf9 100644 --- a/pkg/component/data/milvus/v0/config/tasks.yaml +++ b/pkg/component/data/milvus/v0/config/tasks.yaml @@ -6,22 +6,22 @@ TASK_VECTOR_SEARCH: collection-name: description: The name of the collection to perform vector search on. acceptFormats: - - string + - string uiOrder: 0 title: Collection Name format: string partition-name: description: The name of the partition to vector search the data from. acceptFormats: - - string + - string uiOrder: 1 title: Partition Name format: string vector: description: An array of dimensions for the vector search. acceptFormats: - - array - - array + - array + - array uiOrder: 2 items: description: A dimension of the vector. @@ -33,22 +33,21 @@ TASK_VECTOR_SEARCH: vector-field: description: The name of the field to perform vector search on. acceptFormats: - - string + - string uiOrder: 3 title: Vector Field format: string limit: description: The limit of the data to return. acceptFormats: - - integer + - integer uiOrder: 4 title: Limit format: integer fields: - description: The fields to return in the data. If empty then all fields will - be returned. + description: The fields to return in the data. If empty then all fields will be returned. acceptFormats: - - array + - array shortDescription: Fields to be returned, empty for all fields uiOrder: 4 title: Fields @@ -58,42 +57,40 @@ TASK_VECTOR_SEARCH: format: string format: array filter: - description: 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). + description: 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). uiOrder: 5 acceptFormats: - - string + - string title: Filter format: string offset: description: The offset of the data to return. acceptFormats: - - integer + - integer uiOrder: 6 title: Offset format: integer grouping-field: description: 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). acceptFormats: - - string + - string uiOrder: 7 title: Grouping Field format: string search-params: - description: 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). + description: 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). uiOrder: 8 acceptFormats: - - json - - object + - json + - object title: Search Parameters required: [] format: object required: - - collection-name - - vector - - vector-field - - limit + - collection-name + - vector + - vector-field + - limit title: Input format: object output: @@ -156,8 +153,8 @@ TASK_VECTOR_SEARCH: required: [] format: object required: - - status - - result + - status + - result title: Output format: object TASK_UPSERT: @@ -168,30 +165,29 @@ TASK_UPSERT: collection-name: description: The name of the collection to upsert the data into. acceptFormats: - - string + - string uiOrder: 0 title: Collection Name format: string partition-name: - description: The name of the partition to upsert the data from. If empty then - default partition will be used. + description: The name of the partition to upsert the data from. If empty then default partition will be used. acceptFormats: - - string + - string uiOrder: 1 title: Partition Name format: string data: description: The data. acceptFormats: - - json - - object + - json + - object uiOrder: 2 title: Data required: [] format: object required: - - collection-name - - data + - collection-name + - data title: Input format: object output: @@ -203,7 +199,7 @@ TASK_UPSERT: title: Status format: string required: - - status + - status title: Output format: object TASK_BATCH_UPSERT: @@ -214,25 +210,24 @@ TASK_BATCH_UPSERT: collection-name: description: The name of the collection to upsert the data into. acceptFormats: - - string + - string uiOrder: 0 title: Collection Name format: string partition-name: - description: The name of the partition to upsert the data from. If empty then - default partition will be used. + description: The name of the partition to upsert the data from. If empty then default partition will be used. acceptFormats: - - string + - string uiOrder: 1 title: Partition Name format: string array-data: description: The data. acceptFormats: - - array - - array - - array - - array + - array + - array + - array + - array uiOrder: 2 title: Array Data items: @@ -241,8 +236,8 @@ TASK_BATCH_UPSERT: format: object format: array required: - - collection-name - - array-data + - collection-name + - array-data title: Input format: object output: @@ -254,7 +249,7 @@ TASK_BATCH_UPSERT: title: Status format: string required: - - status + - status title: Output format: object TASK_DELETE: @@ -265,28 +260,26 @@ TASK_DELETE: collection-name: description: The name of the collection to delete the data from. acceptFormats: - - string + - string uiOrder: 0 title: Collection Name format: string partition-name: - description: The name of the partition to delete the data from. If empty then - default partition will be used. + description: The name of the partition to delete the data from. If empty then default partition will be used. acceptFormats: - - string + - string uiOrder: 1 title: Partition Name format: string filter: - description: 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). + description: 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). uiOrder: 2 acceptFormats: - - string + - string title: Filter format: string required: - - collection-name + - collection-name title: Input format: object output: @@ -298,7 +291,7 @@ TASK_DELETE: title: Status format: string required: - - status + - status title: Output format: object TASK_CREATE_COLLECTION: @@ -309,29 +302,29 @@ TASK_CREATE_COLLECTION: collection-name: description: The name of the collection to create. acceptFormats: - - string + - string uiOrder: 0 title: Collection Name format: string dimension: description: The dimension of the collection. acceptFormats: - - integer + - integer uiOrder: 1 title: Dimension format: integer id-type: description: The type of the id. acceptFormats: - - string + - string uiOrder: 3 title: ID Type format: string schema: description: The schema of the collection. acceptFormats: - - json - - object + - json + - object uiOrder: 4 title: Schema required: [] @@ -339,7 +332,7 @@ TASK_CREATE_COLLECTION: auto-id: description: Whether to auto generate id. acceptFormats: - - boolean + - boolean uiOrder: 5 title: Auto ID default: false @@ -347,22 +340,21 @@ TASK_CREATE_COLLECTION: metric-type: description: The metric type of the collection. acceptFormats: - - string + - string uiOrder: 6 title: Metric Type enum: - - L2 - - IP - - COSINE + - L2 + - IP + - COSINE default: L2 format: string index-params: - description: 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). + description: 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). uiOrder: 7 acceptFormats: - - array - - array + - array + - array title: Index Parameters required: [] items: @@ -371,18 +363,17 @@ TASK_CREATE_COLLECTION: format: object format: array params: - description: The parameters to be applied to the collection with milvus parameters, - please refer to [Parameters](https://milvus.io/docs/single-vector-search.md#Parameters). + description: The parameters to be applied to the collection with milvus parameters, please refer to [Parameters](https://milvus.io/docs/single-vector-search.md#Parameters). uiOrder: 8 acceptFormats: - - json - - object + - json + - object title: Parameters required: [] format: object required: - - collection-name - - dimension + - collection-name + - dimension title: Input format: object output: @@ -394,7 +385,7 @@ TASK_CREATE_COLLECTION: title: Status format: string required: - - status + - status title: Output format: object TASK_DROP_COLLECTION: @@ -405,12 +396,12 @@ TASK_DROP_COLLECTION: collection-name: description: The name of the collection to drop. acceptFormats: - - string + - string uiOrder: 0 title: Collection Name format: string required: - - collection-name + - collection-name title: Input format: object output: @@ -422,7 +413,7 @@ TASK_DROP_COLLECTION: title: Status format: string required: - - status + - status title: Output format: object TASK_CREATE_PARTITION: @@ -433,20 +424,20 @@ TASK_CREATE_PARTITION: collection-name: description: The name of the collection to create the partition in. acceptFormats: - - string + - string uiOrder: 0 title: Collection Name format: string partition-name: description: The name of the partition to create. acceptFormats: - - string + - string uiOrder: 1 title: Partition Name format: string required: - - collection-name - - partition-name + - collection-name + - partition-name title: Input format: object output: @@ -458,7 +449,7 @@ TASK_CREATE_PARTITION: title: Status format: string required: - - status + - status title: Output format: object TASK_DROP_PARTITION: @@ -469,20 +460,20 @@ TASK_DROP_PARTITION: collection-name: description: The name of the collection to drop the partition from. acceptFormats: - - string + - string uiOrder: 0 title: Collection Name format: string partition-name: description: The name of the partition to drop. acceptFormats: - - string + - string uiOrder: 1 title: Partition Name format: string required: - - collection-name - - partition-name + - collection-name + - partition-name title: Input format: object output: @@ -494,7 +485,7 @@ TASK_DROP_PARTITION: title: Status format: string required: - - status + - status title: Output format: object TASK_CREATE_INDEX: @@ -505,23 +496,22 @@ TASK_CREATE_INDEX: collection-name: description: The name of the collection to create the index in. acceptFormats: - - string + - string uiOrder: 0 title: Collection Name format: string index-params: - description: 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). + description: 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). uiOrder: 7 acceptFormats: - - json - - object + - json + - object title: Index Parameters required: [] format: object required: - - collection-name - - index-params + - collection-name + - index-params title: Input format: object output: @@ -533,7 +523,7 @@ TASK_CREATE_INDEX: title: Status format: string required: - - status + - status title: Output format: object TASK_DROP_INDEX: @@ -544,20 +534,20 @@ TASK_DROP_INDEX: collection-name: description: The name of the collection to drop the index from. acceptFormats: - - string + - string uiOrder: 0 title: Collection Name format: string index-name: description: The name of the index to drop. acceptFormats: - - string + - string uiOrder: 1 title: Index Name format: string required: - - collection-name - - index-name + - collection-name + - index-name title: Input format: object output: @@ -569,6 +559,6 @@ TASK_DROP_INDEX: title: Status format: string required: - - status + - status title: Output format: object diff --git a/pkg/component/data/mongodb/v0/config/definition.yaml b/pkg/component/data/mongodb/v0/config/definition.yaml index aefb72698..463eb14a2 100644 --- a/pkg/component/data/mongodb/v0/config/definition.yaml +++ b/pkg/component/data/mongodb/v0/config/definition.yaml @@ -1,14 +1,14 @@ 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 + - 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/mongodb/v0/config/setup.yaml b/pkg/component/data/mongodb/v0/config/setup.yaml index 29ecc8de6..e94675d70 100644 --- a/pkg/component/data/mongodb/v0/config/setup.yaml +++ b/pkg/component/data/mongodb/v0/config/setup.yaml @@ -3,12 +3,12 @@ properties: uri: description: Fill in your MongoDB URI. acceptFormats: - - string + - string instillSecret: true uiOrder: 0 title: URI format: string required: -- uri + - uri title: MongoDB Connection format: object diff --git a/pkg/component/data/mongodb/v0/config/tasks.yaml b/pkg/component/data/mongodb/v0/config/tasks.yaml index 64ce223e6..10d48d99a 100644 --- a/pkg/component/data/mongodb/v0/config/tasks.yaml +++ b/pkg/component/data/mongodb/v0/config/tasks.yaml @@ -6,37 +6,37 @@ TASK_INSERT: database-name: description: The name of the database in MongoDB. acceptFormats: - - string + - string uiOrder: 0 title: Database Name format: string collection-name: description: The name of the collection in MongoDB. acceptFormats: - - string + - string uiOrder: 1 title: Collection Name format: string id: description: The ID of the document. acceptFormats: - - string + - string uiOrder: 2 title: ID format: string data: description: The data to be inserted. acceptFormats: - - json - - object + - json + - object uiOrder: 3 title: Data required: [] format: object required: - - database-name - - collection-name - - data + - database-name + - collection-name + - data title: Input format: object output: @@ -49,7 +49,7 @@ TASK_INSERT: title: Status format: string required: - - status + - status title: Output format: object TASK_INSERT_MANY: @@ -60,21 +60,21 @@ TASK_INSERT_MANY: database-name: description: The name of the database in MongoDB. acceptFormats: - - string + - string uiOrder: 0 title: Database Name format: string collection-name: description: The name of the collection in MongoDB. acceptFormats: - - string + - string uiOrder: 1 title: Collection Name format: string array-id: description: The array of id. acceptFormats: - - array + - array uiOrder: 2 items: description: An id of the document. @@ -86,10 +86,10 @@ TASK_INSERT_MANY: array-data: description: The array data to be inserted. acceptFormats: - - array - - array - - array - - array + - array + - array + - array + - array uiOrder: 3 title: Data items: @@ -100,9 +100,9 @@ TASK_INSERT_MANY: minItems: 1 format: array required: - - database-name - - collection-name - - array-data + - database-name + - collection-name + - array-data title: Input format: object output: @@ -114,7 +114,7 @@ TASK_INSERT_MANY: title: Status format: string required: - - status + - status title: Output format: object TASK_FIND: @@ -125,21 +125,21 @@ TASK_FIND: database-name: description: The name of the database in MongoDB. acceptFormats: - - string + - string uiOrder: 0 title: Database Name format: string collection-name: description: The name of the collection in MongoDB. acceptFormats: - - string + - string uiOrder: 1 title: Collection Name format: string id: description: The ID of the document. acceptFormats: - - string + - string uiOrder: 2 title: ID format: string @@ -147,28 +147,25 @@ TASK_FIND: description: The filter to find documents, please refer to [the documentations](https://www.mongodb.com/docs/manual/reference/operator/query/). If empty then all documents will be returned. acceptFormats: - - json - - object - shortDescription: The mongodb language query to filter the documents, empty - for no filter + - json + - object + shortDescription: The mongodb language query to filter the documents, empty for no filter uiOrder: 3 title: Filter required: [] format: object limit: - description: The number of documents to return. If empty then all documents - will be returned. + description: The number of documents to return. If empty then all documents will be returned. acceptFormats: - - integer + - integer shortDescription: Limit the documents, empty for all documents uiOrder: 4 title: Limit format: integer fields: - description: The fields to return in the documents. If empty then all fields - will be returned. + description: The fields to return in the documents. If empty then all fields will be returned. acceptFormats: - - array + - array shortDescription: Fields to be returned, empty for all fields uiOrder: 5 title: Fields @@ -178,8 +175,8 @@ TASK_FIND: minItems: 1 format: array required: - - database-name - - collection-name + - database-name + - collection-name title: Input format: object output: @@ -229,8 +226,8 @@ TASK_FIND: required: [] format: object required: - - status - - result + - status + - result title: Output format: object TASK_UPDATE: @@ -241,21 +238,21 @@ TASK_UPDATE: database-name: description: The name of the database in MongoDB. acceptFormats: - - string + - string uiOrder: 0 title: Database Name format: string collection-name: description: The name of the collection in MongoDB. acceptFormats: - - string + - string uiOrder: 1 title: Collection Name format: string id: description: The ID of the document. acceptFormats: - - string + - string uiOrder: 2 title: ID format: string @@ -263,8 +260,8 @@ TASK_UPDATE: description: The filter to update documents, please refer to [the documentations](https://www.mongodb.com/docs/manual/reference/operator/query/). If empty then all documents will be returned. acceptFormats: - - json - - object + - json + - object shortDescription: The mongodb language query to filter the documents uiOrder: 3 title: Filter @@ -273,16 +270,16 @@ TASK_UPDATE: update-data: description: The updated data to be applied to the documents. acceptFormats: - - json - - object + - json + - object uiOrder: 4 title: Update required: [] format: object required: - - database-name - - collection-name - - update-data + - database-name + - collection-name + - update-data title: Input format: object output: @@ -295,7 +292,7 @@ TASK_UPDATE: title: Status format: string required: - - status + - status title: Output format: object TASK_DELETE: @@ -306,21 +303,21 @@ TASK_DELETE: database-name: description: The name of the database in MongoDB. acceptFormats: - - string + - string uiOrder: 0 title: Database Name format: string collection-name: description: The name of the collection in MongoDB. acceptFormats: - - string + - string uiOrder: 1 title: Collection Name format: string id: description: The ID of the document. acceptFormats: - - string + - string uiOrder: 2 title: ID format: string @@ -328,16 +325,16 @@ TASK_DELETE: description: The filter to delete documents, please refer to [the documentations](https://www.mongodb.com/docs/manual/reference/operator/query/). If empty then all documents will be returned. acceptFormats: - - json - - object + - json + - object shortDescription: The mongodb language query to filter the documents uiOrder: 3 title: Filter required: [] format: object required: - - database-name - - collection-name + - database-name + - collection-name title: Input format: object output: @@ -350,7 +347,7 @@ TASK_DELETE: title: Status format: string required: - - status + - status title: Output format: object TASK_DROP_COLLECTION: @@ -361,20 +358,20 @@ TASK_DROP_COLLECTION: database-name: description: The name of the database in MongoDB. acceptFormats: - - string + - string uiOrder: 0 title: Database Name format: string collection-name: description: The name of the collection in MongoDB. acceptFormats: - - string + - string uiOrder: 1 title: Collection Name format: string required: - - database-name - - collection-name + - database-name + - collection-name title: Input format: object output: @@ -387,7 +384,7 @@ TASK_DROP_COLLECTION: title: Status format: string required: - - status + - status title: Output format: object TASK_DROP_DATABASE: @@ -398,12 +395,12 @@ TASK_DROP_DATABASE: database-name: description: The name of the database in MongoDB. acceptFormats: - - string + - string uiOrder: 0 title: Database Name format: string required: - - database-name + - database-name title: Input format: object output: @@ -416,7 +413,7 @@ TASK_DROP_DATABASE: title: Status format: string required: - - status + - status title: Output format: object TASK_CREATE_SEARCH_INDEX: @@ -427,21 +424,21 @@ TASK_CREATE_SEARCH_INDEX: database-name: description: The name of the database in MongoDB. acceptFormats: - - string + - string uiOrder: 0 title: Database Name format: string collection-name: description: The name of the collection in MongoDB. acceptFormats: - - string + - string uiOrder: 1 title: Collection Name format: string index-name: description: The name of the index to be created. acceptFormats: - - string + - string shortDescription: Index Name uiOrder: 2 title: Index Name @@ -449,32 +446,31 @@ TASK_CREATE_SEARCH_INDEX: index-type: description: The type of the index to be created. acceptFormats: - - string + - string shortDescription: Index Type uiOrder: 3 enum: - - search - - vectorSearch + - search + - vectorSearch title: Index Type format: string syntax: - description: 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/). + description: 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/). acceptFormats: - - json - - object + - json + - object shortDescription: Syntax Structure, please refer to the MongoDB documentation uiOrder: 4 title: Syntax required: [] format: object required: - - database-name - - collection-name - - index-type - - index-name - - syntax + - database-name + - collection-name + - index-type + - index-name + - syntax title: Input format: object output: @@ -487,7 +483,7 @@ TASK_CREATE_SEARCH_INDEX: title: Status format: string required: - - status + - status title: Output format: object TASK_DROP_SEARCH_INDEX: @@ -498,29 +494,29 @@ TASK_DROP_SEARCH_INDEX: database-name: description: The name of the database in MongoDB. acceptFormats: - - string + - string uiOrder: 0 title: Database Name format: string collection-name: description: The name of the collection in MongoDB. acceptFormats: - - string + - string uiOrder: 1 title: Collection Name format: string index-name: description: The name of the index to be dropped. acceptFormats: - - string + - string shortDescription: Index Name uiOrder: 2 title: Index Name format: string required: - - database-name - - collection-name - - index-name + - database-name + - collection-name + - index-name title: Input format: object output: @@ -533,7 +529,7 @@ TASK_DROP_SEARCH_INDEX: title: Status format: string required: - - status + - status title: Output format: object TASK_VECTOR_SEARCH: @@ -544,21 +540,21 @@ TASK_VECTOR_SEARCH: database-name: description: The name of the database in MongoDB. acceptFormats: - - string + - string uiOrder: 0 title: Database Name format: string collection-name: description: The name of the collection in MongoDB. acceptFormats: - - string + - string uiOrder: 1 title: Collection Name format: string index-name: description: The name of the index to be used for vector search. acceptFormats: - - string + - string shortDescription: Index Name uiOrder: 2 title: Index Name @@ -566,8 +562,8 @@ TASK_VECTOR_SEARCH: query-vector: description: The query vector to be used for vector search. acceptFormats: - - array - - array + - array + - array shortDescription: Query Vector uiOrder: 3 title: Query Vector @@ -578,10 +574,9 @@ TASK_VECTOR_SEARCH: minItems: 1 format: array exact: - description: The exact value for vector search. If true, then ENN search will - be performed, otherwise ANN search will be performed. Default to false. + description: The exact value for vector search. If true, then ENN search will be performed, otherwise ANN search will be performed. Default to false. acceptFormats: - - boolean + - boolean shortDescription: Exact Search, true for ENN search, false for ANN search uiOrder: 4 title: Exact @@ -590,16 +585,15 @@ TASK_VECTOR_SEARCH: limit: description: Limit the documents to be returned. acceptFormats: - - integer + - integer shortDescription: Limit Documents uiOrder: 5 title: Limit format: integer num-candidates: - description: The number of candidates to the field to be used for vector search. - Default to 3 times limit. + description: The number of candidates to the field to be used for vector search. Default to 3 times limit. acceptFormats: - - integer + - integer shortDescription: Number of Candidates, default to 3 times limit uiOrder: 6 title: Number of Candidates @@ -607,29 +601,26 @@ TASK_VECTOR_SEARCH: path: description: The path to the field to be used for vector search. acceptFormats: - - string + - string shortDescription: Path, need to first create vectorSearch search index uiOrder: 7 title: Path format: string filter: - description: The filter to be used for vector search, need to first create - filter vectorSearch search index, please refer to [the documentations](https://www.mongodb.com/docs/manual/reference/operator/query/). + description: The filter to be used for vector search, need to first create filter vectorSearch search index, please refer to [the documentations](https://www.mongodb.com/docs/manual/reference/operator/query/). If empty then all documents will be returned to be used for vector search. acceptFormats: - - json - - object - shortDescription: The mongodb language query to filter the documents, empty - for all documents + - json + - object + shortDescription: The mongodb language query to filter the documents, empty for all documents uiOrder: 8 title: Filter required: [] format: object fields: - description: The fields to return in the documents. If empty then all fields - will be returned. + description: The fields to return in the documents. If empty then all fields will be returned. acceptFormats: - - array + - array shortDescription: Fields to be returned, empty for all fields uiOrder: 9 title: Fields @@ -639,12 +630,12 @@ TASK_VECTOR_SEARCH: minItems: 1 format: array required: - - database-name - - collection-name - - index-name - - query-vector - - path - - limit + - database-name + - collection-name + - index-name + - query-vector + - path + - limit title: Input format: object output: @@ -708,7 +699,7 @@ TASK_VECTOR_SEARCH: required: [] format: object required: - - status - - result + - status + - result title: Output format: object diff --git a/pkg/component/data/pinecone/v0/config/definition.yaml b/pkg/component/data/pinecone/v0/config/definition.yaml index 862b507f7..6c3ef8421 100644 --- a/pkg/component/data/pinecone/v0/config/definition.yaml +++ b/pkg/component/data/pinecone/v0/config/definition.yaml @@ -1,8 +1,8 @@ availableTasks: -- TASK_QUERY -- TASK_UPSERT -- TASK_BATCH_UPSERT -- TASK_RERANK + - 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/pinecone/v0/config/setup.yaml b/pkg/component/data/pinecone/v0/config/setup.yaml index 1452c66f6..52c1aabf7 100644 --- a/pkg/component/data/pinecone/v0/config/setup.yaml +++ b/pkg/component/data/pinecone/v0/config/setup.yaml @@ -1,10 +1,9 @@ additionalProperties: false properties: api-key: - description: Fill in your Pinecone AI API key. You can create an api key in Pinecone - Console. + description: Fill in your Pinecone AI API key. You can create an api key in Pinecone Console. acceptFormats: - - string + - string instillSecret: true uiOrder: 0 title: API Key @@ -12,12 +11,12 @@ properties: url: description: Fill in your Pinecone index URL. It is in the form. acceptFormats: - - string + - string instillSecret: false uiOrder: 1 title: Pinecone Index URL format: string required: -- api-key + - api-key title: Pinecone Connection format: object diff --git a/pkg/component/data/pinecone/v0/config/tasks.yaml b/pkg/component/data/pinecone/v0/config/tasks.yaml index febfe4b4c..57df6f3bb 100644 --- a/pkg/component/data/pinecone/v0/config/tasks.yaml +++ b/pkg/component/data/pinecone/v0/config/tasks.yaml @@ -1,14 +1,12 @@ TASK_QUERY: - shortDescription: Retrieve the ids of the most similar items in a namespace, along - with their similarity scores. + shortDescription: Retrieve the ids of the most similar items in a namespace, along with their similarity scores. input: uiOrder: 0 properties: id: - description: The unique ID of the vector to be used as a query vector. If - present, the vector parameter will be ignored. + description: The unique ID of the vector to be used as a query vector. If present, the vector parameter will be ignored. acceptFormats: - - string + - string shortDescription: Query by vector ID instead of by vector uiOrder: 0 title: ID @@ -16,8 +14,8 @@ TASK_QUERY: vector: description: An array of dimensions for the query vector. acceptFormats: - - array - - array + - array + - array uiOrder: 1 items: description: A dimension of the vector. @@ -29,22 +27,21 @@ TASK_QUERY: top-k: description: The number of results to return for each query. acceptFormats: - - integer + - integer uiOrder: 2 title: Top K format: integer namespace: description: The namespace to query. acceptFormats: - - string + - string uiOrder: 3 title: Namespace format: string filter: - description: The filter to apply. You can use vector metadata to limit your - search. See more details here. + description: The filter to apply. You can use vector metadata to limit your search. See more details here. acceptFormats: - - json + - json shortDescription: The filter to apply on vector metadata uiOrder: 4 order: 1 @@ -54,17 +51,16 @@ TASK_QUERY: min-score: description: Exclude results whose score is below this value. acceptFormats: - - number - - integer + - number + - integer uiOrder: 5 title: Minimum Score format: number include-metadata: default: false - description: Indicates whether metadata is included in the response as well - as the IDs. + description: Indicates whether metadata is included in the response as well as the IDs. acceptFormats: - - boolean + - boolean uiOrder: 6 title: Include Metadata format: boolean @@ -72,13 +68,13 @@ TASK_QUERY: default: false description: Indicates whether vector values are included in the response. acceptFormats: - - boolean + - boolean uiOrder: 7 title: Include Values format: boolean required: - - top-k - - vector + - top-k + - vector title: Input format: object output: @@ -101,8 +97,7 @@ TASK_QUERY: title: Metadata format: json score: - description: A measure of similarity between this vector and the query - vector. The higher the score, the more similar they are. + description: A measure of similarity between this vector and the query vector. The higher the score, the more similar they are. uiOrder: 1 title: Score format: number @@ -116,8 +111,8 @@ TASK_QUERY: title: Values format: array required: - - id - - score + - id + - score title: Match format: object title: Matches @@ -128,30 +123,28 @@ TASK_QUERY: title: Namespace format: string required: - - namespace - - matches + - namespace + - matches title: Output format: object TASK_UPSERT: - shortDescription: Writes vectors into a namespace. If a new value is upserted for - an existing vector id, it will overwrite the previous value. - description: 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. + shortDescription: Writes vectors into a namespace. If a new value is upserted for an existing vector id, it will overwrite the previous value. + description: 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: uiOrder: 0 properties: id: description: This is the vector's unique id. acceptFormats: - - string + - string uiOrder: 0 title: ID format: string metadata: description: The vector metadata. acceptFormats: - - json + - json shortDescription: The vector metadata uiOrder: 3 order: 1 @@ -161,8 +154,8 @@ TASK_UPSERT: values: description: An array of dimensions for the vector to be saved. acceptFormats: - - array - - array + - array + - array uiOrder: 1 items: description: A dimension of the vector. @@ -174,13 +167,13 @@ TASK_UPSERT: namespace: description: The namespace to query. acceptFormats: - - string + - string uiOrder: 2 title: Namespace format: string required: - - id - - values + - id + - values title: Input format: object output: @@ -192,12 +185,11 @@ TASK_UPSERT: title: Upserted Count format: integer required: - - upserted-count + - upserted-count title: Output format: object TASK_BATCH_UPSERT: - shortDescription: Writes vectors into a namespace. If a new value is upserted for - an existing vector ID, it will overwrite the previous value. + shortDescription: Writes vectors into a namespace. If a new value is upserted for an existing vector ID, it will overwrite the previous value. input: uiOrder: 0 properties: @@ -210,17 +202,15 @@ TASK_BATCH_UPSERT: description: The unique ID of the vector. uiOrder: 0 acceptFormats: - - string + - string title: ID format: string metadata: - description: '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.' + description: '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.' uiOrder: 1 acceptFormats: - - json + - json shortDescription: The vector metadata required: [] title: Metadata @@ -229,8 +219,8 @@ TASK_BATCH_UPSERT: description: An array of dimensions for the vector to be saved. uiOrder: 2 acceptFormats: - - array - - array + - array + - array items: description: A dimension of the vector. example: 0.8167237 @@ -239,8 +229,8 @@ TASK_BATCH_UPSERT: title: Values format: array required: - - id - - values + - id + - values format: object minItems: 1 title: Vectors @@ -248,12 +238,12 @@ TASK_BATCH_UPSERT: namespace: description: The namespace to query. acceptFormats: - - string + - string uiOrder: 1 title: Namespace format: string required: - - vectors + - vectors title: Input format: object output: @@ -265,22 +255,20 @@ TASK_BATCH_UPSERT: title: Upserted Count format: integer required: - - upserted-count + - upserted-count title: Output format: object TASK_RERANK: - shortDescription: Rerank documents, such as text passages, according to their relevance - to a query. - description: 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. + shortDescription: Rerank documents, such as text passages, according to their relevance to a query. + description: 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: uiOrder: 0 properties: query: description: The query to rerank the documents. acceptFormats: - - string + - string instullUIMultiline: false uiOrder: 0 title: Query @@ -294,16 +282,15 @@ TASK_RERANK: title: Documents format: array top-n: - description: The number of results to return sorted by relevance. Defaults - to the number of inputs. + description: The number of results to return sorted by relevance. Defaults to the number of inputs. acceptFormats: - - integer + - integer uiOrder: 2 title: Top N format: integer required: - - query - - documents + - query + - documents title: Input format: object output: @@ -318,8 +305,7 @@ TASK_RERANK: title: Reranked documents. format: array scores: - description: The relevance score of the documents normalized between 0 and - 1. + description: The relevance score of the documents normalized between 0 and 1. items: title: Score format: number @@ -327,7 +313,7 @@ TASK_RERANK: title: Scores format: array required: - - documents - - scores + - documents + - scores title: Output format: object diff --git a/pkg/component/data/qdrant/v0/config/definition.yaml b/pkg/component/data/qdrant/v0/config/definition.yaml index e7941ca59..22bc64b94 100644 --- a/pkg/component/data/qdrant/v0/config/definition.yaml +++ b/pkg/component/data/qdrant/v0/config/definition.yaml @@ -1,10 +1,10 @@ availableTasks: -- TASK_VECTOR_SEARCH -- TASK_BATCH_UPSERT -- TASK_UPSERT -- TASK_DELETE -- TASK_CREATE_COLLECTION -- TASK_DELETE_COLLECTION + - 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/qdrant/v0/config/setup.yaml b/pkg/component/data/qdrant/v0/config/setup.yaml index 3c8acffbe..3d4092f95 100644 --- a/pkg/component/data/qdrant/v0/config/setup.yaml +++ b/pkg/component/data/qdrant/v0/config/setup.yaml @@ -1,25 +1,23 @@ additionalProperties: false properties: api-key: - description: Fill in your Qdrant API key. Please refer to clusters in Qdrant data - access control. + description: Fill in your Qdrant API key. Please refer to clusters in Qdrant data access control. acceptFormats: - - string + - string instillSecret: true uiOrder: 0 title: API Key format: string url: - description: Fill in your Qdrant URL endpoint. Please refer to clusters in Qdrant - cluster details. + description: Fill in your Qdrant URL endpoint. Please refer to clusters in Qdrant cluster details. acceptFormats: - - string + - string instillSecret: false uiOrder: 1 title: Qdrant URL Endpoint format: string required: -- api-key -- url + - api-key + - url title: Qdrant Connection format: object diff --git a/pkg/component/data/qdrant/v0/config/tasks.yaml b/pkg/component/data/qdrant/v0/config/tasks.yaml index c8e4359cf..404da5256 100644 --- a/pkg/component/data/qdrant/v0/config/tasks.yaml +++ b/pkg/component/data/qdrant/v0/config/tasks.yaml @@ -4,18 +4,17 @@ TASK_VECTOR_SEARCH: uiOrder: 0 properties: collection-name: - description: The name of the collection to perform vector similarity search - on. + description: The name of the collection to perform vector similarity search on. acceptFormats: - - string + - string uiOrder: 0 title: Collection Name format: string vector: description: An array of dimensions for the vector query. acceptFormats: - - array - - array + - array + - array uiOrder: 1 items: description: A dimension of the vector. @@ -27,16 +26,15 @@ TASK_VECTOR_SEARCH: limit: description: The limit of points, empty for all points. acceptFormats: - - integer + - integer shortDescription: Limit Rows uiOrder: 2 title: Limit format: integer payloads: - description: The payloads to return in the points. If empty then all payloads - will be returned. + description: The payloads to return in the points. If empty then all payloads will be returned. acceptFormats: - - array + - array shortDescription: Payloads to be returned, empty for all payloads uiOrder: 3 title: Payloads @@ -46,21 +44,19 @@ TASK_VECTOR_SEARCH: format: string format: array filter: - description: 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). + description: 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). acceptFormats: - - json - - object + - json + - object uiOrder: 4 title: Filter required: [] format: object params: - description: The additional parameters to be passed to the search, please - refer to [params section](https://api.qdrant.tech/api-reference/search/points). + description: The additional parameters to be passed to the search, please refer to [params section](https://api.qdrant.tech/api-reference/search/points). acceptFormats: - - json - - object + - json + - object uiOrder: 5 title: Params required: [] @@ -68,14 +64,14 @@ TASK_VECTOR_SEARCH: min-score: description: The minimum score of the points to be returned. acceptFormats: - - number + - number uiOrder: 6 title: Min Score format: number required: - - collection-name - - vector - - limit + - collection-name + - vector + - limit title: Input format: object output: @@ -138,8 +134,8 @@ TASK_VECTOR_SEARCH: required: [] format: object required: - - status - - result + - status + - result title: Output format: object TASK_BATCH_UPSERT: @@ -150,14 +146,14 @@ TASK_BATCH_UPSERT: collection-name: description: The name of the collection to upsert the point into. acceptFormats: - - string + - string uiOrder: 0 title: Collection Name format: string array-id: description: The array of id. acceptFormats: - - array + - array uiOrder: 1 items: description: An id of the point. @@ -169,10 +165,10 @@ TASK_BATCH_UPSERT: array-metadata: description: The array of vector metadata payload. acceptFormats: - - array - - array - - array - - array + - array + - array + - array + - array uiOrder: 2 minItems: 1 title: Array Metadata @@ -185,13 +181,13 @@ TASK_BATCH_UPSERT: array-vector: description: The array of vector values. acceptFormats: - - array + - array uiOrder: 3 items: description: An array of dimensions for the vector value. acceptFormats: - - array - - array + - array + - array items: description: A dimension of the vector. example: 0.8167237 @@ -203,19 +199,19 @@ TASK_BATCH_UPSERT: ordering: description: The ordering guarantees of the batch upsert. acceptFormats: - - string + - string default: weak uiOrder: 4 title: Ordering enum: - - weak - - medium - - strong + - weak + - medium + - strong format: string required: - - collection-name - - array-id - - array-vector + - collection-name + - array-id + - array-vector title: Input format: object output: @@ -227,7 +223,7 @@ TASK_BATCH_UPSERT: title: Status format: string required: - - status + - status title: Output format: object TASK_UPSERT: @@ -238,22 +234,22 @@ TASK_UPSERT: collection-name: description: The name of the collection to upsert the point into. acceptFormats: - - string + - string uiOrder: 0 title: Collection Name format: string id: description: The ID of the point. acceptFormats: - - string + - string uiOrder: 1 title: ID format: string metadata: description: The vector metadata payload. acceptFormats: - - json - - object + - json + - object uiOrder: 2 title: Metadata required: [] @@ -261,8 +257,8 @@ TASK_UPSERT: vector: description: An array of dimensions for the vector value. acceptFormats: - - array - - array + - array + - array uiOrder: 3 items: description: A dimension of the vector. @@ -274,19 +270,19 @@ TASK_UPSERT: ordering: description: The ordering guarantees of the batch upsert. acceptFormats: - - string + - string default: weak uiOrder: 4 title: Ordering enum: - - weak - - medium - - strong + - weak + - medium + - strong format: string required: - - collection-name - - id - - vector + - collection-name + - id + - vector title: Input format: object output: @@ -298,7 +294,7 @@ TASK_UPSERT: title: Status format: string required: - - status + - status title: Output format: object TASK_DELETE: @@ -309,23 +305,22 @@ TASK_DELETE: collection-name: description: The name of the collection to delete the object from. acceptFormats: - - string + - string uiOrder: 0 title: Collection Name format: string id: description: The ID of the point. acceptFormats: - - string + - string uiOrder: 1 title: ID format: string filter: - description: 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). + description: 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). acceptFormats: - - json - - object + - json + - object uiOrder: 2 title: Filter required: [] @@ -333,17 +328,17 @@ TASK_DELETE: ordering: description: The ordering guarantees of the batch upsert. acceptFormats: - - string + - string default: weak uiOrder: 3 title: Ordering enum: - - weak - - medium - - strong + - weak + - medium + - strong format: string required: - - collection-name + - collection-name title: Input format: object output: @@ -355,7 +350,7 @@ TASK_DELETE: title: Status format: string required: - - status + - status title: Output format: object TASK_CREATE_COLLECTION: @@ -366,22 +361,22 @@ TASK_CREATE_COLLECTION: collection-name: description: The name of the collection to create. acceptFormats: - - string + - string uiOrder: 0 title: Collection Name format: string config: description: The configuration of the collection. Please refer to [here](https://api.qdrant.tech/api-reference/collections/create-collection). acceptFormats: - - json - - object + - json + - object uiOrder: 1 title: Config required: [] format: object required: - - collection-name - - config + - collection-name + - config title: Input format: object output: @@ -393,7 +388,7 @@ TASK_CREATE_COLLECTION: title: Status format: string required: - - status + - status title: Output format: object TASK_DELETE_COLLECTION: @@ -404,12 +399,12 @@ TASK_DELETE_COLLECTION: collection-name: description: The name of the collection to delete. acceptFormats: - - string + - string uiOrder: 0 title: Collection Name format: string required: - - collection-name + - collection-name title: Input format: object output: @@ -421,6 +416,6 @@ TASK_DELETE_COLLECTION: title: Status format: string required: - - status + - status title: Output format: object diff --git a/pkg/component/data/redis/v0/config/definition.yaml b/pkg/component/data/redis/v0/config/definition.yaml index a6a1d01cc..a02210445 100644 --- a/pkg/component/data/redis/v0/config/definition.yaml +++ b/pkg/component/data/redis/v0/config/definition.yaml @@ -1,7 +1,7 @@ availableTasks: -- TASK_RETRIEVE_CHAT_HISTORY -- TASK_WRITE_CHAT_MESSAGE -- TASK_WRITE_MULTI_MODAL_CHAT_MESSAGE + - 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/redis/v0/config/setup.yaml b/pkg/component/data/redis/v0/config/setup.yaml index 211ad3383..aa6d715b7 100644 --- a/pkg/component/data/redis/v0/config/setup.yaml +++ b/pkg/component/data/redis/v0/config/setup.yaml @@ -4,9 +4,9 @@ properties: default: localhost description: Redis host to connect to. examples: - - localhost,127.0.0.1 + - localhost,127.0.0.1 acceptFormats: - - string + - string instillSecret: false uiOrder: 0 title: Host @@ -14,7 +14,7 @@ properties: password: description: Password associated with Redis. acceptFormats: - - string + - string instillSecret: true uiOrder: 3 title: Password @@ -23,7 +23,7 @@ properties: default: 6379 description: Port of Redis. acceptFormats: - - integer + - integer uiOrder: 1 maximum: 65536 minimum: 0 @@ -31,22 +31,21 @@ properties: format: integer ssl: default: false - description: Indicates whether SSL encryption protocol will be used to connect - to Redis. It is recommended to use SSL connection if possible. + description: Indicates whether SSL encryption protocol will be used to connect to Redis. It is recommended to use SSL connection if possible. acceptFormats: - - boolean + - boolean uiOrder: 4 title: SSL Connection format: boolean username: description: Username associated with Redis. acceptFormats: - - string + - string uiOrder: 2 title: Username format: string required: -- host -- port + - host + - port title: Redis Connection format: object diff --git a/pkg/component/data/redis/v0/config/tasks.yaml b/pkg/component/data/redis/v0/config/tasks.yaml index ab98de538..f4662fd9f 100644 --- a/pkg/component/data/redis/v0/config/tasks.yaml +++ b/pkg/component/data/redis/v0/config/tasks.yaml @@ -5,20 +5,18 @@ TASK_RETRIEVE_CHAT_HISTORY: properties: include-system-message: default: true - description: Include system message in the retrieved conversation turns if - exists. + description: Include system message in the retrieved conversation turns if exists. acceptFormats: - - boolean + - boolean uiOrder: 2 title: Include System Message If Exists format: boolean latest-k: default: 5 - description: The number of latest conversation turns to retrieve. A conversation - turn typically includes one participant speaking or sending a message, and - the other participant(s) responding to it. + description: The number of latest conversation turns to retrieve. A conversation turn typically includes one participant speaking or sending a message, + and the other participant(s) responding to it. acceptFormats: - - integer + - integer uiOrder: 1 minimum: 1 title: Latest K @@ -26,12 +24,12 @@ TASK_RETRIEVE_CHAT_HISTORY: session-id: description: A unique identifier for the chat session. acceptFormats: - - string + - string uiOrder: 0 title: Session ID format: string required: - - session-id + - session-id title: Input format: object output: @@ -42,7 +40,7 @@ TASK_RETRIEVE_CHAT_HISTORY: description: Messages. uiOrder: 0 required: - - messages + - messages title: Output format: object TASK_WRITE_CHAT_MESSAGE: @@ -53,7 +51,7 @@ TASK_WRITE_CHAT_MESSAGE: content: description: The message content. acceptFormats: - - string + - string uiOrder: 2 title: Content format: string @@ -67,21 +65,21 @@ TASK_WRITE_CHAT_MESSAGE: role: description: The message role, i.e. 'system', 'user' or 'assistant'. acceptFormats: - - string + - string uiOrder: 1 title: Role format: string session-id: description: A unique identifier for the chat session. acceptFormats: - - string + - string uiOrder: 0 title: Session ID format: string required: - - session-id - - role - - content + - session-id + - role + - content title: Input format: object output: @@ -93,7 +91,7 @@ TASK_WRITE_CHAT_MESSAGE: title: Status format: boolean required: - - status + - status title: Output format: object TASK_WRITE_MULTI_MODAL_CHAT_MESSAGE: @@ -105,7 +103,7 @@ TASK_WRITE_MULTI_MODAL_CHAT_MESSAGE: $ref: schema.yaml#/$defs/instill-types/multi-modal-content description: The multi-modal message content. acceptFormats: - - array + - array uiOrder: 2 title: Content format: string @@ -119,21 +117,21 @@ TASK_WRITE_MULTI_MODAL_CHAT_MESSAGE: role: description: The message role, i.e. 'system', 'user' or 'assistant'. acceptFormats: - - string + - string uiOrder: 1 title: Role format: string session-id: description: A unique identifier for the chat session. acceptFormats: - - string + - string uiOrder: 0 title: Session ID format: string required: - - session-id - - role - - content + - session-id + - role + - content title: Input format: object output: @@ -145,6 +143,6 @@ TASK_WRITE_MULTI_MODAL_CHAT_MESSAGE: title: Status format: boolean required: - - status + - status title: Output format: object diff --git a/pkg/component/data/sql/v0/config/definition.yaml b/pkg/component/data/sql/v0/config/definition.yaml index 641b0aebe..e76dc39e7 100644 --- a/pkg/component/data/sql/v0/config/definition.yaml +++ b/pkg/component/data/sql/v0/config/definition.yaml @@ -1,11 +1,11 @@ availableTasks: -- TASK_INSERT -- TASK_INSERT_MANY -- TASK_UPDATE -- TASK_SELECT -- TASK_DELETE -- TASK_CREATE_TABLE -- TASK_DROP_TABLE + - 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/sql/v0/config/setup.yaml b/pkg/component/data/sql/v0/config/setup.yaml index 9a3b6fc68..d6332b282 100644 --- a/pkg/component/data/sql/v0/config/setup.yaml +++ b/pkg/component/data/sql/v0/config/setup.yaml @@ -3,28 +3,28 @@ properties: engine: description: Choose the engine of your database. acceptFormats: - - string + - string uiOrder: 0 title: Engine enum: - - MySQL - - PostgreSQL - - SQL Server - - Oracle - - MariaDB - - Firebird + - MySQL + - PostgreSQL + - SQL Server + - Oracle + - MariaDB + - Firebird format: string username: description: Fill in your account username. acceptFormats: - - string + - string uiOrder: 1 title: Username format: string password: description: Fill in your account password. acceptFormats: - - string + - string instillSecret: true uiOrder: 2 title: Password @@ -32,14 +32,14 @@ properties: database-name: description: Fill in the name of your database. acceptFormats: - - string + - string uiOrder: 3 title: Database Name format: string host: description: Fill in the host of your database. acceptFormats: - - string + - string uiOrder: 4 title: Host format: string @@ -47,7 +47,7 @@ properties: description: Fill in the port of your database. default: 3306 acceptFormats: - - number + - number uiOrder: 5 title: Port format: number @@ -55,89 +55,89 @@ properties: description: Enable SSL / TLS. uiOrder: 6 oneOf: - - properties: - ssl-tls-type: - const: NO TLS - description: Choose the type of SSL / TLS. - uiOrder: 0 - order: 0 - title: SSL / TLS Type - format: string - required: - - ssl-tls-type - title: No SSL / TLS - - properties: - ssl-tls-type: - const: TLS - description: Choose the type of SSL / TLS. - uiOrder: 0 - order: 0 - title: SSL / TLS Type - format: string - ssl-tls-ca: - description: Base64 encoded CA certificate file. - shortDescription: Base64 encoded CA certificate file - acceptFormats: - - string - uiOrder: 1 - order: 1 - title: CA Certificate - format: string - required: - - ssl-tls-type - - ssl-tls-ca - title: TLS - - properties: - ssl-tls-type: - const: mTLS - description: Choose the type of SSL / TLS. - uiOrder: 0 - order: 0 - title: SSL / TLS Type - format: string - ssl-tls-ca: - description: Base64 encoded CA certificate file. - shortDescription: Base64 encoded CA certificate file - acceptFormats: - - string - uiOrder: 1 - order: 1 - title: CA Certificate - format: string - ssl-tls-cert: - description: Base64 encoded client certificate file. - shortDescription: Base64 encoded client certificate file - acceptFormats: - - string - uiOrder: 2 - order: 2 - title: Client Certificate - format: string - ssl-tls-key: - description: Base64 encoded client key file. - shortDescription: Base64 encoded client key file - acceptFormats: - - string - uiOrder: 3 - order: 3 - title: Client Key - format: string - required: - - ssl-tls-type - - ssl-tls-ca - - ssl-tls-cert - - ssl-tls-key - title: mTLS + - properties: + ssl-tls-type: + const: NO TLS + description: Choose the type of SSL / TLS. + uiOrder: 0 + order: 0 + title: SSL / TLS Type + format: string + required: + - ssl-tls-type + title: No SSL / TLS + - properties: + ssl-tls-type: + const: TLS + description: Choose the type of SSL / TLS. + uiOrder: 0 + order: 0 + title: SSL / TLS Type + format: string + ssl-tls-ca: + description: Base64 encoded CA certificate file. + shortDescription: Base64 encoded CA certificate file + acceptFormats: + - string + uiOrder: 1 + order: 1 + title: CA Certificate + format: string + required: + - ssl-tls-type + - ssl-tls-ca + title: TLS + - properties: + ssl-tls-type: + const: mTLS + description: Choose the type of SSL / TLS. + uiOrder: 0 + order: 0 + title: SSL / TLS Type + format: string + ssl-tls-ca: + description: Base64 encoded CA certificate file. + shortDescription: Base64 encoded CA certificate file + acceptFormats: + - string + uiOrder: 1 + order: 1 + title: CA Certificate + format: string + ssl-tls-cert: + description: Base64 encoded client certificate file. + shortDescription: Base64 encoded client certificate file + acceptFormats: + - string + uiOrder: 2 + order: 2 + title: Client Certificate + format: string + ssl-tls-key: + description: Base64 encoded client key file. + shortDescription: Base64 encoded client key file + acceptFormats: + - string + uiOrder: 3 + order: 3 + title: Client Key + format: string + required: + - ssl-tls-type + - ssl-tls-ca + - ssl-tls-cert + - ssl-tls-key + title: mTLS order: 6 title: SSL / TLS format: object required: -- engine -- username -- password -- database-name -- host -- port -- ssl-tls + - engine + - username + - password + - database-name + - host + - port + - ssl-tls title: SQL Connection format: object diff --git a/pkg/component/data/sql/v0/config/tasks.yaml b/pkg/component/data/sql/v0/config/tasks.yaml index ec06c8bc5..19fed9357 100644 --- a/pkg/component/data/sql/v0/config/tasks.yaml +++ b/pkg/component/data/sql/v0/config/tasks.yaml @@ -6,7 +6,7 @@ TASK_INSERT: table-name: description: The table name in the database to insert data into. acceptFormats: - - string + - string shortDescription: Database Table Name uiOrder: 0 title: Table Name @@ -14,8 +14,8 @@ TASK_INSERT: data: description: The data to be inserted. acceptFormats: - - json - - object + - json + - object uiOrder: 1 items: title: Object @@ -24,8 +24,8 @@ TASK_INSERT: required: [] format: object required: - - data - - table-name + - data + - table-name title: Input format: object output: @@ -38,7 +38,7 @@ TASK_INSERT: title: Status format: string required: - - status + - status title: Output format: object TASK_INSERT_MANY: @@ -49,7 +49,7 @@ TASK_INSERT_MANY: table-name: description: The table name in the database to insert data into. acceptFormats: - - string + - string shortDescription: Database Table Name uiOrder: 0 title: Table Name @@ -57,10 +57,10 @@ TASK_INSERT_MANY: array-data: description: The array data to be inserted. acceptFormats: - - array - - array - - array - - array + - array + - array + - array + - array uiOrder: 1 title: Data items: @@ -71,8 +71,8 @@ TASK_INSERT_MANY: minItems: 1 format: array required: - - array-data - - table-name + - array-data + - table-name title: Input format: object output: @@ -85,7 +85,7 @@ TASK_INSERT_MANY: title: Status format: string required: - - status + - status title: Output format: object TASK_UPDATE: @@ -96,25 +96,24 @@ TASK_UPDATE: table-name: description: The table name in the database to update data into. acceptFormats: - - string + - string shortDescription: Database Table Name uiOrder: 0 title: Table Name format: string filter: shortDescription: The filter to be applied to the data - description: The filter to be applied to the data with SQL syntax, which starts - with WHERE clause. + description: The filter to be applied to the data with SQL syntax, which starts with WHERE clause. uiOrder: 1 acceptFormats: - - string + - string title: Filter format: string update-data: description: The new data to be updated to. acceptFormats: - - json - - object + - json + - object uiOrder: 2 items: title: Object @@ -123,9 +122,9 @@ TASK_UPDATE: required: [] format: object required: - - filter - - update-data - - table-name + - filter + - update-data + - table-name title: Input format: object output: @@ -138,7 +137,7 @@ TASK_UPDATE: title: Status format: string required: - - status + - status title: Output format: object TASK_SELECT: @@ -149,34 +148,31 @@ TASK_SELECT: table-name: description: The table name in the database to be selected. acceptFormats: - - string + - string shortDescription: Database Table Name uiOrder: 0 title: Table Name format: string filter: - shortDescription: The filter to be applied to the data. If empty, then all - rows will be updated - description: The filter to be applied to the data with SQL syntax, which starts - with WHERE clause, empty for all rows. + shortDescription: The filter to be applied to the data. If empty, then all rows will be updated + description: The filter to be applied to the data with SQL syntax, which starts with WHERE clause, empty for all rows. uiOrder: 1 acceptFormats: - - string + - string title: Filter format: string limit: description: The limit of rows to be selected, empty for all rows. acceptFormats: - - integer + - integer shortDescription: Limit Rows uiOrder: 2 title: Limit format: integer columns: - description: The columns to return in the rows. If empty then all columns - will be returned. + description: The columns to return in the rows. If empty then all columns will be returned. acceptFormats: - - array + - array shortDescription: Columns to be returned, empty for all columns uiOrder: 3 title: Columns @@ -186,7 +182,7 @@ TASK_SELECT: minItems: 1 format: array required: - - table-name + - table-name title: Input format: object output: @@ -210,8 +206,8 @@ TASK_SELECT: title: Status format: string required: - - status - - rows + - status + - rows title: Output format: object TASK_DELETE: @@ -222,23 +218,22 @@ TASK_DELETE: table-name: description: The table name in the database to be deleted. acceptFormats: - - string + - string shortDescription: Database Table Name uiOrder: 0 title: Table Name format: string filter: shortDescription: The filter to be applied to the data - description: The filter to be applied to the data with SQL syntax, which starts - with WHERE clause. + description: The filter to be applied to the data with SQL syntax, which starts with WHERE clause. uiOrder: 1 acceptFormats: - - string + - string title: Filter format: string required: - - filter - - table-name + - filter + - table-name title: Input format: object output: @@ -251,7 +246,7 @@ TASK_DELETE: title: Status format: string required: - - status + - status title: Output format: object TASK_CREATE_TABLE: @@ -262,26 +257,24 @@ TASK_CREATE_TABLE: table-name: description: The table name in the database to be created. acceptFormats: - - string + - string shortDescription: Database Table Name uiOrder: 0 title: Table Name format: string columns-structure: - description: 'The columns structure to be created in the table, json with - value string, e.g {"name": "VARCHAR(255)", "age": "INT not null"}.' + description: 'The columns structure to be created in the table, json with value string, e.g {"name": "VARCHAR(255)", "age": "INT not null"}.' acceptFormats: - - json - - object - shortDescription: 'Columns Structure, e.g {"name": "VARCHAR(255)", "age": - "INT not null"}' + - json + - object + shortDescription: 'Columns Structure, e.g {"name": "VARCHAR(255)", "age": "INT not null"}' uiOrder: 1 title: Columns required: [] format: object required: - - table-name - - columns-structure + - table-name + - columns-structure title: Input format: object output: @@ -294,7 +287,7 @@ TASK_CREATE_TABLE: title: Status format: string required: - - status + - status title: Output format: object TASK_DROP_TABLE: @@ -305,13 +298,13 @@ TASK_DROP_TABLE: table-name: description: The table name in the database to be dropped. acceptFormats: - - string + - string shortDescription: Database Table Name uiOrder: 0 title: Table Name format: string required: - - table-name + - table-name title: Input format: object output: @@ -324,6 +317,6 @@ TASK_DROP_TABLE: title: Status format: string required: - - status + - status title: Output format: object diff --git a/pkg/component/data/weaviate/v0/config/definition.yaml b/pkg/component/data/weaviate/v0/config/definition.yaml index 5388a19c8..e2ee6dc0a 100644 --- a/pkg/component/data/weaviate/v0/config/definition.yaml +++ b/pkg/component/data/weaviate/v0/config/definition.yaml @@ -1,10 +1,10 @@ availableTasks: -- TASK_VECTOR_SEARCH -- TASK_BATCH_INSERT -- TASK_INSERT -- TASK_UPDATE -- TASK_DELETE -- TASK_DELETE_COLLECTION + - 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/weaviate/v0/config/setup.yaml b/pkg/component/data/weaviate/v0/config/setup.yaml index dae666fb0..1f9914ee9 100644 --- a/pkg/component/data/weaviate/v0/config/setup.yaml +++ b/pkg/component/data/weaviate/v0/config/setup.yaml @@ -1,25 +1,23 @@ additionalProperties: false properties: api-key: - description: Fill in your Weaviate API key. Please refer to clusters in Weaviate - Console. + description: Fill in your Weaviate API key. Please refer to clusters in Weaviate Console. acceptFormats: - - string + - string instillSecret: true uiOrder: 0 title: API Key format: string url: - description: Fill in your Weaviate base URL without https:// or http://. Please - refer to clusters in Weaviate Console. + description: Fill in your Weaviate base URL without https:// or http://. Please refer to clusters in Weaviate Console. acceptFormats: - - string + - string instillSecret: false uiOrder: 1 title: Weaviate URL Endpoint format: string required: -- api-key -- url + - api-key + - url title: Weaviate Connection format: object diff --git a/pkg/component/data/weaviate/v0/config/tasks.yaml b/pkg/component/data/weaviate/v0/config/tasks.yaml index 20a4fc76c..8730fe72d 100644 --- a/pkg/component/data/weaviate/v0/config/tasks.yaml +++ b/pkg/component/data/weaviate/v0/config/tasks.yaml @@ -6,16 +6,15 @@ TASK_VECTOR_SEARCH: collection-name: description: The name of the collection to perform vector search on. acceptFormats: - - string + - string uiOrder: 0 title: Collection Name format: string vector: - description: An array of dimensions for the vector query, optional. If not - provided, all objects will be returned. + description: An array of dimensions for the vector query, optional. If not provided, all objects will be returned. acceptFormats: - - array - - array + - array + - array uiOrder: 1 items: description: A dimension of the vector. @@ -27,15 +26,14 @@ TASK_VECTOR_SEARCH: limit: description: The limit of objects, empty for all objects. acceptFormats: - - integer + - integer uiOrder: 2 title: Limit format: integer fields: - description: The fields to return in the objects. If empty then all fields - will be returned. + description: The fields to return in the objects. If empty then all fields will be returned. acceptFormats: - - array + - array shortDescription: Fields to be returned, empty for all fields uiOrder: 3 title: Fields @@ -45,11 +43,10 @@ TASK_VECTOR_SEARCH: format: string format: array filter: - description: 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). + description: 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). acceptFormats: - - json - - object + - json + - object uiOrder: 4 title: Filter required: [] @@ -57,12 +54,12 @@ TASK_VECTOR_SEARCH: tenant: description: The tenant to perform the vector search on. acceptFormats: - - string + - string uiOrder: 5 title: Tenant format: string required: - - collection-name + - collection-name title: Input format: object output: @@ -125,8 +122,8 @@ TASK_VECTOR_SEARCH: required: [] format: object required: - - status - - result + - status + - result title: Output format: object TASK_INSERT: @@ -137,22 +134,22 @@ TASK_INSERT: collection-name: description: The name of the collection to upsert the object into. acceptFormats: - - string + - string uiOrder: 0 title: Collection Name format: string id: description: The ID of the object. acceptFormats: - - string + - string uiOrder: 1 title: ID format: string vector: description: An array of dimensions for the vector value. acceptFormats: - - array - - array + - array + - array uiOrder: 2 items: description: A dimension of the vector. @@ -164,16 +161,16 @@ TASK_INSERT: metadata: description: The vector metadata properties. acceptFormats: - - json - - object + - json + - object uiOrder: 3 title: Metadata required: [] format: object required: - - collection-name - - vector - - metadata + - collection-name + - vector + - metadata title: Input format: object output: @@ -185,7 +182,7 @@ TASK_INSERT: title: Status format: string required: - - status + - status title: Output format: object TASK_BATCH_INSERT: @@ -196,14 +193,14 @@ TASK_BATCH_INSERT: collection-name: description: The name of the collection to upsert the object into. acceptFormats: - - string + - string uiOrder: 0 title: Collection Name format: string array-id: description: The array of id. acceptFormats: - - array + - array uiOrder: 1 items: description: An id of the object. @@ -215,10 +212,10 @@ TASK_BATCH_INSERT: array-metadata: description: The array of vector metadata properties. acceptFormats: - - array - - array - - array - - array + - array + - array + - array + - array shortDescription: The vector metadata properties uiOrder: 2 minItems: 1 @@ -232,13 +229,13 @@ TASK_BATCH_INSERT: array-vector: description: The array of vector values. acceptFormats: - - array + - array uiOrder: 3 items: description: An array of dimensions for the vector value. acceptFormats: - - array - - array + - array + - array items: description: A dimension of the vector. example: 0.8167237 @@ -248,9 +245,9 @@ TASK_BATCH_INSERT: title: Array Vector format: array required: - - collection-name - - array-metadata - - array-vector + - collection-name + - array-metadata + - array-vector title: Input format: object output: @@ -262,7 +259,7 @@ TASK_BATCH_INSERT: title: Status format: string required: - - status + - status title: Output format: object TASK_DELETE: @@ -273,29 +270,28 @@ TASK_DELETE: collection-name: description: The name of the collection to delete the object from. acceptFormats: - - string + - string uiOrder: 0 title: Collection Name format: string id: description: The ID of the object. acceptFormats: - - string + - string uiOrder: 1 title: ID format: string filter: - description: 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). + description: 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). acceptFormats: - - json - - object + - json + - object uiOrder: 2 title: Filter required: [] format: object required: - - collection-name + - collection-name title: Input format: object output: @@ -307,7 +303,7 @@ TASK_DELETE: title: Status format: string required: - - status + - status title: Output format: object TASK_UPDATE: @@ -318,22 +314,22 @@ TASK_UPDATE: collection-name: description: The name of the collection to update the object in. acceptFormats: - - string + - string uiOrder: 0 title: Collection Name format: string id: description: The ID of the object. acceptFormats: - - string + - string uiOrder: 1 title: ID format: string update-vector: description: The updated vector value, optional. acceptFormats: - - array - - array + - array + - array uiOrder: 2 items: description: A dimension of the vector. @@ -345,15 +341,15 @@ TASK_UPDATE: update-metadata: description: The updated vector metadata properties, optional. acceptFormats: - - json - - object + - json + - object uiOrder: 3 title: Update Metadata required: [] format: object required: - - collection-name - - id + - collection-name + - id title: Input format: object output: @@ -365,7 +361,7 @@ TASK_UPDATE: title: Status format: string required: - - status + - status title: Output format: object TASK_DELETE_COLLECTION: @@ -376,12 +372,12 @@ TASK_DELETE_COLLECTION: collection-name: description: The name of the collection to delete. acceptFormats: - - string + - string uiOrder: 0 title: Collection Name format: string required: - - collection-name + - collection-name title: Input format: object output: @@ -393,6 +389,6 @@ TASK_DELETE_COLLECTION: title: Status format: string required: - - status + - status title: Output format: object diff --git a/pkg/component/data/zilliz/v0/config/definition.yaml b/pkg/component/data/zilliz/v0/config/definition.yaml index f0a3b2240..0575c0ce3 100644 --- a/pkg/component/data/zilliz/v0/config/definition.yaml +++ b/pkg/component/data/zilliz/v0/config/definition.yaml @@ -1,12 +1,12 @@ availableTasks: -- TASK_VECTOR_SEARCH -- TASK_UPSERT -- TASK_BATCH_UPSERT -- TASK_DELETE -- TASK_CREATE_COLLECTION -- TASK_DROP_COLLECTION -- TASK_CREATE_PARTITION -- TASK_DROP_PARTITION + - 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/data/zilliz/v0/config/setup.yaml b/pkg/component/data/zilliz/v0/config/setup.yaml index 90ff0f5bc..46054a14a 100644 --- a/pkg/component/data/zilliz/v0/config/setup.yaml +++ b/pkg/component/data/zilliz/v0/config/setup.yaml @@ -3,7 +3,7 @@ properties: url: description: Fill in your Zilliz public URL endpoint. acceptFormats: - - string + - string instillSecret: false uiOrder: 0 title: Zilliz URL Endpoint @@ -11,13 +11,13 @@ properties: api-key: description: Fill in your Zilliz API key. acceptFormats: - - string + - string instillSecret: true uiOrder: 1 title: Zilliz API Key format: string required: -- url -- api-key + - url + - api-key title: Zilliz Connection format: object diff --git a/pkg/component/data/zilliz/v0/config/tasks.yaml b/pkg/component/data/zilliz/v0/config/tasks.yaml index b309dcd4c..6e3d3cf54 100644 --- a/pkg/component/data/zilliz/v0/config/tasks.yaml +++ b/pkg/component/data/zilliz/v0/config/tasks.yaml @@ -6,22 +6,22 @@ TASK_VECTOR_SEARCH: collection-name: description: The name of the collection to perform vector search on. acceptFormats: - - string + - string uiOrder: 0 title: Collection Name format: string partition-name: description: The name of the partition to vector search the data from. acceptFormats: - - string + - string uiOrder: 1 title: Partition Name format: string vector: description: An array of dimensions for the vector search. acceptFormats: - - array - - array + - array + - array uiOrder: 2 items: description: A dimension of the vector. @@ -33,22 +33,21 @@ TASK_VECTOR_SEARCH: vector-field: description: The name of the field to perform vector search on. acceptFormats: - - string + - string uiOrder: 3 title: Vector Field format: string limit: description: The limit of the data to return. acceptFormats: - - integer + - integer uiOrder: 4 title: Limit format: integer fields: - description: The fields to return in the data. If empty then all fields will - be returned. + description: The fields to return in the data. If empty then all fields will be returned. acceptFormats: - - array + - array shortDescription: Fields to be returned, empty for all fields uiOrder: 4 title: Fields @@ -58,42 +57,40 @@ TASK_VECTOR_SEARCH: format: string format: array filter: - description: 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). + description: 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). uiOrder: 5 acceptFormats: - - string + - string title: Filter format: string offset: description: The offset of the data to return. acceptFormats: - - integer + - integer uiOrder: 6 title: Offset format: integer grouping-field: description: 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). acceptFormats: - - string + - string uiOrder: 7 title: Grouping Field format: string search-params: - description: 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). + description: 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). uiOrder: 8 acceptFormats: - - json - - object + - json + - object title: Search Parameters required: [] format: object required: - - collection-name - - vector - - vector-field - - limit + - collection-name + - vector + - vector-field + - limit title: Input format: object output: @@ -156,8 +153,8 @@ TASK_VECTOR_SEARCH: required: [] format: object required: - - status - - result + - status + - result title: Output format: object TASK_UPSERT: @@ -168,30 +165,29 @@ TASK_UPSERT: collection-name: description: The name of the collection to upsert the data into. acceptFormats: - - string + - string uiOrder: 0 title: Collection Name format: string partition-name: - description: The name of the partition to upsert the data from. If empty then - default partition will be used. + description: The name of the partition to upsert the data from. If empty then default partition will be used. acceptFormats: - - string + - string uiOrder: 1 title: Partition Name format: string data: description: The data. acceptFormats: - - json - - object + - json + - object uiOrder: 2 title: Data required: [] format: object required: - - collection-name - - data + - collection-name + - data title: Input format: object output: @@ -203,7 +199,7 @@ TASK_UPSERT: title: Status format: string required: - - status + - status title: Output format: object TASK_BATCH_UPSERT: @@ -214,25 +210,24 @@ TASK_BATCH_UPSERT: collection-name: description: The name of the collection to upsert the data into. acceptFormats: - - string + - string uiOrder: 0 title: Collection Name format: string partition-name: - description: The name of the partition to upsert the data from. If empty then - default partition will be used. + description: The name of the partition to upsert the data from. If empty then default partition will be used. acceptFormats: - - string + - string uiOrder: 1 title: Partition Name format: string array-data: description: The data. acceptFormats: - - array - - array - - array - - array + - array + - array + - array + - array uiOrder: 2 title: Array Data items: @@ -241,8 +236,8 @@ TASK_BATCH_UPSERT: format: object format: array required: - - collection-name - - array-data + - collection-name + - array-data title: Input format: object output: @@ -254,7 +249,7 @@ TASK_BATCH_UPSERT: title: Status format: string required: - - status + - status title: Output format: object TASK_DELETE: @@ -265,28 +260,26 @@ TASK_DELETE: collection-name: description: The name of the collection to delete the data from. acceptFormats: - - string + - string uiOrder: 0 title: Collection Name format: string partition-name: - description: The name of the partition to delete the data from. If empty then - default partition will be used. + description: The name of the partition to delete the data from. If empty then default partition will be used. acceptFormats: - - string + - string uiOrder: 1 title: Partition Name format: string filter: - description: 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). + description: 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). uiOrder: 2 acceptFormats: - - string + - string title: Filter format: string required: - - collection-name + - collection-name title: Input format: object output: @@ -298,7 +291,7 @@ TASK_DELETE: title: Status format: string required: - - status + - status title: Output format: object TASK_CREATE_COLLECTION: @@ -309,29 +302,29 @@ TASK_CREATE_COLLECTION: collection-name: description: The name of the collection to create. acceptFormats: - - string + - string uiOrder: 0 title: Collection Name format: string dimension: description: The dimension of the collection. acceptFormats: - - integer + - integer uiOrder: 1 title: Dimension format: integer id-type: description: The type of the id. acceptFormats: - - string + - string uiOrder: 3 title: ID Type format: string schema: description: The schema of the collection. acceptFormats: - - json - - object + - json + - object uiOrder: 4 title: Schema required: [] @@ -339,7 +332,7 @@ TASK_CREATE_COLLECTION: auto-id: description: Whether to auto generate id. acceptFormats: - - boolean + - boolean uiOrder: 5 title: Auto ID default: false @@ -347,38 +340,36 @@ TASK_CREATE_COLLECTION: metric-type: description: The metric type of the collection. acceptFormats: - - string + - string uiOrder: 6 title: Metric Type enum: - - L2 - - IP - - COSINE + - L2 + - IP + - COSINE default: L2 format: string index-params: - description: 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). + description: 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). uiOrder: 7 acceptFormats: - - json - - object + - json + - object title: Index Parameters required: [] format: object params: - description: The parameters to be applied to the collection with zilliz parameters, - please refer to [parameters](https://zilliz.io/docs/single-vector-search.md#Parameters). + description: The parameters to be applied to the collection with zilliz parameters, please refer to [parameters](https://zilliz.io/docs/single-vector-search.md#Parameters). uiOrder: 8 acceptFormats: - - json - - object + - json + - object title: Parameters required: [] format: object required: - - collection-name - - dimension + - collection-name + - dimension title: Input format: object output: @@ -390,7 +381,7 @@ TASK_CREATE_COLLECTION: title: Status format: string required: - - status + - status title: Output format: object TASK_DROP_COLLECTION: @@ -401,12 +392,12 @@ TASK_DROP_COLLECTION: collection-name: description: The name of the collection to drop. acceptFormats: - - string + - string uiOrder: 0 title: Collection Name format: string required: - - collection-name + - collection-name title: Input format: object output: @@ -418,7 +409,7 @@ TASK_DROP_COLLECTION: title: Status format: string required: - - status + - status title: Output format: object TASK_CREATE_PARTITION: @@ -429,20 +420,20 @@ TASK_CREATE_PARTITION: collection-name: description: The name of the collection to create the partition in. acceptFormats: - - string + - string uiOrder: 0 title: Collection Name format: string partition-name: description: The name of the partition to create. acceptFormats: - - string + - string uiOrder: 1 title: Partition Name format: string required: - - collection-name - - partition-name + - collection-name + - partition-name title: Input format: object output: @@ -454,7 +445,7 @@ TASK_CREATE_PARTITION: title: Status format: string required: - - status + - status title: Output format: object TASK_DROP_PARTITION: @@ -465,20 +456,20 @@ TASK_DROP_PARTITION: collection-name: description: The name of the collection to drop the partition from. acceptFormats: - - string + - string uiOrder: 0 title: Collection Name format: string partition-name: description: The name of the partition to drop. acceptFormats: - - string + - string uiOrder: 1 title: Partition Name format: string required: - - collection-name - - partition-name + - collection-name + - partition-name title: Input format: object output: @@ -490,6 +481,6 @@ TASK_DROP_PARTITION: title: Status format: string required: - - status + - status title: Output format: object diff --git a/pkg/component/generic/collection/v0/config/definition.yaml b/pkg/component/generic/collection/v0/config/definition.yaml index 7bdaf8620..a17bdda07 100644 --- a/pkg/component/generic/collection/v0/config/definition.yaml +++ b/pkg/component/generic/collection/v0/config/definition.yaml @@ -1,12 +1,12 @@ availableTasks: -- TASK_APPEND -- TASK_ASSIGN -- TASK_CONCAT -- TASK_DIFFERENCE -- TASK_INTERSECTION -- TASK_SPLIT -- TASK_SYMMETRIC_DIFFERENCE -- TASK_UNION + - 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/collection/v0/config/tasks.yaml b/pkg/component/generic/collection/v0/config/tasks.yaml index f4839432a..958468f9b 100644 --- a/pkg/component/generic/collection/v0/config/tasks.yaml +++ b/pkg/component/generic/collection/v0/config/tasks.yaml @@ -1,33 +1,28 @@ TASK_APPEND: - shortDescription: Append values to create or extend an array, or add key-value pairs - to an object. + shortDescription: Append values to create or extend an array, or add key-value pairs to an object. input: description: Input parameters for append operation. uiOrder: 0 properties: data: - description: The input data. If it's an array, the value will be appended. - If it's an object, the key-value pairs from value will be added. If it's - a primitive type (string, number, boolean), it will be converted to a single-element - array before appending. + description: The input data. If it's an array, the value will be appended. If it's an object, the key-value pairs from value will be added. If it's + a primitive type (string, number, boolean), it will be converted to a single-element array before appending. acceptFormats: - - '*' + - '*' uiOrder: 0 title: Data format: '*' value: - description: 'The value to append. For arrays: the value will be appended - as a new element. For objects: if value is an object, its key-value pairs - will be added to the input object. For primitives: value will be appended - to create/extend an array.' + description: 'The value to append. For arrays: the value will be appended as a new element. For objects: if value is an object, its key-value pairs + will be added to the input object. For primitives: value will be appended to create/extend an array.' acceptFormats: - - '*' + - '*' uiOrder: 1 title: Value format: '*' required: - - data - - value + - data + - value title: Input format: object output: @@ -35,15 +30,14 @@ TASK_APPEND: uiOrder: 0 properties: data: - description: 'The resulting data structure after the append operation. Will - be either an array (if input was array or primitive) or an object (if input - was object). Examples: [1,2,3], {''name'':''John'', ''age'':25}, or [''hello'',''world''].' + description: 'The resulting data structure after the append operation. Will be either an array (if input was array or primitive) or an object (if + input was object). Examples: [1,2,3], {''name'':''John'', ''age'':25}, or [''hello'',''world''].' uiOrder: 0 required: [] title: Data format: '*' required: - - data + - data title: Output format: object TASK_ASSIGN: @@ -53,34 +47,31 @@ TASK_ASSIGN: uiOrder: 0 properties: data: - description: The input data structure to modify. Can be an array, object, - or primitive value. + description: The input data structure to modify. Can be an array, object, or primitive value. acceptFormats: - - '*' + - '*' uiOrder: 0 title: Data format: '*' path: - description: 'The path where to assign the value. Use dot notation for nested - objects and [n] for array indices. Examples: ''users.[0].name'', ''.[0].key'', + description: 'The path where to assign the value. Use dot notation for nested objects and [n] for array indices. Examples: ''users.[0].name'', ''.[0].key'', ''metadata.tags.[2]''.' acceptFormats: - - string + - string uiOrder: 1 title: Path format: string value: - description: The value to assign at the specified path. Can be any type (string, - number, boolean, array, or object). + description: The value to assign at the specified path. Can be any type (string, number, boolean, array, or object). acceptFormats: - - '*' + - '*' uiOrder: 2 title: Value format: '*' required: - - data - - path - - value + - data + - path + - value title: Input format: object output: @@ -93,31 +84,27 @@ TASK_ASSIGN: title: Data format: '*' required: - - data + - data title: Output format: object TASK_CONCAT: - shortDescription: Concatenate multiple arrays or merge multiple objects into a single - collection. + shortDescription: Concatenate multiple arrays or merge multiple objects into a single collection. input: - description: Input parameters for concat operation. Can handle both arrays and - objects. + description: Input parameters for concat operation. Can handle both arrays and objects. uiOrder: 0 properties: data: - description: 'An array of arrays or objects to be concatenated/merged. For - arrays: [[1, 2], [3, 4]] becomes [1, 2, 3, 4]. For objects: [{''a'': 1}, - {''b'': 2}] becomes {''a'': 1, ''b'': 2}. Later values override earlier - ones for objects.' + description: 'An array of arrays or objects to be concatenated/merged. For arrays: [[1, 2], [3, 4]] becomes [1, 2, 3, 4]. For objects: [{''a'': + 1}, {''b'': 2}] becomes {''a'': 1, ''b'': 2}. Later values override earlier ones for objects.' acceptFormats: - - array + - array uiOrder: 0 items: format: '*' title: Data format: array required: - - data + - data title: Input format: object output: @@ -130,24 +117,20 @@ TASK_CONCAT: title: Data format: '*' required: - - data + - data title: Output format: object TASK_DIFFERENCE: - shortDescription: Find elements that exist in the first array or object but not - in any of the other arrays or objects. + shortDescription: Find elements that exist in the first array or object but not in any of the other arrays or objects. input: - description: Input parameters for difference operation. Can handle both arrays - and objects. + description: Input parameters for difference operation. Can handle both arrays and objects. properties: data: - description: 'An array of arrays or objects to find the difference. The first - element is compared against all subsequent elements. For example, given - arrays [[1, 2, 3], [2, 3, 4], [3, 4, 5]], the result will be [1]. For objects, - given [{''a'': 1, ''b'': 2}, {''b'': 2, ''c'': 3}], the result will be {''a'': - 1}.' + description: 'An array of arrays or objects to find the difference. The first element is compared against all subsequent elements. For example, + given arrays [[1, 2, 3], [2, 3, 4], [3, 4, 5]], the result will be [1]. For objects, given [{''a'': 1, ''b'': 2}, {''b'': 2, ''c'': 3}], the result + will be {''a'': 1}.' acceptFormats: - - array + - array uiOrder: 0 items: format: '*' @@ -155,7 +138,7 @@ TASK_DIFFERENCE: title: Data format: array required: - - data + - data title: Input format: object output: @@ -168,30 +151,27 @@ TASK_DIFFERENCE: title: Data format: '*' required: - - data + - data title: Output format: object TASK_INTERSECTION: shortDescription: Find common elements that exist in all input arrays or objects. input: - description: Input parameters for intersection operation. Can handle both arrays - and objects. + description: Input parameters for intersection operation. Can handle both arrays and objects. uiOrder: 0 properties: data: - description: 'An array of arrays or objects to find common elements. For arrays: - given [[1, 2, 3], [2, 3, 4]], the result will be [2, 3]. For objects: given - [{''a'': 1, ''b'': 2}, {''b'': 2, ''c'': 3}], the result will be {''b'': - 2}.' + description: 'An array of arrays or objects to find common elements. For arrays: given [[1, 2, 3], [2, 3, 4]], the result will be [2, 3]. For objects: + given [{''a'': 1, ''b'': 2}, {''b'': 2, ''c'': 3}], the result will be {''b'': 2}.' acceptFormats: - - array + - array uiOrder: 0 items: format: '*' title: Data format: array required: - - data + - data title: Input format: object output: @@ -204,7 +184,7 @@ TASK_INTERSECTION: title: Data format: '*' required: - - data + - data title: Output format: object TASK_SPLIT: @@ -214,11 +194,10 @@ TASK_SPLIT: uiOrder: 0 properties: data: - description: 'The source data to be split. Can be: 1) An array to split into - groups 2) An object to split by property count (keys are sorted alphabetically + description: 'The source data to be split. Can be: 1) An array to split into groups 2) An object to split by property count (keys are sorted alphabetically for consistent ordering)' acceptFormats: - - '*' + - '*' uiOrder: 0 title: Data format: '*' @@ -226,53 +205,48 @@ TASK_SPLIT: description: Number of elements per group uiOrder: 1 acceptFormats: - - integer + - integer title: Size format: integer required: - - data - - size + - data + - size title: Input format: object output: - description: Output containing the split results. For objects, the properties - in each chunk maintain alphabetical ordering of keys. + description: Output containing the split results. For objects, the properties in each chunk maintain alphabetical ordering of keys. uiOrder: 1 properties: data: - description: 'The resulting array after splitting. For arrays: array of subarrays. - For objects: array of smaller objects with alphabetically ordered keys' + description: 'The resulting array after splitting. For arrays: array of subarrays. For objects: array of smaller objects with alphabetically ordered + keys' uiOrder: 0 items: format: '*' title: Data format: array required: - - data + - data title: Output format: object TASK_SYMMETRIC_DIFFERENCE: - shortDescription: Find elements that exist in exactly one of the input arrays or - objects, but not in multiple inputs. + shortDescription: Find elements that exist in exactly one of the input arrays or objects, but not in multiple inputs. input: - description: Input parameters for symmetric difference operation. Can handle both - arrays and objects. + description: Input parameters for symmetric difference operation. Can handle both arrays and objects. uiOrder: 0 properties: data: - description: 'An array of arrays or objects to find symmetric difference. - For arrays: given [[1, 2], [2, 3]], the result will be [1, 3]. For objects: - given [{''a'': 1, ''b'': 2}, {''b'': 2, ''c'': 3}], the result will be {''a'': - 1, ''c'': 3}.' + description: 'An array of arrays or objects to find symmetric difference. For arrays: given [[1, 2], [2, 3]], the result will be [1, 3]. For objects: + given [{''a'': 1, ''b'': 2}, {''b'': 2, ''c'': 3}], the result will be {''a'': 1, ''c'': 3}.' acceptFormats: - - array + - array uiOrder: 0 items: format: '*' title: Data format: array required: - - data + - data title: Input format: object output: @@ -280,37 +254,32 @@ TASK_SYMMETRIC_DIFFERENCE: uiOrder: 0 properties: data: - description: The resulting array or object after the symmetric difference - operation. + description: The resulting array or object after the symmetric difference operation. uiOrder: 0 title: Data format: '*' required: - - data + - data title: Output format: object TASK_UNION: - shortDescription: Find unique elements that exist in any of the input arrays or - objects. + shortDescription: Find unique elements that exist in any of the input arrays or objects. input: - description: Input parameters for union operation. Can handle both arrays and - objects. + description: Input parameters for union operation. Can handle both arrays and objects. uiOrder: 0 properties: data: - description: 'An array of arrays or objects to find unique elements. For arrays: - given [[1, 2], [2, 3]], the result will be [1, 2, 3]. For objects: given - [{''a'': 1, ''b'': 2}, {''b'': 2, ''c'': 3}], the result will be {''a'': - 1, ''b'': 2, ''c'': 3}.' + description: 'An array of arrays or objects to find unique elements. For arrays: given [[1, 2], [2, 3]], the result will be [1, 2, 3]. For objects: + given [{''a'': 1, ''b'': 2}, {''b'': 2, ''c'': 3}], the result will be {''a'': 1, ''b'': 2, ''c'': 3}.' acceptFormats: - - array + - array uiOrder: 0 items: format: '*' title: Data format: array required: - - data + - data title: Input format: object output: @@ -323,6 +292,6 @@ TASK_UNION: title: Data format: '*' required: - - data + - data title: Output format: object diff --git a/pkg/component/generic/http/v0/config/definition.yaml b/pkg/component/generic/http/v0/config/definition.yaml index 4dcd8c07e..24bde30f1 100644 --- a/pkg/component/generic/http/v0/config/definition.yaml +++ b/pkg/component/generic/http/v0/config/definition.yaml @@ -1,11 +1,11 @@ availableTasks: -- TASK_GET -- TASK_POST -- TASK_PATCH -- TASK_PUT -- TASK_DELETE -- TASK_HEAD -- TASK_OPTIONS + - 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/http/v0/config/setup.yaml b/pkg/component/generic/http/v0/config/setup.yaml index 013f56b73..534713e3f 100644 --- a/pkg/component/generic/http/v0/config/setup.yaml +++ b/pkg/component/generic/http/v0/config/setup.yaml @@ -4,116 +4,116 @@ properties: description: Authentication method to use for the REST API. uiOrder: 0 oneOf: - - properties: - auth-type: - const: NO_AUTH - description: No Authentication. - uiOrder: 0 - order: 0 - title: Auth Type - format: string - required: - - auth-type - title: No Auth - - properties: - auth-type: - const: BASIC_AUTH - description: Basic auth. - uiOrder: 0 - order: 0 - title: Auth Type - format: string - password: - description: Password for Basic auth. - acceptFormats: - - string - instillSecret: true - uiOrder: 2 - order: 2 - title: Password - format: string - username: - description: Username for Basic Auth. - acceptFormats: - - string - uiOrder: 1 - order: 1 - title: Username - format: string - required: - - auth-type - - username - - password - title: Basic Auth - - properties: - auth-location: - default: header - description: Add the API key to the header or query params. - enum: - - header - - query - acceptFormats: - - string - uiOrder: 3 - order: 3 - title: Auth Location - format: string - auth-type: - const: API_KEY - description: API key authentication. - uiOrder: 0 - order: 0 - title: Auth Type - format: string - key: - default: X-API-Key - description: Key name for API key authentication. - acceptFormats: - - string - uiOrder: 1 - order: 1 - title: Key Name - format: string - value: - description: Key value for API key authentication. - acceptFormats: - - string - instillSecret: true - uiOrder: 2 - order: 2 - title: Key Value - format: string - required: - - auth-type - - key - - value - - auth-location - title: API Key - - properties: - auth-type: - const: BEARER_TOKEN - description: Bearer token authentication. - uiOrder: 0 - order: 0 - title: Auth Type - format: string - token: - description: Bearer token. - acceptFormats: - - string - instillSecret: true - uiOrder: 1 - order: 1 - title: Token - format: string - required: - - auth-type - - token - title: Bearer Token + - properties: + auth-type: + const: NO_AUTH + description: No Authentication. + uiOrder: 0 + order: 0 + title: Auth Type + format: string + required: + - auth-type + title: No Auth + - properties: + auth-type: + const: BASIC_AUTH + description: Basic auth. + uiOrder: 0 + order: 0 + title: Auth Type + format: string + password: + description: Password for Basic auth. + acceptFormats: + - string + instillSecret: true + uiOrder: 2 + order: 2 + title: Password + format: string + username: + description: Username for Basic Auth. + acceptFormats: + - string + uiOrder: 1 + order: 1 + title: Username + format: string + required: + - auth-type + - username + - password + title: Basic Auth + - properties: + auth-location: + default: header + description: Add the API key to the header or query params. + enum: + - header + - query + acceptFormats: + - string + uiOrder: 3 + order: 3 + title: Auth Location + format: string + auth-type: + const: API_KEY + description: API key authentication. + uiOrder: 0 + order: 0 + title: Auth Type + format: string + key: + default: X-API-Key + description: Key name for API key authentication. + acceptFormats: + - string + uiOrder: 1 + order: 1 + title: Key Name + format: string + value: + description: Key value for API key authentication. + acceptFormats: + - string + instillSecret: true + uiOrder: 2 + order: 2 + title: Key Value + format: string + required: + - auth-type + - key + - value + - auth-location + title: API Key + - properties: + auth-type: + const: BEARER_TOKEN + description: Bearer token authentication. + uiOrder: 0 + order: 0 + title: Auth Type + format: string + token: + description: Bearer token. + acceptFormats: + - string + instillSecret: true + uiOrder: 1 + order: 1 + title: Token + format: string + required: + - auth-type + - token + title: Bearer Token order: 1 title: Authentication format: object required: -- authentication + - authentication title: REST API Connection format: object diff --git a/pkg/component/generic/http/v0/config/tasks.yaml b/pkg/component/generic/http/v0/config/tasks.yaml index ddf173e1c..d75e37040 100644 --- a/pkg/component/generic/http/v0/config/tasks.yaml +++ b/pkg/component/generic/http/v0/config/tasks.yaml @@ -5,7 +5,7 @@ $defs: body: description: The request body. acceptFormats: - - '*' + - '*' shortDescription: The request body uiOrder: 1 order: 1 @@ -14,14 +14,14 @@ $defs: endpoint-url: description: The API endpoint url. acceptFormats: - - string + - string uiOrder: 0 title: Endpoint Url format: string output-body-schema: description: The JSON schema of output body. acceptFormats: - - string + - string shortDescription: The JSON schema of output body uiOrder: 1 order: 2 @@ -29,7 +29,7 @@ $defs: title: Body format: string required: - - endpoint-url + - endpoint-url title: Input format: object inputWithoutBody: @@ -38,14 +38,14 @@ $defs: endpoint-url: description: The API endpoint url. acceptFormats: - - string + - string uiOrder: 0 title: Endpoint Url format: string output-body-schema: description: The request body. acceptFormats: - - string + - string shortDescription: The request body uiOrder: 1 order: 1 @@ -53,7 +53,7 @@ $defs: title: Body format: string required: - - endpoint-url + - endpoint-url title: Input Without Body format: object output: @@ -78,9 +78,9 @@ $defs: title: Status Code format: integer required: - - status-code - - body - - header + - status-code + - body + - header title: Output format: object TASK_DELETE: diff --git a/pkg/component/generic/scheduler/v0/config/definition.yaml b/pkg/component/generic/scheduler/v0/config/definition.yaml index 52c700ac8..b921ae21b 100644 --- a/pkg/component/generic/scheduler/v0/config/definition.yaml +++ b/pkg/component/generic/scheduler/v0/config/definition.yaml @@ -1,6 +1,6 @@ availableTasks: [] availableEvents: -- EVENT_CRON_JOB_TRIGGERED + - EVENT_CRON_JOB_TRIGGERED documentationUrl: https://www.instill.tech/docs/component/generic/scheduler icon: assets/scheduler.svg id: scheduler diff --git a/pkg/component/generic/scheduler/v0/config/events.yaml b/pkg/component/generic/scheduler/v0/config/events.yaml index a413b42aa..e93e0b33a 100644 --- a/pkg/component/generic/scheduler/v0/config/events.yaml +++ b/pkg/component/generic/scheduler/v0/config/events.yaml @@ -3,7 +3,7 @@ EVENT_CRON_JOB_TRIGGERED: description: An event triggered on a cron job configSchema: required: - - cron + - cron properties: cron: pattern: ^[0-9*,-/]+\s+[0-9*,-/]+\s+[0-9*,-/]+\s+[0-9*,-/]+\s+[0-9*,-/]+$ @@ -12,7 +12,7 @@ EVENT_CRON_JOB_TRIGGERED: messageSchema: $schema: http://json-schema.org/draft-07/schema required: - - triggered-at + - triggered-at properties: triggered-at: description: The ISO 8601 timestamp when the cron job was triggered @@ -21,4 +21,4 @@ EVENT_CRON_JOB_TRIGGERED: title: Cron job triggered event format: object messageExamples: - - triggered-at: '2024-01-01T00:00:00.000Z' + - triggered-at: '2024-01-01T00:00:00.000Z' diff --git a/pkg/component/operator/audio/v0/config/definition.yaml b/pkg/component/operator/audio/v0/config/definition.yaml index 10571264c..93aff6c4c 100644 --- a/pkg/component/operator/audio/v0/config/definition.yaml +++ b/pkg/component/operator/audio/v0/config/definition.yaml @@ -1,6 +1,6 @@ availableTasks: -- TASK_DETECT_ACTIVITY -- TASK_SEGMENT + - 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/audio/v0/config/tasks.yaml b/pkg/component/operator/audio/v0/config/tasks.yaml index e879bf601..e7c1154ab 100644 --- a/pkg/component/operator/audio/v0/config/tasks.yaml +++ b/pkg/component/operator/audio/v0/config/tasks.yaml @@ -3,27 +3,23 @@ $defs: properties: start-time: title: Start Time - description: The number of seconds from the beginning of the audio file to - the start of this segment. + description: The number of seconds from the beginning of the audio file to the start of this segment. uiOrder: 0 format: number end-time: title: End Time - description: The number of seconds from the beginning of the audio file to - the end of this segment. + description: The number of seconds from the beginning of the audio file to the end of this segment. uiOrder: 1 format: number required: - - start-time - - end-time + - start-time + - end-time title: Segment - description: A time segment of audio data, defined by its start and end times - in seconds. + description: A time segment of audio data, defined by its start and end times in seconds. format: object TASK_DETECT_ACTIVITY: - shortDescription: Detect speech segments in audio data using Voice Activity Detection - (VAD). This task processes the input audio to 16kHz mono format, identifies periods - of human speech, and outputs time segments for each detected speech activity. + shortDescription: Detect speech segments in audio data using Voice Activity Detection (VAD). This task processes the input audio to 16kHz mono format, + identifies periods of human speech, and outputs time segments for each detected speech activity. input: description: Input. uiOrder: 0 @@ -31,35 +27,33 @@ TASK_DETECT_ACTIVITY: audio: description: Audio file to analyze for speech activity. acceptFormats: - - audio/wav - - application/octet-stream + - audio/wav + - application/octet-stream uiOrder: 0 title: Audio format: string min-silence-duration: - description: Minimum duration of silence (in milliseconds) required to split - speech segments. Longer values result in fewer, longer segments. + description: Minimum duration of silence (in milliseconds) required to split speech segments. Longer values result in fewer, longer segments. acceptFormats: - - integer - - number + - integer + - number uiOrder: 1 minimum: 0 title: Minimum Silence Duration default: 100 format: integer speech-pad: - description: Additional padding (in milliseconds) added to the start and end - of each detected speech segment to prevent cutting off speech. + description: Additional padding (in milliseconds) added to the start and end of each detected speech segment to prevent cutting off speech. acceptFormats: - - integer - - number + - integer + - number uiOrder: 2 minimum: 0 title: Speech Pad default: 30 format: integer required: - - audio + - audio title: Input format: object output: @@ -67,15 +61,14 @@ TASK_DETECT_ACTIVITY: uiOrder: 0 properties: segments: - description: Array of time segments representing detected speech activity. - Each segment contains start and end times in seconds. + description: Array of time segments representing detected speech activity. Each segment contains start and end times in seconds. uiOrder: 0 items: $ref: '#/$defs/segment' title: Segments format: array required: - - segments + - segments title: Output format: object TASK_SEGMENT: @@ -87,8 +80,8 @@ TASK_SEGMENT: audio: description: Audio data to segment. acceptFormats: - - audio/* - - application/octet-stream + - audio/* + - application/octet-stream uiOrder: 0 title: Audio format: string @@ -100,8 +93,8 @@ TASK_SEGMENT: title: Segments format: array required: - - audio - - segments + - audio + - segments title: Input format: object output: @@ -116,6 +109,6 @@ TASK_SEGMENT: title: Audios format: array required: - - audio-segments + - audio-segments title: Output format: object diff --git a/pkg/component/operator/base64/v0/config/definition.yaml b/pkg/component/operator/base64/v0/config/definition.yaml index a87704bea..70ae4fe5a 100644 --- a/pkg/component/operator/base64/v0/config/definition.yaml +++ b/pkg/component/operator/base64/v0/config/definition.yaml @@ -1,6 +1,6 @@ availableTasks: -- TASK_ENCODE -- TASK_DECODE + - 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/base64/v0/config/tasks.yaml b/pkg/component/operator/base64/v0/config/tasks.yaml index 0736a1702..eec356396 100644 --- a/pkg/component/operator/base64/v0/config/tasks.yaml +++ b/pkg/component/operator/base64/v0/config/tasks.yaml @@ -7,12 +7,12 @@ TASK_DECODE: data: description: Base64 string to be decoded. acceptFormats: - - string + - string uiOrder: 0 title: Data format: string required: - - data + - data title: Input format: object output: @@ -25,7 +25,7 @@ TASK_DECODE: title: Data format: string required: - - data + - data title: Output format: object TASK_ENCODE: @@ -37,12 +37,12 @@ TASK_ENCODE: data: description: Data to be encoded. acceptFormats: - - string + - string uiOrder: 0 title: Data format: string required: - - data + - data title: Input format: object output: @@ -55,6 +55,6 @@ TASK_ENCODE: title: Data format: string required: - - data + - data title: Output format: object diff --git a/pkg/component/operator/document/v0/config/definition.yaml b/pkg/component/operator/document/v0/config/definition.yaml index aac70b207..73ef8a96c 100644 --- a/pkg/component/operator/document/v0/config/definition.yaml +++ b/pkg/component/operator/document/v0/config/definition.yaml @@ -1,7 +1,7 @@ availableTasks: -- TASK_CONVERT_TO_MARKDOWN -- TASK_CONVERT_TO_TEXT -- TASK_CONVERT_TO_IMAGES + - 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/document/v0/config/tasks.yaml b/pkg/component/operator/document/v0/config/tasks.yaml index 1b8035c12..2756b7749 100644 --- a/pkg/component/operator/document/v0/config/tasks.yaml +++ b/pkg/component/operator/document/v0/config/tasks.yaml @@ -12,33 +12,29 @@ TASK_CONVERT_TO_MARKDOWN: uiOrder: 0 properties: document: - description: Base64 encoded PDF/DOCX/DOC/PPTX/PPT/HTML/XLSX/XLS/CSV to be - converted to text in Markdown format. + description: Base64 encoded PDF/DOCX/DOC/PPTX/PPT/HTML/XLSX/XLS/CSV to be converted to text in Markdown format. acceptFormats: - - '*/*' + - '*/*' uiOrder: 0 title: Document format: string filename: - description: The name of the file, please remember to add the file extension - in the end of file name. e.g. 'example.pdf'. + description: The name of the file, please remember to add the file extension in the end of file name. e.g. 'example.pdf'. acceptFormats: - - string + - string uiOrder: 1 title: Filename format: string display-image-tag: default: false - description: 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. + description: 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. uiOrder: 2 title: Display Image Tag format: boolean display-all-page-image: default: false - description: 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. + description: 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. uiOrder: 3 title: Display All Page Image format: boolean @@ -46,7 +42,7 @@ TASK_CONVERT_TO_MARKDOWN: $ref: '#/$defs/resolution' uiOrder: 4 required: - - document + - document title: Input format: object output: @@ -76,8 +72,7 @@ TASK_CONVERT_TO_MARKDOWN: title: Error format: string all-page-images: - description: 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. + description: 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. uiOrder: 4 items: format: string @@ -91,7 +86,7 @@ TASK_CONVERT_TO_MARKDOWN: title: Markdowns format: array required: - - body + - body title: Output format: object TASK_CONVERT_TO_TEXT: @@ -101,23 +96,21 @@ TASK_CONVERT_TO_TEXT: uiOrder: 0 properties: document: - description: Base64 encoded PDF/DOC/DOCX/XML/HTML/RTF/MD/PPTX/ODT/TIF/CSV/TXT/PNG - document to be converted to plain text. + description: Base64 encoded PDF/DOC/DOCX/XML/HTML/RTF/MD/PPTX/ODT/TIF/CSV/TXT/PNG document to be converted to plain text. acceptFormats: - - '*/*' + - '*/*' uiOrder: 0 title: Document format: string filename: - description: The name of the file, please remember to add the file extension - in the end of file name. e.g. 'example.pdf'. + description: The name of the file, please remember to add the file extension in the end of file name. e.g. 'example.pdf'. acceptFormats: - - string + - string uiOrder: 1 title: Filename format: string required: - - document + - document title: Input format: object output: @@ -151,10 +144,10 @@ TASK_CONVERT_TO_TEXT: title: Filename format: string required: - - body - - meta - - msecs - - error + - body + - meta + - msecs + - error title: Output format: object TASK_CONVERT_TO_IMAGES: @@ -166,15 +159,14 @@ TASK_CONVERT_TO_IMAGES: document: description: Base64 encoded PDF/DOCX/DOC/PPT/PPTX to be converted to images. acceptFormats: - - '*/*' + - '*/*' uiOrder: 0 title: PDF format: string filename: - description: The name of the file, please remember to add the file extension - in the end of file name. e.g. 'example.pdf'. + description: The name of the file, please remember to add the file extension in the end of file name. e.g. 'example.pdf'. acceptFormats: - - string + - string uiOrder: 1 title: Filename format: string @@ -182,7 +174,7 @@ TASK_CONVERT_TO_IMAGES: $ref: '#/$defs/resolution' uiOrder: 4 required: - - document + - document title: Input format: object output: @@ -197,14 +189,13 @@ TASK_CONVERT_TO_IMAGES: title: Images format: array filenames: - description: The filenames of the images. The filenames will be appended with - the page number. e.g. 'example-1.jpg'. + description: The filenames of the images. The filenames will be appended with the page number. e.g. 'example-1.jpg'. uiOrder: 1 items: format: string title: Filenames format: array required: - - images + - images title: Output format: object diff --git a/pkg/component/operator/image/v0/config/definition.yaml b/pkg/component/operator/image/v0/config/definition.yaml index 00110ae99..325e9504d 100644 --- a/pkg/component/operator/image/v0/config/definition.yaml +++ b/pkg/component/operator/image/v0/config/definition.yaml @@ -1,13 +1,13 @@ 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 + - 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/image/v0/config/schema.yaml b/pkg/component/operator/image/v0/config/schema.yaml index 899f59662..aed45096a 100644 --- a/pkg/component/operator/image/v0/config/schema.yaml +++ b/pkg/component/operator/image/v0/config/schema.yaml @@ -25,10 +25,10 @@ $defs: title: Width format: number required: - - left - - top - - width - - height + - left + - top + - width + - height title: Bounding Box format: object chat-messages: @@ -52,8 +52,8 @@ $defs: title: Role format: string required: - - role - - content + - role + - content format: object title: Chat Message format: array @@ -71,8 +71,8 @@ $defs: title: Score format: number required: - - category - - score + - category + - score format: object detection: additionalProperties: false @@ -93,21 +93,20 @@ $defs: title: Category format: string score: - description: The confidence score of the predicted category of the - bounding box. + description: The confidence score of the predicted category of the bounding box. uiOrder: 3 title: Score format: number required: - - bounding-box - - category - - score + - bounding-box + - category + - score title: Object format: object title: Objects format: array required: - - objects + - objects format: object embedding: items: @@ -133,8 +132,7 @@ $defs: title: Category format: string rle: - description: Run Length Encoding (RLE) of instance mask within the - bounding box. + description: Run Length Encoding (RLE) of instance mask within the bounding box. uiOrder: 0 title: RLE format: string @@ -144,23 +142,22 @@ $defs: title: Score format: number required: - - rle - - bounding-box - - category - - score + - rle + - bounding-box + - category + - score title: Object format: object title: Objects format: array required: - - objects + - objects format: object keypoint: additionalProperties: false properties: objects: - description: A list of keypoint objects, a keypoint object includes all - the pre-defined keypoints of a detected object. + description: A list of keypoint objects, a keypoint object includes all the pre-defined keypoints of a detected object. uiOrder: 0 items: properties: @@ -169,8 +166,7 @@ $defs: uiOrder: 2 title: Bounding Box keypoints: - description: A keypoint group is composed of a list of pre-defined - keypoints of a detected object. + description: A keypoint group is composed of a list of pre-defined keypoints of a detected object. uiOrder: 0 items: uiOrder: 0 @@ -191,9 +187,9 @@ $defs: title: Y Coordinate format: number required: - - x - - y - - v + - x + - y + - v title: Keypoints format: object title: Keypoints @@ -204,15 +200,15 @@ $defs: title: Score format: number required: - - keypoints - - score - - bounding-box + - keypoints + - score + - bounding-box title: Object format: object title: Objects format: array required: - - objects + - objects format: object multi-modal-content: items: @@ -220,13 +216,12 @@ $defs: image-url: properties: url: - description: Either a URL of the image or the base64 encoded image - data. + description: Either a URL of the image or the base64 encoded image data. title: URL uiOrder: 0 format: string required: - - url + - url title: Image URL description: The image URL uiOrder: 0 @@ -239,13 +234,13 @@ $defs: type: description: The type of the content part. enum: - - text - - image-url + - text + - image-url title: Type uiOrder: 2 format: string required: - - type + - type format: object format: array ocr: @@ -271,15 +266,15 @@ $defs: title: Text format: string required: - - bounding-box - - text - - score + - bounding-box + - text + - score title: Object format: object title: Objects format: array required: - - objects + - objects format: object semantic-segmentation: additionalProperties: false @@ -295,18 +290,17 @@ $defs: title: Category format: string rle: - description: Run Length Encoding (RLE) of each stuff mask within the - image. + description: Run Length Encoding (RLE) of each stuff mask within the image. uiOrder: 0 title: RLE format: string required: - - rle - - category + - rle + - category title: Object format: object title: Stuffs format: array required: - - stuffs + - stuffs format: object diff --git a/pkg/component/operator/image/v0/config/tasks.yaml b/pkg/component/operator/image/v0/config/tasks.yaml index b405fb872..9c3ad4099 100644 --- a/pkg/component/operator/image/v0/config/tasks.yaml +++ b/pkg/component/operator/image/v0/config/tasks.yaml @@ -1,7 +1,6 @@ TASK_CONCAT: - shortDescription: Concatenate images horizontally or vertically. All images must - have the same width and height. If `grid-width` and `grid-height` are not provided, - the images will be concatenated to a square grid. + shortDescription: Concatenate images horizontally or vertically. All images must have the same width and height. If `grid-width` and `grid-height` are + not provided, the images will be concatenated to a square grid. input: description: Input. uiOrder: 0 @@ -9,36 +8,33 @@ TASK_CONCAT: images: description: Input images. acceptFormats: - - array + - array uiOrder: 0 title: Images format: array grid-width: - description: Grid width. If `grid-width` is provided, `grid-height` will be - ignored. + description: Grid width. If `grid-width` is provided, `grid-height` will be ignored. acceptFormats: - - integer + - integer uiOrder: 1 title: Grid Width format: integer grid-height: - description: Grid height. If `grid-height` is provided, `grid-width` will - be ignored. + description: Grid height. If `grid-height` is provided, `grid-width` will be ignored. acceptFormats: - - integer + - integer uiOrder: 2 title: Grid Height format: integer padding: - description: Padding between images. If `padding` is provided, it will be - applied to all four sides of the image. + description: Padding between images. If `padding` is provided, it will be applied to all four sides of the image. acceptFormats: - - integer + - integer uiOrder: 3 title: Padding format: integer required: - - images + - images title: Input format: object output: @@ -51,7 +47,7 @@ TASK_CONCAT: title: Image format: image/png required: - - image + - image title: Output format: object TASK_CROP: @@ -63,60 +59,56 @@ TASK_CROP: image: description: Input image. acceptFormats: - - image/* + - image/* uiOrder: 0 title: Image format: string corner-radius: - description: Radius from the corner of the image to crop the image. If `corner-radius` - is provided, `circle-radius` will be ignored. If the `corner-radius` is - larger than half of min(width, height), the min(width, height) will be applied - to `corner-radius` . + description: Radius from the corner of the image to crop the image. If `corner-radius` is provided, `circle-radius` will be ignored. If the `corner-radius` + is larger than half of min(width, height), the min(width, height) will be applied to `corner-radius` . acceptFormats: - - integer + - integer uiOrder: 1 title: Corner Radius format: integer circle-radius: - description: Radius from the center of the circle to crop the image. If `circle-radius` - is provided, `corner-radius` will be ignored. If the `circle-radius` is - larger than half of min(width, height), the min(width, height) will be applied - to `circle-radius`. + description: Radius from the center of the circle to crop the image. If `circle-radius` is provided, `corner-radius` will be ignored. If the `circle-radius` + is larger than half of min(width, height), the min(width, height) will be applied to `circle-radius`. acceptFormats: - - integer + - integer uiOrder: 2 title: Circle Radius format: integer top-offset: description: Top offset of the crop. acceptFormats: - - integer + - integer uiOrder: 3 title: Top Offset format: integer right-offset: description: Right offset of the crop. acceptFormats: - - integer + - integer uiOrder: 4 title: Right Offset format: integer bottom-offset: description: Bottom offset of the crop. acceptFormats: - - integer + - integer uiOrder: 5 title: Bottom Offset format: integer left-offset: description: Left offset of the crop. acceptFormats: - - integer + - integer uiOrder: 6 title: Left Offset format: integer required: - - image + - image title: Input format: object output: @@ -129,7 +121,7 @@ TASK_CROP: title: Image format: image/png required: - - image + - image title: Output format: object TASK_RESIZE: @@ -141,34 +133,33 @@ TASK_RESIZE: image: description: Input image. acceptFormats: - - image/* + - image/* uiOrder: 0 title: Image format: string ratio: - description: 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. + description: 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. acceptFormats: - - number + - number uiOrder: 1 title: Ratio format: number width: description: Width of the output image. acceptFormats: - - integer + - integer uiOrder: 2 title: Width format: integer height: description: Height of the output image. acceptFormats: - - integer + - integer uiOrder: 3 title: Height format: integer required: - - image + - image title: Input format: object output: @@ -181,7 +172,7 @@ TASK_RESIZE: title: Image format: image/png required: - - image + - image title: Output format: object TASK_DRAW_CLASSIFICATION: @@ -193,30 +184,30 @@ TASK_DRAW_CLASSIFICATION: category: $ref: schema.yaml#/$defs/instill-types/classification/properties/category acceptFormats: - - string + - string image: description: Input image. acceptFormats: - - image/* + - image/* uiOrder: 0 title: Image format: string score: $ref: schema.yaml#/$defs/instill-types/classification/properties/score acceptFormats: - - number - - integer + - number + - integer show-score: description: Show model confidence score on each instance. acceptFormats: - - boolean + - boolean uiOrder: 0 title: Show Score format: boolean required: - - image - - category - - score + - image + - category + - score title: Input format: object output: @@ -229,7 +220,7 @@ TASK_DRAW_CLASSIFICATION: title: Image format: image/png required: - - image + - image title: Output format: object TASK_DRAW_DETECTION: @@ -241,24 +232,24 @@ TASK_DRAW_DETECTION: image: description: Input image. acceptFormats: - - image/* + - image/* uiOrder: 0 title: Image format: string objects: $ref: schema.yaml#/$defs/instill-types/detection/properties/objects acceptFormats: - - array + - array show-score: description: Show model confidence score on each instance. acceptFormats: - - boolean + - boolean uiOrder: 0 title: Show Score format: boolean required: - - image - - objects + - image + - objects title: Input format: object output: @@ -271,7 +262,7 @@ TASK_DRAW_DETECTION: title: Image format: image/png required: - - image + - image title: Output format: object TASK_DRAW_KEYPOINT: @@ -283,24 +274,24 @@ TASK_DRAW_KEYPOINT: image: description: Input image. acceptFormats: - - image/* + - image/* uiOrder: 0 title: Image format: string objects: $ref: schema.yaml#/$defs/instill-types/keypoint/properties/objects acceptFormats: - - array + - array show-score: description: Show model confidence score on each instance. acceptFormats: - - boolean + - boolean uiOrder: 0 title: Show Score format: boolean required: - - image - - objects + - image + - objects title: Input format: object output: @@ -313,7 +304,7 @@ TASK_DRAW_KEYPOINT: title: Image format: image/png required: - - image + - image title: Output format: object TASK_DRAW_SEMANTIC_SEGMENTATION: @@ -325,17 +316,17 @@ TASK_DRAW_SEMANTIC_SEGMENTATION: image: description: Input image. acceptFormats: - - image/* + - image/* uiOrder: 0 title: Image format: string stuffs: $ref: schema.yaml#/$defs/instill-types/semantic-segmentation/properties/stuffs acceptFormats: - - array + - array required: - - image - - stuffs + - image + - stuffs title: Input format: object output: @@ -348,7 +339,7 @@ TASK_DRAW_SEMANTIC_SEGMENTATION: title: Image format: image/png required: - - image + - image title: Output format: object TASK_DRAW_INSTANCE_SEGMENTATION: @@ -360,24 +351,24 @@ TASK_DRAW_INSTANCE_SEGMENTATION: image: description: Input image. acceptFormats: - - image/* + - image/* uiOrder: 0 title: Image format: string objects: $ref: schema.yaml#/$defs/instill-types/instance-segmentation/properties/objects acceptFormats: - - array + - array show-score: description: Show model confidence score on each instance. acceptFormats: - - boolean + - boolean uiOrder: 0 title: Show Score format: boolean required: - - image - - objects + - image + - objects title: Input format: object output: @@ -390,7 +381,7 @@ TASK_DRAW_INSTANCE_SEGMENTATION: title: Image format: image/png required: - - image + - image title: Output format: object TASK_DRAW_OCR: @@ -402,24 +393,24 @@ TASK_DRAW_OCR: image: description: Input image. acceptFormats: - - image/* + - image/* uiOrder: 0 title: Image format: string objects: $ref: schema.yaml#/$defs/instill-types/ocr/properties/objects acceptFormats: - - array + - array show-score: description: Show model confidence score on each instance. acceptFormats: - - boolean + - boolean uiOrder: 0 title: Show Score format: boolean required: - - image - - objects + - image + - objects title: Input format: object output: @@ -432,6 +423,6 @@ TASK_DRAW_OCR: title: Image format: image/png required: - - image + - image title: Output format: object diff --git a/pkg/component/operator/json/v0/config/definition.yaml b/pkg/component/operator/json/v0/config/definition.yaml index ce1c0b515..fe2aa2487 100644 --- a/pkg/component/operator/json/v0/config/definition.yaml +++ b/pkg/component/operator/json/v0/config/definition.yaml @@ -1,8 +1,8 @@ availableTasks: -- TASK_MARSHAL -- TASK_UNMARSHAL -- TASK_JQ -- TASK_RENAME_FIELDS + - 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/json/v0/config/tasks.yaml b/pkg/component/operator/json/v0/config/tasks.yaml index 611342261..e934a7e65 100644 --- a/pkg/component/operator/json/v0/config/tasks.yaml +++ b/pkg/component/operator/json/v0/config/tasks.yaml @@ -5,18 +5,17 @@ TASK_MARSHAL: uiOrder: 0 properties: json: - description: JSON entity to be marshaled. It can be any valid JSON datatype - (e.g. number, string, hash, array). + description: JSON entity to be marshaled. It can be any valid JSON datatype (e.g. number, string, hash, array). shortDescription: JSON entity to be marshaled acceptFormats: - - object - - json - - object + - object + - json + - object uiOrder: 0 required: [] title: JSON required: - - json + - json title: Input format: object output: @@ -29,7 +28,7 @@ TASK_MARSHAL: title: JSON string format: string required: - - string + - string title: Output format: object TASK_UNMARSHAL: @@ -39,16 +38,15 @@ TASK_UNMARSHAL: uiOrder: 0 properties: string: - description: JSON string to be unmarshaled. It can represent any valid JSON - datatype (e.g. number, string, hash, array). + description: JSON string to be unmarshaled. It can represent any valid JSON datatype (e.g. number, string, hash, array). shortDescription: JSON string to be unmarshaled acceptFormats: - - string + - string uiOrder: 0 title: String format: string required: - - string + - string title: Input format: object output: @@ -62,7 +60,7 @@ TASK_UNMARSHAL: title: JSON format: json required: - - json + - json title: Output format: object TASK_JQ: @@ -75,33 +73,30 @@ TASK_JQ: json-string: deprecated: true uiOrder: 2 - description: (DEPRECATED, use 'JSON value' instead) String with the JSON value - to be processed. This field allows templated inputs, but the data might - require preprocessing (marshalling). This field will be used in absence - of 'JSON value' for backwards compatibility reasons. + description: (DEPRECATED, use 'JSON value' instead) String with the JSON value to be processed. This field allows templated inputs, but the data + might require preprocessing (marshalling). This field will be used in absence of 'JSON value' for backwards compatibility reasons. shortDescription: (DEPRECATED) JSON string to be processed acceptFormats: - - string + - string title: (DEPRECATED) JSON string format: string json-value: uiOrder: 0 - description: JSON entity to be processed by the filter. It can be any valid - JSON datatype (e.g. number, string, hash, array). + description: JSON entity to be processed by the filter. It can be any valid JSON datatype (e.g. number, string, hash, array). acceptFormats: - - object - - object - - json + - object + - object + - json title: JSON value jq-filter: uiOrder: 1 description: Filter, in `jq` syntax, that will be applied to the JSON input. acceptFormats: - - string + - string title: Filter format: string required: - - jq-filter + - jq-filter title: Input format: object output: @@ -118,25 +113,23 @@ TASK_JQ: format: json format: array required: - - results + - results title: Output format: object TASK_RENAME_FIELDS: - shortDescription: Rename fields in a JSON object with a conflict resolution strategy. - If the new field already exists, it will be overwritten by default. + shortDescription: Rename fields in a JSON object with a conflict resolution strategy. If the new field already exists, it will be overwritten by default. title: Rename Fields input: description: Input. uiOrder: 0 properties: json: - description: JSON object to be edited. It can be any valid JSON datatype (e.g. - number, string, hash, array). + description: JSON object to be edited. It can be any valid JSON datatype (e.g. number, string, hash, array). shortDescription: JSON object to be edited. acceptFormats: - - object - - json - - object + - object + - json + - object uiOrder: 0 required: [] title: JSON @@ -145,7 +138,7 @@ TASK_RENAME_FIELDS: shortDescription: Array of fields to be renamed. uiOrder: 1 acceptFormats: - - array + - array items: description: Field to be renamed. shortDescription: Field to be renamed. @@ -154,7 +147,7 @@ TASK_RENAME_FIELDS: description: The field in the original data that needs to be renamed. shortDescription: Field to be renamed. acceptFormats: - - string + - string uiOrder: 0 title: From format: string @@ -162,35 +155,33 @@ TASK_RENAME_FIELDS: description: The new name for the field. shortDescription: New name for the field. acceptFormats: - - string + - string uiOrder: 1 title: To format: string required: - - from - - to + - from + - to title: Field format: object title: Fields format: array conflict-resolution: - description: Defines how conflicts are handled when the new field already - exists in the data. If the new field already exists, it will be overwritten - by default. If the new field does not exist, it will be created. When set - to 'error', the component will throw an error if the new field already exists. - When set to 'skip', the new field will be skipped if it already exists. + description: Defines how conflicts are handled when the new field already exists in the data. If the new field already exists, it will be overwritten + by default. If the new field does not exist, it will be created. When set to 'error', the component will throw an error if the new field already + exists. When set to 'skip', the new field will be skipped if it already exists. shortDescription: Conflict resolution strategy. uiOrder: 2 title: Conflict Resolution enum: - - overwrite - - skip - - error + - overwrite + - skip + - error default: overwrite format: string required: - - json - - fields + - json + - fields title: Input format: object output: @@ -204,6 +195,6 @@ TASK_RENAME_FIELDS: title: JSON format: json required: - - json + - json title: Output format: object diff --git a/pkg/component/operator/text/v0/config/definition.yaml b/pkg/component/operator/text/v0/config/definition.yaml index 22ed94f83..60fa97211 100644 --- a/pkg/component/operator/text/v0/config/definition.yaml +++ b/pkg/component/operator/text/v0/config/definition.yaml @@ -1,5 +1,5 @@ availableTasks: -- TASK_CHUNK_TEXT + - TASK_CHUNK_TEXT custom: false documentationUrl: https://www.instill.tech/docs/component/operator/text icon: assets/text.svg diff --git a/pkg/component/operator/text/v0/config/tasks.yaml b/pkg/component/operator/text/v0/config/tasks.yaml index f68be9b15..58eb5936f 100644 --- a/pkg/component/operator/text/v0/config/tasks.yaml +++ b/pkg/component/operator/text/v0/config/tasks.yaml @@ -2,26 +2,24 @@ $defs: text: description: Text to be chunked. acceptFormats: - - string + - string uiOrder: 0 title: Text format: string chunk-size: default: 512 - description: Specifies the maximum size of each chunk in terms of the number of - tokens. + description: Specifies the maximum size of each chunk in terms of the number of tokens. acceptFormats: - - integer + - integer uiOrder: 1 minimum: 1 title: Chunk Size format: integer chunk-overlap: default: 100 - description: Determines the number of tokens that overlap between consecutive - chunks. + description: Determines the number of tokens that overlap between consecutive chunks. acceptFormats: - - integer + - integer uiOrder: 2 minimum: 1 title: Chunk Overlap @@ -29,40 +27,40 @@ $defs: model-name: description: The name of the model used for tokenization. enum: - - gpt-4 - - gpt-3.5-turbo - - text-davinci-003 - - text-davinci-002 - - text-davinci-001 - - text-curie-001 - - text-babbage-001 - - text-ada-001 - - davinci - - curie - - babbage - - ada - - code-davinci-002 - - code-davinci-001 - - code-cushman-002 - - code-cushman-001 - - davinci-codex - - cushman-codex - - text-davinci-edit-001 - - code-davinci-edit-001 - - text-embedding-ada-002 - - text-similarity-davinci-001 - - text-similarity-curie-001 - - text-similarity-babbage-001 - - text-similarity-ada-001 - - text-search-davinci-doc-001 - - text-search-curie-doc-001 - - text-search-babbage-doc-001 - - text-search-ada-doc-001 - - code-search-babbage-code-001 - - code-search-ada-code-001 - - gpt2 + - gpt-4 + - gpt-3.5-turbo + - text-davinci-003 + - text-davinci-002 + - text-davinci-001 + - text-curie-001 + - text-babbage-001 + - text-ada-001 + - davinci + - curie + - babbage + - ada + - code-davinci-002 + - code-davinci-001 + - code-cushman-002 + - code-cushman-001 + - davinci-codex + - cushman-codex + - text-davinci-edit-001 + - code-davinci-edit-001 + - text-embedding-ada-002 + - text-similarity-davinci-001 + - text-similarity-curie-001 + - text-similarity-babbage-001 + - text-similarity-ada-001 + - text-search-davinci-doc-001 + - text-search-curie-doc-001 + - text-search-babbage-doc-001 + - text-search-ada-doc-001 + - code-search-babbage-code-001 + - code-search-ada-code-001 + - gpt2 acceptFormats: - - string + - string uiOrder: 3 title: Model format: string @@ -84,129 +82,119 @@ TASK_CHUNK_TEXT: title: Setting uiOrder: 0 required: - - chunk-method + - chunk-method oneOf: - - properties: - chunk-method: - const: Token - title: Chunk Method - description: Chunking based on tokenization. - uiOrder: 0 - format: string - chunk-size: - $ref: '#/$defs/chunk-size' - chunk-overlap: - $ref: '#/$defs/chunk-overlap' - model-name: - $ref: '#/$defs/model-name' - allowed-special: - default: [] - description: A list of special tokens that are allowed within chunks. - acceptFormats: - - array - items: + - properties: + chunk-method: + const: Token + title: Chunk Method + description: Chunking based on tokenization. + uiOrder: 0 format: string - uiOrder: 4 - title: Allowed Special Tokens - format: array - disallowed-special: - default: [] - description: A list of special tokens that should not appear within - chunks. - acceptFormats: - - array - items: + chunk-size: + $ref: '#/$defs/chunk-size' + chunk-overlap: + $ref: '#/$defs/chunk-overlap' + model-name: + $ref: '#/$defs/model-name' + allowed-special: + default: [] + description: A list of special tokens that are allowed within chunks. + acceptFormats: + - array + items: + format: string + uiOrder: 4 + title: Allowed Special Tokens + format: array + disallowed-special: + default: [] + description: A list of special tokens that should not appear within chunks. + acceptFormats: + - array + items: + format: string + uiOrder: 5 + title: Disallowed Special Tokens + format: array + required: + - chunk-method + title: Token + description: Language models have a token limit. You should not exceed the token limit. When you split your text into chunks it is therefore + a good idea to count the number of tokens. There are many tokenizers. When you count tokens in your text you should use the same tokenizer + as used in the language model. + format: object + - properties: + chunk-method: + const: Recursive + title: Chunk Method + description: Chunking based on recursive splitting. + uiOrder: 0 format: string - uiOrder: 5 - title: Disallowed Special Tokens - format: array - required: - - chunk-method - title: Token - description: Language models have a token limit. You should not exceed - the token limit. When you split your text into chunks it is therefore - a good idea to count the number of tokens. There are many tokenizers. - When you count tokens in your text you should use the same tokenizer - as used in the language model. - format: object - - properties: - chunk-method: - const: Recursive - title: Chunk Method - description: Chunking based on recursive splitting. - uiOrder: 0 - format: string - chunk-size: - $ref: '#/$defs/chunk-size' - chunk-overlap: - $ref: '#/$defs/chunk-overlap' - model-name: - $ref: '#/$defs/model-name' - separators: - default: [] - description: A list of strings representing the separators used - to split the text. - acceptFormats: - - array - uiOrder: 3 - items: + chunk-size: + $ref: '#/$defs/chunk-size' + chunk-overlap: + $ref: '#/$defs/chunk-overlap' + model-name: + $ref: '#/$defs/model-name' + separators: + default: [] + description: A list of strings representing the separators used to split the text. + acceptFormats: + - array + uiOrder: 3 + items: + format: string + title: Separators + format: array + keep-separator: + description: A flag indicating whether to keep the separator characters at the beginning or end of chunks. + acceptFormats: + - boolean + uiOrder: 4 + title: Keep Separator + format: boolean + required: + - chunk-method + title: Recursive + description: This text splitter is the recommended one for generic text. It is parameterized by a list of characters. It tries to split + on them in order until the chunks are small enough. The default list is ["\n\n", "\n", "", ""]. This has the effect of trying to keep + all paragraphs (and then sentences, and then words) together as long as possible, as those would generically seem to be the strongest + semantically related pieces of text. + format: object + - properties: + chunk-method: + const: Markdown + title: Chunk Method + description: Chunking based on recursive splitting with markdown format. + uiOrder: 0 format: string - title: Separators - format: array - keep-separator: - description: A flag indicating whether to keep the separator characters - at the beginning or end of chunks. - acceptFormats: - - boolean - uiOrder: 4 - title: Keep Separator - format: boolean - required: - - chunk-method - title: Recursive - description: This text splitter is the recommended one for generic text. - It is parameterized by a list of characters. It tries to split on - them in order until the chunks are small enough. The default list - is ["\n\n", "\n", "", ""]. This has the effect of trying to keep all - paragraphs (and then sentences, and then words) together as long as - possible, as those would generically seem to be the strongest semantically - related pieces of text. - format: object - - properties: - chunk-method: - const: Markdown - title: Chunk Method - description: Chunking based on recursive splitting with markdown - format. - uiOrder: 0 - format: string - chunk-size: - $ref: '#/$defs/chunk-size' - chunk-overlap: - $ref: '#/$defs/chunk-overlap' - model-name: - $ref: '#/$defs/model-name' - code-blocks: - description: A flag indicating whether code blocks should be treated - as a single unit. - acceptFormats: - - boolean - uiOrder: 3 - title: Code Blocks - format: boolean - required: - - chunk-method - title: Markdown - description: This text splitter is specially designed for Markdown format. - format: object + chunk-size: + $ref: '#/$defs/chunk-size' + chunk-overlap: + $ref: '#/$defs/chunk-overlap' + model-name: + $ref: '#/$defs/model-name' + code-blocks: + description: A flag indicating whether code blocks should be treated as a single unit. + acceptFormats: + - boolean + uiOrder: 3 + title: Code Blocks + format: boolean + required: + - chunk-method + title: Markdown + description: This text splitter is specially designed for Markdown format. + format: object format: object title: Strategy required: - - setting + - setting format: object required: - - text - - strategy + - text + - strategy title: Input format: object output: @@ -246,10 +234,10 @@ TASK_CHUNK_TEXT: uiOrder: 3 format: integer required: - - text - - start-position - - end-position - - token-count + - text + - start-position + - end-position + - token-count format: object title: Text Chunks format: array @@ -264,9 +252,9 @@ TASK_CHUNK_TEXT: title: Token Count Chunks format: integer required: - - text-chunks - - chunk-num - - token-count - - chunks-token-count + - text-chunks + - chunk-num + - token-count + - chunks-token-count title: Output format: object diff --git a/pkg/component/operator/video/v0/config/definition.yaml b/pkg/component/operator/video/v0/config/definition.yaml index 67a88753f..f32ac28d8 100644 --- a/pkg/component/operator/video/v0/config/definition.yaml +++ b/pkg/component/operator/video/v0/config/definition.yaml @@ -1,9 +1,9 @@ availableTasks: -- TASK_SEGMENT -- TASK_SUBSAMPLE -- TASK_EXTRACT_AUDIO -- TASK_EXTRACT_FRAMES -- TASK_EMBED_AUDIO + - 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/video/v0/config/tasks.yaml b/pkg/component/operator/video/v0/config/tasks.yaml index 1167184b1..0002bae6f 100644 --- a/pkg/component/operator/video/v0/config/tasks.yaml +++ b/pkg/component/operator/video/v0/config/tasks.yaml @@ -4,54 +4,46 @@ $defs: properties: start-time: title: Start Time - description: The number of seconds from the beginning of the audio file to - the start of this segment. + description: The number of seconds from the beginning of the audio file to the start of this segment. uiOrder: 0 format: number end-time: title: End Time - description: The number of seconds from the beginning of the audio file to - the end of this segment. + description: The number of seconds from the beginning of the audio file to the end of this segment. uiOrder: 1 format: number required: - - start-time - - end-time + - start-time + - end-time title: Segment - description: A time segment of audio data, defined by its start and end times - in seconds. + description: A time segment of audio data, defined by its start and end times in seconds. format: object TASK_SEGMENT: - shortDescription: 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. + shortDescription: 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: description: Input. uiOrder: 0 properties: video: - description: The source video file to be segmented. This video will be split - into multiple clips based on the specified time segments. + description: The source video file to be segmented. This video will be split into multiple clips based on the specified time segments. acceptFormats: - - video/* - - application/octet-stream + - video/* + - application/octet-stream uiOrder: 0 title: Video format: string segments: - description: 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. + description: 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. uiOrder: 1 items: $ref: '#/$defs/segment' title: Segments format: array required: - - video + - video title: Input format: object output: @@ -59,22 +51,20 @@ TASK_SEGMENT: uiOrder: 0 properties: video-segments: - description: 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. + description: 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. uiOrder: 0 items: format: string title: Videos format: array required: - - video-segments + - video-segments title: Output format: object TASK_SUBSAMPLE: - shortDescription: 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. + shortDescription: 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: description: Input. uiOrder: 0 @@ -82,65 +72,56 @@ TASK_SUBSAMPLE: video: description: The source video file to be subsampled. acceptFormats: - - video/* - - application/octet-stream + - video/* + - application/octet-stream uiOrder: 0 title: Video format: string video-bitrate: - description: '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.' + description: '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.' acceptFormats: - - number - - integer + - number + - integer uiOrder: 2 title: Video Bitrate format: number audio-bitrate: - description: '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.' + description: '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.' acceptFormats: - - number - - integer + - number + - integer uiOrder: 3 title: Audio Bitrate format: number fps: - description: 'The target frame rate for the subsampled video, in frames per - second. Determines the number of frames in the output video. Must provide + description: '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.' acceptFormats: - - number - - integer + - number + - integer uiOrder: 1 title: FPS format: number width: - description: '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.' + description: '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.' acceptFormats: - - integer + - integer uiOrder: 2 title: Width format: integer height: - description: '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.' + description: '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.' acceptFormats: - - integer + - integer uiOrder: 3 title: Height format: integer required: - - video + - video title: Input format: object output: @@ -148,38 +129,34 @@ TASK_SUBSAMPLE: uiOrder: 1 properties: video: - description: 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. + description: 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. uiOrder: 0 title: Video format: video/* required: - - video + - video title: Output format: object TASK_EXTRACT_AUDIO: - shortDescription: 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. + shortDescription: 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: description: Input. uiOrder: 0 properties: video: - description: 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. + description: 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. acceptFormats: - - video/* - - application/octet-stream + - video/* + - application/octet-stream uiOrder: 0 title: Video format: string required: - - video + - video title: Input format: object output: @@ -187,15 +164,13 @@ TASK_EXTRACT_AUDIO: uiOrder: 1 properties: audio: - description: 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. + description: 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. uiOrder: 0 title: Audio format: audio/* required: - - audio + - audio title: Output format: object TASK_EMBED_AUDIO: @@ -207,22 +182,22 @@ TASK_EMBED_AUDIO: audio: description: Audio data to embed to video acceptFormats: - - audio - - application/octet-stream + - audio + - application/octet-stream uiOrder: 0 title: Audio type: string video: description: Video input to be embedded with provided audio acceptFormats: - - video - - application/octet-stream + - video + - application/octet-stream uiOrder: 1 title: Video type: string required: - - video - - audio + - video + - audio title: Input type: object output: @@ -236,15 +211,13 @@ TASK_EMBED_AUDIO: title: Video type: string required: - - video + - video title: Output type: object TASK_EXTRACT_FRAMES: - shortDescription: 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. + shortDescription: 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: description: Input. uiOrder: 0 @@ -252,30 +225,28 @@ TASK_EXTRACT_FRAMES: video: description: The source video file from which frames will be extracted. acceptFormats: - - video/* - - application/octet-stream + - video/* + - application/octet-stream uiOrder: 0 title: Video format: string interval: - description: 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`. + description: 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`. acceptFormats: - - number - - integer + - number + - integer uiOrder: 1 title: Interval format: number timestamps: - description: 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`. + description: 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`. uiOrder: 2 title: Timestamps format: array required: - - video + - video title: Input format: object output: @@ -291,6 +262,6 @@ TASK_EXTRACT_FRAMES: title: Frames format: array required: - - frames + - frames title: Output format: object diff --git a/pkg/component/operator/web/v0/config/definition.yaml b/pkg/component/operator/web/v0/config/definition.yaml index 3a31a88dc..4a084cf11 100644 --- a/pkg/component/operator/web/v0/config/definition.yaml +++ b/pkg/component/operator/web/v0/config/definition.yaml @@ -1,7 +1,7 @@ availableTasks: -- TASK_CRAWL_SITE -- TASK_SCRAPE_PAGES -- TASK_SCRAPE_SITEMAP + - 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/operator/web/v0/config/tasks.yaml b/pkg/component/operator/web/v0/config/tasks.yaml index 521cd6959..5cfeb1b2c 100644 --- a/pkg/component/operator/web/v0/config/tasks.yaml +++ b/pkg/component/operator/web/v0/config/tasks.yaml @@ -12,32 +12,28 @@ $defs: title: Title format: string required: - - link + - link title: Page Information format: object TASK_CRAWL_SITE: - shortDescription: This task involves systematically navigating through a website, - starting from a designated page (typically the homepage), and following internal - links to discover and retrieve page titles and URLs. The process is limited to - 120 seconds and only collects links and titles from multiple pages; it does not - extract the content of the pages themselves. If you need to collect specific content - from individual pages, please use the Scrape Page task instead. + shortDescription: This task involves systematically navigating through a website, starting from a designated page (typically the homepage), and following + internal links to discover and retrieve page titles and URLs. The process is limited to 120 seconds and only collects links and titles from multiple + pages; it does not extract the content of the pages themselves. If you need to collect specific content from individual pages, please use the Scrape + Page task instead. input: uiOrder: 0 properties: url: - description: The root URL to scrape. All links on this page will be scraped, - and all links on those pages, and so on. + description: The root URL to scrape. All links on this page will be scraped, and all links on those pages, and so on. acceptFormats: - - string + - string uiOrder: 0 title: URL format: string allowed-domains: - description: A list of domains that are allowed to be scraped. If empty, all - domains are allowed. + description: A list of domains that are allowed to be scraped. If empty, all domains are allowed. acceptFormats: - - array + - array uiOrder: 1 items: format: string @@ -45,23 +41,20 @@ TASK_CRAWL_SITE: format: array max-k: default: 10 - description: Max-K sets a limit on the number of pages to fetch. If Max-K - is set to 0, all available pages will be fetched within the time limit of - 120 seconds. If Max-K is a positive number, the fetch will return up to - that many pages, but no more. + description: Max-K sets a limit on the number of pages to fetch. If Max-K is set to 0, all available pages will be fetched within the time limit + of 120 seconds. If Max-K is a positive number, the fetch will return up to that many pages, but no more. acceptFormats: - - integer + - integer uiOrder: 2 minimum: 0 title: Max Number of Pages format: integer timeout: default: 1000 - description: The time to wait for a page to load in milliseconds. Min 0, Max - 60000. Please notice the timeout here is set for each page rather than the - whole crawl task. + description: The time to wait for a page to load in milliseconds. Min 0, Max 60000. Please notice the timeout here is set for each page rather than + the whole crawl task. acceptFormats: - - integer + - integer uiOrder: 3 minimum: 0 maximum: 60000 @@ -69,49 +62,43 @@ TASK_CRAWL_SITE: format: integer max-depth: default: 0 - description: Max Depth specifies how deep the crawler will navigate from the - root URL. If max depth is set to 1, the crawler will only scrape the root - URL and will not follow any links to other pages. If max depth is set to - 0, the crawler will scrape all reachable pages until the total number of - scraped pages reaches max-k. If both max-k and max depth are defined, the - crawler will prioritize the max-k setting when determining how many pages - to scrape. + description: Max Depth specifies how deep the crawler will navigate from the root URL. If max depth is set to 1, the crawler will only scrape the + root URL and will not follow any links to other pages. If max depth is set to 0, the crawler will scrape all reachable pages until the total number + of scraped pages reaches max-k. If both max-k and max depth are defined, the crawler will prioritize the max-k setting when determining how many + pages to scrape. acceptFormats: - - integer + - integer uiOrder: 4 minimum: 0 title: Max Depth format: integer filter: - description: Filtering based on [regular expression](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Guide/Regular_expressions). - The URL will be crawled if it matches either include-pattern or not match - exclude-pattern. When both include-pattern and exclude-pattern are empty, - all URLs will be crawled. It will process exclude-pattern first, then include-pattern. - When exclude-pattern is not empty, only URLs that do not match exclude-pattern - will be crawled. When include-pattern is not empty, only URLs that match - include-pattern will be crawled. + description: Filtering based on [regular expression](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Guide/Regular_expressions). The URL + will be crawled if it matches either include-pattern or not match exclude-pattern. When both include-pattern and exclude-pattern are empty, all + URLs will be crawled. It will process exclude-pattern first, then include-pattern. When exclude-pattern is not empty, only URLs that do not match + exclude-pattern will be crawled. When include-pattern is not empty, only URLs that match include-pattern will be crawled. uiOrder: 5 title: Filter properties: exclude-pattern: description: When the URL is matched, the URL will not be crawled. acceptFormats: - - string + - string uiOrder: 1 title: Exclude Pattern format: string include-pattern: description: When the URL is matched, the URL will be crawled. acceptFormats: - - string + - string uiOrder: 2 title: Include Pattern format: string required: [] format: object required: - - url - - max-k + - url + - max-k title: Input format: object output: @@ -126,14 +113,13 @@ TASK_CRAWL_SITE: title: Pages format: array required: - - pages + - pages title: Output format: object TASK_SCRAPE_SITEMAP: - shortDescription: This task extracts data directly from a website’s sitemap. A sitemap - is typically an XML file that lists all URLs and other relevant metadata, providing - a structured overview of the site’s pages. This method efficiently gathers key - information from the sitemap without navigating through the site’s internal pages. + shortDescription: This task extracts data directly from a website’s sitemap. A sitemap is typically an XML file that lists all URLs and other relevant + metadata, providing a structured overview of the site’s pages. This method efficiently gathers key information from the sitemap without navigating through + the site’s internal pages. input: description: The URL contains sitemap. uiOrder: 0 @@ -141,12 +127,12 @@ TASK_SCRAPE_SITEMAP: url: description: The URL of the sitemap to scrape. acceptFormats: - - string + - string uiOrder: 0 title: URL format: string required: - - url + - url title: Input format: object output: @@ -178,87 +164,75 @@ TASK_SCRAPE_SITEMAP: uiOrder: 3 format: number required: - - loc - - lastmod + - loc + - lastmod title: List format: json title: List format: array required: - - list + - list title: Output format: object TASK_SCRAPE_PAGES: - shortDescription: This task focuses on extracting specific data from targeted webpages - by parsing its HTML structure. Unlike crawling, which navigates across multiple - pages, scraping retrieves content only from the specified page. After scraping, - the data can be further processed using a defined [jQuery](https://www.w3schools.com/jquery/jquery_syntax.asp) - in a specified sequence. The sequence of jQuery filtering data will be executed - in the order of `only-main-content`, `remove-tags`, and `only-include-tags`. Refer - to the [jQuery Syntax Examples](#jquery-syntax-examples) for more details on how - to filter and manipulate the data. To avoid a single URL failure from affecting - all requests, we will not return an error when an individual URL fails. Instead, - we will return all contents that are successfully scraped. + shortDescription: This task focuses on extracting specific data from targeted webpages by parsing its HTML structure. Unlike crawling, which navigates + across multiple pages, scraping retrieves content only from the specified page. After scraping, the data can be further processed using a defined [jQuery](https://www.w3schools.com/jquery/jquery_syntax.asp) + in a specified sequence. The sequence of jQuery filtering data will be executed in the order of `only-main-content`, `remove-tags`, and `only-include-tags`. + Refer to the [jQuery Syntax Examples](#jquery-syntax-examples) for more details on how to filter and manipulate the data. To avoid a single URL failure + from affecting all requests, we will not return an error when an individual URL fails. Instead, we will return all contents that are successfully scraped. input: uiOrder: 0 properties: urls: description: The URLs to scrape the webpage contents. acceptFormats: - - array + - array items: format: string uiOrder: 0 title: URLs format: array scrape-method: - description: Defines the method used for web scraping. Available options include - 'http' for standard HTTP-based scraping and 'chrome-simulator' for scraping - through a simulated Chrome browser environment. + description: Defines the method used for web scraping. Available options include 'http' for standard HTTP-based scraping and 'chrome-simulator' + for scraping through a simulated Chrome browser environment. acceptFormats: - - string + - string enum: - - http - - chrome-simulator + - http + - chrome-simulator uiOrder: 1 default: http title: Scrape Method format: string include-html: - description: Indicate whether to include the raw HTML of the webpage in the - output. If you want to include the raw HTML, set this to true. + description: Indicate whether to include the raw HTML of the webpage in the output. If you want to include the raw HTML, set this to true. acceptFormats: - - boolean + - boolean uiOrder: 2 title: Include HTML format: boolean only-main-content: - description: Only return the main content of the page by excluding the content - of the tag of header, nav, footer. + description: Only return the main content of the page by excluding the content of the tag of header, nav, footer. acceptFormats: - - boolean + - boolean uiOrder: 3 title: Only Main Content format: boolean remove-tags: - description: 'A list of tags, classes, and ids to remove from the output. - You can use [jQuery](https://www.w3schools.com/jquery/jquery_syntax.asp) - to remove data. If empty, no tags will be removed. Example: ''script, .ad, - #footer''. Please check the [jQuery Syntax Examples](#jquery-syntax-examples).' + description: 'A list of tags, classes, and ids to remove from the output. You can use [jQuery](https://www.w3schools.com/jquery/jquery_syntax.asp) + to remove data. If empty, no tags will be removed. Example: ''script, .ad, #footer''. Please check the [jQuery Syntax Examples](#jquery-syntax-examples).' acceptFormats: - - array + - array uiOrder: 4 items: format: string title: Remove Tags format: array only-include-tags: - description: 'A list of tags, classes, and ids to include in the output. You - can use [jQuery](https://www.w3schools.com/jquery/jquery_syntax.asp) to - include data. If empty, all tags will be included. Example: ''script, .ad, - #footer''. Please check the [jQuery Syntax Examples](#jquery-syntax-examples).' + description: 'A list of tags, classes, and ids to include in the output. You can use [jQuery](https://www.w3schools.com/jquery/jquery_syntax.asp) + to include data. If empty, all tags will be included. Example: ''script, .ad, #footer''. Please check the [jQuery Syntax Examples](#jquery-syntax-examples).' acceptFormats: - - array + - array uiOrder: 5 items: format: string @@ -266,22 +240,19 @@ TASK_SCRAPE_PAGES: format: array timeout: default: 1000 - description: This parameter specifies the time to wait for a page to load, - measured in milliseconds. The minimum value is 0, and the maximum value - is 60,000. Please note that if you set a short timeout, the page may not - fully load. Conversely, setting a long timeout could significantly increase - the time it takes for the task to complete. This timeout setting applies - only to the Chrome simulator. + description: This parameter specifies the time to wait for a page to load, measured in milliseconds. The minimum value is 0, and the maximum value + is 60,000. Please note that if you set a short timeout, the page may not fully load. Conversely, setting a long timeout could significantly increase + the time it takes for the task to complete. This timeout setting applies only to the Chrome simulator. acceptFormats: - - integer + - integer uiOrder: 6 minimum: 0 maximum: 60000 title: Timeout format: integer required: - - urls - - scrape-method + - urls + - scrape-method title: Input format: object output: @@ -327,8 +298,8 @@ TASK_SCRAPE_PAGES: uiOrder: 2 format: string required: - - title - - source-url + - title + - source-url title: Metadata format: object links-on-page: @@ -339,12 +310,12 @@ TASK_SCRAPE_PAGES: title: Links on Page format: array required: - - content - - markdown + - content + - markdown format: object title: Pages format: array required: - - pages + - pages title: Output format: object diff --git a/pkg/component/resources/schemas/schema.yaml b/pkg/component/resources/schemas/schema.yaml index 899f59662..aed45096a 100644 --- a/pkg/component/resources/schemas/schema.yaml +++ b/pkg/component/resources/schemas/schema.yaml @@ -25,10 +25,10 @@ $defs: title: Width format: number required: - - left - - top - - width - - height + - left + - top + - width + - height title: Bounding Box format: object chat-messages: @@ -52,8 +52,8 @@ $defs: title: Role format: string required: - - role - - content + - role + - content format: object title: Chat Message format: array @@ -71,8 +71,8 @@ $defs: title: Score format: number required: - - category - - score + - category + - score format: object detection: additionalProperties: false @@ -93,21 +93,20 @@ $defs: title: Category format: string score: - description: The confidence score of the predicted category of the - bounding box. + description: The confidence score of the predicted category of the bounding box. uiOrder: 3 title: Score format: number required: - - bounding-box - - category - - score + - bounding-box + - category + - score title: Object format: object title: Objects format: array required: - - objects + - objects format: object embedding: items: @@ -133,8 +132,7 @@ $defs: title: Category format: string rle: - description: Run Length Encoding (RLE) of instance mask within the - bounding box. + description: Run Length Encoding (RLE) of instance mask within the bounding box. uiOrder: 0 title: RLE format: string @@ -144,23 +142,22 @@ $defs: title: Score format: number required: - - rle - - bounding-box - - category - - score + - rle + - bounding-box + - category + - score title: Object format: object title: Objects format: array required: - - objects + - objects format: object keypoint: additionalProperties: false properties: objects: - description: A list of keypoint objects, a keypoint object includes all - the pre-defined keypoints of a detected object. + description: A list of keypoint objects, a keypoint object includes all the pre-defined keypoints of a detected object. uiOrder: 0 items: properties: @@ -169,8 +166,7 @@ $defs: uiOrder: 2 title: Bounding Box keypoints: - description: A keypoint group is composed of a list of pre-defined - keypoints of a detected object. + description: A keypoint group is composed of a list of pre-defined keypoints of a detected object. uiOrder: 0 items: uiOrder: 0 @@ -191,9 +187,9 @@ $defs: title: Y Coordinate format: number required: - - x - - y - - v + - x + - y + - v title: Keypoints format: object title: Keypoints @@ -204,15 +200,15 @@ $defs: title: Score format: number required: - - keypoints - - score - - bounding-box + - keypoints + - score + - bounding-box title: Object format: object title: Objects format: array required: - - objects + - objects format: object multi-modal-content: items: @@ -220,13 +216,12 @@ $defs: image-url: properties: url: - description: Either a URL of the image or the base64 encoded image - data. + description: Either a URL of the image or the base64 encoded image data. title: URL uiOrder: 0 format: string required: - - url + - url title: Image URL description: The image URL uiOrder: 0 @@ -239,13 +234,13 @@ $defs: type: description: The type of the content part. enum: - - text - - image-url + - text + - image-url title: Type uiOrder: 2 format: string required: - - type + - type format: object format: array ocr: @@ -271,15 +266,15 @@ $defs: title: Text format: string required: - - bounding-box - - text - - score + - bounding-box + - text + - score title: Object format: object title: Objects format: array required: - - objects + - objects format: object semantic-segmentation: additionalProperties: false @@ -295,18 +290,17 @@ $defs: title: Category format: string rle: - description: Run Length Encoding (RLE) of each stuff mask within the - image. + description: Run Length Encoding (RLE) of each stuff mask within the image. uiOrder: 0 title: RLE format: string required: - - rle - - category + - rle + - category title: Object format: object title: Stuffs format: array required: - - stuffs + - stuffs format: object diff --git a/pkg/component/tools/compogen/go.mod b/pkg/component/tools/compogen/go.mod index 09053c162..c0b71b50c 100644 --- a/pkg/component/tools/compogen/go.mod +++ b/pkg/component/tools/compogen/go.mod @@ -5,7 +5,7 @@ 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 diff --git a/pkg/component/tools/compogen/go.sum b/pkg/component/tools/compogen/go.sum index 7ce24b692..085a86f49 100644 --- a/pkg/component/tools/compogen/go.sum +++ b/pkg/component/tools/compogen/go.sum @@ -696,6 +696,8 @@ github.com/inconshreveable/mousetrap v1.1.0 h1:wN+x4NVGpMsO7ErUn/mUI3vEoE6Jt13X2 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=