diff --git a/.pylint.ini b/.pylint.ini index ba6afd1..517cdd4 100644 --- a/.pylint.ini +++ b/.pylint.ini @@ -7,7 +7,7 @@ extension-pkg-whitelist= # Add files or directories to the blacklist. They should be base names, not # paths. -ignore=CVS,protogen,protobufs +ignore=CVS,protogen,protobufs,schema # Add files or directories matching the regex patterns to the blacklist. The # regex matches against base names, not paths. @@ -68,6 +68,7 @@ disable= too-many-ancestors, too-many-instance-attributes, too-many-statements, + too-many-lines, attribute-defined-outside-init, unsupported-assignment-operation, unsupported-delete-operation, diff --git a/Makefile b/Makefile index 7a0c84a..82cb4d6 100644 --- a/Makefile +++ b/Makefile @@ -49,6 +49,10 @@ get-proto: update-proto: @ git submodule update --remote --merge +.PHONY: update-specs +update-specs: + @ bash bin/specs + # TEST ######################################################################## RANDOM_SEED ?= $(shell date +%s) diff --git a/bin/specs b/bin/specs new file mode 100755 index 0000000..f4181f1 --- /dev/null +++ b/bin/specs @@ -0,0 +1,74 @@ +#!/bin bash + +connector_schemas=("airbyte" "bigquery" "googlecloudstorage" "stabilityai" "googlesearch" "airbyte" "huggingface" "instill" "numbers" "openai" "pinecone" "redis" "restapi" "website") + +for connector in ${connector_schemas[@]}; do + echo "=====================@@@ Fetching and processing $connector @@@=====================" + if [[ "$connector" == 'stabilityai' ]] || [[ "$connector" == 'openai' ]]; then + echo "Downloading ${connector}.json..." + curl https://raw.githubusercontent.com/instill-ai/connector/main/pkg/${connector}/config/${connector}.json -L -s -o ./instill/resources/schema/jsons/${connector}.json + fi + curl https://raw.githubusercontent.com/instill-ai/connector/main/pkg/${connector}/config/definitions.json -L -s -o ./instill/resources/schema/jsons/${connector}_definitions.json + echo "Downloading ${connector}_definitions.json..." + cat <<<$(jq '.[0].spec.resource_specification' ./instill/resources/schema/jsons/${connector}_definitions.json) >./instill/resources/schema/jsons/${connector}_definitions.json + o_path=./instill/resources/schema/${connector}.py + if [ "$connector" == "airbyte" ]; then + o_path=./instill/resources/schema/${connector}/ + fi + echo "Generating ${o_path}..." + datamodel-codegen --strip-default-none --disable-timestamp --use-schema-description --use-title-as-name --input ./instill/resources/schema/jsons/${connector}_definitions.json --input-file-type jsonschema --output ${o_path} --output-model-type dataclasses.dataclass + # tasks + echo "Downloading ${connector}_tasks.json..." + curl https://raw.githubusercontent.com/instill-ai/connector/main/pkg/${connector}/config/tasks.json -L -s -o ./instill/resources/schema/jsons/${connector}_tasks.json + + common=$(cat ./instill/resources/schema/jsons/${connector}_tasks.json | jq -rc '."$defs" // empty') + cat ./instill/resources/schema/jsons/${connector}_tasks.json | jq -rc 'to_entries | .[]' | while read line; do + task=$(echo $line | jq -rc '.key') + if [[ "$task" == '$defs' ]]; then + continue + fi + echo $line | jq -rc '.value | to_entries | .[]' | while read inner_line; do + schema=$(echo $inner_line | jq -rc '.value') + io=$(echo $inner_line | jq -rc '.key') + filename=$(echo "${connector}_${task}_${io}" | tr "[:upper:]" "[:lower:]") + if [ ! -z "$common" ]; then + schema=${schema::${#schema}-1} + schema="${schema},\"\$defs\":${common}}" + fi + echo $schema >./instill/resources/schema/jsons/$filename.json + echo "Generating $filename.py..." + datamodel-codegen --strip-default-none --disable-timestamp --use-schema-description --use-title-as-name --input ./instill/resources/schema/jsons/$filename.json --input-file-type jsonschema --output ./instill/resources/schema/$filename.py --output-model-type dataclasses.dataclass + done + done +done + +operator_schemas=("base64" "end" "image" "json" "start" "text") + +for operator in ${operator_schemas[@]}; do + echo "=====================@@@ Fetching and processing $operator @@@=====================" + echo "Downloading ${operator}_definitions.json..." + curl https://raw.githubusercontent.com/instill-ai/operator/main/pkg/${operator}/config/definitions.json -L -s -o ./instill/resources/schema/jsons/${operator}_definitions.json + # tasks + echo "Downloading ${operator}_tasks.json..." + curl https://raw.githubusercontent.com/instill-ai/operator/main/pkg/${operator}/config/tasks.json -L -s -o ./instill/resources/schema/jsons/${operator}_tasks.json + + common=$(cat ./instill/resources/schema/jsons/${operator}_tasks.json | jq -rc '."$defs" // empty') + cat ./instill/resources/schema/jsons/${operator}_tasks.json | jq -rc 'to_entries | .[]' | while read line; do + task=$(echo $line | jq -rc '.key') + if [[ "$task" == '$defs' ]]; then + continue + fi + echo $line | jq -rc '.value | to_entries | .[]' | while read inner_line; do + schema=$(echo $inner_line | jq -rc '.value') + io=$(echo $inner_line | jq -rc '.key') + filename=$(echo "${operator}_${task}_${io}" | tr "[:upper:]" "[:lower:]") + if [ ! -z "$common" ]; then + schema=${schema::${#schema}-1} + schema="${schema},\"\$defs\":${common}}" + fi + echo $schema >./instill/resources/schema/jsons/$filename.json + echo "Generating $filename.py..." + datamodel-codegen --strip-default-none --disable-timestamp --use-schema-description --use-title-as-name --input ./instill/resources/schema/jsons/$filename.json --input-file-type jsonschema --output ./instill/resources/schema/$filename.py --output-model-type dataclasses.dataclass + done + done +done diff --git a/instill/resources/connector.py b/instill/resources/connector.py index b7f9a45..104052e 100644 --- a/instill/resources/connector.py +++ b/instill/resources/connector.py @@ -36,9 +36,7 @@ def __call__(self, task_inputs: list, mode="execute"): self.resource.id, task_inputs ) return resp.outputs - return self.client.pipeline_service.test_connector( - self.resource.id, task_inputs - ).state + return self.test() @property def client(self): @@ -56,7 +54,9 @@ def resource(self): def resource(self, resource: connector_interface.Connector): self._resource = resource - def create_component(self, name: str, config: dict) -> pipeline_interface.Component: + def _create_component( + self, name: str, config: dict + ) -> pipeline_interface.Component: component = pipeline_interface.Component() component.id = name component.definition_name = self.get_definition().name diff --git a/instill/resources/connector_ai.py b/instill/resources/connector_ai.py index 3427b6c..4777157 100644 --- a/instill/resources/connector_ai.py +++ b/instill/resources/connector_ai.py @@ -1,46 +1,179 @@ -# pylint: disable=no-member,wrong-import-position,no-name-in-module +# pylint: disable=no-member,wrong-import-position,no-name-in-module,arguments-renamed +import json +from typing import Union + +import jsonschema + from instill.clients import InstillClient +from instill.protogen.vdp.pipeline.v1beta.pipeline_pb2 import Component +from instill.resources import const from instill.resources.connector import Connector +from instill.resources.schema import ( + instill_task_classification_input, + instill_task_detection_input, + instill_task_image_to_image_input, + instill_task_instance_segmentation_input, + instill_task_keypoint_input, + instill_task_ocr_input, + instill_task_semantic_segmentation_input, + instill_task_text_generation_input, + instill_task_text_to_image_input, + instill_task_visual_question_answering_input, +) +from instill.resources.schema.huggingface import HuggingFaceConnectorSpec +from instill.resources.schema.instill import ( + InstillModelConnector as InstillModelConnectorConfig, +) +from instill.resources.schema.openai import OpenAIConnectorResource +from instill.resources.schema.stabilityai import StabilityAIConnectorResource -class InstillModelConnector(Connector): +class HuggingfaceConnector(Connector): + """Huggingface Connector""" + + with open( + f"{const.SPEC_PATH}/huggingface_definitions.json", "r", encoding="utf8" + ) as f: + definitions_jsonschema = json.loads(f.read()) + def __init__( self, client: InstillClient, name: str, - server_url: str, + config: HuggingFaceConnectorSpec, + ) -> None: + definition = "connector-definitions/hugging-face" + + jsonschema.validate(vars(config), StabilityAIConnector.definitions_jsonschema) + super().__init__(client, name, definition, vars(config)) + + +class InstillModelConnector(Connector): + """Instill Model Connector""" + + with open(f"{const.SPEC_PATH}/instill_definitions.json", "r", encoding="utf8") as f: + definitions_jsonschema = json.loads(f.read()) + + def __init__( + self, + client: InstillClient, + config: InstillModelConnectorConfig, + name: str = "model-connector", ) -> None: definition = "connector-definitions/instill-model" - configuration = { - "api_token": client.pipeline_service.hosts[ - client.pipeline_service.instance - ].token, - "server_url": server_url, - } - super().__init__(client, name, definition, configuration) + + if config.api_token == "": # type: ignore + config.api_token = client.model_service.hosts[ # type: ignore + client.model_service.instance + ].token + if config.server_url == "": # type: ignore + config.server_url = "http://api-gateway:8080" # type: ignore + + jsonschema.validate(vars(config), InstillModelConnector.definitions_jsonschema) + super().__init__(client, name, definition, vars(config)) + + def create_component( + self, + name: str, + inp: Union[ + instill_task_classification_input.Input, + instill_task_detection_input.Input, + instill_task_instance_segmentation_input.Input, + instill_task_semantic_segmentation_input.Input, + instill_task_keypoint_input.Input, + instill_task_ocr_input.Input, + instill_task_image_to_image_input.Input, + instill_task_text_generation_input.Input, + instill_task_text_to_image_input.Input, + instill_task_visual_question_answering_input.Input, + ], + ) -> Component: + if isinstance(inp, instill_task_classification_input.Input): + config = { + "input": vars(inp), + "task": "TASK_CLASSIFICATION", + } + if isinstance(inp, instill_task_detection_input.Input): + config = { + "input": vars(inp), + "task": "TASK_DETECTION", + } + if isinstance(inp, instill_task_instance_segmentation_input.Input): + config = { + "input": vars(inp), + "task": "TASK_INSTANCE_SEGMENTATION", + } + if isinstance(inp, instill_task_semantic_segmentation_input.Input): + config = { + "input": vars(inp), + "task": "TASK_SEMANTIC_SEGMENTATION", + } + if isinstance(inp, instill_task_keypoint_input.Input): + config = { + "input": vars(inp), + "task": "TASK_KEYPOINT", + } + if isinstance(inp, instill_task_ocr_input.Input): + config = { + "input": vars(inp), + "task": "TASK_OCR", + } + if isinstance(inp, instill_task_image_to_image_input.Input): + config = { + "input": vars(inp), + "task": "TASK_IMAGE_TO_IMAGE", + } + if isinstance(inp, instill_task_text_generation_input.Input): + config = { + "input": vars(inp), + "task": "TASK_TEXT_GENERATION", + } + if isinstance(inp, instill_task_text_to_image_input.Input): + config = { + "input": vars(inp), + "task": "TASK_TEXT_TO_IMAGE", + } + if isinstance(inp, instill_task_visual_question_answering_input.Input): + config = { + "input": vars(inp), + "task": "TASK_VISUAL_QUESTION_ANSWERING", + } + return super()._create_component(name, config) class StabilityAIConnector(Connector): + """Stability AI Connector""" + + with open( + f"{const.SPEC_PATH}/stabilityai_definitions.json", "r", encoding="utf8" + ) as f: + definitions_jsonschema = json.loads(f.read()) + def __init__( self, client: InstillClient, name: str, - api_key: str, + config: StabilityAIConnectorResource, ) -> None: definition = "connector-definitions/stability-ai" - configuration = {"api_key": api_key} - super().__init__(client, name, definition, configuration) + + jsonschema.validate(vars(config), StabilityAIConnector.definitions_jsonschema) + super().__init__(client, name, definition, vars(config)) class OpenAIConnector(Connector): + """OpenAI Connector""" + + with open(f"{const.SPEC_PATH}/openai_definitions.json", "r", encoding="utf8") as f: + definitions_jsonschema = json.loads(f.read()) + def __init__( self, client: InstillClient, name: str, - api_key: str, + config: OpenAIConnectorResource, ) -> None: definition = "connector-definitions/openai" - configuration = { - "api_key": api_key, - } - super().__init__(client, name, definition, configuration) + + jsonschema.validate(vars(config), OpenAIConnector.definitions_jsonschema) + super().__init__(client, name, definition, vars(config)) diff --git a/instill/resources/connector_airbyte.py b/instill/resources/connector_airbyte.py new file mode 100644 index 0000000..6f4dfce --- /dev/null +++ b/instill/resources/connector_airbyte.py @@ -0,0 +1,1239 @@ +# pylint: disable=no-member,wrong-import-position,no-name-in-module +import json + +import jsonschema + +from instill.clients import InstillClient +from instill.resources import const +from instill.resources.connector import Connector +from instill.resources.schema import airbyte + + +class AirbyteAmazonsqsConnector(Connector): + """Airbyte Amazonsqs Connector""" + + with open(f"{const.SPEC_PATH}/airbyte_definitions.json", "r", encoding="utf8") as f: + definitions_jsonschema = json.loads(f.read()) + + def __init__( + self, + client: InstillClient, + name: str, + config: airbyte.Amazonsqs, + ) -> None: + definition = "connector-definitions/airbyte-destination" + + jsonschema.validate( + vars(config), AirbyteAmazonsqsConnector.definitions_jsonschema + ) + super().__init__(client, name, definition, vars(config)) + + +class AirbyteAwsdatalakeConnector(Connector): + """Airbyte Awsdatalake Connector""" + + with open(f"{const.SPEC_PATH}/airbyte_definitions.json", "r", encoding="utf8") as f: + definitions_jsonschema = json.loads(f.read()) + + def __init__( + self, + client: InstillClient, + name: str, + config: airbyte.Awsdatalake, + ) -> None: + definition = "connector-definitions/airbyte-destination" + + jsonschema.validate( + vars(config), AirbyteAwsdatalakeConnector.definitions_jsonschema + ) + super().__init__(client, name, definition, vars(config)) + + +class AirbyteAzureblobstorageConnector(Connector): + """Airbyte Azureblobstorage Connector""" + + with open(f"{const.SPEC_PATH}/airbyte_definitions.json", "r", encoding="utf8") as f: + definitions_jsonschema = json.loads(f.read()) + + def __init__( + self, + client: InstillClient, + name: str, + config: airbyte.Azureblobstorage, + ) -> None: + definition = "connector-definitions/airbyte-destination" + + jsonschema.validate( + vars(config), AirbyteAzureblobstorageConnector.definitions_jsonschema + ) + super().__init__(client, name, definition, vars(config)) + + +class AirbyteBigqueryConnector(Connector): + """Airbyte Bigquery Connector""" + + with open(f"{const.SPEC_PATH}/airbyte_definitions.json", "r", encoding="utf8") as f: + definitions_jsonschema = json.loads(f.read()) + + def __init__( + self, + client: InstillClient, + name: str, + config: airbyte.Bigquery, + ) -> None: + definition = "connector-definitions/airbyte-destination" + + jsonschema.validate( + vars(config), AirbyteBigqueryConnector.definitions_jsonschema + ) + super().__init__(client, name, definition, vars(config)) + + +class AirbyteCassandraConnector(Connector): + """Airbyte Cassandra Connector""" + + with open(f"{const.SPEC_PATH}/airbyte_definitions.json", "r", encoding="utf8") as f: + definitions_jsonschema = json.loads(f.read()) + + def __init__( + self, + client: InstillClient, + name: str, + config: airbyte.Cassandra, + ) -> None: + definition = "connector-definitions/airbyte-destination" + + jsonschema.validate( + vars(config), AirbyteCassandraConnector.definitions_jsonschema + ) + super().__init__(client, name, definition, vars(config)) + + +class AirbyteChromaConnector(Connector): + """Airbyte Chroma Connector""" + + with open(f"{const.SPEC_PATH}/airbyte_definitions.json", "r", encoding="utf8") as f: + definitions_jsonschema = json.loads(f.read()) + + def __init__( + self, + client: InstillClient, + name: str, + config: airbyte.Chroma, + ) -> None: + definition = "connector-definitions/airbyte-destination" + + jsonschema.validate(vars(config), AirbyteChromaConnector.definitions_jsonschema) + super().__init__(client, name, definition, vars(config)) + + +class AirbyteClickhouseConnector(Connector): + """Airbyte Clickhouse Connector""" + + with open(f"{const.SPEC_PATH}/airbyte_definitions.json", "r", encoding="utf8") as f: + definitions_jsonschema = json.loads(f.read()) + + def __init__( + self, + client: InstillClient, + name: str, + config: airbyte.Clickhouse, + ) -> None: + definition = "connector-definitions/airbyte-destination" + + jsonschema.validate( + vars(config), AirbyteClickhouseConnector.definitions_jsonschema + ) + super().__init__(client, name, definition, vars(config)) + + +class AirbyteConvexConnector(Connector): + """Airbyte Convex Connector""" + + with open(f"{const.SPEC_PATH}/airbyte_definitions.json", "r", encoding="utf8") as f: + definitions_jsonschema = json.loads(f.read()) + + def __init__( + self, + client: InstillClient, + name: str, + config: airbyte.Convex, + ) -> None: + definition = "connector-definitions/airbyte-destination" + + jsonschema.validate(vars(config), AirbyteConvexConnector.definitions_jsonschema) + super().__init__(client, name, definition, vars(config)) + + +class AirbyteCsvConnector(Connector): + """Airbyte Csv Connector""" + + with open(f"{const.SPEC_PATH}/airbyte_definitions.json", "r", encoding="utf8") as f: + definitions_jsonschema = json.loads(f.read()) + + def __init__( + self, + client: InstillClient, + name: str, + config: airbyte.Csv, + ) -> None: + definition = "connector-definitions/airbyte-destination" + + jsonschema.validate(vars(config), AirbyteCsvConnector.definitions_jsonschema) + super().__init__(client, name, definition, vars(config)) + + +class AirbyteCumulioConnector(Connector): + """Airbyte Cumulio Connector""" + + with open(f"{const.SPEC_PATH}/airbyte_definitions.json", "r", encoding="utf8") as f: + definitions_jsonschema = json.loads(f.read()) + + def __init__( + self, + client: InstillClient, + name: str, + config: airbyte.Cumulio, + ) -> None: + definition = "connector-definitions/airbyte-destination" + + jsonschema.validate( + vars(config), AirbyteCumulioConnector.definitions_jsonschema + ) + super().__init__(client, name, definition, vars(config)) + + +class AirbyteDatabendConnector(Connector): + """Airbyte Databend Connector""" + + with open(f"{const.SPEC_PATH}/airbyte_definitions.json", "r", encoding="utf8") as f: + definitions_jsonschema = json.loads(f.read()) + + def __init__( + self, + client: InstillClient, + name: str, + config: airbyte.Databend, + ) -> None: + definition = "connector-definitions/airbyte-destination" + + jsonschema.validate( + vars(config), AirbyteDatabendConnector.definitions_jsonschema + ) + super().__init__(client, name, definition, vars(config)) + + +class AirbyteDatabricksConnector(Connector): + """Airbyte Databricks Connector""" + + with open(f"{const.SPEC_PATH}/airbyte_definitions.json", "r", encoding="utf8") as f: + definitions_jsonschema = json.loads(f.read()) + + def __init__( + self, + client: InstillClient, + name: str, + config: airbyte.Databricks, + ) -> None: + definition = "connector-definitions/airbyte-destination" + + jsonschema.validate( + vars(config), AirbyteDatabricksConnector.definitions_jsonschema + ) + super().__init__(client, name, definition, vars(config)) + + +class AirbyteDorisConnector(Connector): + """Airbyte Doris Connector""" + + with open(f"{const.SPEC_PATH}/airbyte_definitions.json", "r", encoding="utf8") as f: + definitions_jsonschema = json.loads(f.read()) + + def __init__( + self, + client: InstillClient, + name: str, + config: airbyte.Doris, + ) -> None: + definition = "connector-definitions/airbyte-destination" + + jsonschema.validate(vars(config), AirbyteDorisConnector.definitions_jsonschema) + super().__init__(client, name, definition, vars(config)) + + +class AirbyteDuckdbConnector(Connector): + """Airbyte Duckdb Connector""" + + with open(f"{const.SPEC_PATH}/airbyte_definitions.json", "r", encoding="utf8") as f: + definitions_jsonschema = json.loads(f.read()) + + def __init__( + self, + client: InstillClient, + name: str, + config: airbyte.Duckdb, + ) -> None: + definition = "connector-definitions/airbyte-destination" + + jsonschema.validate(vars(config), AirbyteDuckdbConnector.definitions_jsonschema) + super().__init__(client, name, definition, vars(config)) + + +class AirbyteDynamodbConnector(Connector): + """Airbyte Dynamodb Connector""" + + with open(f"{const.SPEC_PATH}/airbyte_definitions.json", "r", encoding="utf8") as f: + definitions_jsonschema = json.loads(f.read()) + + def __init__( + self, + client: InstillClient, + name: str, + config: airbyte.Dynamodb, + ) -> None: + definition = "connector-definitions/airbyte-destination" + + jsonschema.validate( + vars(config), AirbyteDynamodbConnector.definitions_jsonschema + ) + super().__init__(client, name, definition, vars(config)) + + +class AirbyteE2etestConnector(Connector): + """Airbyte E2etest Connector""" + + with open(f"{const.SPEC_PATH}/airbyte_definitions.json", "r", encoding="utf8") as f: + definitions_jsonschema = json.loads(f.read()) + + def __init__( + self, + client: InstillClient, + name: str, + config: airbyte.E2etest, + ) -> None: + definition = "connector-definitions/airbyte-destination" + + jsonschema.validate( + vars(config), AirbyteE2etestConnector.definitions_jsonschema + ) + super().__init__(client, name, definition, vars(config)) + + +class AirbyteElasticsearchConnector(Connector): + """Airbyte Elasticsearch Connector""" + + with open(f"{const.SPEC_PATH}/airbyte_definitions.json", "r", encoding="utf8") as f: + definitions_jsonschema = json.loads(f.read()) + + def __init__( + self, + client: InstillClient, + name: str, + config: airbyte.Elasticsearch, + ) -> None: + definition = "connector-definitions/airbyte-destination" + + jsonschema.validate( + vars(config), AirbyteElasticsearchConnector.definitions_jsonschema + ) + super().__init__(client, name, definition, vars(config)) + + +class AirbyteExasolConnector(Connector): + """Airbyte Exasol Connector""" + + with open(f"{const.SPEC_PATH}/airbyte_definitions.json", "r", encoding="utf8") as f: + definitions_jsonschema = json.loads(f.read()) + + def __init__( + self, + client: InstillClient, + name: str, + config: airbyte.Exasol, + ) -> None: + definition = "connector-definitions/airbyte-destination" + + jsonschema.validate(vars(config), AirbyteExasolConnector.definitions_jsonschema) + super().__init__(client, name, definition, vars(config)) + + +class AirbyteFireboltConnector(Connector): + """Airbyte Firebolt Connector""" + + with open(f"{const.SPEC_PATH}/airbyte_definitions.json", "r", encoding="utf8") as f: + definitions_jsonschema = json.loads(f.read()) + + def __init__( + self, + client: InstillClient, + name: str, + config: airbyte.Firebolt, + ) -> None: + definition = "connector-definitions/airbyte-destination" + + jsonschema.validate( + vars(config), AirbyteFireboltConnector.definitions_jsonschema + ) + super().__init__(client, name, definition, vars(config)) + + +class AirbyteFirestoreConnector(Connector): + """Airbyte Firestore Connector""" + + with open(f"{const.SPEC_PATH}/airbyte_definitions.json", "r", encoding="utf8") as f: + definitions_jsonschema = json.loads(f.read()) + + def __init__( + self, + client: InstillClient, + name: str, + config: airbyte.Firestore, + ) -> None: + definition = "connector-definitions/airbyte-destination" + + jsonschema.validate( + vars(config), AirbyteFirestoreConnector.definitions_jsonschema + ) + super().__init__(client, name, definition, vars(config)) + + +class AirbyteGcsConnector(Connector): + """Airbyte Gcs Connector""" + + with open(f"{const.SPEC_PATH}/airbyte_definitions.json", "r", encoding="utf8") as f: + definitions_jsonschema = json.loads(f.read()) + + def __init__( + self, + client: InstillClient, + name: str, + config: airbyte.Gcs, + ) -> None: + definition = "connector-definitions/airbyte-destination" + + jsonschema.validate(vars(config), AirbyteGcsConnector.definitions_jsonschema) + super().__init__(client, name, definition, vars(config)) + + +class AirbyteGooglesheetsConnector(Connector): + """Airbyte Googlesheets Connector""" + + with open(f"{const.SPEC_PATH}/airbyte_definitions.json", "r", encoding="utf8") as f: + definitions_jsonschema = json.loads(f.read()) + + def __init__( + self, + client: InstillClient, + name: str, + config: airbyte.Googlesheets, + ) -> None: + definition = "connector-definitions/airbyte-destination" + + jsonschema.validate( + vars(config), AirbyteGooglesheetsConnector.definitions_jsonschema + ) + super().__init__(client, name, definition, vars(config)) + + +class AirbyteIcebergConnector(Connector): + """Airbyte Iceberg Connector""" + + with open(f"{const.SPEC_PATH}/airbyte_definitions.json", "r", encoding="utf8") as f: + definitions_jsonschema = json.loads(f.read()) + + def __init__( + self, + client: InstillClient, + name: str, + config: airbyte.Iceberg, + ) -> None: + definition = "connector-definitions/airbyte-destination" + + jsonschema.validate( + vars(config), AirbyteIcebergConnector.definitions_jsonschema + ) + super().__init__(client, name, definition, vars(config)) + + +class AirbyteKafkaConnector(Connector): + """Airbyte Kafka Connector""" + + with open(f"{const.SPEC_PATH}/airbyte_definitions.json", "r", encoding="utf8") as f: + definitions_jsonschema = json.loads(f.read()) + + def __init__( + self, + client: InstillClient, + name: str, + config: airbyte.Kafka, + ) -> None: + definition = "connector-definitions/airbyte-destination" + + jsonschema.validate(vars(config), AirbyteKafkaConnector.definitions_jsonschema) + super().__init__(client, name, definition, vars(config)) + + +class AirbyteKeenConnector(Connector): + """Airbyte Keen Connector""" + + with open(f"{const.SPEC_PATH}/airbyte_definitions.json", "r", encoding="utf8") as f: + definitions_jsonschema = json.loads(f.read()) + + def __init__( + self, + client: InstillClient, + name: str, + config: airbyte.Keen, + ) -> None: + definition = "connector-definitions/airbyte-destination" + + jsonschema.validate(vars(config), AirbyteKeenConnector.definitions_jsonschema) + super().__init__(client, name, definition, vars(config)) + + +class AirbyteKinesisConnector(Connector): + """Airbyte Kinesis Connector""" + + with open(f"{const.SPEC_PATH}/airbyte_definitions.json", "r", encoding="utf8") as f: + definitions_jsonschema = json.loads(f.read()) + + def __init__( + self, + client: InstillClient, + name: str, + config: airbyte.Kinesis, + ) -> None: + definition = "connector-definitions/airbyte-destination" + + jsonschema.validate( + vars(config), AirbyteKinesisConnector.definitions_jsonschema + ) + super().__init__(client, name, definition, vars(config)) + + +class AirbyteLangchainConnector(Connector): + """Airbyte Langchain Connector""" + + with open(f"{const.SPEC_PATH}/airbyte_definitions.json", "r", encoding="utf8") as f: + definitions_jsonschema = json.loads(f.read()) + + def __init__( + self, + client: InstillClient, + name: str, + config: airbyte.Langchain, + ) -> None: + definition = "connector-definitions/airbyte-destination" + + jsonschema.validate( + vars(config), AirbyteLangchainConnector.definitions_jsonschema + ) + super().__init__(client, name, definition, vars(config)) + + +class AirbyteLocaljsonConnector(Connector): + """Airbyte Localjson Connector""" + + with open(f"{const.SPEC_PATH}/airbyte_definitions.json", "r", encoding="utf8") as f: + definitions_jsonschema = json.loads(f.read()) + + def __init__( + self, + client: InstillClient, + name: str, + config: airbyte.Localjson, + ) -> None: + definition = "connector-definitions/airbyte-destination" + + jsonschema.validate( + vars(config), AirbyteLocaljsonConnector.definitions_jsonschema + ) + super().__init__(client, name, definition, vars(config)) + + +class AirbyteMariadbcolumnstoreConnector(Connector): + """Airbyte Mariadbcolumnstore Connector""" + + with open(f"{const.SPEC_PATH}/airbyte_definitions.json", "r", encoding="utf8") as f: + definitions_jsonschema = json.loads(f.read()) + + def __init__( + self, + client: InstillClient, + name: str, + config: airbyte.Mariadbcolumnstore, + ) -> None: + definition = "connector-definitions/airbyte-destination" + + jsonschema.validate( + vars(config), AirbyteMariadbcolumnstoreConnector.definitions_jsonschema + ) + super().__init__(client, name, definition, vars(config)) + + +class AirbyteMeilisearchConnector(Connector): + """Airbyte Meilisearch Connector""" + + with open(f"{const.SPEC_PATH}/airbyte_definitions.json", "r", encoding="utf8") as f: + definitions_jsonschema = json.loads(f.read()) + + def __init__( + self, + client: InstillClient, + name: str, + config: airbyte.Meilisearch, + ) -> None: + definition = "connector-definitions/airbyte-destination" + + jsonschema.validate( + vars(config), AirbyteMeilisearchConnector.definitions_jsonschema + ) + super().__init__(client, name, definition, vars(config)) + + +class AirbyteMilvusConnector(Connector): + """Airbyte Milvus Connector""" + + with open(f"{const.SPEC_PATH}/airbyte_definitions.json", "r", encoding="utf8") as f: + definitions_jsonschema = json.loads(f.read()) + + def __init__( + self, + client: InstillClient, + name: str, + config: airbyte.Milvus, + ) -> None: + definition = "connector-definitions/airbyte-destination" + + jsonschema.validate(vars(config), AirbyteMilvusConnector.definitions_jsonschema) + super().__init__(client, name, definition, vars(config)) + + +class AirbyteMongodbConnector(Connector): + """Airbyte Mongodb Connector""" + + with open(f"{const.SPEC_PATH}/airbyte_definitions.json", "r", encoding="utf8") as f: + definitions_jsonschema = json.loads(f.read()) + + def __init__( + self, + client: InstillClient, + name: str, + config: airbyte.Mongodb, + ) -> None: + definition = "connector-definitions/airbyte-destination" + + jsonschema.validate( + vars(config), AirbyteMongodbConnector.definitions_jsonschema + ) + super().__init__(client, name, definition, vars(config)) + + +class AirbyteMqttConnector(Connector): + """Airbyte Mqtt Connector""" + + with open(f"{const.SPEC_PATH}/airbyte_definitions.json", "r", encoding="utf8") as f: + definitions_jsonschema = json.loads(f.read()) + + def __init__( + self, + client: InstillClient, + name: str, + config: airbyte.Mqtt, + ) -> None: + definition = "connector-definitions/airbyte-destination" + + jsonschema.validate(vars(config), AirbyteMqttConnector.definitions_jsonschema) + super().__init__(client, name, definition, vars(config)) + + +class AirbytMssqlConnector(Connector): + """Airbyte Mssql Connector""" + + with open(f"{const.SPEC_PATH}/airbyte_definitions.json", "r", encoding="utf8") as f: + definitions_jsonschema = json.loads(f.read()) + + def __init__( + self, + client: InstillClient, + name: str, + config: airbyte.Mssql, + ) -> None: + definition = "connector-definitions/airbyte-destination" + + jsonschema.validate(vars(config), AirbytMssqlConnector.definitions_jsonschema) + super().__init__(client, name, definition, vars(config)) + + +class AirbyteMysqlConnector(Connector): + """Airbyte Mysql Connector""" + + with open(f"{const.SPEC_PATH}/airbyte_definitions.json", "r", encoding="utf8") as f: + definitions_jsonschema = json.loads(f.read()) + + def __init__( + self, + client: InstillClient, + name: str, + config: airbyte.Mysql, + ) -> None: + definition = "connector-definitions/airbyte-destination" + + jsonschema.validate(vars(config), AirbyteMysqlConnector.definitions_jsonschema) + super().__init__(client, name, definition, vars(config)) + + +class AirbyteOracleConnector(Connector): + """Airbyte Oracle Connector""" + + with open(f"{const.SPEC_PATH}/airbyte_definitions.json", "r", encoding="utf8") as f: + definitions_jsonschema = json.loads(f.read()) + + def __init__( + self, + client: InstillClient, + name: str, + config: airbyte.Oracle, + ) -> None: + definition = "connector-definitions/airbyte-destination" + + jsonschema.validate(vars(config), AirbyteOracleConnector.definitions_jsonschema) + super().__init__(client, name, definition, vars(config)) + + +class AirbytePineconeConnector(Connector): + """Airbyte Pinecone Connector""" + + with open(f"{const.SPEC_PATH}/airbyte_definitions.json", "r", encoding="utf8") as f: + definitions_jsonschema = json.loads(f.read()) + + def __init__( + self, + client: InstillClient, + name: str, + config: airbyte.Pinecone, + ) -> None: + definition = "connector-definitions/airbyte-destination" + + jsonschema.validate( + vars(config), AirbytePineconeConnector.definitions_jsonschema + ) + super().__init__(client, name, definition, vars(config)) + + +class AirbytePostgresConnector(Connector): + """Airbyte Postgres Connector""" + + with open(f"{const.SPEC_PATH}/airbyte_definitions.json", "r", encoding="utf8") as f: + definitions_jsonschema = json.loads(f.read()) + + def __init__( + self, + client: InstillClient, + name: str, + config: airbyte.Postgres, + ) -> None: + definition = "connector-definitions/airbyte-destination" + + jsonschema.validate( + vars(config), AirbytePostgresConnector.definitions_jsonschema + ) + super().__init__(client, name, definition, vars(config)) + + +class AirbytePubsubConnector(Connector): + """Airbyte Pubsub Connector""" + + with open(f"{const.SPEC_PATH}/airbyte_definitions.json", "r", encoding="utf8") as f: + definitions_jsonschema = json.loads(f.read()) + + def __init__( + self, + client: InstillClient, + name: str, + config: airbyte.Pubsub, + ) -> None: + definition = "connector-definitions/airbyte-destination" + + jsonschema.validate(vars(config), AirbytePubsubConnector.definitions_jsonschema) + super().__init__(client, name, definition, vars(config)) + + +class AirbytePulsarConnector(Connector): + """Airbyte Pulsar Connector""" + + with open(f"{const.SPEC_PATH}/airbyte_definitions.json", "r", encoding="utf8") as f: + definitions_jsonschema = json.loads(f.read()) + + def __init__( + self, + client: InstillClient, + name: str, + config: airbyte.Pulsar, + ) -> None: + definition = "connector-definitions/airbyte-destination" + + jsonschema.validate(vars(config), AirbytePulsarConnector.definitions_jsonschema) + super().__init__(client, name, definition, vars(config)) + + +class AirbyteQdrantConnector(Connector): + """Airbyte Qdrant Connector""" + + with open(f"{const.SPEC_PATH}/airbyte_definitions.json", "r", encoding="utf8") as f: + definitions_jsonschema = json.loads(f.read()) + + def __init__( + self, + client: InstillClient, + name: str, + config: airbyte.Qdrant, + ) -> None: + definition = "connector-definitions/airbyte-destination" + + jsonschema.validate(vars(config), AirbyteQdrantConnector.definitions_jsonschema) + super().__init__(client, name, definition, vars(config)) + + +class AirbyteR2Connector(Connector): + """Airbyte R2 Connector""" + + with open(f"{const.SPEC_PATH}/airbyte_definitions.json", "r", encoding="utf8") as f: + definitions_jsonschema = json.loads(f.read()) + + def __init__( + self, + client: InstillClient, + name: str, + config: airbyte.R2, + ) -> None: + definition = "connector-definitions/airbyte-destination" + + jsonschema.validate(vars(config), AirbyteR2Connector.definitions_jsonschema) + super().__init__(client, name, definition, vars(config)) + + +class AirbyteRabbitmqConnector(Connector): + """Airbyte Rabbitmq Connector""" + + with open(f"{const.SPEC_PATH}/airbyte_definitions.json", "r", encoding="utf8") as f: + definitions_jsonschema = json.loads(f.read()) + + def __init__( + self, + client: InstillClient, + name: str, + config: airbyte.Rabbitmq, + ) -> None: + definition = "connector-definitions/airbyte-destination" + + jsonschema.validate( + vars(config), AirbyteRabbitmqConnector.definitions_jsonschema + ) + super().__init__(client, name, definition, vars(config)) + + +class AirbyteRedisConnector(Connector): + """Airbyte Redis Connector""" + + with open(f"{const.SPEC_PATH}/airbyte_definitions.json", "r", encoding="utf8") as f: + definitions_jsonschema = json.loads(f.read()) + + def __init__( + self, + client: InstillClient, + name: str, + config: airbyte.Redis, + ) -> None: + definition = "connector-definitions/airbyte-destination" + + jsonschema.validate(vars(config), AirbyteRedisConnector.definitions_jsonschema) + super().__init__(client, name, definition, vars(config)) + + +class AirbyteRedpandaConnector(Connector): + """Airbyte Redpanda Connector""" + + with open(f"{const.SPEC_PATH}/airbyte_definitions.json", "r", encoding="utf8") as f: + definitions_jsonschema = json.loads(f.read()) + + def __init__( + self, + client: InstillClient, + name: str, + config: airbyte.Redpanda, + ) -> None: + definition = "connector-definitions/airbyte-destination" + + jsonschema.validate( + vars(config), AirbyteRedpandaConnector.definitions_jsonschema + ) + super().__init__(client, name, definition, vars(config)) + + +class AirbyteRedshiftConnector(Connector): + """Airbyte Redshift Connector""" + + with open(f"{const.SPEC_PATH}/airbyte_definitions.json", "r", encoding="utf8") as f: + definitions_jsonschema = json.loads(f.read()) + + def __init__( + self, + client: InstillClient, + name: str, + config: airbyte.Redshift, + ) -> None: + definition = "connector-definitions/airbyte-destination" + + jsonschema.validate( + vars(config), AirbyteRedshiftConnector.definitions_jsonschema + ) + super().__init__(client, name, definition, vars(config)) + + +class AirbyteRocksetConnector(Connector): + """Airbyte Rockset Connector""" + + with open(f"{const.SPEC_PATH}/airbyte_definitions.json", "r", encoding="utf8") as f: + definitions_jsonschema = json.loads(f.read()) + + def __init__( + self, + client: InstillClient, + name: str, + config: airbyte.Rockset, + ) -> None: + definition = "connector-definitions/airbyte-destination" + + jsonschema.validate( + vars(config), AirbyteRocksetConnector.definitions_jsonschema + ) + super().__init__(client, name, definition, vars(config)) + + +class AirbyteS3glueConnector(Connector): + """Airbyte S3glue Connector""" + + with open(f"{const.SPEC_PATH}/airbyte_definitions.json", "r", encoding="utf8") as f: + definitions_jsonschema = json.loads(f.read()) + + def __init__( + self, + client: InstillClient, + name: str, + config: airbyte.S3glue, + ) -> None: + definition = "connector-definitions/airbyte-destination" + + jsonschema.validate(vars(config), AirbyteS3glueConnector.definitions_jsonschema) + super().__init__(client, name, definition, vars(config)) + + +class AirbyteS3Connector(Connector): + """Airbyte S3 Connector""" + + with open(f"{const.SPEC_PATH}/airbyte_definitions.json", "r", encoding="utf8") as f: + definitions_jsonschema = json.loads(f.read()) + + def __init__( + self, + client: InstillClient, + name: str, + config: airbyte.S3, + ) -> None: + definition = "connector-definitions/airbyte-destination" + + jsonschema.validate(vars(config), AirbyteS3Connector.definitions_jsonschema) + super().__init__(client, name, definition, vars(config)) + + +class AirbyteScyllaConnector(Connector): + """Airbyte Scylla Connector""" + + with open(f"{const.SPEC_PATH}/airbyte_definitions.json", "r", encoding="utf8") as f: + definitions_jsonschema = json.loads(f.read()) + + def __init__( + self, + client: InstillClient, + name: str, + config: airbyte.Scylla, + ) -> None: + definition = "connector-definitions/airbyte-destination" + + jsonschema.validate(vars(config), AirbyteScyllaConnector.definitions_jsonschema) + super().__init__(client, name, definition, vars(config)) + + +class AirbyteSelectdbConnector(Connector): + """Airbyte Selectdb Connector""" + + with open(f"{const.SPEC_PATH}/airbyte_definitions.json", "r", encoding="utf8") as f: + definitions_jsonschema = json.loads(f.read()) + + def __init__( + self, + client: InstillClient, + name: str, + config: airbyte.Selectdb, + ) -> None: + definition = "connector-definitions/airbyte-destination" + + jsonschema.validate( + vars(config), AirbyteSelectdbConnector.definitions_jsonschema + ) + super().__init__(client, name, definition, vars(config)) + + +class AirbyteSftpjsonConnector(Connector): + """Airbyte Sftpjson Connector""" + + with open(f"{const.SPEC_PATH}/airbyte_definitions.json", "r", encoding="utf8") as f: + definitions_jsonschema = json.loads(f.read()) + + def __init__( + self, + client: InstillClient, + name: str, + config: airbyte.Sftpjson, + ) -> None: + definition = "connector-definitions/airbyte-destination" + + jsonschema.validate( + vars(config), AirbyteSftpjsonConnector.definitions_jsonschema + ) + super().__init__(client, name, definition, vars(config)) + + +class AirbyteSnowflakeConnector(Connector): + """Airbyte Snowflake Connector""" + + with open(f"{const.SPEC_PATH}/airbyte_definitions.json", "r", encoding="utf8") as f: + definitions_jsonschema = json.loads(f.read()) + + def __init__( + self, + client: InstillClient, + name: str, + config: airbyte.Snowflake, + ) -> None: + definition = "connector-definitions/airbyte-destination" + + jsonschema.validate( + vars(config), AirbyteSnowflakeConnector.definitions_jsonschema + ) + super().__init__(client, name, definition, vars(config)) + + +class AirbyteSqliteConnector(Connector): + """Airbyte Sqlite Connector""" + + with open(f"{const.SPEC_PATH}/airbyte_definitions.json", "r", encoding="utf8") as f: + definitions_jsonschema = json.loads(f.read()) + + def __init__( + self, + client: InstillClient, + name: str, + config: airbyte.Sqlite, + ) -> None: + definition = "connector-definitions/airbyte-destination" + + jsonschema.validate(vars(config), AirbyteSqliteConnector.definitions_jsonschema) + super().__init__(client, name, definition, vars(config)) + + +class AirbyteStarburstgalaxyConnector(Connector): + """Airbyte Starburstgalaxy Connector""" + + with open(f"{const.SPEC_PATH}/airbyte_definitions.json", "r", encoding="utf8") as f: + definitions_jsonschema = json.loads(f.read()) + + def __init__( + self, + client: InstillClient, + name: str, + config: airbyte.Starburstgalaxy, + ) -> None: + definition = "connector-definitions/airbyte-destination" + + jsonschema.validate( + vars(config), AirbyteStarburstgalaxyConnector.definitions_jsonschema + ) + super().__init__(client, name, definition, vars(config)) + + +class AirbyteTeradataConnector(Connector): + """Airbyte Teradata Connector""" + + with open(f"{const.SPEC_PATH}/airbyte_definitions.json", "r", encoding="utf8") as f: + definitions_jsonschema = json.loads(f.read()) + + def __init__( + self, + client: InstillClient, + name: str, + config: airbyte.Teradata, + ) -> None: + definition = "connector-definitions/airbyte-destination" + + jsonschema.validate( + vars(config), AirbyteTeradataConnector.definitions_jsonschema + ) + super().__init__(client, name, definition, vars(config)) + + +class AirbyteTidbConnector(Connector): + """Airbyte Tidb Connector""" + + with open(f"{const.SPEC_PATH}/airbyte_definitions.json", "r", encoding="utf8") as f: + definitions_jsonschema = json.loads(f.read()) + + def __init__( + self, + client: InstillClient, + name: str, + config: airbyte.Tidb, + ) -> None: + definition = "connector-definitions/airbyte-destination" + + jsonschema.validate(vars(config), AirbyteTidbConnector.definitions_jsonschema) + super().__init__(client, name, definition, vars(config)) + + +class AirbyteTimeplusConnector(Connector): + """Airbyte Timeplus Connector""" + + with open(f"{const.SPEC_PATH}/airbyte_definitions.json", "r", encoding="utf8") as f: + definitions_jsonschema = json.loads(f.read()) + + def __init__( + self, + client: InstillClient, + name: str, + config: airbyte.Timeplus, + ) -> None: + definition = "connector-definitions/airbyte-destination" + + jsonschema.validate( + vars(config), AirbyteTimeplusConnector.definitions_jsonschema + ) + super().__init__(client, name, definition, vars(config)) + + +class AirbyteTypesenseConnector(Connector): + """Airbyte Typesense Connector""" + + with open(f"{const.SPEC_PATH}/airbyte_definitions.json", "r", encoding="utf8") as f: + definitions_jsonschema = json.loads(f.read()) + + def __init__( + self, + client: InstillClient, + name: str, + config: airbyte.Typesense, + ) -> None: + definition = "connector-definitions/airbyte-destination" + + jsonschema.validate( + vars(config), AirbyteTypesenseConnector.definitions_jsonschema + ) + super().__init__(client, name, definition, vars(config)) + + +class AirbyteVerticaConnector(Connector): + """Airbyte Vertica Connector""" + + with open(f"{const.SPEC_PATH}/airbyte_definitions.json", "r", encoding="utf8") as f: + definitions_jsonschema = json.loads(f.read()) + + def __init__( + self, + client: InstillClient, + name: str, + config: airbyte.Vertica, + ) -> None: + definition = "connector-definitions/airbyte-destination" + + jsonschema.validate( + vars(config), AirbyteVerticaConnector.definitions_jsonschema + ) + super().__init__(client, name, definition, vars(config)) + + +class AirbyteWeaviateConnector(Connector): + """Airbyte Weaviate Connector""" + + with open(f"{const.SPEC_PATH}/airbyte_definitions.json", "r", encoding="utf8") as f: + definitions_jsonschema = json.loads(f.read()) + + def __init__( + self, + client: InstillClient, + name: str, + config: airbyte.Weaviate, + ) -> None: + definition = "connector-definitions/airbyte-destination" + + jsonschema.validate( + vars(config), AirbyteWeaviateConnector.definitions_jsonschema + ) + super().__init__(client, name, definition, vars(config)) + + +class AirbyteXataConnector(Connector): + """Airbyte Xata Connector""" + + with open(f"{const.SPEC_PATH}/airbyte_definitions.json", "r", encoding="utf8") as f: + definitions_jsonschema = json.loads(f.read()) + + def __init__( + self, + client: InstillClient, + name: str, + config: airbyte.Xata, + ) -> None: + definition = "connector-definitions/airbyte-destination" + + jsonschema.validate(vars(config), AirbyteXataConnector.definitions_jsonschema) + super().__init__(client, name, definition, vars(config)) + + +class AirbyteYugabytedbConnector(Connector): + """Airbyte Yugabytedb Connector""" + + with open(f"{const.SPEC_PATH}/airbyte_definitions.json", "r", encoding="utf8") as f: + definitions_jsonschema = json.loads(f.read()) + + def __init__( + self, + client: InstillClient, + name: str, + config: airbyte.Yugabytedb, + ) -> None: + definition = "connector-definitions/airbyte-destination" + + jsonschema.validate( + vars(config), AirbyteYugabytedbConnector.definitions_jsonschema + ) + super().__init__(client, name, definition, vars(config)) + + +class AirbyteAirbytedevmatecloudConnector(Connector): + """Airbyte Airbytedevmatecloud Connector""" + + with open(f"{const.SPEC_PATH}/airbyte_definitions.json", "r", encoding="utf8") as f: + definitions_jsonschema = json.loads(f.read()) + + def __init__( + self, + client: InstillClient, + name: str, + config: airbyte.Airbytedevmatecloud, + ) -> None: + definition = "connector-definitions/airbyte-destination" + + jsonschema.validate( + vars(config), AirbyteAirbytedevmatecloudConnector.definitions_jsonschema + ) + super().__init__(client, name, definition, vars(config)) diff --git a/instill/resources/connector_blockchain.py b/instill/resources/connector_blockchain.py index f86eefa..22a046f 100644 --- a/instill/resources/connector_blockchain.py +++ b/instill/resources/connector_blockchain.py @@ -1,25 +1,27 @@ # pylint: disable=no-member,wrong-import-position,no-name-in-module +import json + +import jsonschema + from instill.clients import InstillClient +from instill.resources import const from instill.resources.connector import Connector +from instill.resources.schema.numbers import NumbersProtocolBlockchainConnectorSpec class NumbersConnector(Connector): + """Numbers Connector""" + + with open(f"{const.SPEC_PATH}/numbers_definitions.json", "r", encoding="utf8") as f: + definitions_jsonschema = json.loads(f.read()) + def __init__( self, client: InstillClient, name: str, - capture_token: str, - asset_type: str, - metadata_texts: bool, - metadata_structured_data: bool, - metadata_metadata: bool, + config: NumbersProtocolBlockchainConnectorSpec, ) -> None: definition = "connector-definitions/numbers" - configuration = { - "capture_token": capture_token, - "asset_type": asset_type, - "metadata_texts": metadata_texts, - "metadata_structured_data": metadata_structured_data, - "metadata_metadata": metadata_metadata, - } - super().__init__(client, name, definition, configuration) + + jsonschema.validate(vars(config), NumbersConnector.definitions_jsonschema) + super().__init__(client, name, definition, vars(config)) diff --git a/instill/resources/connector_data.py b/instill/resources/connector_data.py index c7888a1..de6b28b 100644 --- a/instill/resources/connector_data.py +++ b/instill/resources/connector_data.py @@ -1,16 +1,153 @@ # pylint: disable=no-member,wrong-import-position,no-name-in-module +import json + +import jsonschema + from instill.clients import InstillClient +from instill.resources import const from instill.resources.connector import Connector +from instill.resources.schema import ( + bigquery, + googlecloudstorage, + googlesearch, + pinecone, + redis, + restapi, + website, +) + + +class BigQueryConnector(Connector): + """BigQuery Connector""" + + with open( + f"{const.SPEC_PATH}/bigquery_definitions.json", "r", encoding="utf8" + ) as f: + definitions_jsonschema = json.loads(f.read()) + + def __init__( + self, + client: InstillClient, + name: str, + config: bigquery.BigQueryConnectorSpec, + ) -> None: + definition = "connector-definitions/bigquery" + + jsonschema.validate(vars(config), BigQueryConnector.definitions_jsonschema) + super().__init__(client, name, definition, vars(config)) class PineconeConnector(Connector): + """Pinecone Connector""" + + with open( + f"{const.SPEC_PATH}/pinecone_definitions.json", "r", encoding="utf8" + ) as f: + definitions_jsonschema = json.loads(f.read()) + def __init__( self, client: InstillClient, name: str, - api_key: str, - server_url: str, + config: pinecone.PineconeConnectorSpec, ) -> None: definition = "connector-definitions/pinecone" - configuration = {"url": server_url, "api_key": api_key} - super().__init__(client, name, definition, configuration) + + jsonschema.validate(vars(config), PineconeConnector.definitions_jsonschema) + super().__init__(client, name, definition, vars(config)) + + +class GoogleCloudStorageConnector(Connector): + """GoogleCloudStorage Connector""" + + with open( + f"{const.SPEC_PATH}/googlecloudstorage_definitions.json", "r", encoding="utf8" + ) as f: + definitions_jsonschema = json.loads(f.read()) + + def __init__( + self, + client: InstillClient, + name: str, + config: googlecloudstorage.GoogleCloudStorageConnectorSpec, + ) -> None: + definition = "connector-definitions/gcs" + + jsonschema.validate( + vars(config), GoogleCloudStorageConnector.definitions_jsonschema + ) + super().__init__(client, name, definition, vars(config)) + + +class GoogleSearchConnector(Connector): + """GoogleSearch Connector""" + + with open( + f"{const.SPEC_PATH}/googlecloudstorage_definitions.json", "r", encoding="utf8" + ) as f: + definitions_jsonschema = json.loads(f.read()) + + def __init__( + self, + client: InstillClient, + name: str, + config: googlesearch.GoogleSearchConnectorSpec, + ) -> None: + definition = "connector-definitions/google-search" + + jsonschema.validate(vars(config), GoogleSearchConnector.definitions_jsonschema) + super().__init__(client, name, definition, vars(config)) + + +class RedisConnector(Connector): + """Redis Connector""" + + with open(f"{const.SPEC_PATH}/redis_definitions.json", "r", encoding="utf8") as f: + definitions_jsonschema = json.loads(f.read()) + + def __init__( + self, + client: InstillClient, + name: str, + config: redis.RedisConnectorResource, + ) -> None: + definition = "connector-definitions/redis" + + jsonschema.validate(vars(config), RedisConnector.definitions_jsonschema) + super().__init__(client, name, definition, vars(config)) + + +class RestAPIConnector(Connector): + """RestAPI Connector""" + + with open(f"{const.SPEC_PATH}/restapi_definitions.json", "r", encoding="utf8") as f: + definitions_jsonschema = json.loads(f.read()) + + def __init__( + self, + client: InstillClient, + name: str, + config: restapi.RESTAPIConnectorSpec, + ) -> None: + definition = "connector-definitions/restapi" + + jsonschema.validate(vars(config), RestAPIConnector.definitions_jsonschema) + super().__init__(client, name, definition, vars(config)) + + +class WebsiteConnector(Connector): + """Website Connector""" + + with open(f"{const.SPEC_PATH}/website_definitions.json", "r", encoding="utf8") as f: + definitions_jsonschema = json.loads(f.read()) + + def __init__( + self, + client: InstillClient, + name: str, + config: website.WebsiteConnectorResource, + ) -> None: + definition = "connector-definitions/website" + + jsonschema.validate(vars(config), WebsiteConnector.definitions_jsonschema) + super().__init__(client, name, definition, vars(config)) diff --git a/instill/resources/const.py b/instill/resources/const.py new file mode 100644 index 0000000..34d92f4 --- /dev/null +++ b/instill/resources/const.py @@ -0,0 +1,3 @@ +INSTILL_MODEL_INTERNAL_MODEL = "Internal Mode" +INSTILL_MODEL_EXTERNAL_MODEL = "External Mode" +SPEC_PATH = "instill/resources/schema/jsons" diff --git a/instill/resources/errors.py b/instill/resources/errors.py new file mode 100644 index 0000000..35c564e --- /dev/null +++ b/instill/resources/errors.py @@ -0,0 +1,3 @@ +class WrongModeException(Exception): + def __str__(self) -> str: + return "Instill Model Connector mode error" diff --git a/instill/resources/operator.py b/instill/resources/operator.py index c043c60..69157c8 100644 --- a/instill/resources/operator.py +++ b/instill/resources/operator.py @@ -1,20 +1,33 @@ # pylint: disable=no-member,wrong-import-position import instill.protogen.vdp.pipeline.v1beta.pipeline_pb2 as pipeline_pb +from instill.resources.schema import ( + end_task_end_input, + end_task_end_metadata, + start_task_start_metadata, +) -def create_start_operator(config: dict) -> pipeline_pb.Component: +def create_start_operator( + metadata: start_task_start_metadata.Model, +) -> pipeline_pb.Component: start_operator_component = pipeline_pb.Component() start_operator_component.id = "start" + start_operator_component.resource_name = "" start_operator_component.definition_name = "operator-definitions/start" - start_operator_component.configuration.update(config) + start_operator_component.configuration.update(metadata) # type: ignore return start_operator_component -def create_end_operator(config: dict) -> pipeline_pb.Component: +def create_end_operator( + inp: end_task_end_input.Input, + metadata: end_task_end_metadata.Model, +) -> pipeline_pb.Component: end_operator_component = pipeline_pb.Component() end_operator_component.id = "end" + end_operator_component.resource_name = "" end_operator_component.definition_name = "operator-definitions/end" - end_operator_component.configuration.update(config) + end_operator_component.configuration.update(inp) + end_operator_component.configuration.update(metadata) # type: ignore return end_operator_component diff --git a/instill/resources/schema/__init__.py b/instill/resources/schema/__init__.py new file mode 100644 index 0000000..e69de29 diff --git a/instill/resources/schema/airbyte/OAuth2.py b/instill/resources/schema/airbyte/OAuth2.py new file mode 100644 index 0000000..85ab8ce --- /dev/null +++ b/instill/resources/schema/airbyte/OAuth2.py @@ -0,0 +1,21 @@ +# generated by datamodel-codegen: +# filename: airbyte_definitions.json + +from __future__ import annotations + +from dataclasses import dataclass +from enum import Enum +from typing import Optional + + +class AuthType(Enum): + OAuth2_0 = 'OAuth2.0' + + +@dataclass +class Field0: + access_token: str + client_id: Optional[str] + client_secret: Optional[str] + refresh_token: str + auth_type: Optional[AuthType] = AuthType.OAuth2_0 diff --git a/instill/resources/schema/airbyte/__init__.py b/instill/resources/schema/airbyte/__init__.py new file mode 100644 index 0000000..8dc38d0 --- /dev/null +++ b/instill/resources/schema/airbyte/__init__.py @@ -0,0 +1,4182 @@ +# generated by datamodel-codegen: +# filename: airbyte_definitions.json + +from __future__ import annotations + +from dataclasses import dataclass, field +from enum import Enum +from typing import List, Optional, Union + +from . import OAuth2 + + +class AWSRegion(Enum): + """ + AWS Region of the SQS Queue + """ + + us_east_1 = 'us-east-1' + us_east_2 = 'us-east-2' + us_west_1 = 'us-west-1' + us_west_2 = 'us-west-2' + af_south_1 = 'af-south-1' + ap_east_1 = 'ap-east-1' + ap_south_1 = 'ap-south-1' + ap_northeast_1 = 'ap-northeast-1' + ap_northeast_2 = 'ap-northeast-2' + ap_northeast_3 = 'ap-northeast-3' + ap_southeast_1 = 'ap-southeast-1' + ap_southeast_2 = 'ap-southeast-2' + ca_central_1 = 'ca-central-1' + cn_north_1 = 'cn-north-1' + cn_northwest_1 = 'cn-northwest-1' + eu_central_1 = 'eu-central-1' + eu_north_1 = 'eu-north-1' + eu_south_1 = 'eu-south-1' + eu_west_1 = 'eu-west-1' + eu_west_2 = 'eu-west-2' + eu_west_3 = 'eu-west-3' + sa_east_1 = 'sa-east-1' + me_south_1 = 'me-south-1' + us_gov_east_1 = 'us-gov-east-1' + us_gov_west_1 = 'us-gov-west-1' + + +@dataclass +class Amazonsqs: + access_key: Optional[str] + destination: str + message_body_key: Optional[str] + message_delay: Optional[int] + message_group_id: Optional[str] + queue_url: str + region: AWSRegion + secret_key: Optional[str] + + +class CredentialsTitle(Enum): + """ + Name of the credentials + """ + + IAM_Role = 'IAM Role' + + +@dataclass +class IAMRole: + """ + Choose How to Authenticate to AWS. + """ + + credentials_title: CredentialsTitle + role_arn: str + + +class CredentialsTitle1(Enum): + """ + Name of the credentials + """ + + IAM_User = 'IAM User' + + +@dataclass +class IAMUser: + """ + Choose How to Authenticate to AWS. + """ + + aws_access_key_id: str + aws_secret_access_key: str + credentials_title: CredentialsTitle1 + + +class CompressionCodecOptional(Enum): + """ + The compression algorithm used to compress data. + """ + + UNCOMPRESSED = 'UNCOMPRESSED' + GZIP = 'GZIP' + + +class FormatType(Enum): + JSONL = 'JSONL' + + +@dataclass +class JSONLinesNewlineDelimitedJSON: + """ + Format of the data output. + """ + + format_type: FormatType + compression_codec: Optional[ + CompressionCodecOptional + ] = CompressionCodecOptional.UNCOMPRESSED + + +class CompressionCodecOptional1(Enum): + """ + The compression algorithm used to compress data. + """ + + UNCOMPRESSED = 'UNCOMPRESSED' + SNAPPY = 'SNAPPY' + GZIP = 'GZIP' + ZSTD = 'ZSTD' + + +class FormatType1(Enum): + Parquet = 'Parquet' + + +@dataclass +class ParquetColumnarStorage: + """ + Format of the data output. + """ + + format_type: FormatType1 + compression_codec: Optional[ + CompressionCodecOptional1 + ] = CompressionCodecOptional1.SNAPPY + + +class ChooseHowToPartitionData(Enum): + """ + Partition data by cursor fields when a cursor field is a date + """ + + NO_PARTITIONING = 'NO PARTITIONING' + DATE = 'DATE' + YEAR = 'YEAR' + MONTH = 'MONTH' + DAY = 'DAY' + YEAR_MONTH = 'YEAR/MONTH' + YEAR_MONTH_DAY = 'YEAR/MONTH/DAY' + + +class S3BucketRegion(Enum): + """ + The region of the S3 bucket. See here for all region codes. + """ + + field_ = '' + us_east_1 = 'us-east-1' + us_east_2 = 'us-east-2' + us_west_1 = 'us-west-1' + us_west_2 = 'us-west-2' + af_south_1 = 'af-south-1' + ap_east_1 = 'ap-east-1' + ap_south_1 = 'ap-south-1' + ap_northeast_1 = 'ap-northeast-1' + ap_northeast_2 = 'ap-northeast-2' + ap_northeast_3 = 'ap-northeast-3' + ap_southeast_1 = 'ap-southeast-1' + ap_southeast_2 = 'ap-southeast-2' + ca_central_1 = 'ca-central-1' + cn_north_1 = 'cn-north-1' + cn_northwest_1 = 'cn-northwest-1' + eu_central_1 = 'eu-central-1' + eu_north_1 = 'eu-north-1' + eu_south_1 = 'eu-south-1' + eu_west_1 = 'eu-west-1' + eu_west_2 = 'eu-west-2' + eu_west_3 = 'eu-west-3' + sa_east_1 = 'sa-east-1' + me_south_1 = 'me-south-1' + us_gov_east_1 = 'us-gov-east-1' + us_gov_west_1 = 'us-gov-west-1' + + +@dataclass +class Awsdatalake: + aws_account_id: Optional[str] + bucket_name: str + bucket_prefix: Optional[str] + credentials: Union[IAMRole, IAMUser] + destination: str + format: Optional[Union[JSONLinesNewlineDelimitedJSON, ParquetColumnarStorage]] + lakeformation_database_default_tag_key: Optional[str] + lakeformation_database_default_tag_values: Optional[str] + lakeformation_database_name: str + region: S3BucketRegion + glue_catalog_float_as_decimal: Optional[bool] = False + lakeformation_governed_tables: Optional[bool] = False + partitioning: Optional[ + ChooseHowToPartitionData + ] = ChooseHowToPartitionData.NO_PARTITIONING + + +class NormalizationFlattening(Enum): + """ + Whether the input json data should be normalized (flattened) in the output CSV. Please refer to docs for details. + """ + + No_flattening = 'No flattening' + Root_level_flattening = 'Root level flattening' + + +@dataclass +class CSVCommaSeparatedValues: + """ + Output data format + """ + + flattening: NormalizationFlattening + format_type: str + + +@dataclass +class JSONLinesNewlineDelimitedJSON1: + """ + Output data format + """ + + format_type: str + + +@dataclass +class Azureblobstorage: + azure_blob_storage_account_key: str + azure_blob_storage_account_name: str + azure_blob_storage_container_name: Optional[str] + destination: str + format: Union[CSVCommaSeparatedValues, JSONLinesNewlineDelimitedJSON1] + azure_blob_storage_endpoint_domain_name: Optional[str] = 'blob.core.windows.net' + azure_blob_storage_output_buffer_size: Optional[int] = 5 + azure_blob_storage_spill_size: Optional[int] = 500 + + +class DatasetLocation(Enum): + """ + The location of the dataset. Warning: Changes made after creation will not be applied. Read more here. + """ + + US = 'US' + EU = 'EU' + asia_east1 = 'asia-east1' + asia_east2 = 'asia-east2' + asia_northeast1 = 'asia-northeast1' + asia_northeast2 = 'asia-northeast2' + asia_northeast3 = 'asia-northeast3' + asia_south1 = 'asia-south1' + asia_south2 = 'asia-south2' + asia_southeast1 = 'asia-southeast1' + asia_southeast2 = 'asia-southeast2' + australia_southeast1 = 'australia-southeast1' + australia_southeast2 = 'australia-southeast2' + europe_central1 = 'europe-central1' + europe_central2 = 'europe-central2' + europe_north1 = 'europe-north1' + europe_southwest1 = 'europe-southwest1' + europe_west1 = 'europe-west1' + europe_west2 = 'europe-west2' + europe_west3 = 'europe-west3' + europe_west4 = 'europe-west4' + europe_west6 = 'europe-west6' + europe_west7 = 'europe-west7' + europe_west8 = 'europe-west8' + europe_west9 = 'europe-west9' + europe_west12 = 'europe-west12' + me_central1 = 'me-central1' + me_central2 = 'me-central2' + me_west1 = 'me-west1' + northamerica_northeast1 = 'northamerica-northeast1' + northamerica_northeast2 = 'northamerica-northeast2' + southamerica_east1 = 'southamerica-east1' + southamerica_west1 = 'southamerica-west1' + us_central1 = 'us-central1' + us_east1 = 'us-east1' + us_east2 = 'us-east2' + us_east3 = 'us-east3' + us_east4 = 'us-east4' + us_east5 = 'us-east5' + us_south1 = 'us-south1' + us_west1 = 'us-west1' + us_west2 = 'us-west2' + us_west3 = 'us-west3' + us_west4 = 'us-west4' + + +@dataclass +class HMACKey: + """ + An HMAC key is a type of credential and can be associated with a service account or a user account in Cloud Storage. Read more here. + """ + + credential_type: str + hmac_key_access_id: str + hmac_key_secret: str + + +class GCSTmpFilesAfterwardProcessing(Enum): + """ + This upload method is supposed to temporary store records in GCS bucket. By this select you can chose if these records should be removed from GCS when migration has finished. The default "Delete all tmp files from GCS" value is used if not set explicitly. + """ + + Delete_all_tmp_files_from_GCS = 'Delete all tmp files from GCS' + Keep_all_tmp_files_in_GCS = 'Keep all tmp files in GCS' + + +@dataclass +class GCSStaging: + """ + (recommended) Writes large batches of records to a file, uploads the file to GCS, then uses COPY INTO to load your data into BigQuery. Provides best-in-class speed, reliability and scalability. Read more about GCS Staging here. + """ + + credential: HMACKey + gcs_bucket_name: str + gcs_bucket_path: str + method: str + keep_files_in_gcs_bucket: Optional[ + GCSTmpFilesAfterwardProcessing + ] = GCSTmpFilesAfterwardProcessing.Delete_all_tmp_files_from_GCS + + +@dataclass +class StandardInserts: + """ + (not recommended) Direct loading using SQL INSERT statements. This method is extremely inefficient and provided only for quick testing. In all other cases, you should use GCS staging. + """ + + method: str + + +class TransformationQueryRunType(Enum): + """ + Interactive run type means that the query is executed as soon as possible, and these queries count towards concurrent rate limit and daily limit. Read more about interactive run type here. Batch queries are queued and started as soon as idle resources are available in the BigQuery shared resource pool, which usually occurs within a few minutes. Batch queries don’t count towards your concurrent rate limit. Read more about batch queries here. The default "interactive" value is used if not set explicitly. + """ + + interactive = 'interactive' + batch = 'batch' + + +@dataclass +class Bigquery: + credentials_json: Optional[str] + dataset_id: str + dataset_location: DatasetLocation + destination: str + loading_method: Optional[Union[GCSStaging, StandardInserts]] + project_id: str + raw_data_dataset: Optional[str] + big_query_client_buffer_size_mb: Optional[int] = 15 + disable_type_dedupe: Optional[bool] = False + transformation_priority: Optional[ + TransformationQueryRunType + ] = TransformationQueryRunType.interactive + + +@dataclass +class Cassandra: + address: str + destination: str + keyspace: str + password: str + port: int + username: str + datacenter: Optional[str] = 'datacenter1' + replication: Optional[int] = 1 + + +class Mode(Enum): + azure_openai = 'azure_openai' + + +@dataclass +class AzureOpenAI: + """ + Use the Azure-hosted OpenAI API to embed text. This option is using the text-embedding-ada-002 model with 1536 embedding dimensions. + """ + + api_base: str + deployment: str + mode: Mode + openai_key: str + + +class Mode1(Enum): + openai = 'openai' + + +@dataclass +class OpenAI: + """ + Use the OpenAI API to embed text. This option is using the text-embedding-ada-002 model with 1536 embedding dimensions. + """ + + mode: Mode1 + openai_key: str + + +class Mode2(Enum): + cohere = 'cohere' + + +@dataclass +class Cohere: + """ + Use the Cohere API to embed text. + """ + + cohere_key: str + mode: Mode2 + + +class Mode3(Enum): + from_field = 'from_field' + + +@dataclass +class FromField: + """ + Use a field in the record as the embedding. This is useful if you already have an embedding for your data and want to store it in the vector store. + """ + + dimensions: int + field_name: str + mode: Mode3 + + +class Mode4(Enum): + fake = 'fake' + + +@dataclass +class Fake: + """ + Use a fake embedding made out of random vectors with 1536 embedding dimensions. This is useful for testing the data pipeline without incurring any costs. + """ + + mode: Mode4 + + +class Mode5(Enum): + openai_compatible = 'openai_compatible' + + +@dataclass +class OpenAICompatible: + """ + Use a service that's compatible with the OpenAI API to embed text. + """ + + base_url: str + dimensions: int + mode: Mode5 + api_key: Optional[str] = '' + model_name: Optional[str] = 'text-embedding-ada-002' + + +class Mode6(Enum): + no_embedding = 'no_embedding' + + +@dataclass +class ChromaDefaultEmbeddingFunction: + """ + Do not calculate embeddings. Chromadb uses the sentence transfomer (https://www.sbert.net/index.html) as a default if an embedding function is not defined. Note that depending on your hardware, calculating embeddings locally can be very slow and is mostly suited for prototypes. + """ + + mode: Optional[Mode6] = Mode6.no_embedding + + +class Mode7(Enum): + persistent_client = 'persistent_client' + + +@dataclass +class PersistentClientMode: + """ + Configure Chroma to save and load from your local machine + """ + + path: str + mode: Optional[Mode7] = Mode7.persistent_client + + +class Mode8(Enum): + http_client = 'http_client' + + +@dataclass +class ClientServerMode: + """ + Authenticate using username and password (suitable for self-managed Chroma clusters) + """ + + host: str + port: int + ssl: bool + mode: Optional[Mode8] = Mode8.http_client + password: Optional[str] = '' + username: Optional[str] = '' + + +@dataclass +class Indexing: + """ + Indexing configuration + """ + + auth_method: Union[PersistentClientMode, ClientServerMode] + collection_name: str + + +@dataclass +class FieldNameMappingConfigModel: + from_field: str + to_field: str + + +class Mode9(Enum): + separator = 'separator' + + +@dataclass +class BySeparator: + """ + Split the text by the list of separators until the chunk size is reached, using the earlier mentioned separators where possible. This is useful for splitting text fields by paragraphs, sentences, words, etc. + """ + + mode: Mode9 + keep_separator: Optional[bool] = False + separators: Optional[List[str]] = field( + default_factory=lambda: ['"\\n\\n"', '"\\n"', '" "', '""'] + ) + + +class Mode10(Enum): + markdown = 'markdown' + + +@dataclass +class ByMarkdownHeader: + """ + Split the text by Markdown headers down to the specified header level. If the chunk size fits multiple sections, they will be combined into a single chunk. + """ + + mode: Mode10 + split_level: Optional[int] = 1 + + +class Language(Enum): + """ + Split code in suitable places based on the programming language + """ + + cpp = 'cpp' + go = 'go' + java = 'java' + js = 'js' + php = 'php' + proto = 'proto' + python = 'python' + rst = 'rst' + ruby = 'ruby' + rust = 'rust' + scala = 'scala' + swift = 'swift' + markdown = 'markdown' + latex = 'latex' + html = 'html' + sol = 'sol' + + +class Mode11(Enum): + code = 'code' + + +@dataclass +class ByProgrammingLanguage: + """ + Split the text by suitable delimiters based on the programming language. This is useful for splitting code into chunks. + """ + + language: Language + mode: Mode11 + + +@dataclass +class ProcessingConfigModel: + chunk_size: int + text_splitter: Optional[Union[BySeparator, ByMarkdownHeader, ByProgrammingLanguage]] + chunk_overlap: Optional[int] = 0 + field_name_mappings: Optional[List[FieldNameMappingConfigModel]] = field( + default_factory=lambda: [] + ) + metadata_fields: Optional[List[str]] = field(default_factory=lambda: []) + text_fields: Optional[List[str]] = field(default_factory=lambda: []) + + +@dataclass +class Chroma: + """ + The configuration model for the Vector DB based destinations. This model is used to generate the UI for the destination configuration, + as well as to provide type safety for the configuration passed to the destination. + + The configuration model is composed of four parts: + * Processing configuration + * Embedding configuration + * Indexing configuration + * Advanced configuration + + Processing, embedding and advanced configuration are provided by this base class, while the indexing configuration is provided by the destination connector in the sub class. + """ + + destination: str + embedding: Union[ + AzureOpenAI, + OpenAI, + Cohere, + FromField, + Fake, + OpenAICompatible, + ChromaDefaultEmbeddingFunction, + ] + indexing: Indexing + processing: ProcessingConfigModel + omit_raw_text: Optional[bool] = False + + +@dataclass +class NoTunnel: + """ + Whether to initiate an SSH tunnel before connecting to the database, and if so, which kind of authentication to use. + """ + + tunnel_method: str + + +@dataclass +class SSHKeyAuthentication: + """ + Whether to initiate an SSH tunnel before connecting to the database, and if so, which kind of authentication to use. + """ + + ssh_key: str + tunnel_host: str + tunnel_method: str + tunnel_port: int + tunnel_user: str + + +@dataclass +class PasswordAuthentication: + """ + Whether to initiate an SSH tunnel before connecting to the database, and if so, which kind of authentication to use. + """ + + tunnel_host: str + tunnel_method: str + tunnel_port: int + tunnel_user: str + tunnel_user_password: str + + +@dataclass +class Clickhouse: + database: str + destination: str + host: str + jdbc_url_params: Optional[str] + password: Optional[str] + port: int + tunnel_method: Optional[ + Union[NoTunnel, SSHKeyAuthentication, PasswordAuthentication] + ] + username: str + ssl: Optional[bool] = False + + +@dataclass +class Convex: + access_key: str + deployment_url: str + destination: str + + +@dataclass +class Comma: + """ + The character delimiting individual cells in the CSV data. + """ + + delimiter: str + + +@dataclass +class Semicolon: + """ + The character delimiting individual cells in the CSV data. + """ + + delimiter: str + + +@dataclass +class Pipe: + """ + The character delimiting individual cells in the CSV data. + """ + + delimiter: str + + +@dataclass +class Tab: + """ + The character delimiting individual cells in the CSV data. + """ + + delimiter: str + + +@dataclass +class Space: + """ + The character delimiting individual cells in the CSV data. + """ + + delimiter: str + + +@dataclass +class Csv: + delimiter_type: Optional[Union[Comma, Semicolon, Pipe, Tab, Space]] + destination: str + destination_path: str + + +@dataclass +class Cumulio: + api_host: str + api_key: str + api_token: str + destination: str + + +@dataclass +class Databend: + database: str + destination: str + host: str + password: Optional[str] + username: str + port: Optional[int] = 443 + table: Optional[str] = 'default' + + +@dataclass +class FieldRecommendedManagedTables: + """ + Storage on which the delta lake is built. + """ + + data_source_type: str + + +class S3BucketRegion1(Enum): + """ + The region of the S3 staging bucket to use if utilising a copy strategy. + """ + + field_ = '' + us_east_1 = 'us-east-1' + us_east_2 = 'us-east-2' + us_west_1 = 'us-west-1' + us_west_2 = 'us-west-2' + af_south_1 = 'af-south-1' + ap_east_1 = 'ap-east-1' + ap_south_1 = 'ap-south-1' + ap_northeast_1 = 'ap-northeast-1' + ap_northeast_2 = 'ap-northeast-2' + ap_northeast_3 = 'ap-northeast-3' + ap_southeast_1 = 'ap-southeast-1' + ap_southeast_2 = 'ap-southeast-2' + ca_central_1 = 'ca-central-1' + cn_north_1 = 'cn-north-1' + cn_northwest_1 = 'cn-northwest-1' + eu_central_1 = 'eu-central-1' + eu_north_1 = 'eu-north-1' + eu_south_1 = 'eu-south-1' + eu_west_1 = 'eu-west-1' + eu_west_2 = 'eu-west-2' + eu_west_3 = 'eu-west-3' + sa_east_1 = 'sa-east-1' + me_south_1 = 'me-south-1' + us_gov_east_1 = 'us-gov-east-1' + us_gov_west_1 = 'us-gov-west-1' + + +@dataclass +class AmazonS3: + """ + Storage on which the delta lake is built. + """ + + data_source_type: str + file_name_pattern: Optional[str] + s3_access_key_id: str + s3_bucket_name: str + s3_bucket_path: str + s3_bucket_region: S3BucketRegion1 + s3_secret_access_key: str + + +@dataclass +class AzureBlobStorage: + """ + Storage on which the delta lake is built. + """ + + azure_blob_storage_account_name: str + azure_blob_storage_container_name: str + azure_blob_storage_sas_token: str + data_source_type: str + azure_blob_storage_endpoint_domain_name: Optional[str] = 'blob.core.windows.net' + + +@dataclass +class Databricks: + accept_terms: bool + data_source: Union[FieldRecommendedManagedTables, AmazonS3, AzureBlobStorage] + database: Optional[str] + databricks_http_path: str + databricks_personal_access_token: str + databricks_server_hostname: str + destination: str + databricks_port: Optional[str] = '443' + enable_schema_evolution: Optional[bool] = False + purge_staging_data: Optional[bool] = True + schema_: Optional[str] = 'default' + + +@dataclass +class Doris: + database: str + destination: str + host: str + httpport: int + password: Optional[str] + queryport: int + username: str + + +@dataclass +class Duckdb: + destination: str + destination_path: str + motherduck_api_key: Optional[str] + schema_: Optional[str] + + +class DynamoDBRegion(Enum): + """ + The region of the DynamoDB. + """ + + field_ = '' + us_east_1 = 'us-east-1' + us_east_2 = 'us-east-2' + us_west_1 = 'us-west-1' + us_west_2 = 'us-west-2' + af_south_1 = 'af-south-1' + ap_east_1 = 'ap-east-1' + ap_south_1 = 'ap-south-1' + ap_northeast_1 = 'ap-northeast-1' + ap_northeast_2 = 'ap-northeast-2' + ap_northeast_3 = 'ap-northeast-3' + ap_southeast_1 = 'ap-southeast-1' + ap_southeast_2 = 'ap-southeast-2' + ca_central_1 = 'ca-central-1' + cn_north_1 = 'cn-north-1' + cn_northwest_1 = 'cn-northwest-1' + eu_central_1 = 'eu-central-1' + eu_north_1 = 'eu-north-1' + eu_south_1 = 'eu-south-1' + eu_west_1 = 'eu-west-1' + eu_west_2 = 'eu-west-2' + eu_west_3 = 'eu-west-3' + sa_east_1 = 'sa-east-1' + me_south_1 = 'me-south-1' + us_gov_east_1 = 'us-gov-east-1' + us_gov_west_1 = 'us-gov-west-1' + + +@dataclass +class Dynamodb: + access_key_id: str + destination: str + dynamodb_region: DynamoDBRegion + dynamodb_table_name_prefix: str + secret_access_key: str + dynamodb_endpoint: Optional[str] = '' + + +class LoggingType(Enum): + FirstN = 'FirstN' + + +@dataclass +class FirstNEntries: + """ + Log first N entries per stream. + """ + + logging_type: LoggingType + max_entry_count: float + + +class LoggingType1(Enum): + EveryNth = 'EveryNth' + + +@dataclass +class EveryNThEntry: + """ + For each stream, log every N-th entry with a maximum cap. + """ + + logging_type: LoggingType1 + max_entry_count: float + nth_entry_to_log: float + + +class LoggingType2(Enum): + RandomSampling = 'RandomSampling' + + +@dataclass +class RandomSampling: + """ + For each stream, randomly log a percentage of the entries with a maximum cap. + """ + + logging_type: LoggingType2 + max_entry_count: float + sampling_ratio: float + seed: Optional[float] + + +@dataclass +class Logging: + """ + The type of destination to be used + """ + + logging_config: Union[FirstNEntries, EveryNThEntry, RandomSampling] + test_destination_type: str + + +@dataclass +class Silent: + """ + The type of destination to be used + """ + + test_destination_type: str + + +@dataclass +class Throttled: + """ + The type of destination to be used + """ + + millis_per_record: int + test_destination_type: str + + +@dataclass +class Failing: + """ + The type of destination to be used + """ + + num_messages: int + test_destination_type: str + + +@dataclass +class E2etest: + destination: str + test_destination: Union[Logging, Silent, Throttled, Failing] + + +@dataclass +class None1: + """ + No authentication will be used + """ + + method: str + + +@dataclass +class ApiKeySecret: + """ + Use a api key and secret combination to authenticate + """ + + apiKeyId: str + apiKeySecret: str + method: str + + +@dataclass +class UsernamePassword: + """ + Basic auth header with a username and password + """ + + method: str + password: str + username: str + + +@dataclass +class Elasticsearch: + authenticationMethod: Optional[Union[None1, ApiKeySecret, UsernamePassword]] + ca_certificate: Optional[str] + destination: str + endpoint: str + tunnel_method: Optional[ + Union[NoTunnel, SSHKeyAuthentication, PasswordAuthentication] + ] + upsert: Optional[bool] = True + + +@dataclass +class Exasol: + certificateFingerprint: Optional[str] + destination: str + host: str + jdbc_url_params: Optional[str] + password: Optional[str] + port: int + schema_: str + username: str + + +@dataclass +class SQLInserts: + """ + Loading method used to select the way data will be uploaded to Firebolt + """ + + method: str + + +@dataclass +class ExternalTableViaS3: + """ + Loading method used to select the way data will be uploaded to Firebolt + """ + + aws_key_id: str + aws_key_secret: str + method: str + s3_bucket: str + s3_region: str + + +@dataclass +class Firebolt: + account: Optional[str] + database: str + destination: str + engine: Optional[str] + host: Optional[str] + loading_method: Optional[Union[SQLInserts, ExternalTableViaS3]] + password: str + username: str + + +@dataclass +class Firestore: + credentials_json: Optional[str] + destination: str + project_id: str + + +class CredentialType(Enum): + HMAC_KEY = 'HMAC_KEY' + + +@dataclass +class HMACKey1: + """ + An HMAC key is a type of credential and can be associated with a service account or a user account in Cloud Storage. Read more here. + """ + + credential_type: CredentialType + hmac_key_access_id: str + hmac_key_secret: str + + +class Codec(Enum): + no_compression = 'no compression' + + +@dataclass +class NoCompression: + """ + The compression algorithm used to compress data. Default to no compression. + """ + + codec: Codec + + +class Codec1(Enum): + Deflate = 'Deflate' + + +@dataclass +class Deflate: + """ + The compression algorithm used to compress data. Default to no compression. + """ + + codec: Codec1 + compression_level: Optional[int] = 0 + + +class Codec2(Enum): + bzip2 = 'bzip2' + + +@dataclass +class Bzip2: + """ + The compression algorithm used to compress data. Default to no compression. + """ + + codec: Codec2 + + +class Codec3(Enum): + xz = 'xz' + + +@dataclass +class Xz: + """ + The compression algorithm used to compress data. Default to no compression. + """ + + codec: Codec3 + compression_level: Optional[int] = 6 + + +class Codec4(Enum): + zstandard = 'zstandard' + + +@dataclass +class Zstandard: + """ + The compression algorithm used to compress data. Default to no compression. + """ + + codec: Codec4 + compression_level: Optional[int] = 3 + include_checksum: Optional[bool] = False + + +class Codec5(Enum): + snappy = 'snappy' + + +@dataclass +class Snappy: + """ + The compression algorithm used to compress data. Default to no compression. + """ + + codec: Codec5 + + +class FormatType2(Enum): + Avro = 'Avro' + + +@dataclass +class AvroApacheAvro: + """ + Output data format. One of the following formats must be selected - AVRO format, PARQUET format, CSV format, or JSONL format. + """ + + compression_codec: Union[NoCompression, Deflate, Bzip2, Xz, Zstandard, Snappy] + format_type: FormatType2 + + +class CompressionType(Enum): + No_Compression = 'No Compression' + + +@dataclass +class NoCompression1: + """ + Whether the output files should be compressed. If compression is selected, the output filename will have an extra extension (GZIP: ".csv.gz"). + """ + + compression_type: Optional[CompressionType] = CompressionType.No_Compression + + +class CompressionType1(Enum): + GZIP = 'GZIP' + + +@dataclass +class GZIP: + """ + Whether the output files should be compressed. If compression is selected, the output filename will have an extra extension (GZIP: ".csv.gz"). + """ + + compression_type: Optional[CompressionType1] = CompressionType1.GZIP + + +class Normalization(Enum): + """ + Whether the input JSON data should be normalized (flattened) in the output CSV. Please refer to docs for details. + """ + + No_flattening = 'No flattening' + Root_level_flattening = 'Root level flattening' + + +class FormatType3(Enum): + CSV = 'CSV' + + +@dataclass +class CSVCommaSeparatedValues1: + """ + Output data format. One of the following formats must be selected - AVRO format, PARQUET format, CSV format, or JSONL format. + """ + + compression: Optional[Union[NoCompression1, GZIP]] + format_type: FormatType3 + flattening: Optional[Normalization] = Normalization.No_flattening + + +class CompressionType2(Enum): + No_Compression = 'No Compression' + + +@dataclass +class NoCompression2: + """ + Whether the output files should be compressed. If compression is selected, the output filename will have an extra extension (GZIP: ".jsonl.gz"). + """ + + compression_type: Optional[CompressionType2] = CompressionType2.No_Compression + + +class CompressionType3(Enum): + GZIP = 'GZIP' + + +@dataclass +class GZIP1: + """ + Whether the output files should be compressed. If compression is selected, the output filename will have an extra extension (GZIP: ".jsonl.gz"). + """ + + compression_type: Optional[CompressionType3] = CompressionType3.GZIP + + +class FormatType4(Enum): + JSONL = 'JSONL' + + +@dataclass +class JSONLinesNewlineDelimitedJSON2: + """ + Output data format. One of the following formats must be selected - AVRO format, PARQUET format, CSV format, or JSONL format. + """ + + compression: Optional[Union[NoCompression2, GZIP1]] + format_type: FormatType4 + + +class CompressionCodec(Enum): + """ + The compression algorithm used to compress data pages. + """ + + UNCOMPRESSED = 'UNCOMPRESSED' + SNAPPY = 'SNAPPY' + GZIP = 'GZIP' + LZO = 'LZO' + BROTLI = 'BROTLI' + LZ4 = 'LZ4' + ZSTD = 'ZSTD' + + +class FormatType5(Enum): + Parquet = 'Parquet' + + +@dataclass +class ParquetColumnarStorage1: + """ + Output data format. One of the following formats must be selected - AVRO format, PARQUET format, CSV format, or JSONL format. + """ + + format_type: FormatType5 + block_size_mb: Optional[int] = 128 + compression_codec: Optional[CompressionCodec] = CompressionCodec.UNCOMPRESSED + dictionary_encoding: Optional[bool] = True + dictionary_page_size_kb: Optional[int] = 1024 + max_padding_size_mb: Optional[int] = 8 + page_size_kb: Optional[int] = 1024 + + +class GCSBucketRegion(Enum): + """ + Select a Region of the GCS Bucket. Read more here. + """ + + northamerica_northeast1 = 'northamerica-northeast1' + northamerica_northeast2 = 'northamerica-northeast2' + us_central1 = 'us-central1' + us_east1 = 'us-east1' + us_east4 = 'us-east4' + us_west1 = 'us-west1' + us_west2 = 'us-west2' + us_west3 = 'us-west3' + us_west4 = 'us-west4' + southamerica_east1 = 'southamerica-east1' + southamerica_west1 = 'southamerica-west1' + europe_central2 = 'europe-central2' + europe_north1 = 'europe-north1' + europe_west1 = 'europe-west1' + europe_west2 = 'europe-west2' + europe_west3 = 'europe-west3' + europe_west4 = 'europe-west4' + europe_west6 = 'europe-west6' + asia_east1 = 'asia-east1' + asia_east2 = 'asia-east2' + asia_northeast1 = 'asia-northeast1' + asia_northeast2 = 'asia-northeast2' + asia_northeast3 = 'asia-northeast3' + asia_south1 = 'asia-south1' + asia_south2 = 'asia-south2' + asia_southeast1 = 'asia-southeast1' + asia_southeast2 = 'asia-southeast2' + australia_southeast1 = 'australia-southeast1' + australia_southeast2 = 'australia-southeast2' + asia = 'asia' + eu = 'eu' + us = 'us' + asia1 = 'asia1' + eur4 = 'eur4' + nam4 = 'nam4' + + +@dataclass +class Gcs: + credential: HMACKey1 + destination: str + format: Union[ + AvroApacheAvro, + CSVCommaSeparatedValues1, + JSONLinesNewlineDelimitedJSON2, + ParquetColumnarStorage1, + ] + gcs_bucket_name: str + gcs_bucket_path: str + gcs_bucket_region: Optional[GCSBucketRegion] = GCSBucketRegion.us + + +@dataclass +class AuthenticationViaGoogleOAuth: + """ + Google API Credentials for connecting to Google Sheets and Google Drive APIs + """ + + client_id: str + client_secret: str + refresh_token: str + + +@dataclass +class Googlesheets: + credentials: AuthenticationViaGoogleOAuth + destination: str + spreadsheet_id: str + + +class CatalogType(Enum): + Hive = 'Hive' + + +@dataclass +class HiveCatalogUseApacheHiveMetaStore: + """ + Catalog config of Iceberg. + """ + + catalog_type: CatalogType + hive_thrift_uri: str + database: Optional[str] = 'default' + + +class CatalogType1(Enum): + Hadoop = 'Hadoop' + + +@dataclass +class HadoopCatalogUseHierarchicalFileSystemsAsSameAsStorageConfig: + """ + A Hadoop catalog doesn’t need to connect to a Hive MetaStore, but can only be used with HDFS or similar file systems that support atomic rename. + """ + + catalog_type: CatalogType1 + database: Optional[str] = 'default' + + +class CatalogType2(Enum): + Jdbc = 'Jdbc' + + +@dataclass +class JdbcCatalogUseRelationalDatabase: + """ + Using a table in a relational database to manage Iceberg tables through JDBC. Read more here. Supporting: PostgreSQL + """ + + catalog_type: CatalogType2 + jdbc_url: Optional[str] + password: Optional[str] + username: Optional[str] + catalog_schema: Optional[str] = 'public' + database: Optional[str] = 'public' + ssl: Optional[bool] = False + + +class CatalogType3(Enum): + Rest = 'Rest' + + +@dataclass +class RESTCatalog: + """ + The RESTCatalog connects to a REST server at the specified URI + """ + + catalog_type: CatalogType3 + rest_credential: Optional[str] + rest_token: Optional[str] + rest_uri: str + + +class FileStorageFormat(Enum): + Parquet = 'Parquet' + Avro = 'Avro' + + +@dataclass +class FileFormat: + """ + File format of Iceberg storage. + """ + + format: FileStorageFormat + auto_compact: Optional[bool] = False + compact_target_file_size_in_mb: Optional[int] = 100 + flush_batch_size: Optional[int] = 10000 + + +class S3BucketRegion2(Enum): + """ + The region of the S3 bucket. See here for all region codes. + """ + + field_ = '' + us_east_1 = 'us-east-1' + us_east_2 = 'us-east-2' + us_west_1 = 'us-west-1' + us_west_2 = 'us-west-2' + af_south_1 = 'af-south-1' + ap_east_1 = 'ap-east-1' + ap_south_1 = 'ap-south-1' + ap_northeast_1 = 'ap-northeast-1' + ap_northeast_2 = 'ap-northeast-2' + ap_northeast_3 = 'ap-northeast-3' + ap_southeast_1 = 'ap-southeast-1' + ap_southeast_2 = 'ap-southeast-2' + ca_central_1 = 'ca-central-1' + cn_north_1 = 'cn-north-1' + cn_northwest_1 = 'cn-northwest-1' + eu_central_1 = 'eu-central-1' + eu_north_1 = 'eu-north-1' + eu_south_1 = 'eu-south-1' + eu_west_1 = 'eu-west-1' + eu_west_2 = 'eu-west-2' + eu_west_3 = 'eu-west-3' + sa_east_1 = 'sa-east-1' + me_south_1 = 'me-south-1' + us_gov_east_1 = 'us-gov-east-1' + us_gov_west_1 = 'us-gov-west-1' + + +class StorageType(Enum): + S3 = 'S3' + + +@dataclass +class S3: + """ + S3 object storage + """ + + access_key_id: str + s3_warehouse_uri: str + secret_access_key: str + storage_type: StorageType + s3_bucket_region: Optional[S3BucketRegion2] = '' + s3_endpoint: Optional[str] = '' + s3_path_style_access: Optional[bool] = True + + +class StorageType1(Enum): + MANAGED = 'MANAGED' + + +@dataclass +class ServerManaged: + """ + Server-managed object storage + """ + + managed_warehouse_name: str + storage_type: StorageType1 + + +@dataclass +class Iceberg: + catalog_config: Union[ + HiveCatalogUseApacheHiveMetaStore, + HadoopCatalogUseHierarchicalFileSystemsAsSameAsStorageConfig, + JdbcCatalogUseRelationalDatabase, + RESTCatalog, + ] + destination: str + format_config: FileFormat + storage_config: Union[S3, ServerManaged] + + +class ACKs(Enum): + """ + The number of acknowledgments the producer requires the leader to have received before considering a request complete. This controls the durability of records that are sent. + """ + + field_0 = '0' + field_1 = '1' + all = 'all' + + +class ClientDNSLookup(Enum): + """ + Controls how the client uses DNS lookups. If set to use_all_dns_ips, connect to each returned IP address in sequence until a successful connection is established. After a disconnection, the next IP is used. Once all IPs have been used once, the client resolves the IP(s) from the hostname again. If set to resolve_canonical_bootstrap_servers_only, resolve each bootstrap address into a list of canonical names. After the bootstrap phase, this behaves the same as use_all_dns_ips. If set to default (deprecated), attempt to connect to the first IP address returned by the lookup, even if the lookup returns multiple IP addresses. + """ + + default = 'default' + use_all_dns_ips = 'use_all_dns_ips' + resolve_canonical_bootstrap_servers_only = ( + 'resolve_canonical_bootstrap_servers_only' + ) + use_all_dns_ips_1 = 'use_all_dns_ips' + + +class CompressionType4(Enum): + """ + The compression type for all data generated by the producer. + """ + + none = 'none' + gzip = 'gzip' + snappy = 'snappy' + lz4 = 'lz4' + zstd = 'zstd' + + +class SecurityProtocol(Enum): + PLAINTEXT = 'PLAINTEXT' + + +@dataclass +class PLAINTEXT: + """ + Protocol used to communicate with brokers. + """ + + security_protocol: SecurityProtocol + + +class SASLMechanism(Enum): + """ + SASL mechanism used for client connections. This may be any mechanism for which a security provider is available. + """ + + PLAIN = 'PLAIN' + + +class SecurityProtocol1(Enum): + SASL_PLAINTEXT = 'SASL_PLAINTEXT' + + +@dataclass +class SASLPLAINTEXT: + """ + Protocol used to communicate with brokers. + """ + + sasl_jaas_config: str + sasl_mechanism: SASLMechanism + security_protocol: SecurityProtocol1 + + +class SASLMechanism1(Enum): + """ + SASL mechanism used for client connections. This may be any mechanism for which a security provider is available. + """ + + GSSAPI = 'GSSAPI' + OAUTHBEARER = 'OAUTHBEARER' + SCRAM_SHA_256 = 'SCRAM-SHA-256' + SCRAM_SHA_512 = 'SCRAM-SHA-512' + PLAIN = 'PLAIN' + + +class SecurityProtocol2(Enum): + SASL_SSL = 'SASL_SSL' + + +@dataclass +class SASLSSL: + """ + Protocol used to communicate with brokers. + """ + + sasl_jaas_config: str + sasl_mechanism: SASLMechanism1 + security_protocol: SecurityProtocol2 + + +@dataclass +class Kafka: + acks: ACKs + batch_size: int + bootstrap_servers: str + buffer_memory: str + client_dns_lookup: ClientDNSLookup + client_id: Optional[str] + compression_type: CompressionType4 + delivery_timeout_ms: int + destination: str + enable_idempotence: bool + linger_ms: str + max_block_ms: str + max_in_flight_requests_per_connection: int + max_request_size: int + protocol: Union[PLAINTEXT, SASLPLAINTEXT, SASLSSL] + receive_buffer_bytes: int + request_timeout_ms: int + retries: int + send_buffer_bytes: int + socket_connection_setup_timeout_max_ms: str + socket_connection_setup_timeout_ms: str + test_topic: Optional[str] + topic_pattern: str + sync_producer: Optional[bool] = False + + +@dataclass +class Keen: + api_key: str + destination: str + project_id: str + infer_timestamp: Optional[bool] = True + + +@dataclass +class Kinesis: + accessKey: str + bufferSize: int + destination: str + endpoint: str + privateKey: str + region: str + shardCount: int + + +class Mode12(Enum): + openai = 'openai' + + +@dataclass +class OpenAI1: + """ + Use the OpenAI API to embed text. This option is using the text-embedding-ada-002 model with 1536 embedding dimensions. + """ + + openai_key: str + mode: Optional[Mode12] = Mode12.openai + + +class Mode13(Enum): + fake = 'fake' + + +@dataclass +class Fake1: + """ + Use a fake embedding made out of random vectors with 1536 embedding dimensions. This is useful for testing the data pipeline without incurring any costs. + """ + + mode: Optional[Mode13] = Mode13.fake + + +class Mode14(Enum): + pinecone = 'pinecone' + + +@dataclass +class Pinecone: + """ + Pinecone is a popular vector store that can be used to store and retrieve embeddings. It is a managed service and can also be queried from outside of langchain. + """ + + index: str + pinecone_environment: str + pinecone_key: str + mode: Optional[Mode14] = Mode14.pinecone + + +class Mode15(Enum): + DocArrayHnswSearch = 'DocArrayHnswSearch' + + +@dataclass +class DocArrayHnswSearch: + """ + DocArrayHnswSearch is a lightweight Document Index implementation provided by Docarray that runs fully locally and is best suited for small- to medium-sized datasets. It stores vectors on disk in hnswlib, and stores all other data in SQLite. + """ + + destination_path: str + mode: Optional[Mode15] = Mode15.DocArrayHnswSearch + + +class Mode16(Enum): + chroma_local = 'chroma_local' + + +@dataclass +class ChromaLocalPersistance: + """ + Chroma is a popular vector store that can be used to store and retrieve embeddings. It will build its index in memory and persist it to disk by the end of the sync. + """ + + destination_path: str + collection_name: Optional[str] = 'langchain' + mode: Optional[Mode16] = Mode16.chroma_local + + +@dataclass +class ProcessingConfigModel1: + chunk_size: int + text_fields: List[str] + chunk_overlap: Optional[int] = 0 + + +@dataclass +class Langchain: + destination: str + embedding: Union[OpenAI1, Fake1] + indexing: Union[Pinecone, DocArrayHnswSearch, ChromaLocalPersistance] + processing: ProcessingConfigModel1 + + +@dataclass +class Localjson: + destination: str + destination_path: str + + +@dataclass +class Mariadbcolumnstore: + database: str + destination: str + host: str + jdbc_url_params: Optional[str] + password: Optional[str] + port: int + tunnel_method: Optional[ + Union[NoTunnel, SSHKeyAuthentication, PasswordAuthentication] + ] + username: str + + +@dataclass +class Meilisearch: + api_key: Optional[str] + destination: str + host: str + + +class Mode17(Enum): + openai = 'openai' + + +@dataclass +class OpenAI2: + """ + Use the OpenAI API to embed text. This option is using the text-embedding-ada-002 model with 1536 embedding dimensions. + """ + + mode: Mode17 + openai_key: str + + +class Mode18(Enum): + cohere = 'cohere' + + +@dataclass +class Cohere1: + """ + Use the Cohere API to embed text. + """ + + cohere_key: str + mode: Mode18 + + +class Mode19(Enum): + fake = 'fake' + + +@dataclass +class Fake2: + """ + Use a fake embedding made out of random vectors with 1536 embedding dimensions. This is useful for testing the data pipeline without incurring any costs. + """ + + mode: Mode19 + + +class Mode20(Enum): + azure_openai = 'azure_openai' + + +@dataclass +class AzureOpenAI1: + """ + Use the Azure-hosted OpenAI API to embed text. This option is using the text-embedding-ada-002 model with 1536 embedding dimensions. + """ + + api_base: str + deployment: str + mode: Mode20 + openai_key: str + + +class Mode21(Enum): + openai_compatible = 'openai_compatible' + + +@dataclass +class OpenAICompatible1: + """ + Use a service that's compatible with the OpenAI API to embed text. + """ + + base_url: str + dimensions: int + mode: Mode21 + api_key: Optional[str] = '' + model_name: Optional[str] = 'text-embedding-ada-002' + + +class Mode22(Enum): + token = 'token' + + +@dataclass +class APIToken: + """ + Authenticate using an API token (suitable for Zilliz Cloud) + """ + + mode: Mode22 + token: str + + +class Mode23(Enum): + username_password = 'username_password' + + +@dataclass +class UsernamePassword1: + """ + Authenticate using username and password (suitable for self-managed Milvus clusters) + """ + + mode: Mode23 + password: str + username: str + + +class Mode24(Enum): + no_auth = 'no_auth' + + +@dataclass +class NoAuth: + """ + Do not authenticate (suitable for locally running test clusters, do not use for clusters with public IP addresses) + """ + + mode: Mode24 + + +@dataclass +class Indexing1: + """ + Indexing configuration + """ + + auth: Union[APIToken, UsernamePassword1, NoAuth] + collection: str + host: str + db: Optional[str] = '' + text_field: Optional[str] = 'text' + vector_field: Optional[str] = 'vector' + + +class Mode25(Enum): + separator = 'separator' + + +@dataclass +class BySeparator1: + """ + Split the text by the list of separators until the chunk size is reached, using the earlier mentioned separators where possible. This is useful for splitting text fields by paragraphs, sentences, words, etc. + """ + + mode: Mode25 + keep_separator: Optional[bool] = False + separators: Optional[List[str]] = field( + default_factory=lambda: ['"\\n\\n"', '"\\n"', '" "', '""'] + ) + + +class Mode26(Enum): + markdown = 'markdown' + + +@dataclass +class ByMarkdownHeader1: + """ + Split the text by Markdown headers down to the specified header level. If the chunk size fits multiple sections, they will be combined into a single chunk. + """ + + mode: Mode26 + split_level: Optional[int] = 1 + + +class Mode27(Enum): + code = 'code' + + +@dataclass +class ByProgrammingLanguage1: + """ + Split the text by suitable delimiters based on the programming language. This is useful for splitting code into chunks. + """ + + language: Language + mode: Mode27 + + +@dataclass +class ProcessingConfigModel2: + chunk_size: int + text_splitter: Optional[ + Union[BySeparator1, ByMarkdownHeader1, ByProgrammingLanguage1] + ] + chunk_overlap: Optional[int] = 0 + field_name_mappings: Optional[List[FieldNameMappingConfigModel]] = field( + default_factory=lambda: [] + ) + metadata_fields: Optional[List[str]] = field(default_factory=lambda: []) + text_fields: Optional[List[str]] = field(default_factory=lambda: []) + + +@dataclass +class Milvus: + """ + The configuration model for the Vector DB based destinations. This model is used to generate the UI for the destination configuration, + as well as to provide type safety for the configuration passed to the destination. + + The configuration model is composed of four parts: + * Processing configuration + * Embedding configuration + * Indexing configuration + * Advanced configuration + + Processing, embedding and advanced configuration are provided by this base class, while the indexing configuration is provided by the destination connector in the sub class. + """ + + destination: str + embedding: Union[OpenAI2, Cohere1, Fake2, AzureOpenAI1, OpenAICompatible1] + indexing: Indexing1 + processing: ProcessingConfigModel2 + omit_raw_text: Optional[bool] = False + + +@dataclass +class None_1: + """ + None. + """ + + authorization: str + + +@dataclass +class LoginPassword: + """ + Login/Password. + """ + + authorization: str + password: str + username: str + + +class Instance(Enum): + standalone = 'standalone' + + +@dataclass +class StandaloneMongoDbInstance: + """ + MongoDb instance to connect to. For MongoDB Atlas and Replica Set TLS connection is used by default. + """ + + host: str + instance: Instance + port: int + tls: Optional[bool] = False + + +class Instance1(Enum): + replica = 'replica' + + +@dataclass +class ReplicaSet: + """ + MongoDb instance to connect to. For MongoDB Atlas and Replica Set TLS connection is used by default. + """ + + instance: Instance1 + replica_set: Optional[str] + server_addresses: str + + +class Instance2(Enum): + atlas = 'atlas' + + +@dataclass +class MongoDBAtlas: + """ + MongoDb instance to connect to. For MongoDB Atlas and Replica Set TLS connection is used by default. + """ + + cluster_url: str + instance: Instance2 + + +@dataclass +class Mongodb: + auth_type: Union[None_1, LoginPassword] + database: str + destination: str + instance_type: Optional[Union[StandaloneMongoDbInstance, ReplicaSet, MongoDBAtlas]] + tunnel_method: Optional[ + Union[NoTunnel, SSHKeyAuthentication, PasswordAuthentication] + ] + + +class MessageQoS(Enum): + """ + Quality of service used for each message to be delivered. + """ + + AT_MOST_ONCE = 'AT_MOST_ONCE' + AT_LEAST_ONCE = 'AT_LEAST_ONCE' + EXACTLY_ONCE = 'EXACTLY_ONCE' + + +@dataclass +class Mqtt: + automatic_reconnect: bool + broker_host: str + broker_port: int + clean_session: bool + client: Optional[str] + connect_timeout: int + destination: str + message_qos: MessageQoS + message_retained: bool + password: Optional[str] + publisher_sync: bool + topic_pattern: str + topic_test: Optional[str] + use_tls: bool + username: Optional[str] + + +class SslMethod(Enum): + unencrypted = 'unencrypted' + + +@dataclass +class Unencrypted: + """ + The data transfer will not be encrypted. + """ + + ssl_method: SslMethod + + +class SslMethod1(Enum): + encrypted_trust_server_certificate = 'encrypted_trust_server_certificate' + + +@dataclass +class EncryptedTrustServerCertificate: + """ + Use the certificate provided by the server without verification. (For testing purposes only!) + """ + + ssl_method: SslMethod1 + + +class SslMethod2(Enum): + encrypted_verify_certificate = 'encrypted_verify_certificate' + + +@dataclass +class EncryptedVerifyCertificate: + """ + Verify and use the certificate provided by the server. + """ + + hostNameInCertificate: Optional[str] + ssl_method: SslMethod2 + + +@dataclass +class Mssql: + database: str + destination: str + host: str + jdbc_url_params: Optional[str] + password: Optional[str] + port: int + schema_: str + ssl_method: Optional[ + Union[Unencrypted, EncryptedTrustServerCertificate, EncryptedVerifyCertificate] + ] + tunnel_method: Optional[ + Union[NoTunnel, SSHKeyAuthentication, PasswordAuthentication] + ] + username: str + + +@dataclass +class Mysql: + database: str + destination: str + host: str + jdbc_url_params: Optional[str] + password: Optional[str] + port: int + tunnel_method: Optional[ + Union[NoTunnel, SSHKeyAuthentication, PasswordAuthentication] + ] + username: str + ssl: Optional[bool] = True + + +class EncryptionMethod(Enum): + unencrypted = 'unencrypted' + + +@dataclass +class Unencrypted1: + """ + Data transfer will not be encrypted. + """ + + encryption_method: EncryptionMethod + + +class EncryptionAlgorithm(Enum): + """ + This parameter defines the database encryption algorithm. + """ + + AES256 = 'AES256' + RC4_56 = 'RC4_56' + field_3DES168 = '3DES168' + + +class EncryptionMethod1(Enum): + client_nne = 'client_nne' + + +@dataclass +class NativeNetworkEncryptionNNE: + """ + The native network encryption gives you the ability to encrypt database connections, without the configuration overhead of TCP/IP and SSL/TLS and without the need to open and listen on different ports. + """ + + encryption_method: EncryptionMethod1 + encryption_algorithm: Optional[EncryptionAlgorithm] = EncryptionAlgorithm.AES256 + + +class EncryptionMethod2(Enum): + encrypted_verify_certificate = 'encrypted_verify_certificate' + + +@dataclass +class TLSEncryptedVerifyCertificate: + """ + Verify and use the certificate provided by the server. + """ + + encryption_method: EncryptionMethod2 + ssl_certificate: str + + +@dataclass +class Oracle: + destination: str + encryption: Optional[ + Union[Unencrypted1, NativeNetworkEncryptionNNE, TLSEncryptedVerifyCertificate] + ] + host: str + jdbc_url_params: Optional[str] + password: Optional[str] + port: int + sid: str + tunnel_method: Optional[ + Union[NoTunnel, SSHKeyAuthentication, PasswordAuthentication] + ] + username: str + schema_: Optional[str] = 'airbyte' + + +class Mode28(Enum): + openai = 'openai' + + +@dataclass +class OpenAI3: + """ + Use the OpenAI API to embed text. This option is using the text-embedding-ada-002 model with 1536 embedding dimensions. + """ + + mode: Mode28 + openai_key: str + + +class Mode29(Enum): + cohere = 'cohere' + + +@dataclass +class Cohere2: + """ + Use the Cohere API to embed text. + """ + + cohere_key: str + mode: Mode29 + + +class Mode30(Enum): + fake = 'fake' + + +@dataclass +class Fake3: + """ + Use a fake embedding made out of random vectors with 1536 embedding dimensions. This is useful for testing the data pipeline without incurring any costs. + """ + + mode: Mode30 + + +class Mode31(Enum): + azure_openai = 'azure_openai' + + +@dataclass +class AzureOpenAI2: + """ + Use the Azure-hosted OpenAI API to embed text. This option is using the text-embedding-ada-002 model with 1536 embedding dimensions. + """ + + api_base: str + deployment: str + mode: Mode31 + openai_key: str + + +class Mode32(Enum): + openai_compatible = 'openai_compatible' + + +@dataclass +class OpenAICompatible2: + """ + Use a service that's compatible with the OpenAI API to embed text. + """ + + base_url: str + dimensions: int + mode: Mode32 + api_key: Optional[str] = '' + model_name: Optional[str] = 'text-embedding-ada-002' + + +@dataclass +class Indexing2: + """ + Pinecone is a popular vector store that can be used to store and retrieve embeddings. + """ + + index: str + pinecone_environment: str + pinecone_key: str + + +class Mode33(Enum): + separator = 'separator' + + +@dataclass +class BySeparator2: + """ + Split the text by the list of separators until the chunk size is reached, using the earlier mentioned separators where possible. This is useful for splitting text fields by paragraphs, sentences, words, etc. + """ + + mode: Mode33 + keep_separator: Optional[bool] = False + separators: Optional[List[str]] = field( + default_factory=lambda: ['"\\n\\n"', '"\\n"', '" "', '""'] + ) + + +class Mode34(Enum): + markdown = 'markdown' + + +@dataclass +class ByMarkdownHeader2: + """ + Split the text by Markdown headers down to the specified header level. If the chunk size fits multiple sections, they will be combined into a single chunk. + """ + + mode: Mode34 + split_level: Optional[int] = 1 + + +class Mode35(Enum): + code = 'code' + + +@dataclass +class ByProgrammingLanguage2: + """ + Split the text by suitable delimiters based on the programming language. This is useful for splitting code into chunks. + """ + + language: Language + mode: Mode35 + + +@dataclass +class ProcessingConfigModel3: + chunk_size: int + text_splitter: Optional[ + Union[BySeparator2, ByMarkdownHeader2, ByProgrammingLanguage2] + ] + chunk_overlap: Optional[int] = 0 + field_name_mappings: Optional[List[FieldNameMappingConfigModel]] = field( + default_factory=lambda: [] + ) + metadata_fields: Optional[List[str]] = field(default_factory=lambda: []) + text_fields: Optional[List[str]] = field(default_factory=lambda: []) + + +@dataclass +class Pinecone1: + """ + The configuration model for the Vector DB based destinations. This model is used to generate the UI for the destination configuration, + as well as to provide type safety for the configuration passed to the destination. + + The configuration model is composed of four parts: + * Processing configuration + * Embedding configuration + * Indexing configuration + * Advanced configuration + + Processing, embedding and advanced configuration are provided by this base class, while the indexing configuration is provided by the destination connector in the sub class. + """ + + destination: str + embedding: Union[OpenAI3, Cohere2, Fake3, AzureOpenAI2, OpenAICompatible2] + indexing: Indexing2 + processing: ProcessingConfigModel3 + omit_raw_text: Optional[bool] = False + + +class Mode36(Enum): + disable = 'disable' + + +@dataclass +class Disable: + """ + Disable SSL. + """ + + mode: Mode36 + + +class Mode37(Enum): + allow = 'allow' + + +@dataclass +class Allow: + """ + Allow SSL mode. + """ + + mode: Mode37 + + +class Mode38(Enum): + prefer = 'prefer' + + +@dataclass +class Prefer: + """ + Prefer SSL mode. + """ + + mode: Mode38 + + +class Mode39(Enum): + require = 'require' + + +@dataclass +class Require: + """ + Require SSL mode. + """ + + mode: Mode39 + + +class Mode40(Enum): + verify_ca = 'verify-ca' + + +@dataclass +class VerifyCa: + """ + Verify-ca SSL mode. + """ + + ca_certificate: str + client_key_password: Optional[str] + mode: Mode40 + + +class Mode41(Enum): + verify_full = 'verify-full' + + +@dataclass +class VerifyFull: + """ + Verify-full SSL mode. + """ + + ca_certificate: str + client_certificate: str + client_key: str + client_key_password: Optional[str] + mode: Mode41 + + +@dataclass +class Postgres: + database: str + destination: str + host: str + jdbc_url_params: Optional[str] + password: Optional[str] + port: int + schema_: str + ssl_mode: Optional[Union[Disable, Allow, Prefer, Require, VerifyCa, VerifyFull]] + tunnel_method: Optional[ + Union[NoTunnel, SSHKeyAuthentication, PasswordAuthentication] + ] + username: str + ssl: Optional[bool] = False + + +@dataclass +class Pubsub: + batching_enabled: bool + credentials_json: str + destination: str + ordering_enabled: bool + project_id: str + topic_id: str + batching_delay_threshold: Optional[int] = 1 + batching_element_count_threshold: Optional[int] = 1 + batching_request_bytes_threshold: Optional[int] = 1 + + +class CompressionType5(Enum): + """ + Compression type for the producer. + """ + + NONE = 'NONE' + LZ4 = 'LZ4' + ZLIB = 'ZLIB' + ZSTD = 'ZSTD' + SNAPPY = 'SNAPPY' + + +class TopicType(Enum): + """ + It identifies type of topic. Pulsar supports two kind of topics: persistent and non-persistent. In persistent topic, all messages are durably persisted on disk (that means on multiple disks unless the broker is standalone), whereas non-persistent topic does not persist message into storage disk. + """ + + persistent = 'persistent' + non_persistent = 'non-persistent' + + +@dataclass +class Pulsar: + batching_enabled: bool + batching_max_messages: int + batching_max_publish_delay: int + block_if_queue_full: bool + brokers: str + compression_type: CompressionType5 + destination: str + max_pending_messages: int + max_pending_messages_across_partitions: int + producer_name: Optional[str] + send_timeout_ms: int + topic_namespace: str + topic_pattern: str + topic_tenant: str + topic_test: Optional[str] + topic_type: TopicType + use_tls: bool + producer_sync: Optional[bool] = False + + +class Mode42(Enum): + openai = 'openai' + + +@dataclass +class OpenAI4: + """ + Use the OpenAI API to embed text. This option is using the text-embedding-ada-002 model with 1536 embedding dimensions. + """ + + mode: Mode42 + openai_key: str + + +class Mode43(Enum): + cohere = 'cohere' + + +@dataclass +class Cohere3: + """ + Use the Cohere API to embed text. + """ + + cohere_key: str + mode: Mode43 + + +class Mode44(Enum): + fake = 'fake' + + +@dataclass +class Fake4: + """ + Use a fake embedding made out of random vectors with 1536 embedding dimensions. This is useful for testing the data pipeline without incurring any costs. + """ + + mode: Mode44 + + +class Mode45(Enum): + azure_openai = 'azure_openai' + + +@dataclass +class AzureOpenAI3: + """ + Use the Azure-hosted OpenAI API to embed text. This option is using the text-embedding-ada-002 model with 1536 embedding dimensions. + """ + + api_base: str + deployment: str + mode: Mode45 + openai_key: str + + +class Mode46(Enum): + openai_compatible = 'openai_compatible' + + +@dataclass +class OpenAICompatible3: + """ + Use a service that's compatible with the OpenAI API to embed text. + """ + + base_url: str + dimensions: int + mode: Mode46 + api_key: Optional[str] = '' + model_name: Optional[str] = 'text-embedding-ada-002' + + +class Mode47(Enum): + api_key_auth = 'api_key_auth' + + +@dataclass +class ApiKeyAuth: + """ + Method to authenticate with the Qdrant Instance + """ + + api_key: str + mode: Optional[Mode47] = Mode47.api_key_auth + + +class Mode48(Enum): + no_auth = 'no_auth' + + +@dataclass +class NoAuth1: + """ + Method to authenticate with the Qdrant Instance + """ + + mode: Optional[Mode48] = Mode48.no_auth + + +class DistanceMetric(Enum): + """ + The Distance metric used to measure similarities among vectors. This field is only used if the collection defined in the does not exist yet and is created automatically by the connector. + """ + + dot = 'dot' + cos = 'cos' + euc = 'euc' + + +@dataclass +class Indexing3: + """ + Indexing configuration + """ + + collection: str + url: str + auth_method: Optional[Union[ApiKeyAuth, NoAuth1]] = 'api_key_auth' + distance_metric: Optional[DistanceMetric] = DistanceMetric.cos + prefer_grpc: Optional[bool] = True + text_field: Optional[str] = 'text' + + +class Mode49(Enum): + separator = 'separator' + + +@dataclass +class BySeparator3: + """ + Split the text by the list of separators until the chunk size is reached, using the earlier mentioned separators where possible. This is useful for splitting text fields by paragraphs, sentences, words, etc. + """ + + mode: Mode49 + keep_separator: Optional[bool] = False + separators: Optional[List[str]] = field( + default_factory=lambda: ['"\\n\\n"', '"\\n"', '" "', '""'] + ) + + +class Mode50(Enum): + markdown = 'markdown' + + +@dataclass +class ByMarkdownHeader3: + """ + Split the text by Markdown headers down to the specified header level. If the chunk size fits multiple sections, they will be combined into a single chunk. + """ + + mode: Mode50 + split_level: Optional[int] = 1 + + +class Mode51(Enum): + code = 'code' + + +@dataclass +class ByProgrammingLanguage3: + """ + Split the text by suitable delimiters based on the programming language. This is useful for splitting code into chunks. + """ + + language: Language + mode: Mode51 + + +@dataclass +class ProcessingConfigModel4: + chunk_size: int + text_splitter: Optional[ + Union[BySeparator3, ByMarkdownHeader3, ByProgrammingLanguage3] + ] + chunk_overlap: Optional[int] = 0 + field_name_mappings: Optional[List[FieldNameMappingConfigModel]] = field( + default_factory=lambda: [] + ) + metadata_fields: Optional[List[str]] = field(default_factory=lambda: []) + text_fields: Optional[List[str]] = field(default_factory=lambda: []) + + +@dataclass +class Qdrant: + """ + The configuration model for the Vector DB based destinations. This model is used to generate the UI for the destination configuration, + as well as to provide type safety for the configuration passed to the destination. + + The configuration model is composed of four parts: + * Processing configuration + * Embedding configuration + * Indexing configuration + * Advanced configuration + + Processing, embedding and advanced configuration are provided by this base class, while the indexing configuration is provided by the destination connector in the sub class. + """ + + destination: str + embedding: Union[OpenAI4, Cohere3, Fake4, AzureOpenAI3, OpenAICompatible3] + indexing: Indexing3 + processing: ProcessingConfigModel4 + omit_raw_text: Optional[bool] = False + + +class Codec6(Enum): + no_compression = 'no compression' + + +@dataclass +class NoCompression3: + """ + The compression algorithm used to compress data. Default to no compression. + """ + + codec: Codec6 + + +class Codec7(Enum): + Deflate = 'Deflate' + + +@dataclass +class Deflate1: + """ + The compression algorithm used to compress data. Default to no compression. + """ + + codec: Codec7 + compression_level: int + + +class Codec8(Enum): + bzip2 = 'bzip2' + + +@dataclass +class Bzip21: + """ + The compression algorithm used to compress data. Default to no compression. + """ + + codec: Codec8 + + +class Codec9(Enum): + xz = 'xz' + + +@dataclass +class Xz1: + """ + The compression algorithm used to compress data. Default to no compression. + """ + + codec: Codec9 + compression_level: int + + +class Codec10(Enum): + zstandard = 'zstandard' + + +@dataclass +class Zstandard1: + """ + The compression algorithm used to compress data. Default to no compression. + """ + + codec: Codec10 + compression_level: int + include_checksum: Optional[bool] = False + + +class Codec11(Enum): + snappy = 'snappy' + + +@dataclass +class Snappy1: + """ + The compression algorithm used to compress data. Default to no compression. + """ + + codec: Codec11 + + +class FormatType6(Enum): + Avro = 'Avro' + + +@dataclass +class AvroApacheAvro1: + """ + Format of the data output. See here for more details + """ + + compression_codec: Union[NoCompression3, Deflate1, Bzip21, Xz1, Zstandard1, Snappy1] + format_type: FormatType6 + + +class CompressionType6(Enum): + No_Compression = 'No Compression' + + +@dataclass +class NoCompression4: + """ + Whether the output files should be compressed. If compression is selected, the output filename will have an extra extension (GZIP: ".csv.gz"). + """ + + compression_type: Optional[CompressionType6] = CompressionType6.No_Compression + + +class CompressionType7(Enum): + GZIP = 'GZIP' + + +@dataclass +class GZIP2: + """ + Whether the output files should be compressed. If compression is selected, the output filename will have an extra extension (GZIP: ".csv.gz"). + """ + + compression_type: Optional[CompressionType7] = CompressionType7.GZIP + + +class FormatType7(Enum): + CSV = 'CSV' + + +@dataclass +class CSVCommaSeparatedValues2: + """ + Format of the data output. See here for more details + """ + + compression: Optional[Union[NoCompression4, GZIP2]] + flattening: NormalizationFlattening + format_type: FormatType7 + + +class CompressionType8(Enum): + No_Compression = 'No Compression' + + +@dataclass +class NoCompression5: + """ + Whether the output files should be compressed. If compression is selected, the output filename will have an extra extension (GZIP: ".jsonl.gz"). + """ + + compression_type: Optional[CompressionType8] = CompressionType8.No_Compression + + +class CompressionType9(Enum): + GZIP = 'GZIP' + + +@dataclass +class GZIP3: + """ + Whether the output files should be compressed. If compression is selected, the output filename will have an extra extension (GZIP: ".jsonl.gz"). + """ + + compression_type: Optional[CompressionType9] = CompressionType9.GZIP + + +class FormatType8(Enum): + JSONL = 'JSONL' + + +@dataclass +class JSONLinesNewlineDelimitedJSON3: + """ + Format of the data output. See here for more details + """ + + compression: Optional[Union[NoCompression5, GZIP3]] + format_type: FormatType8 + + +@dataclass +class R2: + access_key_id: str + account_id: str + destination: str + file_name_pattern: Optional[str] + format: Union[ + AvroApacheAvro1, CSVCommaSeparatedValues2, JSONLinesNewlineDelimitedJSON3 + ] + s3_bucket_name: str + s3_bucket_path: str + s3_path_format: Optional[str] + secret_access_key: str + + +@dataclass +class Rabbitmq: + destination: str + exchange: Optional[str] + host: str + password: Optional[str] + port: Optional[int] + routing_key: str + username: Optional[str] + virtual_host: Optional[str] + ssl: Optional[bool] = True + + +class CacheType(Enum): + """ + Redis cache type to store data in. + """ + + hash = 'hash' + + +class Mode52(Enum): + disable = 'disable' + + +@dataclass +class Disable1: + """ + Disable SSL. + """ + + mode: Mode52 + + +class Mode53(Enum): + verify_full = 'verify-full' + + +@dataclass +class VerifyFull1: + """ + Verify-full SSL mode. + """ + + ca_certificate: str + client_certificate: str + client_key: str + client_key_password: Optional[str] + mode: Mode53 + + +@dataclass +class Redis: + cache_type: CacheType + destination: str + host: str + password: Optional[str] + port: int + ssl_mode: Optional[Union[Disable1, VerifyFull1]] + tunnel_method: Optional[ + Union[NoTunnel, SSHKeyAuthentication, PasswordAuthentication] + ] + username: str + ssl: Optional[bool] = False + + +class CompressionType10(Enum): + """ + The compression type for all data generated by the producer. + """ + + none = 'none' + gzip = 'gzip' + snappy = 'snappy' + lz4 = 'lz4' + zstd = 'zstd' + + +@dataclass +class Redpanda: + batch_size: int + bootstrap_servers: str + buffer_memory: str + compression_type: CompressionType10 + destination: str + retries: int + socket_connection_setup_timeout_max_ms: Optional[int] + socket_connection_setup_timeout_ms: Optional[int] + topic_num_partitions: Optional[int] + topic_replication_factor: Optional[int] + + +class EncryptionType(Enum): + none = 'none' + + +@dataclass +class NoEncryption: + """ + Staging data will be stored in plaintext. + """ + + encryption_type: EncryptionType + + +class EncryptionType1(Enum): + aes_cbc_envelope = 'aes_cbc_envelope' + + +@dataclass +class AESCBCEnvelopeEncryption: + """ + Staging data will be encrypted using AES-CBC envelope encryption. + """ + + encryption_type: EncryptionType1 + key_encrypting_key: Optional[str] + + +class S3BucketRegion3(Enum): + """ + The region of the S3 staging bucket. + """ + + field_ = '' + us_east_1 = 'us-east-1' + us_east_2 = 'us-east-2' + us_west_1 = 'us-west-1' + us_west_2 = 'us-west-2' + af_south_1 = 'af-south-1' + ap_east_1 = 'ap-east-1' + ap_south_1 = 'ap-south-1' + ap_northeast_1 = 'ap-northeast-1' + ap_northeast_2 = 'ap-northeast-2' + ap_northeast_3 = 'ap-northeast-3' + ap_southeast_1 = 'ap-southeast-1' + ap_southeast_2 = 'ap-southeast-2' + ca_central_1 = 'ca-central-1' + cn_north_1 = 'cn-north-1' + cn_northwest_1 = 'cn-northwest-1' + eu_central_1 = 'eu-central-1' + eu_north_1 = 'eu-north-1' + eu_south_1 = 'eu-south-1' + eu_west_1 = 'eu-west-1' + eu_west_2 = 'eu-west-2' + eu_west_3 = 'eu-west-3' + sa_east_1 = 'sa-east-1' + me_south_1 = 'me-south-1' + + +@dataclass +class AWSS3Staging: + """ + (recommended) Uploads data to S3 and then uses a COPY to insert the data into Redshift. COPY is recommended for production workloads for better speed and scalability. See AWS docs for more details. + """ + + access_key_id: str + file_name_pattern: Optional[str] + method: str + s3_bucket_name: str + s3_bucket_path: Optional[str] + s3_bucket_region: S3BucketRegion3 + secret_access_key: str + encryption: Optional[Union[NoEncryption, AESCBCEnvelopeEncryption]] = field( + default_factory=lambda: {'encryption_type': 'none'} + ) + file_buffer_count: Optional[int] = 10 + purge_staging_data: Optional[bool] = True + + +@dataclass +class Standard: + """ + (not recommended) Direct loading using SQL INSERT statements. This method is extremely inefficient and provided only for quick testing. In all other cases, you should use S3 uploading. + """ + + method: str + + +@dataclass +class Redshift: + database: str + destination: str + host: str + jdbc_url_params: Optional[str] + password: str + port: int + raw_data_schema: Optional[str] + schema_: str + tunnel_method: Optional[ + Union[NoTunnel, SSHKeyAuthentication, PasswordAuthentication] + ] + uploading_method: Optional[Union[AWSS3Staging, Standard]] + use_1s1t_format: Optional[bool] + username: str + + +@dataclass +class Rockset: + api_key: str + destination: str + workspace: str + api_server: Optional[str] = 'https://api.rs2.usw2.rockset.com' + + +class CompressionType11(Enum): + No_Compression = 'No Compression' + + +@dataclass +class NoCompression6: + """ + Whether the output files should be compressed. If compression is selected, the output filename will have an extra extension (GZIP: ".jsonl.gz"). + """ + + compression_type: Optional[CompressionType11] = CompressionType11.No_Compression + + +class CompressionType12(Enum): + GZIP = 'GZIP' + + +@dataclass +class GZIP4: + """ + Whether the output files should be compressed. If compression is selected, the output filename will have an extra extension (GZIP: ".jsonl.gz"). + """ + + compression_type: Optional[CompressionType12] = CompressionType12.GZIP + + +class Flattening(Enum): + """ + Whether the input json data should be normalized (flattened) in the output JSON Lines. Please refer to docs for details. + """ + + No_flattening = 'No flattening' + Root_level_flattening = 'Root level flattening' + + +@dataclass +class JSONLinesNewlineDelimitedJSON4: + """ + Format of the data output. See here for more details + """ + + compression: Optional[Union[NoCompression6, GZIP4]] + format_type: FormatType8 + flattening: Optional[Flattening] = Flattening.Root_level_flattening + + +class SerializationLibrary(Enum): + """ + The library that your query engine will use for reading and writing data in your lake. + """ + + org_openx_data_jsonserde_JsonSerDe = 'org.openx.data.jsonserde.JsonSerDe' + org_apache_hive_hcatalog_data_JsonSerDe = 'org.apache.hive.hcatalog.data.JsonSerDe' + + +class S3BucketRegion4(Enum): + """ + The region of the S3 bucket. See here for all region codes. + """ + + field_ = '' + us_east_1 = 'us-east-1' + us_east_2 = 'us-east-2' + us_west_1 = 'us-west-1' + us_west_2 = 'us-west-2' + af_south_1 = 'af-south-1' + ap_east_1 = 'ap-east-1' + ap_south_1 = 'ap-south-1' + ap_northeast_1 = 'ap-northeast-1' + ap_northeast_2 = 'ap-northeast-2' + ap_northeast_3 = 'ap-northeast-3' + ap_southeast_1 = 'ap-southeast-1' + ap_southeast_2 = 'ap-southeast-2' + ca_central_1 = 'ca-central-1' + cn_north_1 = 'cn-north-1' + cn_northwest_1 = 'cn-northwest-1' + eu_central_1 = 'eu-central-1' + eu_north_1 = 'eu-north-1' + eu_south_1 = 'eu-south-1' + eu_west_1 = 'eu-west-1' + eu_west_2 = 'eu-west-2' + eu_west_3 = 'eu-west-3' + sa_east_1 = 'sa-east-1' + me_south_1 = 'me-south-1' + us_gov_east_1 = 'us-gov-east-1' + us_gov_west_1 = 'us-gov-west-1' + + +@dataclass +class S3glue: + access_key_id: Optional[str] + destination: str + file_name_pattern: Optional[str] + format: JSONLinesNewlineDelimitedJSON4 + glue_database: str + glue_serialization_library: SerializationLibrary + s3_bucket_name: str + s3_bucket_path: str + s3_bucket_region: S3BucketRegion4 + s3_path_format: Optional[str] + secret_access_key: Optional[str] + s3_endpoint: Optional[str] = '' + + +class Codec12(Enum): + no_compression = 'no compression' + + +@dataclass +class NoCompression7: + """ + The compression algorithm used to compress data. Default to no compression. + """ + + codec: Codec12 + + +class Codec13(Enum): + Deflate = 'Deflate' + + +@dataclass +class Deflate2: + """ + The compression algorithm used to compress data. Default to no compression. + """ + + codec: Codec13 + compression_level: int + + +class Codec14(Enum): + bzip2 = 'bzip2' + + +@dataclass +class Bzip22: + """ + The compression algorithm used to compress data. Default to no compression. + """ + + codec: Codec14 + + +class Codec15(Enum): + xz = 'xz' + + +@dataclass +class Xz2: + """ + The compression algorithm used to compress data. Default to no compression. + """ + + codec: Codec15 + compression_level: int + + +class Codec16(Enum): + zstandard = 'zstandard' + + +@dataclass +class Zstandard2: + """ + The compression algorithm used to compress data. Default to no compression. + """ + + codec: Codec16 + compression_level: int + include_checksum: Optional[bool] = False + + +class Codec17(Enum): + snappy = 'snappy' + + +@dataclass +class Snappy2: + """ + The compression algorithm used to compress data. Default to no compression. + """ + + codec: Codec17 + + +class FormatType10(Enum): + Avro = 'Avro' + + +@dataclass +class AvroApacheAvro2: + """ + Format of the data output. See here for more details + """ + + compression_codec: Union[NoCompression7, Deflate2, Bzip22, Xz2, Zstandard2, Snappy2] + format_type: FormatType10 + + +class CompressionType13(Enum): + No_Compression = 'No Compression' + + +@dataclass +class NoCompression8: + """ + Whether the output files should be compressed. If compression is selected, the output filename will have an extra extension (GZIP: ".csv.gz"). + """ + + compression_type: Optional[CompressionType13] = CompressionType13.No_Compression + + +class CompressionType14(Enum): + GZIP = 'GZIP' + + +@dataclass +class GZIP5: + """ + Whether the output files should be compressed. If compression is selected, the output filename will have an extra extension (GZIP: ".csv.gz"). + """ + + compression_type: Optional[CompressionType14] = CompressionType14.GZIP + + +class Flattening1(Enum): + """ + Whether the input json data should be normalized (flattened) in the output CSV. Please refer to docs for details. + """ + + No_flattening = 'No flattening' + Root_level_flattening = 'Root level flattening' + + +class FormatType11(Enum): + CSV = 'CSV' + + +@dataclass +class CSVCommaSeparatedValues3: + """ + Format of the data output. See here for more details + """ + + compression: Optional[Union[NoCompression8, GZIP5]] + flattening: Flattening1 + format_type: FormatType11 + + +class CompressionType15(Enum): + No_Compression = 'No Compression' + + +@dataclass +class NoCompression9: + """ + Whether the output files should be compressed. If compression is selected, the output filename will have an extra extension (GZIP: ".jsonl.gz"). + """ + + compression_type: Optional[CompressionType15] = CompressionType15.No_Compression + + +class CompressionType16(Enum): + GZIP = 'GZIP' + + +@dataclass +class GZIP6: + """ + Whether the output files should be compressed. If compression is selected, the output filename will have an extra extension (GZIP: ".jsonl.gz"). + """ + + compression_type: Optional[CompressionType16] = CompressionType16.GZIP + + +class Flattening2(Enum): + """ + Whether the input json data should be normalized (flattened) in the output JSON Lines. Please refer to docs for details. + """ + + No_flattening = 'No flattening' + Root_level_flattening = 'Root level flattening' + + +class FormatType12(Enum): + JSONL = 'JSONL' + + +@dataclass +class JSONLinesNewlineDelimitedJSON5: + """ + Format of the data output. See here for more details + """ + + compression: Optional[Union[NoCompression9, GZIP6]] + format_type: FormatType12 + flattening: Optional[Flattening2] = Flattening2.No_flattening + + +class FormatType13(Enum): + Parquet = 'Parquet' + + +@dataclass +class ParquetColumnarStorage2: + """ + Format of the data output. See here for more details + """ + + format_type: FormatType13 + block_size_mb: Optional[int] = 128 + compression_codec: Optional[CompressionCodec] = CompressionCodec.UNCOMPRESSED + dictionary_encoding: Optional[bool] = True + dictionary_page_size_kb: Optional[int] = 1024 + max_padding_size_mb: Optional[int] = 8 + page_size_kb: Optional[int] = 1024 + + +@dataclass +class S31: + access_key_id: Optional[str] + destination: str + file_name_pattern: Optional[str] + format: Union[ + AvroApacheAvro2, + CSVCommaSeparatedValues3, + JSONLinesNewlineDelimitedJSON5, + ParquetColumnarStorage2, + ] + s3_bucket_name: str + s3_bucket_path: str + s3_bucket_region: S3BucketRegion4 + s3_path_format: Optional[str] + secret_access_key: Optional[str] + s3_endpoint: Optional[str] = '' + + +@dataclass +class Scylla: + address: str + destination: str + keyspace: str + password: str + port: int + username: str + replication: Optional[int] = 1 + + +@dataclass +class Selectdb: + cluster_name: str + database: str + destination: str + jdbc_url: str + load_url: str + password: str + user_name: str + + +@dataclass +class Sftpjson: + destination: str + destination_path: str + host: str + password: str + username: str + port: Optional[int] = 22 + + +class AuthType(Enum): + Key_Pair_Authentication = 'Key Pair Authentication' + + +@dataclass +class KeyPairAuthentication: + private_key: str + private_key_password: Optional[str] + auth_type: Optional[AuthType] = AuthType.Key_Pair_Authentication + + +class AuthType1(Enum): + Username_and_Password = 'Username and Password' + + +@dataclass +class UsernameAndPassword: + password: str + auth_type: Optional[AuthType1] = AuthType1.Username_and_Password + + +@dataclass +class Snowflake: + credentials: Optional[ + Union[OAuth2.Field0, KeyPairAuthentication, UsernameAndPassword] + ] + database: str + destination: str + host: str + jdbc_url_params: Optional[str] + raw_data_schema: Optional[str] + role: str + schema_: str + username: str + warehouse: str + disable_type_dedupe: Optional[bool] = False + + +@dataclass +class Sqlite: + destination: str + destination_path: str + + +class ObjectStoreType(Enum): + S3 = 'S3' + + +class S3BucketRegion6(Enum): + """ + The region of the S3 bucket. + """ + + ap_northeast_1 = 'ap-northeast-1' + ap_southeast_1 = 'ap-southeast-1' + ap_southeast_2 = 'ap-southeast-2' + ca_central_1 = 'ca-central-1' + eu_central_1 = 'eu-central-1' + eu_west_1 = 'eu-west-1' + eu_west_2 = 'eu-west-2' + eu_west_3 = 'eu-west-3' + us_east_1 = 'us-east-1' + us_east_2 = 'us-east-2' + us_west_1 = 'us-west-1' + us_west_2 = 'us-west-2' + + +@dataclass +class AmazonS31: + """ + Temporary storage on which temporary Iceberg table is created. + """ + + object_store_type: ObjectStoreType + s3_access_key_id: str + s3_bucket_name: str + s3_bucket_path: str + s3_bucket_region: S3BucketRegion6 + s3_secret_access_key: str + + +@dataclass +class Starburstgalaxy: + accept_terms: bool + catalog: str + destination: str + password: str + server_hostname: str + staging_object_store: AmazonS31 + username: str + catalog_schema: Optional[str] = 'public' + port: Optional[str] = '443' + purge_staging_table: Optional[bool] = True + + +class Mode54(Enum): + disable = 'disable' + + +@dataclass +class Disable2: + """ + Disable SSL. + """ + + mode: Mode54 + + +class Mode55(Enum): + allow = 'allow' + + +@dataclass +class Allow1: + """ + Allow SSL mode. + """ + + mode: Mode55 + + +class Mode56(Enum): + prefer = 'prefer' + + +@dataclass +class Prefer1: + """ + Prefer SSL mode. + """ + + mode: Mode56 + + +class Mode57(Enum): + require = 'require' + + +@dataclass +class Require1: + """ + Require SSL mode. + """ + + mode: Mode57 + + +class Mode58(Enum): + verify_ca = 'verify-ca' + + +@dataclass +class VerifyCa1: + """ + Verify-ca SSL mode. + """ + + mode: Mode58 + ssl_ca_certificate: str + + +class Mode59(Enum): + verify_full = 'verify-full' + + +@dataclass +class VerifyFull2: + """ + Verify-full SSL mode. + """ + + mode: Mode59 + ssl_ca_certificate: str + + +@dataclass +class Teradata: + destination: str + host: str + jdbc_url_params: Optional[str] + password: Optional[str] + ssl_mode: Optional[ + Union[Disable2, Allow1, Prefer1, Require1, VerifyCa1, VerifyFull2] + ] + username: str + schema_: Optional[str] = 'airbyte_td' + ssl: Optional[bool] = False + + +@dataclass +class Tidb: + database: str + destination: str + host: str + jdbc_url_params: Optional[str] + port: int + tunnel_method: Optional[ + Union[NoTunnel, SSHKeyAuthentication, PasswordAuthentication] + ] + username: str + password: Optional[str] = '' + ssl: Optional[bool] = False + + +@dataclass +class Timeplus: + apikey: str + destination: str + endpoint: str + + +@dataclass +class Typesense: + api_key: str + batch_size: Optional[int] + destination: str + host: str + port: Optional[str] + protocol: Optional[str] + + +@dataclass +class Vertica: + database: str + destination: str + host: str + jdbc_url_params: Optional[str] + password: Optional[str] + port: int + schema_: str + tunnel_method: Optional[ + Union[NoTunnel, SSHKeyAuthentication, PasswordAuthentication] + ] + username: str + + +class Mode60(Enum): + no_embedding = 'no_embedding' + + +@dataclass +class NoExternalEmbedding: + """ + Do not calculate and pass embeddings to Weaviate. Suitable for clusters with configured vectorizers to calculate embeddings within Weaviate or for classes that should only support regular text search. + """ + + mode: Mode60 + + +class Mode61(Enum): + azure_openai = 'azure_openai' + + +@dataclass +class AzureOpenAI4: + """ + Use the Azure-hosted OpenAI API to embed text. This option is using the text-embedding-ada-002 model with 1536 embedding dimensions. + """ + + api_base: str + deployment: str + mode: Mode61 + openai_key: str + + +class Mode62(Enum): + openai = 'openai' + + +@dataclass +class OpenAI5: + """ + Use the OpenAI API to embed text. This option is using the text-embedding-ada-002 model with 1536 embedding dimensions. + """ + + mode: Mode62 + openai_key: str + + +class Mode63(Enum): + cohere = 'cohere' + + +@dataclass +class Cohere4: + """ + Use the Cohere API to embed text. + """ + + cohere_key: str + mode: Mode63 + + +class Mode64(Enum): + from_field = 'from_field' + + +@dataclass +class FromField1: + """ + Use a field in the record as the embedding. This is useful if you already have an embedding for your data and want to store it in the vector store. + """ + + dimensions: int + field_name: str + mode: Mode64 + + +class Mode65(Enum): + fake = 'fake' + + +@dataclass +class Fake5: + """ + Use a fake embedding made out of random vectors with 1536 embedding dimensions. This is useful for testing the data pipeline without incurring any costs. + """ + + mode: Mode65 + + +class Mode66(Enum): + openai_compatible = 'openai_compatible' + + +@dataclass +class OpenAICompatible4: + """ + Use a service that's compatible with the OpenAI API to embed text. + """ + + base_url: str + dimensions: int + mode: Mode66 + api_key: Optional[str] = '' + model_name: Optional[str] = 'text-embedding-ada-002' + + +@dataclass +class Header: + header_key: str + value: str + + +class Mode67(Enum): + token = 'token' + + +@dataclass +class APIToken1: + """ + Authenticate using an API token (suitable for Weaviate Cloud) + """ + + mode: Mode67 + token: str + + +class Mode68(Enum): + username_password = 'username_password' + + +@dataclass +class UsernamePassword2: + """ + Authenticate using username and password (suitable for self-managed Weaviate clusters) + """ + + mode: Mode68 + password: str + username: str + + +class Mode69(Enum): + no_auth = 'no_auth' + + +@dataclass +class NoAuthentication: + """ + Do not authenticate (suitable for locally running test clusters, do not use for clusters with public IP addresses) + """ + + mode: Mode69 + + +class DefaultVectorizer(Enum): + """ + The vectorizer to use if new classes need to be created + """ + + none = 'none' + text2vec_cohere = 'text2vec-cohere' + text2vec_huggingface = 'text2vec-huggingface' + text2vec_openai = 'text2vec-openai' + text2vec_palm = 'text2vec-palm' + text2vec_contextionary = 'text2vec-contextionary' + text2vec_transformers = 'text2vec-transformers' + text2vec_gpt4all = 'text2vec-gpt4all' + + +@dataclass +class Indexing4: + """ + Indexing configuration + """ + + auth: Union[APIToken1, UsernamePassword2, NoAuthentication] + host: str + additional_headers: Optional[List[Header]] = field(default_factory=lambda: []) + batch_size: Optional[int] = 128 + default_vectorizer: Optional[DefaultVectorizer] = DefaultVectorizer.none + text_field: Optional[str] = 'text' + + +class Mode70(Enum): + separator = 'separator' + + +@dataclass +class BySeparator4: + """ + Split the text by the list of separators until the chunk size is reached, using the earlier mentioned separators where possible. This is useful for splitting text fields by paragraphs, sentences, words, etc. + """ + + mode: Mode70 + keep_separator: Optional[bool] = False + separators: Optional[List[str]] = field( + default_factory=lambda: ['"\\n\\n"', '"\\n"', '" "', '""'] + ) + + +class Mode71(Enum): + markdown = 'markdown' + + +@dataclass +class ByMarkdownHeader4: + """ + Split the text by Markdown headers down to the specified header level. If the chunk size fits multiple sections, they will be combined into a single chunk. + """ + + mode: Mode71 + split_level: Optional[int] = 1 + + +class Mode72(Enum): + code = 'code' + + +@dataclass +class ByProgrammingLanguage4: + """ + Split the text by suitable delimiters based on the programming language. This is useful for splitting code into chunks. + """ + + language: Language + mode: Mode72 + + +@dataclass +class ProcessingConfigModel5: + chunk_size: int + text_splitter: Optional[ + Union[BySeparator4, ByMarkdownHeader4, ByProgrammingLanguage4] + ] + chunk_overlap: Optional[int] = 0 + field_name_mappings: Optional[List[FieldNameMappingConfigModel]] = field( + default_factory=lambda: [] + ) + metadata_fields: Optional[List[str]] = field(default_factory=lambda: []) + text_fields: Optional[List[str]] = field(default_factory=lambda: []) + + +@dataclass +class Weaviate: + """ + The configuration model for the Vector DB based destinations. This model is used to generate the UI for the destination configuration, + as well as to provide type safety for the configuration passed to the destination. + + The configuration model is composed of four parts: + * Processing configuration + * Embedding configuration + * Indexing configuration + * Advanced configuration + + Processing, embedding and advanced configuration are provided by this base class, while the indexing configuration is provided by the destination connector in the sub class. + """ + + destination: str + embedding: Union[ + NoExternalEmbedding, + AzureOpenAI4, + OpenAI5, + Cohere4, + FromField1, + Fake5, + OpenAICompatible4, + ] + indexing: Indexing4 + processing: ProcessingConfigModel5 + omit_raw_text: Optional[bool] = False + + +@dataclass +class Xata: + api_key: str + db_url: str + destination: str + + +@dataclass +class Yugabytedb: + database: str + destination: str + host: str + jdbc_url_params: Optional[str] + password: Optional[str] + port: int + schema_: str + username: str + + +@dataclass +class Airbytedevmatecloud: + destination: str + privateKey: str + streamId: str + + +Destination = Union[ + Amazonsqs, + Awsdatalake, + Azureblobstorage, + Bigquery, + Cassandra, + Chroma, + Clickhouse, + Convex, + Csv, + Cumulio, + Databend, + Databricks, + Doris, + Duckdb, + Dynamodb, + E2etest, + Elasticsearch, + Exasol, + Firebolt, + Firestore, + Gcs, + Googlesheets, + Iceberg, + Kafka, + Keen, + Kinesis, + Langchain, + Localjson, + Mariadbcolumnstore, + Meilisearch, + Milvus, + Mongodb, + Mqtt, + Mssql, + Mysql, + Oracle, + Pinecone1, + Postgres, + Pubsub, + Pulsar, + Qdrant, + R2, + Rabbitmq, + Redis, + Redpanda, + Redshift, + Rockset, + S3glue, + S31, + Scylla, + Selectdb, + Sftpjson, + Snowflake, + Sqlite, + Starburstgalaxy, + Teradata, + Tidb, + Timeplus, + Typesense, + Vertica, + Weaviate, + Xata, + Yugabytedb, + Airbytedevmatecloud, +] diff --git a/instill/resources/schema/airbyte_task_write_destination_input.py b/instill/resources/schema/airbyte_task_write_destination_input.py new file mode 100644 index 0000000..f7345eb --- /dev/null +++ b/instill/resources/schema/airbyte_task_write_destination_input.py @@ -0,0 +1,12 @@ +# generated by datamodel-codegen: +# filename: airbyte_task_write_destination_input.json + +from __future__ import annotations + +from dataclasses import dataclass +from typing import Any, Dict + + +@dataclass +class Input: + data: Dict[str, Any] diff --git a/instill/resources/schema/airbyte_task_write_destination_output.py b/instill/resources/schema/airbyte_task_write_destination_output.py new file mode 100644 index 0000000..9fc860f --- /dev/null +++ b/instill/resources/schema/airbyte_task_write_destination_output.py @@ -0,0 +1,11 @@ +# generated by datamodel-codegen: +# filename: airbyte_task_write_destination_output.json + +from __future__ import annotations + +from dataclasses import dataclass + + +@dataclass +class Output: + pass diff --git a/instill/resources/schema/base64_task_decode_input.py b/instill/resources/schema/base64_task_decode_input.py new file mode 100644 index 0000000..190cc83 --- /dev/null +++ b/instill/resources/schema/base64_task_decode_input.py @@ -0,0 +1,15 @@ +# generated by datamodel-codegen: +# filename: base64_task_decode_input.json + +from __future__ import annotations + +from dataclasses import dataclass + + +@dataclass +class Input: + """ + Input + """ + + data: str diff --git a/instill/resources/schema/base64_task_decode_output.py b/instill/resources/schema/base64_task_decode_output.py new file mode 100644 index 0000000..097802a --- /dev/null +++ b/instill/resources/schema/base64_task_decode_output.py @@ -0,0 +1,15 @@ +# generated by datamodel-codegen: +# filename: base64_task_decode_output.json + +from __future__ import annotations + +from dataclasses import dataclass + + +@dataclass +class Output: + """ + Output + """ + + data: str diff --git a/instill/resources/schema/base64_task_encode_input.py b/instill/resources/schema/base64_task_encode_input.py new file mode 100644 index 0000000..243644e --- /dev/null +++ b/instill/resources/schema/base64_task_encode_input.py @@ -0,0 +1,15 @@ +# generated by datamodel-codegen: +# filename: base64_task_encode_input.json + +from __future__ import annotations + +from dataclasses import dataclass + + +@dataclass +class Input: + """ + Input + """ + + data: str diff --git a/instill/resources/schema/base64_task_encode_output.py b/instill/resources/schema/base64_task_encode_output.py new file mode 100644 index 0000000..30d8927 --- /dev/null +++ b/instill/resources/schema/base64_task_encode_output.py @@ -0,0 +1,15 @@ +# generated by datamodel-codegen: +# filename: base64_task_encode_output.json + +from __future__ import annotations + +from dataclasses import dataclass + + +@dataclass +class Output: + """ + Output + """ + + data: str diff --git a/instill/resources/schema/bigquery.py b/instill/resources/schema/bigquery.py new file mode 100644 index 0000000..56e579a --- /dev/null +++ b/instill/resources/schema/bigquery.py @@ -0,0 +1,14 @@ +# generated by datamodel-codegen: +# filename: bigquery_definitions.json + +from __future__ import annotations + +from dataclasses import dataclass + + +@dataclass +class BigQueryConnectorSpec: + dataset_id: str + json_key: str + project_id: str + table_name: str diff --git a/instill/resources/schema/bigquery_task_insert_input.py b/instill/resources/schema/bigquery_task_insert_input.py new file mode 100644 index 0000000..5b02678 --- /dev/null +++ b/instill/resources/schema/bigquery_task_insert_input.py @@ -0,0 +1,12 @@ +# generated by datamodel-codegen: +# filename: bigquery_task_insert_input.json + +from __future__ import annotations + +from dataclasses import dataclass +from typing import Any, Dict + + +@dataclass +class Input: + data: Dict[str, Any] diff --git a/instill/resources/schema/bigquery_task_insert_output.py b/instill/resources/schema/bigquery_task_insert_output.py new file mode 100644 index 0000000..16cb1f7 --- /dev/null +++ b/instill/resources/schema/bigquery_task_insert_output.py @@ -0,0 +1,11 @@ +# generated by datamodel-codegen: +# filename: bigquery_task_insert_output.json + +from __future__ import annotations + +from dataclasses import dataclass + + +@dataclass +class Output: + status: str diff --git a/instill/resources/schema/end_task_end_input.py b/instill/resources/schema/end_task_end_input.py new file mode 100644 index 0000000..dbfb817 --- /dev/null +++ b/instill/resources/schema/end_task_end_input.py @@ -0,0 +1,8 @@ +# generated by datamodel-codegen: +# filename: end_task_end_input.json + +from __future__ import annotations + +from typing import Any, Dict + +Input = Dict[str, Any] diff --git a/instill/resources/schema/end_task_end_metadata.py b/instill/resources/schema/end_task_end_metadata.py new file mode 100644 index 0000000..beef0b1 --- /dev/null +++ b/instill/resources/schema/end_task_end_metadata.py @@ -0,0 +1,16 @@ +# generated by datamodel-codegen: +# filename: end_task_end_metadata.json + +from __future__ import annotations + +from dataclasses import dataclass +from typing import Dict, Optional + + +@dataclass +class Model1: + description: Optional[str] + title: Optional[str] + + +Model = Dict[str, Model1] diff --git a/instill/resources/schema/end_task_end_output.py b/instill/resources/schema/end_task_end_output.py new file mode 100644 index 0000000..0b0d699 --- /dev/null +++ b/instill/resources/schema/end_task_end_output.py @@ -0,0 +1,13 @@ +# generated by datamodel-codegen: +# filename: end_task_end_output.json + +from __future__ import annotations + +from dataclasses import dataclass + + +@dataclass +class Output: + """ + Output + """ diff --git a/instill/resources/schema/googlecloudstorage.py b/instill/resources/schema/googlecloudstorage.py new file mode 100644 index 0000000..69ea5a1 --- /dev/null +++ b/instill/resources/schema/googlecloudstorage.py @@ -0,0 +1,12 @@ +# generated by datamodel-codegen: +# filename: googlecloudstorage_definitions.json + +from __future__ import annotations + +from dataclasses import dataclass + + +@dataclass +class GoogleCloudStorageConnectorSpec: + bucket_name: str + json_key: str diff --git a/instill/resources/schema/googlecloudstorage_task_upload_input.py b/instill/resources/schema/googlecloudstorage_task_upload_input.py new file mode 100644 index 0000000..980949b --- /dev/null +++ b/instill/resources/schema/googlecloudstorage_task_upload_input.py @@ -0,0 +1,12 @@ +# generated by datamodel-codegen: +# filename: googlecloudstorage_task_upload_input.json + +from __future__ import annotations + +from dataclasses import dataclass + + +@dataclass +class Input: + data: str + object_name: str diff --git a/instill/resources/schema/googlecloudstorage_task_upload_output.py b/instill/resources/schema/googlecloudstorage_task_upload_output.py new file mode 100644 index 0000000..37df315 --- /dev/null +++ b/instill/resources/schema/googlecloudstorage_task_upload_output.py @@ -0,0 +1,16 @@ +# generated by datamodel-codegen: +# filename: googlecloudstorage_task_upload_output.json + +from __future__ import annotations + +from dataclasses import dataclass +from typing import Optional + + +@dataclass +class Output: + authenticated_url: Optional[str] + gsutil_uri: Optional[str] + public_access: Optional[bool] + public_url: Optional[str] + status: str diff --git a/instill/resources/schema/googlesearch.py b/instill/resources/schema/googlesearch.py new file mode 100644 index 0000000..3418aab --- /dev/null +++ b/instill/resources/schema/googlesearch.py @@ -0,0 +1,12 @@ +# generated by datamodel-codegen: +# filename: googlesearch_definitions.json + +from __future__ import annotations + +from dataclasses import dataclass + + +@dataclass +class GoogleSearchConnectorSpec: + api_key: str + cse_id: str diff --git a/instill/resources/schema/googlesearch_task_search_input.py b/instill/resources/schema/googlesearch_task_search_input.py new file mode 100644 index 0000000..043a796 --- /dev/null +++ b/instill/resources/schema/googlesearch_task_search_input.py @@ -0,0 +1,24 @@ +# generated by datamodel-codegen: +# filename: googlesearch_task_search_input.json + +from __future__ import annotations + +from dataclasses import dataclass +from typing import Optional + + +@dataclass +class Input: + query: str + include_link_html: Optional[bool] = False + include_link_text: Optional[bool] = False + top_k: Optional[int] = 10 + + +@dataclass +class Result: + link: str + link_html: Optional[str] + link_text: Optional[str] + snippet: str + title: str diff --git a/instill/resources/schema/googlesearch_task_search_output.py b/instill/resources/schema/googlesearch_task_search_output.py new file mode 100644 index 0000000..90da5f0 --- /dev/null +++ b/instill/resources/schema/googlesearch_task_search_output.py @@ -0,0 +1,21 @@ +# generated by datamodel-codegen: +# filename: googlesearch_task_search_output.json + +from __future__ import annotations + +from dataclasses import dataclass +from typing import List, Optional + + +@dataclass +class Result: + link: str + link_html: Optional[str] + link_text: Optional[str] + snippet: str + title: str + + +@dataclass +class Output: + results: List[Result] diff --git a/instill/resources/schema/huggingface.py b/instill/resources/schema/huggingface.py new file mode 100644 index 0000000..8102921 --- /dev/null +++ b/instill/resources/schema/huggingface.py @@ -0,0 +1,13 @@ +# generated by datamodel-codegen: +# filename: huggingface_definitions.json + +from __future__ import annotations + +from dataclasses import dataclass + + +@dataclass +class HuggingFaceConnectorSpec: + api_key: str + base_url: str + is_custom_endpoint: bool diff --git a/instill/resources/schema/huggingface_task_audio_classification_input.py b/instill/resources/schema/huggingface_task_audio_classification_input.py new file mode 100644 index 0000000..8193b43 --- /dev/null +++ b/instill/resources/schema/huggingface_task_audio_classification_input.py @@ -0,0 +1,24 @@ +# generated by datamodel-codegen: +# filename: huggingface_task_audio_classification_input.json + +from __future__ import annotations + +from dataclasses import dataclass +from typing import Optional + +Model = str + + +@dataclass +class Options: + use_cache: Optional[bool] + wait_for_model: Optional[bool] + + +StringInput = str + + +@dataclass +class Input: + audio: str + model: Optional[Model] diff --git a/instill/resources/schema/huggingface_task_audio_classification_output.py b/instill/resources/schema/huggingface_task_audio_classification_output.py new file mode 100644 index 0000000..fc19f5d --- /dev/null +++ b/instill/resources/schema/huggingface_task_audio_classification_output.py @@ -0,0 +1,30 @@ +# generated by datamodel-codegen: +# filename: huggingface_task_audio_classification_output.json + +from __future__ import annotations + +from dataclasses import dataclass +from typing import List, Optional + + +@dataclass +class Class: + label: str + score: float + + +@dataclass +class Output: + classes: List[Class] + + +Model = str + + +@dataclass +class Options: + use_cache: Optional[bool] + wait_for_model: Optional[bool] + + +StringInput = str diff --git a/instill/resources/schema/huggingface_task_conversational_input.py b/instill/resources/schema/huggingface_task_conversational_input.py new file mode 100644 index 0000000..0c2d360 --- /dev/null +++ b/instill/resources/schema/huggingface_task_conversational_input.py @@ -0,0 +1,45 @@ +# generated by datamodel-codegen: +# filename: huggingface_task_conversational_input.json + +from __future__ import annotations + +from dataclasses import dataclass +from typing import List, Optional + + +@dataclass +class Inputs: + generated_responses: Optional[List[str]] + past_user_inputs: Optional[List[str]] + text: str + + +@dataclass +class Parameters: + max_length: Optional[int] + max_time: Optional[float] + min_length: Optional[int] + repetition_penalty: Optional[float] + top_k: Optional[int] + top_p: Optional[float] + temperature: Optional[float] = 1 + + +Model = str + + +@dataclass +class Options: + use_cache: Optional[bool] + wait_for_model: Optional[bool] + + +StringInput = str + + +@dataclass +class Input: + inputs: Inputs + model: Optional[Model] + options: Optional[Options] + parameters: Optional[Parameters] diff --git a/instill/resources/schema/huggingface_task_conversational_output.py b/instill/resources/schema/huggingface_task_conversational_output.py new file mode 100644 index 0000000..d04c668 --- /dev/null +++ b/instill/resources/schema/huggingface_task_conversational_output.py @@ -0,0 +1,35 @@ +# generated by datamodel-codegen: +# filename: huggingface_task_conversational_output.json + +from __future__ import annotations + +from dataclasses import dataclass +from typing import List, Optional + + +@dataclass +class Conversation: + """ + A facility dictionnary to send back for the next input (with the new user input addition). + """ + + generated_responses: List[str] + past_user_inputs: List[str] + + +@dataclass +class Output: + conversation: Optional[Conversation] + generated_text: str + + +Model = str + + +@dataclass +class Options: + use_cache: Optional[bool] + wait_for_model: Optional[bool] + + +StringInput = str diff --git a/instill/resources/schema/huggingface_task_fill_mask_input.py b/instill/resources/schema/huggingface_task_fill_mask_input.py new file mode 100644 index 0000000..9463aab --- /dev/null +++ b/instill/resources/schema/huggingface_task_fill_mask_input.py @@ -0,0 +1,25 @@ +# generated by datamodel-codegen: +# filename: huggingface_task_fill_mask_input.json + +from __future__ import annotations + +from dataclasses import dataclass +from typing import Optional + +Model = str + + +@dataclass +class Options: + use_cache: Optional[bool] + wait_for_model: Optional[bool] + + +StringInput = str + + +@dataclass +class Input: + inputs: StringInput + model: Optional[Model] + options: Optional[Options] diff --git a/instill/resources/schema/huggingface_task_fill_mask_output.py b/instill/resources/schema/huggingface_task_fill_mask_output.py new file mode 100644 index 0000000..aa0854e --- /dev/null +++ b/instill/resources/schema/huggingface_task_fill_mask_output.py @@ -0,0 +1,32 @@ +# generated by datamodel-codegen: +# filename: huggingface_task_fill_mask_output.json + +from __future__ import annotations + +from dataclasses import dataclass +from typing import List, Optional + + +@dataclass +class Result: + score: Optional[float] + sequence: Optional[str] + token: Optional[int] + token_str: Optional[str] + + +@dataclass +class Output: + results: List[Result] + + +Model = str + + +@dataclass +class Options: + use_cache: Optional[bool] + wait_for_model: Optional[bool] + + +StringInput = str diff --git a/instill/resources/schema/huggingface_task_image_classification_input.py b/instill/resources/schema/huggingface_task_image_classification_input.py new file mode 100644 index 0000000..5c95c89 --- /dev/null +++ b/instill/resources/schema/huggingface_task_image_classification_input.py @@ -0,0 +1,24 @@ +# generated by datamodel-codegen: +# filename: huggingface_task_image_classification_input.json + +from __future__ import annotations + +from dataclasses import dataclass +from typing import Optional + +Model = str + + +@dataclass +class Options: + use_cache: Optional[bool] + wait_for_model: Optional[bool] + + +StringInput = str + + +@dataclass +class Input: + image: str + model: Optional[Model] diff --git a/instill/resources/schema/huggingface_task_image_classification_output.py b/instill/resources/schema/huggingface_task_image_classification_output.py new file mode 100644 index 0000000..321a17f --- /dev/null +++ b/instill/resources/schema/huggingface_task_image_classification_output.py @@ -0,0 +1,30 @@ +# generated by datamodel-codegen: +# filename: huggingface_task_image_classification_output.json + +from __future__ import annotations + +from dataclasses import dataclass +from typing import List, Optional + + +@dataclass +class Class: + label: str + score: float + + +@dataclass +class Output: + classes: List[Class] + + +Model = str + + +@dataclass +class Options: + use_cache: Optional[bool] + wait_for_model: Optional[bool] + + +StringInput = str diff --git a/instill/resources/schema/huggingface_task_image_segmentation_input.py b/instill/resources/schema/huggingface_task_image_segmentation_input.py new file mode 100644 index 0000000..ed56b6d --- /dev/null +++ b/instill/resources/schema/huggingface_task_image_segmentation_input.py @@ -0,0 +1,24 @@ +# generated by datamodel-codegen: +# filename: huggingface_task_image_segmentation_input.json + +from __future__ import annotations + +from dataclasses import dataclass +from typing import Optional + +Model = str + + +@dataclass +class Options: + use_cache: Optional[bool] + wait_for_model: Optional[bool] + + +StringInput = str + + +@dataclass +class Input: + image: str + model: Optional[Model] diff --git a/instill/resources/schema/huggingface_task_image_segmentation_output.py b/instill/resources/schema/huggingface_task_image_segmentation_output.py new file mode 100644 index 0000000..7194d6e --- /dev/null +++ b/instill/resources/schema/huggingface_task_image_segmentation_output.py @@ -0,0 +1,31 @@ +# generated by datamodel-codegen: +# filename: huggingface_task_image_segmentation_output.json + +from __future__ import annotations + +from dataclasses import dataclass +from typing import List, Optional + + +@dataclass +class Segment: + label: str + mask: str + score: float + + +@dataclass +class Output: + segments: List[Segment] + + +Model = str + + +@dataclass +class Options: + use_cache: Optional[bool] + wait_for_model: Optional[bool] + + +StringInput = str diff --git a/instill/resources/schema/huggingface_task_image_to_text_input.py b/instill/resources/schema/huggingface_task_image_to_text_input.py new file mode 100644 index 0000000..4381f5b --- /dev/null +++ b/instill/resources/schema/huggingface_task_image_to_text_input.py @@ -0,0 +1,24 @@ +# generated by datamodel-codegen: +# filename: huggingface_task_image_to_text_input.json + +from __future__ import annotations + +from dataclasses import dataclass +from typing import Optional + +Model = str + + +@dataclass +class Options: + use_cache: Optional[bool] + wait_for_model: Optional[bool] + + +StringInput = str + + +@dataclass +class Input: + image: str + model: Optional[Model] diff --git a/instill/resources/schema/huggingface_task_image_to_text_output.py b/instill/resources/schema/huggingface_task_image_to_text_output.py new file mode 100644 index 0000000..61c54f6 --- /dev/null +++ b/instill/resources/schema/huggingface_task_image_to_text_output.py @@ -0,0 +1,24 @@ +# generated by datamodel-codegen: +# filename: huggingface_task_image_to_text_output.json + +from __future__ import annotations + +from dataclasses import dataclass +from typing import Optional + + +@dataclass +class Output: + text: str + + +Model = str + + +@dataclass +class Options: + use_cache: Optional[bool] + wait_for_model: Optional[bool] + + +StringInput = str diff --git a/instill/resources/schema/huggingface_task_object_detection_input.py b/instill/resources/schema/huggingface_task_object_detection_input.py new file mode 100644 index 0000000..ec1512b --- /dev/null +++ b/instill/resources/schema/huggingface_task_object_detection_input.py @@ -0,0 +1,24 @@ +# generated by datamodel-codegen: +# filename: huggingface_task_object_detection_input.json + +from __future__ import annotations + +from dataclasses import dataclass +from typing import Optional + +Model = str + + +@dataclass +class Options: + use_cache: Optional[bool] + wait_for_model: Optional[bool] + + +StringInput = str + + +@dataclass +class Input: + image: str + model: Optional[Model] diff --git a/instill/resources/schema/huggingface_task_object_detection_output.py b/instill/resources/schema/huggingface_task_object_detection_output.py new file mode 100644 index 0000000..1a9148a --- /dev/null +++ b/instill/resources/schema/huggingface_task_object_detection_output.py @@ -0,0 +1,43 @@ +# generated by datamodel-codegen: +# filename: huggingface_task_object_detection_output.json + +from __future__ import annotations + +from dataclasses import dataclass +from typing import List, Optional + + +@dataclass +class Box: + """ + A dict (with keys [xmin,ymin,xmax,ymax]) representing the bounding box of a detected object. + """ + + xmax: float + xmin: float + ymax: float + ymin: float + + +@dataclass +class Object: + box: Box + label: str + score: float + + +@dataclass +class Output: + objects: List[Object] + + +Model = str + + +@dataclass +class Options: + use_cache: Optional[bool] + wait_for_model: Optional[bool] + + +StringInput = str diff --git a/instill/resources/schema/huggingface_task_question_answering_input.py b/instill/resources/schema/huggingface_task_question_answering_input.py new file mode 100644 index 0000000..face2d0 --- /dev/null +++ b/instill/resources/schema/huggingface_task_question_answering_input.py @@ -0,0 +1,32 @@ +# generated by datamodel-codegen: +# filename: huggingface_task_question_answering_input.json + +from __future__ import annotations + +from dataclasses import dataclass +from typing import Optional + + +@dataclass +class Inputs: + context: str + question: str + + +Model = str + + +@dataclass +class Options: + use_cache: Optional[bool] + wait_for_model: Optional[bool] + + +StringInput = str + + +@dataclass +class Input: + inputs: Inputs + model: Optional[Model] + options: Optional[Options] diff --git a/instill/resources/schema/huggingface_task_question_answering_output.py b/instill/resources/schema/huggingface_task_question_answering_output.py new file mode 100644 index 0000000..64c6cd1 --- /dev/null +++ b/instill/resources/schema/huggingface_task_question_answering_output.py @@ -0,0 +1,27 @@ +# generated by datamodel-codegen: +# filename: huggingface_task_question_answering_output.json + +from __future__ import annotations + +from dataclasses import dataclass +from typing import Optional + + +@dataclass +class Output: + answer: str + score: Optional[float] + start: Optional[int] + stop: Optional[int] + + +Model = str + + +@dataclass +class Options: + use_cache: Optional[bool] + wait_for_model: Optional[bool] + + +StringInput = str diff --git a/instill/resources/schema/huggingface_task_sentence_similarity_input.py b/instill/resources/schema/huggingface_task_sentence_similarity_input.py new file mode 100644 index 0000000..a0a8d9a --- /dev/null +++ b/instill/resources/schema/huggingface_task_sentence_similarity_input.py @@ -0,0 +1,32 @@ +# generated by datamodel-codegen: +# filename: huggingface_task_sentence_similarity_input.json + +from __future__ import annotations + +from dataclasses import dataclass +from typing import List, Optional + + +@dataclass +class Inputs: + sentences: List[str] + source_sentence: str + + +Model = str + + +@dataclass +class Options: + use_cache: Optional[bool] + wait_for_model: Optional[bool] + + +StringInput = str + + +@dataclass +class Input: + inputs: Inputs + model: Optional[Model] + options: Optional[Options] diff --git a/instill/resources/schema/huggingface_task_sentence_similarity_output.py b/instill/resources/schema/huggingface_task_sentence_similarity_output.py new file mode 100644 index 0000000..13adcac --- /dev/null +++ b/instill/resources/schema/huggingface_task_sentence_similarity_output.py @@ -0,0 +1,24 @@ +# generated by datamodel-codegen: +# filename: huggingface_task_sentence_similarity_output.json + +from __future__ import annotations + +from dataclasses import dataclass +from typing import List, Optional + + +@dataclass +class Output: + scores: List[float] + + +Model = str + + +@dataclass +class Options: + use_cache: Optional[bool] + wait_for_model: Optional[bool] + + +StringInput = str diff --git a/instill/resources/schema/huggingface_task_speech_recognition_input.py b/instill/resources/schema/huggingface_task_speech_recognition_input.py new file mode 100644 index 0000000..44b8298 --- /dev/null +++ b/instill/resources/schema/huggingface_task_speech_recognition_input.py @@ -0,0 +1,24 @@ +# generated by datamodel-codegen: +# filename: huggingface_task_speech_recognition_input.json + +from __future__ import annotations + +from dataclasses import dataclass +from typing import Optional + +Model = str + + +@dataclass +class Options: + use_cache: Optional[bool] + wait_for_model: Optional[bool] + + +StringInput = str + + +@dataclass +class Input: + audio: str + model: Optional[Model] diff --git a/instill/resources/schema/huggingface_task_speech_recognition_output.py b/instill/resources/schema/huggingface_task_speech_recognition_output.py new file mode 100644 index 0000000..b6d9e7c --- /dev/null +++ b/instill/resources/schema/huggingface_task_speech_recognition_output.py @@ -0,0 +1,24 @@ +# generated by datamodel-codegen: +# filename: huggingface_task_speech_recognition_output.json + +from __future__ import annotations + +from dataclasses import dataclass +from typing import Optional + + +@dataclass +class Output: + text: str + + +Model = str + + +@dataclass +class Options: + use_cache: Optional[bool] + wait_for_model: Optional[bool] + + +StringInput = str diff --git a/instill/resources/schema/huggingface_task_summarization_input.py b/instill/resources/schema/huggingface_task_summarization_input.py new file mode 100644 index 0000000..74ce98a --- /dev/null +++ b/instill/resources/schema/huggingface_task_summarization_input.py @@ -0,0 +1,38 @@ +# generated by datamodel-codegen: +# filename: huggingface_task_summarization_input.json + +from __future__ import annotations + +from dataclasses import dataclass +from typing import Optional + + +@dataclass +class Parameters: + max_length: Optional[int] + max_time: Optional[float] + min_length: Optional[int] + repetition_penalty: Optional[float] + top_k: Optional[int] + top_p: Optional[float] + temperature: Optional[float] = 1 + + +Model = str + + +@dataclass +class Options: + use_cache: Optional[bool] + wait_for_model: Optional[bool] + + +StringInput = str + + +@dataclass +class Input: + inputs: StringInput + model: Optional[Model] + options: Optional[Options] + parameters: Optional[Parameters] diff --git a/instill/resources/schema/huggingface_task_summarization_output.py b/instill/resources/schema/huggingface_task_summarization_output.py new file mode 100644 index 0000000..63e3205 --- /dev/null +++ b/instill/resources/schema/huggingface_task_summarization_output.py @@ -0,0 +1,24 @@ +# generated by datamodel-codegen: +# filename: huggingface_task_summarization_output.json + +from __future__ import annotations + +from dataclasses import dataclass +from typing import Optional + + +@dataclass +class Output: + summary_text: str + + +Model = str + + +@dataclass +class Options: + use_cache: Optional[bool] + wait_for_model: Optional[bool] + + +StringInput = str diff --git a/instill/resources/schema/huggingface_task_table_question_answering_input.py b/instill/resources/schema/huggingface_task_table_question_answering_input.py new file mode 100644 index 0000000..fff5cc3 --- /dev/null +++ b/instill/resources/schema/huggingface_task_table_question_answering_input.py @@ -0,0 +1,32 @@ +# generated by datamodel-codegen: +# filename: huggingface_task_table_question_answering_input.json + +from __future__ import annotations + +from dataclasses import dataclass +from typing import Any, Dict, Optional + + +@dataclass +class Inputs: + query: str + table: Dict[str, Any] + + +Model = str + + +@dataclass +class Options: + use_cache: Optional[bool] + wait_for_model: Optional[bool] + + +StringInput = str + + +@dataclass +class Input: + inputs: Inputs + model: Optional[Model] + options: Optional[Options] diff --git a/instill/resources/schema/huggingface_task_table_question_answering_output.py b/instill/resources/schema/huggingface_task_table_question_answering_output.py new file mode 100644 index 0000000..988dc45 --- /dev/null +++ b/instill/resources/schema/huggingface_task_table_question_answering_output.py @@ -0,0 +1,27 @@ +# generated by datamodel-codegen: +# filename: huggingface_task_table_question_answering_output.json + +from __future__ import annotations + +from dataclasses import dataclass +from typing import List, Optional + + +@dataclass +class Output: + aggregator: Optional[str] + answer: str + cells: Optional[List[str]] + coordinates: Optional[List[List[int]]] + + +Model = str + + +@dataclass +class Options: + use_cache: Optional[bool] + wait_for_model: Optional[bool] + + +StringInput = str diff --git a/instill/resources/schema/huggingface_task_text_classification_input.py b/instill/resources/schema/huggingface_task_text_classification_input.py new file mode 100644 index 0000000..60bbacc --- /dev/null +++ b/instill/resources/schema/huggingface_task_text_classification_input.py @@ -0,0 +1,25 @@ +# generated by datamodel-codegen: +# filename: huggingface_task_text_classification_input.json + +from __future__ import annotations + +from dataclasses import dataclass +from typing import Optional + +Model = str + + +@dataclass +class Options: + use_cache: Optional[bool] + wait_for_model: Optional[bool] + + +StringInput = str + + +@dataclass +class Input: + inputs: StringInput + model: Optional[Model] + options: Optional[Options] diff --git a/instill/resources/schema/huggingface_task_text_classification_output.py b/instill/resources/schema/huggingface_task_text_classification_output.py new file mode 100644 index 0000000..84e4491 --- /dev/null +++ b/instill/resources/schema/huggingface_task_text_classification_output.py @@ -0,0 +1,30 @@ +# generated by datamodel-codegen: +# filename: huggingface_task_text_classification_output.json + +from __future__ import annotations + +from dataclasses import dataclass +from typing import List, Optional + + +@dataclass +class Result: + label: str + score: float + + +@dataclass +class Output: + results: List[Result] + + +Model = str + + +@dataclass +class Options: + use_cache: Optional[bool] + wait_for_model: Optional[bool] + + +StringInput = str diff --git a/instill/resources/schema/huggingface_task_text_generation_input.py b/instill/resources/schema/huggingface_task_text_generation_input.py new file mode 100644 index 0000000..696b6b7 --- /dev/null +++ b/instill/resources/schema/huggingface_task_text_generation_input.py @@ -0,0 +1,40 @@ +# generated by datamodel-codegen: +# filename: huggingface_task_text_generation_input.json + +from __future__ import annotations + +from dataclasses import dataclass +from typing import Optional + + +@dataclass +class Parameters: + do_sample: Optional[bool] + max_new_tokens: Optional[int] + max_time: Optional[float] + num_return_sequences: Optional[int] + repetition_penalty: Optional[float] + return_full_text: Optional[bool] + temperature: Optional[float] + top_k: Optional[int] + top_p: Optional[float] + + +Model = str + + +@dataclass +class Options: + use_cache: Optional[bool] + wait_for_model: Optional[bool] + + +StringInput = str + + +@dataclass +class Input: + inputs: StringInput + model: Optional[Model] + options: Optional[Options] + parameters: Optional[Parameters] diff --git a/instill/resources/schema/huggingface_task_text_generation_output.py b/instill/resources/schema/huggingface_task_text_generation_output.py new file mode 100644 index 0000000..4ad2684 --- /dev/null +++ b/instill/resources/schema/huggingface_task_text_generation_output.py @@ -0,0 +1,24 @@ +# generated by datamodel-codegen: +# filename: huggingface_task_text_generation_output.json + +from __future__ import annotations + +from dataclasses import dataclass +from typing import Optional + + +@dataclass +class Output: + generated_text: str + + +Model = str + + +@dataclass +class Options: + use_cache: Optional[bool] + wait_for_model: Optional[bool] + + +StringInput = str diff --git a/instill/resources/schema/huggingface_task_text_to_image_input.py b/instill/resources/schema/huggingface_task_text_to_image_input.py new file mode 100644 index 0000000..d585635 --- /dev/null +++ b/instill/resources/schema/huggingface_task_text_to_image_input.py @@ -0,0 +1,36 @@ +# generated by datamodel-codegen: +# filename: huggingface_task_text_to_image_input.json + +from __future__ import annotations + +from dataclasses import dataclass +from typing import Optional + + +@dataclass +class Parameters: + guidance_scale: Optional[float] + height: Optional[int] + negative_prompt: Optional[str] + num_inference_steps: Optional[int] + width: Optional[int] + + +Model = str + + +@dataclass +class Options: + use_cache: Optional[bool] + wait_for_model: Optional[bool] + + +StringInput = str + + +@dataclass +class Input: + inputs: StringInput + model: Optional[Model] + options: Optional[Options] + parameters: Optional[Parameters] diff --git a/instill/resources/schema/huggingface_task_text_to_image_output.py b/instill/resources/schema/huggingface_task_text_to_image_output.py new file mode 100644 index 0000000..02c2d8c --- /dev/null +++ b/instill/resources/schema/huggingface_task_text_to_image_output.py @@ -0,0 +1,24 @@ +# generated by datamodel-codegen: +# filename: huggingface_task_text_to_image_output.json + +from __future__ import annotations + +from dataclasses import dataclass +from typing import Optional + + +@dataclass +class Output: + image: str + + +Model = str + + +@dataclass +class Options: + use_cache: Optional[bool] + wait_for_model: Optional[bool] + + +StringInput = str diff --git a/instill/resources/schema/huggingface_task_token_classification_input.py b/instill/resources/schema/huggingface_task_token_classification_input.py new file mode 100644 index 0000000..60aa828 --- /dev/null +++ b/instill/resources/schema/huggingface_task_token_classification_input.py @@ -0,0 +1,32 @@ +# generated by datamodel-codegen: +# filename: huggingface_task_token_classification_input.json + +from __future__ import annotations + +from dataclasses import dataclass +from typing import Optional + + +@dataclass +class Parameters: + aggregation_strategy: Optional[str] + + +Model = str + + +@dataclass +class Options: + use_cache: Optional[bool] + wait_for_model: Optional[bool] + + +StringInput = str + + +@dataclass +class Input: + inputs: StringInput + model: Optional[Model] + options: Optional[Options] + parameters: Optional[Parameters] diff --git a/instill/resources/schema/huggingface_task_token_classification_output.py b/instill/resources/schema/huggingface_task_token_classification_output.py new file mode 100644 index 0000000..c9d0728 --- /dev/null +++ b/instill/resources/schema/huggingface_task_token_classification_output.py @@ -0,0 +1,33 @@ +# generated by datamodel-codegen: +# filename: huggingface_task_token_classification_output.json + +from __future__ import annotations + +from dataclasses import dataclass +from typing import List, Optional + + +@dataclass +class Result: + end: Optional[int] + entity_group: Optional[str] + score: Optional[float] + start: Optional[int] + word: Optional[str] + + +@dataclass +class Output: + results: List[Result] + + +Model = str + + +@dataclass +class Options: + use_cache: Optional[bool] + wait_for_model: Optional[bool] + + +StringInput = str diff --git a/instill/resources/schema/huggingface_task_translation_input.py b/instill/resources/schema/huggingface_task_translation_input.py new file mode 100644 index 0000000..ff58222 --- /dev/null +++ b/instill/resources/schema/huggingface_task_translation_input.py @@ -0,0 +1,25 @@ +# generated by datamodel-codegen: +# filename: huggingface_task_translation_input.json + +from __future__ import annotations + +from dataclasses import dataclass +from typing import Optional + +Model = str + + +@dataclass +class Options: + use_cache: Optional[bool] + wait_for_model: Optional[bool] + + +StringInput = str + + +@dataclass +class Input: + inputs: StringInput + model: Optional[Model] + options: Optional[Options] diff --git a/instill/resources/schema/huggingface_task_translation_output.py b/instill/resources/schema/huggingface_task_translation_output.py new file mode 100644 index 0000000..e141e7d --- /dev/null +++ b/instill/resources/schema/huggingface_task_translation_output.py @@ -0,0 +1,24 @@ +# generated by datamodel-codegen: +# filename: huggingface_task_translation_output.json + +from __future__ import annotations + +from dataclasses import dataclass +from typing import Optional + + +@dataclass +class Output: + translation_text: str + + +Model = str + + +@dataclass +class Options: + use_cache: Optional[bool] + wait_for_model: Optional[bool] + + +StringInput = str diff --git a/instill/resources/schema/huggingface_task_zero_shot_classification_input.py b/instill/resources/schema/huggingface_task_zero_shot_classification_input.py new file mode 100644 index 0000000..8a3b11f --- /dev/null +++ b/instill/resources/schema/huggingface_task_zero_shot_classification_input.py @@ -0,0 +1,33 @@ +# generated by datamodel-codegen: +# filename: huggingface_task_zero_shot_classification_input.json + +from __future__ import annotations + +from dataclasses import dataclass +from typing import List, Optional + + +@dataclass +class Parameters: + candidate_labels: List[str] + multi_label: Optional[bool] + + +Model = str + + +@dataclass +class Options: + use_cache: Optional[bool] + wait_for_model: Optional[bool] + + +StringInput = str + + +@dataclass +class Input: + inputs: StringInput + model: Optional[Model] + options: Optional[Options] + parameters: Parameters diff --git a/instill/resources/schema/huggingface_task_zero_shot_classification_output.py b/instill/resources/schema/huggingface_task_zero_shot_classification_output.py new file mode 100644 index 0000000..48ea0f0 --- /dev/null +++ b/instill/resources/schema/huggingface_task_zero_shot_classification_output.py @@ -0,0 +1,26 @@ +# generated by datamodel-codegen: +# filename: huggingface_task_zero_shot_classification_output.json + +from __future__ import annotations + +from dataclasses import dataclass +from typing import List, Optional + + +@dataclass +class Output: + labels: List[str] + scores: List[float] + sequence: Optional[str] + + +Model = str + + +@dataclass +class Options: + use_cache: Optional[bool] + wait_for_model: Optional[bool] + + +StringInput = str diff --git a/instill/resources/schema/image_task_draw_classification_input.py b/instill/resources/schema/image_task_draw_classification_input.py new file mode 100644 index 0000000..a168b97 --- /dev/null +++ b/instill/resources/schema/image_task_draw_classification_input.py @@ -0,0 +1,27 @@ +# generated by datamodel-codegen: +# filename: image_task_draw_classification_input.json + +from __future__ import annotations + +from dataclasses import dataclass +from typing import Any, Optional + +Category = str + + +InstillTypes = Any + + +Score = float + + +@dataclass +class Input: + """ + Input + """ + + category: Category + image: str + score: Score + showScore: Optional[bool] diff --git a/instill/resources/schema/image_task_draw_classification_output.py b/instill/resources/schema/image_task_draw_classification_output.py new file mode 100644 index 0000000..81ae2c9 --- /dev/null +++ b/instill/resources/schema/image_task_draw_classification_output.py @@ -0,0 +1,15 @@ +# generated by datamodel-codegen: +# filename: image_task_draw_classification_output.json + +from __future__ import annotations + +from dataclasses import dataclass + + +@dataclass +class Output: + """ + Output + """ + + image: str diff --git a/instill/resources/schema/image_task_draw_detection_output.py b/instill/resources/schema/image_task_draw_detection_output.py new file mode 100644 index 0000000..6dc52c8 --- /dev/null +++ b/instill/resources/schema/image_task_draw_detection_output.py @@ -0,0 +1,15 @@ +# generated by datamodel-codegen: +# filename: image_task_draw_detection_output.json + +from __future__ import annotations + +from dataclasses import dataclass + + +@dataclass +class Output: + """ + Output + """ + + image: str diff --git a/instill/resources/schema/image_task_draw_instance_segmentation_output.py b/instill/resources/schema/image_task_draw_instance_segmentation_output.py new file mode 100644 index 0000000..1e994bd --- /dev/null +++ b/instill/resources/schema/image_task_draw_instance_segmentation_output.py @@ -0,0 +1,15 @@ +# generated by datamodel-codegen: +# filename: image_task_draw_instance_segmentation_output.json + +from __future__ import annotations + +from dataclasses import dataclass + + +@dataclass +class Output: + """ + Output + """ + + image: str diff --git a/instill/resources/schema/image_task_draw_keypoint_output.py b/instill/resources/schema/image_task_draw_keypoint_output.py new file mode 100644 index 0000000..72ef22e --- /dev/null +++ b/instill/resources/schema/image_task_draw_keypoint_output.py @@ -0,0 +1,15 @@ +# generated by datamodel-codegen: +# filename: image_task_draw_keypoint_output.json + +from __future__ import annotations + +from dataclasses import dataclass + + +@dataclass +class Output: + """ + Output + """ + + image: str diff --git a/instill/resources/schema/image_task_draw_ocr_output.py b/instill/resources/schema/image_task_draw_ocr_output.py new file mode 100644 index 0000000..b3230d3 --- /dev/null +++ b/instill/resources/schema/image_task_draw_ocr_output.py @@ -0,0 +1,15 @@ +# generated by datamodel-codegen: +# filename: image_task_draw_ocr_output.json + +from __future__ import annotations + +from dataclasses import dataclass + + +@dataclass +class Output: + """ + Output + """ + + image: str diff --git a/instill/resources/schema/image_task_draw_semantic_segmentation_input.py b/instill/resources/schema/image_task_draw_semantic_segmentation_input.py new file mode 100644 index 0000000..4ff0f2d --- /dev/null +++ b/instill/resources/schema/image_task_draw_semantic_segmentation_input.py @@ -0,0 +1,30 @@ +# generated by datamodel-codegen: +# filename: image_task_draw_semantic_segmentation_input.json + +from __future__ import annotations + +from dataclasses import dataclass +from typing import Any, List, Optional + + +@dataclass +class Object: + category: str + rle: str + + +Stuffs = List[Object] + + +InstillTypes = Any + + +@dataclass +class Input: + """ + Input + """ + + image: str + showScore: Optional[bool] + stuffs: Stuffs diff --git a/instill/resources/schema/image_task_draw_semantic_segmentation_output.py b/instill/resources/schema/image_task_draw_semantic_segmentation_output.py new file mode 100644 index 0000000..0560bc0 --- /dev/null +++ b/instill/resources/schema/image_task_draw_semantic_segmentation_output.py @@ -0,0 +1,15 @@ +# generated by datamodel-codegen: +# filename: image_task_draw_semantic_segmentation_output.json + +from __future__ import annotations + +from dataclasses import dataclass + + +@dataclass +class Output: + """ + Output + """ + + image: str diff --git a/instill/resources/schema/instill.py b/instill/resources/schema/instill.py new file mode 100644 index 0000000..7d10e0b --- /dev/null +++ b/instill/resources/schema/instill.py @@ -0,0 +1,22 @@ +# generated by datamodel-codegen: +# filename: instill_definitions.json + +from __future__ import annotations + +from dataclasses import dataclass +from typing import Any, Optional, Union + + +@dataclass +class InstillModelConnector1: + mode: Optional[Any] + + +@dataclass +class InstillModelConnector2: + api_token: str + mode: Optional[Any] + server_url: str + + +InstillModelConnector = Union[InstillModelConnector1, InstillModelConnector2] diff --git a/instill/resources/schema/instill_task_classification_input.py b/instill/resources/schema/instill_task_classification_input.py new file mode 100644 index 0000000..9602525 --- /dev/null +++ b/instill/resources/schema/instill_task_classification_input.py @@ -0,0 +1,32 @@ +# generated by datamodel-codegen: +# filename: instill_task_classification_input.json + +from __future__ import annotations + +from dataclasses import dataclass +from typing import List + + +@dataclass +class Model: + pass + + +@dataclass +class Input: + """ + Input + """ + + image_base64: str + model_id: str + model_namespace: str + + +@dataclass +class Param: + param_name: str + param_value: str + + +ExtraParams = List[Param] diff --git a/instill/resources/schema/instill_task_classification_output.py b/instill/resources/schema/instill_task_classification_output.py new file mode 100644 index 0000000..b75141b --- /dev/null +++ b/instill/resources/schema/instill_task_classification_output.py @@ -0,0 +1,43 @@ +# generated by datamodel-codegen: +# filename: instill_task_classification_output.json + +from __future__ import annotations + +from dataclasses import dataclass +from typing import Any, List + + +@dataclass +class Output: + """ + Output + """ + + +@dataclass +class Classification: + category: str + score: float + + +InstillTypes = Any + + +@dataclass +class Input: + """ + Input + """ + + image_base64: str + model_id: str + model_namespace: str + + +@dataclass +class Param: + param_name: str + param_value: str + + +ExtraParams = List[Param] diff --git a/instill/resources/schema/instill_task_detection_input.py b/instill/resources/schema/instill_task_detection_input.py new file mode 100644 index 0000000..c7bd86c --- /dev/null +++ b/instill/resources/schema/instill_task_detection_input.py @@ -0,0 +1,32 @@ +# generated by datamodel-codegen: +# filename: instill_task_detection_input.json + +from __future__ import annotations + +from dataclasses import dataclass +from typing import List + + +@dataclass +class Model: + pass + + +@dataclass +class Input: + """ + Input + """ + + image_base64: str + model_id: str + model_namespace: str + + +@dataclass +class Param: + param_name: str + param_value: str + + +ExtraParams = List[Param] diff --git a/instill/resources/schema/instill_task_image_to_image_input.py b/instill/resources/schema/instill_task_image_to_image_input.py new file mode 100644 index 0000000..efd7966 --- /dev/null +++ b/instill/resources/schema/instill_task_image_to_image_input.py @@ -0,0 +1,44 @@ +# generated by datamodel-codegen: +# filename: instill_task_image_to_image_input.json + +from __future__ import annotations + +from dataclasses import dataclass +from typing import List, Optional + + +@dataclass +class Input1: + """ + Input + """ + + image_base64: str + model_id: str + model_namespace: str + + +@dataclass +class Param: + param_name: str + param_value: str + + +ExtraParams = List[Param] + + +@dataclass +class Input: + """ + Input + """ + + cfg_scale: Optional[float] + extra_params: Optional[ExtraParams] + image_base64: str + model_id: str + model_namespace: str + prompt: str + samples: Optional[int] + seed: Optional[int] + top_k: Optional[int] = 10 diff --git a/instill/resources/schema/instill_task_image_to_image_output.py b/instill/resources/schema/instill_task_image_to_image_output.py new file mode 100644 index 0000000..475bab4 --- /dev/null +++ b/instill/resources/schema/instill_task_image_to_image_output.py @@ -0,0 +1,36 @@ +# generated by datamodel-codegen: +# filename: instill_task_image_to_image_output.json + +from __future__ import annotations + +from dataclasses import dataclass +from typing import List + + +@dataclass +class Output: + """ + Output + """ + + images: List[str] + + +@dataclass +class Input: + """ + Input + """ + + image_base64: str + model_id: str + model_namespace: str + + +@dataclass +class Param: + param_name: str + param_value: str + + +ExtraParams = List[Param] diff --git a/instill/resources/schema/instill_task_instance_segmentation_input.py b/instill/resources/schema/instill_task_instance_segmentation_input.py new file mode 100644 index 0000000..d756f4e --- /dev/null +++ b/instill/resources/schema/instill_task_instance_segmentation_input.py @@ -0,0 +1,32 @@ +# generated by datamodel-codegen: +# filename: instill_task_instance_segmentation_input.json + +from __future__ import annotations + +from dataclasses import dataclass +from typing import List + + +@dataclass +class Model: + pass + + +@dataclass +class Input: + """ + Input + """ + + image_base64: str + model_id: str + model_namespace: str + + +@dataclass +class Param: + param_name: str + param_value: str + + +ExtraParams = List[Param] diff --git a/instill/resources/schema/instill_task_keypoint_input.py b/instill/resources/schema/instill_task_keypoint_input.py new file mode 100644 index 0000000..d10a254 --- /dev/null +++ b/instill/resources/schema/instill_task_keypoint_input.py @@ -0,0 +1,32 @@ +# generated by datamodel-codegen: +# filename: instill_task_keypoint_input.json + +from __future__ import annotations + +from dataclasses import dataclass +from typing import List + + +@dataclass +class Model: + pass + + +@dataclass +class Input: + """ + Input + """ + + image_base64: str + model_id: str + model_namespace: str + + +@dataclass +class Param: + param_name: str + param_value: str + + +ExtraParams = List[Param] diff --git a/instill/resources/schema/instill_task_ocr_input.py b/instill/resources/schema/instill_task_ocr_input.py new file mode 100644 index 0000000..bd0f92c --- /dev/null +++ b/instill/resources/schema/instill_task_ocr_input.py @@ -0,0 +1,32 @@ +# generated by datamodel-codegen: +# filename: instill_task_ocr_input.json + +from __future__ import annotations + +from dataclasses import dataclass +from typing import List + + +@dataclass +class Model: + pass + + +@dataclass +class Input: + """ + Input + """ + + image_base64: str + model_id: str + model_namespace: str + + +@dataclass +class Param: + param_name: str + param_value: str + + +ExtraParams = List[Param] diff --git a/instill/resources/schema/instill_task_semantic_segmentation_input.py b/instill/resources/schema/instill_task_semantic_segmentation_input.py new file mode 100644 index 0000000..4bdf926 --- /dev/null +++ b/instill/resources/schema/instill_task_semantic_segmentation_input.py @@ -0,0 +1,32 @@ +# generated by datamodel-codegen: +# filename: instill_task_semantic_segmentation_input.json + +from __future__ import annotations + +from dataclasses import dataclass +from typing import List + + +@dataclass +class Model: + pass + + +@dataclass +class Input: + """ + Input + """ + + image_base64: str + model_id: str + model_namespace: str + + +@dataclass +class Param: + param_name: str + param_value: str + + +ExtraParams = List[Param] diff --git a/instill/resources/schema/instill_task_semantic_segmentation_output.py b/instill/resources/schema/instill_task_semantic_segmentation_output.py new file mode 100644 index 0000000..bb28dde --- /dev/null +++ b/instill/resources/schema/instill_task_semantic_segmentation_output.py @@ -0,0 +1,48 @@ +# generated by datamodel-codegen: +# filename: instill_task_semantic_segmentation_output.json + +from __future__ import annotations + +from dataclasses import dataclass +from typing import Any, List + + +@dataclass +class Output: + """ + Output + """ + + +@dataclass +class Object: + category: str + rle: str + + +@dataclass +class SemanticSegmentation: + stuffs: List[Object] + + +InstillTypes = Any + + +@dataclass +class Input: + """ + Input + """ + + image_base64: str + model_id: str + model_namespace: str + + +@dataclass +class Param: + param_name: str + param_value: str + + +ExtraParams = List[Param] diff --git a/instill/resources/schema/instill_task_text_generation_input.py b/instill/resources/schema/instill_task_text_generation_input.py new file mode 100644 index 0000000..ac98cbf --- /dev/null +++ b/instill/resources/schema/instill_task_text_generation_input.py @@ -0,0 +1,43 @@ +# generated by datamodel-codegen: +# filename: instill_task_text_generation_input.json + +from __future__ import annotations + +from dataclasses import dataclass +from typing import List, Optional + + +@dataclass +class Input1: + """ + Input + """ + + image_base64: str + model_id: str + model_namespace: str + + +@dataclass +class Param: + param_name: str + param_value: str + + +ExtraParams = List[Param] + + +@dataclass +class Input: + """ + Input + """ + + extra_params: Optional[ExtraParams] + model_id: str + model_namespace: str + prompt: str + seed: Optional[int] + max_new_tokens: Optional[int] = 50 + temperature: Optional[float] = 0.7 + top_k: Optional[int] = 10 diff --git a/instill/resources/schema/instill_task_text_generation_output.py b/instill/resources/schema/instill_task_text_generation_output.py new file mode 100644 index 0000000..1980425 --- /dev/null +++ b/instill/resources/schema/instill_task_text_generation_output.py @@ -0,0 +1,36 @@ +# generated by datamodel-codegen: +# filename: instill_task_text_generation_output.json + +from __future__ import annotations + +from dataclasses import dataclass +from typing import List + + +@dataclass +class Output: + """ + Output + """ + + text: str + + +@dataclass +class Input: + """ + Input + """ + + image_base64: str + model_id: str + model_namespace: str + + +@dataclass +class Param: + param_name: str + param_value: str + + +ExtraParams = List[Param] diff --git a/instill/resources/schema/instill_task_text_to_image_input.py b/instill/resources/schema/instill_task_text_to_image_input.py new file mode 100644 index 0000000..3c22283 --- /dev/null +++ b/instill/resources/schema/instill_task_text_to_image_input.py @@ -0,0 +1,43 @@ +# generated by datamodel-codegen: +# filename: instill_task_text_to_image_input.json + +from __future__ import annotations + +from dataclasses import dataclass +from typing import List, Optional + + +@dataclass +class Input1: + """ + Input + """ + + image_base64: str + model_id: str + model_namespace: str + + +@dataclass +class Param: + param_name: str + param_value: str + + +ExtraParams = List[Param] + + +@dataclass +class Input: + """ + Input + """ + + cfg_scale: Optional[float] + extra_params: Optional[ExtraParams] + model_id: str + model_namespace: str + prompt: str + samples: Optional[int] + seed: Optional[int] + steps: Optional[int] diff --git a/instill/resources/schema/instill_task_text_to_image_output.py b/instill/resources/schema/instill_task_text_to_image_output.py new file mode 100644 index 0000000..dc7002b --- /dev/null +++ b/instill/resources/schema/instill_task_text_to_image_output.py @@ -0,0 +1,36 @@ +# generated by datamodel-codegen: +# filename: instill_task_text_to_image_output.json + +from __future__ import annotations + +from dataclasses import dataclass +from typing import List + + +@dataclass +class Output: + """ + Output + """ + + images: List[str] + + +@dataclass +class Input: + """ + Input + """ + + image_base64: str + model_id: str + model_namespace: str + + +@dataclass +class Param: + param_name: str + param_value: str + + +ExtraParams = List[Param] diff --git a/instill/resources/schema/instill_task_visual_question_answering_input.py b/instill/resources/schema/instill_task_visual_question_answering_input.py new file mode 100644 index 0000000..3bd3f38 --- /dev/null +++ b/instill/resources/schema/instill_task_visual_question_answering_input.py @@ -0,0 +1,44 @@ +# generated by datamodel-codegen: +# filename: instill_task_visual_question_answering_input.json + +from __future__ import annotations + +from dataclasses import dataclass +from typing import List, Optional + + +@dataclass +class Input1: + """ + Input + """ + + image_base64: str + model_id: str + model_namespace: str + + +@dataclass +class Param: + param_name: str + param_value: str + + +ExtraParams = List[Param] + + +@dataclass +class Input: + """ + Input + """ + + extra_params: Optional[ExtraParams] + image_base64: str + model_id: str + model_namespace: str + prompt: str + seed: Optional[int] + max_new_tokens: Optional[int] = 50 + temperature: Optional[float] = 0.7 + top_k: Optional[int] = 10 diff --git a/instill/resources/schema/instill_task_visual_question_answering_output.py b/instill/resources/schema/instill_task_visual_question_answering_output.py new file mode 100644 index 0000000..40d183b --- /dev/null +++ b/instill/resources/schema/instill_task_visual_question_answering_output.py @@ -0,0 +1,36 @@ +# generated by datamodel-codegen: +# filename: instill_task_visual_question_answering_output.json + +from __future__ import annotations + +from dataclasses import dataclass +from typing import List + + +@dataclass +class Output: + """ + Output + """ + + text: str + + +@dataclass +class Input: + """ + Input + """ + + image_base64: str + model_id: str + model_namespace: str + + +@dataclass +class Param: + param_name: str + param_value: str + + +ExtraParams = List[Param] diff --git a/instill/resources/schema/json_task_marshal_input.py b/instill/resources/schema/json_task_marshal_input.py new file mode 100644 index 0000000..85e025d --- /dev/null +++ b/instill/resources/schema/json_task_marshal_input.py @@ -0,0 +1,16 @@ +# generated by datamodel-codegen: +# filename: json_task_marshal_input.json + +from __future__ import annotations + +from dataclasses import dataclass +from typing import Any, Dict + + +@dataclass +class Input: + """ + Input + """ + + object: Dict[str, Any] diff --git a/instill/resources/schema/json_task_marshal_output.py b/instill/resources/schema/json_task_marshal_output.py new file mode 100644 index 0000000..3e4d9d8 --- /dev/null +++ b/instill/resources/schema/json_task_marshal_output.py @@ -0,0 +1,15 @@ +# generated by datamodel-codegen: +# filename: json_task_marshal_output.json + +from __future__ import annotations + +from dataclasses import dataclass + + +@dataclass +class Output: + """ + Output + """ + + string: str diff --git a/instill/resources/schema/json_task_unmarshal_input.py b/instill/resources/schema/json_task_unmarshal_input.py new file mode 100644 index 0000000..df8f9d1 --- /dev/null +++ b/instill/resources/schema/json_task_unmarshal_input.py @@ -0,0 +1,15 @@ +# generated by datamodel-codegen: +# filename: json_task_unmarshal_input.json + +from __future__ import annotations + +from dataclasses import dataclass + + +@dataclass +class Input: + """ + Input + """ + + string: str diff --git a/instill/resources/schema/json_task_unmarshal_output.py b/instill/resources/schema/json_task_unmarshal_output.py new file mode 100644 index 0000000..80c4c3a --- /dev/null +++ b/instill/resources/schema/json_task_unmarshal_output.py @@ -0,0 +1,16 @@ +# generated by datamodel-codegen: +# filename: json_task_unmarshal_output.json + +from __future__ import annotations + +from dataclasses import dataclass +from typing import Any, Dict + + +@dataclass +class Output: + """ + Output + """ + + object: Dict[str, Any] diff --git a/instill/resources/schema/jsons/airbyte_definitions.json b/instill/resources/schema/jsons/airbyte_definitions.json new file mode 100644 index 0000000..e1aa3b8 --- /dev/null +++ b/instill/resources/schema/jsons/airbyte_definitions.json @@ -0,0 +1 @@ +{ "$schema": "http://json-schema.org/draft-07/schema#", "oneOf": [ { "$schema": "http://json-schema.org/draft-07/schema#", "additionalProperties": false, "properties": { "access_key": { "instillCredentialField": true, "description": "The Access Key ID of the AWS IAM Role to use for sending messages", "examples": [ "xxxxxHRNxxx3TBxxxxxx" ], "order": 3, "title": "AWS IAM Access Key ID", "type": "string" }, "destination": { "const": "airbyte-destination-amazon-sqs", "type": "string" }, "message_body_key": { "description": "Use this property to extract the contents of the named key in the input record to use as the SQS message body. If not set, the entire content of the input record data is used as the message body.", "examples": [ "myDataPath" ], "order": 5, "title": "Message Body Key", "type": "string" }, "message_delay": { "description": "Modify the Message Delay of the individual message from the Queue's default (seconds).", "examples": [ "15" ], "order": 2, "title": "Message Delay", "type": "integer" }, "message_group_id": { "description": "The tag that specifies that a message belongs to a specific message group. This parameter applies only to, and is REQUIRED by, FIFO queues.", "examples": [ "my-fifo-group" ], "order": 6, "title": "Message Group Id", "type": "string" }, "queue_url": { "description": "URL of the SQS Queue", "examples": [ "https://sqs.eu-west-1.amazonaws.com/1234567890/my-example-queue" ], "order": 0, "title": "Queue URL", "type": "string" }, "region": { "description": "AWS Region of the SQS Queue", "enum": [ "us-east-1", "us-east-2", "us-west-1", "us-west-2", "af-south-1", "ap-east-1", "ap-south-1", "ap-northeast-1", "ap-northeast-2", "ap-northeast-3", "ap-southeast-1", "ap-southeast-2", "ca-central-1", "cn-north-1", "cn-northwest-1", "eu-central-1", "eu-north-1", "eu-south-1", "eu-west-1", "eu-west-2", "eu-west-3", "sa-east-1", "me-south-1", "us-gov-east-1", "us-gov-west-1" ], "order": 1, "title": "AWS Region", "type": "string" }, "secret_key": { "instillCredentialField": true, "description": "The Secret Key of the AWS IAM Role to use for sending messages", "examples": [ "hu+qE5exxxxT6o/ZrKsxxxxxxBhxxXLexxxxxVKz" ], "order": 4, "title": "AWS IAM Secret Key", "type": "string" } }, "required": [ "queue_url", "region", "destination" ], "title": "Amazonsqs", "type": "object" }, { "$schema": "http://json-schema.org/draft-07/schema#", "additionalProperties": false, "properties": { "aws_account_id": { "description": "target aws account id", "examples": [ "111111111111" ], "order": 1, "title": "AWS Account Id", "type": "string" }, "bucket_name": { "description": "The name of the S3 bucket. Read more here.", "order": 4, "title": "S3 Bucket Name", "type": "string" }, "bucket_prefix": { "description": "S3 prefix", "order": 5, "title": "Target S3 Bucket Prefix", "type": "string" }, "credentials": { "description": "Choose How to Authenticate to AWS.", "oneOf": [ { "properties": { "credentials_title": { "const": "IAM Role", "default": "IAM Role", "description": "Name of the credentials", "enum": [ "IAM Role" ], "order": 0, "title": "Credentials Title", "type": "string" }, "role_arn": { "instillCredentialField": false, "description": "Will assume this role to write data to s3", "title": "Target Role Arn", "type": "string" } }, "required": [ "role_arn", "credentials_title" ], "title": "IAM Role", "type": "object" }, { "properties": { "aws_access_key_id": { "instillCredentialField": true, "description": "AWS User Access Key Id", "title": "Access Key Id", "type": "string" }, "aws_secret_access_key": { "instillCredentialField": true, "description": "Secret Access Key", "title": "Secret Access Key", "type": "string" }, "credentials_title": { "const": "IAM User", "default": "IAM User", "description": "Name of the credentials", "enum": [ "IAM User" ], "order": 0, "title": "Credentials Title", "type": "string" } }, "required": [ "credentials_title", "aws_access_key_id", "aws_secret_access_key" ], "title": "IAM User", "type": "object" } ], "order": 2, "title": "Authentication mode", "type": "object" }, "destination": { "const": "airbyte-destination-aws-datalake", "type": "string" }, "format": { "description": "Format of the data output.", "oneOf": [ { "properties": { "compression_codec": { "default": "UNCOMPRESSED", "description": "The compression algorithm used to compress data.", "enum": [ "UNCOMPRESSED", "GZIP" ], "title": "Compression Codec (Optional)", "type": "string" }, "format_type": { "default": "JSONL", "enum": [ "JSONL" ], "title": "Format Type *", "type": "string" } }, "required": [ "format_type" ], "title": "JSON Lines: Newline-delimited JSON" }, { "properties": { "compression_codec": { "default": "SNAPPY", "description": "The compression algorithm used to compress data.", "enum": [ "UNCOMPRESSED", "SNAPPY", "GZIP", "ZSTD" ], "title": "Compression Codec (Optional)", "type": "string" }, "format_type": { "default": "Parquet", "enum": [ "Parquet" ], "title": "Format Type *", "type": "string" } }, "required": [ "format_type" ], "title": "Parquet: Columnar Storage" } ], "order": 10, "title": "Output Format *", "type": "object" }, "glue_catalog_float_as_decimal": { "default": false, "description": "Cast float/double as decimal(38,18). This can help achieve higher accuracy and represent numbers correctly as received from the source.", "order": 12, "title": "Glue Catalog: Float as Decimal", "type": "boolean" }, "lakeformation_database_default_tag_key": { "description": "Add a default tag key to databases created by this destination", "examples": [ "pii_level" ], "order": 7, "title": "Lake Formation Database Tag Key", "type": "string" }, "lakeformation_database_default_tag_values": { "description": "Add default values for the `Tag Key` to databases created by this destination. Comma separate for multiple values.", "examples": [ "private,public" ], "order": 8, "title": "Lake Formation Database Tag Values", "type": "string" }, "lakeformation_database_name": { "description": "The default database this destination will use to create tables in per stream. Can be changed per connection by customizing the namespace.", "order": 6, "title": "Lake Formation Database Name", "type": "string" }, "lakeformation_governed_tables": { "default": false, "description": "Whether to create tables as LF governed tables.", "order": 9, "title": "Lake Formation Governed Tables", "type": "boolean" }, "partitioning": { "default": "NO PARTITIONING", "description": "Partition data by cursor fields when a cursor field is a date", "enum": [ "NO PARTITIONING", "DATE", "YEAR", "MONTH", "DAY", "YEAR/MONTH", "YEAR/MONTH/DAY" ], "order": 11, "title": "Choose how to partition data", "type": "string" }, "region": { "default": "", "description": "The region of the S3 bucket. See here for all region codes.", "enum": [ "", "us-east-1", "us-east-2", "us-west-1", "us-west-2", "af-south-1", "ap-east-1", "ap-south-1", "ap-northeast-1", "ap-northeast-2", "ap-northeast-3", "ap-southeast-1", "ap-southeast-2", "ca-central-1", "cn-north-1", "cn-northwest-1", "eu-central-1", "eu-north-1", "eu-south-1", "eu-west-1", "eu-west-2", "eu-west-3", "sa-east-1", "me-south-1", "us-gov-east-1", "us-gov-west-1" ], "order": 3, "title": "S3 Bucket Region", "type": "string" } }, "required": [ "credentials", "region", "bucket_name", "lakeformation_database_name", "destination" ], "title": "Awsdatalake", "type": "object" }, { "$schema": "http://json-schema.org/draft-07/schema#", "additionalProperties": false, "properties": { "azure_blob_storage_account_key": { "instillCredentialField": true, "description": "The Azure blob storage account key.", "examples": [ "Z8ZkZpteggFx394vm+PJHnGTvdRncaYS+JhLKdj789YNmD+iyGTnG+PV+POiuYNhBg/ACS+LKjd%4FG3FHGN12Nd==" ], "title": "Azure Blob Storage account key", "type": "string" }, "azure_blob_storage_account_name": { "description": "The account's name of the Azure Blob Storage.", "examples": [ "airbyte5storage" ], "title": "Azure Blob Storage account name", "type": "string" }, "azure_blob_storage_container_name": { "description": "The name of the Azure blob storage container. If not exists - will be created automatically. May be empty, then will be created automatically airbytecontainer+timestamp", "examples": [ "airbytetescontainername" ], "title": "Azure blob storage container (Bucket) Name", "type": "string" }, "azure_blob_storage_endpoint_domain_name": { "default": "blob.core.windows.net", "description": "This is Azure Blob Storage endpoint domain name. Leave default value (or leave it empty if run container from command line) to use Microsoft native from example.", "examples": [ "blob.core.windows.net" ], "title": "Endpoint Domain Name", "type": "string" }, "azure_blob_storage_output_buffer_size": { "default": 5, "description": "The amount of megabytes to buffer for the output stream to Azure. This will impact memory footprint on workers, but may need adjustment for performance and appropriate block size in Azure.", "examples": [ 5 ], "maximum": 2047, "minimum": 1, "title": "Azure Blob Storage output buffer size (Megabytes)", "type": "integer" }, "azure_blob_storage_spill_size": { "default": 500, "description": "The amount of megabytes after which the connector should spill the records in a new blob object. Make sure to configure size greater than individual records. Enter 0 if not applicable", "examples": [ 500 ], "title": "Azure Blob Storage file spill size", "type": "integer" }, "destination": { "const": "airbyte-destination-azure-blob-storage", "type": "string" }, "format": { "description": "Output data format", "oneOf": [ { "properties": { "flattening": { "default": "No flattening", "description": "Whether the input json data should be normalized (flattened) in the output CSV. Please refer to docs for details.", "enum": [ "No flattening", "Root level flattening" ], "title": "Normalization (Flattening)", "type": "string" }, "format_type": { "const": "CSV", "type": "string" } }, "required": [ "format_type", "flattening" ], "title": "CSV: Comma-Separated Values" }, { "properties": { "format_type": { "const": "JSONL", "type": "string" } }, "required": [ "format_type" ], "title": "JSON Lines: newline-delimited JSON" } ], "title": "Output Format", "type": "object" } }, "required": [ "azure_blob_storage_account_name", "azure_blob_storage_account_key", "format", "destination" ], "title": "Azureblobstorage", "type": "object" }, { "$schema": "http://json-schema.org/draft-07/schema#", "additionalProperties": true, "groups": [ { "id": "connection", "title": "Connection" }, { "id": "advanced", "title": "Advanced" } ], "properties": { "big_query_client_buffer_size_mb": { "default": 15, "description": "Google BigQuery client's chunk (buffer) size (MIN=1, MAX = 15) for each table. The size that will be written by a single RPC. Written data will be buffered and only flushed upon reaching this size or closing the channel. The default 15MB value is used if not set explicitly. Read more here.", "examples": [ "15" ], "group": "advanced", "maximum": 15, "minimum": 1, "order": 6, "title": "Google BigQuery Client Chunk Size", "type": "integer" }, "credentials_json": { "instillCredentialField": true, "always_show": true, "description": "The contents of the JSON service account key. Check out the docs if you need help generating this key. Default credentials will be used if this field is left empty.", "group": "connection", "order": 4, "title": "Service Account Key JSON (Required for cloud, optional for open-source)", "type": "string" }, "dataset_id": { "description": "The default BigQuery Dataset ID that tables are replicated to if the source does not specify a namespace. Read more here.", "group": "connection", "order": 2, "title": "Default Dataset ID", "type": "string" }, "dataset_location": { "description": "The location of the dataset. Warning: Changes made after creation will not be applied. Read more here.", "enum": [ "US", "EU", "asia-east1", "asia-east2", "asia-northeast1", "asia-northeast2", "asia-northeast3", "asia-south1", "asia-south2", "asia-southeast1", "asia-southeast2", "australia-southeast1", "australia-southeast2", "europe-central1", "europe-central2", "europe-north1", "europe-southwest1", "europe-west1", "europe-west2", "europe-west3", "europe-west4", "europe-west6", "europe-west7", "europe-west8", "europe-west9", "europe-west12", "me-central1", "me-central2", "me-west1", "northamerica-northeast1", "northamerica-northeast2", "southamerica-east1", "southamerica-west1", "us-central1", "us-east1", "us-east2", "us-east3", "us-east4", "us-east5", "us-south1", "us-west1", "us-west2", "us-west3", "us-west4" ], "group": "connection", "order": 1, "title": "Dataset Location", "type": "string" }, "destination": { "const": "airbyte-destination-bigquery", "type": "string" }, "disable_type_dedupe": { "default": false, "description": "Disable Writing Final Tables. WARNING! The data format in _airbyte_data is likely stable but there are no guarantees that other metadata columns will remain the same in future versions", "group": "advanced", "order": 8, "title": "Disable Final Tables. (WARNING! Unstable option; Columns in raw table schema might change between versions)", "type": "boolean" }, "loading_method": { "description": "The way data will be uploaded to BigQuery.", "display_type": "radio", "group": "connection", "oneOf": [ { "description": "(recommended) Writes large batches of records to a file, uploads the file to GCS, then uses COPY INTO to load your data into BigQuery. Provides best-in-class speed, reliability and scalability. Read more about GCS Staging here.", "properties": { "credential": { "description": "An HMAC key is a type of credential and can be associated with a service account or a user account in Cloud Storage. Read more here.", "oneOf": [ { "properties": { "credential_type": { "const": "HMAC_KEY", "order": 0, "type": "string" }, "hmac_key_access_id": { "instillCredentialField": true, "description": "HMAC key access ID. When linked to a service account, this ID is 61 characters long; when linked to a user account, it is 24 characters long.", "examples": [ "1234567890abcdefghij1234" ], "order": 1, "title": "HMAC Key Access ID", "type": "string" }, "hmac_key_secret": { "instillCredentialField": true, "description": "The corresponding secret for the access ID. It is a 40-character base-64 encoded string.", "examples": [ "1234567890abcdefghij1234567890ABCDEFGHIJ" ], "order": 2, "title": "HMAC Key Secret", "type": "string" } }, "required": [ "credential_type", "hmac_key_access_id", "hmac_key_secret" ], "title": "HMAC key" } ], "order": 1, "title": "Credential", "type": "object" }, "gcs_bucket_name": { "description": "The name of the GCS bucket. Read more here.", "examples": [ "airbyte_sync" ], "order": 2, "title": "GCS Bucket Name", "type": "string" }, "gcs_bucket_path": { "description": "Directory under the GCS bucket where data will be written.", "examples": [ "data_sync/test" ], "order": 3, "title": "GCS Bucket Path", "type": "string" }, "keep_files_in_gcs-bucket": { "default": "Delete all tmp files from GCS", "description": "This upload method is supposed to temporary store records in GCS bucket. By this select you can chose if these records should be removed from GCS when migration has finished. The default \"Delete all tmp files from GCS\" value is used if not set explicitly.", "enum": [ "Delete all tmp files from GCS", "Keep all tmp files in GCS" ], "order": 4, "title": "GCS Tmp Files Afterward Processing", "type": "string" }, "method": { "const": "GCS Staging", "order": 0, "type": "string" } }, "required": [ "method", "gcs_bucket_name", "gcs_bucket_path", "credential" ], "title": "GCS Staging" }, { "description": "(not recommended) Direct loading using SQL INSERT statements. This method is extremely inefficient and provided only for quick testing. In all other cases, you should use GCS staging.", "properties": { "method": { "const": "Standard", "type": "string" } }, "required": [ "method" ], "title": "Standard Inserts" } ], "order": 3, "title": "Loading Method", "type": "object" }, "project_id": { "description": "The GCP project ID for the project containing the target BigQuery dataset. Read more here.", "group": "connection", "order": 0, "title": "Project ID", "type": "string" }, "raw_data_dataset": { "description": "The dataset to write raw tables into (default: airbyte_internal)", "group": "advanced", "order": 7, "title": "Raw Table Dataset Name", "type": "string" }, "transformation_priority": { "default": "interactive", "description": "Interactive run type means that the query is executed as soon as possible, and these queries count towards concurrent rate limit and daily limit. Read more about interactive run type here. Batch queries are queued and started as soon as idle resources are available in the BigQuery shared resource pool, which usually occurs within a few minutes. Batch queries don’t count towards your concurrent rate limit. Read more about batch queries here. The default \"interactive\" value is used if not set explicitly.", "enum": [ "interactive", "batch" ], "group": "advanced", "order": 5, "title": "Transformation Query Run Type", "type": "string" } }, "required": [ "project_id", "dataset_location", "dataset_id", "destination" ], "title": "Bigquery", "type": "object" }, { "$schema": "http://json-schema.org/draft-07/schema#", "additionalProperties": true, "properties": { "address": { "description": "Address to connect to.", "examples": [ "localhost,127.0.0.1" ], "order": 3, "title": "Address", "type": "string" }, "datacenter": { "default": "datacenter1", "description": "Datacenter of the cassandra cluster.", "order": 5, "title": "Datacenter", "type": "string" }, "destination": { "const": "airbyte-destination-cassandra", "type": "string" }, "keyspace": { "description": "Default Cassandra keyspace to create data in.", "order": 0, "title": "Keyspace", "type": "string" }, "password": { "instillCredentialField": true, "description": "Password associated with Cassandra.", "order": 2, "title": "Password", "type": "string" }, "port": { "default": 9042, "description": "Port of Cassandra.", "maximum": 65536, "minimum": 0, "order": 4, "title": "Port", "type": "integer" }, "replication": { "default": 1, "description": "Indicates to how many nodes the data should be replicated to.", "order": 6, "title": "Replication factor", "type": "integer" }, "username": { "description": "Username to use to access Cassandra.", "order": 1, "title": "Username", "type": "string" } }, "required": [ "keyspace", "username", "password", "address", "port", "destination" ], "title": "Cassandra", "type": "object" }, { "description": "The configuration model for the Vector DB based destinations. This model is used to generate the UI for the destination configuration,\nas well as to provide type safety for the configuration passed to the destination.\n\nThe configuration model is composed of four parts:\n* Processing configuration\n* Embedding configuration\n* Indexing configuration\n* Advanced configuration\n\nProcessing, embedding and advanced configuration are provided by this base class, while the indexing configuration is provided by the destination connector in the sub class.", "groups": [ { "id": "processing", "title": "Processing" }, { "id": "embedding", "title": "Embedding" }, { "id": "indexing", "title": "Indexing" }, { "id": "advanced", "title": "Advanced" } ], "properties": { "destination": { "const": "airbyte-destination-chroma", "type": "string" }, "embedding": { "description": "Embedding configuration", "group": "embedding", "oneOf": [ { "description": "Use the Azure-hosted OpenAI API to embed text. This option is using the text-embedding-ada-002 model with 1536 embedding dimensions.", "properties": { "api_base": { "description": "The base URL for your Azure OpenAI resource. You can find this in the Azure portal under your Azure OpenAI resource", "examples": [ "https://your-resource-name.openai.azure.com" ], "title": "Resource base URL", "type": "string" }, "deployment": { "description": "The deployment for your Azure OpenAI resource. You can find this in the Azure portal under your Azure OpenAI resource", "examples": [ "your-resource-name" ], "title": "Deployment", "type": "string" }, "mode": { "const": "azure_openai", "default": "azure_openai", "enum": [ "azure_openai" ], "title": "Mode", "type": "string" }, "openai_key": { "instillCredentialField": true, "description": "The API key for your Azure OpenAI resource. You can find this in the Azure portal under your Azure OpenAI resource", "title": "Azure OpenAI API key", "type": "string" } }, "required": [ "openai_key", "api_base", "deployment", "mode" ], "title": "Azure OpenAI", "type": "object" }, { "description": "Use the OpenAI API to embed text. This option is using the text-embedding-ada-002 model with 1536 embedding dimensions.", "properties": { "mode": { "const": "openai", "default": "openai", "enum": [ "openai" ], "title": "Mode", "type": "string" }, "openai_key": { "instillCredentialField": true, "title": "OpenAI API key", "type": "string" } }, "required": [ "openai_key", "mode" ], "title": "OpenAI", "type": "object" }, { "description": "Use the Cohere API to embed text.", "properties": { "cohere_key": { "instillCredentialField": true, "title": "Cohere API key", "type": "string" }, "mode": { "const": "cohere", "default": "cohere", "enum": [ "cohere" ], "title": "Mode", "type": "string" } }, "required": [ "cohere_key", "mode" ], "title": "Cohere", "type": "object" }, { "description": "Use a field in the record as the embedding. This is useful if you already have an embedding for your data and want to store it in the vector store.", "properties": { "dimensions": { "description": "The number of dimensions the embedding model is generating", "examples": [ 1536, 384 ], "title": "Embedding dimensions", "type": "integer" }, "field_name": { "description": "Name of the field in the record that contains the embedding", "examples": [ "embedding", "vector" ], "title": "Field name", "type": "string" }, "mode": { "const": "from_field", "default": "from_field", "enum": [ "from_field" ], "title": "Mode", "type": "string" } }, "required": [ "field_name", "dimensions", "mode" ], "title": "From Field", "type": "object" }, { "description": "Use a fake embedding made out of random vectors with 1536 embedding dimensions. This is useful for testing the data pipeline without incurring any costs.", "properties": { "mode": { "const": "fake", "default": "fake", "enum": [ "fake" ], "title": "Mode", "type": "string" } }, "required": [ "mode" ], "title": "Fake", "type": "object" }, { "description": "Use a service that's compatible with the OpenAI API to embed text.", "properties": { "api_key": { "instillCredentialField": true, "default": "", "title": "API key", "type": "string" }, "base_url": { "description": "The base URL for your OpenAI-compatible service", "examples": [ "https://your-service-name.com" ], "title": "Base URL", "type": "string" }, "dimensions": { "description": "The number of dimensions the embedding model is generating", "examples": [ 1536, 384 ], "title": "Embedding dimensions", "type": "integer" }, "mode": { "const": "openai_compatible", "default": "openai_compatible", "enum": [ "openai_compatible" ], "title": "Mode", "type": "string" }, "model_name": { "default": "text-embedding-ada-002", "description": "The name of the model to use for embedding", "examples": [ "text-embedding-ada-002" ], "title": "Model name", "type": "string" } }, "required": [ "base_url", "dimensions", "mode" ], "title": "OpenAI-compatible", "type": "object" }, { "description": "Do not calculate embeddings. Chromadb uses the sentence transfomer (https://www.sbert.net/index.html) as a default if an embedding function is not defined. Note that depending on your hardware, calculating embeddings locally can be very slow and is mostly suited for prototypes.", "properties": { "mode": { "const": "no_embedding", "default": "no_embedding", "enum": [ "no_embedding" ], "title": "Mode", "type": "string" } }, "title": "Chroma Default Embedding Function", "type": "object" } ], "title": "Embedding", "type": "object" }, "indexing": { "description": "Indexing configuration", "group": "indexing", "properties": { "auth_method": { "description": "Mode how to connect to Chroma", "oneOf": [ { "description": "Configure Chroma to save and load from your local machine", "properties": { "mode": { "const": "persistent_client", "default": "persistent_client", "enum": [ "persistent_client" ], "title": "Mode", "type": "string" }, "path": { "description": "Where Chroma will store its database files on disk, and load them on start.", "title": "Path", "type": "string" } }, "required": [ "path" ], "title": "Persistent Client Mode", "type": "object" }, { "description": "Authenticate using username and password (suitable for self-managed Chroma clusters)", "properties": { "host": { "description": "The URL to the chromadb instance", "order": 0, "title": "Host", "type": "string" }, "mode": { "const": "http_client", "default": "http_client", "enum": [ "http_client" ], "title": "Mode", "type": "string" }, "password": { "instillCredentialField": true, "default": "", "description": "Password used in server/client mode only", "order": 4, "title": "Password", "type": "string" }, "port": { "description": "The port to the chromadb instance", "order": 1, "title": "Port", "type": "integer" }, "ssl": { "description": "Whether to use SSL to connect to the Chroma server", "order": 2, "title": "SSL", "type": "boolean" }, "username": { "default": "", "description": "Username used in server/client mode only", "order": 3, "title": "Username", "type": "string" } }, "required": [ "host", "port", "ssl" ], "title": "Client/Server Mode", "type": "object" } ], "order": 0, "title": "Connection Mode", "type": "object" }, "collection_name": { "description": "The collection to load data into", "order": 3, "title": "Collection Name", "type": "string" } }, "required": [ "auth_method", "collection_name" ], "title": "Indexing", "type": "object" }, "omit_raw_text": { "default": false, "description": "Do not store the text that gets embedded along with the vector and the metadata in the destination. If set to true, only the vector and the metadata will be stored - in this case raw text for LLM use cases needs to be retrieved from another source.", "group": "advanced", "title": "Do not store raw text", "type": "boolean" }, "processing": { "group": "processing", "properties": { "chunk_overlap": { "default": 0, "description": "Size of overlap between chunks in tokens to store in vector store to better capture relevant context", "title": "Chunk overlap", "type": "integer" }, "chunk_size": { "description": "Size of chunks in tokens to store in vector store (make sure it is not too big for the context if your LLM)", "maximum": 8191, "minimum": 1, "title": "Chunk size", "type": "integer" }, "field_name_mappings": { "default": [], "description": "List of fields to rename. Not applicable for nested fields, but can be used to rename fields already flattened via dot notation.", "items": { "properties": { "from_field": { "description": "The field name in the source", "title": "From field name", "type": "string" }, "to_field": { "description": "The field name to use in the destination", "title": "To field name", "type": "string" } }, "required": [ "from_field", "to_field" ], "title": "FieldNameMappingConfigModel", "type": "object" }, "title": "Field name mappings", "type": "array" }, "metadata_fields": { "always_show": true, "default": [], "description": "List of fields in the record that should be stored as metadata. The field list is applied to all streams in the same way and non-existing fields are ignored. If none are defined, all fields are considered metadata fields. When specifying text fields, you can access nested fields in the record by using dot notation, e.g. `user.name` will access the `name` field in the `user` object. It's also possible to use wildcards to access all fields in an object, e.g. `users.*.name` will access all `names` fields in all entries of the `users` array. When specifying nested paths, all matching values are flattened into an array set to a field named by the path.", "examples": [ "age", "user", "user.name" ], "items": { "type": "string" }, "title": "Fields to store as metadata", "type": "array" }, "text_fields": { "always_show": true, "default": [], "description": "List of fields in the record that should be used to calculate the embedding. The field list is applied to all streams in the same way and non-existing fields are ignored. If none are defined, all fields are considered text fields. When specifying text fields, you can access nested fields in the record by using dot notation, e.g. `user.name` will access the `name` field in the `user` object. It's also possible to use wildcards to access all fields in an object, e.g. `users.*.name` will access all `names` fields in all entries of the `users` array.", "examples": [ "text", "user.name", "users.*.name" ], "items": { "type": "string" }, "title": "Text fields to embed", "type": "array" }, "text_splitter": { "description": "Split text fields into chunks based on the specified method.", "oneOf": [ { "description": "Split the text by the list of separators until the chunk size is reached, using the earlier mentioned separators where possible. This is useful for splitting text fields by paragraphs, sentences, words, etc.", "properties": { "keep_separator": { "default": false, "description": "Whether to keep the separator in the resulting chunks", "title": "Keep separator", "type": "boolean" }, "mode": { "const": "separator", "default": "separator", "enum": [ "separator" ], "title": "Mode", "type": "string" }, "separators": { "default": [ "\"\\n\\n\"", "\"\\n\"", "\" \"", "\"\"" ], "description": "List of separator strings to split text fields by. The separator itself needs to be wrapped in double quotes, e.g. to split by the dot character, use \".\". To split by a newline, use \"\\n\".", "items": { "type": "string" }, "title": "Separators", "type": "array" } }, "required": [ "mode" ], "title": "By Separator", "type": "object" }, { "description": "Split the text by Markdown headers down to the specified header level. If the chunk size fits multiple sections, they will be combined into a single chunk.", "properties": { "mode": { "const": "markdown", "default": "markdown", "enum": [ "markdown" ], "title": "Mode", "type": "string" }, "split_level": { "default": 1, "description": "Level of markdown headers to split text fields by. Headings down to the specified level will be used as split points", "maximum": 6, "minimum": 1, "title": "Split level", "type": "integer" } }, "required": [ "mode" ], "title": "By Markdown header", "type": "object" }, { "description": "Split the text by suitable delimiters based on the programming language. This is useful for splitting code into chunks.", "properties": { "language": { "description": "Split code in suitable places based on the programming language", "enum": [ "cpp", "go", "java", "js", "php", "proto", "python", "rst", "ruby", "rust", "scala", "swift", "markdown", "latex", "html", "sol" ], "title": "Language", "type": "string" }, "mode": { "const": "code", "default": "code", "enum": [ "code" ], "title": "Mode", "type": "string" } }, "required": [ "language", "mode" ], "title": "By Programming Language", "type": "object" } ], "title": "Text splitter", "type": "object" } }, "required": [ "chunk_size" ], "title": "ProcessingConfigModel", "type": "object" } }, "required": [ "embedding", "processing", "indexing", "destination" ], "title": "Chroma", "type": "object" }, { "$schema": "http://json-schema.org/draft-07/schema#", "additionalProperties": true, "properties": { "database": { "description": "Name of the database.", "order": 2, "title": "DB Name", "type": "string" }, "destination": { "const": "airbyte-destination-clickhouse", "type": "string" }, "host": { "description": "Hostname of the database.", "order": 0, "title": "Host", "type": "string" }, "jdbc_url_params": { "description": "Additional properties to pass to the JDBC URL string when connecting to the database formatted as 'key=value' pairs separated by the symbol '&'. (example: key1=value1&key2=value2&key3=value3).", "order": 5, "title": "JDBC URL Params", "type": "string" }, "password": { "instillCredentialField": true, "description": "Password associated with the username.", "order": 4, "title": "Password", "type": "string" }, "port": { "default": 8123, "description": "HTTP port of the database.", "examples": [ "8123" ], "maximum": 65536, "minimum": 0, "order": 1, "title": "Port", "type": "integer" }, "ssl": { "default": false, "description": "Encrypt data using SSL.", "order": 6, "title": "SSL Connection", "type": "boolean" }, "tunnel_method": { "description": "Whether to initiate an SSH tunnel before connecting to the database, and if so, which kind of authentication to use.", "oneOf": [ { "properties": { "tunnel_method": { "const": "NO_TUNNEL", "description": "No ssh tunnel needed to connect to database", "order": 0, "type": "string" } }, "required": [ "tunnel_method" ], "title": "No Tunnel" }, { "properties": { "ssh_key": { "instillCredentialField": true, "description": "OS-level user account ssh key credentials in RSA PEM format ( created with ssh-keygen -t rsa -m PEM -f myuser_rsa )", "multiline": true, "order": 4, "title": "SSH Private Key", "type": "string" }, "tunnel_host": { "description": "Hostname of the jump server host that allows inbound ssh tunnel.", "order": 1, "title": "SSH Tunnel Jump Server Host", "type": "string" }, "tunnel_method": { "const": "SSH_KEY_AUTH", "description": "Connect through a jump server tunnel host using username and ssh key", "order": 0, "type": "string" }, "tunnel_port": { "default": 22, "description": "Port on the proxy/jump server that accepts inbound ssh connections.", "examples": [ "22" ], "maximum": 65536, "minimum": 0, "order": 2, "title": "SSH Connection Port", "type": "integer" }, "tunnel_user": { "description": "OS-level username for logging into the jump server host.", "order": 3, "title": "SSH Login Username", "type": "string" } }, "required": [ "tunnel_method", "tunnel_host", "tunnel_port", "tunnel_user", "ssh_key" ], "title": "SSH Key Authentication" }, { "properties": { "tunnel_host": { "description": "Hostname of the jump server host that allows inbound ssh tunnel.", "order": 1, "title": "SSH Tunnel Jump Server Host", "type": "string" }, "tunnel_method": { "const": "SSH_PASSWORD_AUTH", "description": "Connect through a jump server tunnel host using username and password authentication", "order": 0, "type": "string" }, "tunnel_port": { "default": 22, "description": "Port on the proxy/jump server that accepts inbound ssh connections.", "examples": [ "22" ], "maximum": 65536, "minimum": 0, "order": 2, "title": "SSH Connection Port", "type": "integer" }, "tunnel_user": { "description": "OS-level username for logging into the jump server host", "order": 3, "title": "SSH Login Username", "type": "string" }, "tunnel_user_password": { "instillCredentialField": true, "description": "OS-level password for logging into the jump server host", "order": 4, "title": "Password", "type": "string" } }, "required": [ "tunnel_method", "tunnel_host", "tunnel_port", "tunnel_user", "tunnel_user_password" ], "title": "Password Authentication" } ], "title": "SSH Tunnel Method", "type": "object" }, "username": { "description": "Username to use to access the database.", "order": 3, "title": "User", "type": "string" } }, "required": [ "host", "port", "database", "username", "destination" ], "title": "Clickhouse", "type": "object" }, { "$schema": "http://json-schema.org/draft-07/schema#", "additionalProperties": false, "properties": { "access_key": { "instillCredentialField": "true", "description": "API access key used to send data to a Convex deployment.", "type": "string" }, "deployment_url": { "description": "URL of the Convex deployment that is the destination", "examples": [ "https://murky-swan-635.convex.cloud", "https://cluttered-owl-337.convex.cloud" ], "type": "string" }, "destination": { "const": "airbyte-destination-convex", "type": "string" } }, "required": [ "deployment_url", "access_key", "destination" ], "title": "Convex", "type": "object" }, { "$schema": "http://json-schema.org/draft-07/schema#", "additionalProperties": true, "properties": { "delimiter_type": { "description": "The character delimiting individual cells in the CSV data.", "oneOf": [ { "properties": { "delimiter": { "const": "\\u002c", "type": "string" } }, "required": [ "delimiter" ], "title": "Comma" }, { "properties": { "delimiter": { "const": "\\u003b", "type": "string" } }, "required": [ "delimiter" ], "title": "Semicolon" }, { "properties": { "delimiter": { "const": "\\u007c", "type": "string" } }, "required": [ "delimiter" ], "title": "Pipe" }, { "properties": { "delimiter": { "const": "\\u0009", "type": "string" } }, "required": [ "delimiter" ], "title": "Tab" }, { "properties": { "delimiter": { "const": "\\u0020", "type": "string" } }, "required": [ "delimiter" ], "title": "Space" } ], "title": "Delimiter", "type": "object" }, "destination": { "const": "airbyte-destination-csv", "type": "string" }, "destination_path": { "description": "Path to the directory where csv files will be written. The destination uses the local mount \"/local\" and any data files will be placed inside that local mount. For more information check out our docs", "examples": [ "/local" ], "type": "string" } }, "required": [ "destination_path", "destination" ], "title": "Csv", "type": "object" }, { "$schema": "http://json-schema.org/draft-07/schema#", "additionalProperties": true, "properties": { "api_host": { "default": "https://api.cumul.io", "description": "URL of the Cumul.io API (e.g. 'https://api.cumul.io', 'https://api.us.cumul.io', or VPC-specific API url). Defaults to 'https://api.cumul.io'.", "order": 0, "title": "Cumul.io API Host URL", "type": "string" }, "api_key": { "instillCredentialField": true, "description": "An API key generated in Cumul.io's platform (can be generated here: https://app.cumul.io/start/profile/integration).", "order": 1, "title": "Cumul.io API Key", "type": "string" }, "api_token": { "instillCredentialField": true, "description": "The corresponding API token generated in Cumul.io's platform (can be generated here: https://app.cumul.io/start/profile/integration).", "order": 2, "title": "Cumul.io API Token", "type": "string" }, "destination": { "const": "airbyte-destination-cumulio", "type": "string" } }, "required": [ "api_host", "api_key", "api_token", "destination" ], "title": "Cumulio", "type": "object" }, { "$schema": "http://json-schema.org/draft-07/schema#", "additionalProperties": true, "properties": { "database": { "description": "Name of the database.", "order": 3, "title": "DB Name", "type": "string" }, "destination": { "const": "airbyte-destination-databend", "type": "string" }, "host": { "description": "Hostname of the database.", "order": 0, "title": "Host", "type": "string" }, "password": { "instillCredentialField": true, "description": "Password associated with the username.", "order": 6, "title": "Password", "type": "string" }, "port": { "default": 443, "description": "Port of the database.", "examples": [ "443" ], "maximum": 65536, "minimum": 0, "order": 2, "title": "Port", "type": "integer" }, "table": { "default": "default", "description": "The default table was written to.", "examples": [ "default" ], "order": 4, "title": "Default Table", "type": "string" }, "username": { "description": "Username to use to access the database.", "order": 5, "title": "User", "type": "string" } }, "required": [ "host", "username", "database", "destination" ], "title": "Databend", "type": "object" }, { "$schema": "http://json-schema.org/draft-07/schema#", "properties": { "accept_terms": { "default": false, "description": "You must agree to the Databricks JDBC Driver Terms & Conditions to use this connector.", "order": 1, "title": "Agree to the Databricks JDBC Driver Terms & Conditions", "type": "boolean" }, "data_source": { "default": "MANAGED_TABLES_STORAGE", "description": "Storage on which the delta lake is built.", "oneOf": [ { "properties": { "data_source_type": { "const": "MANAGED_TABLES_STORAGE", "order": 0, "type": "string" } }, "required": [ "data_source_type" ], "title": "[Recommended] Managed tables" }, { "properties": { "data_source_type": { "const": "S3_STORAGE", "order": 1, "type": "string" }, "file_name_pattern": { "description": "The pattern allows you to set the file-name format for the S3 staging file(s)", "examples": [ "{date}", "{date:yyyy_MM}", "{timestamp}", "{part_number}", "{sync_id}" ], "order": 7, "title": "S3 Filename pattern", "type": "string" }, "s3_access_key_id": { "instillCredentialField": true, "description": "The Access Key Id granting allow one to access the above S3 staging bucket. Airbyte requires Read and Write permissions to the given bucket.", "examples": [ "A012345678910EXAMPLE" ], "order": 5, "title": "S3 Access Key ID", "type": "string" }, "s3_bucket_name": { "description": "The name of the S3 bucket to use for intermittent staging of the data.", "examples": [ "airbyte.staging" ], "order": 2, "title": "S3 Bucket Name", "type": "string" }, "s3_bucket_path": { "description": "The directory under the S3 bucket where data will be written.", "examples": [ "data_sync/test" ], "order": 3, "title": "S3 Bucket Path", "type": "string" }, "s3_bucket_region": { "default": "", "description": "The region of the S3 staging bucket to use if utilising a copy strategy.", "enum": [ "", "us-east-1", "us-east-2", "us-west-1", "us-west-2", "af-south-1", "ap-east-1", "ap-south-1", "ap-northeast-1", "ap-northeast-2", "ap-northeast-3", "ap-southeast-1", "ap-southeast-2", "ca-central-1", "cn-north-1", "cn-northwest-1", "eu-central-1", "eu-north-1", "eu-south-1", "eu-west-1", "eu-west-2", "eu-west-3", "sa-east-1", "me-south-1", "us-gov-east-1", "us-gov-west-1" ], "order": 4, "title": "S3 Bucket Region", "type": "string" }, "s3_secret_access_key": { "instillCredentialField": true, "description": "The corresponding secret to the above access key id.", "examples": [ "a012345678910ABCDEFGH/AbCdEfGhEXAMPLEKEY" ], "order": 6, "title": "S3 Secret Access Key", "type": "string" } }, "required": [ "data_source_type", "s3_bucket_name", "s3_bucket_path", "s3_bucket_region", "s3_access_key_id", "s3_secret_access_key" ], "title": "Amazon S3" }, { "properties": { "azure_blob_storage_account_name": { "description": "The account's name of the Azure Blob Storage.", "examples": [ "airbyte5storage" ], "order": 2, "title": "Azure Blob Storage Account Name", "type": "string" }, "azure_blob_storage_container_name": { "description": "The name of the Azure blob storage container.", "examples": [ "airbytetestcontainername" ], "order": 3, "title": "Azure Blob Storage Container Name", "type": "string" }, "azure_blob_storage_endpoint_domain_name": { "default": "blob.core.windows.net", "description": "This is Azure Blob Storage endpoint domain name. Leave default value (or leave it empty if run container from command line) to use Microsoft native from example.", "examples": [ "blob.core.windows.net" ], "order": 1, "title": "Endpoint Domain Name", "type": "string" }, "azure_blob_storage_sas_token": { "instillCredentialField": true, "description": "Shared access signature (SAS) token to grant limited access to objects in your storage account.", "examples": [ "?sv=2016-05-31&ss=b&srt=sco&sp=rwdl&se=2018-06-27T10:05:50Z&st=2017-06-27T02:05:50Z&spr=https,http&sig=bgqQwoXwxzuD2GJfagRg7VOS8hzNr3QLT7rhS8OFRLQ%3D" ], "order": 4, "title": "SAS Token", "type": "string" }, "data_source_type": { "const": "AZURE_BLOB_STORAGE", "order": 0, "type": "string" } }, "required": [ "data_source_type", "azure_blob_storage_account_name", "azure_blob_storage_container_name", "azure_blob_storage_sas_token" ], "title": "Azure Blob Storage" } ], "order": 9, "title": "Data Source", "type": "object" }, "database": { "description": "The name of the catalog. If not specified otherwise, the \"hive_metastore\" will be used.", "order": 6, "title": "Databricks catalog", "type": "string" }, "databricks_http_path": { "description": "Databricks Cluster HTTP Path.", "examples": [ "sql/protocolvx/o/1234567489/0000-1111111-abcd90" ], "order": 3, "title": "HTTP Path", "type": "string" }, "databricks_personal_access_token": { "instillCredentialField": true, "description": "Databricks Personal Access Token for making authenticated requests.", "examples": [ "dapi0123456789abcdefghij0123456789AB" ], "order": 5, "title": "Access Token", "type": "string" }, "databricks_port": { "default": "443", "description": "Databricks Cluster Port.", "examples": [ "443" ], "order": 4, "title": "Port", "type": "string" }, "databricks_server_hostname": { "description": "Databricks Cluster Server Hostname.", "examples": [ "abc-12345678-wxyz.cloud.databricks.com" ], "order": 2, "title": "Server Hostname", "type": "string" }, "destination": { "const": "airbyte-destination-databricks", "type": "string" }, "enable_schema_evolution": { "default": false, "description": "Support schema evolution for all streams. If \"false\", the connector might fail when a stream's schema changes.", "order": 8, "title": "Support schema evolution for all streams.", "type": "boolean" }, "purge_staging_data": { "default": true, "description": "Default to 'true'. Switch it to 'false' for debugging purpose.", "order": 10, "title": "Purge Staging Files and Tables", "type": "boolean" }, "schema": { "default": "default", "description": "The default schema tables are written. If not specified otherwise, the \"default\" will be used.", "examples": [ "default" ], "order": 7, "title": "Default Schema", "type": "string" } }, "required": [ "accept_terms", "databricks_server_hostname", "databricks_http_path", "databricks_personal_access_token", "data_source", "destination" ], "title": "Databricks", "type": "object" }, { "$schema": "http://json-schema.org/draft-07/schema#", "properties": { "database": { "description": "Name of the database.", "order": 3, "title": "DataBase Name", "type": "string" }, "destination": { "const": "airbyte-destination-doris", "type": "string" }, "host": { "description": "Hostname of the database", "order": 0, "title": "Host", "type": "string" }, "httpport": { "default": 8030, "description": "Http Port of the database.", "examples": [ "8030" ], "maximum": 65536, "minimum": 0, "order": 1, "title": "HttpPort", "type": "integer" }, "password": { "instillCredentialField": true, "description": "Password associated with the username.", "order": 5, "title": "Password", "type": "string" }, "queryport": { "default": 9030, "description": "Query(SQL) Port of the database.", "examples": [ "9030" ], "maximum": 65536, "minimum": 0, "order": 2, "title": "QueryPort", "type": "integer" }, "username": { "description": "Username to use to access the database.", "order": 4, "title": "UserName", "type": "string" } }, "required": [ "host", "httpport", "queryport", "username", "database", "destination" ], "title": "Doris", "type": "object" }, { "$schema": "http://json-schema.org/draft-07/schema#", "additionalProperties": true, "properties": { "destination": { "const": "airbyte-destination-duckdb", "type": "string" }, "destination_path": { "description": "Path to the .duckdb file, or the text 'md:' to connect to MotherDuck. The file will be placed inside that local mount. For more information check out our docs", "examples": [ "/local/destination.duckdb", "md:", "motherduck:" ], "title": "Destination DB", "type": "string" }, "motherduck_api_key": { "instillCredentialField": true, "description": "API key to use for authentication to a MotherDuck database.", "title": "MotherDuck API Key", "type": "string" }, "schema": { "description": "Database schema name, default for duckdb is 'main'.", "example": "main", "title": "Destination Schema", "type": "string" } }, "required": [ "destination_path", "destination" ], "title": "Duckdb", "type": "object" }, { "$schema": "http://json-schema.org/draft-07/schema#", "additionalProperties": false, "properties": { "access_key_id": { "instillCredentialField": true, "description": "The access key id to access the DynamoDB. Airbyte requires Read and Write permissions to the DynamoDB.", "examples": [ "A012345678910EXAMPLE" ], "title": "DynamoDB Key Id", "type": "string" }, "destination": { "const": "airbyte-destination-dynamodb", "type": "string" }, "dynamodb_endpoint": { "default": "", "description": "This is your DynamoDB endpoint url.(if you are working with AWS DynamoDB, just leave empty).", "examples": [ "http://localhost:9000" ], "title": "Endpoint", "type": "string" }, "dynamodb_region": { "default": "", "description": "The region of the DynamoDB.", "enum": [ "", "us-east-1", "us-east-2", "us-west-1", "us-west-2", "af-south-1", "ap-east-1", "ap-south-1", "ap-northeast-1", "ap-northeast-2", "ap-northeast-3", "ap-southeast-1", "ap-southeast-2", "ca-central-1", "cn-north-1", "cn-northwest-1", "eu-central-1", "eu-north-1", "eu-south-1", "eu-west-1", "eu-west-2", "eu-west-3", "sa-east-1", "me-south-1", "us-gov-east-1", "us-gov-west-1" ], "title": "DynamoDB Region", "type": "string" }, "dynamodb_table_name_prefix": { "description": "The prefix to use when naming DynamoDB tables.", "examples": [ "airbyte_sync" ], "title": "Table name prefix", "type": "string" }, "secret_access_key": { "instillCredentialField": true, "description": "The corresponding secret to the access key id.", "examples": [ "a012345678910ABCDEFGH/AbCdEfGhEXAMPLEKEY" ], "title": "DynamoDB Access Key", "type": "string" } }, "required": [ "dynamodb_table_name_prefix", "dynamodb_region", "access_key_id", "secret_access_key", "destination" ], "title": "Dynamodb", "type": "object" }, { "$schema": "http://json-schema.org/draft-07/schema#", "properties": { "destination": { "const": "airbyte-destination-e2e-test", "type": "string" }, "test_destination": { "description": "The type of destination to be used", "oneOf": [ { "properties": { "logging_config": { "description": "Configurate how the messages are logged.", "oneOf": [ { "description": "Log first N entries per stream.", "properties": { "logging_type": { "default": "FirstN", "enum": [ "FirstN" ], "type": "string" }, "max_entry_count": { "default": 100, "description": "Number of entries to log. This destination is for testing only. So it won't make sense to log infinitely. The maximum is 1,000 entries.", "examples": [ 100 ], "maximum": 1000, "minimum": 1, "title": "N", "type": "number" } }, "required": [ "logging_type", "max_entry_count" ], "title": "First N Entries", "type": "object" }, { "description": "For each stream, log every N-th entry with a maximum cap.", "properties": { "logging_type": { "default": "EveryNth", "enum": [ "EveryNth" ], "type": "string" }, "max_entry_count": { "default": 100, "description": "Max number of entries to log. This destination is for testing only. So it won't make sense to log infinitely. The maximum is 1,000 entries.", "examples": [ 100 ], "maximum": 1000, "minimum": 1, "title": "Max Log Entries", "type": "number" }, "nth_entry_to_log": { "description": "The N-th entry to log for each stream. N starts from 1. For example, when N = 1, every entry is logged; when N = 2, every other entry is logged; when N = 3, one out of three entries is logged.", "example": [ 3 ], "maximum": 1000, "minimum": 1, "title": "N", "type": "number" } }, "required": [ "logging_type", "nth_entry_to_log", "max_entry_count" ], "title": "Every N-th Entry", "type": "object" }, { "description": "For each stream, randomly log a percentage of the entries with a maximum cap.", "properties": { "logging_type": { "default": "RandomSampling", "enum": [ "RandomSampling" ], "type": "string" }, "max_entry_count": { "default": 100, "description": "Max number of entries to log. This destination is for testing only. So it won't make sense to log infinitely. The maximum is 1,000 entries.", "examples": [ 100 ], "maximum": 1000, "minimum": 1, "title": "Max Log Entries", "type": "number" }, "sampling_ratio": { "default": 0.001, "description": "A positive floating number smaller than 1.", "examples": [ 0.001 ], "maximum": 1, "minimum": 0, "title": "Sampling Ratio", "type": "number" }, "seed": { "description": "When the seed is unspecified, the current time millis will be used as the seed.", "examples": [ 1900 ], "title": "Random Number Generator Seed", "type": "number" } }, "required": [ "logging_type", "sampling_ratio", "max_entry_count" ], "title": "Random Sampling", "type": "object" } ], "title": "Logging Configuration", "type": "object" }, "test_destination_type": { "const": "LOGGING", "default": "LOGGING", "type": "string" } }, "required": [ "test_destination_type", "logging_config" ], "title": "Logging" }, { "properties": { "test_destination_type": { "const": "SILENT", "default": "SILENT", "type": "string" } }, "required": [ "test_destination_type" ], "title": "Silent" }, { "properties": { "millis_per_record": { "description": "Number of milli-second to pause in between records.", "type": "integer" }, "test_destination_type": { "const": "THROTTLED", "default": "THROTTLED", "type": "string" } }, "required": [ "test_destination_type", "millis_per_record" ], "title": "Throttled" }, { "properties": { "num_messages": { "description": "Number of messages after which to fail.", "type": "integer" }, "test_destination_type": { "const": "FAILING", "default": "FAILING", "type": "string" } }, "required": [ "test_destination_type", "num_messages" ], "title": "Failing" } ], "title": "Test Destination", "type": "object" } }, "required": [ "test_destination", "destination" ], "title": "E2etest", "type": "object" }, { "$schema": "http://json-schema.org/draft-07/schema#", "additionalProperties": false, "properties": { "authenticationMethod": { "description": "The type of authentication to be used", "oneOf": [ { "additionalProperties": false, "description": "No authentication will be used", "properties": { "method": { "const": "none", "type": "string" } }, "required": [ "method" ], "title": "None" }, { "additionalProperties": false, "description": "Use a api key and secret combination to authenticate", "properties": { "apiKeyId": { "description": "The Key ID to used when accessing an enterprise Elasticsearch instance.", "title": "API Key ID", "type": "string" }, "apiKeySecret": { "instillCredentialField": true, "description": "The secret associated with the API Key ID.", "title": "API Key Secret", "type": "string" }, "method": { "const": "secret", "type": "string" } }, "required": [ "method", "apiKeyId", "apiKeySecret" ], "title": "Api Key/Secret" }, { "additionalProperties": false, "description": "Basic auth header with a username and password", "properties": { "method": { "const": "basic", "type": "string" }, "password": { "instillCredentialField": true, "description": "Basic auth password to access a secure Elasticsearch server", "title": "Password", "type": "string" }, "username": { "description": "Basic auth username to access a secure Elasticsearch server", "title": "Username", "type": "string" } }, "required": [ "method", "username", "password" ], "title": "Username/Password" } ], "title": "Authentication Method", "type": "object" }, "ca_certificate": { "instillCredentialField": true, "description": "CA certificate", "multiline": true, "title": "CA certificate", "type": "string" }, "destination": { "const": "airbyte-destination-elasticsearch", "type": "string" }, "endpoint": { "description": "The full url of the Elasticsearch server", "title": "Server Endpoint", "type": "string" }, "tunnel_method": { "description": "Whether to initiate an SSH tunnel before connecting to the database, and if so, which kind of authentication to use.", "oneOf": [ { "properties": { "tunnel_method": { "const": "NO_TUNNEL", "description": "No ssh tunnel needed to connect to database", "order": 0, "type": "string" } }, "required": [ "tunnel_method" ], "title": "No Tunnel" }, { "properties": { "ssh_key": { "instillCredentialField": true, "description": "OS-level user account ssh key credentials in RSA PEM format ( created with ssh-keygen -t rsa -m PEM -f myuser_rsa )", "multiline": true, "order": 4, "title": "SSH Private Key", "type": "string" }, "tunnel_host": { "description": "Hostname of the jump server host that allows inbound ssh tunnel.", "order": 1, "title": "SSH Tunnel Jump Server Host", "type": "string" }, "tunnel_method": { "const": "SSH_KEY_AUTH", "description": "Connect through a jump server tunnel host using username and ssh key", "order": 0, "type": "string" }, "tunnel_port": { "default": 22, "description": "Port on the proxy/jump server that accepts inbound ssh connections.", "examples": [ "22" ], "maximum": 65536, "minimum": 0, "order": 2, "title": "SSH Connection Port", "type": "integer" }, "tunnel_user": { "description": "OS-level username for logging into the jump server host.", "order": 3, "title": "SSH Login Username", "type": "string" } }, "required": [ "tunnel_method", "tunnel_host", "tunnel_port", "tunnel_user", "ssh_key" ], "title": "SSH Key Authentication" }, { "properties": { "tunnel_host": { "description": "Hostname of the jump server host that allows inbound ssh tunnel.", "order": 1, "title": "SSH Tunnel Jump Server Host", "type": "string" }, "tunnel_method": { "const": "SSH_PASSWORD_AUTH", "description": "Connect through a jump server tunnel host using username and password authentication", "order": 0, "type": "string" }, "tunnel_port": { "default": 22, "description": "Port on the proxy/jump server that accepts inbound ssh connections.", "examples": [ "22" ], "maximum": 65536, "minimum": 0, "order": 2, "title": "SSH Connection Port", "type": "integer" }, "tunnel_user": { "description": "OS-level username for logging into the jump server host", "order": 3, "title": "SSH Login Username", "type": "string" }, "tunnel_user_password": { "instillCredentialField": true, "description": "OS-level password for logging into the jump server host", "order": 4, "title": "Password", "type": "string" } }, "required": [ "tunnel_method", "tunnel_host", "tunnel_port", "tunnel_user", "tunnel_user_password" ], "title": "Password Authentication" } ], "title": "SSH Tunnel Method", "type": "object" }, "upsert": { "default": true, "description": "If a primary key identifier is defined in the source, an upsert will be performed using the primary key value as the elasticsearch doc id. Does not support composite primary keys.", "title": "Upsert Records", "type": "boolean" } }, "required": [ "endpoint", "destination" ], "title": "Elasticsearch", "type": "object" }, { "$schema": "http://json-schema.org/draft-07/schema#", "additionalProperties": true, "properties": { "certificateFingerprint": { "description": "Fingerprint of the Exasol server's TLS certificate", "examples": [ "ABC123..." ], "order": 2, "title": "Certificate Fingerprint", "type": "string" }, "destination": { "const": "airbyte-destination-exasol", "type": "string" }, "host": { "description": "Hostname of the database.", "order": 0, "title": "Host", "type": "string" }, "jdbc_url_params": { "description": "Additional properties to pass to the JDBC URL string when connecting to the database formatted as 'key=value' pairs separated by the symbol ';'. (example: key1=value1;key2=value2;key3=value3).", "order": 6, "title": "JDBC URL Params", "type": "string" }, "password": { "instillCredentialField": true, "description": "Password associated with the username.", "order": 4, "title": "Password", "type": "string" }, "port": { "default": 8563, "description": "Port of the database.", "examples": [ "8563" ], "maximum": 65536, "minimum": 0, "order": 1, "title": "Port", "type": "integer" }, "schema": { "description": "Schema Name", "order": 5, "title": "Schema Name", "type": "string" }, "username": { "description": "Username to use to access the database.", "order": 3, "title": "User", "type": "string" } }, "required": [ "host", "port", "username", "schema", "destination" ], "title": "Exasol", "type": "object" }, { "$schema": "http://json-schema.org/draft-07/schema#", "additionalProperties": false, "properties": { "account": { "description": "Firebolt account to login.", "title": "Account", "type": "string" }, "database": { "description": "The database to connect to.", "title": "Database", "type": "string" }, "destination": { "const": "airbyte-destination-firebolt", "type": "string" }, "engine": { "description": "Engine name or url to connect to.", "title": "Engine", "type": "string" }, "host": { "description": "The host name of your Firebolt database.", "examples": [ "api.app.firebolt.io" ], "title": "Host", "type": "string" }, "loading_method": { "description": "Loading method used to select the way data will be uploaded to Firebolt", "oneOf": [ { "additionalProperties": false, "properties": { "method": { "const": "SQL", "type": "string" } }, "required": [ "method" ], "title": "SQL Inserts" }, { "additionalProperties": false, "properties": { "aws_key_id": { "instillCredentialField": true, "description": "AWS access key granting read and write access to S3.", "title": "AWS Key ID", "type": "string" }, "aws_key_secret": { "instillCredentialField": true, "description": "Corresponding secret part of the AWS Key", "title": "AWS Key Secret", "type": "string" }, "method": { "const": "S3", "type": "string" }, "s3_bucket": { "description": "The name of the S3 bucket.", "title": "S3 bucket name", "type": "string" }, "s3_region": { "description": "Region name of the S3 bucket.", "examples": [ "us-east-1" ], "title": "S3 region name", "type": "string" } }, "required": [ "method", "s3_bucket", "s3_region", "aws_key_id", "aws_key_secret" ], "title": "External Table via S3" } ], "title": "Loading Method", "type": "object" }, "password": { "instillCredentialField": true, "description": "Firebolt password.", "order": 1, "title": "Password", "type": "string" }, "username": { "description": "Firebolt email address you use to login.", "examples": [ "username@email.com" ], "order": 0, "title": "Username", "type": "string" } }, "required": [ "username", "password", "database", "destination" ], "title": "Firebolt", "type": "object" }, { "$schema": "http://json-schema.org/draft-07/schema#", "additionalProperties": false, "properties": { "credentials_json": { "instillCredentialField": true, "description": "The contents of the JSON service account key. Check out the docs if you need help generating this key. Default credentials will be used if this field is left empty.", "title": "Credentials JSON", "type": "string" }, "destination": { "const": "airbyte-destination-firestore", "type": "string" }, "project_id": { "description": "The GCP project ID for the project containing the target BigQuery dataset.", "title": "Project ID", "type": "string" } }, "required": [ "project_id", "destination" ], "title": "Firestore", "type": "object" }, { "$schema": "http://json-schema.org/draft-07/schema#", "properties": { "credential": { "description": "An HMAC key is a type of credential and can be associated with a service account or a user account in Cloud Storage. Read more here.", "oneOf": [ { "properties": { "credential_type": { "default": "HMAC_KEY", "enum": [ "HMAC_KEY" ], "type": "string" }, "hmac_key_access_id": { "instillCredentialField": true, "description": "When linked to a service account, this ID is 61 characters long; when linked to a user account, it is 24 characters long. Read more here.", "examples": [ "1234567890abcdefghij1234" ], "order": 0, "title": "Access ID", "type": "string" }, "hmac_key_secret": { "instillCredentialField": true, "description": "The corresponding secret for the access ID. It is a 40-character base-64 encoded string. Read more here.", "examples": [ "1234567890abcdefghij1234567890ABCDEFGHIJ" ], "order": 1, "title": "Secret", "type": "string" } }, "required": [ "credential_type", "hmac_key_access_id", "hmac_key_secret" ], "title": "HMAC Key" } ], "order": 0, "title": "Authentication", "type": "object" }, "destination": { "const": "airbyte-destination-gcs", "type": "string" }, "format": { "description": "Output data format. One of the following formats must be selected - AVRO format, PARQUET format, CSV format, or JSONL format.", "oneOf": [ { "properties": { "compression_codec": { "description": "The compression algorithm used to compress data. Default to no compression.", "oneOf": [ { "properties": { "codec": { "default": "no compression", "enum": [ "no compression" ], "type": "string" } }, "required": [ "codec" ], "title": "No Compression" }, { "properties": { "codec": { "default": "Deflate", "enum": [ "Deflate" ], "type": "string" }, "compression_level": { "default": 0, "description": "0: no compression & fastest, 9: best compression & slowest.", "maximum": 9, "minimum": 0, "title": "Deflate level", "type": "integer" } }, "required": [ "codec" ], "title": "Deflate" }, { "properties": { "codec": { "default": "bzip2", "enum": [ "bzip2" ], "type": "string" } }, "required": [ "codec" ], "title": "bzip2" }, { "properties": { "codec": { "default": "xz", "enum": [ "xz" ], "type": "string" }, "compression_level": { "default": 6, "description": "The presets 0-3 are fast presets with medium compression. The presets 4-6 are fairly slow presets with high compression. The default preset is 6. The presets 7-9 are like the preset 6 but use bigger dictionaries and have higher compressor and decompressor memory requirements. Unless the uncompressed size of the file exceeds 8 MiB, 16 MiB, or 32 MiB, it is waste of memory to use the presets 7, 8, or 9, respectively. Read more here for details.", "maximum": 9, "minimum": 0, "title": "Compression Level", "type": "integer" } }, "required": [ "codec" ], "title": "xz" }, { "properties": { "codec": { "default": "zstandard", "enum": [ "zstandard" ], "type": "string" }, "compression_level": { "default": 3, "description": "Negative levels are 'fast' modes akin to lz4 or snappy, levels above 9 are generally for archival purposes, and levels above 18 use a lot of memory.", "maximum": 22, "minimum": -5, "title": "Compression Level", "type": "integer" }, "include_checksum": { "default": false, "description": "If true, include a checksum with each data block.", "title": "Include Checksum", "type": "boolean" } }, "required": [ "codec" ], "title": "zstandard" }, { "properties": { "codec": { "default": "snappy", "enum": [ "snappy" ], "type": "string" } }, "required": [ "codec" ], "title": "snappy" } ], "title": "Compression Codec", "type": "object" }, "format_type": { "default": "Avro", "enum": [ "Avro" ], "type": "string" } }, "required": [ "format_type", "compression_codec" ], "title": "Avro: Apache Avro" }, { "properties": { "compression": { "description": "Whether the output files should be compressed. If compression is selected, the output filename will have an extra extension (GZIP: \".csv.gz\").", "oneOf": [ { "properties": { "compression_type": { "default": "No Compression", "enum": [ "No Compression" ], "type": "string" } }, "requires": [ "compression_type" ], "title": "No Compression" }, { "properties": { "compression_type": { "default": "GZIP", "enum": [ "GZIP" ], "type": "string" } }, "requires": [ "compression_type" ], "title": "GZIP" } ], "title": "Compression", "type": "object" }, "flattening": { "default": "No flattening", "description": "Whether the input JSON data should be normalized (flattened) in the output CSV. Please refer to docs for details.", "enum": [ "No flattening", "Root level flattening" ], "title": "Normalization", "type": "string" }, "format_type": { "default": "CSV", "enum": [ "CSV" ], "type": "string" } }, "required": [ "format_type" ], "title": "CSV: Comma-Separated Values" }, { "properties": { "compression": { "description": "Whether the output files should be compressed. If compression is selected, the output filename will have an extra extension (GZIP: \".jsonl.gz\").", "oneOf": [ { "properties": { "compression_type": { "default": "No Compression", "enum": [ "No Compression" ], "type": "string" } }, "requires": "compression_type", "title": "No Compression" }, { "properties": { "compression_type": { "default": "GZIP", "enum": [ "GZIP" ], "type": "string" } }, "requires": "compression_type", "title": "GZIP" } ], "title": "Compression", "type": "object" }, "format_type": { "default": "JSONL", "enum": [ "JSONL" ], "type": "string" } }, "required": [ "format_type" ], "title": "JSON Lines: newline-delimited JSON" }, { "properties": { "block_size_mb": { "default": 128, "description": "This is the size of a row group being buffered in memory. It limits the memory usage when writing. Larger values will improve the IO when reading, but consume more memory when writing. Default: 128 MB.", "examples": [ 128 ], "title": "Block Size (Row Group Size) (MB)", "type": "integer" }, "compression_codec": { "default": "UNCOMPRESSED", "description": "The compression algorithm used to compress data pages.", "enum": [ "UNCOMPRESSED", "SNAPPY", "GZIP", "LZO", "BROTLI", "LZ4", "ZSTD" ], "title": "Compression Codec", "type": "string" }, "dictionary_encoding": { "default": true, "description": "Default: true.", "title": "Dictionary Encoding", "type": "boolean" }, "dictionary_page_size_kb": { "default": 1024, "description": "There is one dictionary page per column per row group when dictionary encoding is used. The dictionary page size works like the page size but for dictionary. Default: 1024 KB.", "examples": [ 1024 ], "title": "Dictionary Page Size (KB)", "type": "integer" }, "format_type": { "default": "Parquet", "enum": [ "Parquet" ], "type": "string" }, "max_padding_size_mb": { "default": 8, "description": "Maximum size allowed as padding to align row groups. This is also the minimum size of a row group. Default: 8 MB.", "examples": [ 8 ], "title": "Max Padding Size (MB)", "type": "integer" }, "page_size_kb": { "default": 1024, "description": "The page size is for compression. A block is composed of pages. A page is the smallest unit that must be read fully to access a single record. If this value is too small, the compression will deteriorate. Default: 1024 KB.", "examples": [ 1024 ], "title": "Page Size (KB)", "type": "integer" } }, "required": [ "format_type" ], "title": "Parquet: Columnar Storage" } ], "order": 4, "title": "Output Format", "type": "object" }, "gcs_bucket_name": { "description": "You can find the bucket name in the App Engine Admin console Application Settings page, under the label Google Cloud Storage Bucket. Read more here.", "examples": [ "airbyte_sync" ], "order": 1, "title": "GCS Bucket Name", "type": "string" }, "gcs_bucket_path": { "description": "GCS Bucket Path string Subdirectory under the above bucket to sync the data into.", "examples": [ "data_sync/test" ], "order": 2, "title": "GCS Bucket Path", "type": "string" }, "gcs_bucket_region": { "default": "us", "description": "Select a Region of the GCS Bucket. Read more here.", "enum": [ "northamerica-northeast1", "northamerica-northeast2", "us-central1", "us-east1", "us-east4", "us-west1", "us-west2", "us-west3", "us-west4", "southamerica-east1", "southamerica-west1", "europe-central2", "europe-north1", "europe-west1", "europe-west2", "europe-west3", "europe-west4", "europe-west6", "asia-east1", "asia-east2", "asia-northeast1", "asia-northeast2", "asia-northeast3", "asia-south1", "asia-south2", "asia-southeast1", "asia-southeast2", "australia-southeast1", "australia-southeast2", "asia", "eu", "us", "asia1", "eur4", "nam4" ], "order": 3, "title": "GCS Bucket Region", "type": "string" } }, "required": [ "gcs_bucket_name", "gcs_bucket_path", "credential", "format", "destination" ], "title": "Gcs", "type": "object" }, { "$schema": "http://json-schema.org/draft-07/schema#", "additionalProperties": false, "properties": { "credentials": { "description": "Google API Credentials for connecting to Google Sheets and Google Drive APIs", "properties": { "client_id": { "instillCredentialField": true, "description": "The Client ID of your Google Sheets developer application.", "title": "Client ID", "type": "string" }, "client_secret": { "instillCredentialField": true, "description": "The Client Secret of your Google Sheets developer application.", "title": "Client Secret", "type": "string" }, "refresh_token": { "instillCredentialField": true, "description": "The token for obtaining new access token.", "title": "Refresh Token", "type": "string" } }, "required": [ "client_id", "client_secret", "refresh_token" ], "title": "Authentication via Google (OAuth)", "type": "object" }, "destination": { "const": "airbyte-destination-google-sheets", "type": "string" }, "spreadsheet_id": { "description": "The link to your spreadsheet. See this guide for more details.", "examples": [ "https://docs.google.com/spreadsheets/d/1hLd9Qqti3UyLXZB2aFfUWDT7BG/edit" ], "title": "Spreadsheet Link", "type": "string" } }, "required": [ "spreadsheet_id", "credentials", "destination" ], "title": "Googlesheets", "type": "object" }, { "$schema": "http://json-schema.org/draft-07/schema#", "properties": { "catalog_config": { "description": "Catalog config of Iceberg.", "oneOf": [ { "properties": { "catalog_type": { "default": "Hive", "enum": [ "Hive" ], "order": 0, "title": "Catalog Type", "type": "string" }, "database": { "default": "default", "description": "The default database tables are written to if the source does not specify a namespace. The usual value for this field is \"default\".", "examples": [ "default" ], "order": 2, "title": "Default database", "type": "string" }, "hive_thrift_uri": { "description": "Hive MetaStore thrift server uri of iceberg catalog.", "examples": [ "host:port" ], "order": 1, "title": "Hive Metastore thrift uri", "type": "string" } }, "required": [ "catalog_type", "hive_thrift_uri" ], "title": "HiveCatalog: Use Apache Hive MetaStore" }, { "description": "A Hadoop catalog doesn’t need to connect to a Hive MetaStore, but can only be used with HDFS or similar file systems that support atomic rename.", "properties": { "catalog_type": { "default": "Hadoop", "enum": [ "Hadoop" ], "order": 0, "title": "Catalog Type", "type": "string" }, "database": { "default": "default", "description": "The default database tables are written to if the source does not specify a namespace. The usual value for this field is \"default\".", "examples": [ "default" ], "order": 1, "title": "Default database", "type": "string" } }, "required": [ "catalog_type" ], "title": "HadoopCatalog: Use hierarchical file systems as same as storage config" }, { "description": "Using a table in a relational database to manage Iceberg tables through JDBC. Read more here. Supporting: PostgreSQL", "properties": { "catalog_schema": { "default": "public", "description": "Iceberg catalog metadata tables are written to catalog schema. The usual value for this field is \"public\".", "examples": [ "public" ], "order": 6, "title": "schema for Iceberg catalog", "type": "string" }, "catalog_type": { "default": "Jdbc", "enum": [ "Jdbc" ], "order": 0, "title": "Catalog Type", "type": "string" }, "database": { "default": "public", "description": "The default schema tables are written to if the source does not specify a namespace. The usual value for this field is \"public\".", "examples": [ "public" ], "order": 1, "title": "Default schema", "type": "string" }, "jdbc_url": { "examples": [ "jdbc:postgresql://{host}:{port}/{database}" ], "order": 2, "title": "Jdbc url", "type": "string" }, "password": { "instillCredentialField": true, "description": "Password associated with the username.", "order": 4, "title": "Password", "type": "string" }, "ssl": { "default": false, "description": "Encrypt data using SSL. When activating SSL, please select one of the connection modes.", "order": 5, "title": "SSL Connection", "type": "boolean" }, "username": { "description": "Username to use to access the database.", "order": 3, "title": "User", "type": "string" } }, "required": [ "catalog_type" ], "title": "JdbcCatalog: Use relational database" }, { "description": "The RESTCatalog connects to a REST server at the specified URI", "properties": { "catalog_type": { "default": "Rest", "enum": [ "Rest" ], "order": 0, "title": "Catalog Type", "type": "string" }, "rest_credential": { "instillCredentialField": true, "examples": [ "username:password" ], "order": 2, "title": "A credential to exchange for a token in the OAuth2 client credentials flow.", "type": "string" }, "rest_token": { "instillCredentialField": true, "examples": [ "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiIxMjM0NTY3ODkwIiwibmFtZSI6IkpvaG4gRG9lIiwiaWF0IjoxNTE2MjM5MDIyfQ.SflKxwRJSMeKKF2QT4fwpMeJf36POk6yJV_adQssw5c" ], "order": 3, "title": "A Bearer token which will be used for interaction with the server.", "type": "string" }, "rest_uri": { "examples": [ "http://localhost:12345" ], "order": 1, "title": "REST Server URI", "type": "string" } }, "required": [ "catalog_type", "rest_uri" ], "title": "RESTCatalog" } ], "order": 0, "title": "Iceberg catalog config", "type": "object" }, "destination": { "const": "airbyte-destination-iceberg", "type": "string" }, "format_config": { "description": "File format of Iceberg storage.", "order": 2, "properties": { "auto_compact": { "default": false, "description": "Auto compact data files when stream close", "order": 2, "title": "Auto compact data files", "type": "boolean" }, "compact_target_file_size_in_mb": { "default": 100, "description": "Specify the target size of Iceberg data file when performing a compaction action. ", "order": 3, "title": "Target size of compacted data file", "type": "integer" }, "flush_batch_size": { "default": 10000, "description": "Iceberg data file flush batch size. Incoming rows write to cache firstly; When cache size reaches this 'batch size', flush into real Iceberg data file.", "order": 1, "title": "Data file flushing batch size", "type": "integer" }, "format": { "default": "Parquet", "description": "", "enum": [ "Parquet", "Avro" ], "order": 0, "title": "File storage format", "type": "string" } }, "required": [ "format" ], "title": "File format", "type": "object" }, "storage_config": { "description": "Storage config of Iceberg.", "oneOf": [ { "description": "S3 object storage", "properties": { "access_key_id": { "instillCredentialField": true, "description": "The access key ID to access the S3 bucket. Airbyte requires Read and Write permissions to the given bucket. Read more here.", "examples": [ "A012345678910EXAMPLE" ], "order": 0, "title": "S3 Key ID", "type": "string" }, "s3_bucket_region": { "default": "", "description": "The region of the S3 bucket. See here for all region codes.", "enum": [ "", "us-east-1", "us-east-2", "us-west-1", "us-west-2", "af-south-1", "ap-east-1", "ap-south-1", "ap-northeast-1", "ap-northeast-2", "ap-northeast-3", "ap-southeast-1", "ap-southeast-2", "ca-central-1", "cn-north-1", "cn-northwest-1", "eu-central-1", "eu-north-1", "eu-south-1", "eu-west-1", "eu-west-2", "eu-west-3", "sa-east-1", "me-south-1", "us-gov-east-1", "us-gov-west-1" ], "order": 3, "title": "S3 Bucket Region", "type": "string" }, "s3_endpoint": { "default": "", "description": "Your S3 endpoint url. Read more here", "examples": [ "http://localhost:9000", "localhost:9000" ], "order": 4, "title": "Endpoint", "type": "string" }, "s3_path_style_access": { "default": true, "description": "Use path style access", "examples": [ true, false ], "order": 5, "type": "boolean" }, "s3_warehouse_uri": { "description": "The Warehouse Uri for Iceberg", "examples": [ "s3a://my-bucket/path/to/warehouse", "s3://my-bucket/path/to/warehouse" ], "order": 2, "title": "S3 Warehouse Uri for Iceberg", "type": "string" }, "secret_access_key": { "instillCredentialField": true, "description": "The corresponding secret to the access key ID. Read more here", "examples": [ "a012345678910ABCDEFGH/AbCdEfGhEXAMPLEKEY" ], "order": 1, "title": "S3 Access Key", "type": "string" }, "storage_type": { "default": "S3", "enum": [ "S3" ], "order": 0, "title": "Storage Type", "type": "string" } }, "required": [ "storage_type", "access_key_id", "secret_access_key", "s3_warehouse_uri" ], "title": "S3", "type": "object" }, { "description": "Server-managed object storage", "properties": { "managed_warehouse_name": { "description": "The name of the managed warehouse", "order": 0, "title": "Warehouse name", "type": "string" }, "storage_type": { "default": "MANAGED", "enum": [ "MANAGED" ], "order": 0, "title": "Storage Type", "type": "string" } }, "required": [ "storage_type", "managed_warehouse_name" ], "title": "Server-managed", "type": "object" } ], "order": 1, "title": "Storage config", "type": "object" } }, "required": [ "catalog_config", "storage_config", "format_config", "destination" ], "title": "Iceberg", "type": "object" }, { "$schema": "http://json-schema.org/draft-07/schema#", "additionalProperties": true, "properties": { "acks": { "default": "1", "description": "The number of acknowledgments the producer requires the leader to have received before considering a request complete. This controls the durability of records that are sent.", "enum": [ "0", "1", "all" ], "title": "ACKs", "type": "string" }, "batch_size": { "description": "The producer will attempt to batch records together into fewer requests whenever multiple records are being sent to the same partition.", "examples": [ 16384 ], "title": "Batch Size", "type": "integer" }, "bootstrap_servers": { "description": "A list of host/port pairs to use for establishing the initial connection to the Kafka cluster. The client will make use of all servers irrespective of which servers are specified here for bootstrapping—this list only impacts the initial hosts used to discover the full set of servers. This list should be in the form host1:port1,host2:port2,.... Since these servers are just used for the initial connection to discover the full cluster membership (which may change dynamically), this list need not contain the full set of servers (you may want more than one, though, in case a server is down).", "examples": [ "kafka-broker1:9092,kafka-broker2:9092" ], "title": "Bootstrap Servers", "type": "string" }, "buffer_memory": { "description": "The total bytes of memory the producer can use to buffer records waiting to be sent to the server.", "examples": 33554432, "title": "Buffer Memory", "type": "string" }, "client_dns_lookup": { "default": "use_all_dns_ips", "description": "Controls how the client uses DNS lookups. If set to use_all_dns_ips, connect to each returned IP address in sequence until a successful connection is established. After a disconnection, the next IP is used. Once all IPs have been used once, the client resolves the IP(s) from the hostname again. If set to resolve_canonical_bootstrap_servers_only, resolve each bootstrap address into a list of canonical names. After the bootstrap phase, this behaves the same as use_all_dns_ips. If set to default (deprecated), attempt to connect to the first IP address returned by the lookup, even if the lookup returns multiple IP addresses.", "enum": [ "default", "use_all_dns_ips", "resolve_canonical_bootstrap_servers_only", "use_all_dns_ips" ], "title": "Client DNS Lookup", "type": "string" }, "client_id": { "description": "An ID string to pass to the server when making requests. The purpose of this is to be able to track the source of requests beyond just ip/port by allowing a logical application name to be included in server-side request logging.", "examples": [ "airbyte-producer" ], "title": "Client ID", "type": "string" }, "compression_type": { "default": "none", "description": "The compression type for all data generated by the producer.", "enum": [ "none", "gzip", "snappy", "lz4", "zstd" ], "title": "Compression Type", "type": "string" }, "delivery_timeout_ms": { "description": "An upper bound on the time to report success or failure after a call to 'send()' returns.", "examples": [ 120000 ], "title": "Delivery Timeout", "type": "integer" }, "destination": { "const": "airbyte-destination-kafka", "type": "string" }, "enable_idempotence": { "default": false, "description": "When set to 'true', the producer will ensure that exactly one copy of each message is written in the stream. If 'false', producer retries due to broker failures, etc., may write duplicates of the retried message in the stream.", "title": "Enable Idempotence", "type": "boolean" }, "linger_ms": { "description": "The producer groups together any records that arrive in between request transmissions into a single batched request.", "examples": [ 0 ], "title": "Linger ms", "type": "string" }, "max_block_ms": { "description": "The configuration controls how long the KafkaProducer's send(), partitionsFor(), initTransactions(), sendOffsetsToTransaction(), commitTransaction() and abortTransaction() methods will block.", "examples": [ 60000 ], "title": "Max Block ms", "type": "string" }, "max_in_flight_requests_per_connection": { "description": "The maximum number of unacknowledged requests the client will send on a single connection before blocking. Can be greater than 1, and the maximum value supported with idempotency is 5.", "examples": [ 5 ], "title": "Max in Flight Requests per Connection", "type": "integer" }, "max_request_size": { "description": "The maximum size of a request in bytes.", "examples": [ 1048576 ], "title": "Max Request Size", "type": "integer" }, "protocol": { "description": "Protocol used to communicate with brokers.", "oneOf": [ { "properties": { "security_protocol": { "default": "PLAINTEXT", "enum": [ "PLAINTEXT" ], "type": "string" } }, "required": [ "security_protocol" ], "title": "PLAINTEXT" }, { "properties": { "sasl_jaas_config": { "instillCredentialField": true, "default": "", "description": "JAAS login context parameters for SASL connections in the format used by JAAS configuration files.", "title": "SASL JAAS Config", "type": "string" }, "sasl_mechanism": { "default": "PLAIN", "description": "SASL mechanism used for client connections. This may be any mechanism for which a security provider is available.", "enum": [ "PLAIN" ], "title": "SASL Mechanism", "type": "string" }, "security_protocol": { "default": "SASL_PLAINTEXT", "enum": [ "SASL_PLAINTEXT" ], "type": "string" } }, "required": [ "security_protocol", "sasl_mechanism", "sasl_jaas_config" ], "title": "SASL PLAINTEXT" }, { "properties": { "sasl_jaas_config": { "instillCredentialField": true, "default": "", "description": "JAAS login context parameters for SASL connections in the format used by JAAS configuration files.", "title": "SASL JAAS Config", "type": "string" }, "sasl_mechanism": { "default": "GSSAPI", "description": "SASL mechanism used for client connections. This may be any mechanism for which a security provider is available.", "enum": [ "GSSAPI", "OAUTHBEARER", "SCRAM-SHA-256", "SCRAM-SHA-512", "PLAIN" ], "title": "SASL Mechanism", "type": "string" }, "security_protocol": { "default": "SASL_SSL", "enum": [ "SASL_SSL" ], "type": "string" } }, "required": [ "security_protocol", "sasl_mechanism", "sasl_jaas_config" ], "title": "SASL SSL" } ], "title": "Protocol", "type": "object" }, "receive_buffer_bytes": { "description": "The size of the TCP receive buffer (SO_RCVBUF) to use when reading data. If the value is -1, the OS default will be used.", "examples": [ 32768 ], "title": "Receive Buffer bytes", "type": "integer" }, "request_timeout_ms": { "description": "The configuration controls the maximum amount of time the client will wait for the response of a request. If the response is not received before the timeout elapses the client will resend the request if necessary or fail the request if retries are exhausted.", "examples": [ 30000 ], "title": "Request Timeout", "type": "integer" }, "retries": { "description": "Setting a value greater than zero will cause the client to resend any record whose send fails with a potentially transient error.", "examples": [ 2147483647 ], "title": "Retries", "type": "integer" }, "send_buffer_bytes": { "description": "The size of the TCP send buffer (SO_SNDBUF) to use when sending data. If the value is -1, the OS default will be used.", "examples": [ 131072 ], "title": "Send Buffer bytes", "type": "integer" }, "socket_connection_setup_timeout_max_ms": { "description": "The maximum amount of time the client will wait for the socket connection to be established. The connection setup timeout will increase exponentially for each consecutive connection failure up to this maximum.", "examples": [ 30000 ], "title": "Socket Connection Setup Max Timeout", "type": "string" }, "socket_connection_setup_timeout_ms": { "description": "The amount of time the client will wait for the socket connection to be established.", "examples": [ 10000 ], "title": "Socket Connection Setup Timeout", "type": "string" }, "sync_producer": { "default": false, "description": "Wait synchronously until the record has been sent to Kafka.", "title": "Sync Producer", "type": "boolean" }, "test_topic": { "description": "Topic to test if Airbyte can produce messages.", "examples": [ "test.topic" ], "title": "Test Topic", "type": "string" }, "topic_pattern": { "description": "Topic pattern in which the records will be sent. You can use patterns like '{namespace}' and/or '{stream}' to send the message to a specific topic based on these values. Notice that the topic name will be transformed to a standard naming convention.", "examples": [ "sample.topic", "{namespace}.{stream}.sample" ], "title": "Topic Pattern", "type": "string" } }, "required": [ "bootstrap_servers", "topic_pattern", "protocol", "acks", "enable_idempotence", "compression_type", "batch_size", "linger_ms", "max_in_flight_requests_per_connection", "client_dns_lookup", "buffer_memory", "max_request_size", "retries", "socket_connection_setup_timeout_ms", "socket_connection_setup_timeout_max_ms", "max_block_ms", "request_timeout_ms", "delivery_timeout_ms", "send_buffer_bytes", "receive_buffer_bytes", "destination" ], "title": "Kafka", "type": "object" }, { "$schema": "http://json-schema.org/draft-07/schema#", "additionalProperties": false, "properties": { "api_key": { "instillCredentialField": true, "description": "To get Keen Master API Key, navigate to the Access tab from the left-hand, side panel and check the Project Details section.", "examples": [ "ABCDEFGHIJKLMNOPRSTUWXYZ" ], "title": "API Key", "type": "string" }, "destination": { "const": "airbyte-destination-keen", "type": "string" }, "infer_timestamp": { "default": true, "description": "Allow connector to guess keen.timestamp value based on the streamed data.", "title": "Infer Timestamp", "type": "boolean" }, "project_id": { "description": "To get Keen Project ID, navigate to the Access tab from the left-hand, side panel and check the Project Details section.", "examples": [ "58b4acc22ba938934e888322e" ], "title": "Project ID", "type": "string" } }, "required": [ "project_id", "api_key", "destination" ], "title": "Keen", "type": "object" }, { "$schema": "http://json-schema.org/draft-07/schema#", "additionalProperties": true, "properties": { "accessKey": { "instillCredentialField": true, "description": "Generate the AWS Access Key for current user.", "order": 3, "title": "Access Key", "type": "string" }, "bufferSize": { "default": 100, "description": "Buffer size for storing kinesis records before being batch streamed.", "maximum": 500, "minimum": 1, "order": 5, "title": "Buffer Size", "type": "integer" }, "destination": { "const": "airbyte-destination-kinesis", "type": "string" }, "endpoint": { "description": "AWS Kinesis endpoint.", "examples": [ "kinesis.us‑west‑1.amazonaws.com" ], "order": 0, "title": "Endpoint", "type": "string" }, "privateKey": { "instillCredentialField": true, "description": "The AWS Private Key - a string of numbers and letters that are unique for each account, also known as a \"recovery phrase\".", "order": 4, "title": "Private Key", "type": "string" }, "region": { "description": "AWS region. Your account determines the Regions that are available to you.", "examples": [ "us‑west‑1" ], "order": 1, "title": "Region", "type": "string" }, "shardCount": { "default": 5, "description": "Number of shards to which the data should be streamed.", "order": 2, "title": "Shard Count", "type": "integer" } }, "required": [ "endpoint", "region", "shardCount", "accessKey", "privateKey", "bufferSize", "destination" ], "title": "Kinesis", "type": "object" }, { "groups": [ { "id": "processing", "title": "Processing" }, { "id": "embedding", "title": "Embedding" }, { "id": "indexing", "title": "Indexing" } ], "properties": { "destination": { "const": "airbyte-destination-langchain", "type": "string" }, "embedding": { "description": "Embedding configuration", "group": "embedding", "oneOf": [ { "description": "Use the OpenAI API to embed text. This option is using the text-embedding-ada-002 model with 1536 embedding dimensions.", "properties": { "mode": { "const": "openai", "default": "openai", "enum": [ "openai" ], "title": "Mode", "type": "string" }, "openai_key": { "instillCredentialField": true, "title": "OpenAI API key", "type": "string" } }, "required": [ "openai_key" ], "title": "OpenAI", "type": "object" }, { "description": "Use a fake embedding made out of random vectors with 1536 embedding dimensions. This is useful for testing the data pipeline without incurring any costs.", "properties": { "mode": { "const": "fake", "default": "fake", "enum": [ "fake" ], "title": "Mode", "type": "string" } }, "title": "Fake", "type": "object" } ], "title": "Embedding", "type": "object" }, "indexing": { "description": "Indexing configuration", "group": "indexing", "oneOf": [ { "description": "Pinecone is a popular vector store that can be used to store and retrieve embeddings. It is a managed service and can also be queried from outside of langchain.", "properties": { "index": { "description": "Pinecone index to use", "title": "Index", "type": "string" }, "mode": { "const": "pinecone", "default": "pinecone", "enum": [ "pinecone" ], "title": "Mode", "type": "string" }, "pinecone_environment": { "description": "Pinecone environment to use", "title": "Pinecone environment", "type": "string" }, "pinecone_key": { "instillCredentialField": true, "title": "Pinecone API key", "type": "string" } }, "required": [ "pinecone_key", "pinecone_environment", "index" ], "title": "Pinecone", "type": "object" }, { "description": "DocArrayHnswSearch is a lightweight Document Index implementation provided by Docarray that runs fully locally and is best suited for small- to medium-sized datasets. It stores vectors on disk in hnswlib, and stores all other data in SQLite.", "properties": { "destination_path": { "description": "Path to the directory where hnswlib and meta data files will be written. The files will be placed inside that local mount. All files in the specified destination directory will be deleted on each run.", "examples": [ "/local/my_hnswlib_index" ], "title": "Destination Path", "type": "string" }, "mode": { "const": "DocArrayHnswSearch", "default": "DocArrayHnswSearch", "enum": [ "DocArrayHnswSearch" ], "title": "Mode", "type": "string" } }, "required": [ "destination_path" ], "title": "DocArrayHnswSearch", "type": "object" }, { "description": "Chroma is a popular vector store that can be used to store and retrieve embeddings. It will build its index in memory and persist it to disk by the end of the sync.", "properties": { "collection_name": { "default": "langchain", "description": "Name of the collection to use.", "title": "Collection Name", "type": "string" }, "destination_path": { "description": "Path to the directory where chroma files will be written. The files will be placed inside that local mount.", "examples": [ "/local/my_chroma_db" ], "title": "Destination Path", "type": "string" }, "mode": { "const": "chroma_local", "default": "chroma_local", "enum": [ "chroma_local" ], "title": "Mode", "type": "string" } }, "required": [ "destination_path" ], "title": "Chroma (local persistance)", "type": "object" } ], "title": "Indexing", "type": "object" }, "processing": { "group": "processing", "properties": { "chunk_overlap": { "default": 0, "description": "Size of overlap between chunks in tokens to store in vector store to better capture relevant context", "title": "Chunk overlap", "type": "integer" }, "chunk_size": { "description": "Size of chunks in tokens to store in vector store (make sure it is not too big for the context if your LLM)", "maximum": 8191, "title": "Chunk size", "type": "integer" }, "text_fields": { "always_show": true, "description": "List of fields in the record that should be used to calculate the embedding. All other fields are passed along as meta fields. The field list is applied to all streams in the same way and non-existing fields are ignored. If none are defined, all fields are considered text fields. When specifying text fields, you can access nested fields in the record by using dot notation, e.g. `user.name` will access the `name` field in the `user` object. It's also possible to use wildcards to access all fields in an object, e.g. `users.*.name` will access all `names` fields in all entries of the `users` array.", "examples": [ "text", "user.name", "users.*.name" ], "items": { "type": "string" }, "title": "Text fields to embed", "type": "array" } }, "required": [ "chunk_size", "text_fields" ], "title": "ProcessingConfigModel", "type": "object" } }, "required": [ "processing", "embedding", "indexing", "destination" ], "title": "Langchain", "type": "object" }, { "$schema": "http://json-schema.org/draft-07/schema#", "additionalProperties": false, "properties": { "destination": { "const": "airbyte-destination-local-json", "type": "string" }, "destination_path": { "description": "Path to the directory where json files will be written. The files will be placed inside that local mount. For more information check out our docs", "examples": [ "/json_data" ], "title": "Destination Path", "type": "string" } }, "required": [ "destination_path", "destination" ], "title": "Localjson", "type": "object" }, { "$schema": "http://json-schema.org/draft-07/schema#", "additionalProperties": true, "properties": { "database": { "description": "Name of the database.", "order": 2, "title": "Database", "type": "string" }, "destination": { "const": "airbyte-destination-mariadb-columnstore", "type": "string" }, "host": { "description": "The Hostname of the database.", "order": 0, "title": "Host", "type": "string" }, "jdbc_url_params": { "description": "Additional properties to pass to the JDBC URL string when connecting to the database formatted as 'key=value' pairs separated by the symbol '&'. (example: key1=value1&key2=value2&key3=value3).", "order": 5, "title": "JDBC URL Params", "type": "string" }, "password": { "instillCredentialField": true, "description": "The Password associated with the username.", "order": 4, "title": "Password", "type": "string" }, "port": { "default": 3306, "description": "The Port of the database.", "examples": [ "3306" ], "maximum": 65536, "minimum": 0, "order": 1, "title": "Port", "type": "integer" }, "tunnel_method": { "description": "Whether to initiate an SSH tunnel before connecting to the database, and if so, which kind of authentication to use.", "oneOf": [ { "properties": { "tunnel_method": { "const": "NO_TUNNEL", "description": "No ssh tunnel needed to connect to database", "order": 0, "type": "string" } }, "required": [ "tunnel_method" ], "title": "No Tunnel" }, { "properties": { "ssh_key": { "instillCredentialField": true, "description": "OS-level user account ssh key credentials in RSA PEM format ( created with ssh-keygen -t rsa -m PEM -f myuser_rsa )", "multiline": true, "order": 4, "title": "SSH Private Key", "type": "string" }, "tunnel_host": { "description": "Hostname of the jump server host that allows inbound ssh tunnel.", "order": 1, "title": "SSH Tunnel Jump Server Host", "type": "string" }, "tunnel_method": { "const": "SSH_KEY_AUTH", "description": "Connect through a jump server tunnel host using username and ssh key", "order": 0, "type": "string" }, "tunnel_port": { "default": 22, "description": "Port on the proxy/jump server that accepts inbound ssh connections.", "examples": [ "22" ], "maximum": 65536, "minimum": 0, "order": 2, "title": "SSH Connection Port", "type": "integer" }, "tunnel_user": { "description": "OS-level username for logging into the jump server host.", "order": 3, "title": "SSH Login Username", "type": "string" } }, "required": [ "tunnel_method", "tunnel_host", "tunnel_port", "tunnel_user", "ssh_key" ], "title": "SSH Key Authentication" }, { "properties": { "tunnel_host": { "description": "Hostname of the jump server host that allows inbound ssh tunnel.", "order": 1, "title": "SSH Tunnel Jump Server Host", "type": "string" }, "tunnel_method": { "const": "SSH_PASSWORD_AUTH", "description": "Connect through a jump server tunnel host using username and password authentication", "order": 0, "type": "string" }, "tunnel_port": { "default": 22, "description": "Port on the proxy/jump server that accepts inbound ssh connections.", "examples": [ "22" ], "maximum": 65536, "minimum": 0, "order": 2, "title": "SSH Connection Port", "type": "integer" }, "tunnel_user": { "description": "OS-level username for logging into the jump server host", "order": 3, "title": "SSH Login Username", "type": "string" }, "tunnel_user_password": { "instillCredentialField": true, "description": "OS-level password for logging into the jump server host", "order": 4, "title": "Password", "type": "string" } }, "required": [ "tunnel_method", "tunnel_host", "tunnel_port", "tunnel_user", "tunnel_user_password" ], "title": "Password Authentication" } ], "title": "SSH Tunnel Method", "type": "object" }, "username": { "description": "The Username which is used to access the database.", "order": 3, "title": "Username", "type": "string" } }, "required": [ "host", "port", "username", "database", "destination" ], "title": "Mariadbcolumnstore", "type": "object" }, { "$schema": "http://json-schema.org/draft-07/schema#", "additionalProperties": false, "properties": { "api_key": { "instillCredentialField": true, "description": "MeiliSearch API Key. See the docs for more information on how to obtain this key.", "order": 1, "title": "API Key", "type": "string" }, "destination": { "const": "airbyte-destination-meilisearch", "type": "string" }, "host": { "description": "Hostname of the MeiliSearch instance.", "order": 0, "title": "Host", "type": "string" } }, "required": [ "host", "destination" ], "title": "Meilisearch", "type": "object" }, { "description": "The configuration model for the Vector DB based destinations. This model is used to generate the UI for the destination configuration,\nas well as to provide type safety for the configuration passed to the destination.\n\nThe configuration model is composed of four parts:\n* Processing configuration\n* Embedding configuration\n* Indexing configuration\n* Advanced configuration\n\nProcessing, embedding and advanced configuration are provided by this base class, while the indexing configuration is provided by the destination connector in the sub class.", "groups": [ { "id": "processing", "title": "Processing" }, { "id": "embedding", "title": "Embedding" }, { "id": "indexing", "title": "Indexing" }, { "id": "advanced", "title": "Advanced" } ], "properties": { "destination": { "const": "airbyte-destination-milvus", "type": "string" }, "embedding": { "description": "Embedding configuration", "group": "embedding", "oneOf": [ { "description": "Use the OpenAI API to embed text. This option is using the text-embedding-ada-002 model with 1536 embedding dimensions.", "properties": { "mode": { "const": "openai", "default": "openai", "enum": [ "openai" ], "title": "Mode", "type": "string" }, "openai_key": { "instillCredentialField": true, "title": "OpenAI API key", "type": "string" } }, "required": [ "openai_key", "mode" ], "title": "OpenAI", "type": "object" }, { "description": "Use the Cohere API to embed text.", "properties": { "cohere_key": { "instillCredentialField": true, "title": "Cohere API key", "type": "string" }, "mode": { "const": "cohere", "default": "cohere", "enum": [ "cohere" ], "title": "Mode", "type": "string" } }, "required": [ "cohere_key", "mode" ], "title": "Cohere", "type": "object" }, { "description": "Use a fake embedding made out of random vectors with 1536 embedding dimensions. This is useful for testing the data pipeline without incurring any costs.", "properties": { "mode": { "const": "fake", "default": "fake", "enum": [ "fake" ], "title": "Mode", "type": "string" } }, "required": [ "mode" ], "title": "Fake", "type": "object" }, { "description": "Use the Azure-hosted OpenAI API to embed text. This option is using the text-embedding-ada-002 model with 1536 embedding dimensions.", "properties": { "api_base": { "description": "The base URL for your Azure OpenAI resource. You can find this in the Azure portal under your Azure OpenAI resource", "examples": [ "https://your-resource-name.openai.azure.com" ], "title": "Resource base URL", "type": "string" }, "deployment": { "description": "The deployment for your Azure OpenAI resource. You can find this in the Azure portal under your Azure OpenAI resource", "examples": [ "your-resource-name" ], "title": "Deployment", "type": "string" }, "mode": { "const": "azure_openai", "default": "azure_openai", "enum": [ "azure_openai" ], "title": "Mode", "type": "string" }, "openai_key": { "instillCredentialField": true, "description": "The API key for your Azure OpenAI resource. You can find this in the Azure portal under your Azure OpenAI resource", "title": "Azure OpenAI API key", "type": "string" } }, "required": [ "openai_key", "api_base", "deployment", "mode" ], "title": "Azure OpenAI", "type": "object" }, { "description": "Use a service that's compatible with the OpenAI API to embed text.", "properties": { "api_key": { "instillCredentialField": true, "default": "", "title": "API key", "type": "string" }, "base_url": { "description": "The base URL for your OpenAI-compatible service", "examples": [ "https://your-service-name.com" ], "title": "Base URL", "type": "string" }, "dimensions": { "description": "The number of dimensions the embedding model is generating", "examples": [ 1536, 384 ], "title": "Embedding dimensions", "type": "integer" }, "mode": { "const": "openai_compatible", "default": "openai_compatible", "enum": [ "openai_compatible" ], "title": "Mode", "type": "string" }, "model_name": { "default": "text-embedding-ada-002", "description": "The name of the model to use for embedding", "examples": [ "text-embedding-ada-002" ], "title": "Model name", "type": "string" } }, "required": [ "base_url", "dimensions", "mode" ], "title": "OpenAI-compatible", "type": "object" } ], "title": "Embedding", "type": "object" }, "indexing": { "description": "Indexing configuration", "group": "indexing", "properties": { "auth": { "description": "Authentication method", "oneOf": [ { "description": "Authenticate using an API token (suitable for Zilliz Cloud)", "properties": { "mode": { "const": "token", "default": "token", "enum": [ "token" ], "title": "Mode", "type": "string" }, "token": { "instillCredentialField": true, "description": "API Token for the Milvus instance", "title": "API Token", "type": "string" } }, "required": [ "token", "mode" ], "title": "API Token", "type": "object" }, { "description": "Authenticate using username and password (suitable for self-managed Milvus clusters)", "properties": { "mode": { "const": "username_password", "default": "username_password", "enum": [ "username_password" ], "title": "Mode", "type": "string" }, "password": { "instillCredentialField": true, "description": "Password for the Milvus instance", "order": 2, "title": "Password", "type": "string" }, "username": { "description": "Username for the Milvus instance", "order": 1, "title": "Username", "type": "string" } }, "required": [ "username", "password", "mode" ], "title": "Username/Password", "type": "object" }, { "description": "Do not authenticate (suitable for locally running test clusters, do not use for clusters with public IP addresses)", "properties": { "mode": { "const": "no_auth", "default": "no_auth", "enum": [ "no_auth" ], "title": "Mode", "type": "string" } }, "required": [ "mode" ], "title": "No auth", "type": "object" } ], "order": 2, "title": "Authentication", "type": "object" }, "collection": { "description": "The collection to load data into", "order": 3, "title": "Collection Name", "type": "string" }, "db": { "default": "", "description": "The database to connect to", "title": "Database Name", "type": "string" }, "host": { "description": "The public endpoint of the Milvus instance. ", "examples": [ "https://my-instance.zone.zillizcloud.com", "tcp://host.docker.internal:19530", "tcp://my-local-milvus:19530" ], "order": 1, "title": "Public Endpoint", "type": "string" }, "text_field": { "default": "text", "description": "The field in the entity that contains the embedded text", "title": "Text Field", "type": "string" }, "vector_field": { "default": "vector", "description": "The field in the entity that contains the vector", "title": "Vector Field", "type": "string" } }, "required": [ "host", "collection", "auth" ], "title": "Indexing", "type": "object" }, "omit_raw_text": { "default": false, "description": "Do not store the text that gets embedded along with the vector and the metadata in the destination. If set to true, only the vector and the metadata will be stored - in this case raw text for LLM use cases needs to be retrieved from another source.", "group": "advanced", "title": "Do not store raw text", "type": "boolean" }, "processing": { "group": "processing", "properties": { "chunk_overlap": { "default": 0, "description": "Size of overlap between chunks in tokens to store in vector store to better capture relevant context", "title": "Chunk overlap", "type": "integer" }, "chunk_size": { "description": "Size of chunks in tokens to store in vector store (make sure it is not too big for the context if your LLM)", "maximum": 8191, "minimum": 1, "title": "Chunk size", "type": "integer" }, "field_name_mappings": { "default": [], "description": "List of fields to rename. Not applicable for nested fields, but can be used to rename fields already flattened via dot notation.", "items": { "properties": { "from_field": { "description": "The field name in the source", "title": "From field name", "type": "string" }, "to_field": { "description": "The field name to use in the destination", "title": "To field name", "type": "string" } }, "required": [ "from_field", "to_field" ], "title": "FieldNameMappingConfigModel", "type": "object" }, "title": "Field name mappings", "type": "array" }, "metadata_fields": { "always_show": true, "default": [], "description": "List of fields in the record that should be stored as metadata. The field list is applied to all streams in the same way and non-existing fields are ignored. If none are defined, all fields are considered metadata fields. When specifying text fields, you can access nested fields in the record by using dot notation, e.g. `user.name` will access the `name` field in the `user` object. It's also possible to use wildcards to access all fields in an object, e.g. `users.*.name` will access all `names` fields in all entries of the `users` array. When specifying nested paths, all matching values are flattened into an array set to a field named by the path.", "examples": [ "age", "user", "user.name" ], "items": { "type": "string" }, "title": "Fields to store as metadata", "type": "array" }, "text_fields": { "always_show": true, "default": [], "description": "List of fields in the record that should be used to calculate the embedding. The field list is applied to all streams in the same way and non-existing fields are ignored. If none are defined, all fields are considered text fields. When specifying text fields, you can access nested fields in the record by using dot notation, e.g. `user.name` will access the `name` field in the `user` object. It's also possible to use wildcards to access all fields in an object, e.g. `users.*.name` will access all `names` fields in all entries of the `users` array.", "examples": [ "text", "user.name", "users.*.name" ], "items": { "type": "string" }, "title": "Text fields to embed", "type": "array" }, "text_splitter": { "description": "Split text fields into chunks based on the specified method.", "oneOf": [ { "description": "Split the text by the list of separators until the chunk size is reached, using the earlier mentioned separators where possible. This is useful for splitting text fields by paragraphs, sentences, words, etc.", "properties": { "keep_separator": { "default": false, "description": "Whether to keep the separator in the resulting chunks", "title": "Keep separator", "type": "boolean" }, "mode": { "const": "separator", "default": "separator", "enum": [ "separator" ], "title": "Mode", "type": "string" }, "separators": { "default": [ "\"\\n\\n\"", "\"\\n\"", "\" \"", "\"\"" ], "description": "List of separator strings to split text fields by. The separator itself needs to be wrapped in double quotes, e.g. to split by the dot character, use \".\". To split by a newline, use \"\\n\".", "items": { "type": "string" }, "title": "Separators", "type": "array" } }, "required": [ "mode" ], "title": "By Separator", "type": "object" }, { "description": "Split the text by Markdown headers down to the specified header level. If the chunk size fits multiple sections, they will be combined into a single chunk.", "properties": { "mode": { "const": "markdown", "default": "markdown", "enum": [ "markdown" ], "title": "Mode", "type": "string" }, "split_level": { "default": 1, "description": "Level of markdown headers to split text fields by. Headings down to the specified level will be used as split points", "maximum": 6, "minimum": 1, "title": "Split level", "type": "integer" } }, "required": [ "mode" ], "title": "By Markdown header", "type": "object" }, { "description": "Split the text by suitable delimiters based on the programming language. This is useful for splitting code into chunks.", "properties": { "language": { "description": "Split code in suitable places based on the programming language", "enum": [ "cpp", "go", "java", "js", "php", "proto", "python", "rst", "ruby", "rust", "scala", "swift", "markdown", "latex", "html", "sol" ], "title": "Language", "type": "string" }, "mode": { "const": "code", "default": "code", "enum": [ "code" ], "title": "Mode", "type": "string" } }, "required": [ "language", "mode" ], "title": "By Programming Language", "type": "object" } ], "title": "Text splitter", "type": "object" } }, "required": [ "chunk_size" ], "title": "ProcessingConfigModel", "type": "object" } }, "required": [ "embedding", "processing", "indexing", "destination" ], "title": "Milvus", "type": "object" }, { "$schema": "http://json-schema.org/draft-07/schema#", "properties": { "auth_type": { "description": "Authorization type.", "oneOf": [ { "description": "None.", "properties": { "authorization": { "const": "none", "type": "string" } }, "required": [ "authorization" ], "title": "None", "type": "object" }, { "description": "Login/Password.", "properties": { "authorization": { "const": "login/password", "type": "string" }, "password": { "instillCredentialField": true, "description": "Password associated with the username.", "order": 2, "title": "Password", "type": "string" }, "username": { "description": "Username to use to access the database.", "order": 1, "title": "User", "type": "string" } }, "required": [ "authorization", "username", "password" ], "title": "Login/Password", "type": "object" } ], "title": "Authorization type", "type": "object" }, "database": { "description": "Name of the database.", "order": 2, "title": "DB Name", "type": "string" }, "destination": { "const": "airbyte-destination-mongodb", "type": "string" }, "instance_type": { "description": "MongoDb instance to connect to. For MongoDB Atlas and Replica Set TLS connection is used by default.", "oneOf": [ { "properties": { "host": { "description": "The Host of a Mongo database to be replicated.", "order": 0, "title": "Host", "type": "string" }, "instance": { "default": "standalone", "enum": [ "standalone" ], "type": "string" }, "port": { "default": 27017, "description": "The Port of a Mongo database to be replicated.", "examples": [ "27017" ], "maximum": 65536, "minimum": 0, "order": 1, "title": "Port", "type": "integer" }, "tls": { "default": false, "description": "Indicates whether TLS encryption protocol will be used to connect to MongoDB. It is recommended to use TLS connection if possible. For more information see documentation.", "order": 2, "title": "TLS Connection", "type": "boolean" } }, "required": [ "instance", "host", "port" ], "title": "Standalone MongoDb Instance" }, { "properties": { "instance": { "default": "replica", "enum": [ "replica" ], "type": "string" }, "replica_set": { "description": "A replica set name.", "order": 1, "title": "Replica Set", "type": "string" }, "server_addresses": { "description": "The members of a replica set. Please specify `host`:`port` of each member seperated by comma.", "examples": [ "host1:27017,host2:27017,host3:27017" ], "order": 0, "title": "Server addresses", "type": "string" } }, "required": [ "instance", "server_addresses" ], "title": "Replica Set" }, { "properties": { "cluster_url": { "description": "URL of a cluster to connect to.", "order": 0, "title": "Cluster URL", "type": "string" }, "instance": { "default": "atlas", "enum": [ "atlas" ], "type": "string" } }, "required": [ "instance", "cluster_url" ], "title": "MongoDB Atlas" } ], "order": 0, "title": "MongoDb Instance Type", "type": "object" }, "tunnel_method": { "description": "Whether to initiate an SSH tunnel before connecting to the database, and if so, which kind of authentication to use.", "oneOf": [ { "properties": { "tunnel_method": { "const": "NO_TUNNEL", "description": "No ssh tunnel needed to connect to database", "order": 0, "type": "string" } }, "required": [ "tunnel_method" ], "title": "No Tunnel" }, { "properties": { "ssh_key": { "instillCredentialField": true, "description": "OS-level user account ssh key credentials in RSA PEM format ( created with ssh-keygen -t rsa -m PEM -f myuser_rsa )", "multiline": true, "order": 4, "title": "SSH Private Key", "type": "string" }, "tunnel_host": { "description": "Hostname of the jump server host that allows inbound ssh tunnel.", "order": 1, "title": "SSH Tunnel Jump Server Host", "type": "string" }, "tunnel_method": { "const": "SSH_KEY_AUTH", "description": "Connect through a jump server tunnel host using username and ssh key", "order": 0, "type": "string" }, "tunnel_port": { "default": 22, "description": "Port on the proxy/jump server that accepts inbound ssh connections.", "examples": [ "22" ], "maximum": 65536, "minimum": 0, "order": 2, "title": "SSH Connection Port", "type": "integer" }, "tunnel_user": { "description": "OS-level username for logging into the jump server host.", "order": 3, "title": "SSH Login Username", "type": "string" } }, "required": [ "tunnel_method", "tunnel_host", "tunnel_port", "tunnel_user", "ssh_key" ], "title": "SSH Key Authentication" }, { "properties": { "tunnel_host": { "description": "Hostname of the jump server host that allows inbound ssh tunnel.", "order": 1, "title": "SSH Tunnel Jump Server Host", "type": "string" }, "tunnel_method": { "const": "SSH_PASSWORD_AUTH", "description": "Connect through a jump server tunnel host using username and password authentication", "order": 0, "type": "string" }, "tunnel_port": { "default": 22, "description": "Port on the proxy/jump server that accepts inbound ssh connections.", "examples": [ "22" ], "maximum": 65536, "minimum": 0, "order": 2, "title": "SSH Connection Port", "type": "integer" }, "tunnel_user": { "description": "OS-level username for logging into the jump server host", "order": 3, "title": "SSH Login Username", "type": "string" }, "tunnel_user_password": { "instillCredentialField": true, "description": "OS-level password for logging into the jump server host", "order": 4, "title": "Password", "type": "string" } }, "required": [ "tunnel_method", "tunnel_host", "tunnel_port", "tunnel_user", "tunnel_user_password" ], "title": "Password Authentication" } ], "title": "SSH Tunnel Method", "type": "object" } }, "required": [ "database", "auth_type", "destination" ], "title": "Mongodb", "type": "object" }, { "$schema": "http://json-schema.org/draft-07/schema#", "additionalProperties": true, "properties": { "automatic_reconnect": { "default": true, "description": "Whether the client will automatically attempt to reconnect to the server if the connection is lost.", "title": "Automatic reconnect", "type": "boolean" }, "broker_host": { "description": "Host of the broker to connect to.", "title": "MQTT broker host", "type": "string" }, "broker_port": { "description": "Port of the broker.", "title": "MQTT broker port", "type": "integer" }, "clean_session": { "default": true, "description": "Whether the client and server should remember state across restarts and reconnects.", "title": "Clean session", "type": "boolean" }, "client": { "description": "A client identifier that is unique on the server being connected to.", "examples": [ "airbyte-client1" ], "title": "Client ID", "type": "string" }, "connect_timeout": { "default": 30, "description": " Maximum time interval (in seconds) the client will wait for the network connection to the MQTT server to be established.", "title": "Connect timeout", "type": "integer" }, "destination": { "const": "airbyte-destination-mqtt", "type": "string" }, "message_qos": { "default": "AT_LEAST_ONCE", "description": "Quality of service used for each message to be delivered.", "enum": [ "AT_MOST_ONCE", "AT_LEAST_ONCE", "EXACTLY_ONCE" ], "title": "Message QoS" }, "message_retained": { "default": false, "description": "Whether or not the publish message should be retained by the messaging engine.", "title": "Message retained", "type": "boolean" }, "password": { "instillCredentialField": true, "description": "Password to use for the connection.", "title": "Password", "type": "string" }, "publisher_sync": { "default": false, "description": "Wait synchronously until the record has been sent to the broker.", "title": "Sync publisher", "type": "boolean" }, "topic_pattern": { "description": "Topic pattern in which the records will be sent. You can use patterns like '{namespace}' and/or '{stream}' to send the message to a specific topic based on these values. Notice that the topic name will be transformed to a standard naming convention.", "examples": [ "sample.topic", "{namespace}/{stream}/sample" ], "title": "Topic pattern", "type": "string" }, "topic_test": { "description": "Topic to test if Airbyte can produce messages.", "examples": [ "test/topic" ], "title": "Test topic", "type": "string" }, "use_tls": { "default": false, "description": "Whether to use TLS encryption on the connection.", "title": "Use TLS", "type": "boolean" }, "username": { "description": "User name to use for the connection.", "title": "Username", "type": "string" } }, "required": [ "broker_host", "broker_port", "use_tls", "topic_pattern", "publisher_sync", "connect_timeout", "automatic_reconnect", "clean_session", "message_retained", "message_qos", "destination" ], "title": "Mqtt", "type": "object" }, { "$schema": "http://json-schema.org/draft-07/schema#", "properties": { "database": { "description": "The name of the MSSQL database.", "order": 2, "title": "DB Name", "type": "string" }, "destination": { "const": "airbyte-destination-mssql", "type": "string" }, "host": { "description": "The host name of the MSSQL database.", "order": 0, "title": "Host", "type": "string" }, "jdbc_url_params": { "description": "Additional properties to pass to the JDBC URL string when connecting to the database formatted as 'key=value' pairs separated by the symbol '&'. (example: key1=value1&key2=value2&key3=value3).", "order": 6, "title": "JDBC URL Params", "type": "string" }, "password": { "instillCredentialField": true, "description": "The password associated with this username.", "order": 5, "title": "Password", "type": "string" }, "port": { "default": 1433, "description": "The port of the MSSQL database.", "examples": [ "1433" ], "maximum": 65536, "minimum": 0, "order": 1, "title": "Port", "type": "integer" }, "schema": { "default": "public", "description": "The default schema tables are written to if the source does not specify a namespace. The usual value for this field is \"public\".", "examples": [ "public" ], "order": 3, "title": "Default Schema", "type": "string" }, "ssl_method": { "description": "The encryption method which is used to communicate with the database.", "oneOf": [ { "description": "The data transfer will not be encrypted.", "properties": { "ssl_method": { "const": "unencrypted", "default": "unencrypted", "enum": [ "unencrypted" ], "type": "string" } }, "required": [ "ssl_method" ], "title": "Unencrypted", "type": "object" }, { "description": "Use the certificate provided by the server without verification. (For testing purposes only!)", "properties": { "ssl_method": { "const": "encrypted_trust_server_certificate", "default": "encrypted_trust_server_certificate", "enum": [ "encrypted_trust_server_certificate" ], "type": "string" } }, "required": [ "ssl_method" ], "title": "Encrypted (trust server certificate)", "type": "object" }, { "description": "Verify and use the certificate provided by the server.", "properties": { "hostNameInCertificate": { "description": "Specifies the host name of the server. The value of this property must match the subject property of the certificate.", "order": 8, "title": "Host Name In Certificate", "type": "string" }, "ssl_method": { "const": "encrypted_verify_certificate", "default": "encrypted_verify_certificate", "enum": [ "encrypted_verify_certificate" ], "type": "string" } }, "required": [ "ssl_method", "trustStoreName", "trustStorePassword" ], "title": "Encrypted (verify certificate)", "type": "object" } ], "order": 7, "title": "SSL Method", "type": "object" }, "tunnel_method": { "description": "Whether to initiate an SSH tunnel before connecting to the database, and if so, which kind of authentication to use.", "oneOf": [ { "properties": { "tunnel_method": { "const": "NO_TUNNEL", "description": "No ssh tunnel needed to connect to database", "order": 0, "type": "string" } }, "required": [ "tunnel_method" ], "title": "No Tunnel" }, { "properties": { "ssh_key": { "instillCredentialField": true, "description": "OS-level user account ssh key credentials in RSA PEM format ( created with ssh-keygen -t rsa -m PEM -f myuser_rsa )", "multiline": true, "order": 4, "title": "SSH Private Key", "type": "string" }, "tunnel_host": { "description": "Hostname of the jump server host that allows inbound ssh tunnel.", "order": 1, "title": "SSH Tunnel Jump Server Host", "type": "string" }, "tunnel_method": { "const": "SSH_KEY_AUTH", "description": "Connect through a jump server tunnel host using username and ssh key", "order": 0, "type": "string" }, "tunnel_port": { "default": 22, "description": "Port on the proxy/jump server that accepts inbound ssh connections.", "examples": [ "22" ], "maximum": 65536, "minimum": 0, "order": 2, "title": "SSH Connection Port", "type": "integer" }, "tunnel_user": { "description": "OS-level username for logging into the jump server host.", "order": 3, "title": "SSH Login Username", "type": "string" } }, "required": [ "tunnel_method", "tunnel_host", "tunnel_port", "tunnel_user", "ssh_key" ], "title": "SSH Key Authentication" }, { "properties": { "tunnel_host": { "description": "Hostname of the jump server host that allows inbound ssh tunnel.", "order": 1, "title": "SSH Tunnel Jump Server Host", "type": "string" }, "tunnel_method": { "const": "SSH_PASSWORD_AUTH", "description": "Connect through a jump server tunnel host using username and password authentication", "order": 0, "type": "string" }, "tunnel_port": { "default": 22, "description": "Port on the proxy/jump server that accepts inbound ssh connections.", "examples": [ "22" ], "maximum": 65536, "minimum": 0, "order": 2, "title": "SSH Connection Port", "type": "integer" }, "tunnel_user": { "description": "OS-level username for logging into the jump server host", "order": 3, "title": "SSH Login Username", "type": "string" }, "tunnel_user_password": { "instillCredentialField": true, "description": "OS-level password for logging into the jump server host", "order": 4, "title": "Password", "type": "string" } }, "required": [ "tunnel_method", "tunnel_host", "tunnel_port", "tunnel_user", "tunnel_user_password" ], "title": "Password Authentication" } ], "title": "SSH Tunnel Method", "type": "object" }, "username": { "description": "The username which is used to access the database.", "order": 4, "title": "User", "type": "string" } }, "required": [ "host", "port", "username", "database", "schema", "destination" ], "title": "Mssql", "type": "object" }, { "$schema": "http://json-schema.org/draft-07/schema#", "additionalProperties": true, "properties": { "database": { "description": "Name of the database.", "order": 2, "title": "DB Name", "type": "string" }, "destination": { "const": "airbyte-destination-mysql", "type": "string" }, "host": { "description": "Hostname of the database.", "order": 0, "title": "Host", "type": "string" }, "jdbc_url_params": { "description": "Additional properties to pass to the JDBC URL string when connecting to the database formatted as 'key=value' pairs separated by the symbol '&'. (example: key1=value1&key2=value2&key3=value3).", "order": 6, "title": "JDBC URL Params", "type": "string" }, "password": { "instillCredentialField": true, "description": "Password associated with the username.", "order": 4, "title": "Password", "type": "string" }, "port": { "default": 3306, "description": "Port of the database.", "examples": [ "3306" ], "maximum": 65536, "minimum": 0, "order": 1, "title": "Port", "type": "integer" }, "ssl": { "default": true, "description": "Encrypt data using SSL.", "order": 5, "title": "SSL Connection", "type": "boolean" }, "tunnel_method": { "description": "Whether to initiate an SSH tunnel before connecting to the database, and if so, which kind of authentication to use.", "oneOf": [ { "properties": { "tunnel_method": { "const": "NO_TUNNEL", "description": "No ssh tunnel needed to connect to database", "order": 0, "type": "string" } }, "required": [ "tunnel_method" ], "title": "No Tunnel" }, { "properties": { "ssh_key": { "instillCredentialField": true, "description": "OS-level user account ssh key credentials in RSA PEM format ( created with ssh-keygen -t rsa -m PEM -f myuser_rsa )", "multiline": true, "order": 4, "title": "SSH Private Key", "type": "string" }, "tunnel_host": { "description": "Hostname of the jump server host that allows inbound ssh tunnel.", "order": 1, "title": "SSH Tunnel Jump Server Host", "type": "string" }, "tunnel_method": { "const": "SSH_KEY_AUTH", "description": "Connect through a jump server tunnel host using username and ssh key", "order": 0, "type": "string" }, "tunnel_port": { "default": 22, "description": "Port on the proxy/jump server that accepts inbound ssh connections.", "examples": [ "22" ], "maximum": 65536, "minimum": 0, "order": 2, "title": "SSH Connection Port", "type": "integer" }, "tunnel_user": { "description": "OS-level username for logging into the jump server host.", "order": 3, "title": "SSH Login Username", "type": "string" } }, "required": [ "tunnel_method", "tunnel_host", "tunnel_port", "tunnel_user", "ssh_key" ], "title": "SSH Key Authentication" }, { "properties": { "tunnel_host": { "description": "Hostname of the jump server host that allows inbound ssh tunnel.", "order": 1, "title": "SSH Tunnel Jump Server Host", "type": "string" }, "tunnel_method": { "const": "SSH_PASSWORD_AUTH", "description": "Connect through a jump server tunnel host using username and password authentication", "order": 0, "type": "string" }, "tunnel_port": { "default": 22, "description": "Port on the proxy/jump server that accepts inbound ssh connections.", "examples": [ "22" ], "maximum": 65536, "minimum": 0, "order": 2, "title": "SSH Connection Port", "type": "integer" }, "tunnel_user": { "description": "OS-level username for logging into the jump server host", "order": 3, "title": "SSH Login Username", "type": "string" }, "tunnel_user_password": { "instillCredentialField": true, "description": "OS-level password for logging into the jump server host", "order": 4, "title": "Password", "type": "string" } }, "required": [ "tunnel_method", "tunnel_host", "tunnel_port", "tunnel_user", "tunnel_user_password" ], "title": "Password Authentication" } ], "title": "SSH Tunnel Method", "type": "object" }, "username": { "description": "Username to use to access the database.", "order": 3, "title": "User", "type": "string" } }, "required": [ "host", "port", "username", "database", "destination" ], "title": "Mysql", "type": "object" }, { "$schema": "http://json-schema.org/draft-07/schema#", "additionalProperties": true, "properties": { "destination": { "const": "airbyte-destination-oracle", "type": "string" }, "encryption": { "description": "The encryption method which is used when communicating with the database.", "oneOf": [ { "description": "Data transfer will not be encrypted.", "properties": { "encryption_method": { "const": "unencrypted", "default": "unencrypted", "enum": [ "unencrypted" ], "type": "string" } }, "required": [ "encryption_method" ], "title": "Unencrypted" }, { "description": "The native network encryption gives you the ability to encrypt database connections, without the configuration overhead of TCP/IP and SSL/TLS and without the need to open and listen on different ports.", "properties": { "encryption_algorithm": { "default": "AES256", "description": "This parameter defines the database encryption algorithm.", "enum": [ "AES256", "RC4_56", "3DES168" ], "title": "Encryption Algorithm", "type": "string" }, "encryption_method": { "const": "client_nne", "default": "client_nne", "enum": [ "client_nne" ], "type": "string" } }, "required": [ "encryption_method" ], "title": "Native Network Encryption (NNE)" }, { "description": "Verify and use the certificate provided by the server.", "properties": { "encryption_method": { "const": "encrypted_verify_certificate", "default": "encrypted_verify_certificate", "enum": [ "encrypted_verify_certificate" ], "type": "string" }, "ssl_certificate": { "instillCredentialField": true, "description": "Privacy Enhanced Mail (PEM) files are concatenated certificate containers frequently used in certificate installations.", "multiline": true, "title": "SSL PEM file", "type": "string" } }, "required": [ "encryption_method", "ssl_certificate" ], "title": "TLS Encrypted (verify certificate)" } ], "order": 7, "title": "Encryption", "type": "object" }, "host": { "description": "The hostname of the database.", "order": 0, "title": "Host", "type": "string" }, "jdbc_url_params": { "description": "Additional properties to pass to the JDBC URL string when connecting to the database formatted as 'key=value' pairs separated by the symbol '&'. (example: key1=value1&key2=value2&key3=value3).", "order": 5, "title": "JDBC URL Params", "type": "string" }, "password": { "instillCredentialField": true, "description": "The password associated with the username.", "order": 4, "title": "Password", "type": "string" }, "port": { "default": 1521, "description": "The port of the database.", "examples": [ "1521" ], "maximum": 65536, "minimum": 0, "order": 1, "title": "Port", "type": "integer" }, "schema": { "default": "airbyte", "description": "The default schema is used as the target schema for all statements issued from the connection that do not explicitly specify a schema name. The usual value for this field is \"airbyte\". In Oracle, schemas and users are the same thing, so the \"user\" parameter is used as the login credentials and this is used for the default Airbyte message schema.", "examples": [ "airbyte" ], "order": 6, "title": "Default Schema", "type": "string" }, "sid": { "description": "The System Identifier uniquely distinguishes the instance from any other instance on the same computer.", "order": 2, "title": "SID", "type": "string" }, "tunnel_method": { "description": "Whether to initiate an SSH tunnel before connecting to the database, and if so, which kind of authentication to use.", "oneOf": [ { "properties": { "tunnel_method": { "const": "NO_TUNNEL", "description": "No ssh tunnel needed to connect to database", "order": 0, "type": "string" } }, "required": [ "tunnel_method" ], "title": "No Tunnel" }, { "properties": { "ssh_key": { "instillCredentialField": true, "description": "OS-level user account ssh key credentials in RSA PEM format ( created with ssh-keygen -t rsa -m PEM -f myuser_rsa )", "multiline": true, "order": 4, "title": "SSH Private Key", "type": "string" }, "tunnel_host": { "description": "Hostname of the jump server host that allows inbound ssh tunnel.", "order": 1, "title": "SSH Tunnel Jump Server Host", "type": "string" }, "tunnel_method": { "const": "SSH_KEY_AUTH", "description": "Connect through a jump server tunnel host using username and ssh key", "order": 0, "type": "string" }, "tunnel_port": { "default": 22, "description": "Port on the proxy/jump server that accepts inbound ssh connections.", "examples": [ "22" ], "maximum": 65536, "minimum": 0, "order": 2, "title": "SSH Connection Port", "type": "integer" }, "tunnel_user": { "description": "OS-level username for logging into the jump server host.", "order": 3, "title": "SSH Login Username", "type": "string" } }, "required": [ "tunnel_method", "tunnel_host", "tunnel_port", "tunnel_user", "ssh_key" ], "title": "SSH Key Authentication" }, { "properties": { "tunnel_host": { "description": "Hostname of the jump server host that allows inbound ssh tunnel.", "order": 1, "title": "SSH Tunnel Jump Server Host", "type": "string" }, "tunnel_method": { "const": "SSH_PASSWORD_AUTH", "description": "Connect through a jump server tunnel host using username and password authentication", "order": 0, "type": "string" }, "tunnel_port": { "default": 22, "description": "Port on the proxy/jump server that accepts inbound ssh connections.", "examples": [ "22" ], "maximum": 65536, "minimum": 0, "order": 2, "title": "SSH Connection Port", "type": "integer" }, "tunnel_user": { "description": "OS-level username for logging into the jump server host", "order": 3, "title": "SSH Login Username", "type": "string" }, "tunnel_user_password": { "instillCredentialField": true, "description": "OS-level password for logging into the jump server host", "order": 4, "title": "Password", "type": "string" } }, "required": [ "tunnel_method", "tunnel_host", "tunnel_port", "tunnel_user", "tunnel_user_password" ], "title": "Password Authentication" } ], "title": "SSH Tunnel Method", "type": "object" }, "username": { "description": "The username to access the database. This user must have CREATE USER privileges in the database.", "order": 3, "title": "User", "type": "string" } }, "required": [ "host", "port", "username", "sid", "destination" ], "title": "Oracle", "type": "object" }, { "description": "The configuration model for the Vector DB based destinations. This model is used to generate the UI for the destination configuration,\nas well as to provide type safety for the configuration passed to the destination.\n\nThe configuration model is composed of four parts:\n* Processing configuration\n* Embedding configuration\n* Indexing configuration\n* Advanced configuration\n\nProcessing, embedding and advanced configuration are provided by this base class, while the indexing configuration is provided by the destination connector in the sub class.", "groups": [ { "id": "processing", "title": "Processing" }, { "id": "embedding", "title": "Embedding" }, { "id": "indexing", "title": "Indexing" }, { "id": "advanced", "title": "Advanced" } ], "properties": { "destination": { "const": "airbyte-destination-pinecone", "type": "string" }, "embedding": { "description": "Embedding configuration", "group": "embedding", "oneOf": [ { "description": "Use the OpenAI API to embed text. This option is using the text-embedding-ada-002 model with 1536 embedding dimensions.", "properties": { "mode": { "const": "openai", "default": "openai", "enum": [ "openai" ], "title": "Mode", "type": "string" }, "openai_key": { "instillCredentialField": true, "title": "OpenAI API key", "type": "string" } }, "required": [ "openai_key", "mode" ], "title": "OpenAI", "type": "object" }, { "description": "Use the Cohere API to embed text.", "properties": { "cohere_key": { "instillCredentialField": true, "title": "Cohere API key", "type": "string" }, "mode": { "const": "cohere", "default": "cohere", "enum": [ "cohere" ], "title": "Mode", "type": "string" } }, "required": [ "cohere_key", "mode" ], "title": "Cohere", "type": "object" }, { "description": "Use a fake embedding made out of random vectors with 1536 embedding dimensions. This is useful for testing the data pipeline without incurring any costs.", "properties": { "mode": { "const": "fake", "default": "fake", "enum": [ "fake" ], "title": "Mode", "type": "string" } }, "required": [ "mode" ], "title": "Fake", "type": "object" }, { "description": "Use the Azure-hosted OpenAI API to embed text. This option is using the text-embedding-ada-002 model with 1536 embedding dimensions.", "properties": { "api_base": { "description": "The base URL for your Azure OpenAI resource. You can find this in the Azure portal under your Azure OpenAI resource", "examples": [ "https://your-resource-name.openai.azure.com" ], "title": "Resource base URL", "type": "string" }, "deployment": { "description": "The deployment for your Azure OpenAI resource. You can find this in the Azure portal under your Azure OpenAI resource", "examples": [ "your-resource-name" ], "title": "Deployment", "type": "string" }, "mode": { "const": "azure_openai", "default": "azure_openai", "enum": [ "azure_openai" ], "title": "Mode", "type": "string" }, "openai_key": { "instillCredentialField": true, "description": "The API key for your Azure OpenAI resource. You can find this in the Azure portal under your Azure OpenAI resource", "title": "Azure OpenAI API key", "type": "string" } }, "required": [ "openai_key", "api_base", "deployment", "mode" ], "title": "Azure OpenAI", "type": "object" }, { "description": "Use a service that's compatible with the OpenAI API to embed text.", "properties": { "api_key": { "instillCredentialField": true, "default": "", "title": "API key", "type": "string" }, "base_url": { "description": "The base URL for your OpenAI-compatible service", "examples": [ "https://your-service-name.com" ], "title": "Base URL", "type": "string" }, "dimensions": { "description": "The number of dimensions the embedding model is generating", "examples": [ 1536, 384 ], "title": "Embedding dimensions", "type": "integer" }, "mode": { "const": "openai_compatible", "default": "openai_compatible", "enum": [ "openai_compatible" ], "title": "Mode", "type": "string" }, "model_name": { "default": "text-embedding-ada-002", "description": "The name of the model to use for embedding", "examples": [ "text-embedding-ada-002" ], "title": "Model name", "type": "string" } }, "required": [ "base_url", "dimensions", "mode" ], "title": "OpenAI-compatible", "type": "object" } ], "title": "Embedding", "type": "object" }, "indexing": { "description": "Pinecone is a popular vector store that can be used to store and retrieve embeddings.", "group": "indexing", "properties": { "index": { "description": "Pinecone index in your project to load data into", "title": "Index", "type": "string" }, "pinecone_environment": { "description": "Pinecone Cloud environment to use", "examples": [ "us-west1-gcp", "gcp-starter" ], "title": "Pinecone Environment", "type": "string" }, "pinecone_key": { "instillCredentialField": true, "description": "The Pinecone API key to use matching the environment (copy from Pinecone console)", "title": "Pinecone API key", "type": "string" } }, "required": [ "pinecone_key", "pinecone_environment", "index" ], "title": "Indexing", "type": "object" }, "omit_raw_text": { "default": false, "description": "Do not store the text that gets embedded along with the vector and the metadata in the destination. If set to true, only the vector and the metadata will be stored - in this case raw text for LLM use cases needs to be retrieved from another source.", "group": "advanced", "title": "Do not store raw text", "type": "boolean" }, "processing": { "group": "processing", "properties": { "chunk_overlap": { "default": 0, "description": "Size of overlap between chunks in tokens to store in vector store to better capture relevant context", "title": "Chunk overlap", "type": "integer" }, "chunk_size": { "description": "Size of chunks in tokens to store in vector store (make sure it is not too big for the context if your LLM)", "maximum": 8191, "minimum": 1, "title": "Chunk size", "type": "integer" }, "field_name_mappings": { "default": [], "description": "List of fields to rename. Not applicable for nested fields, but can be used to rename fields already flattened via dot notation.", "items": { "properties": { "from_field": { "description": "The field name in the source", "title": "From field name", "type": "string" }, "to_field": { "description": "The field name to use in the destination", "title": "To field name", "type": "string" } }, "required": [ "from_field", "to_field" ], "title": "FieldNameMappingConfigModel", "type": "object" }, "title": "Field name mappings", "type": "array" }, "metadata_fields": { "always_show": true, "default": [], "description": "List of fields in the record that should be stored as metadata. The field list is applied to all streams in the same way and non-existing fields are ignored. If none are defined, all fields are considered metadata fields. When specifying text fields, you can access nested fields in the record by using dot notation, e.g. `user.name` will access the `name` field in the `user` object. It's also possible to use wildcards to access all fields in an object, e.g. `users.*.name` will access all `names` fields in all entries of the `users` array. When specifying nested paths, all matching values are flattened into an array set to a field named by the path.", "examples": [ "age", "user", "user.name" ], "items": { "type": "string" }, "title": "Fields to store as metadata", "type": "array" }, "text_fields": { "always_show": true, "default": [], "description": "List of fields in the record that should be used to calculate the embedding. The field list is applied to all streams in the same way and non-existing fields are ignored. If none are defined, all fields are considered text fields. When specifying text fields, you can access nested fields in the record by using dot notation, e.g. `user.name` will access the `name` field in the `user` object. It's also possible to use wildcards to access all fields in an object, e.g. `users.*.name` will access all `names` fields in all entries of the `users` array.", "examples": [ "text", "user.name", "users.*.name" ], "items": { "type": "string" }, "title": "Text fields to embed", "type": "array" }, "text_splitter": { "description": "Split text fields into chunks based on the specified method.", "oneOf": [ { "description": "Split the text by the list of separators until the chunk size is reached, using the earlier mentioned separators where possible. This is useful for splitting text fields by paragraphs, sentences, words, etc.", "properties": { "keep_separator": { "default": false, "description": "Whether to keep the separator in the resulting chunks", "title": "Keep separator", "type": "boolean" }, "mode": { "const": "separator", "default": "separator", "enum": [ "separator" ], "title": "Mode", "type": "string" }, "separators": { "default": [ "\"\\n\\n\"", "\"\\n\"", "\" \"", "\"\"" ], "description": "List of separator strings to split text fields by. The separator itself needs to be wrapped in double quotes, e.g. to split by the dot character, use \".\". To split by a newline, use \"\\n\".", "items": { "type": "string" }, "title": "Separators", "type": "array" } }, "required": [ "mode" ], "title": "By Separator", "type": "object" }, { "description": "Split the text by Markdown headers down to the specified header level. If the chunk size fits multiple sections, they will be combined into a single chunk.", "properties": { "mode": { "const": "markdown", "default": "markdown", "enum": [ "markdown" ], "title": "Mode", "type": "string" }, "split_level": { "default": 1, "description": "Level of markdown headers to split text fields by. Headings down to the specified level will be used as split points", "maximum": 6, "minimum": 1, "title": "Split level", "type": "integer" } }, "required": [ "mode" ], "title": "By Markdown header", "type": "object" }, { "description": "Split the text by suitable delimiters based on the programming language. This is useful for splitting code into chunks.", "properties": { "language": { "description": "Split code in suitable places based on the programming language", "enum": [ "cpp", "go", "java", "js", "php", "proto", "python", "rst", "ruby", "rust", "scala", "swift", "markdown", "latex", "html", "sol" ], "title": "Language", "type": "string" }, "mode": { "const": "code", "default": "code", "enum": [ "code" ], "title": "Mode", "type": "string" } }, "required": [ "language", "mode" ], "title": "By Programming Language", "type": "object" } ], "title": "Text splitter", "type": "object" } }, "required": [ "chunk_size" ], "title": "ProcessingConfigModel", "type": "object" } }, "required": [ "embedding", "processing", "indexing", "destination" ], "title": "Pinecone", "type": "object" }, { "$schema": "http://json-schema.org/draft-07/schema#", "additionalProperties": true, "properties": { "database": { "description": "Name of the database.", "order": 2, "title": "DB Name", "type": "string" }, "destination": { "const": "airbyte-destination-postgres", "type": "string" }, "host": { "description": "Hostname of the database.", "order": 0, "title": "Host", "type": "string" }, "jdbc_url_params": { "description": "Additional properties to pass to the JDBC URL string when connecting to the database formatted as 'key=value' pairs separated by the symbol '&'. (example: key1=value1&key2=value2&key3=value3).", "order": 8, "title": "JDBC URL Params", "type": "string" }, "password": { "instillCredentialField": true, "description": "Password associated with the username.", "order": 5, "title": "Password", "type": "string" }, "port": { "default": 5432, "description": "Port of the database.", "examples": [ "5432" ], "maximum": 65536, "minimum": 0, "order": 1, "title": "Port", "type": "integer" }, "schema": { "default": "public", "description": "The default schema tables are written to if the source does not specify a namespace. The usual value for this field is \"public\".", "examples": [ "public" ], "order": 3, "title": "Default Schema", "type": "string" }, "ssl": { "default": false, "description": "Encrypt data using SSL. When activating SSL, please select one of the connection modes.", "order": 6, "title": "SSL Connection", "type": "boolean" }, "ssl_mode": { "description": "SSL connection modes. \n disable - Chose this mode to disable encryption of communication between Airbyte and destination database\n allow - Chose this mode to enable encryption only when required by the source database\n prefer - Chose this mode to allow unencrypted connection only if the source database does not support encryption\n require - Chose this mode to always require encryption. If the source database server does not support encryption, connection will fail\n verify-ca - Chose this mode to always require encryption and to verify that the source database server has a valid SSL certificate\n verify-full - This is the most secure mode. Chose this mode to always require encryption and to verify the identity of the source database server\n See more information - in the docs.", "oneOf": [ { "additionalProperties": false, "description": "Disable SSL.", "properties": { "mode": { "const": "disable", "default": "disable", "enum": [ "disable" ], "order": 0, "type": "string" } }, "required": [ "mode" ], "title": "disable" }, { "additionalProperties": false, "description": "Allow SSL mode.", "properties": { "mode": { "const": "allow", "default": "allow", "enum": [ "allow" ], "order": 0, "type": "string" } }, "required": [ "mode" ], "title": "allow" }, { "additionalProperties": false, "description": "Prefer SSL mode.", "properties": { "mode": { "const": "prefer", "default": "prefer", "enum": [ "prefer" ], "order": 0, "type": "string" } }, "required": [ "mode" ], "title": "prefer" }, { "additionalProperties": false, "description": "Require SSL mode.", "properties": { "mode": { "const": "require", "default": "require", "enum": [ "require" ], "order": 0, "type": "string" } }, "required": [ "mode" ], "title": "require" }, { "additionalProperties": false, "description": "Verify-ca SSL mode.", "properties": { "ca_certificate": { "instillCredentialField": true, "description": "CA certificate", "multiline": true, "order": 1, "title": "CA certificate", "type": "string" }, "client_key_password": { "instillCredentialField": true, "description": "Password for keystorage. This field is optional. If you do not add it - the password will be generated automatically.", "order": 4, "title": "Client key password", "type": "string" }, "mode": { "const": "verify-ca", "default": "verify-ca", "enum": [ "verify-ca" ], "order": 0, "type": "string" } }, "required": [ "mode", "ca_certificate" ], "title": "verify-ca" }, { "additionalProperties": false, "description": "Verify-full SSL mode.", "properties": { "ca_certificate": { "instillCredentialField": true, "description": "CA certificate", "multiline": true, "order": 1, "title": "CA certificate", "type": "string" }, "client_certificate": { "instillCredentialField": true, "description": "Client certificate", "multiline": true, "order": 2, "title": "Client certificate", "type": "string" }, "client_key": { "instillCredentialField": true, "description": "Client key", "multiline": true, "order": 3, "title": "Client key", "type": "string" }, "client_key_password": { "instillCredentialField": true, "description": "Password for keystorage. This field is optional. If you do not add it - the password will be generated automatically.", "order": 4, "title": "Client key password", "type": "string" }, "mode": { "const": "verify-full", "default": "verify-full", "enum": [ "verify-full" ], "order": 0, "type": "string" } }, "required": [ "mode", "ca_certificate", "client_certificate", "client_key" ], "title": "verify-full" } ], "order": 7, "title": "SSL modes", "type": "object" }, "tunnel_method": { "description": "Whether to initiate an SSH tunnel before connecting to the database, and if so, which kind of authentication to use.", "oneOf": [ { "properties": { "tunnel_method": { "const": "NO_TUNNEL", "description": "No ssh tunnel needed to connect to database", "order": 0, "type": "string" } }, "required": [ "tunnel_method" ], "title": "No Tunnel" }, { "properties": { "ssh_key": { "instillCredentialField": true, "description": "OS-level user account ssh key credentials in RSA PEM format ( created with ssh-keygen -t rsa -m PEM -f myuser_rsa )", "multiline": true, "order": 4, "title": "SSH Private Key", "type": "string" }, "tunnel_host": { "description": "Hostname of the jump server host that allows inbound ssh tunnel.", "order": 1, "title": "SSH Tunnel Jump Server Host", "type": "string" }, "tunnel_method": { "const": "SSH_KEY_AUTH", "description": "Connect through a jump server tunnel host using username and ssh key", "order": 0, "type": "string" }, "tunnel_port": { "default": 22, "description": "Port on the proxy/jump server that accepts inbound ssh connections.", "examples": [ "22" ], "maximum": 65536, "minimum": 0, "order": 2, "title": "SSH Connection Port", "type": "integer" }, "tunnel_user": { "description": "OS-level username for logging into the jump server host.", "order": 3, "title": "SSH Login Username", "type": "string" } }, "required": [ "tunnel_method", "tunnel_host", "tunnel_port", "tunnel_user", "ssh_key" ], "title": "SSH Key Authentication" }, { "properties": { "tunnel_host": { "description": "Hostname of the jump server host that allows inbound ssh tunnel.", "order": 1, "title": "SSH Tunnel Jump Server Host", "type": "string" }, "tunnel_method": { "const": "SSH_PASSWORD_AUTH", "description": "Connect through a jump server tunnel host using username and password authentication", "order": 0, "type": "string" }, "tunnel_port": { "default": 22, "description": "Port on the proxy/jump server that accepts inbound ssh connections.", "examples": [ "22" ], "maximum": 65536, "minimum": 0, "order": 2, "title": "SSH Connection Port", "type": "integer" }, "tunnel_user": { "description": "OS-level username for logging into the jump server host", "order": 3, "title": "SSH Login Username", "type": "string" }, "tunnel_user_password": { "instillCredentialField": true, "description": "OS-level password for logging into the jump server host", "order": 4, "title": "Password", "type": "string" } }, "required": [ "tunnel_method", "tunnel_host", "tunnel_port", "tunnel_user", "tunnel_user_password" ], "title": "Password Authentication" } ], "title": "SSH Tunnel Method", "type": "object" }, "username": { "description": "Username to use to access the database.", "order": 4, "title": "User", "type": "string" } }, "required": [ "host", "port", "username", "database", "schema", "destination" ], "title": "Postgres", "type": "object" }, { "$schema": "http://json-schema.org/draft-07/schema#", "additionalProperties": true, "properties": { "batching_delay_threshold": { "default": 1, "description": "Number of ms before the buffer is flushed", "minimum": 1, "title": "Message Batching: Delay Threshold", "type": "integer" }, "batching_element_count_threshold": { "default": 1, "description": "Number of messages before the buffer is flushed", "minimum": 1, "title": "Message Batching: Element Count Threshold", "type": "integer" }, "batching_enabled": { "default": false, "description": "If TRUE messages will be buffered instead of sending them one by one", "title": "Message Batching Enabled", "type": "boolean" }, "batching_request_bytes_threshold": { "default": 1, "description": "Number of bytes before the buffer is flushed", "minimum": 1, "title": "Message Batching: Request Bytes Threshold", "type": "integer" }, "credentials_json": { "instillCredentialField": true, "description": "The contents of the JSON service account key. Check out the docs if you need help generating this key.", "title": "Credentials JSON", "type": "string" }, "destination": { "const": "airbyte-destination-pubsub", "type": "string" }, "ordering_enabled": { "default": false, "description": "If TRUE PubSub publisher will have message ordering enabled. Every message will have an ordering key of stream", "title": "Message Ordering Enabled", "type": "boolean" }, "project_id": { "description": "The GCP project ID for the project containing the target PubSub.", "title": "Project ID", "type": "string" }, "topic_id": { "description": "The PubSub topic ID in the given GCP project ID.", "title": "PubSub Topic ID", "type": "string" } }, "required": [ "project_id", "topic_id", "credentials_json", "ordering_enabled", "batching_enabled", "destination" ], "title": "Pubsub", "type": "object" }, { "$schema": "http://json-schema.org/draft-07/schema#", "additionalProperties": true, "properties": { "batching_enabled": { "default": true, "description": "Control whether automatic batching of messages is enabled for the producer.", "title": "Enable batching", "type": "boolean" }, "batching_max_messages": { "default": 1000, "description": "Maximum number of messages permitted in a batch.", "title": "Batching max messages", "type": "integer" }, "batching_max_publish_delay": { "default": 1, "description": " Time period in milliseconds within which the messages sent will be batched.", "title": "Batching max publish delay", "type": "integer" }, "block_if_queue_full": { "default": false, "description": "If the send operation should block when the outgoing message queue is full.", "title": "Block if queue is full", "type": "boolean" }, "brokers": { "description": "A list of host/port pairs to use for establishing the initial connection to the Pulsar cluster.", "examples": [ "broker1:6650,broker2:6650" ], "title": "Pulsar brokers", "type": "string" }, "compression_type": { "default": "NONE", "description": "Compression type for the producer.", "enum": [ "NONE", "LZ4", "ZLIB", "ZSTD", "SNAPPY" ], "title": "Compression type", "type": "string" }, "destination": { "const": "airbyte-destination-pulsar", "type": "string" }, "max_pending_messages": { "default": 1000, "description": "The maximum size of a queue holding pending messages.", "title": "Max pending messages", "type": "integer" }, "max_pending_messages_across_partitions": { "default": 50000, "description": "The maximum number of pending messages across partitions.", "title": "Max pending messages across partitions", "type": "integer" }, "producer_name": { "description": "Name for the producer. If not filled, the system will generate a globally unique name which can be accessed with.", "examples": [ "airbyte-producer" ], "title": "Producer name", "type": "string" }, "producer_sync": { "default": false, "description": "Wait synchronously until the record has been sent to Pulsar.", "title": "Sync producer", "type": "boolean" }, "send_timeout_ms": { "default": 30000, "description": "If a message is not acknowledged by a server before the send-timeout expires, an error occurs (in ms).", "title": "Message send timeout", "type": "integer" }, "topic_namespace": { "default": "default", "description": "The administrative unit of the topic, which acts as a grouping mechanism for related topics. Most topic configuration is performed at the namespace level. Each tenant has one or multiple namespaces.", "examples": [ "default" ], "title": "Topic namespace", "type": "string" }, "topic_pattern": { "description": "Topic pattern in which the records will be sent. You can use patterns like '{namespace}' and/or '{stream}' to send the message to a specific topic based on these values. Notice that the topic name will be transformed to a standard naming convention.", "examples": [ "sample.topic", "{namespace}.{stream}.sample" ], "title": "Topic pattern", "type": "string" }, "topic_tenant": { "default": "public", "description": "The topic tenant within the instance. Tenants are essential to multi-tenancy in Pulsar, and spread across clusters.", "examples": [ "public" ], "title": "Topic tenant", "type": "string" }, "topic_test": { "description": "Topic to test if Airbyte can produce messages.", "examples": [ "test.topic" ], "title": "Test topic", "type": "string" }, "topic_type": { "default": "persistent", "description": "It identifies type of topic. Pulsar supports two kind of topics: persistent and non-persistent. In persistent topic, all messages are durably persisted on disk (that means on multiple disks unless the broker is standalone), whereas non-persistent topic does not persist message into storage disk.", "enum": [ "persistent", "non-persistent" ], "title": "Topic type", "type": "string" }, "use_tls": { "default": false, "description": "Whether to use TLS encryption on the connection.", "title": "Use TLS", "type": "boolean" } }, "required": [ "brokers", "use_tls", "topic_type", "topic_tenant", "topic_namespace", "topic_pattern", "compression_type", "send_timeout_ms", "max_pending_messages", "max_pending_messages_across_partitions", "batching_enabled", "batching_max_messages", "batching_max_publish_delay", "block_if_queue_full", "destination" ], "title": "Pulsar", "type": "object" }, { "description": "The configuration model for the Vector DB based destinations. This model is used to generate the UI for the destination configuration,\nas well as to provide type safety for the configuration passed to the destination.\n\nThe configuration model is composed of four parts:\n* Processing configuration\n* Embedding configuration\n* Indexing configuration\n* Advanced configuration\n\nProcessing, embedding and advanced configuration are provided by this base class, while the indexing configuration is provided by the destination connector in the sub class.", "groups": [ { "id": "processing", "title": "Processing" }, { "id": "embedding", "title": "Embedding" }, { "id": "indexing", "title": "Indexing" }, { "id": "advanced", "title": "Advanced" } ], "properties": { "destination": { "const": "airbyte-destination-qdrant", "type": "string" }, "embedding": { "description": "Embedding configuration", "group": "embedding", "oneOf": [ { "description": "Use the OpenAI API to embed text. This option is using the text-embedding-ada-002 model with 1536 embedding dimensions.", "properties": { "mode": { "const": "openai", "default": "openai", "enum": [ "openai" ], "title": "Mode", "type": "string" }, "openai_key": { "instillCredentialField": true, "title": "OpenAI API key", "type": "string" } }, "required": [ "openai_key", "mode" ], "title": "OpenAI", "type": "object" }, { "description": "Use the Cohere API to embed text.", "properties": { "cohere_key": { "instillCredentialField": true, "title": "Cohere API key", "type": "string" }, "mode": { "const": "cohere", "default": "cohere", "enum": [ "cohere" ], "title": "Mode", "type": "string" } }, "required": [ "cohere_key", "mode" ], "title": "Cohere", "type": "object" }, { "description": "Use a fake embedding made out of random vectors with 1536 embedding dimensions. This is useful for testing the data pipeline without incurring any costs.", "properties": { "mode": { "const": "fake", "default": "fake", "enum": [ "fake" ], "title": "Mode", "type": "string" } }, "required": [ "mode" ], "title": "Fake", "type": "object" }, { "description": "Use the Azure-hosted OpenAI API to embed text. This option is using the text-embedding-ada-002 model with 1536 embedding dimensions.", "properties": { "api_base": { "description": "The base URL for your Azure OpenAI resource. You can find this in the Azure portal under your Azure OpenAI resource", "examples": [ "https://your-resource-name.openai.azure.com" ], "title": "Resource base URL", "type": "string" }, "deployment": { "description": "The deployment for your Azure OpenAI resource. You can find this in the Azure portal under your Azure OpenAI resource", "examples": [ "your-resource-name" ], "title": "Deployment", "type": "string" }, "mode": { "const": "azure_openai", "default": "azure_openai", "enum": [ "azure_openai" ], "title": "Mode", "type": "string" }, "openai_key": { "instillCredentialField": true, "description": "The API key for your Azure OpenAI resource. You can find this in the Azure portal under your Azure OpenAI resource", "title": "Azure OpenAI API key", "type": "string" } }, "required": [ "openai_key", "api_base", "deployment", "mode" ], "title": "Azure OpenAI", "type": "object" }, { "description": "Use a service that's compatible with the OpenAI API to embed text.", "properties": { "api_key": { "instillCredentialField": true, "default": "", "title": "API key", "type": "string" }, "base_url": { "description": "The base URL for your OpenAI-compatible service", "examples": [ "https://your-service-name.com" ], "title": "Base URL", "type": "string" }, "dimensions": { "description": "The number of dimensions the embedding model is generating", "examples": [ 1536, 384 ], "title": "Embedding dimensions", "type": "integer" }, "mode": { "const": "openai_compatible", "default": "openai_compatible", "enum": [ "openai_compatible" ], "title": "Mode", "type": "string" }, "model_name": { "default": "text-embedding-ada-002", "description": "The name of the model to use for embedding", "examples": [ "text-embedding-ada-002" ], "title": "Model name", "type": "string" } }, "required": [ "base_url", "dimensions", "mode" ], "title": "OpenAI-compatible", "type": "object" } ], "title": "Embedding", "type": "object" }, "indexing": { "description": "Indexing configuration", "group": "Indexing", "properties": { "auth_method": { "default": "api_key_auth", "description": "Method to authenticate with the Qdrant Instance", "oneOf": [ { "properties": { "api_key": { "instillCredentialField": true, "description": "API Key for the Qdrant instance", "title": "API Key", "type": "string" }, "mode": { "const": "api_key_auth", "default": "api_key_auth", "enum": [ "api_key_auth" ], "title": "Mode", "type": "string" } }, "required": [ "api_key" ], "title": "ApiKeyAuth", "type": "object" }, { "properties": { "mode": { "const": "no_auth", "default": "no_auth", "enum": [ "no_auth" ], "title": "Mode", "type": "string" } }, "title": "NoAuth", "type": "object" } ], "order": 1, "title": "Authentication Method", "type": "object" }, "collection": { "description": "The collection to load data into", "order": 2, "title": "Collection Name", "type": "string" }, "distance_metric": { "default": "cos", "description": "The Distance metric used to measure similarities among vectors. This field is only used if the collection defined in the does not exist yet and is created automatically by the connector.", "enum": [ "dot", "cos", "euc" ], "title": "Distance Metric", "type": "string" }, "prefer_grpc": { "default": true, "description": "Whether to prefer gRPC over HTTP. Set to true for Qdrant cloud clusters", "title": "Prefer gRPC", "type": "boolean" }, "text_field": { "default": "text", "description": "The field in the payload that contains the embedded text", "title": "Text Field", "type": "string" }, "url": { "description": "Public Endpoint of the Qdrant cluser", "order": 0, "title": "Public Endpoint", "type": "string" } }, "required": [ "url", "collection" ], "title": "Indexing", "type": "object" }, "omit_raw_text": { "default": false, "description": "Do not store the text that gets embedded along with the vector and the metadata in the destination. If set to true, only the vector and the metadata will be stored - in this case raw text for LLM use cases needs to be retrieved from another source.", "group": "advanced", "title": "Do not store raw text", "type": "boolean" }, "processing": { "group": "processing", "properties": { "chunk_overlap": { "default": 0, "description": "Size of overlap between chunks in tokens to store in vector store to better capture relevant context", "title": "Chunk overlap", "type": "integer" }, "chunk_size": { "description": "Size of chunks in tokens to store in vector store (make sure it is not too big for the context if your LLM)", "maximum": 8191, "minimum": 1, "title": "Chunk size", "type": "integer" }, "field_name_mappings": { "default": [], "description": "List of fields to rename. Not applicable for nested fields, but can be used to rename fields already flattened via dot notation.", "items": { "properties": { "from_field": { "description": "The field name in the source", "title": "From field name", "type": "string" }, "to_field": { "description": "The field name to use in the destination", "title": "To field name", "type": "string" } }, "required": [ "from_field", "to_field" ], "title": "FieldNameMappingConfigModel", "type": "object" }, "title": "Field name mappings", "type": "array" }, "metadata_fields": { "always_show": true, "default": [], "description": "List of fields in the record that should be stored as metadata. The field list is applied to all streams in the same way and non-existing fields are ignored. If none are defined, all fields are considered metadata fields. When specifying text fields, you can access nested fields in the record by using dot notation, e.g. `user.name` will access the `name` field in the `user` object. It's also possible to use wildcards to access all fields in an object, e.g. `users.*.name` will access all `names` fields in all entries of the `users` array. When specifying nested paths, all matching values are flattened into an array set to a field named by the path.", "examples": [ "age", "user", "user.name" ], "items": { "type": "string" }, "title": "Fields to store as metadata", "type": "array" }, "text_fields": { "always_show": true, "default": [], "description": "List of fields in the record that should be used to calculate the embedding. The field list is applied to all streams in the same way and non-existing fields are ignored. If none are defined, all fields are considered text fields. When specifying text fields, you can access nested fields in the record by using dot notation, e.g. `user.name` will access the `name` field in the `user` object. It's also possible to use wildcards to access all fields in an object, e.g. `users.*.name` will access all `names` fields in all entries of the `users` array.", "examples": [ "text", "user.name", "users.*.name" ], "items": { "type": "string" }, "title": "Text fields to embed", "type": "array" }, "text_splitter": { "description": "Split text fields into chunks based on the specified method.", "oneOf": [ { "description": "Split the text by the list of separators until the chunk size is reached, using the earlier mentioned separators where possible. This is useful for splitting text fields by paragraphs, sentences, words, etc.", "properties": { "keep_separator": { "default": false, "description": "Whether to keep the separator in the resulting chunks", "title": "Keep separator", "type": "boolean" }, "mode": { "const": "separator", "default": "separator", "enum": [ "separator" ], "title": "Mode", "type": "string" }, "separators": { "default": [ "\"\\n\\n\"", "\"\\n\"", "\" \"", "\"\"" ], "description": "List of separator strings to split text fields by. The separator itself needs to be wrapped in double quotes, e.g. to split by the dot character, use \".\". To split by a newline, use \"\\n\".", "items": { "type": "string" }, "title": "Separators", "type": "array" } }, "required": [ "mode" ], "title": "By Separator", "type": "object" }, { "description": "Split the text by Markdown headers down to the specified header level. If the chunk size fits multiple sections, they will be combined into a single chunk.", "properties": { "mode": { "const": "markdown", "default": "markdown", "enum": [ "markdown" ], "title": "Mode", "type": "string" }, "split_level": { "default": 1, "description": "Level of markdown headers to split text fields by. Headings down to the specified level will be used as split points", "maximum": 6, "minimum": 1, "title": "Split level", "type": "integer" } }, "required": [ "mode" ], "title": "By Markdown header", "type": "object" }, { "description": "Split the text by suitable delimiters based on the programming language. This is useful for splitting code into chunks.", "properties": { "language": { "description": "Split code in suitable places based on the programming language", "enum": [ "cpp", "go", "java", "js", "php", "proto", "python", "rst", "ruby", "rust", "scala", "swift", "markdown", "latex", "html", "sol" ], "title": "Language", "type": "string" }, "mode": { "const": "code", "default": "code", "enum": [ "code" ], "title": "Mode", "type": "string" } }, "required": [ "language", "mode" ], "title": "By Programming Language", "type": "object" } ], "title": "Text splitter", "type": "object" } }, "required": [ "chunk_size" ], "title": "ProcessingConfigModel", "type": "object" } }, "required": [ "embedding", "processing", "indexing", "destination" ], "title": "Qdrant", "type": "object" }, { "$schema": "http://json-schema.org/draft-07/schema#", "properties": { "access_key_id": { "instillCredentialField": true, "description": "The access key ID to access the R2 bucket. Airbyte requires Read and Write permissions to the given bucket. Read more here.", "examples": [ "A012345678910EXAMPLE" ], "order": 1, "title": "R2 Key ID *", "type": "string" }, "account_id": { "description": "Cloudflare account ID", "examples": [ "12345678aa1a1a11111aaa1234567abc" ], "order": 0, "title": "Cloudflare account ID", "type": "string" }, "destination": { "const": "airbyte-destination-r2", "type": "string" }, "file_name_pattern": { "description": "The pattern allows you to set the file-name format for the R2 staging file(s)", "examples": [ "{date}", "{date:yyyy_MM}", "{timestamp}", "{part_number}", "{sync_id}" ], "order": 7, "title": "R2 Filename pattern (Optional)", "type": "string" }, "format": { "description": "Format of the data output. See here for more details", "oneOf": [ { "properties": { "compression_codec": { "description": "The compression algorithm used to compress data. Default to no compression.", "oneOf": [ { "properties": { "codec": { "default": "no compression", "enum": [ "no compression" ], "type": "string" } }, "required": [ "codec" ], "title": "No Compression" }, { "properties": { "codec": { "default": "Deflate", "enum": [ "Deflate" ], "type": "string" }, "compression_level": { "default": 0, "description": "0: no compression & fastest, 9: best compression & slowest.", "maximum": 9, "minimum": 0, "title": "Deflate Level", "type": "integer" } }, "required": [ "codec", "compression_level" ], "title": "Deflate" }, { "properties": { "codec": { "default": "bzip2", "enum": [ "bzip2" ], "type": "string" } }, "required": [ "codec" ], "title": "bzip2" }, { "properties": { "codec": { "default": "xz", "enum": [ "xz" ], "type": "string" }, "compression_level": { "default": 6, "description": "See here for details.", "maximum": 9, "minimum": 0, "title": "Compression Level", "type": "integer" } }, "required": [ "codec", "compression_level" ], "title": "xz" }, { "properties": { "codec": { "default": "zstandard", "enum": [ "zstandard" ], "type": "string" }, "compression_level": { "default": 3, "description": "Negative levels are 'fast' modes akin to lz4 or snappy, levels above 9 are generally for archival purposes, and levels above 18 use a lot of memory.", "maximum": 22, "minimum": -5, "title": "Compression Level", "type": "integer" }, "include_checksum": { "default": false, "description": "If true, include a checksum with each data block.", "title": "Include Checksum", "type": "boolean" } }, "required": [ "codec", "compression_level" ], "title": "zstandard" }, { "properties": { "codec": { "default": "snappy", "enum": [ "snappy" ], "type": "string" } }, "required": [ "codec" ], "title": "snappy" } ], "order": 1, "title": "Compression Codec *", "type": "object" }, "format_type": { "default": "Avro", "enum": [ "Avro" ], "order": 0, "title": "Format Type *", "type": "string" } }, "required": [ "format_type", "compression_codec" ], "title": "Avro: Apache Avro" }, { "properties": { "compression": { "description": "Whether the output files should be compressed. If compression is selected, the output filename will have an extra extension (GZIP: \".csv.gz\").", "oneOf": [ { "properties": { "compression_type": { "default": "No Compression", "enum": [ "No Compression" ], "type": "string" } }, "requires": [ "compression_type" ], "title": "No Compression" }, { "properties": { "compression_type": { "default": "GZIP", "enum": [ "GZIP" ], "type": "string" } }, "requires": [ "compression_type" ], "title": "GZIP" } ], "title": "Compression", "type": "object" }, "flattening": { "default": "No flattening", "description": "Whether the input json data should be normalized (flattened) in the output CSV. Please refer to docs for details.", "enum": [ "No flattening", "Root level flattening" ], "title": "Normalization (Flattening)", "type": "string" }, "format_type": { "default": "CSV", "enum": [ "CSV" ], "title": "Format Type *", "type": "string" } }, "required": [ "format_type", "flattening" ], "title": "CSV: Comma-Separated Values" }, { "properties": { "compression": { "description": "Whether the output files should be compressed. If compression is selected, the output filename will have an extra extension (GZIP: \".jsonl.gz\").", "oneOf": [ { "properties": { "compression_type": { "default": "No Compression", "enum": [ "No Compression" ], "type": "string" } }, "requires": "compression_type", "title": "No Compression" }, { "properties": { "compression_type": { "default": "GZIP", "enum": [ "GZIP" ], "type": "string" } }, "requires": "compression_type", "title": "GZIP" } ], "title": "Compression", "type": "object" }, "format_type": { "default": "JSONL", "enum": [ "JSONL" ], "title": "Format Type *", "type": "string" } }, "required": [ "format_type" ], "title": "JSON Lines: Newline-delimited JSON" } ], "order": 5, "title": "Output Format *", "type": "object" }, "s3_bucket_name": { "description": "The name of the R2 bucket. Read more here.", "examples": [ "r2_sync" ], "order": 3, "title": "R2 Bucket Name", "type": "string" }, "s3_bucket_path": { "description": "Directory under the R2 bucket where data will be written.", "examples": [ "data_sync/test" ], "order": 4, "title": "R2 Bucket Path", "type": "string" }, "s3_path_format": { "description": "Format string on how data will be organized inside the R2 bucket directory. Read more here", "examples": [ "${NAMESPACE}/${STREAM_NAME}/${YEAR}_${MONTH}_${DAY}_${EPOCH}_" ], "order": 6, "title": "R2 Path Format (Optional)", "type": "string" }, "secret_access_key": { "instillCredentialField": true, "description": "The corresponding secret to the access key ID. Read more here", "examples": [ "a012345678910ABCDEFGHAbCdEfGhEXAMPLEKEY" ], "order": 2, "title": "R2 Access Key *", "type": "string" } }, "required": [ "account_id", "access_key_id", "secret_access_key", "s3_bucket_name", "s3_bucket_path", "format", "destination" ], "title": "R2", "type": "object" }, { "$schema": "http://json-schema.org/draft-07/schema#", "additionalProperties": false, "properties": { "destination": { "const": "airbyte-destination-rabbitmq", "type": "string" }, "exchange": { "description": "The exchange name.", "type": "string" }, "host": { "description": "The RabbitMQ host name.", "type": "string" }, "password": { "instillCredentialField": true, "description": "The password to connect.", "title": "Password", "type": "string" }, "port": { "description": "The RabbitMQ port.", "type": "integer" }, "routing_key": { "description": "The routing key.", "type": "string" }, "ssl": { "default": true, "description": "SSL enabled.", "type": "boolean" }, "username": { "description": "The username to connect.", "type": "string" }, "virtual_host": { "description": "The RabbitMQ virtual host name.", "type": "string" } }, "required": [ "host", "routing_key", "destination" ], "title": "Rabbitmq", "type": "object" }, { "$schema": "http://json-schema.org/draft-07/schema#", "additionalProperties": false, "properties": { "cache_type": { "default": "hash", "description": "Redis cache type to store data in.", "enum": [ "hash" ], "order": 7, "title": "Cache type", "type": "string" }, "destination": { "const": "airbyte-destination-redis", "type": "string" }, "host": { "description": "Redis host to connect to.", "examples": [ "localhost,127.0.0.1" ], "order": 1, "title": "Host", "type": "string" }, "password": { "instillCredentialField": true, "description": "Password associated with Redis.", "order": 4, "title": "Password", "type": "string" }, "port": { "default": 6379, "description": "Port of Redis.", "maximum": 65536, "minimum": 0, "order": 2, "title": "Port", "type": "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.", "order": 5, "title": "SSL Connection", "type": "boolean" }, "ssl_mode": { "description": "SSL connection modes. \n
  • verify-full - This is the most secure mode. Always require encryption and verifies the identity of the source database server", "oneOf": [ { "additionalProperties": false, "description": "Disable SSL.", "properties": { "mode": { "const": "disable", "default": "disable", "enum": [ "disable" ], "order": 0, "type": "string" } }, "required": [ "mode" ], "title": "disable" }, { "additionalProperties": false, "description": "Verify-full SSL mode.", "properties": { "ca_certificate": { "instillCredentialField": true, "description": "CA certificate", "multiline": true, "order": 1, "title": "CA Certificate", "type": "string" }, "client_certificate": { "instillCredentialField": true, "description": "Client certificate", "multiline": true, "order": 2, "title": "Client Certificate", "type": "string" }, "client_key": { "instillCredentialField": true, "description": "Client key", "multiline": true, "order": 3, "title": "Client Key", "type": "string" }, "client_key_password": { "instillCredentialField": true, "description": "Password for keystorage. If you do not add it - the password will be generated automatically.", "order": 4, "title": "Client key password", "type": "string" }, "mode": { "const": "verify-full", "default": "verify-full", "enum": [ "verify-full" ], "order": 0, "type": "string" } }, "required": [ "mode", "ca_certificate", "client_certificate", "client_key" ], "title": "verify-full" } ], "order": 6, "title": "SSL Modes", "type": "object" }, "tunnel_method": { "description": "Whether to initiate an SSH tunnel before connecting to the database, and if so, which kind of authentication to use.", "oneOf": [ { "properties": { "tunnel_method": { "const": "NO_TUNNEL", "description": "No ssh tunnel needed to connect to database", "order": 0, "type": "string" } }, "required": [ "tunnel_method" ], "title": "No Tunnel" }, { "properties": { "ssh_key": { "instillCredentialField": true, "description": "OS-level user account ssh key credentials in RSA PEM format ( created with ssh-keygen -t rsa -m PEM -f myuser_rsa )", "multiline": true, "order": 4, "title": "SSH Private Key", "type": "string" }, "tunnel_host": { "description": "Hostname of the jump server host that allows inbound ssh tunnel.", "order": 1, "title": "SSH Tunnel Jump Server Host", "type": "string" }, "tunnel_method": { "const": "SSH_KEY_AUTH", "description": "Connect through a jump server tunnel host using username and ssh key", "order": 0, "type": "string" }, "tunnel_port": { "default": 22, "description": "Port on the proxy/jump server that accepts inbound ssh connections.", "examples": [ "22" ], "maximum": 65536, "minimum": 0, "order": 2, "title": "SSH Connection Port", "type": "integer" }, "tunnel_user": { "description": "OS-level username for logging into the jump server host.", "order": 3, "title": "SSH Login Username", "type": "string" } }, "required": [ "tunnel_method", "tunnel_host", "tunnel_port", "tunnel_user", "ssh_key" ], "title": "SSH Key Authentication" }, { "properties": { "tunnel_host": { "description": "Hostname of the jump server host that allows inbound ssh tunnel.", "order": 1, "title": "SSH Tunnel Jump Server Host", "type": "string" }, "tunnel_method": { "const": "SSH_PASSWORD_AUTH", "description": "Connect through a jump server tunnel host using username and password authentication", "order": 0, "type": "string" }, "tunnel_port": { "default": 22, "description": "Port on the proxy/jump server that accepts inbound ssh connections.", "examples": [ "22" ], "maximum": 65536, "minimum": 0, "order": 2, "title": "SSH Connection Port", "type": "integer" }, "tunnel_user": { "description": "OS-level username for logging into the jump server host", "order": 3, "title": "SSH Login Username", "type": "string" }, "tunnel_user_password": { "instillCredentialField": true, "description": "OS-level password for logging into the jump server host", "order": 4, "title": "Password", "type": "string" } }, "required": [ "tunnel_method", "tunnel_host", "tunnel_port", "tunnel_user", "tunnel_user_password" ], "title": "Password Authentication" } ], "title": "SSH Tunnel Method", "type": "object" }, "username": { "description": "Username associated with Redis.", "order": 3, "title": "Username", "type": "string" } }, "required": [ "host", "username", "port", "cache_type", "destination" ], "title": "Redis", "type": "object" }, { "$schema": "http://json-schema.org/draft-07/schema#", "properties": { "batch_size": { "description": "The producer will attempt to batch records together into fewer requests whenever multiple records are being sent to the same partition.", "examples": [ 16384 ], "title": "Batch Size", "type": "integer" }, "bootstrap_servers": { "description": "A list of host/port pairs to use for establishing the initial connection to the Redpanda cluster. The client will make use of all servers irrespective of which servers are specified here for bootstrapping—this list only impacts the initial hosts used to discover the full set of servers. This list should be in the form host1:port1,host2:port2,.... Since these servers are just used for the initial connection to discover the full cluster membership (which may change dynamically), this list need not contain the full set of servers (you may want more than one, though, in case a server is down).", "examples": [ "redpanda-broker1:9092,redpanda-broker2:9092" ], "title": "Bootstrap Servers", "type": "string" }, "buffer_memory": { "description": "The total bytes of memory the producer can use to buffer records waiting to be sent to the server.", "examples": 33554432, "title": "Buffer Memory", "type": "string" }, "compression_type": { "default": "none", "description": "The compression type for all data generated by the producer.", "enum": [ "none", "gzip", "snappy", "lz4", "zstd" ], "title": "Compression Type", "type": "string" }, "destination": { "const": "airbyte-destination-redpanda", "type": "string" }, "retries": { "description": "Setting a value greater than zero will cause the client to resend any record whose send fails with a potentially transient error.", "examples": [ 2147483647 ], "title": "Retries", "type": "integer" }, "socket_connection_setup_timeout_max_ms": { "description": "The maximum amount of time the client will wait for the socket connection to be established. The connection setup timeout will increase exponentially for each consecutive connection failure up to this maximum.", "examples": [ 30000 ], "title": "Socket Connection Setup Max Timeout", "type": "integer" }, "socket_connection_setup_timeout_ms": { "description": "The amount of time the client will wait for the socket connection to be established.", "examples": [ 10000 ], "title": "Socket Connection Setup Timeout", "type": "integer" }, "topic_num_partitions": { "description": "The number of topic partitions which will be created on topic creation", "examples": [ 10 ], "title": "Number of topic partitions", "type": "integer" }, "topic_replication_factor": { "description": "The number of topics to which messages will be replicated", "examples": [ 10 ], "title": "Topic replication factor", "type": "integer" } }, "required": [ "bootstrap_servers", "buffer_memory", "compression_type", "retries", "batch_size", "destination" ], "title": "Redpanda", "type": "object" }, { "$schema": "http://json-schema.org/draft-07/schema#", "additionalProperties": true, "groups": [ { "id": "connection", "title": "Connection" } ], "properties": { "database": { "description": "Name of the database.", "group": "connection", "order": 5, "title": "Database", "type": "string" }, "destination": { "const": "airbyte-destination-redshift", "type": "string" }, "host": { "description": "Host Endpoint of the Redshift Cluster (must include the cluster-id, region and end with .redshift.amazonaws.com)", "group": "connection", "order": 1, "title": "Host", "type": "string" }, "jdbc_url_params": { "description": "Additional properties to pass to the JDBC URL string when connecting to the database formatted as 'key=value' pairs separated by the symbol '&'. (example: key1=value1&key2=value2&key3=value3).", "group": "connection", "order": 7, "title": "JDBC URL Params", "type": "string" }, "password": { "instillCredentialField": true, "description": "Password associated with the username.", "group": "connection", "order": 4, "title": "Password", "type": "string" }, "port": { "default": 5439, "description": "Port of the database.", "examples": [ "5439" ], "group": "connection", "maximum": 65536, "minimum": 0, "order": 2, "title": "Port", "type": "integer" }, "raw_data_schema": { "description": "(Early Access) The schema to write raw tables into", "order": 10, "title": "Destinations V2 Raw Table Schema (Early Access)", "type": "string" }, "schema": { "default": "public", "description": "The default schema tables are written to if the source does not specify a namespace. Unless specifically configured, the usual value for this field is \"public\".", "examples": [ "public" ], "group": "connection", "order": 6, "title": "Default Schema", "type": "string" }, "tunnel_method": { "description": "Whether to initiate an SSH tunnel before connecting to the database, and if so, which kind of authentication to use.", "oneOf": [ { "properties": { "tunnel_method": { "const": "NO_TUNNEL", "description": "No ssh tunnel needed to connect to database", "order": 0, "type": "string" } }, "required": [ "tunnel_method" ], "title": "No Tunnel" }, { "properties": { "ssh_key": { "instillCredentialField": true, "description": "OS-level user account ssh key credentials in RSA PEM format ( created with ssh-keygen -t rsa -m PEM -f myuser_rsa )", "multiline": true, "order": 4, "title": "SSH Private Key", "type": "string" }, "tunnel_host": { "description": "Hostname of the jump server host that allows inbound ssh tunnel.", "order": 1, "title": "SSH Tunnel Jump Server Host", "type": "string" }, "tunnel_method": { "const": "SSH_KEY_AUTH", "description": "Connect through a jump server tunnel host using username and ssh key", "order": 0, "type": "string" }, "tunnel_port": { "default": 22, "description": "Port on the proxy/jump server that accepts inbound ssh connections.", "examples": [ "22" ], "maximum": 65536, "minimum": 0, "order": 2, "title": "SSH Connection Port", "type": "integer" }, "tunnel_user": { "description": "OS-level username for logging into the jump server host.", "order": 3, "title": "SSH Login Username", "type": "string" } }, "required": [ "tunnel_method", "tunnel_host", "tunnel_port", "tunnel_user", "ssh_key" ], "title": "SSH Key Authentication" }, { "properties": { "tunnel_host": { "description": "Hostname of the jump server host that allows inbound ssh tunnel.", "order": 1, "title": "SSH Tunnel Jump Server Host", "type": "string" }, "tunnel_method": { "const": "SSH_PASSWORD_AUTH", "description": "Connect through a jump server tunnel host using username and password authentication", "order": 0, "type": "string" }, "tunnel_port": { "default": 22, "description": "Port on the proxy/jump server that accepts inbound ssh connections.", "examples": [ "22" ], "maximum": 65536, "minimum": 0, "order": 2, "title": "SSH Connection Port", "type": "integer" }, "tunnel_user": { "description": "OS-level username for logging into the jump server host", "order": 3, "title": "SSH Login Username", "type": "string" }, "tunnel_user_password": { "instillCredentialField": true, "description": "OS-level password for logging into the jump server host", "order": 4, "title": "Password", "type": "string" } }, "required": [ "tunnel_method", "tunnel_host", "tunnel_port", "tunnel_user", "tunnel_user_password" ], "title": "Password Authentication" } ], "title": "SSH Tunnel Method", "type": "object" }, "uploading_method": { "description": "The way data will be uploaded to Redshift.", "display_type": "radio", "group": "connection", "oneOf": [ { "description": "(recommended) Uploads data to S3 and then uses a COPY to insert the data into Redshift. COPY is recommended for production workloads for better speed and scalability. See AWS docs for more details.", "properties": { "access_key_id": { "instillCredentialField": true, "description": "This ID grants access to the above S3 staging bucket. Airbyte requires Read and Write permissions to the given bucket. See AWS docs on how to generate an access key ID and secret access key.", "order": 3, "title": "S3 Access Key Id", "type": "string" }, "encryption": { "default": { "encryption_type": "none" }, "description": "How to encrypt the staging data", "oneOf": [ { "description": "Staging data will be stored in plaintext.", "properties": { "encryption_type": { "const": "none", "default": "none", "enum": [ "none" ], "type": "string" } }, "required": [ "encryption_type" ], "title": "No encryption", "type": "object" }, { "description": "Staging data will be encrypted using AES-CBC envelope encryption.", "properties": { "encryption_type": { "const": "aes_cbc_envelope", "default": "aes_cbc_envelope", "enum": [ "aes_cbc_envelope" ], "type": "string" }, "key_encrypting_key": { "instillCredentialField": true, "description": "The key, base64-encoded. Must be either 128, 192, or 256 bits. Leave blank to have Airbyte generate an ephemeral key for each sync.", "title": "Key", "type": "string" } }, "required": [ "encryption_type" ], "title": "AES-CBC envelope encryption", "type": "object" } ], "order": 7, "title": "Encryption", "type": "object" }, "file_buffer_count": { "default": 10, "description": "Number of file buffers allocated for writing data. Increasing this number is beneficial for connections using Change Data Capture (CDC) and up to the number of streams within a connection. Increasing the number of file buffers past the maximum number of streams has deteriorating effects", "examples": [ "10" ], "maximum": 50, "minimum": 10, "title": "File Buffer Count", "type": "integer" }, "file_name_pattern": { "description": "The pattern allows you to set the file-name format for the S3 staging file(s)", "examples": [ "{date}", "{date:yyyy_MM}", "{timestamp}", "{part_number}", "{sync_id}" ], "order": 5, "title": "S3 Filename pattern", "type": "string" }, "method": { "const": "S3 Staging", "type": "string" }, "purge_staging_data": { "default": true, "description": "Whether to delete the staging files from S3 after completing the sync. See docs for details.", "order": 6, "title": "Purge Staging Files and Tables", "type": "boolean" }, "s3_bucket_name": { "description": "The name of the staging S3 bucket.", "examples": [ "airbyte.staging" ], "order": 0, "title": "S3 Bucket Name", "type": "string" }, "s3_bucket_path": { "description": "The directory under the S3 bucket where data will be written. If not provided, then defaults to the root directory. See path's name recommendations for more details.", "examples": [ "data_sync/test" ], "order": 1, "title": "S3 Bucket Path", "type": "string" }, "s3_bucket_region": { "default": "", "description": "The region of the S3 staging bucket.", "enum": [ "", "us-east-1", "us-east-2", "us-west-1", "us-west-2", "af-south-1", "ap-east-1", "ap-south-1", "ap-northeast-1", "ap-northeast-2", "ap-northeast-3", "ap-southeast-1", "ap-southeast-2", "ca-central-1", "cn-north-1", "cn-northwest-1", "eu-central-1", "eu-north-1", "eu-south-1", "eu-west-1", "eu-west-2", "eu-west-3", "sa-east-1", "me-south-1" ], "order": 2, "title": "S3 Bucket Region", "type": "string" }, "secret_access_key": { "instillCredentialField": true, "description": "The corresponding secret to the above access key id. See AWS docs on how to generate an access key ID and secret access key.", "order": 4, "title": "S3 Secret Access Key", "type": "string" } }, "required": [ "method", "s3_bucket_name", "s3_bucket_region", "access_key_id", "secret_access_key" ], "title": "AWS S3 Staging" }, { "description": "(not recommended) Direct loading using SQL INSERT statements. This method is extremely inefficient and provided only for quick testing. In all other cases, you should use S3 uploading.", "properties": { "method": { "const": "Standard", "type": "string" } }, "required": [ "method" ], "title": "Standard" } ], "order": 8, "title": "Uploading Method", "type": "object" }, "use_1s1t_format": { "description": "(Early Access) Use Destinations V2.", "order": 9, "title": "Use Destinations V2 (Early Access)", "type": "boolean" }, "username": { "description": "Username to use to access the database.", "group": "connection", "order": 3, "title": "Username", "type": "string" } }, "required": [ "host", "port", "database", "username", "password", "schema", "destination" ], "title": "Redshift", "type": "object" }, { "$schema": "http://json-schema.org/draft-07/schema#", "additionalProperties": false, "properties": { "api_key": { "instillCredentialField": true, "description": "Rockset api key", "order": 0, "title": "Api Key", "type": "string" }, "api_server": { "instillCredentialField": false, "default": "https://api.rs2.usw2.rockset.com", "description": "Rockset api URL", "order": 2, "pattern": "^https:\\/\\/.*.rockset.com$", "title": "Api Server", "type": "string" }, "destination": { "const": "airbyte-destination-rockset", "type": "string" }, "workspace": { "instillCredentialField": false, "default": "commons", "description": "The Rockset workspace in which collections will be created + written to.", "examples": [ "commons", "my_workspace" ], "order": 1, "title": "Workspace", "type": "string" } }, "required": [ "api_key", "workspace", "destination" ], "title": "Rockset", "type": "object" }, { "$schema": "http://json-schema.org/draft-07/schema#", "properties": { "access_key_id": { "instillCredentialField": true, "description": "The access key ID to access the S3 bucket. Airbyte requires Read and Write permissions to the given bucket. Read more here.", "examples": [ "A012345678910EXAMPLE" ], "order": 0, "title": "S3 Key ID", "type": "string" }, "destination": { "const": "airbyte-destination-s3-glue", "type": "string" }, "file_name_pattern": { "description": "The pattern allows you to set the file-name format for the S3 staging file(s)", "examples": [ "{date}", "{date:yyyy_MM}", "{timestamp}", "{part_number}", "{sync_id}" ], "order": 8, "title": "S3 Filename pattern", "type": "string" }, "format": { "description": "Format of the data output. See here for more details", "oneOf": [ { "properties": { "compression": { "description": "Whether the output files should be compressed. If compression is selected, the output filename will have an extra extension (GZIP: \".jsonl.gz\").", "oneOf": [ { "properties": { "compression_type": { "default": "No Compression", "enum": [ "No Compression" ], "type": "string" } }, "requires": "compression_type", "title": "No Compression" }, { "properties": { "compression_type": { "default": "GZIP", "enum": [ "GZIP" ], "type": "string" } }, "requires": "compression_type", "title": "GZIP" } ], "title": "Compression", "type": "object" }, "flattening": { "default": "Root level flattening", "description": "Whether the input json data should be normalized (flattened) in the output JSON Lines. Please refer to docs for details.", "enum": [ "No flattening", "Root level flattening" ], "title": "Flattening", "type": "string" }, "format_type": { "default": "JSONL", "enum": [ "JSONL" ], "title": "Format Type", "type": "string" } }, "required": [ "format_type" ], "title": "JSON Lines: Newline-delimited JSON" } ], "order": 5, "title": "Output Format", "type": "object" }, "glue_database": { "description": "Name of the glue database for creating the tables, leave blank if no integration", "examples": [ "airbyte_database" ], "order": 9, "title": "Glue database name", "type": "string" }, "glue_serialization_library": { "default": "org.openx.data.jsonserde.JsonSerDe", "description": "The library that your query engine will use for reading and writing data in your lake.", "enum": [ "org.openx.data.jsonserde.JsonSerDe", "org.apache.hive.hcatalog.data.JsonSerDe" ], "order": 10, "title": "Serialization Library", "type": "string" }, "s3_bucket_name": { "description": "The name of the S3 bucket. Read more here.", "examples": [ "airbyte_sync" ], "order": 2, "title": "S3 Bucket Name", "type": "string" }, "s3_bucket_path": { "description": "Directory under the S3 bucket where data will be written. Read more here", "examples": [ "data_sync/test" ], "order": 3, "title": "S3 Bucket Path", "type": "string" }, "s3_bucket_region": { "default": "", "description": "The region of the S3 bucket. See here for all region codes.", "enum": [ "", "us-east-1", "us-east-2", "us-west-1", "us-west-2", "af-south-1", "ap-east-1", "ap-south-1", "ap-northeast-1", "ap-northeast-2", "ap-northeast-3", "ap-southeast-1", "ap-southeast-2", "ca-central-1", "cn-north-1", "cn-northwest-1", "eu-central-1", "eu-north-1", "eu-south-1", "eu-west-1", "eu-west-2", "eu-west-3", "sa-east-1", "me-south-1", "us-gov-east-1", "us-gov-west-1" ], "order": 4, "title": "S3 Bucket Region", "type": "string" }, "s3_endpoint": { "default": "", "description": "Your S3 endpoint url. Read more here", "examples": [ "http://localhost:9000" ], "order": 6, "title": "Endpoint", "type": "string" }, "s3_path_format": { "description": "Format string on how data will be organized inside the S3 bucket directory. Read more here", "examples": [ "${NAMESPACE}/${STREAM_NAME}/${YEAR}_${MONTH}_${DAY}_${EPOCH}_" ], "order": 7, "title": "S3 Path Format", "type": "string" }, "secret_access_key": { "instillCredentialField": true, "description": "The corresponding secret to the access key ID. Read more here", "examples": [ "a012345678910ABCDEFGH/AbCdEfGhEXAMPLEKEY" ], "order": 1, "title": "S3 Access Key", "type": "string" } }, "required": [ "s3_bucket_name", "s3_bucket_path", "s3_bucket_region", "format", "glue_database", "glue_serialization_library", "destination" ], "title": "S3glue", "type": "object" }, { "$schema": "http://json-schema.org/draft-07/schema#", "properties": { "access_key_id": { "instillCredentialField": true, "description": "The access key ID to access the S3 bucket. Airbyte requires Read and Write permissions to the given bucket. Read more here.", "examples": [ "A012345678910EXAMPLE" ], "order": 0, "title": "S3 Key ID", "type": "string" }, "destination": { "const": "airbyte-destination-s3", "type": "string" }, "file_name_pattern": { "description": "The pattern allows you to set the file-name format for the S3 staging file(s)", "examples": [ "{date}", "{date:yyyy_MM}", "{timestamp}", "{part_number}", "{sync_id}" ], "order": 8, "title": "S3 Filename pattern", "type": "string" }, "format": { "description": "Format of the data output. See here for more details", "oneOf": [ { "properties": { "compression_codec": { "description": "The compression algorithm used to compress data. Default to no compression.", "oneOf": [ { "properties": { "codec": { "default": "no compression", "enum": [ "no compression" ], "type": "string" } }, "required": [ "codec" ], "title": "No Compression" }, { "properties": { "codec": { "default": "Deflate", "enum": [ "Deflate" ], "type": "string" }, "compression_level": { "default": 0, "description": "0: no compression & fastest, 9: best compression & slowest.", "maximum": 9, "minimum": 0, "title": "Deflate Level", "type": "integer" } }, "required": [ "codec", "compression_level" ], "title": "Deflate" }, { "properties": { "codec": { "default": "bzip2", "enum": [ "bzip2" ], "type": "string" } }, "required": [ "codec" ], "title": "bzip2" }, { "properties": { "codec": { "default": "xz", "enum": [ "xz" ], "type": "string" }, "compression_level": { "default": 6, "description": "See here for details.", "maximum": 9, "minimum": 0, "title": "Compression Level", "type": "integer" } }, "required": [ "codec", "compression_level" ], "title": "xz" }, { "properties": { "codec": { "default": "zstandard", "enum": [ "zstandard" ], "type": "string" }, "compression_level": { "default": 3, "description": "Negative levels are 'fast' modes akin to lz4 or snappy, levels above 9 are generally for archival purposes, and levels above 18 use a lot of memory.", "maximum": 22, "minimum": -5, "title": "Compression Level", "type": "integer" }, "include_checksum": { "default": false, "description": "If true, include a checksum with each data block.", "title": "Include Checksum", "type": "boolean" } }, "required": [ "codec", "compression_level" ], "title": "zstandard" }, { "properties": { "codec": { "default": "snappy", "enum": [ "snappy" ], "type": "string" } }, "required": [ "codec" ], "title": "snappy" } ], "order": 1, "title": "Compression Codec", "type": "object" }, "format_type": { "default": "Avro", "enum": [ "Avro" ], "order": 0, "title": "Format Type", "type": "string" } }, "required": [ "format_type", "compression_codec" ], "title": "Avro: Apache Avro" }, { "properties": { "compression": { "description": "Whether the output files should be compressed. If compression is selected, the output filename will have an extra extension (GZIP: \".csv.gz\").", "oneOf": [ { "properties": { "compression_type": { "default": "No Compression", "enum": [ "No Compression" ], "type": "string" } }, "requires": [ "compression_type" ], "title": "No Compression" }, { "properties": { "compression_type": { "default": "GZIP", "enum": [ "GZIP" ], "type": "string" } }, "requires": [ "compression_type" ], "title": "GZIP" } ], "title": "Compression", "type": "object" }, "flattening": { "default": "No flattening", "description": "Whether the input json data should be normalized (flattened) in the output CSV. Please refer to docs for details.", "enum": [ "No flattening", "Root level flattening" ], "title": "Flattening", "type": "string" }, "format_type": { "default": "CSV", "enum": [ "CSV" ], "title": "Format Type", "type": "string" } }, "required": [ "format_type", "flattening" ], "title": "CSV: Comma-Separated Values" }, { "properties": { "compression": { "description": "Whether the output files should be compressed. If compression is selected, the output filename will have an extra extension (GZIP: \".jsonl.gz\").", "oneOf": [ { "properties": { "compression_type": { "default": "No Compression", "enum": [ "No Compression" ], "type": "string" } }, "requires": "compression_type", "title": "No Compression" }, { "properties": { "compression_type": { "default": "GZIP", "enum": [ "GZIP" ], "type": "string" } }, "requires": "compression_type", "title": "GZIP" } ], "title": "Compression", "type": "object" }, "flattening": { "default": "No flattening", "description": "Whether the input json data should be normalized (flattened) in the output JSON Lines. Please refer to docs for details.", "enum": [ "No flattening", "Root level flattening" ], "title": "Flattening", "type": "string" }, "format_type": { "default": "JSONL", "enum": [ "JSONL" ], "title": "Format Type", "type": "string" } }, "required": [ "format_type" ], "title": "JSON Lines: Newline-delimited JSON" }, { "properties": { "block_size_mb": { "default": 128, "description": "This is the size of a row group being buffered in memory. It limits the memory usage when writing. Larger values will improve the IO when reading, but consume more memory when writing. Default: 128 MB.", "examples": [ 128 ], "title": "Block Size (Row Group Size) (MB)", "type": "integer" }, "compression_codec": { "default": "UNCOMPRESSED", "description": "The compression algorithm used to compress data pages.", "enum": [ "UNCOMPRESSED", "SNAPPY", "GZIP", "LZO", "BROTLI", "LZ4", "ZSTD" ], "title": "Compression Codec", "type": "string" }, "dictionary_encoding": { "default": true, "description": "Default: true.", "title": "Dictionary Encoding", "type": "boolean" }, "dictionary_page_size_kb": { "default": 1024, "description": "There is one dictionary page per column per row group when dictionary encoding is used. The dictionary page size works like the page size but for dictionary. Default: 1024 KB.", "examples": [ 1024 ], "title": "Dictionary Page Size (KB)", "type": "integer" }, "format_type": { "default": "Parquet", "enum": [ "Parquet" ], "title": "Format Type", "type": "string" }, "max_padding_size_mb": { "default": 8, "description": "Maximum size allowed as padding to align row groups. This is also the minimum size of a row group. Default: 8 MB.", "examples": [ 8 ], "title": "Max Padding Size (MB)", "type": "integer" }, "page_size_kb": { "default": 1024, "description": "The page size is for compression. A block is composed of pages. A page is the smallest unit that must be read fully to access a single record. If this value is too small, the compression will deteriorate. Default: 1024 KB.", "examples": [ 1024 ], "title": "Page Size (KB)", "type": "integer" } }, "required": [ "format_type" ], "title": "Parquet: Columnar Storage" } ], "order": 5, "title": "Output Format", "type": "object" }, "s3_bucket_name": { "description": "The name of the S3 bucket. Read more here.", "examples": [ "airbyte_sync" ], "order": 2, "title": "S3 Bucket Name", "type": "string" }, "s3_bucket_path": { "description": "Directory under the S3 bucket where data will be written. Read more here", "examples": [ "data_sync/test" ], "order": 3, "title": "S3 Bucket Path", "type": "string" }, "s3_bucket_region": { "default": "", "description": "The region of the S3 bucket. See here for all region codes.", "enum": [ "", "us-east-1", "us-east-2", "us-west-1", "us-west-2", "af-south-1", "ap-east-1", "ap-south-1", "ap-northeast-1", "ap-northeast-2", "ap-northeast-3", "ap-southeast-1", "ap-southeast-2", "ca-central-1", "cn-north-1", "cn-northwest-1", "eu-central-1", "eu-north-1", "eu-south-1", "eu-west-1", "eu-west-2", "eu-west-3", "sa-east-1", "me-south-1", "us-gov-east-1", "us-gov-west-1" ], "order": 4, "title": "S3 Bucket Region", "type": "string" }, "s3_endpoint": { "default": "", "description": "Your S3 endpoint url. Read more here", "examples": [ "http://localhost:9000" ], "order": 6, "title": "Endpoint", "type": "string" }, "s3_path_format": { "description": "Format string on how data will be organized inside the S3 bucket directory. Read more here", "examples": [ "${NAMESPACE}/${STREAM_NAME}/${YEAR}_${MONTH}_${DAY}_${EPOCH}_" ], "order": 7, "title": "S3 Path Format", "type": "string" }, "secret_access_key": { "instillCredentialField": true, "description": "The corresponding secret to the access key ID. Read more here", "examples": [ "a012345678910ABCDEFGH/AbCdEfGhEXAMPLEKEY" ], "order": 1, "title": "S3 Access Key", "type": "string" } }, "required": [ "s3_bucket_name", "s3_bucket_path", "s3_bucket_region", "format", "destination" ], "title": "S3", "type": "object" }, { "$schema": "http://json-schema.org/draft-07/schema#", "additionalProperties": true, "properties": { "address": { "description": "Address to connect to.", "order": 3, "title": "Address", "type": "string" }, "destination": { "const": "airbyte-destination-scylla", "type": "string" }, "keyspace": { "description": "Default Scylla keyspace to create data in.", "order": 0, "title": "Keyspace", "type": "string" }, "password": { "instillCredentialField": true, "description": "Password associated with Scylla.", "order": 2, "title": "Password", "type": "string" }, "port": { "default": 9042, "description": "Port of Scylla.", "maximum": 65536, "minimum": 0, "order": 4, "title": "Port", "type": "integer" }, "replication": { "default": 1, "description": "Indicates to how many nodes the data should be replicated to.", "order": 5, "title": "Replication factor", "type": "integer" }, "username": { "description": "Username to use to access Scylla.", "order": 1, "title": "Username", "type": "string" } }, "required": [ "keyspace", "username", "password", "address", "port", "destination" ], "title": "Scylla", "type": "object" }, { "$schema": "http://json-schema.org/draft-07/schema#", "properties": { "cluster_name": { "description": "clusterName of SelectDB", "order": 2, "title": "ClusterName", "type": "string" }, "database": { "description": "Name of the database.", "order": 5, "title": "DataBase Name", "type": "string" }, "destination": { "const": "airbyte-destination-selectdb", "type": "string" }, "jdbc_url": { "description": "jdbc host and port: xxx.privatelink.aliyun.com:30523", "order": 1, "title": "jdbcURL", "type": "string" }, "load_url": { "description": "load host and port: xxx.privatelink.aliyun.com:47057", "order": 0, "title": "loadURL", "type": "string" }, "password": { "instillCredentialField": true, "description": "Password associated with the username.", "order": 4, "title": "Password", "type": "string" }, "user_name": { "description": "Username to use to access the database.", "order": 3, "title": "UserName", "type": "string" } }, "required": [ "load_url", "jdbc_url", "cluster_name", "user_name", "password", "database", "destination" ], "title": "Selectdb", "type": "object" }, { "$schema": "http://json-schema.org/draft-07/schema#", "additionalProperties": false, "properties": { "destination": { "const": "airbyte-destination-sftp-json", "type": "string" }, "destination_path": { "description": "Path to the directory where json files will be written.", "examples": [ "/json_data" ], "order": 4, "title": "Destination path", "type": "string" }, "host": { "description": "Hostname of the SFTP server.", "order": 0, "title": "Host", "type": "string" }, "password": { "instillCredentialField": true, "description": "Password associated with the username.", "order": 3, "title": "Password", "type": "string" }, "port": { "default": 22, "description": "Port of the SFTP server.", "examples": [ 22 ], "maximum": 65536, "minimum": 0, "order": 1, "title": "Port", "type": "integer" }, "username": { "description": "Username to use to access the SFTP server.", "order": 2, "title": "User", "type": "string" } }, "required": [ "host", "username", "password", "destination_path", "destination" ], "title": "Sftpjson", "type": "object" }, { "$schema": "http://json-schema.org/draft-07/schema#", "additionalProperties": true, "properties": { "credentials": { "description": "", "oneOf": [ { "order": 0, "properties": { "access_token": { "instillCredentialField": true, "description": "Enter you application's Access Token", "title": "Access Token", "type": "string" }, "auth_type": { "const": "OAuth2.0", "default": "OAuth2.0", "enum": [ "OAuth2.0" ], "order": 0, "type": "string" }, "client_id": { "instillCredentialField": true, "description": "Enter your application's Client ID", "title": "Client ID", "type": "string" }, "client_secret": { "instillCredentialField": true, "description": "Enter your application's Client secret", "title": "Client Secret", "type": "string" }, "refresh_token": { "instillCredentialField": true, "description": "Enter your application's Refresh Token", "title": "Refresh Token", "type": "string" } }, "required": [ "access_token", "refresh_token" ], "title": "OAuth2.0", "type": "object" }, { "order": 1, "properties": { "auth_type": { "const": "Key Pair Authentication", "default": "Key Pair Authentication", "enum": [ "Key Pair Authentication" ], "order": 0, "type": "string" }, "private_key": { "instillCredentialField": true, "description": "RSA Private key to use for Snowflake connection. See the docs for more information on how to obtain this key.", "multiline": true, "title": "Private Key", "type": "string" }, "private_key_password": { "instillCredentialField": true, "description": "Passphrase for private key", "title": "Passphrase", "type": "string" } }, "required": [ "private_key" ], "title": "Key Pair Authentication", "type": "object" }, { "order": 2, "properties": { "auth_type": { "const": "Username and Password", "default": "Username and Password", "enum": [ "Username and Password" ], "order": 0, "type": "string" }, "password": { "instillCredentialField": true, "description": "Enter the password associated with the username.", "order": 1, "title": "Password", "type": "string" } }, "required": [ "password" ], "title": "Username and Password", "type": "object" } ], "order": 6, "title": "Authorization Method", "type": "object" }, "database": { "description": "Enter the name of the database you want to sync data into", "examples": [ "AIRBYTE_DATABASE" ], "order": 3, "title": "Database", "type": "string" }, "destination": { "const": "airbyte-destination-snowflake", "type": "string" }, "disable_type_dedupe": { "default": false, "description": "Disable Writing Final Tables. WARNING! The data format in _airbyte_data is likely stable but there are no guarantees that other metadata columns will remain the same in future versions", "order": 11, "title": "Disable Final Tables. (WARNING! Unstable option; Columns in raw table schema might change between versions)", "type": "boolean" }, "host": { "description": "Enter your Snowflake account's locator (in the format ...snowflakecomputing.com)", "examples": [ "accountname.us-east-2.aws.snowflakecomputing.com", "accountname.snowflakecomputing.com" ], "order": 0, "pattern": "^(http(s)?:\\/\\/)?([^./?#]+\\.)?([^./?#]+\\.)?([^./?#]+\\.)?([^./?#]+\\.snowflakecomputing\\.com)$", "pattern_descriptor": "{account_name}.snowflakecomputing.com or {accountname}.{aws_location}.aws.snowflakecomputing.com", "title": "Host", "type": "string" }, "jdbc_url_params": { "description": "Enter the additional properties to pass to the JDBC URL string when connecting to the database (formatted as key=value pairs separated by the symbol &). Example: key1=value1&key2=value2&key3=value3", "order": 7, "title": "JDBC URL Params", "type": "string" }, "raw_data_schema": { "description": "The schema to write raw tables into (default: airbyte_internal)", "order": 10, "title": "Raw Table Schema Name", "type": "string" }, "role": { "description": "Enter the role that you want to use to access Snowflake", "examples": [ "AIRBYTE_ROLE" ], "order": 1, "title": "Role", "type": "string" }, "schema": { "description": "Enter the name of the default schema", "examples": [ "AIRBYTE_SCHEMA" ], "order": 4, "title": "Default Schema", "type": "string" }, "username": { "description": "Enter the name of the user you want to use to access the database", "examples": [ "AIRBYTE_USER" ], "order": 5, "title": "Username", "type": "string" }, "warehouse": { "description": "Enter the name of the warehouse that you want to sync data into", "examples": [ "AIRBYTE_WAREHOUSE" ], "order": 2, "title": "Warehouse", "type": "string" } }, "required": [ "host", "role", "warehouse", "database", "schema", "username", "destination" ], "title": "Snowflake", "type": "object" }, { "$schema": "http://json-schema.org/draft-07/schema#", "additionalProperties": false, "properties": { "destination": { "const": "airbyte-destination-sqlite", "type": "string" }, "destination_path": { "description": "Path to the sqlite.db file. The file will be placed inside that local mount. For more information check out our docs", "example": "/local/sqlite.db", "type": "string" } }, "required": [ "destination_path", "destination" ], "title": "Sqlite", "type": "object" }, { "$schema": "http://json-schema.org/draft-07/schema#", "properties": { "accept_terms": { "default": false, "description": "You must agree to the Starburst Galaxy terms & conditions to use this connector.", "order": 1, "title": "Agree to the Starburst Galaxy terms & conditions", "type": "boolean" }, "catalog": { "description": "Name of the Starburst Galaxy Amazon S3 catalog.", "examples": [ "sample_s3_catalog" ], "order": 6, "title": "Amazon S3 catalog", "type": "string" }, "catalog_schema": { "default": "public", "description": "The default Starburst Galaxy Amazon S3 catalog schema where tables are written to if the source does not specify a namespace. Defaults to \"public\".", "examples": [ "public" ], "order": 7, "title": "Amazon S3 catalog schema", "type": "string" }, "destination": { "const": "airbyte-destination-starburst-galaxy", "type": "string" }, "password": { "instillCredentialField": true, "description": "Starburst Galaxy password for the specified user.", "examples": [ "password" ], "order": 5, "title": "Password", "type": "string" }, "port": { "default": "443", "description": "Starburst Galaxy cluster port.", "examples": [ "443" ], "order": 3, "title": "Port", "type": "string" }, "purge_staging_table": { "default": true, "description": "Defaults to 'true'. Switch to 'false' for debugging purposes.", "order": 9, "title": "Purge staging Iceberg table", "type": "boolean" }, "server_hostname": { "description": "Starburst Galaxy cluster hostname.", "examples": [ "abc-12345678-wxyz.trino.galaxy-demo.io" ], "order": 2, "title": "Hostname", "type": "string" }, "staging_object_store": { "description": "Temporary storage on which temporary Iceberg table is created.", "oneOf": [ { "properties": { "object_store_type": { "default": "S3", "enum": [ "S3" ], "order": 1, "type": "string" }, "s3_access_key_id": { "instillCredentialField": true, "description": "Access key with access to the bucket. Airbyte requires read and write permissions to a given bucket.", "examples": [ "A012345678910EXAMPLE" ], "order": 4, "title": "Access key", "type": "string" }, "s3_bucket_name": { "description": "Name of the S3 bucket", "examples": [ "airbyte_staging" ], "order": 1, "title": "S3 bucket name", "type": "string" }, "s3_bucket_path": { "description": "Directory in the S3 bucket where staging data is stored.", "examples": [ "temp_airbyte__sync/test" ], "order": 2, "title": "S3 bucket path", "type": "string" }, "s3_bucket_region": { "default": "us-east-1", "description": "The region of the S3 bucket.", "enum": [ "ap-northeast-1", "ap-southeast-1", "ap-southeast-2", "ca-central-1", "eu-central-1", "eu-west-1", "eu-west-2", "eu-west-3", "us-east-1", "us-east-2", "us-west-1", "us-west-2" ], "order": 3, "title": "S3 bucket region", "type": "string" }, "s3_secret_access_key": { "instillCredentialField": true, "description": "Secret key used with the specified access key.", "examples": [ "a012345678910ABCDEFGH/AbCdEfGhEXAMPLEKEY" ], "order": 5, "title": "Secret key", "type": "string" } }, "required": [ "object_store_type", "s3_bucket_name", "s3_bucket_path", "s3_bucket_region", "s3_access_key_id", "s3_secret_access_key" ], "title": "Amazon S3" } ], "order": 8, "title": "Staging object store", "type": "object" }, "username": { "description": "Starburst Galaxy user.", "examples": [ "user@example.com" ], "order": 4, "title": "User", "type": "string" } }, "required": [ "accept_terms", "server_hostname", "username", "password", "catalog", "staging_object_store", "destination" ], "title": "Starburstgalaxy", "type": "object" }, { "$schema": "http://json-schema.org/draft-07/schema#", "additionalProperties": true, "properties": { "destination": { "const": "airbyte-destination-teradata", "type": "string" }, "host": { "description": "Hostname of the database.", "order": 0, "title": "Host", "type": "string" }, "jdbc_url_params": { "description": "Additional properties to pass to the JDBC URL string when connecting to the database formatted as 'key=value' pairs separated by the symbol '&'. (example: key1=value1&key2=value2&key3=value3).", "order": 7, "title": "JDBC URL Params", "type": "string" }, "password": { "instillCredentialField": true, "description": "Password associated with the username.", "order": 2, "title": "Password", "type": "string" }, "schema": { "default": "airbyte_td", "description": "The default schema tables are written to if the source does not specify a namespace. The usual value for this field is \"public\".", "examples": [ "airbyte_td" ], "order": 3, "title": "Default Schema", "type": "string" }, "ssl": { "default": false, "description": "Encrypt data using SSL. When activating SSL, please select one of the connection modes.", "order": 5, "title": "SSL Connection", "type": "boolean" }, "ssl_mode": { "description": "SSL connection modes. \n disable - Chose this mode to disable encryption of communication between Airbyte and destination database\n allow - Chose this mode to enable encryption only when required by the destination database\n prefer - Chose this mode to allow unencrypted connection only if the destination database does not support encryption\n require - Chose this mode to always require encryption. If the destination database server does not support encryption, connection will fail\n verify-ca - Chose this mode to always require encryption and to verify that the destination database server has a valid SSL certificate\n verify-full - This is the most secure mode. Chose this mode to always require encryption and to verify the identity of the destination database server\n See more information - in the docs.", "oneOf": [ { "additionalProperties": false, "description": "Disable SSL.", "properties": { "mode": { "const": "disable", "default": "disable", "enum": [ "disable" ], "order": 0, "type": "string" } }, "required": [ "mode" ], "title": "disable" }, { "additionalProperties": false, "description": "Allow SSL mode.", "properties": { "mode": { "const": "allow", "default": "allow", "enum": [ "allow" ], "order": 0, "type": "string" } }, "required": [ "mode" ], "title": "allow" }, { "additionalProperties": false, "description": "Prefer SSL mode.", "properties": { "mode": { "const": "prefer", "default": "prefer", "enum": [ "prefer" ], "order": 0, "type": "string" } }, "required": [ "mode" ], "title": "prefer" }, { "additionalProperties": false, "description": "Require SSL mode.", "properties": { "mode": { "const": "require", "default": "require", "enum": [ "require" ], "order": 0, "type": "string" } }, "required": [ "mode" ], "title": "require" }, { "additionalProperties": false, "description": "Verify-ca SSL mode.", "properties": { "mode": { "const": "verify-ca", "default": "verify-ca", "enum": [ "verify-ca" ], "order": 0, "type": "string" }, "ssl_ca_certificate": { "instillCredentialField": true, "description": "Specifies the file name of a PEM file that contains Certificate Authority (CA) certificates for use with SSLMODE=verify-ca.\n See more information - in the docs.", "multiline": true, "order": 1, "title": "CA certificate", "type": "string" } }, "required": [ "mode", "ssl_ca_certificate" ], "title": "verify-ca" }, { "additionalProperties": false, "description": "Verify-full SSL mode.", "properties": { "mode": { "const": "verify-full", "default": "verify-full", "enum": [ "verify-full" ], "order": 0, "type": "string" }, "ssl_ca_certificate": { "instillCredentialField": true, "description": "Specifies the file name of a PEM file that contains Certificate Authority (CA) certificates for use with SSLMODE=verify-full.\n See more information - in the docs.", "multiline": true, "order": 1, "title": "CA certificate", "type": "string" } }, "required": [ "mode", "ssl_ca_certificate" ], "title": "verify-full" } ], "order": 6, "title": "SSL modes", "type": "object" }, "username": { "description": "Username to use to access the database.", "order": 1, "title": "User", "type": "string" } }, "required": [ "host", "username", "destination" ], "title": "Teradata", "type": "object" }, { "$schema": "http://json-schema.org/draft-07/schema#", "additionalProperties": true, "properties": { "database": { "description": "Name of the database.", "order": 2, "title": "Database", "type": "string" }, "destination": { "const": "airbyte-destination-tidb", "type": "string" }, "host": { "description": "Hostname of the database.", "order": 0, "title": "Host", "type": "string" }, "jdbc_url_params": { "description": "Additional properties to pass to the JDBC URL string when connecting to the database formatted as 'key=value' pairs separated by the symbol '&'. (example: key1=value1&key2=value2&key3=value3).", "order": 6, "title": "JDBC URL Params", "type": "string" }, "password": { "instillCredentialField": true, "default": "", "description": "Password associated with the username.", "order": 4, "title": "Password", "type": "string" }, "port": { "default": 4000, "description": "Port of the database.", "examples": [ "4000" ], "maximum": 65536, "minimum": 0, "order": 1, "title": "Port", "type": "integer" }, "ssl": { "default": false, "description": "Encrypt data using SSL.", "order": 5, "title": "SSL Connection", "type": "boolean" }, "tunnel_method": { "description": "Whether to initiate an SSH tunnel before connecting to the database, and if so, which kind of authentication to use.", "oneOf": [ { "properties": { "tunnel_method": { "const": "NO_TUNNEL", "description": "No ssh tunnel needed to connect to database", "order": 0, "type": "string" } }, "required": [ "tunnel_method" ], "title": "No Tunnel" }, { "properties": { "ssh_key": { "instillCredentialField": true, "description": "OS-level user account ssh key credentials in RSA PEM format ( created with ssh-keygen -t rsa -m PEM -f myuser_rsa )", "multiline": true, "order": 4, "title": "SSH Private Key", "type": "string" }, "tunnel_host": { "description": "Hostname of the jump server host that allows inbound ssh tunnel.", "order": 1, "title": "SSH Tunnel Jump Server Host", "type": "string" }, "tunnel_method": { "const": "SSH_KEY_AUTH", "description": "Connect through a jump server tunnel host using username and ssh key", "order": 0, "type": "string" }, "tunnel_port": { "default": 22, "description": "Port on the proxy/jump server that accepts inbound ssh connections.", "examples": [ "22" ], "maximum": 65536, "minimum": 0, "order": 2, "title": "SSH Connection Port", "type": "integer" }, "tunnel_user": { "description": "OS-level username for logging into the jump server host.", "order": 3, "title": "SSH Login Username", "type": "string" } }, "required": [ "tunnel_method", "tunnel_host", "tunnel_port", "tunnel_user", "ssh_key" ], "title": "SSH Key Authentication" }, { "properties": { "tunnel_host": { "description": "Hostname of the jump server host that allows inbound ssh tunnel.", "order": 1, "title": "SSH Tunnel Jump Server Host", "type": "string" }, "tunnel_method": { "const": "SSH_PASSWORD_AUTH", "description": "Connect through a jump server tunnel host using username and password authentication", "order": 0, "type": "string" }, "tunnel_port": { "default": 22, "description": "Port on the proxy/jump server that accepts inbound ssh connections.", "examples": [ "22" ], "maximum": 65536, "minimum": 0, "order": 2, "title": "SSH Connection Port", "type": "integer" }, "tunnel_user": { "description": "OS-level username for logging into the jump server host", "order": 3, "title": "SSH Login Username", "type": "string" }, "tunnel_user_password": { "instillCredentialField": true, "description": "OS-level password for logging into the jump server host", "order": 4, "title": "Password", "type": "string" } }, "required": [ "tunnel_method", "tunnel_host", "tunnel_port", "tunnel_user", "tunnel_user_password" ], "title": "Password Authentication" } ], "title": "SSH Tunnel Method", "type": "object" }, "username": { "description": "Username to use to access the database.", "order": 3, "title": "User", "type": "string" } }, "required": [ "host", "port", "username", "database", "destination" ], "title": "Tidb", "type": "object" }, { "$schema": "http://json-schema.org/draft-07/schema#", "additionalProperties": false, "properties": { "apikey": { "instillCredentialField": true, "description": "Personal API key", "order": 1, "title": "API key", "type": "string" }, "destination": { "const": "airbyte-destination-timeplus", "type": "string" }, "endpoint": { "default": "https://us.timeplus.cloud/", "description": "Timeplus workspace endpoint", "examples": [ "https://us.timeplus.cloud/workspace_id" ], "order": 0, "title": "Endpoint", "type": "string" } }, "required": [ "endpoint", "apikey", "destination" ], "title": "Timeplus", "type": "object" }, { "$schema": "http://json-schema.org/draft-07/schema#", "additionalProperties": false, "properties": { "api_key": { "description": "Typesense API Key", "order": 0, "title": "API Key", "type": "string" }, "batch_size": { "description": "How many documents should be imported together. Default 1000", "order": 4, "title": "Batch size", "type": "integer" }, "destination": { "const": "airbyte-destination-typesense", "type": "string" }, "host": { "description": "Hostname of the Typesense instance without protocol.", "order": 1, "title": "Host", "type": "string" }, "port": { "description": "Port of the Typesense instance. Ex: 8108, 80, 443. Default is 443", "order": 2, "title": "Port", "type": "string" }, "protocol": { "description": "Protocol of the Typesense instance. Ex: http or https. Default is https", "order": 3, "title": "Protocol", "type": "string" } }, "required": [ "api_key", "host", "destination" ], "title": "Typesense", "type": "object" }, { "$schema": "http://json-schema.org/draft-07/schema#", "additionalProperties": true, "properties": { "database": { "description": "Name of the database.", "order": 2, "title": "DB Name", "type": "string" }, "destination": { "const": "airbyte-destination-vertica", "type": "string" }, "host": { "description": "Hostname of the database.", "order": 0, "title": "Host", "type": "string" }, "jdbc_url_params": { "description": "Additional properties to pass to the JDBC URL string when connecting to the database formatted as 'key=value' pairs separated by the symbol '&'. (example: key1=value1&key2=value2&key3=value3).", "order": 6, "title": "JDBC URL Params", "type": "string" }, "password": { "instillCredentialField": true, "description": "Password associated with the username.", "order": 4, "title": "Password", "type": "string" }, "port": { "default": 5433, "description": "Port of the database.", "examples": [ "5433" ], "maximum": 65536, "minimum": 0, "order": 1, "title": "Port", "type": "integer" }, "schema": { "description": "Schema for vertica destination", "order": 7, "title": "Schema", "type": "string" }, "tunnel_method": { "description": "Whether to initiate an SSH tunnel before connecting to the database, and if so, which kind of authentication to use.", "oneOf": [ { "properties": { "tunnel_method": { "const": "NO_TUNNEL", "description": "No ssh tunnel needed to connect to database", "order": 0, "type": "string" } }, "required": [ "tunnel_method" ], "title": "No Tunnel" }, { "properties": { "ssh_key": { "instillCredentialField": true, "description": "OS-level user account ssh key credentials in RSA PEM format ( created with ssh-keygen -t rsa -m PEM -f myuser_rsa )", "multiline": true, "order": 4, "title": "SSH Private Key", "type": "string" }, "tunnel_host": { "description": "Hostname of the jump server host that allows inbound ssh tunnel.", "order": 1, "title": "SSH Tunnel Jump Server Host", "type": "string" }, "tunnel_method": { "const": "SSH_KEY_AUTH", "description": "Connect through a jump server tunnel host using username and ssh key", "order": 0, "type": "string" }, "tunnel_port": { "default": 22, "description": "Port on the proxy/jump server that accepts inbound ssh connections.", "examples": [ "22" ], "maximum": 65536, "minimum": 0, "order": 2, "title": "SSH Connection Port", "type": "integer" }, "tunnel_user": { "description": "OS-level username for logging into the jump server host.", "order": 3, "title": "SSH Login Username", "type": "string" } }, "required": [ "tunnel_method", "tunnel_host", "tunnel_port", "tunnel_user", "ssh_key" ], "title": "SSH Key Authentication" }, { "properties": { "tunnel_host": { "description": "Hostname of the jump server host that allows inbound ssh tunnel.", "order": 1, "title": "SSH Tunnel Jump Server Host", "type": "string" }, "tunnel_method": { "const": "SSH_PASSWORD_AUTH", "description": "Connect through a jump server tunnel host using username and password authentication", "order": 0, "type": "string" }, "tunnel_port": { "default": 22, "description": "Port on the proxy/jump server that accepts inbound ssh connections.", "examples": [ "22" ], "maximum": 65536, "minimum": 0, "order": 2, "title": "SSH Connection Port", "type": "integer" }, "tunnel_user": { "description": "OS-level username for logging into the jump server host", "order": 3, "title": "SSH Login Username", "type": "string" }, "tunnel_user_password": { "instillCredentialField": true, "description": "OS-level password for logging into the jump server host", "order": 4, "title": "Password", "type": "string" } }, "required": [ "tunnel_method", "tunnel_host", "tunnel_port", "tunnel_user", "tunnel_user_password" ], "title": "Password Authentication" } ], "title": "SSH Tunnel Method", "type": "object" }, "username": { "description": "Username to use to access the database.", "order": 3, "title": "User", "type": "string" } }, "required": [ "host", "port", "username", "database", "schema", "destination" ], "title": "Vertica", "type": "object" }, { "description": "The configuration model for the Vector DB based destinations. This model is used to generate the UI for the destination configuration,\nas well as to provide type safety for the configuration passed to the destination.\n\nThe configuration model is composed of four parts:\n* Processing configuration\n* Embedding configuration\n* Indexing configuration\n* Advanced configuration\n\nProcessing, embedding and advanced configuration are provided by this base class, while the indexing configuration is provided by the destination connector in the sub class.", "groups": [ { "id": "processing", "title": "Processing" }, { "id": "embedding", "title": "Embedding" }, { "id": "indexing", "title": "Indexing" }, { "id": "advanced", "title": "Advanced" } ], "properties": { "destination": { "const": "airbyte-destination-weaviate", "type": "string" }, "embedding": { "description": "Embedding configuration", "group": "embedding", "oneOf": [ { "description": "Do not calculate and pass embeddings to Weaviate. Suitable for clusters with configured vectorizers to calculate embeddings within Weaviate or for classes that should only support regular text search.", "properties": { "mode": { "const": "no_embedding", "default": "no_embedding", "enum": [ "no_embedding" ], "title": "Mode", "type": "string" } }, "required": [ "mode" ], "title": "No external embedding", "type": "object" }, { "description": "Use the Azure-hosted OpenAI API to embed text. This option is using the text-embedding-ada-002 model with 1536 embedding dimensions.", "properties": { "api_base": { "description": "The base URL for your Azure OpenAI resource. You can find this in the Azure portal under your Azure OpenAI resource", "examples": [ "https://your-resource-name.openai.azure.com" ], "title": "Resource base URL", "type": "string" }, "deployment": { "description": "The deployment for your Azure OpenAI resource. You can find this in the Azure portal under your Azure OpenAI resource", "examples": [ "your-resource-name" ], "title": "Deployment", "type": "string" }, "mode": { "const": "azure_openai", "default": "azure_openai", "enum": [ "azure_openai" ], "title": "Mode", "type": "string" }, "openai_key": { "instillCredentialField": true, "description": "The API key for your Azure OpenAI resource. You can find this in the Azure portal under your Azure OpenAI resource", "title": "Azure OpenAI API key", "type": "string" } }, "required": [ "openai_key", "api_base", "deployment", "mode" ], "title": "Azure OpenAI", "type": "object" }, { "description": "Use the OpenAI API to embed text. This option is using the text-embedding-ada-002 model with 1536 embedding dimensions.", "properties": { "mode": { "const": "openai", "default": "openai", "enum": [ "openai" ], "title": "Mode", "type": "string" }, "openai_key": { "instillCredentialField": true, "title": "OpenAI API key", "type": "string" } }, "required": [ "openai_key", "mode" ], "title": "OpenAI", "type": "object" }, { "description": "Use the Cohere API to embed text.", "properties": { "cohere_key": { "instillCredentialField": true, "title": "Cohere API key", "type": "string" }, "mode": { "const": "cohere", "default": "cohere", "enum": [ "cohere" ], "title": "Mode", "type": "string" } }, "required": [ "cohere_key", "mode" ], "title": "Cohere", "type": "object" }, { "description": "Use a field in the record as the embedding. This is useful if you already have an embedding for your data and want to store it in the vector store.", "properties": { "dimensions": { "description": "The number of dimensions the embedding model is generating", "examples": [ 1536, 384 ], "title": "Embedding dimensions", "type": "integer" }, "field_name": { "description": "Name of the field in the record that contains the embedding", "examples": [ "embedding", "vector" ], "title": "Field name", "type": "string" }, "mode": { "const": "from_field", "default": "from_field", "enum": [ "from_field" ], "title": "Mode", "type": "string" } }, "required": [ "field_name", "dimensions", "mode" ], "title": "From Field", "type": "object" }, { "description": "Use a fake embedding made out of random vectors with 1536 embedding dimensions. This is useful for testing the data pipeline without incurring any costs.", "properties": { "mode": { "const": "fake", "default": "fake", "enum": [ "fake" ], "title": "Mode", "type": "string" } }, "required": [ "mode" ], "title": "Fake", "type": "object" }, { "description": "Use a service that's compatible with the OpenAI API to embed text.", "properties": { "api_key": { "instillCredentialField": true, "default": "", "title": "API key", "type": "string" }, "base_url": { "description": "The base URL for your OpenAI-compatible service", "examples": [ "https://your-service-name.com" ], "title": "Base URL", "type": "string" }, "dimensions": { "description": "The number of dimensions the embedding model is generating", "examples": [ 1536, 384 ], "title": "Embedding dimensions", "type": "integer" }, "mode": { "const": "openai_compatible", "default": "openai_compatible", "enum": [ "openai_compatible" ], "title": "Mode", "type": "string" }, "model_name": { "default": "text-embedding-ada-002", "description": "The name of the model to use for embedding", "examples": [ "text-embedding-ada-002" ], "title": "Model name", "type": "string" } }, "required": [ "base_url", "dimensions", "mode" ], "title": "OpenAI-compatible", "type": "object" } ], "title": "Embedding", "type": "object" }, "indexing": { "description": "Indexing configuration", "group": "indexing", "properties": { "additional_headers": { "default": [], "description": "Additional HTTP headers to send with every request.", "examples": [ { "header_key": "X-OpenAI-Api-Key", "value": "my-openai-api-key" } ], "items": { "properties": { "header_key": { "title": "Header Key", "type": "string" }, "value": { "instillCredentialField": true, "title": "Header Value", "type": "string" } }, "required": [ "header_key", "value" ], "title": "Header", "type": "object" }, "title": "Additional headers", "type": "array" }, "auth": { "description": "Authentication method", "oneOf": [ { "description": "Authenticate using an API token (suitable for Weaviate Cloud)", "properties": { "mode": { "const": "token", "default": "token", "enum": [ "token" ], "title": "Mode", "type": "string" }, "token": { "instillCredentialField": true, "description": "API Token for the Weaviate instance", "title": "API Token", "type": "string" } }, "required": [ "token", "mode" ], "title": "API Token", "type": "object" }, { "description": "Authenticate using username and password (suitable for self-managed Weaviate clusters)", "properties": { "mode": { "const": "username_password", "default": "username_password", "enum": [ "username_password" ], "title": "Mode", "type": "string" }, "password": { "instillCredentialField": true, "description": "Password for the Weaviate cluster", "order": 2, "title": "Password", "type": "string" }, "username": { "description": "Username for the Weaviate cluster", "order": 1, "title": "Username", "type": "string" } }, "required": [ "username", "password", "mode" ], "title": "Username/Password", "type": "object" }, { "description": "Do not authenticate (suitable for locally running test clusters, do not use for clusters with public IP addresses)", "properties": { "mode": { "const": "no_auth", "default": "no_auth", "enum": [ "no_auth" ], "title": "Mode", "type": "string" } }, "required": [ "mode" ], "title": "No Authentication", "type": "object" } ], "order": 2, "title": "Authentication", "type": "object" }, "batch_size": { "default": 128, "description": "The number of records to send to Weaviate in each batch", "title": "Batch Size", "type": "integer" }, "default_vectorizer": { "default": "none", "description": "The vectorizer to use if new classes need to be created", "enum": [ "none", "text2vec-cohere", "text2vec-huggingface", "text2vec-openai", "text2vec-palm", "text2vec-contextionary", "text2vec-transformers", "text2vec-gpt4all" ], "title": "Default Vectorizer", "type": "string" }, "host": { "description": "The public endpoint of the Weaviate cluster.", "examples": [ "https://my-cluster.weaviate.network" ], "order": 1, "title": "Public Endpoint", "type": "string" }, "text_field": { "default": "text", "description": "The field in the object that contains the embedded text", "title": "Text Field", "type": "string" } }, "required": [ "host", "auth" ], "title": "Indexing", "type": "object" }, "omit_raw_text": { "default": false, "description": "Do not store the text that gets embedded along with the vector and the metadata in the destination. If set to true, only the vector and the metadata will be stored - in this case raw text for LLM use cases needs to be retrieved from another source.", "group": "advanced", "title": "Do not store raw text", "type": "boolean" }, "processing": { "group": "processing", "properties": { "chunk_overlap": { "default": 0, "description": "Size of overlap between chunks in tokens to store in vector store to better capture relevant context", "title": "Chunk overlap", "type": "integer" }, "chunk_size": { "description": "Size of chunks in tokens to store in vector store (make sure it is not too big for the context if your LLM)", "maximum": 8191, "minimum": 1, "title": "Chunk size", "type": "integer" }, "field_name_mappings": { "default": [], "description": "List of fields to rename. Not applicable for nested fields, but can be used to rename fields already flattened via dot notation.", "items": { "properties": { "from_field": { "description": "The field name in the source", "title": "From field name", "type": "string" }, "to_field": { "description": "The field name to use in the destination", "title": "To field name", "type": "string" } }, "required": [ "from_field", "to_field" ], "title": "FieldNameMappingConfigModel", "type": "object" }, "title": "Field name mappings", "type": "array" }, "metadata_fields": { "always_show": true, "default": [], "description": "List of fields in the record that should be stored as metadata. The field list is applied to all streams in the same way and non-existing fields are ignored. If none are defined, all fields are considered metadata fields. When specifying text fields, you can access nested fields in the record by using dot notation, e.g. `user.name` will access the `name` field in the `user` object. It's also possible to use wildcards to access all fields in an object, e.g. `users.*.name` will access all `names` fields in all entries of the `users` array. When specifying nested paths, all matching values are flattened into an array set to a field named by the path.", "examples": [ "age", "user", "user.name" ], "items": { "type": "string" }, "title": "Fields to store as metadata", "type": "array" }, "text_fields": { "always_show": true, "default": [], "description": "List of fields in the record that should be used to calculate the embedding. The field list is applied to all streams in the same way and non-existing fields are ignored. If none are defined, all fields are considered text fields. When specifying text fields, you can access nested fields in the record by using dot notation, e.g. `user.name` will access the `name` field in the `user` object. It's also possible to use wildcards to access all fields in an object, e.g. `users.*.name` will access all `names` fields in all entries of the `users` array.", "examples": [ "text", "user.name", "users.*.name" ], "items": { "type": "string" }, "title": "Text fields to embed", "type": "array" }, "text_splitter": { "description": "Split text fields into chunks based on the specified method.", "oneOf": [ { "description": "Split the text by the list of separators until the chunk size is reached, using the earlier mentioned separators where possible. This is useful for splitting text fields by paragraphs, sentences, words, etc.", "properties": { "keep_separator": { "default": false, "description": "Whether to keep the separator in the resulting chunks", "title": "Keep separator", "type": "boolean" }, "mode": { "const": "separator", "default": "separator", "enum": [ "separator" ], "title": "Mode", "type": "string" }, "separators": { "default": [ "\"\\n\\n\"", "\"\\n\"", "\" \"", "\"\"" ], "description": "List of separator strings to split text fields by. The separator itself needs to be wrapped in double quotes, e.g. to split by the dot character, use \".\". To split by a newline, use \"\\n\".", "items": { "type": "string" }, "title": "Separators", "type": "array" } }, "required": [ "mode" ], "title": "By Separator", "type": "object" }, { "description": "Split the text by Markdown headers down to the specified header level. If the chunk size fits multiple sections, they will be combined into a single chunk.", "properties": { "mode": { "const": "markdown", "default": "markdown", "enum": [ "markdown" ], "title": "Mode", "type": "string" }, "split_level": { "default": 1, "description": "Level of markdown headers to split text fields by. Headings down to the specified level will be used as split points", "maximum": 6, "minimum": 1, "title": "Split level", "type": "integer" } }, "required": [ "mode" ], "title": "By Markdown header", "type": "object" }, { "description": "Split the text by suitable delimiters based on the programming language. This is useful for splitting code into chunks.", "properties": { "language": { "description": "Split code in suitable places based on the programming language", "enum": [ "cpp", "go", "java", "js", "php", "proto", "python", "rst", "ruby", "rust", "scala", "swift", "markdown", "latex", "html", "sol" ], "title": "Language", "type": "string" }, "mode": { "const": "code", "default": "code", "enum": [ "code" ], "title": "Mode", "type": "string" } }, "required": [ "language", "mode" ], "title": "By Programming Language", "type": "object" } ], "title": "Text splitter", "type": "object" } }, "required": [ "chunk_size" ], "title": "ProcessingConfigModel", "type": "object" } }, "required": [ "embedding", "processing", "indexing", "destination" ], "title": "Weaviate", "type": "object" }, { "$schema": "http://json-schema.org/draft-07/schema#", "additionalProperties": true, "properties": { "api_key": { "instillCredentialField": true, "description": "API Key to connect.", "order": 0, "title": "API Key", "type": "string" }, "db_url": { "description": "URL pointing to your workspace.", "example": "https://my-workspace-abc123.us-east-1.xata.sh/db/nyc-taxi-fares:main", "order": 1, "title": "Database URL", "type": "string" }, "destination": { "const": "airbyte-destination-xata", "type": "string" } }, "required": [ "api_key", "db_url", "destination" ], "title": "Xata", "type": "object" }, { "$schema": "http://json-schema.org/draft-07/schema#", "additionalProperties": true, "properties": { "database": { "description": "Name of the database.", "order": 2, "title": "Database", "type": "string" }, "destination": { "const": "airbyte-destination-yugabytedb", "type": "string" }, "host": { "description": "The Hostname of the database.", "order": 0, "title": "Host", "type": "string" }, "jdbc_url_params": { "description": "Additional properties to pass to the JDBC URL string when connecting to the database formatted as 'key=value' pairs separated by the symbol '&'. (example: key1=value1&key2=value2&key3=value3).", "order": 6, "title": "JDBC URL Params", "type": "string" }, "password": { "instillCredentialField": true, "description": "The Password associated with the username.", "order": 5, "title": "Password", "type": "string" }, "port": { "default": 3306, "description": "The Port of the database.", "examples": [ "3306" ], "maximum": 65536, "minimum": 0, "order": 1, "title": "Port", "type": "integer" }, "schema": { "default": "public", "description": "The default schema tables are written to if the source does not specify a namespace. The usual value for this field is \"public\".", "examples": [ "public" ], "order": 3, "title": "Default Schema", "type": "string" }, "username": { "description": "The Username which is used to access the database.", "order": 4, "title": "Username", "type": "string" } }, "required": [ "host", "port", "username", "database", "schema", "destination" ], "title": "Yugabytedb", "type": "object" }, { "$schema": "http://json-schema.org/draft-07/schema#", "additionalProperties": false, "properties": { "destination": { "const": "airbyte-devmate-cloud", "type": "string" }, "privateKey": { "instillCredentialField": true, "description": "You private key on Streamr", "type": "string" }, "streamId": { "description": "Your full Stream ID", "examples": [ "0x0d0102474519cd2fc1b3e3f962a87e39cbcbead2/test-streamr" ], "type": "string" } }, "required": [ "privateKey", "streamId", "destination" ], "title": "Airbytedevmatecloud", "type": "object" } ], "title": "Destination", "type": "object" } diff --git a/instill/resources/schema/jsons/airbyte_task_write_destination_input.json b/instill/resources/schema/jsons/airbyte_task_write_destination_input.json new file mode 100644 index 0000000..2a585fa --- /dev/null +++ b/instill/resources/schema/jsons/airbyte_task_write_destination_input.json @@ -0,0 +1 @@ +{"instillUIOrder":0,"properties":{"data":{"additionalProperties":false,"instillShortDescription":"The data to be written into the destination","instillUIOrder":0,"patternProperties":{"^[a-z_][-a-z_0-9]{0,31}$":{"instillAcceptFormats":["*"],"instillUIOrder":0,"instillUpstreamTypes":["reference","template"],"title":"Data"}},"required":[],"title":"Input","type":"object"}},"required":["data"],"title":"Input","type":"object"} diff --git a/instill/resources/schema/jsons/airbyte_task_write_destination_output.json b/instill/resources/schema/jsons/airbyte_task_write_destination_output.json new file mode 100644 index 0000000..b5cefe6 --- /dev/null +++ b/instill/resources/schema/jsons/airbyte_task_write_destination_output.json @@ -0,0 +1 @@ +{"instillUIOrder":0,"required":[],"title":"Output","type":"object"} diff --git a/instill/resources/schema/jsons/airbyte_tasks.json b/instill/resources/schema/jsons/airbyte_tasks.json new file mode 100644 index 0000000..34ab448 --- /dev/null +++ b/instill/resources/schema/jsons/airbyte_tasks.json @@ -0,0 +1,41 @@ +{ + "TASK_WRITE_DESTINATION": { + "input": { + "instillUIOrder": 0, + "properties": { + "data": { + "additionalProperties": false, + "instillShortDescription": "The data to be written into the destination", + "instillUIOrder": 0, + "patternProperties": { + "^[a-z_][-a-z_0-9]{0,31}$": { + "instillAcceptFormats": [ + "*" + ], + "instillUIOrder": 0, + "instillUpstreamTypes": [ + "reference", + "template" + ], + "title": "Data" + } + }, + "required": [], + "title": "Input", + "type": "object" + } + }, + "required": [ + "data" + ], + "title": "Input", + "type": "object" + }, + "output": { + "instillUIOrder": 0, + "required": [], + "title": "Output", + "type": "object" + } + } +} diff --git a/instill/resources/schema/jsons/base64_definitions.json b/instill/resources/schema/jsons/base64_definitions.json new file mode 100644 index 0000000..5a85f15 --- /dev/null +++ b/instill/resources/schema/jsons/base64_definitions.json @@ -0,0 +1,18 @@ +[ + { + "available_tasks": [ + "TASK_ENCODE", + "TASK_DECODE" + ], + "custom": false, + "documentation_url": "https://www.instill.tech/docs/latest/vdp/operators/base64", + "icon": "base64.svg", + "icon_url": "", + "id": "base64", + "public": true, + "spec": {}, + "title": "Base64", + "tombstone": false, + "uid": "3a836447-c211-4134-9cc5-ad45e1cc467e" + } +] diff --git a/instill/resources/schema/jsons/base64_task_decode_input.json b/instill/resources/schema/jsons/base64_task_decode_input.json new file mode 100644 index 0000000..50933e7 --- /dev/null +++ b/instill/resources/schema/jsons/base64_task_decode_input.json @@ -0,0 +1 @@ +{"description":"Input","instillEditOnNodeFields":["data"],"instillUIOrder":0,"properties":{"data":{"description":"Base64 string to be decoded","instillAcceptFormats":["string"],"instillUIMultiline":true,"instillUIOrder":0,"instillUpstreamTypes":["value","reference"],"title":"Data","type":"string"}},"required":["data"],"title":"Input","type":"object"} diff --git a/instill/resources/schema/jsons/base64_task_decode_output.json b/instill/resources/schema/jsons/base64_task_decode_output.json new file mode 100644 index 0000000..97d0c2e --- /dev/null +++ b/instill/resources/schema/jsons/base64_task_decode_output.json @@ -0,0 +1 @@ +{"description":"Output","instillEditOnNodeFields":["data"],"instillUIOrder":0,"properties":{"data":{"description":"Data","instillFormat":"string","instillUIMultiline":true,"instillUIOrder":0,"title":"Data","type":"string"}},"required":["data"],"title":"Output","type":"object"} diff --git a/instill/resources/schema/jsons/base64_task_encode_input.json b/instill/resources/schema/jsons/base64_task_encode_input.json new file mode 100644 index 0000000..440e066 --- /dev/null +++ b/instill/resources/schema/jsons/base64_task_encode_input.json @@ -0,0 +1 @@ +{"description":"Input","instillEditOnNodeFields":["data"],"instillUIOrder":0,"properties":{"data":{"description":"Data to be encoded","instillAcceptFormats":["string"],"instillUIMultiline":true,"instillUIOrder":0,"instillUpstreamTypes":["value","reference"],"title":"Data","type":"string"}},"required":["data"],"title":"Input","type":"object"} diff --git a/instill/resources/schema/jsons/base64_task_encode_output.json b/instill/resources/schema/jsons/base64_task_encode_output.json new file mode 100644 index 0000000..97d0c2e --- /dev/null +++ b/instill/resources/schema/jsons/base64_task_encode_output.json @@ -0,0 +1 @@ +{"description":"Output","instillEditOnNodeFields":["data"],"instillUIOrder":0,"properties":{"data":{"description":"Data","instillFormat":"string","instillUIMultiline":true,"instillUIOrder":0,"title":"Data","type":"string"}},"required":["data"],"title":"Output","type":"object"} diff --git a/instill/resources/schema/jsons/base64_tasks.json b/instill/resources/schema/jsons/base64_tasks.json new file mode 100644 index 0000000..c5c6801 --- /dev/null +++ b/instill/resources/schema/jsons/base64_tasks.json @@ -0,0 +1,106 @@ +{ + "TASK_DECODE": { + "input": { + "description": "Input", + "instillEditOnNodeFields": [ + "data" + ], + "instillUIOrder": 0, + "properties": { + "data": { + "description": "Base64 string to be decoded", + "instillAcceptFormats": [ + "string" + ], + "instillUIMultiline": true, + "instillUIOrder": 0, + "instillUpstreamTypes": [ + "value", + "reference" + ], + "title": "Data", + "type": "string" + } + }, + "required": [ + "data" + ], + "title": "Input", + "type": "object" + }, + "output": { + "description": "Output", + "instillEditOnNodeFields": [ + "data" + ], + "instillUIOrder": 0, + "properties": { + "data": { + "description": "Data", + "instillFormat": "string", + "instillUIMultiline": true, + "instillUIOrder": 0, + "title": "Data", + "type": "string" + } + }, + "required": [ + "data" + ], + "title": "Output", + "type": "object" + } + }, + "TASK_ENCODE": { + "input": { + "description": "Input", + "instillEditOnNodeFields": [ + "data" + ], + "instillUIOrder": 0, + "properties": { + "data": { + "description": "Data to be encoded", + "instillAcceptFormats": [ + "string" + ], + "instillUIMultiline": true, + "instillUIOrder": 0, + "instillUpstreamTypes": [ + "value", + "reference" + ], + "title": "Data", + "type": "string" + } + }, + "required": [ + "data" + ], + "title": "Input", + "type": "object" + }, + "output": { + "description": "Output", + "instillEditOnNodeFields": [ + "data" + ], + "instillUIOrder": 0, + "properties": { + "data": { + "description": "Data", + "instillFormat": "string", + "instillUIMultiline": true, + "instillUIOrder": 0, + "title": "Data", + "type": "string" + } + }, + "required": [ + "data" + ], + "title": "Output", + "type": "object" + } + } +} diff --git a/instill/resources/schema/jsons/bigquery_definitions.json b/instill/resources/schema/jsons/bigquery_definitions.json new file mode 100644 index 0000000..c11c045 --- /dev/null +++ b/instill/resources/schema/jsons/bigquery_definitions.json @@ -0,0 +1 @@ +{ "$schema": "http://json-schema.org/draft-07/schema#", "additionalProperties": false, "properties": { "dataset_id": { "description": "Fill in your BigQuery Dataset ID.", "instillUIOrder": 2, "title": "BigQuery Dataset ID", "type": "string" }, "json_key": { "description": "Contents of the JSON key file with access to the bucket.", "instillCredentialField": true, "instillUIOrder": 0, "title": "JSON Key File contents", "type": "string" }, "project_id": { "description": "Fill in your BigQuery Project ID.", "instillUIOrder": 1, "title": "BigQuery Project ID", "type": "string" }, "table_name": { "description": "Fill in your BigQuery Table Name.", "instillUIOrder": 3, "title": "BigQuery Table Name", "type": "string" } }, "required": [ "json_key", "project_id", "dataset_id", "table_name" ], "title": "BigQuery Connector Spec", "type": "object" } diff --git a/instill/resources/schema/jsons/bigquery_task_insert_input.json b/instill/resources/schema/jsons/bigquery_task_insert_input.json new file mode 100644 index 0000000..6e5339e --- /dev/null +++ b/instill/resources/schema/jsons/bigquery_task_insert_input.json @@ -0,0 +1 @@ +{"instillUIOrder":0,"properties":{"data":{"additionalProperties":false,"instillShortDescription":"The data to be inserted to BigQuery","instillUIOrder":0,"patternProperties":{"^[a-z_][-a-z_0-9]{0,31}$":{"instillAcceptFormats":["*"],"instillUIOrder":0,"instillUpstreamTypes":["reference","template"],"title":"Data"}},"required":[],"title":"Data","type":"object"}},"required":["data"],"title":"Input","type":"object"} diff --git a/instill/resources/schema/jsons/bigquery_task_insert_output.json b/instill/resources/schema/jsons/bigquery_task_insert_output.json new file mode 100644 index 0000000..9f986f0 --- /dev/null +++ b/instill/resources/schema/jsons/bigquery_task_insert_output.json @@ -0,0 +1 @@ +{"instillUIOrder":0,"properties":{"status":{"description":"Status of the upload operation","instillFormat":"string","instillUIOrder":0,"title":"Status","type":"string"}},"required":["status"],"title":"Output","type":"object"} diff --git a/instill/resources/schema/jsons/bigquery_tasks.json b/instill/resources/schema/jsons/bigquery_tasks.json new file mode 100644 index 0000000..234543c --- /dev/null +++ b/instill/resources/schema/jsons/bigquery_tasks.json @@ -0,0 +1,52 @@ +{ + "TASK_INSERT": { + "input": { + "instillUIOrder": 0, + "properties": { + "data": { + "additionalProperties": false, + "instillShortDescription": "The data to be inserted to BigQuery", + "instillUIOrder": 0, + "patternProperties": { + "^[a-z_][-a-z_0-9]{0,31}$": { + "instillAcceptFormats": [ + "*" + ], + "instillUIOrder": 0, + "instillUpstreamTypes": [ + "reference", + "template" + ], + "title": "Data" + } + }, + "required": [], + "title": "Data", + "type": "object" + } + }, + "required": [ + "data" + ], + "title": "Input", + "type": "object" + }, + "output": { + "instillUIOrder": 0, + "properties": { + "status": { + "description": "Status of the upload operation", + "instillFormat": "string", + "instillUIOrder": 0, + "title": "Status", + "type": "string" + } + }, + "required": [ + "status" + ], + "title": "Output", + "type": "object" + } + } +} diff --git a/instill/resources/schema/jsons/end_definitions.json b/instill/resources/schema/jsons/end_definitions.json new file mode 100644 index 0000000..aa681f5 --- /dev/null +++ b/instill/resources/schema/jsons/end_definitions.json @@ -0,0 +1,17 @@ +[ + { + "available_tasks": [ + "TASK_END" + ], + "custom": false, + "documentation_url": "https://www.instill.tech/docs/latest/vdp/operators/op-end", + "icon": "end.svg", + "icon_url": "", + "id": "end", + "public": true, + "spec": {}, + "title": "End", + "tombstone": false, + "uid": "4f39c8bc-8617-495d-80de-80d0f5397516" + } +] diff --git a/instill/resources/schema/jsons/end_task_end_input.json b/instill/resources/schema/jsons/end_task_end_input.json new file mode 100644 index 0000000..97eaf6e --- /dev/null +++ b/instill/resources/schema/jsons/end_task_end_input.json @@ -0,0 +1 @@ +{"additionalProperties":false,"description":"Input","instillEditOnNodeFields":[],"instillUIOrder":0,"patternProperties":{"^[a-z_][-a-z_0-9]{0,31}$":{"description":"Arbitrary data","instillAcceptFormats":["*"],"instillUIOrder":0,"instillUpstreamTypes":["value","reference","template"],"title":"Key"}},"required":[],"title":"Input","type":"object"} diff --git a/instill/resources/schema/jsons/end_task_end_metadata.json b/instill/resources/schema/jsons/end_task_end_metadata.json new file mode 100644 index 0000000..50cba6a --- /dev/null +++ b/instill/resources/schema/jsons/end_task_end_metadata.json @@ -0,0 +1 @@ +{"additionalProperties":false,"patternProperties":{"^[a-z_][-a-z_0-9]{0,31}$":{"properties":{"description":{"type":"string"},"title":{"type":"string"}},"type":"object"}},"type":"object"} diff --git a/instill/resources/schema/jsons/end_task_end_output.json b/instill/resources/schema/jsons/end_task_end_output.json new file mode 100644 index 0000000..8f98762 --- /dev/null +++ b/instill/resources/schema/jsons/end_task_end_output.json @@ -0,0 +1 @@ +{"description":"Output","instillEditOnNodeFields":[],"instillUIOrder":0,"required":[],"title":"Output","type":"object"} diff --git a/instill/resources/schema/jsons/end_tasks.json b/instill/resources/schema/jsons/end_tasks.json new file mode 100644 index 0000000..0dd2936 --- /dev/null +++ b/instill/resources/schema/jsons/end_tasks.json @@ -0,0 +1,53 @@ +{ + "TASK_END": { + "input": { + "additionalProperties": false, + "description": "Input", + "instillEditOnNodeFields": [], + "instillUIOrder": 0, + "patternProperties": { + "^[a-z_][-a-z_0-9]{0,31}$": { + "description": "Arbitrary data", + "instillAcceptFormats": [ + "*" + ], + "instillUIOrder": 0, + "instillUpstreamTypes": [ + "value", + "reference", + "template" + ], + "title": "Key" + } + }, + "required": [], + "title": "Input", + "type": "object" + }, + "metadata": { + "additionalProperties": false, + "patternProperties": { + "^[a-z_][-a-z_0-9]{0,31}$": { + "properties": { + "description": { + "type": "string" + }, + "title": { + "type": "string" + } + }, + "type": "object" + } + }, + "type": "object" + }, + "output": { + "description": "Output", + "instillEditOnNodeFields": [], + "instillUIOrder": 0, + "required": [], + "title": "Output", + "type": "object" + } + } +} diff --git a/instill/resources/schema/jsons/googlecloudstorage_definitions.json b/instill/resources/schema/jsons/googlecloudstorage_definitions.json new file mode 100644 index 0000000..61f4166 --- /dev/null +++ b/instill/resources/schema/jsons/googlecloudstorage_definitions.json @@ -0,0 +1 @@ +{ "$schema": "http://json-schema.org/draft-07/schema#", "additionalProperties": false, "properties": { "bucket_name": { "description": "Name of the bucket to be used for object storage.", "instillCredentialField": false, "instillUIOrder": 0, "title": "Bucket Name", "type": "string" }, "json_key": { "description": "Contents of the JSON key file with access to the bucket.", "instillCredentialField": true, "instillUIOrder": 1, "title": "JSON Key File contents", "type": "string" } }, "required": [ "json_key", "bucket_name" ], "title": "Google Cloud Storage Connector Spec", "type": "object" } diff --git a/instill/resources/schema/jsons/googlecloudstorage_task_upload_input.json b/instill/resources/schema/jsons/googlecloudstorage_task_upload_input.json new file mode 100644 index 0000000..5b16503 --- /dev/null +++ b/instill/resources/schema/jsons/googlecloudstorage_task_upload_input.json @@ -0,0 +1 @@ +{"instillUIOrder":0,"properties":{"data":{"description":"The data to be saved in the object","instillAcceptFormats":["*"],"instillUIOrder":1,"instillUpstreamTypes":["value","reference"],"title":"Data","type":"string"},"object_name":{"description":"The name of the object to be created","instillAcceptFormats":["string"],"instillUIOrder":0,"instillUpstreamTypes":["value","reference","template"],"title":"Object Name","type":"string"}},"required":["object_name","data"],"title":"Input","type":"object"} diff --git a/instill/resources/schema/jsons/googlecloudstorage_task_upload_output.json b/instill/resources/schema/jsons/googlecloudstorage_task_upload_output.json new file mode 100644 index 0000000..554b635 --- /dev/null +++ b/instill/resources/schema/jsons/googlecloudstorage_task_upload_output.json @@ -0,0 +1 @@ +{"instillUIOrder":0,"properties":{"authenticated_url":{"description":"Only users granted permission can access the object with this link","format":"uri","instillFormat":"string","instillUIOrder":0,"title":"Authenticated URL","type":"string"},"gsutil_uri":{"description":"File path to this resource in Cloud Storage","format":"uri","instillFormat":"string","instillUIOrder":1,"title":"Gsutil URI","type":"string"},"public_access":{"description":"Whether the object is publicly accessible","instillFormat":"boolean","instillUIOrder":2,"title":"Public Access","type":"boolean"},"public_url":{"description":"Anyone with this link can access the object on the public Internet","instillFormat":"string","instillUIOrder":3,"title":"Public URL","type":"string"},"status":{"description":"Status of the upload operation","instillFormat":"string","instillUIOrder":4,"title":"Upload Status","type":"string"}},"required":["status"],"title":"Output","type":"object"} diff --git a/instill/resources/schema/jsons/googlecloudstorage_tasks.json b/instill/resources/schema/jsons/googlecloudstorage_tasks.json new file mode 100644 index 0000000..d9d5b8e --- /dev/null +++ b/instill/resources/schema/jsons/googlecloudstorage_tasks.json @@ -0,0 +1,89 @@ +{ + "TASK_UPLOAD": { + "input": { + "instillUIOrder": 0, + "properties": { + "data": { + "description": "The data to be saved in the object", + "instillAcceptFormats": [ + "*" + ], + "instillUIOrder": 1, + "instillUpstreamTypes": [ + "value", + "reference" + ], + "title": "Data", + "type": "string" + }, + "object_name": { + "description": "The name of the object to be created", + "instillAcceptFormats": [ + "string" + ], + "instillUIOrder": 0, + "instillUpstreamTypes": [ + "value", + "reference", + "template" + ], + "title": "Object Name", + "type": "string" + } + }, + "required": [ + "object_name", + "data" + ], + "title": "Input", + "type": "object" + }, + "output": { + "instillUIOrder": 0, + "properties": { + "authenticated_url": { + "description": "Only users granted permission can access the object with this link", + "format": "uri", + "instillFormat": "string", + "instillUIOrder": 0, + "title": "Authenticated URL", + "type": "string" + }, + "gsutil_uri": { + "description": "File path to this resource in Cloud Storage", + "format": "uri", + "instillFormat": "string", + "instillUIOrder": 1, + "title": "Gsutil URI", + "type": "string" + }, + "public_access": { + "description": "Whether the object is publicly accessible", + "instillFormat": "boolean", + "instillUIOrder": 2, + "title": "Public Access", + "type": "boolean" + }, + "public_url": { + "description": "Anyone with this link can access the object on the public Internet", + "instillFormat": "string", + "instillUIOrder": 3, + "title": "Public URL", + "type": "string" + }, + "status": { + "description": "Status of the upload operation", + "instillFormat": "string", + "instillUIOrder": 4, + "title": "Upload Status", + "type": "string" + } + }, + "required": [ + "status" + ], + "title": "Output", + "type": "object" + } + } +} diff --git a/instill/resources/schema/jsons/googlesearch_definitions.json b/instill/resources/schema/jsons/googlesearch_definitions.json new file mode 100644 index 0000000..8fafac8 --- /dev/null +++ b/instill/resources/schema/jsons/googlesearch_definitions.json @@ -0,0 +1 @@ +{ "$schema": "http://json-schema.org/draft-07/schema#", "additionalProperties": false, "properties": { "api_key": { "description": "API Key for the Google Custom Search API. You can create one here: https://developers.google.com/custom-search/v1/overview#api_key", "instillCredentialField": true, "instillUIOrder": 0, "title": "API Key", "type": "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, the ID value is: 012345678910", "instillCredentialField": false, "instillUIOrder": 1, "title": "Search Engine ID", "type": "string" } }, "required": [ "api_key", "cse_id" ], "title": "Google Search Connector Spec", "type": "object" } diff --git a/instill/resources/schema/jsons/googlesearch_task_search_input.json b/instill/resources/schema/jsons/googlesearch_task_search_input.json new file mode 100644 index 0000000..c064ba5 --- /dev/null +++ b/instill/resources/schema/jsons/googlesearch_task_search_input.json @@ -0,0 +1 @@ +{"instillUIOrder":0,"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","instillAcceptFormats":["boolean"],"instillUIOrder":3,"instillUpstreamTypes":["value","reference"],"title":"Include Link HTML","type":"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","instillAcceptFormats":["boolean"],"instillUIOrder":2,"instillUpstreamTypes":["value","reference"],"title":"Include Link Text","type":"boolean"},"query":{"description":"The search query for Google","instillAcceptFormats":["string"],"instillUIMultiline":true,"instillUIOrder":0,"instillUpstreamTypes":["value","reference","template"],"title":"Query","type":"string"},"top_k":{"default":10,"description":"The number of results to return for each query","instillAcceptFormats":["integer"],"instillUIOrder":1,"instillUpstreamTypes":["value","reference"],"maximum":100,"minimum":1,"title":"Top K","type":"integer"}},"required":["query"],"title":"Input","type":"object","$defs":{"result":{"properties":{"link":{"description":"The full URL to which the search result is pointing, e.g., http://www.example.com/foo/bar.","instillFormat":"string","instillUIOrder":1,"title":"Link","type":"string"},"link_html":{"description":"The scraped raw html of the link associated with this search result","instillFormat":"string","instillUIMultiline":true,"instillUIOrder":4,"title":"Link HTML","type":"string"},"link_text":{"description":"The scraped text of the link associated with this search result, in plain text","instillFormat":"string","instillUIMultiline":true,"instillUIOrder":3,"title":"Link Text","type":"string"},"snippet":{"description":"The snippet from the page associated with this search result, in plain text","instillFormat":"string","instillUIMultiline":true,"instillUIOrder":2,"title":"Snippet","type":"string"},"title":{"description":"The title of a search result, in plain text","instillFormat":"string","instillUIMultiline":true,"instillUIOrder":0,"title":"Title","type":"string"}},"required":["title","link","snippet"],"title":"Result","type":"object"}}} diff --git a/instill/resources/schema/jsons/googlesearch_task_search_output.json b/instill/resources/schema/jsons/googlesearch_task_search_output.json new file mode 100644 index 0000000..4bcc6ce --- /dev/null +++ b/instill/resources/schema/jsons/googlesearch_task_search_output.json @@ -0,0 +1 @@ +{"instillUIOrder":0,"properties":{"results":{"description":"The returned search results from Google","instillUIOrder":0,"items":{"$ref":"#/$defs/result"},"title":"Results","type":"array"}},"required":["results"],"title":"Output","type":"object","$defs":{"result":{"properties":{"link":{"description":"The full URL to which the search result is pointing, e.g., http://www.example.com/foo/bar.","instillFormat":"string","instillUIOrder":1,"title":"Link","type":"string"},"link_html":{"description":"The scraped raw html of the link associated with this search result","instillFormat":"string","instillUIMultiline":true,"instillUIOrder":4,"title":"Link HTML","type":"string"},"link_text":{"description":"The scraped text of the link associated with this search result, in plain text","instillFormat":"string","instillUIMultiline":true,"instillUIOrder":3,"title":"Link Text","type":"string"},"snippet":{"description":"The snippet from the page associated with this search result, in plain text","instillFormat":"string","instillUIMultiline":true,"instillUIOrder":2,"title":"Snippet","type":"string"},"title":{"description":"The title of a search result, in plain text","instillFormat":"string","instillUIMultiline":true,"instillUIOrder":0,"title":"Title","type":"string"}},"required":["title","link","snippet"],"title":"Result","type":"object"}}} diff --git a/instill/resources/schema/jsons/googlesearch_tasks.json b/instill/resources/schema/jsons/googlesearch_tasks.json new file mode 100644 index 0000000..4bb54da --- /dev/null +++ b/instill/resources/schema/jsons/googlesearch_tasks.json @@ -0,0 +1,144 @@ +{ + "$defs": { + "result": { + "properties": { + "link": { + "description": "The full URL to which the search result is pointing, e.g., http://www.example.com/foo/bar.", + "instillFormat": "string", + "instillUIOrder": 1, + "title": "Link", + "type": "string" + }, + "link_html": { + "description": "The scraped raw html of the link associated with this search result", + "instillFormat": "string", + "instillUIMultiline": true, + "instillUIOrder": 4, + "title": "Link HTML", + "type": "string" + }, + "link_text": { + "description": "The scraped text of the link associated with this search result, in plain text", + "instillFormat": "string", + "instillUIMultiline": true, + "instillUIOrder": 3, + "title": "Link Text", + "type": "string" + }, + "snippet": { + "description": "The snippet from the page associated with this search result, in plain text", + "instillFormat": "string", + "instillUIMultiline": true, + "instillUIOrder": 2, + "title": "Snippet", + "type": "string" + }, + "title": { + "description": "The title of a search result, in plain text", + "instillFormat": "string", + "instillUIMultiline": true, + "instillUIOrder": 0, + "title": "Title", + "type": "string" + } + }, + "required": [ + "title", + "link", + "snippet" + ], + "title": "Result", + "type": "object" + } + }, + "TASK_SEARCH": { + "input": { + "instillUIOrder": 0, + "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", + "instillAcceptFormats": [ + "boolean" + ], + "instillUIOrder": 3, + "instillUpstreamTypes": [ + "value", + "reference" + ], + "title": "Include Link HTML", + "type": "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", + "instillAcceptFormats": [ + "boolean" + ], + "instillUIOrder": 2, + "instillUpstreamTypes": [ + "value", + "reference" + ], + "title": "Include Link Text", + "type": "boolean" + }, + "query": { + "description": "The search query for Google", + "instillAcceptFormats": [ + "string" + ], + "instillUIMultiline": true, + "instillUIOrder": 0, + "instillUpstreamTypes": [ + "value", + "reference", + "template" + ], + "title": "Query", + "type": "string" + }, + "top_k": { + "default": 10, + "description": "The number of results to return for each query", + "instillAcceptFormats": [ + "integer" + ], + "instillUIOrder": 1, + "instillUpstreamTypes": [ + "value", + "reference" + ], + "maximum": 100, + "minimum": 1, + "title": "Top K", + "type": "integer" + } + }, + "required": [ + "query" + ], + "title": "Input", + "type": "object" + }, + "output": { + "instillUIOrder": 0, + "properties": { + "results": { + "description": "The returned search results from Google", + "instillUIOrder": 0, + "items": { + "$ref": "#/$defs/result" + }, + "title": "Results", + "type": "array" + } + }, + "required": [ + "results" + ], + "title": "Output", + "type": "object" + } + } +} diff --git a/instill/resources/schema/jsons/huggingface_definitions.json b/instill/resources/schema/jsons/huggingface_definitions.json new file mode 100644 index 0000000..7e02c49 --- /dev/null +++ b/instill/resources/schema/jsons/huggingface_definitions.json @@ -0,0 +1 @@ +{ "$schema": "http://json-schema.org/draft-07/schema#", "additionalProperties": true, "properties": { "api_key": { "description": "Fill your Hugging face API token. To find your token, visit https://huggingface.co/settings/tokens.", "instillCredentialField": true, "instillUIOrder": 0, "title": "API Key", "type": "string" }, "base_url": { "default": "https://api-inference.huggingface.co", "description": "Hostname for the endpoint. To use Inference API set to https://api-inference.huggingface.co, for Inference Endpoint set to your custom endpoint.", "instillCredentialField": false, "instillUIOrder": 1, "title": "Base URL", "type": "string" }, "is_custom_endpoint": { "default": false, "description": "Fill true if you are using a custom Inference Endpoint and not the Inference API.", "instillCredentialField": false, "instillUIOrder": 2, "title": "Is Custom Endpoint", "type": "boolean" } }, "required": [ "api_key", "base_url", "is_custom_endpoint" ], "title": "Hugging Face Connector Spec", "type": "object" } diff --git a/instill/resources/schema/jsons/huggingface_task_audio_classification_input.json b/instill/resources/schema/jsons/huggingface_task_audio_classification_input.json new file mode 100644 index 0000000..108f439 --- /dev/null +++ b/instill/resources/schema/jsons/huggingface_task_audio_classification_input.json @@ -0,0 +1 @@ +{"instillUIOrder":0,"properties":{"audio":{"description":"The audio file","instillAcceptFormats":["audio/*"],"instillUIOrder":1,"instillUpstreamTypes":["reference"],"title":"Audio","type":"string"},"model":{"$ref":"#/$defs/model","instillUIOrder":0}},"required":["audio"],"title":"Input","type":"object","$defs":{"model":{"description":"The Hugging Face model to be used","instillAcceptFormats":["string"],"instillUpstreamTypes":["value","reference","template"],"title":"Model","type":"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 the caching mechanism from being used resulting in a real new query.","instillAcceptFormats":["boolean"],"instillShortDescription":"Enable the cache of inference API","instillUIOrder":1,"instillUpstreamTypes":["value","reference"],"title":"Use Cache","type":"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.","instillAcceptFormats":["boolean"],"instillShortDescription":"Wait for model ready","instillUIOrder":0,"instillUpstreamTypes":["value","reference"],"title":"Wait For Model","type":"boolean"}},"required":[],"title":"Options","type":"object"},"string_input":{"description":"String input","instillAcceptFormats":["string"],"instillUIOrder":0,"instillUpstreamTypes":["value","reference","template"],"title":"String Input","type":"string"}}} diff --git a/instill/resources/schema/jsons/huggingface_task_audio_classification_output.json b/instill/resources/schema/jsons/huggingface_task_audio_classification_output.json new file mode 100644 index 0000000..585ab81 --- /dev/null +++ b/instill/resources/schema/jsons/huggingface_task_audio_classification_output.json @@ -0,0 +1 @@ +{"instillUIOrder":0,"properties":{"classes":{"instillUIOrder":0,"items":{"properties":{"label":{"description":"The label for the class (model specific)","instillFormat":"string","instillUIOrder":0,"title":"Label","type":"string"},"score":{"description":"A float that represents how likely it is that the audio file belongs to this class.","instillFormat":"number","instillUIOrder":1,"title":"Score","type":"number"}},"required":["label","score"],"type":"object"},"title":"Classes","type":"array"}},"required":["classes"],"title":"Output","type":"object","$defs":{"model":{"description":"The Hugging Face model to be used","instillAcceptFormats":["string"],"instillUpstreamTypes":["value","reference","template"],"title":"Model","type":"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 the caching mechanism from being used resulting in a real new query.","instillAcceptFormats":["boolean"],"instillShortDescription":"Enable the cache of inference API","instillUIOrder":1,"instillUpstreamTypes":["value","reference"],"title":"Use Cache","type":"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.","instillAcceptFormats":["boolean"],"instillShortDescription":"Wait for model ready","instillUIOrder":0,"instillUpstreamTypes":["value","reference"],"title":"Wait For Model","type":"boolean"}},"required":[],"title":"Options","type":"object"},"string_input":{"description":"String input","instillAcceptFormats":["string"],"instillUIOrder":0,"instillUpstreamTypes":["value","reference","template"],"title":"String Input","type":"string"}}} diff --git a/instill/resources/schema/jsons/huggingface_task_conversational_input.json b/instill/resources/schema/jsons/huggingface_task_conversational_input.json new file mode 100644 index 0000000..f4ad6fb --- /dev/null +++ b/instill/resources/schema/jsons/huggingface_task_conversational_input.json @@ -0,0 +1 @@ +{"instillUIOrder":0,"properties":{"inputs":{"instillUIOrder":1,"properties":{"generated_responses":{"description":"A list of strings corresponding to the earlier replies from the model.","instillAcceptFormats":["array:string"],"instillUIOrder":0,"instillUpstreamTypes":["value","reference"],"items":{"instillUIMultiline":true,"type":"string"},"title":"Generated Responses","type":"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.","instillAcceptFormats":["array:string"],"instillShortDescription":"A list of strings corresponding to the earlier replies from the user.","instillUIOrder":1,"instillUpstreamTypes":["value","reference"],"items":{"instillUIMultiline":true,"type":"string"},"title":"Past User Inputs","type":"array"},"text":{"description":"The last input from the user in the conversation.","instillAcceptFormats":["string"],"instillUIMultiline":true,"instillUIOrder":2,"instillUpstreamTypes":["value","reference","template"],"title":"Text","type":"string"}},"required":["text"],"title":"Inputs","type":"object"},"model":{"$ref":"#/$defs/model","instillUIOrder":0},"options":{"$ref":"#/$defs/options","instillUIOrder":3},"parameters":{"instillUIOrder":2,"properties":{"max_length":{"description":"Integer to define the maximum length in tokens of the output summary.","instillAcceptFormats":["integer"],"instillUIOrder":0,"instillUpstreamTypes":["value","reference"],"title":"Max Length","type":"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.","instillAcceptFormats":["number","integer"],"instillShortDescription":"The amount of time in seconds that the query should take maximum.","instillUIOrder":1,"instillUpstreamTypes":["value","reference"],"maximum":120,"minimum":0,"title":"Max Time","type":"number"},"min_length":{"description":"Integer to define the minimum length in tokens of the output summary.","instillAcceptFormats":["integer"],"instillUIOrder":2,"instillUpstreamTypes":["value","reference"],"title":"Min Length","type":"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.","instillAcceptFormats":["number","integer"],"instillUIOrder":3,"instillUpstreamTypes":["value","reference"],"maximum":100,"minimum":0,"title":"Repetition Penalty","type":"number"},"temperature":{"default":1,"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.","instillAcceptFormats":["number","integer"],"instillShortDescription":"The temperature of the sampling operation.","instillUIOrder":4,"instillUpstreamTypes":["value","reference"],"maximum":100,"minimum":0,"title":"Temperature","type":"number"},"top_k":{"description":"Integer to define the top tokens considered within the sample operation to create new text.","instillAcceptFormats":["integer"],"instillUIOrder":5,"instillUpstreamTypes":["value","reference"],"title":"Top K","type":"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.","instillAcceptFormats":["number","integer"],"instillShortDescription":"Float to define the tokens that are within the sample operation of text generation.","instillUIOrder":6,"instillUpstreamTypes":["value","reference"],"title":"Top P","type":"number"}},"required":[],"title":"Parameters","type":"object"}},"required":["inputs"],"title":"Input","type":"object","$defs":{"model":{"description":"The Hugging Face model to be used","instillAcceptFormats":["string"],"instillUpstreamTypes":["value","reference","template"],"title":"Model","type":"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 the caching mechanism from being used resulting in a real new query.","instillAcceptFormats":["boolean"],"instillShortDescription":"Enable the cache of inference API","instillUIOrder":1,"instillUpstreamTypes":["value","reference"],"title":"Use Cache","type":"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.","instillAcceptFormats":["boolean"],"instillShortDescription":"Wait for model ready","instillUIOrder":0,"instillUpstreamTypes":["value","reference"],"title":"Wait For Model","type":"boolean"}},"required":[],"title":"Options","type":"object"},"string_input":{"description":"String input","instillAcceptFormats":["string"],"instillUIOrder":0,"instillUpstreamTypes":["value","reference","template"],"title":"String Input","type":"string"}}} diff --git a/instill/resources/schema/jsons/huggingface_task_conversational_output.json b/instill/resources/schema/jsons/huggingface_task_conversational_output.json new file mode 100644 index 0000000..9fa4bf7 --- /dev/null +++ b/instill/resources/schema/jsons/huggingface_task_conversational_output.json @@ -0,0 +1 @@ +{"instillUIOrder":0,"properties":{"conversation":{"description":"A facility dictionnary to send back for the next input (with the new user input addition).","instillUIOrder":0,"properties":{"generated_responses":{"description":"List of strings. The last outputs from the model in the conversation, after the model has run.","instillUIOrder":0,"items":{"instillFormat":"string","instillUIMultiline":true,"type":"string"},"title":"Generated Responses","type":"array"},"past_user_inputs":{"description":"List of strings. The last inputs from the user in the conversation, after the model has run.","instillUIOrder":1,"items":{"instillFormat":"string","instillUIMultiline":true,"type":"string"},"title":"Past User Inputs","type":"array"}},"required":["generated_responses","past_user_inputs"],"title":"Conversation","type":"object"},"generated_text":{"description":"The answer of the bot","instillFormat":"string","instillUIMultiline":true,"instillUIOrder":1,"title":"Generated Text","type":"string"}},"required":["generated_text"],"title":"Output","type":"object","$defs":{"model":{"description":"The Hugging Face model to be used","instillAcceptFormats":["string"],"instillUpstreamTypes":["value","reference","template"],"title":"Model","type":"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 the caching mechanism from being used resulting in a real new query.","instillAcceptFormats":["boolean"],"instillShortDescription":"Enable the cache of inference API","instillUIOrder":1,"instillUpstreamTypes":["value","reference"],"title":"Use Cache","type":"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.","instillAcceptFormats":["boolean"],"instillShortDescription":"Wait for model ready","instillUIOrder":0,"instillUpstreamTypes":["value","reference"],"title":"Wait For Model","type":"boolean"}},"required":[],"title":"Options","type":"object"},"string_input":{"description":"String input","instillAcceptFormats":["string"],"instillUIOrder":0,"instillUpstreamTypes":["value","reference","template"],"title":"String Input","type":"string"}}} diff --git a/instill/resources/schema/jsons/huggingface_task_fill_mask_input.json b/instill/resources/schema/jsons/huggingface_task_fill_mask_input.json new file mode 100644 index 0000000..15c27f9 --- /dev/null +++ b/instill/resources/schema/jsons/huggingface_task_fill_mask_input.json @@ -0,0 +1 @@ +{"instillUIOrder":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)","instillUIOrder":1},"model":{"$ref":"#/$defs/model","instillUIOrder":0},"options":{"$ref":"#/$defs/options","instillUIOrder":2}},"required":["inputs"],"title":"Input","type":"object","$defs":{"model":{"description":"The Hugging Face model to be used","instillAcceptFormats":["string"],"instillUpstreamTypes":["value","reference","template"],"title":"Model","type":"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 the caching mechanism from being used resulting in a real new query.","instillAcceptFormats":["boolean"],"instillShortDescription":"Enable the cache of inference API","instillUIOrder":1,"instillUpstreamTypes":["value","reference"],"title":"Use Cache","type":"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.","instillAcceptFormats":["boolean"],"instillShortDescription":"Wait for model ready","instillUIOrder":0,"instillUpstreamTypes":["value","reference"],"title":"Wait For Model","type":"boolean"}},"required":[],"title":"Options","type":"object"},"string_input":{"description":"String input","instillAcceptFormats":["string"],"instillUIOrder":0,"instillUpstreamTypes":["value","reference","template"],"title":"String Input","type":"string"}}} diff --git a/instill/resources/schema/jsons/huggingface_task_fill_mask_output.json b/instill/resources/schema/jsons/huggingface_task_fill_mask_output.json new file mode 100644 index 0000000..dfcb953 --- /dev/null +++ b/instill/resources/schema/jsons/huggingface_task_fill_mask_output.json @@ -0,0 +1 @@ +{"instillUIOrder":0,"properties":{"results":{"instillUIOrder":0,"items":{"properties":{"score":{"description":"The probability for this token.","instillFormat":"number","instillUIOrder":0,"title":"Score","type":"number"},"sequence":{"description":"The actual sequence of tokens that ran against the model (may contain special tokens)","instillFormat":"string","instillUIMultiline":true,"instillUIOrder":1,"title":"Sequence","type":"string"},"token":{"description":"The id of the token","instillFormat":"integer","instillUIOrder":2,"title":"Token","type":"integer"},"token_str":{"description":"The string representation of the token","instillFormat":"string","instillUIOrder":3,"title":"Token Str","type":"string"}},"required":[],"type":"object"},"title":"Results","type":"array"}},"required":["results"],"title":"Output","type":"object","$defs":{"model":{"description":"The Hugging Face model to be used","instillAcceptFormats":["string"],"instillUpstreamTypes":["value","reference","template"],"title":"Model","type":"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 the caching mechanism from being used resulting in a real new query.","instillAcceptFormats":["boolean"],"instillShortDescription":"Enable the cache of inference API","instillUIOrder":1,"instillUpstreamTypes":["value","reference"],"title":"Use Cache","type":"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.","instillAcceptFormats":["boolean"],"instillShortDescription":"Wait for model ready","instillUIOrder":0,"instillUpstreamTypes":["value","reference"],"title":"Wait For Model","type":"boolean"}},"required":[],"title":"Options","type":"object"},"string_input":{"description":"String input","instillAcceptFormats":["string"],"instillUIOrder":0,"instillUpstreamTypes":["value","reference","template"],"title":"String Input","type":"string"}}} diff --git a/instill/resources/schema/jsons/huggingface_task_image_classification_input.json b/instill/resources/schema/jsons/huggingface_task_image_classification_input.json new file mode 100644 index 0000000..849aef8 --- /dev/null +++ b/instill/resources/schema/jsons/huggingface_task_image_classification_input.json @@ -0,0 +1 @@ +{"instillUIOrder":0,"properties":{"image":{"description":"The image file","instillAcceptFormats":["image/*"],"instillUIOrder":1,"instillUpstreamTypes":["reference"],"title":"Image","type":"string"},"model":{"$ref":"#/$defs/model","instillUIOrder":0}},"required":["image"],"title":"Input","type":"object","$defs":{"model":{"description":"The Hugging Face model to be used","instillAcceptFormats":["string"],"instillUpstreamTypes":["value","reference","template"],"title":"Model","type":"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 the caching mechanism from being used resulting in a real new query.","instillAcceptFormats":["boolean"],"instillShortDescription":"Enable the cache of inference API","instillUIOrder":1,"instillUpstreamTypes":["value","reference"],"title":"Use Cache","type":"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.","instillAcceptFormats":["boolean"],"instillShortDescription":"Wait for model ready","instillUIOrder":0,"instillUpstreamTypes":["value","reference"],"title":"Wait For Model","type":"boolean"}},"required":[],"title":"Options","type":"object"},"string_input":{"description":"String input","instillAcceptFormats":["string"],"instillUIOrder":0,"instillUpstreamTypes":["value","reference","template"],"title":"String Input","type":"string"}}} diff --git a/instill/resources/schema/jsons/huggingface_task_image_classification_output.json b/instill/resources/schema/jsons/huggingface_task_image_classification_output.json new file mode 100644 index 0000000..2acb973 --- /dev/null +++ b/instill/resources/schema/jsons/huggingface_task_image_classification_output.json @@ -0,0 +1 @@ +{"instillUIOrder":0,"properties":{"classes":{"instillUIOrder":0,"items":{"properties":{"label":{"description":"The label for the class (model specific)","instillFormat":"string","instillUIOrder":0,"title":"Label","type":"string"},"score":{"description":"A float that represents how likely it is that the image file belongs to this class.","instillFormat":"number","instillUIOrder":0,"title":"Score","type":"number"}},"required":["label","score"],"type":"object"},"title":"Classes","type":"array"}},"required":["classes"],"title":"Output","type":"object","$defs":{"model":{"description":"The Hugging Face model to be used","instillAcceptFormats":["string"],"instillUpstreamTypes":["value","reference","template"],"title":"Model","type":"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 the caching mechanism from being used resulting in a real new query.","instillAcceptFormats":["boolean"],"instillShortDescription":"Enable the cache of inference API","instillUIOrder":1,"instillUpstreamTypes":["value","reference"],"title":"Use Cache","type":"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.","instillAcceptFormats":["boolean"],"instillShortDescription":"Wait for model ready","instillUIOrder":0,"instillUpstreamTypes":["value","reference"],"title":"Wait For Model","type":"boolean"}},"required":[],"title":"Options","type":"object"},"string_input":{"description":"String input","instillAcceptFormats":["string"],"instillUIOrder":0,"instillUpstreamTypes":["value","reference","template"],"title":"String Input","type":"string"}}} diff --git a/instill/resources/schema/jsons/huggingface_task_image_segmentation_input.json b/instill/resources/schema/jsons/huggingface_task_image_segmentation_input.json new file mode 100644 index 0000000..849aef8 --- /dev/null +++ b/instill/resources/schema/jsons/huggingface_task_image_segmentation_input.json @@ -0,0 +1 @@ +{"instillUIOrder":0,"properties":{"image":{"description":"The image file","instillAcceptFormats":["image/*"],"instillUIOrder":1,"instillUpstreamTypes":["reference"],"title":"Image","type":"string"},"model":{"$ref":"#/$defs/model","instillUIOrder":0}},"required":["image"],"title":"Input","type":"object","$defs":{"model":{"description":"The Hugging Face model to be used","instillAcceptFormats":["string"],"instillUpstreamTypes":["value","reference","template"],"title":"Model","type":"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 the caching mechanism from being used resulting in a real new query.","instillAcceptFormats":["boolean"],"instillShortDescription":"Enable the cache of inference API","instillUIOrder":1,"instillUpstreamTypes":["value","reference"],"title":"Use Cache","type":"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.","instillAcceptFormats":["boolean"],"instillShortDescription":"Wait for model ready","instillUIOrder":0,"instillUpstreamTypes":["value","reference"],"title":"Wait For Model","type":"boolean"}},"required":[],"title":"Options","type":"object"},"string_input":{"description":"String input","instillAcceptFormats":["string"],"instillUIOrder":0,"instillUpstreamTypes":["value","reference","template"],"title":"String Input","type":"string"}}} diff --git a/instill/resources/schema/jsons/huggingface_task_image_segmentation_output.json b/instill/resources/schema/jsons/huggingface_task_image_segmentation_output.json new file mode 100644 index 0000000..eaa50e2 --- /dev/null +++ b/instill/resources/schema/jsons/huggingface_task_image_segmentation_output.json @@ -0,0 +1 @@ +{"instillUIOrder":0,"properties":{"segments":{"instillUIOrder":0,"items":{"properties":{"label":{"description":"The label for the class (model specific) of a segment.","instillFormat":"string","instillUIOrder":0,"title":"Label","type":"string"},"mask":{"description":"A str (base64 str of a single channel black-and-white img) representing the mask of a segment.","instillFormat":"image/png","instillUIOrder":1,"title":"Mask","type":"string"},"score":{"description":"A float that represents how likely it is that the segment belongs to the given class.","instillFormat":"number","instillUIOrder":2,"title":"Score","type":"number"}},"required":["label","mask","score"],"type":"object"},"title":"Segments","type":"array"}},"required":["segments"],"title":"Output","type":"object","$defs":{"model":{"description":"The Hugging Face model to be used","instillAcceptFormats":["string"],"instillUpstreamTypes":["value","reference","template"],"title":"Model","type":"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 the caching mechanism from being used resulting in a real new query.","instillAcceptFormats":["boolean"],"instillShortDescription":"Enable the cache of inference API","instillUIOrder":1,"instillUpstreamTypes":["value","reference"],"title":"Use Cache","type":"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.","instillAcceptFormats":["boolean"],"instillShortDescription":"Wait for model ready","instillUIOrder":0,"instillUpstreamTypes":["value","reference"],"title":"Wait For Model","type":"boolean"}},"required":[],"title":"Options","type":"object"},"string_input":{"description":"String input","instillAcceptFormats":["string"],"instillUIOrder":0,"instillUpstreamTypes":["value","reference","template"],"title":"String Input","type":"string"}}} diff --git a/instill/resources/schema/jsons/huggingface_task_image_to_text_input.json b/instill/resources/schema/jsons/huggingface_task_image_to_text_input.json new file mode 100644 index 0000000..b51984d --- /dev/null +++ b/instill/resources/schema/jsons/huggingface_task_image_to_text_input.json @@ -0,0 +1 @@ +{"instillUIOrder":0,"properties":{"image":{"description":"The image file","instillAcceptFormats":["image/*"],"instillUIOrder":0,"instillUpstreamTypes":["reference"],"title":"Image","type":"string"},"model":{"$ref":"#/$defs/model","instillUIOrder":0}},"required":["image"],"title":"Input","type":"object","$defs":{"model":{"description":"The Hugging Face model to be used","instillAcceptFormats":["string"],"instillUpstreamTypes":["value","reference","template"],"title":"Model","type":"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 the caching mechanism from being used resulting in a real new query.","instillAcceptFormats":["boolean"],"instillShortDescription":"Enable the cache of inference API","instillUIOrder":1,"instillUpstreamTypes":["value","reference"],"title":"Use Cache","type":"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.","instillAcceptFormats":["boolean"],"instillShortDescription":"Wait for model ready","instillUIOrder":0,"instillUpstreamTypes":["value","reference"],"title":"Wait For Model","type":"boolean"}},"required":[],"title":"Options","type":"object"},"string_input":{"description":"String input","instillAcceptFormats":["string"],"instillUIOrder":0,"instillUpstreamTypes":["value","reference","template"],"title":"String Input","type":"string"}}} diff --git a/instill/resources/schema/jsons/huggingface_task_image_to_text_output.json b/instill/resources/schema/jsons/huggingface_task_image_to_text_output.json new file mode 100644 index 0000000..b707c62 --- /dev/null +++ b/instill/resources/schema/jsons/huggingface_task_image_to_text_output.json @@ -0,0 +1 @@ +{"instillUIOrder":0,"properties":{"text":{"instillFormat":"string","instillUIMultiline":true,"instillUIOrder":0,"title":"Text","type":"string"}},"required":["text"],"title":"Output","type":"object","$defs":{"model":{"description":"The Hugging Face model to be used","instillAcceptFormats":["string"],"instillUpstreamTypes":["value","reference","template"],"title":"Model","type":"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 the caching mechanism from being used resulting in a real new query.","instillAcceptFormats":["boolean"],"instillShortDescription":"Enable the cache of inference API","instillUIOrder":1,"instillUpstreamTypes":["value","reference"],"title":"Use Cache","type":"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.","instillAcceptFormats":["boolean"],"instillShortDescription":"Wait for model ready","instillUIOrder":0,"instillUpstreamTypes":["value","reference"],"title":"Wait For Model","type":"boolean"}},"required":[],"title":"Options","type":"object"},"string_input":{"description":"String input","instillAcceptFormats":["string"],"instillUIOrder":0,"instillUpstreamTypes":["value","reference","template"],"title":"String Input","type":"string"}}} diff --git a/instill/resources/schema/jsons/huggingface_task_object_detection_input.json b/instill/resources/schema/jsons/huggingface_task_object_detection_input.json new file mode 100644 index 0000000..849aef8 --- /dev/null +++ b/instill/resources/schema/jsons/huggingface_task_object_detection_input.json @@ -0,0 +1 @@ +{"instillUIOrder":0,"properties":{"image":{"description":"The image file","instillAcceptFormats":["image/*"],"instillUIOrder":1,"instillUpstreamTypes":["reference"],"title":"Image","type":"string"},"model":{"$ref":"#/$defs/model","instillUIOrder":0}},"required":["image"],"title":"Input","type":"object","$defs":{"model":{"description":"The Hugging Face model to be used","instillAcceptFormats":["string"],"instillUpstreamTypes":["value","reference","template"],"title":"Model","type":"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 the caching mechanism from being used resulting in a real new query.","instillAcceptFormats":["boolean"],"instillShortDescription":"Enable the cache of inference API","instillUIOrder":1,"instillUpstreamTypes":["value","reference"],"title":"Use Cache","type":"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.","instillAcceptFormats":["boolean"],"instillShortDescription":"Wait for model ready","instillUIOrder":0,"instillUpstreamTypes":["value","reference"],"title":"Wait For Model","type":"boolean"}},"required":[],"title":"Options","type":"object"},"string_input":{"description":"String input","instillAcceptFormats":["string"],"instillUIOrder":0,"instillUpstreamTypes":["value","reference","template"],"title":"String Input","type":"string"}}} diff --git a/instill/resources/schema/jsons/huggingface_task_object_detection_output.json b/instill/resources/schema/jsons/huggingface_task_object_detection_output.json new file mode 100644 index 0000000..af33b54 --- /dev/null +++ b/instill/resources/schema/jsons/huggingface_task_object_detection_output.json @@ -0,0 +1 @@ +{"instillUIOrder":0,"properties":{"objects":{"instillUIOrder":0,"items":{"properties":{"box":{"description":"A dict (with keys [xmin,ymin,xmax,ymax]) representing the bounding box of a detected object.","instillUIOrder":0,"properties":{"xmax":{"instillFormat":"number","instillUIOrder":0,"title":"X Max","type":"number"},"xmin":{"instillFormat":"number","instillUIOrder":1,"title":"X Min","type":"number"},"ymax":{"instillFormat":"number","instillUIOrder":2,"title":"Y Max","type":"number"},"ymin":{"instillFormat":"number","instillUIOrder":3,"title":"Y min","type":"number"}},"required":["xmax","xmin","ymax","ymin"],"title":"Box","type":"object"},"label":{"description":"The label for the class (model specific) of a detected object.","instillFormat":"string","instillUIOrder":1,"title":"Label","type":"string"},"score":{"description":"A float that represents how likely it is that the detected object belongs to the given class.","instillFormat":"number","instillUIOrder":2,"title":"Score","type":"number"}},"required":["box","label","score"],"type":"object"},"title":"Objects","type":"array"}},"required":["objects"],"title":"Output","type":"object","$defs":{"model":{"description":"The Hugging Face model to be used","instillAcceptFormats":["string"],"instillUpstreamTypes":["value","reference","template"],"title":"Model","type":"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 the caching mechanism from being used resulting in a real new query.","instillAcceptFormats":["boolean"],"instillShortDescription":"Enable the cache of inference API","instillUIOrder":1,"instillUpstreamTypes":["value","reference"],"title":"Use Cache","type":"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.","instillAcceptFormats":["boolean"],"instillShortDescription":"Wait for model ready","instillUIOrder":0,"instillUpstreamTypes":["value","reference"],"title":"Wait For Model","type":"boolean"}},"required":[],"title":"Options","type":"object"},"string_input":{"description":"String input","instillAcceptFormats":["string"],"instillUIOrder":0,"instillUpstreamTypes":["value","reference","template"],"title":"String Input","type":"string"}}} diff --git a/instill/resources/schema/jsons/huggingface_task_question_answering_input.json b/instill/resources/schema/jsons/huggingface_task_question_answering_input.json new file mode 100644 index 0000000..c5af2c0 --- /dev/null +++ b/instill/resources/schema/jsons/huggingface_task_question_answering_input.json @@ -0,0 +1 @@ +{"instillUIOrder":0,"properties":{"inputs":{"instillUIOrder":1,"properties":{"context":{"description":"The context for answering the question.","instillAcceptFormats":["string"],"instillUIMultiline":true,"instillUIOrder":0,"instillUpstreamTypes":["value","reference","template"],"title":"Context","type":"string"},"question":{"description":"The question","instillAcceptFormats":["string"],"instillUIMultiline":true,"instillUIOrder":1,"instillUpstreamTypes":["value","reference","template"],"title":"Question","type":"string"}},"required":["question","context"],"title":"Inputs","type":"object"},"model":{"$ref":"#/$defs/model","instillUIOrder":0},"options":{"$ref":"#/$defs/options","instillUIOrder":2}},"required":["inputs"],"title":"Input","type":"object","$defs":{"model":{"description":"The Hugging Face model to be used","instillAcceptFormats":["string"],"instillUpstreamTypes":["value","reference","template"],"title":"Model","type":"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 the caching mechanism from being used resulting in a real new query.","instillAcceptFormats":["boolean"],"instillShortDescription":"Enable the cache of inference API","instillUIOrder":1,"instillUpstreamTypes":["value","reference"],"title":"Use Cache","type":"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.","instillAcceptFormats":["boolean"],"instillShortDescription":"Wait for model ready","instillUIOrder":0,"instillUpstreamTypes":["value","reference"],"title":"Wait For Model","type":"boolean"}},"required":[],"title":"Options","type":"object"},"string_input":{"description":"String input","instillAcceptFormats":["string"],"instillUIOrder":0,"instillUpstreamTypes":["value","reference","template"],"title":"String Input","type":"string"}}} diff --git a/instill/resources/schema/jsons/huggingface_task_question_answering_output.json b/instill/resources/schema/jsons/huggingface_task_question_answering_output.json new file mode 100644 index 0000000..d1efaf8 --- /dev/null +++ b/instill/resources/schema/jsons/huggingface_task_question_answering_output.json @@ -0,0 +1 @@ +{"instillUIOrder":0,"properties":{"answer":{"description":"A string that’s the answer within the text.","instillFormat":"string","instillUIMultiline":true,"instillUIOrder":0,"title":"Answer","type":"string"},"score":{"description":"A float that represents how likely that the answer is correct","instillFormat":"number","instillUIOrder":2,"title":"Score","type":"number"},"start":{"description":"The index (string wise) of the start of the answer within context.","instillFormat":"integer","instillUIOrder":3,"title":"Start","type":"integer"},"stop":{"description":"The index (string wise) of the stop of the answer within context.","instillFormat":"integer","instillUIOrder":1,"title":"Stop","type":"integer"}},"required":["answer"],"title":"Output","type":"object","$defs":{"model":{"description":"The Hugging Face model to be used","instillAcceptFormats":["string"],"instillUpstreamTypes":["value","reference","template"],"title":"Model","type":"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 the caching mechanism from being used resulting in a real new query.","instillAcceptFormats":["boolean"],"instillShortDescription":"Enable the cache of inference API","instillUIOrder":1,"instillUpstreamTypes":["value","reference"],"title":"Use Cache","type":"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.","instillAcceptFormats":["boolean"],"instillShortDescription":"Wait for model ready","instillUIOrder":0,"instillUpstreamTypes":["value","reference"],"title":"Wait For Model","type":"boolean"}},"required":[],"title":"Options","type":"object"},"string_input":{"description":"String input","instillAcceptFormats":["string"],"instillUIOrder":0,"instillUpstreamTypes":["value","reference","template"],"title":"String Input","type":"string"}}} diff --git a/instill/resources/schema/jsons/huggingface_task_sentence_similarity_input.json b/instill/resources/schema/jsons/huggingface_task_sentence_similarity_input.json new file mode 100644 index 0000000..22ed3c7 --- /dev/null +++ b/instill/resources/schema/jsons/huggingface_task_sentence_similarity_input.json @@ -0,0 +1 @@ +{"instillUIOrder":0,"properties":{"inputs":{"instillUIOrder":1,"properties":{"sentences":{"description":"A list of strings which will be compared against the source_sentence.","instillAcceptFormats":["array:string"],"instillUIOrder":0,"instillUpstreamTypes":["value","reference"],"items":{"instillUIMultiline":true,"type":"string"},"title":"Sentences","type":"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 model being used.","instillAcceptFormats":["string"],"instillShortDescription":"The string that you wish to compare the other strings with.","instillUIMultiline":true,"instillUIOrder":1,"instillUpstreamTypes":["value","reference"],"title":"Source Sentence","type":"string"}},"required":["source_sentence","sentences"],"title":"Inputs","type":"object"},"model":{"$ref":"#/$defs/model","instillUIOrder":0},"options":{"$ref":"#/$defs/options","instillUIOrder":2}},"required":["inputs"],"title":"Input","type":"object","$defs":{"model":{"description":"The Hugging Face model to be used","instillAcceptFormats":["string"],"instillUpstreamTypes":["value","reference","template"],"title":"Model","type":"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 the caching mechanism from being used resulting in a real new query.","instillAcceptFormats":["boolean"],"instillShortDescription":"Enable the cache of inference API","instillUIOrder":1,"instillUpstreamTypes":["value","reference"],"title":"Use Cache","type":"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.","instillAcceptFormats":["boolean"],"instillShortDescription":"Wait for model ready","instillUIOrder":0,"instillUpstreamTypes":["value","reference"],"title":"Wait For Model","type":"boolean"}},"required":[],"title":"Options","type":"object"},"string_input":{"description":"String input","instillAcceptFormats":["string"],"instillUIOrder":0,"instillUpstreamTypes":["value","reference","template"],"title":"String Input","type":"string"}}} diff --git a/instill/resources/schema/jsons/huggingface_task_sentence_similarity_output.json b/instill/resources/schema/jsons/huggingface_task_sentence_similarity_output.json new file mode 100644 index 0000000..fcfcf72 --- /dev/null +++ b/instill/resources/schema/jsons/huggingface_task_sentence_similarity_output.json @@ -0,0 +1 @@ +{"instillUIOrder":0,"properties":{"scores":{"description":"The associated similarity score for each of the given strings","instillUIOrder":0,"items":{"instillFormat":"number","type":"number"},"title":"Scores","type":"array"}},"required":["scores"],"title":"Output","type":"object","$defs":{"model":{"description":"The Hugging Face model to be used","instillAcceptFormats":["string"],"instillUpstreamTypes":["value","reference","template"],"title":"Model","type":"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 the caching mechanism from being used resulting in a real new query.","instillAcceptFormats":["boolean"],"instillShortDescription":"Enable the cache of inference API","instillUIOrder":1,"instillUpstreamTypes":["value","reference"],"title":"Use Cache","type":"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.","instillAcceptFormats":["boolean"],"instillShortDescription":"Wait for model ready","instillUIOrder":0,"instillUpstreamTypes":["value","reference"],"title":"Wait For Model","type":"boolean"}},"required":[],"title":"Options","type":"object"},"string_input":{"description":"String input","instillAcceptFormats":["string"],"instillUIOrder":0,"instillUpstreamTypes":["value","reference","template"],"title":"String Input","type":"string"}}} diff --git a/instill/resources/schema/jsons/huggingface_task_speech_recognition_input.json b/instill/resources/schema/jsons/huggingface_task_speech_recognition_input.json new file mode 100644 index 0000000..108f439 --- /dev/null +++ b/instill/resources/schema/jsons/huggingface_task_speech_recognition_input.json @@ -0,0 +1 @@ +{"instillUIOrder":0,"properties":{"audio":{"description":"The audio file","instillAcceptFormats":["audio/*"],"instillUIOrder":1,"instillUpstreamTypes":["reference"],"title":"Audio","type":"string"},"model":{"$ref":"#/$defs/model","instillUIOrder":0}},"required":["audio"],"title":"Input","type":"object","$defs":{"model":{"description":"The Hugging Face model to be used","instillAcceptFormats":["string"],"instillUpstreamTypes":["value","reference","template"],"title":"Model","type":"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 the caching mechanism from being used resulting in a real new query.","instillAcceptFormats":["boolean"],"instillShortDescription":"Enable the cache of inference API","instillUIOrder":1,"instillUpstreamTypes":["value","reference"],"title":"Use Cache","type":"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.","instillAcceptFormats":["boolean"],"instillShortDescription":"Wait for model ready","instillUIOrder":0,"instillUpstreamTypes":["value","reference"],"title":"Wait For Model","type":"boolean"}},"required":[],"title":"Options","type":"object"},"string_input":{"description":"String input","instillAcceptFormats":["string"],"instillUIOrder":0,"instillUpstreamTypes":["value","reference","template"],"title":"String Input","type":"string"}}} diff --git a/instill/resources/schema/jsons/huggingface_task_speech_recognition_output.json b/instill/resources/schema/jsons/huggingface_task_speech_recognition_output.json new file mode 100644 index 0000000..6c51d65 --- /dev/null +++ b/instill/resources/schema/jsons/huggingface_task_speech_recognition_output.json @@ -0,0 +1 @@ +{"instillUIOrder":0,"properties":{"text":{"description":"The string that was recognized within the audio file.","instillFormat":"string","instillUIMultiline":true,"instillUIOrder":0,"title":"Text","type":"string"}},"required":["text"],"title":"Output","type":"object","$defs":{"model":{"description":"The Hugging Face model to be used","instillAcceptFormats":["string"],"instillUpstreamTypes":["value","reference","template"],"title":"Model","type":"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 the caching mechanism from being used resulting in a real new query.","instillAcceptFormats":["boolean"],"instillShortDescription":"Enable the cache of inference API","instillUIOrder":1,"instillUpstreamTypes":["value","reference"],"title":"Use Cache","type":"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.","instillAcceptFormats":["boolean"],"instillShortDescription":"Wait for model ready","instillUIOrder":0,"instillUpstreamTypes":["value","reference"],"title":"Wait For Model","type":"boolean"}},"required":[],"title":"Options","type":"object"},"string_input":{"description":"String input","instillAcceptFormats":["string"],"instillUIOrder":0,"instillUpstreamTypes":["value","reference","template"],"title":"String Input","type":"string"}}} diff --git a/instill/resources/schema/jsons/huggingface_task_summarization_input.json b/instill/resources/schema/jsons/huggingface_task_summarization_input.json new file mode 100644 index 0000000..2f58786 --- /dev/null +++ b/instill/resources/schema/jsons/huggingface_task_summarization_input.json @@ -0,0 +1 @@ +{"instillUIOrder":0,"properties":{"inputs":{"$ref":"#/$defs/string_input","instillUIOrder":1},"model":{"$ref":"#/$defs/model","instillUIOrder":0},"options":{"$ref":"#/$defs/options","instillUIOrder":3},"parameters":{"instillUIOrder":2,"properties":{"max_length":{"description":"Integer to define the maximum length in tokens of the output summary.","instillAcceptFormats":["integer"],"instillUIOrder":0,"instillUpstreamTypes":["value","reference"],"title":"Max Length","type":"integer"},"max_time":{"instillAcceptFormats":["number","integer"],"instillUIOrder":1,"instillUpstreamTypes":["value","reference"],"maximum":120,"minimum":0,"title":"Max Time","type":"number"},"min_length":{"description":"Integer to define the minimum length in tokens of the output summary.","instillAcceptFormats":["integer"],"instillUIOrder":2,"instillUpstreamTypes":["value","reference"],"title":"Min Length","type":"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.","instillAcceptFormats":["number","integer"],"instillUIOrder":3,"instillUpstreamTypes":["value","reference"],"maximum":100,"minimum":0,"title":"Repetition Penalty","type":"number"},"temperature":{"default":1,"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.","instillAcceptFormats":["number","integer"],"instillShortDescription":"The temperature of the sampling operation.","instillUIOrder":4,"instillUpstreamTypes":["value","reference"],"maximum":100,"minimum":0,"title":"Temperature","type":"number"},"top_k":{"description":"Integer to define the top tokens considered within the sample operation to create new text.","instillAcceptFormats":["integer"],"instillUIOrder":5,"instillUpstreamTypes":["value","reference"],"title":"Top K","type":"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.","instillAcceptFormats":["number","integer"],"instillShortDescription":"Float to define the tokens that are within the sample operation of text generation.","instillUIOrder":6,"instillUpstreamTypes":["value","reference"],"title":"Top P","type":"number"}},"required":[],"title":"Parameters","type":"object"}},"required":["inputs"],"title":"Input","type":"object","$defs":{"model":{"description":"The Hugging Face model to be used","instillAcceptFormats":["string"],"instillUpstreamTypes":["value","reference","template"],"title":"Model","type":"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 the caching mechanism from being used resulting in a real new query.","instillAcceptFormats":["boolean"],"instillShortDescription":"Enable the cache of inference API","instillUIOrder":1,"instillUpstreamTypes":["value","reference"],"title":"Use Cache","type":"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.","instillAcceptFormats":["boolean"],"instillShortDescription":"Wait for model ready","instillUIOrder":0,"instillUpstreamTypes":["value","reference"],"title":"Wait For Model","type":"boolean"}},"required":[],"title":"Options","type":"object"},"string_input":{"description":"String input","instillAcceptFormats":["string"],"instillUIOrder":0,"instillUpstreamTypes":["value","reference","template"],"title":"String Input","type":"string"}}} diff --git a/instill/resources/schema/jsons/huggingface_task_summarization_output.json b/instill/resources/schema/jsons/huggingface_task_summarization_output.json new file mode 100644 index 0000000..5fdca8d --- /dev/null +++ b/instill/resources/schema/jsons/huggingface_task_summarization_output.json @@ -0,0 +1 @@ +{"instillUIOrder":0,"properties":{"summary_text":{"description":"The string after summarization","instillFormat":"string","instillUIMultiline":true,"instillUIOrder":0,"title":"Summary Text","type":"string"}},"required":["summary_text"],"title":"Output","type":"object","$defs":{"model":{"description":"The Hugging Face model to be used","instillAcceptFormats":["string"],"instillUpstreamTypes":["value","reference","template"],"title":"Model","type":"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 the caching mechanism from being used resulting in a real new query.","instillAcceptFormats":["boolean"],"instillShortDescription":"Enable the cache of inference API","instillUIOrder":1,"instillUpstreamTypes":["value","reference"],"title":"Use Cache","type":"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.","instillAcceptFormats":["boolean"],"instillShortDescription":"Wait for model ready","instillUIOrder":0,"instillUpstreamTypes":["value","reference"],"title":"Wait For Model","type":"boolean"}},"required":[],"title":"Options","type":"object"},"string_input":{"description":"String input","instillAcceptFormats":["string"],"instillUIOrder":0,"instillUpstreamTypes":["value","reference","template"],"title":"String Input","type":"string"}}} diff --git a/instill/resources/schema/jsons/huggingface_task_table_question_answering_input.json b/instill/resources/schema/jsons/huggingface_task_table_question_answering_input.json new file mode 100644 index 0000000..0e21db0 --- /dev/null +++ b/instill/resources/schema/jsons/huggingface_task_table_question_answering_input.json @@ -0,0 +1 @@ +{"instillUIOrder":0,"properties":{"inputs":{"instillUIOrder":1,"properties":{"query":{"description":"The query in plain text that you want to ask the table","instillAcceptFormats":["string"],"instillUIMultiline":true,"instillUIOrder":0,"instillUpstreamTypes":["value","reference"],"title":"Query","type":"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 same size.","instillAcceptFormats":["*"],"instillUIOrder":1,"instillUpstreamTypes":["reference","value"],"required":[],"title":"Table","type":"object"}},"required":["query","table"],"title":"Inputs","type":"object"},"model":{"$ref":"#/$defs/model","instillUIOrder":0},"options":{"$ref":"#/$defs/options","instillUIOrder":2}},"required":["inputs"],"title":"Input","type":"object","$defs":{"model":{"description":"The Hugging Face model to be used","instillAcceptFormats":["string"],"instillUpstreamTypes":["value","reference","template"],"title":"Model","type":"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 the caching mechanism from being used resulting in a real new query.","instillAcceptFormats":["boolean"],"instillShortDescription":"Enable the cache of inference API","instillUIOrder":1,"instillUpstreamTypes":["value","reference"],"title":"Use Cache","type":"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.","instillAcceptFormats":["boolean"],"instillShortDescription":"Wait for model ready","instillUIOrder":0,"instillUpstreamTypes":["value","reference"],"title":"Wait For Model","type":"boolean"}},"required":[],"title":"Options","type":"object"},"string_input":{"description":"String input","instillAcceptFormats":["string"],"instillUIOrder":0,"instillUpstreamTypes":["value","reference","template"],"title":"String Input","type":"string"}}} diff --git a/instill/resources/schema/jsons/huggingface_task_table_question_answering_output.json b/instill/resources/schema/jsons/huggingface_task_table_question_answering_output.json new file mode 100644 index 0000000..8a20da8 --- /dev/null +++ b/instill/resources/schema/jsons/huggingface_task_table_question_answering_output.json @@ -0,0 +1 @@ +{"instillUIOrder":0,"properties":{"aggregator":{"description":"The aggregator used to get the answer","instillFormat":"string","instillUIOrder":0,"title":"Aggregator","type":"string"},"answer":{"description":"The plaintext answer","instillFormat":"string","instillUIMultiline":true,"instillUIOrder":1,"title":"Answer","type":"string"},"cells":{"description":"a list of coordinates of the cells contents","instillUIOrder":2,"items":{"instillFormat":"string","instillUIMultiline":true,"type":"string"},"title":"Cells","type":"array"},"coordinates":{"description":"a list of coordinates of the cells referenced in the answer","instillUIOrder":3,"items":{"items":{"instillFormat":"integer","type":"integer"},"type":"array"},"title":"Coordinates","type":"array"}},"required":["answer"],"title":"Output","type":"object","$defs":{"model":{"description":"The Hugging Face model to be used","instillAcceptFormats":["string"],"instillUpstreamTypes":["value","reference","template"],"title":"Model","type":"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 the caching mechanism from being used resulting in a real new query.","instillAcceptFormats":["boolean"],"instillShortDescription":"Enable the cache of inference API","instillUIOrder":1,"instillUpstreamTypes":["value","reference"],"title":"Use Cache","type":"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.","instillAcceptFormats":["boolean"],"instillShortDescription":"Wait for model ready","instillUIOrder":0,"instillUpstreamTypes":["value","reference"],"title":"Wait For Model","type":"boolean"}},"required":[],"title":"Options","type":"object"},"string_input":{"description":"String input","instillAcceptFormats":["string"],"instillUIOrder":0,"instillUpstreamTypes":["value","reference","template"],"title":"String Input","type":"string"}}} diff --git a/instill/resources/schema/jsons/huggingface_task_text_classification_input.json b/instill/resources/schema/jsons/huggingface_task_text_classification_input.json new file mode 100644 index 0000000..76d5a0d --- /dev/null +++ b/instill/resources/schema/jsons/huggingface_task_text_classification_input.json @@ -0,0 +1 @@ +{"instillUIOrder":0,"properties":{"inputs":{"$ref":"#/$defs/string_input","instillUIOrder":1},"model":{"$ref":"#/$defs/model","instillUIOrder":0},"options":{"$ref":"#/$defs/options","instillUIOrder":2}},"required":["inputs"],"title":"Input","type":"object","$defs":{"model":{"description":"The Hugging Face model to be used","instillAcceptFormats":["string"],"instillUpstreamTypes":["value","reference","template"],"title":"Model","type":"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 the caching mechanism from being used resulting in a real new query.","instillAcceptFormats":["boolean"],"instillShortDescription":"Enable the cache of inference API","instillUIOrder":1,"instillUpstreamTypes":["value","reference"],"title":"Use Cache","type":"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.","instillAcceptFormats":["boolean"],"instillShortDescription":"Wait for model ready","instillUIOrder":0,"instillUpstreamTypes":["value","reference"],"title":"Wait For Model","type":"boolean"}},"required":[],"title":"Options","type":"object"},"string_input":{"description":"String input","instillAcceptFormats":["string"],"instillUIOrder":0,"instillUpstreamTypes":["value","reference","template"],"title":"String Input","type":"string"}}} diff --git a/instill/resources/schema/jsons/huggingface_task_text_classification_output.json b/instill/resources/schema/jsons/huggingface_task_text_classification_output.json new file mode 100644 index 0000000..0fb3001 --- /dev/null +++ b/instill/resources/schema/jsons/huggingface_task_text_classification_output.json @@ -0,0 +1 @@ +{"instillUIOrder":0,"properties":{"results":{"instillUIOrder":0,"items":{"properties":{"label":{"description":"The label for the class (model specific)","instillFormat":"string","instillUIOrder":0,"title":"Label","type":"string"},"score":{"description":"A floats that represents how likely is that the text belongs the this class.","instillFormat":"number","instillUIOrder":1,"title":"Score","type":"number"}},"required":["label","score"],"type":"object"},"title":"Results","type":"array"}},"required":["results"],"title":"Output","type":"object","$defs":{"model":{"description":"The Hugging Face model to be used","instillAcceptFormats":["string"],"instillUpstreamTypes":["value","reference","template"],"title":"Model","type":"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 the caching mechanism from being used resulting in a real new query.","instillAcceptFormats":["boolean"],"instillShortDescription":"Enable the cache of inference API","instillUIOrder":1,"instillUpstreamTypes":["value","reference"],"title":"Use Cache","type":"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.","instillAcceptFormats":["boolean"],"instillShortDescription":"Wait for model ready","instillUIOrder":0,"instillUpstreamTypes":["value","reference"],"title":"Wait For Model","type":"boolean"}},"required":[],"title":"Options","type":"object"},"string_input":{"description":"String input","instillAcceptFormats":["string"],"instillUIOrder":0,"instillUpstreamTypes":["value","reference","template"],"title":"String Input","type":"string"}}} diff --git a/instill/resources/schema/jsons/huggingface_task_text_generation_input.json b/instill/resources/schema/jsons/huggingface_task_text_generation_input.json new file mode 100644 index 0000000..0b73480 --- /dev/null +++ b/instill/resources/schema/jsons/huggingface_task_text_generation_input.json @@ -0,0 +1 @@ +{"instillUIOrder":0,"properties":{"inputs":{"$ref":"#/$defs/string_input","instillUIOrder":1},"model":{"$ref":"#/$defs/model","instillUIOrder":0},"options":{"$ref":"#/$defs/options","instillUIOrder":3},"parameters":{"instillUIOrder":2,"properties":{"do_sample":{"description":"Whether or not to use sampling, use greedy decoding otherwise.","instillAcceptFormats":["boolean"],"instillUIOrder":0,"instillUpstreamTypes":["value","reference"],"title":"Do Sample","type":"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.","instillAcceptFormats":["integer"],"instillShortDescription":"The amount of new tokens to be generated.","instillUIOrder":1,"instillUpstreamTypes":["value","reference"],"title":"Max New Tokens","type":"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.","instillAcceptFormats":["number","integer"],"instillShortDescription":"The amount of time in seconds that the query should take maximum.","instillUIOrder":2,"instillUpstreamTypes":["value","reference"],"title":"Max Time","type":"number"},"num_return_sequences":{"description":"The number of proposition you want to be returned.","instillAcceptFormats":["integer"],"instillUIOrder":3,"instillUpstreamTypes":["value","reference"],"title":"Num Return Sequences","type":"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.","instillAcceptFormats":["number","integer"],"instillUIOrder":4,"instillUpstreamTypes":["value","reference"],"title":"Repetition Penalty","type":"number"},"return_full_text":{"description":"If set to False, the return results will not contain the original query making it easier for prompting.","instillAcceptFormats":["boolean"],"instillUIOrder":5,"instillUpstreamTypes":["value","reference"],"title":"Return Full Text","type":"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 to uniform probability.","instillAcceptFormats":["number","integer"],"instillShortDescription":"The temperature of the sampling operation.","instillUIOrder":6,"instillUpstreamTypes":["value","reference"],"title":"Temperature","type":"number"},"top_k":{"description":"Integer to define the top tokens considered within the sample operation to create new text.","instillAcceptFormats":["integer"],"instillUIOrder":7,"instillUpstreamTypes":["value","reference"],"title":"Top K","type":"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.","instillAcceptFormats":["number","integer"],"instillShortDescription":"Float to define the tokens that are within the sample operation of text generation.","instillUIOrder":8,"instillUpstreamTypes":["value","reference"],"title":"Top P","type":"number"}},"required":[],"title":"Parameters","type":"object"}},"required":["inputs"],"title":"Input","type":"object","$defs":{"model":{"description":"The Hugging Face model to be used","instillAcceptFormats":["string"],"instillUpstreamTypes":["value","reference","template"],"title":"Model","type":"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 the caching mechanism from being used resulting in a real new query.","instillAcceptFormats":["boolean"],"instillShortDescription":"Enable the cache of inference API","instillUIOrder":1,"instillUpstreamTypes":["value","reference"],"title":"Use Cache","type":"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.","instillAcceptFormats":["boolean"],"instillShortDescription":"Wait for model ready","instillUIOrder":0,"instillUpstreamTypes":["value","reference"],"title":"Wait For Model","type":"boolean"}},"required":[],"title":"Options","type":"object"},"string_input":{"description":"String input","instillAcceptFormats":["string"],"instillUIOrder":0,"instillUpstreamTypes":["value","reference","template"],"title":"String Input","type":"string"}}} diff --git a/instill/resources/schema/jsons/huggingface_task_text_generation_output.json b/instill/resources/schema/jsons/huggingface_task_text_generation_output.json new file mode 100644 index 0000000..8631d66 --- /dev/null +++ b/instill/resources/schema/jsons/huggingface_task_text_generation_output.json @@ -0,0 +1 @@ +{"instillUIOrder":0,"properties":{"generated_text":{"description":"The continuated string","instillFormat":"string","instillUIMultiline":true,"instillUIOrder":1,"title":"Generated Text","type":"string"}},"required":["generated_text"],"title":"Output","type":"object","$defs":{"model":{"description":"The Hugging Face model to be used","instillAcceptFormats":["string"],"instillUpstreamTypes":["value","reference","template"],"title":"Model","type":"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 the caching mechanism from being used resulting in a real new query.","instillAcceptFormats":["boolean"],"instillShortDescription":"Enable the cache of inference API","instillUIOrder":1,"instillUpstreamTypes":["value","reference"],"title":"Use Cache","type":"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.","instillAcceptFormats":["boolean"],"instillShortDescription":"Wait for model ready","instillUIOrder":0,"instillUpstreamTypes":["value","reference"],"title":"Wait For Model","type":"boolean"}},"required":[],"title":"Options","type":"object"},"string_input":{"description":"String input","instillAcceptFormats":["string"],"instillUIOrder":0,"instillUpstreamTypes":["value","reference","template"],"title":"String Input","type":"string"}}} diff --git a/instill/resources/schema/jsons/huggingface_task_text_to_image_input.json b/instill/resources/schema/jsons/huggingface_task_text_to_image_input.json new file mode 100644 index 0000000..b37297d --- /dev/null +++ b/instill/resources/schema/jsons/huggingface_task_text_to_image_input.json @@ -0,0 +1 @@ +{"instillUIOrder":0,"properties":{"inputs":{"$ref":"#/$defs/string_input","instillUIOrder":1},"model":{"$ref":"#/$defs/model","instillUIOrder":0},"options":{"$ref":"#/$defs/options","instillUIOrder":3},"parameters":{"instillUIOrder":2,"properties":{"guidance_scale":{"description":"Guidance scale","instillAcceptFormats":["number","integer"],"instillUIOrder":0,"instillUpstreamTypes":["value","reference"],"title":"Guidance Scale","type":"number"},"height":{"description":"Image Height","instillAcceptFormats":["integer"],"instillUIOrder":1,"instillUpstreamTypes":["value","reference"],"title":"Height","type":"integer"},"negative_prompt":{"description":"Negative prompt for generating the image","instillAcceptFormats":["string"],"instillUIMultiline":true,"instillUIOrder":2,"instillUpstreamTypes":["value","reference","template"],"title":"Negative Prompt","type":"string"},"num_inference_steps":{"description":"Number of inference steps","instillAcceptFormats":["integer"],"instillUIOrder":3,"instillUpstreamTypes":["value","reference"],"title":"Num Inference Steps","type":"integer"},"width":{"description":"Image width","instillAcceptFormats":["integer"],"instillUIOrder":4,"instillUpstreamTypes":["value","reference"],"title":"Width","type":"integer"}},"required":[],"title":"Parameters","type":"object"}},"required":["inputs"],"title":"Input","type":"object","$defs":{"model":{"description":"The Hugging Face model to be used","instillAcceptFormats":["string"],"instillUpstreamTypes":["value","reference","template"],"title":"Model","type":"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 the caching mechanism from being used resulting in a real new query.","instillAcceptFormats":["boolean"],"instillShortDescription":"Enable the cache of inference API","instillUIOrder":1,"instillUpstreamTypes":["value","reference"],"title":"Use Cache","type":"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.","instillAcceptFormats":["boolean"],"instillShortDescription":"Wait for model ready","instillUIOrder":0,"instillUpstreamTypes":["value","reference"],"title":"Wait For Model","type":"boolean"}},"required":[],"title":"Options","type":"object"},"string_input":{"description":"String input","instillAcceptFormats":["string"],"instillUIOrder":0,"instillUpstreamTypes":["value","reference","template"],"title":"String Input","type":"string"}}} diff --git a/instill/resources/schema/jsons/huggingface_task_text_to_image_output.json b/instill/resources/schema/jsons/huggingface_task_text_to_image_output.json new file mode 100644 index 0000000..02bebff --- /dev/null +++ b/instill/resources/schema/jsons/huggingface_task_text_to_image_output.json @@ -0,0 +1 @@ +{"instillUIOrder":0,"properties":{"image":{"instillFormat":"image/jpeg","instillUIOrder":0,"title":"Image","type":"string"}},"required":["image"],"title":"Output","type":"object","$defs":{"model":{"description":"The Hugging Face model to be used","instillAcceptFormats":["string"],"instillUpstreamTypes":["value","reference","template"],"title":"Model","type":"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 the caching mechanism from being used resulting in a real new query.","instillAcceptFormats":["boolean"],"instillShortDescription":"Enable the cache of inference API","instillUIOrder":1,"instillUpstreamTypes":["value","reference"],"title":"Use Cache","type":"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.","instillAcceptFormats":["boolean"],"instillShortDescription":"Wait for model ready","instillUIOrder":0,"instillUpstreamTypes":["value","reference"],"title":"Wait For Model","type":"boolean"}},"required":[],"title":"Options","type":"object"},"string_input":{"description":"String input","instillAcceptFormats":["string"],"instillUIOrder":0,"instillUpstreamTypes":["value","reference","template"],"title":"String Input","type":"string"}}} diff --git a/instill/resources/schema/jsons/huggingface_task_token_classification_input.json b/instill/resources/schema/jsons/huggingface_task_token_classification_input.json new file mode 100644 index 0000000..420a39c --- /dev/null +++ b/instill/resources/schema/jsons/huggingface_task_token_classification_input.json @@ -0,0 +1 @@ +{"instillUIOrder":0,"properties":{"inputs":{"$ref":"#/$defs/string_input","instillUIOrder":1},"model":{"$ref":"#/$defs/model","instillUIOrder":0},"options":{"$ref":"#/$defs/options","instillUIOrder":3},"parameters":{"instillUIOrder":2,"properties":{"aggregation_strategy":{"description":"There are several aggregation strategies:nnone: Every token gets classified without further aggregation.nsimple: Entities are grouped according to the default schema (B-, I- tags get merged when the tag is similar).nfirst: Same as the simple strategy except words cannot end up with different tags. Words will use the tag of the first token when there is ambiguity.naverage: 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.nmax: Same as the simple strategy except words cannot end up with different tags. Word entity will be the token with the maximum score.","instillAcceptFormats":["string"],"instillShortDescription":"There are several aggregation strategies: none, simple, first, average, and max.","instillUIOrder":0,"instillUpstreamTypes":["value","reference","template"],"title":"Aggregation Strategy","type":"string"}},"required":[],"title":"Parameters","type":"object"}},"required":["inputs"],"title":"Input","type":"object","$defs":{"model":{"description":"The Hugging Face model to be used","instillAcceptFormats":["string"],"instillUpstreamTypes":["value","reference","template"],"title":"Model","type":"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 the caching mechanism from being used resulting in a real new query.","instillAcceptFormats":["boolean"],"instillShortDescription":"Enable the cache of inference API","instillUIOrder":1,"instillUpstreamTypes":["value","reference"],"title":"Use Cache","type":"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.","instillAcceptFormats":["boolean"],"instillShortDescription":"Wait for model ready","instillUIOrder":0,"instillUpstreamTypes":["value","reference"],"title":"Wait For Model","type":"boolean"}},"required":[],"title":"Options","type":"object"},"string_input":{"description":"String input","instillAcceptFormats":["string"],"instillUIOrder":0,"instillUpstreamTypes":["value","reference","template"],"title":"String Input","type":"string"}}} diff --git a/instill/resources/schema/jsons/huggingface_task_token_classification_output.json b/instill/resources/schema/jsons/huggingface_task_token_classification_output.json new file mode 100644 index 0000000..a7396bb --- /dev/null +++ b/instill/resources/schema/jsons/huggingface_task_token_classification_output.json @@ -0,0 +1 @@ +{"instillUIOrder":0,"properties":{"results":{"instillUIOrder":0,"items":{"properties":{"end":{"description":"The offset stringwise where the answer is located. Useful to disambiguate if word occurs multiple times.","instillFormat":"integer","instillUIOrder":0,"title":"End","type":"integer"},"entity_group":{"description":"The type for the entity being recognized (model specific).","instillFormat":"string","instillUIOrder":1,"title":"Entity Group","type":"string"},"score":{"description":"How likely the entity was recognized.","instillFormat":"number","instillUIOrder":2,"title":"Score","type":"number"},"start":{"description":"The offset stringwise where the answer is located. Useful to disambiguate if word occurs multiple times.","instillFormat":"integer","instillUIOrder":3,"title":"Start","type":"integer"},"word":{"description":"The string that was captured","instillFormat":"string","instillUIMultiline":true,"instillUIOrder":4,"title":"Word","type":"string"}},"required":[],"type":"object"},"title":"Results","type":"array"}},"required":["results"],"title":"Output","type":"object","$defs":{"model":{"description":"The Hugging Face model to be used","instillAcceptFormats":["string"],"instillUpstreamTypes":["value","reference","template"],"title":"Model","type":"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 the caching mechanism from being used resulting in a real new query.","instillAcceptFormats":["boolean"],"instillShortDescription":"Enable the cache of inference API","instillUIOrder":1,"instillUpstreamTypes":["value","reference"],"title":"Use Cache","type":"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.","instillAcceptFormats":["boolean"],"instillShortDescription":"Wait for model ready","instillUIOrder":0,"instillUpstreamTypes":["value","reference"],"title":"Wait For Model","type":"boolean"}},"required":[],"title":"Options","type":"object"},"string_input":{"description":"String input","instillAcceptFormats":["string"],"instillUIOrder":0,"instillUpstreamTypes":["value","reference","template"],"title":"String Input","type":"string"}}} diff --git a/instill/resources/schema/jsons/huggingface_task_translation_input.json b/instill/resources/schema/jsons/huggingface_task_translation_input.json new file mode 100644 index 0000000..76d5a0d --- /dev/null +++ b/instill/resources/schema/jsons/huggingface_task_translation_input.json @@ -0,0 +1 @@ +{"instillUIOrder":0,"properties":{"inputs":{"$ref":"#/$defs/string_input","instillUIOrder":1},"model":{"$ref":"#/$defs/model","instillUIOrder":0},"options":{"$ref":"#/$defs/options","instillUIOrder":2}},"required":["inputs"],"title":"Input","type":"object","$defs":{"model":{"description":"The Hugging Face model to be used","instillAcceptFormats":["string"],"instillUpstreamTypes":["value","reference","template"],"title":"Model","type":"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 the caching mechanism from being used resulting in a real new query.","instillAcceptFormats":["boolean"],"instillShortDescription":"Enable the cache of inference API","instillUIOrder":1,"instillUpstreamTypes":["value","reference"],"title":"Use Cache","type":"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.","instillAcceptFormats":["boolean"],"instillShortDescription":"Wait for model ready","instillUIOrder":0,"instillUpstreamTypes":["value","reference"],"title":"Wait For Model","type":"boolean"}},"required":[],"title":"Options","type":"object"},"string_input":{"description":"String input","instillAcceptFormats":["string"],"instillUIOrder":0,"instillUpstreamTypes":["value","reference","template"],"title":"String Input","type":"string"}}} diff --git a/instill/resources/schema/jsons/huggingface_task_translation_output.json b/instill/resources/schema/jsons/huggingface_task_translation_output.json new file mode 100644 index 0000000..e2f405a --- /dev/null +++ b/instill/resources/schema/jsons/huggingface_task_translation_output.json @@ -0,0 +1 @@ +{"instillUIOrder":0,"properties":{"translation_text":{"description":"The string after translation","instillFormat":"string","instillUIMultiline":true,"instillUIOrder":0,"title":"Translation Text","type":"string"}},"required":["translation_text"],"title":"Output","type":"object","$defs":{"model":{"description":"The Hugging Face model to be used","instillAcceptFormats":["string"],"instillUpstreamTypes":["value","reference","template"],"title":"Model","type":"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 the caching mechanism from being used resulting in a real new query.","instillAcceptFormats":["boolean"],"instillShortDescription":"Enable the cache of inference API","instillUIOrder":1,"instillUpstreamTypes":["value","reference"],"title":"Use Cache","type":"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.","instillAcceptFormats":["boolean"],"instillShortDescription":"Wait for model ready","instillUIOrder":0,"instillUpstreamTypes":["value","reference"],"title":"Wait For Model","type":"boolean"}},"required":[],"title":"Options","type":"object"},"string_input":{"description":"String input","instillAcceptFormats":["string"],"instillUIOrder":0,"instillUpstreamTypes":["value","reference","template"],"title":"String Input","type":"string"}}} diff --git a/instill/resources/schema/jsons/huggingface_task_zero_shot_classification_input.json b/instill/resources/schema/jsons/huggingface_task_zero_shot_classification_input.json new file mode 100644 index 0000000..e5a9505 --- /dev/null +++ b/instill/resources/schema/jsons/huggingface_task_zero_shot_classification_input.json @@ -0,0 +1 @@ +{"instillUIOrder":0,"properties":{"inputs":{"$ref":"#/$defs/string_input","instillUIOrder":1},"model":{"$ref":"#/$defs/model","instillUIOrder":0},"options":{"$ref":"#/$defs/options","instillUIOrder":3},"parameters":{"instillUIOrder":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 and do the scaling on your end. )","instillShortDescription":"a list of strings that are potential classes for inputs.","instillUIOrder":0,"instillUpstreamTypes":["value","reference"],"items":{"title":"candidate_label","type":"string"},"title":"Candidate Labels","type":"array"},"multi_label":{"description":"Boolean that is set to True if classes can overlap","instillAcceptFormats":["boolean"],"instillUIOrder":1,"instillUpstreamTypes":["value","reference"],"title":"Multi Label","type":"boolean"}},"required":["candidate_labels"],"title":"Parameters","type":"object"}},"required":["inputs","parameters"],"title":"Input","type":"object","$defs":{"model":{"description":"The Hugging Face model to be used","instillAcceptFormats":["string"],"instillUpstreamTypes":["value","reference","template"],"title":"Model","type":"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 the caching mechanism from being used resulting in a real new query.","instillAcceptFormats":["boolean"],"instillShortDescription":"Enable the cache of inference API","instillUIOrder":1,"instillUpstreamTypes":["value","reference"],"title":"Use Cache","type":"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.","instillAcceptFormats":["boolean"],"instillShortDescription":"Wait for model ready","instillUIOrder":0,"instillUpstreamTypes":["value","reference"],"title":"Wait For Model","type":"boolean"}},"required":[],"title":"Options","type":"object"},"string_input":{"description":"String input","instillAcceptFormats":["string"],"instillUIOrder":0,"instillUpstreamTypes":["value","reference","template"],"title":"String Input","type":"string"}}} diff --git a/instill/resources/schema/jsons/huggingface_task_zero_shot_classification_output.json b/instill/resources/schema/jsons/huggingface_task_zero_shot_classification_output.json new file mode 100644 index 0000000..0fc4bfb --- /dev/null +++ b/instill/resources/schema/jsons/huggingface_task_zero_shot_classification_output.json @@ -0,0 +1 @@ +{"instillUIOrder":0,"properties":{"labels":{"description":"The list of strings for labels that you sent (in order)","instillUIOrder":1,"items":{"instillFormat":"string","type":"string"},"title":"Labels","type":"array"},"scores":{"description":"a list of floats that correspond the the probability of label, in the same order as labels.","instillUIOrder":0,"items":{"instillFormat":"number","type":"number"},"title":"Scores","type":"array"},"sequence":{"description":"The string sent as an input","instillFormat":"string","instillUIMultiline":true,"instillUIOrder":1,"title":"Sequence","type":"string"}},"required":["labels","scores"],"title":"Output","type":"object","$defs":{"model":{"description":"The Hugging Face model to be used","instillAcceptFormats":["string"],"instillUpstreamTypes":["value","reference","template"],"title":"Model","type":"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 the caching mechanism from being used resulting in a real new query.","instillAcceptFormats":["boolean"],"instillShortDescription":"Enable the cache of inference API","instillUIOrder":1,"instillUpstreamTypes":["value","reference"],"title":"Use Cache","type":"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.","instillAcceptFormats":["boolean"],"instillShortDescription":"Wait for model ready","instillUIOrder":0,"instillUpstreamTypes":["value","reference"],"title":"Wait For Model","type":"boolean"}},"required":[],"title":"Options","type":"object"},"string_input":{"description":"String input","instillAcceptFormats":["string"],"instillUIOrder":0,"instillUpstreamTypes":["value","reference","template"],"title":"String Input","type":"string"}}} diff --git a/instill/resources/schema/jsons/huggingface_tasks.json b/instill/resources/schema/jsons/huggingface_tasks.json new file mode 100644 index 0000000..82e5b0e --- /dev/null +++ b/instill/resources/schema/jsons/huggingface_tasks.json @@ -0,0 +1,1833 @@ +{ + "$defs": { + "model": { + "description": "The Hugging Face model to be used", + "instillAcceptFormats": [ + "string" + ], + "instillUpstreamTypes": [ + "value", + "reference", + "template" + ], + "title": "Model", + "type": "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 the caching mechanism from being used resulting in a real new query.", + "instillAcceptFormats": [ + "boolean" + ], + "instillShortDescription": "Enable the cache of inference API", + "instillUIOrder": 1, + "instillUpstreamTypes": [ + "value", + "reference" + ], + "title": "Use Cache", + "type": "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.", + "instillAcceptFormats": [ + "boolean" + ], + "instillShortDescription": "Wait for model ready", + "instillUIOrder": 0, + "instillUpstreamTypes": [ + "value", + "reference" + ], + "title": "Wait For Model", + "type": "boolean" + } + }, + "required": [], + "title": "Options", + "type": "object" + }, + "string_input": { + "description": "String input", + "instillAcceptFormats": [ + "string" + ], + "instillUIOrder": 0, + "instillUpstreamTypes": [ + "value", + "reference", + "template" + ], + "title": "String Input", + "type": "string" + } + }, + "TASK_AUDIO_CLASSIFICATION": { + "input": { + "instillUIOrder": 0, + "properties": { + "audio": { + "description": "The audio file", + "instillAcceptFormats": [ + "audio/*" + ], + "instillUIOrder": 1, + "instillUpstreamTypes": [ + "reference" + ], + "title": "Audio", + "type": "string" + }, + "model": { + "$ref": "#/$defs/model", + "instillUIOrder": 0 + } + }, + "required": [ + "audio" + ], + "title": "Input", + "type": "object" + }, + "output": { + "instillUIOrder": 0, + "properties": { + "classes": { + "instillUIOrder": 0, + "items": { + "properties": { + "label": { + "description": "The label for the class (model specific)", + "instillFormat": "string", + "instillUIOrder": 0, + "title": "Label", + "type": "string" + }, + "score": { + "description": "A float that represents how likely it is that the audio file belongs to this class.", + "instillFormat": "number", + "instillUIOrder": 1, + "title": "Score", + "type": "number" + } + }, + "required": [ + "label", + "score" + ], + "type": "object" + }, + "title": "Classes", + "type": "array" + } + }, + "required": [ + "classes" + ], + "title": "Output", + "type": "object" + } + }, + "TASK_CONVERSATIONAL": { + "input": { + "instillUIOrder": 0, + "properties": { + "inputs": { + "instillUIOrder": 1, + "properties": { + "generated_responses": { + "description": "A list of strings corresponding to the earlier replies from the model.", + "instillAcceptFormats": [ + "array:string" + ], + "instillUIOrder": 0, + "instillUpstreamTypes": [ + "value", + "reference" + ], + "items": { + "instillUIMultiline": true, + "type": "string" + }, + "title": "Generated Responses", + "type": "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.", + "instillAcceptFormats": [ + "array:string" + ], + "instillShortDescription": "A list of strings corresponding to the earlier replies from the user.", + "instillUIOrder": 1, + "instillUpstreamTypes": [ + "value", + "reference" + ], + "items": { + "instillUIMultiline": true, + "type": "string" + }, + "title": "Past User Inputs", + "type": "array" + }, + "text": { + "description": "The last input from the user in the conversation.", + "instillAcceptFormats": [ + "string" + ], + "instillUIMultiline": true, + "instillUIOrder": 2, + "instillUpstreamTypes": [ + "value", + "reference", + "template" + ], + "title": "Text", + "type": "string" + } + }, + "required": [ + "text" + ], + "title": "Inputs", + "type": "object" + }, + "model": { + "$ref": "#/$defs/model", + "instillUIOrder": 0 + }, + "options": { + "$ref": "#/$defs/options", + "instillUIOrder": 3 + }, + "parameters": { + "instillUIOrder": 2, + "properties": { + "max_length": { + "description": "Integer to define the maximum length in tokens of the output summary.", + "instillAcceptFormats": [ + "integer" + ], + "instillUIOrder": 0, + "instillUpstreamTypes": [ + "value", + "reference" + ], + "title": "Max Length", + "type": "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.", + "instillAcceptFormats": [ + "number", + "integer" + ], + "instillShortDescription": "The amount of time in seconds that the query should take maximum.", + "instillUIOrder": 1, + "instillUpstreamTypes": [ + "value", + "reference" + ], + "maximum": 120.0, + "minimum": 0.0, + "title": "Max Time", + "type": "number" + }, + "min_length": { + "description": "Integer to define the minimum length in tokens of the output summary.", + "instillAcceptFormats": [ + "integer" + ], + "instillUIOrder": 2, + "instillUpstreamTypes": [ + "value", + "reference" + ], + "title": "Min Length", + "type": "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.", + "instillAcceptFormats": [ + "number", + "integer" + ], + "instillUIOrder": 3, + "instillUpstreamTypes": [ + "value", + "reference" + ], + "maximum": 100.0, + "minimum": 0.0, + "title": "Repetition Penalty", + "type": "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 to uniform probability.", + "instillAcceptFormats": [ + "number", + "integer" + ], + "instillShortDescription": "The temperature of the sampling operation.", + "instillUIOrder": 4, + "instillUpstreamTypes": [ + "value", + "reference" + ], + "maximum": 100.0, + "minimum": 0.0, + "title": "Temperature", + "type": "number" + }, + "top_k": { + "description": "Integer to define the top tokens considered within the sample operation to create new text.", + "instillAcceptFormats": [ + "integer" + ], + "instillUIOrder": 5, + "instillUpstreamTypes": [ + "value", + "reference" + ], + "title": "Top K", + "type": "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.", + "instillAcceptFormats": [ + "number", + "integer" + ], + "instillShortDescription": "Float to define the tokens that are within the sample operation of text generation.", + "instillUIOrder": 6, + "instillUpstreamTypes": [ + "value", + "reference" + ], + "title": "Top P", + "type": "number" + } + }, + "required": [], + "title": "Parameters", + "type": "object" + } + }, + "required": [ + "inputs" + ], + "title": "Input", + "type": "object" + }, + "output": { + "instillUIOrder": 0, + "properties": { + "conversation": { + "description": "A facility dictionnary to send back for the next input (with the new user input addition).", + "instillUIOrder": 0, + "properties": { + "generated_responses": { + "description": "List of strings. The last outputs from the model in the conversation, after the model has run.", + "instillUIOrder": 0, + "items": { + "instillFormat": "string", + "instillUIMultiline": true, + "type": "string" + }, + "title": "Generated Responses", + "type": "array" + }, + "past_user_inputs": { + "description": "List of strings. The last inputs from the user in the conversation, after the model has run.", + "instillUIOrder": 1, + "items": { + "instillFormat": "string", + "instillUIMultiline": true, + "type": "string" + }, + "title": "Past User Inputs", + "type": "array" + } + }, + "required": [ + "generated_responses", + "past_user_inputs" + ], + "title": "Conversation", + "type": "object" + }, + "generated_text": { + "description": "The answer of the bot", + "instillFormat": "string", + "instillUIMultiline": true, + "instillUIOrder": 1, + "title": "Generated Text", + "type": "string" + } + }, + "required": [ + "generated_text" + ], + "title": "Output", + "type": "object" + } + }, + "TASK_FILL_MASK": { + "input": { + "instillUIOrder": 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)", + "instillUIOrder": 1 + }, + "model": { + "$ref": "#/$defs/model", + "instillUIOrder": 0 + }, + "options": { + "$ref": "#/$defs/options", + "instillUIOrder": 2 + } + }, + "required": [ + "inputs" + ], + "title": "Input", + "type": "object" + }, + "output": { + "instillUIOrder": 0, + "properties": { + "results": { + "instillUIOrder": 0, + "items": { + "properties": { + "score": { + "description": "The probability for this token.", + "instillFormat": "number", + "instillUIOrder": 0, + "title": "Score", + "type": "number" + }, + "sequence": { + "description": "The actual sequence of tokens that ran against the model (may contain special tokens)", + "instillFormat": "string", + "instillUIMultiline": true, + "instillUIOrder": 1, + "title": "Sequence", + "type": "string" + }, + "token": { + "description": "The id of the token", + "instillFormat": "integer", + "instillUIOrder": 2, + "title": "Token", + "type": "integer" + }, + "token_str": { + "description": "The string representation of the token", + "instillFormat": "string", + "instillUIOrder": 3, + "title": "Token Str", + "type": "string" + } + }, + "required": [], + "type": "object" + }, + "title": "Results", + "type": "array" + } + }, + "required": [ + "results" + ], + "title": "Output", + "type": "object" + } + }, + "TASK_IMAGE_CLASSIFICATION": { + "input": { + "instillUIOrder": 0, + "properties": { + "image": { + "description": "The image file", + "instillAcceptFormats": [ + "image/*" + ], + "instillUIOrder": 1, + "instillUpstreamTypes": [ + "reference" + ], + "title": "Image", + "type": "string" + }, + "model": { + "$ref": "#/$defs/model", + "instillUIOrder": 0 + } + }, + "required": [ + "image" + ], + "title": "Input", + "type": "object" + }, + "output": { + "instillUIOrder": 0, + "properties": { + "classes": { + "instillUIOrder": 0, + "items": { + "properties": { + "label": { + "description": "The label for the class (model specific)", + "instillFormat": "string", + "instillUIOrder": 0, + "title": "Label", + "type": "string" + }, + "score": { + "description": "A float that represents how likely it is that the image file belongs to this class.", + "instillFormat": "number", + "instillUIOrder": 0, + "title": "Score", + "type": "number" + } + }, + "required": [ + "label", + "score" + ], + "type": "object" + }, + "title": "Classes", + "type": "array" + } + }, + "required": [ + "classes" + ], + "title": "Output", + "type": "object" + } + }, + "TASK_IMAGE_SEGMENTATION": { + "input": { + "instillUIOrder": 0, + "properties": { + "image": { + "description": "The image file", + "instillAcceptFormats": [ + "image/*" + ], + "instillUIOrder": 1, + "instillUpstreamTypes": [ + "reference" + ], + "title": "Image", + "type": "string" + }, + "model": { + "$ref": "#/$defs/model", + "instillUIOrder": 0 + } + }, + "required": [ + "image" + ], + "title": "Input", + "type": "object" + }, + "output": { + "instillUIOrder": 0, + "properties": { + "segments": { + "instillUIOrder": 0, + "items": { + "properties": { + "label": { + "description": "The label for the class (model specific) of a segment.", + "instillFormat": "string", + "instillUIOrder": 0, + "title": "Label", + "type": "string" + }, + "mask": { + "description": "A str (base64 str of a single channel black-and-white img) representing the mask of a segment.", + "instillFormat": "image/png", + "instillUIOrder": 1, + "title": "Mask", + "type": "string" + }, + "score": { + "description": "A float that represents how likely it is that the segment belongs to the given class.", + "instillFormat": "number", + "instillUIOrder": 2, + "title": "Score", + "type": "number" + } + }, + "required": [ + "label", + "mask", + "score" + ], + "type": "object" + }, + "title": "Segments", + "type": "array" + } + }, + "required": [ + "segments" + ], + "title": "Output", + "type": "object" + } + }, + "TASK_IMAGE_TO_TEXT": { + "input": { + "instillUIOrder": 0, + "properties": { + "image": { + "description": "The image file", + "instillAcceptFormats": [ + "image/*" + ], + "instillUIOrder": 0, + "instillUpstreamTypes": [ + "reference" + ], + "title": "Image", + "type": "string" + }, + "model": { + "$ref": "#/$defs/model", + "instillUIOrder": 0 + } + }, + "required": [ + "image" + ], + "title": "Input", + "type": "object" + }, + "output": { + "instillUIOrder": 0, + "properties": { + "text": { + "instillFormat": "string", + "instillUIMultiline": true, + "instillUIOrder": 0, + "title": "Text", + "type": "string" + } + }, + "required": [ + "text" + ], + "title": "Output", + "type": "object" + } + }, + "TASK_OBJECT_DETECTION": { + "input": { + "instillUIOrder": 0, + "properties": { + "image": { + "description": "The image file", + "instillAcceptFormats": [ + "image/*" + ], + "instillUIOrder": 1, + "instillUpstreamTypes": [ + "reference" + ], + "title": "Image", + "type": "string" + }, + "model": { + "$ref": "#/$defs/model", + "instillUIOrder": 0 + } + }, + "required": [ + "image" + ], + "title": "Input", + "type": "object" + }, + "output": { + "instillUIOrder": 0, + "properties": { + "objects": { + "instillUIOrder": 0, + "items": { + "properties": { + "box": { + "description": "A dict (with keys [xmin,ymin,xmax,ymax]) representing the bounding box of a detected object.", + "instillUIOrder": 0, + "properties": { + "xmax": { + "instillFormat": "number", + "instillUIOrder": 0, + "title": "X Max", + "type": "number" + }, + "xmin": { + "instillFormat": "number", + "instillUIOrder": 1, + "title": "X Min", + "type": "number" + }, + "ymax": { + "instillFormat": "number", + "instillUIOrder": 2, + "title": "Y Max", + "type": "number" + }, + "ymin": { + "instillFormat": "number", + "instillUIOrder": 3, + "title": "Y min", + "type": "number" + } + }, + "required": [ + "xmax", + "xmin", + "ymax", + "ymin" + ], + "title": "Box", + "type": "object" + }, + "label": { + "description": "The label for the class (model specific) of a detected object.", + "instillFormat": "string", + "instillUIOrder": 1, + "title": "Label", + "type": "string" + }, + "score": { + "description": "A float that represents how likely it is that the detected object belongs to the given class.", + "instillFormat": "number", + "instillUIOrder": 2, + "title": "Score", + "type": "number" + } + }, + "required": [ + "box", + "label", + "score" + ], + "type": "object" + }, + "title": "Objects", + "type": "array" + } + }, + "required": [ + "objects" + ], + "title": "Output", + "type": "object" + } + }, + "TASK_QUESTION_ANSWERING": { + "input": { + "instillUIOrder": 0, + "properties": { + "inputs": { + "instillUIOrder": 1, + "properties": { + "context": { + "description": "The context for answering the question.", + "instillAcceptFormats": [ + "string" + ], + "instillUIMultiline": true, + "instillUIOrder": 0, + "instillUpstreamTypes": [ + "value", + "reference", + "template" + ], + "title": "Context", + "type": "string" + }, + "question": { + "description": "The question", + "instillAcceptFormats": [ + "string" + ], + "instillUIMultiline": true, + "instillUIOrder": 1, + "instillUpstreamTypes": [ + "value", + "reference", + "template" + ], + "title": "Question", + "type": "string" + } + }, + "required": [ + "question", + "context" + ], + "title": "Inputs", + "type": "object" + }, + "model": { + "$ref": "#/$defs/model", + "instillUIOrder": 0 + }, + "options": { + "$ref": "#/$defs/options", + "instillUIOrder": 2 + } + }, + "required": [ + "inputs" + ], + "title": "Input", + "type": "object" + }, + "output": { + "instillUIOrder": 0, + "properties": { + "answer": { + "description": "A string that\u2019s the answer within the text.", + "instillFormat": "string", + "instillUIMultiline": true, + "instillUIOrder": 0, + "title": "Answer", + "type": "string" + }, + "score": { + "description": "A float that represents how likely that the answer is correct", + "instillFormat": "number", + "instillUIOrder": 2, + "title": "Score", + "type": "number" + }, + "start": { + "description": "The index (string wise) of the start of the answer within context.", + "instillFormat": "integer", + "instillUIOrder": 3, + "title": "Start", + "type": "integer" + }, + "stop": { + "description": "The index (string wise) of the stop of the answer within context.", + "instillFormat": "integer", + "instillUIOrder": 1, + "title": "Stop", + "type": "integer" + } + }, + "required": [ + "answer" + ], + "title": "Output", + "type": "object" + } + }, + "TASK_SENTENCE_SIMILARITY": { + "input": { + "instillUIOrder": 0, + "properties": { + "inputs": { + "instillUIOrder": 1, + "properties": { + "sentences": { + "description": "A list of strings which will be compared against the source_sentence.", + "instillAcceptFormats": [ + "array:string" + ], + "instillUIOrder": 0, + "instillUpstreamTypes": [ + "value", + "reference" + ], + "items": { + "instillUIMultiline": true, + "type": "string" + }, + "title": "Sentences", + "type": "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 model being used.", + "instillAcceptFormats": [ + "string" + ], + "instillShortDescription": "The string that you wish to compare the other strings with.", + "instillUIMultiline": true, + "instillUIOrder": 1, + "instillUpstreamTypes": [ + "value", + "reference" + ], + "title": "Source Sentence", + "type": "string" + } + }, + "required": [ + "source_sentence", + "sentences" + ], + "title": "Inputs", + "type": "object" + }, + "model": { + "$ref": "#/$defs/model", + "instillUIOrder": 0 + }, + "options": { + "$ref": "#/$defs/options", + "instillUIOrder": 2 + } + }, + "required": [ + "inputs" + ], + "title": "Input", + "type": "object" + }, + "output": { + "instillUIOrder": 0, + "properties": { + "scores": { + "description": "The associated similarity score for each of the given strings", + "instillUIOrder": 0, + "items": { + "instillFormat": "number", + "type": "number" + }, + "title": "Scores", + "type": "array" + } + }, + "required": [ + "scores" + ], + "title": "Output", + "type": "object" + } + }, + "TASK_SPEECH_RECOGNITION": { + "input": { + "instillUIOrder": 0, + "properties": { + "audio": { + "description": "The audio file", + "instillAcceptFormats": [ + "audio/*" + ], + "instillUIOrder": 1, + "instillUpstreamTypes": [ + "reference" + ], + "title": "Audio", + "type": "string" + }, + "model": { + "$ref": "#/$defs/model", + "instillUIOrder": 0 + } + }, + "required": [ + "audio" + ], + "title": "Input", + "type": "object" + }, + "output": { + "instillUIOrder": 0, + "properties": { + "text": { + "description": "The string that was recognized within the audio file.", + "instillFormat": "string", + "instillUIMultiline": true, + "instillUIOrder": 0, + "title": "Text", + "type": "string" + } + }, + "required": [ + "text" + ], + "title": "Output", + "type": "object" + } + }, + "TASK_SUMMARIZATION": { + "input": { + "instillUIOrder": 0, + "properties": { + "inputs": { + "$ref": "#/$defs/string_input", + "instillUIOrder": 1 + }, + "model": { + "$ref": "#/$defs/model", + "instillUIOrder": 0 + }, + "options": { + "$ref": "#/$defs/options", + "instillUIOrder": 3 + }, + "parameters": { + "instillUIOrder": 2, + "properties": { + "max_length": { + "description": "Integer to define the maximum length in tokens of the output summary.", + "instillAcceptFormats": [ + "integer" + ], + "instillUIOrder": 0, + "instillUpstreamTypes": [ + "value", + "reference" + ], + "title": "Max Length", + "type": "integer" + }, + "max_time": { + "instillAcceptFormats": [ + "number", + "integer" + ], + "instillUIOrder": 1, + "instillUpstreamTypes": [ + "value", + "reference" + ], + "maximum": 120.0, + "minimum": 0.0, + "title": "Max Time", + "type": "number" + }, + "min_length": { + "description": "Integer to define the minimum length in tokens of the output summary.", + "instillAcceptFormats": [ + "integer" + ], + "instillUIOrder": 2, + "instillUpstreamTypes": [ + "value", + "reference" + ], + "title": "Min Length", + "type": "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.", + "instillAcceptFormats": [ + "number", + "integer" + ], + "instillUIOrder": 3, + "instillUpstreamTypes": [ + "value", + "reference" + ], + "maximum": 100.0, + "minimum": 0.0, + "title": "Repetition Penalty", + "type": "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 to uniform probability.", + "instillAcceptFormats": [ + "number", + "integer" + ], + "instillShortDescription": "The temperature of the sampling operation.", + "instillUIOrder": 4, + "instillUpstreamTypes": [ + "value", + "reference" + ], + "maximum": 100.0, + "minimum": 0.0, + "title": "Temperature", + "type": "number" + }, + "top_k": { + "description": "Integer to define the top tokens considered within the sample operation to create new text.", + "instillAcceptFormats": [ + "integer" + ], + "instillUIOrder": 5, + "instillUpstreamTypes": [ + "value", + "reference" + ], + "title": "Top K", + "type": "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.", + "instillAcceptFormats": [ + "number", + "integer" + ], + "instillShortDescription": "Float to define the tokens that are within the sample operation of text generation.", + "instillUIOrder": 6, + "instillUpstreamTypes": [ + "value", + "reference" + ], + "title": "Top P", + "type": "number" + } + }, + "required": [], + "title": "Parameters", + "type": "object" + } + }, + "required": [ + "inputs" + ], + "title": "Input", + "type": "object" + }, + "output": { + "instillUIOrder": 0, + "properties": { + "summary_text": { + "description": "The string after summarization", + "instillFormat": "string", + "instillUIMultiline": true, + "instillUIOrder": 0, + "title": "Summary Text", + "type": "string" + } + }, + "required": [ + "summary_text" + ], + "title": "Output", + "type": "object" + } + }, + "TASK_TABLE_QUESTION_ANSWERING": { + "input": { + "instillUIOrder": 0, + "properties": { + "inputs": { + "instillUIOrder": 1, + "properties": { + "query": { + "description": "The query in plain text that you want to ask the table", + "instillAcceptFormats": [ + "string" + ], + "instillUIMultiline": true, + "instillUIOrder": 0, + "instillUpstreamTypes": [ + "value", + "reference" + ], + "title": "Query", + "type": "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 same size.", + "instillAcceptFormats": [ + "*" + ], + "instillUIOrder": 1, + "instillUpstreamTypes": [ + "reference", + "value" + ], + "required": [], + "title": "Table", + "type": "object" + } + }, + "required": [ + "query", + "table" + ], + "title": "Inputs", + "type": "object" + }, + "model": { + "$ref": "#/$defs/model", + "instillUIOrder": 0 + }, + "options": { + "$ref": "#/$defs/options", + "instillUIOrder": 2 + } + }, + "required": [ + "inputs" + ], + "title": "Input", + "type": "object" + }, + "output": { + "instillUIOrder": 0, + "properties": { + "aggregator": { + "description": "The aggregator used to get the answer", + "instillFormat": "string", + "instillUIOrder": 0, + "title": "Aggregator", + "type": "string" + }, + "answer": { + "description": "The plaintext answer", + "instillFormat": "string", + "instillUIMultiline": true, + "instillUIOrder": 1, + "title": "Answer", + "type": "string" + }, + "cells": { + "description": "a list of coordinates of the cells contents", + "instillUIOrder": 2, + "items": { + "instillFormat": "string", + "instillUIMultiline": true, + "type": "string" + }, + "title": "Cells", + "type": "array" + }, + "coordinates": { + "description": "a list of coordinates of the cells referenced in the answer", + "instillUIOrder": 3, + "items": { + "items": { + "instillFormat": "integer", + "type": "integer" + }, + "type": "array" + }, + "title": "Coordinates", + "type": "array" + } + }, + "required": [ + "answer" + ], + "title": "Output", + "type": "object" + } + }, + "TASK_TEXT_CLASSIFICATION": { + "input": { + "instillUIOrder": 0, + "properties": { + "inputs": { + "$ref": "#/$defs/string_input", + "instillUIOrder": 1 + }, + "model": { + "$ref": "#/$defs/model", + "instillUIOrder": 0 + }, + "options": { + "$ref": "#/$defs/options", + "instillUIOrder": 2 + } + }, + "required": [ + "inputs" + ], + "title": "Input", + "type": "object" + }, + "output": { + "instillUIOrder": 0, + "properties": { + "results": { + "instillUIOrder": 0, + "items": { + "properties": { + "label": { + "description": "The label for the class (model specific)", + "instillFormat": "string", + "instillUIOrder": 0, + "title": "Label", + "type": "string" + }, + "score": { + "description": "A floats that represents how likely is that the text belongs the this class.", + "instillFormat": "number", + "instillUIOrder": 1, + "title": "Score", + "type": "number" + } + }, + "required": [ + "label", + "score" + ], + "type": "object" + }, + "title": "Results", + "type": "array" + } + }, + "required": [ + "results" + ], + "title": "Output", + "type": "object" + } + }, + "TASK_TEXT_GENERATION": { + "input": { + "instillUIOrder": 0, + "properties": { + "inputs": { + "$ref": "#/$defs/string_input", + "instillUIOrder": 1 + }, + "model": { + "$ref": "#/$defs/model", + "instillUIOrder": 0 + }, + "options": { + "$ref": "#/$defs/options", + "instillUIOrder": 3 + }, + "parameters": { + "instillUIOrder": 2, + "properties": { + "do_sample": { + "description": "Whether or not to use sampling, use greedy decoding otherwise.", + "instillAcceptFormats": [ + "boolean" + ], + "instillUIOrder": 0, + "instillUpstreamTypes": [ + "value", + "reference" + ], + "title": "Do Sample", + "type": "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.", + "instillAcceptFormats": [ + "integer" + ], + "instillShortDescription": "The amount of new tokens to be generated.", + "instillUIOrder": 1, + "instillUpstreamTypes": [ + "value", + "reference" + ], + "title": "Max New Tokens", + "type": "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.", + "instillAcceptFormats": [ + "number", + "integer" + ], + "instillShortDescription": "The amount of time in seconds that the query should take maximum.", + "instillUIOrder": 2, + "instillUpstreamTypes": [ + "value", + "reference" + ], + "title": "Max Time", + "type": "number" + }, + "num_return_sequences": { + "description": "The number of proposition you want to be returned.", + "instillAcceptFormats": [ + "integer" + ], + "instillUIOrder": 3, + "instillUpstreamTypes": [ + "value", + "reference" + ], + "title": "Num Return Sequences", + "type": "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.", + "instillAcceptFormats": [ + "number", + "integer" + ], + "instillUIOrder": 4, + "instillUpstreamTypes": [ + "value", + "reference" + ], + "title": "Repetition Penalty", + "type": "number" + }, + "return_full_text": { + "description": "If set to False, the return results will not contain the original query making it easier for prompting.", + "instillAcceptFormats": [ + "boolean" + ], + "instillUIOrder": 5, + "instillUpstreamTypes": [ + "value", + "reference" + ], + "title": "Return Full Text", + "type": "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 to uniform probability.", + "instillAcceptFormats": [ + "number", + "integer" + ], + "instillShortDescription": "The temperature of the sampling operation.", + "instillUIOrder": 6, + "instillUpstreamTypes": [ + "value", + "reference" + ], + "title": "Temperature", + "type": "number" + }, + "top_k": { + "description": "Integer to define the top tokens considered within the sample operation to create new text.", + "instillAcceptFormats": [ + "integer" + ], + "instillUIOrder": 7, + "instillUpstreamTypes": [ + "value", + "reference" + ], + "title": "Top K", + "type": "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.", + "instillAcceptFormats": [ + "number", + "integer" + ], + "instillShortDescription": "Float to define the tokens that are within the sample operation of text generation.", + "instillUIOrder": 8, + "instillUpstreamTypes": [ + "value", + "reference" + ], + "title": "Top P", + "type": "number" + } + }, + "required": [], + "title": "Parameters", + "type": "object" + } + }, + "required": [ + "inputs" + ], + "title": "Input", + "type": "object" + }, + "output": { + "instillUIOrder": 0, + "properties": { + "generated_text": { + "description": "The continuated string", + "instillFormat": "string", + "instillUIMultiline": true, + "instillUIOrder": 1, + "title": "Generated Text", + "type": "string" + } + }, + "required": [ + "generated_text" + ], + "title": "Output", + "type": "object" + } + }, + "TASK_TEXT_TO_IMAGE": { + "input": { + "instillUIOrder": 0, + "properties": { + "inputs": { + "$ref": "#/$defs/string_input", + "instillUIOrder": 1 + }, + "model": { + "$ref": "#/$defs/model", + "instillUIOrder": 0 + }, + "options": { + "$ref": "#/$defs/options", + "instillUIOrder": 3 + }, + "parameters": { + "instillUIOrder": 2, + "properties": { + "guidance_scale": { + "description": "Guidance scale", + "instillAcceptFormats": [ + "number", + "integer" + ], + "instillUIOrder": 0, + "instillUpstreamTypes": [ + "value", + "reference" + ], + "title": "Guidance Scale", + "type": "number" + }, + "height": { + "description": "Image Height", + "instillAcceptFormats": [ + "integer" + ], + "instillUIOrder": 1, + "instillUpstreamTypes": [ + "value", + "reference" + ], + "title": "Height", + "type": "integer" + }, + "negative_prompt": { + "description": "Negative prompt for generating the image", + "instillAcceptFormats": [ + "string" + ], + "instillUIMultiline": true, + "instillUIOrder": 2, + "instillUpstreamTypes": [ + "value", + "reference", + "template" + ], + "title": "Negative Prompt", + "type": "string" + }, + "num_inference_steps": { + "description": "Number of inference steps", + "instillAcceptFormats": [ + "integer" + ], + "instillUIOrder": 3, + "instillUpstreamTypes": [ + "value", + "reference" + ], + "title": "Num Inference Steps", + "type": "integer" + }, + "width": { + "description": "Image width", + "instillAcceptFormats": [ + "integer" + ], + "instillUIOrder": 4, + "instillUpstreamTypes": [ + "value", + "reference" + ], + "title": "Width", + "type": "integer" + } + }, + "required": [], + "title": "Parameters", + "type": "object" + } + }, + "required": [ + "inputs" + ], + "title": "Input", + "type": "object" + }, + "output": { + "instillUIOrder": 0, + "properties": { + "image": { + "instillFormat": "image/jpeg", + "instillUIOrder": 0, + "title": "Image", + "type": "string" + } + }, + "required": [ + "image" + ], + "title": "Output", + "type": "object" + } + }, + "TASK_TOKEN_CLASSIFICATION": { + "input": { + "instillUIOrder": 0, + "properties": { + "inputs": { + "$ref": "#/$defs/string_input", + "instillUIOrder": 1 + }, + "model": { + "$ref": "#/$defs/model", + "instillUIOrder": 0 + }, + "options": { + "$ref": "#/$defs/options", + "instillUIOrder": 3 + }, + "parameters": { + "instillUIOrder": 2, + "properties": { + "aggregation_strategy": { + "description": "There are several aggregation strategies:\nnone: Every token gets classified without further aggregation.\nsimple: Entities are grouped according to the default schema (B-, I- tags get merged when the tag is similar).\nfirst: Same as the simple strategy except words cannot end up with different tags. Words will use the tag of the first token when there is ambiguity.\naverage: 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.\nmax: Same as the simple strategy except words cannot end up with different tags. Word entity will be the token with the maximum score.", + "instillAcceptFormats": [ + "string" + ], + "instillShortDescription": "There are several aggregation strategies: none, simple, first, average, and max.", + "instillUIOrder": 0, + "instillUpstreamTypes": [ + "value", + "reference", + "template" + ], + "title": "Aggregation Strategy", + "type": "string" + } + }, + "required": [], + "title": "Parameters", + "type": "object" + } + }, + "required": [ + "inputs" + ], + "title": "Input", + "type": "object" + }, + "output": { + "instillUIOrder": 0, + "properties": { + "results": { + "instillUIOrder": 0, + "items": { + "properties": { + "end": { + "description": "The offset stringwise where the answer is located. Useful to disambiguate if word occurs multiple times.", + "instillFormat": "integer", + "instillUIOrder": 0, + "title": "End", + "type": "integer" + }, + "entity_group": { + "description": "The type for the entity being recognized (model specific).", + "instillFormat": "string", + "instillUIOrder": 1, + "title": "Entity Group", + "type": "string" + }, + "score": { + "description": "How likely the entity was recognized.", + "instillFormat": "number", + "instillUIOrder": 2, + "title": "Score", + "type": "number" + }, + "start": { + "description": "The offset stringwise where the answer is located. Useful to disambiguate if word occurs multiple times.", + "instillFormat": "integer", + "instillUIOrder": 3, + "title": "Start", + "type": "integer" + }, + "word": { + "description": "The string that was captured", + "instillFormat": "string", + "instillUIMultiline": true, + "instillUIOrder": 4, + "title": "Word", + "type": "string" + } + }, + "required": [], + "type": "object" + }, + "title": "Results", + "type": "array" + } + }, + "required": [ + "results" + ], + "title": "Output", + "type": "object" + } + }, + "TASK_TRANSLATION": { + "input": { + "instillUIOrder": 0, + "properties": { + "inputs": { + "$ref": "#/$defs/string_input", + "instillUIOrder": 1 + }, + "model": { + "$ref": "#/$defs/model", + "instillUIOrder": 0 + }, + "options": { + "$ref": "#/$defs/options", + "instillUIOrder": 2 + } + }, + "required": [ + "inputs" + ], + "title": "Input", + "type": "object" + }, + "output": { + "instillUIOrder": 0, + "properties": { + "translation_text": { + "description": "The string after translation", + "instillFormat": "string", + "instillUIMultiline": true, + "instillUIOrder": 0, + "title": "Translation Text", + "type": "string" + } + }, + "required": [ + "translation_text" + ], + "title": "Output", + "type": "object" + } + }, + "TASK_ZERO_SHOT_CLASSIFICATION": { + "input": { + "instillUIOrder": 0, + "properties": { + "inputs": { + "$ref": "#/$defs/string_input", + "instillUIOrder": 1 + }, + "model": { + "$ref": "#/$defs/model", + "instillUIOrder": 0 + }, + "options": { + "$ref": "#/$defs/options", + "instillUIOrder": 3 + }, + "parameters": { + "instillUIOrder": 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 and do the scaling on your end. )", + "instillShortDescription": "a list of strings that are potential classes for inputs.", + "instillUIOrder": 0, + "instillUpstreamTypes": [ + "value", + "reference" + ], + "items": { + "title": "candidate_label", + "type": "string" + }, + "title": "Candidate Labels", + "type": "array" + }, + "multi_label": { + "description": "Boolean that is set to True if classes can overlap", + "instillAcceptFormats": [ + "boolean" + ], + "instillUIOrder": 1, + "instillUpstreamTypes": [ + "value", + "reference" + ], + "title": "Multi Label", + "type": "boolean" + } + }, + "required": [ + "candidate_labels" + ], + "title": "Parameters", + "type": "object" + } + }, + "required": [ + "inputs", + "parameters" + ], + "title": "Input", + "type": "object" + }, + "output": { + "instillUIOrder": 0, + "properties": { + "labels": { + "description": "The list of strings for labels that you sent (in order)", + "instillUIOrder": 1, + "items": { + "instillFormat": "string", + "type": "string" + }, + "title": "Labels", + "type": "array" + }, + "scores": { + "description": "a list of floats that correspond the the probability of label, in the same order as labels.", + "instillUIOrder": 0, + "items": { + "instillFormat": "number", + "type": "number" + }, + "title": "Scores", + "type": "array" + }, + "sequence": { + "description": "The string sent as an input", + "instillFormat": "string", + "instillUIMultiline": true, + "instillUIOrder": 1, + "title": "Sequence", + "type": "string" + } + }, + "required": [ + "labels", + "scores" + ], + "title": "Output", + "type": "object" + } + } +} diff --git a/instill/resources/schema/jsons/image_definitions.json b/instill/resources/schema/jsons/image_definitions.json new file mode 100644 index 0000000..1cdbccd --- /dev/null +++ b/instill/resources/schema/jsons/image_definitions.json @@ -0,0 +1,21 @@ +[ + { + "available_tasks": [ + "TASK_DRAW_CLASSIFICATION", + "TASK_DRAW_DETECTION", + "TASK_DRAW_KEYPOINT", + "TASK_DRAW_OCR", + "TASK_DRAW_INSTANCE_SEGMENTATION", + "TASK_DRAW_SEMANTIC_SEGMENTATION" + ], + "custom": false, + "documentation_url": "https://www.instill.tech/docs/latest/vdp/operators/image", + "icon": "image.svg", + "icon_url": "", + "id": "image", + "public": true, + "spec": {}, + "title": "Image", + "uid": "e9eb8fc8-f249-4e11-ad50-5035d79ffc18" + } +] diff --git a/instill/resources/schema/jsons/image_task_draw_classification_input.json b/instill/resources/schema/jsons/image_task_draw_classification_input.json new file mode 100644 index 0000000..39016bc --- /dev/null +++ b/instill/resources/schema/jsons/image_task_draw_classification_input.json @@ -0,0 +1 @@ +{"description":"Input","instillUIOrder":0,"properties":{"category":{"$ref":"https://raw.githubusercontent.com/instill-ai/component/cdccadb78d0cd4551a43379924824c2b1b2bdfb9/schema.json#/$defs/instill_types/classification/properties/category","instillAcceptFormats":["string"],"instillUpstreamTypes":["value","reference","template"]},"image":{"description":"Input image","instillAcceptFormats":["image/*"],"instillUIOrder":0,"instillUpstreamTypes":["reference"],"title":"Image","type":"string"},"score":{"$ref":"https://raw.githubusercontent.com/instill-ai/component/cdccadb78d0cd4551a43379924824c2b1b2bdfb9/schema.json#/$defs/instill_types/classification/properties/score","instillAcceptFormats":["number","integer"],"instillUpstreamTypes":["value","reference"]},"showScore":{"description":"Show model confidence score on each instance","instillAcceptFormats":["boolean"],"instillUIOrder":0,"instillUpstreamTypes":["value","reference"],"title":"Show Score","type":"boolean"}},"required":["image","category","score"],"title":"Input","type":"object"} diff --git a/instill/resources/schema/jsons/image_task_draw_classification_output.json b/instill/resources/schema/jsons/image_task_draw_classification_output.json new file mode 100644 index 0000000..3148bd6 --- /dev/null +++ b/instill/resources/schema/jsons/image_task_draw_classification_output.json @@ -0,0 +1 @@ +{"description":"Output","instillEditOnNodeFields":["image"],"instillUIOrder":0,"properties":{"image":{"description":"Output image","instillFormat":"image/jpeg","instillUIOrder":0,"title":"Image","type":"string"}},"required":["image"],"title":"Output","type":"object"} diff --git a/instill/resources/schema/jsons/image_task_draw_detection_input.json b/instill/resources/schema/jsons/image_task_draw_detection_input.json new file mode 100644 index 0000000..23052da --- /dev/null +++ b/instill/resources/schema/jsons/image_task_draw_detection_input.json @@ -0,0 +1 @@ +{"description":"Input","instillUIOrder":0,"properties":{"image":{"description":"Input image","instillAcceptFormats":["image/*"],"instillUIOrder":0,"instillUpstreamTypes":["reference"],"title":"Image","type":"string"},"objects":{"$ref":"https://raw.githubusercontent.com/instill-ai/component/cdccadb78d0cd4551a43379924824c2b1b2bdfb9/schema.json#/$defs/instill_types/detection/properties/objects","instillAcceptFormats":["array:structured/detection_object"],"instillUpstreamTypes":["reference"]},"showScore":{"description":"Show model confidence score on each instance","instillAcceptFormats":["boolean"],"instillUIOrder":0,"instillUpstreamTypes":["value","reference"],"title":"Show Score","type":"boolean"}},"required":["image","objects"],"title":"Input","type":"object"} diff --git a/instill/resources/schema/jsons/image_task_draw_detection_output.json b/instill/resources/schema/jsons/image_task_draw_detection_output.json new file mode 100644 index 0000000..3148bd6 --- /dev/null +++ b/instill/resources/schema/jsons/image_task_draw_detection_output.json @@ -0,0 +1 @@ +{"description":"Output","instillEditOnNodeFields":["image"],"instillUIOrder":0,"properties":{"image":{"description":"Output image","instillFormat":"image/jpeg","instillUIOrder":0,"title":"Image","type":"string"}},"required":["image"],"title":"Output","type":"object"} diff --git a/instill/resources/schema/jsons/image_task_draw_instance_segmentation_input.json b/instill/resources/schema/jsons/image_task_draw_instance_segmentation_input.json new file mode 100644 index 0000000..dbb4362 --- /dev/null +++ b/instill/resources/schema/jsons/image_task_draw_instance_segmentation_input.json @@ -0,0 +1 @@ +{"description":"Input","instillUIOrder":0,"properties":{"image":{"description":"Input image","instillAcceptFormats":["image/*"],"instillUIOrder":0,"instillUpstreamTypes":["reference"],"title":"Image","type":"string"},"objects":{"$ref":"https://raw.githubusercontent.com/instill-ai/component/cdccadb78d0cd4551a43379924824c2b1b2bdfb9/schema.json#/$defs/instill_types/instance_segmentation/properties/objects","instillAcceptFormats":["array:structured/instance_segmentation_object"],"instillUpstreamTypes":["reference"]},"showScore":{"description":"Show model confidence score on each instance","instillAcceptFormats":["boolean"],"instillUIOrder":0,"instillUpstreamTypes":["value","reference"],"title":"Show Score","type":"boolean"}},"required":["image","objects"],"title":"Input","type":"object"} diff --git a/instill/resources/schema/jsons/image_task_draw_instance_segmentation_output.json b/instill/resources/schema/jsons/image_task_draw_instance_segmentation_output.json new file mode 100644 index 0000000..3148bd6 --- /dev/null +++ b/instill/resources/schema/jsons/image_task_draw_instance_segmentation_output.json @@ -0,0 +1 @@ +{"description":"Output","instillEditOnNodeFields":["image"],"instillUIOrder":0,"properties":{"image":{"description":"Output image","instillFormat":"image/jpeg","instillUIOrder":0,"title":"Image","type":"string"}},"required":["image"],"title":"Output","type":"object"} diff --git a/instill/resources/schema/jsons/image_task_draw_keypoint_input.json b/instill/resources/schema/jsons/image_task_draw_keypoint_input.json new file mode 100644 index 0000000..98e1376 --- /dev/null +++ b/instill/resources/schema/jsons/image_task_draw_keypoint_input.json @@ -0,0 +1 @@ +{"description":"Input","instillUIOrder":0,"properties":{"image":{"description":"Input image","instillAcceptFormats":["image/*"],"instillUIOrder":0,"instillUpstreamTypes":["reference"],"title":"Image","type":"string"},"objects":{"$ref":"https://raw.githubusercontent.com/instill-ai/component/cdccadb78d0cd4551a43379924824c2b1b2bdfb9/schema.json#/$defs/instill_types/keypoint/properties/objects","instillAcceptFormats":["array:structured/keypoint_object"],"instillUpstreamTypes":["reference"]},"showScore":{"description":"Show model confidence score on each instance","instillAcceptFormats":["boolean"],"instillUIOrder":0,"instillUpstreamTypes":["value","reference"],"title":"Show Score","type":"boolean"}},"required":["image","objects"],"title":"Input","type":"object"} diff --git a/instill/resources/schema/jsons/image_task_draw_keypoint_output.json b/instill/resources/schema/jsons/image_task_draw_keypoint_output.json new file mode 100644 index 0000000..3148bd6 --- /dev/null +++ b/instill/resources/schema/jsons/image_task_draw_keypoint_output.json @@ -0,0 +1 @@ +{"description":"Output","instillEditOnNodeFields":["image"],"instillUIOrder":0,"properties":{"image":{"description":"Output image","instillFormat":"image/jpeg","instillUIOrder":0,"title":"Image","type":"string"}},"required":["image"],"title":"Output","type":"object"} diff --git a/instill/resources/schema/jsons/image_task_draw_ocr_input.json b/instill/resources/schema/jsons/image_task_draw_ocr_input.json new file mode 100644 index 0000000..182c335 --- /dev/null +++ b/instill/resources/schema/jsons/image_task_draw_ocr_input.json @@ -0,0 +1 @@ +{"description":"Input","instillUIOrder":0,"properties":{"image":{"description":"Input image","instillAcceptFormats":["image/*"],"instillUIOrder":0,"instillUpstreamTypes":["reference"],"title":"Image","type":"string"},"objects":{"$ref":"https://raw.githubusercontent.com/instill-ai/component/cdccadb78d0cd4551a43379924824c2b1b2bdfb9/schema.json#/$defs/instill_types/ocr/properties/objects","instillAcceptFormats":["array:structured/ocr_object"],"instillUpstreamTypes":["reference"]},"showScore":{"description":"Show model confidence score on each instance","instillAcceptFormats":["boolean"],"instillUIOrder":0,"instillUpstreamTypes":["value","reference"],"title":"Show Score","type":"boolean"}},"required":["image","objects"],"title":"Input","type":"object"} diff --git a/instill/resources/schema/jsons/image_task_draw_ocr_output.json b/instill/resources/schema/jsons/image_task_draw_ocr_output.json new file mode 100644 index 0000000..3148bd6 --- /dev/null +++ b/instill/resources/schema/jsons/image_task_draw_ocr_output.json @@ -0,0 +1 @@ +{"description":"Output","instillEditOnNodeFields":["image"],"instillUIOrder":0,"properties":{"image":{"description":"Output image","instillFormat":"image/jpeg","instillUIOrder":0,"title":"Image","type":"string"}},"required":["image"],"title":"Output","type":"object"} diff --git a/instill/resources/schema/jsons/image_task_draw_semantic_segmentation_input.json b/instill/resources/schema/jsons/image_task_draw_semantic_segmentation_input.json new file mode 100644 index 0000000..40e76c1 --- /dev/null +++ b/instill/resources/schema/jsons/image_task_draw_semantic_segmentation_input.json @@ -0,0 +1 @@ +{"description":"Input","instillUIOrder":0,"properties":{"image":{"description":"Input image","instillAcceptFormats":["image/*"],"instillUIOrder":0,"instillUpstreamTypes":["reference"],"title":"Image","type":"string"},"showScore":{"description":"Show model confidence score on each instance","instillAcceptFormats":["boolean"],"instillUIOrder":0,"instillUpstreamTypes":["value","reference"],"title":"Show Score","type":"boolean"},"stuffs":{"$ref":"https://raw.githubusercontent.com/instill-ai/component/cdccadb78d0cd4551a43379924824c2b1b2bdfb9/schema.json#/$defs/instill_types/semantic_segmentation/properties/stuffs","instillAcceptFormats":["array:structured/semantic_segmentation_stuff"],"instillUpstreamTypes":["reference"]}},"required":["image","stuffs"],"title":"Input","type":"object"} diff --git a/instill/resources/schema/jsons/image_task_draw_semantic_segmentation_output.json b/instill/resources/schema/jsons/image_task_draw_semantic_segmentation_output.json new file mode 100644 index 0000000..3148bd6 --- /dev/null +++ b/instill/resources/schema/jsons/image_task_draw_semantic_segmentation_output.json @@ -0,0 +1 @@ +{"description":"Output","instillEditOnNodeFields":["image"],"instillUIOrder":0,"properties":{"image":{"description":"Output image","instillFormat":"image/jpeg","instillUIOrder":0,"title":"Image","type":"string"}},"required":["image"],"title":"Output","type":"object"} diff --git a/instill/resources/schema/jsons/image_tasks.json b/instill/resources/schema/jsons/image_tasks.json new file mode 100644 index 0000000..daa7173 --- /dev/null +++ b/instill/resources/schema/jsons/image_tasks.json @@ -0,0 +1,430 @@ +{ + "TASK_DRAW_CLASSIFICATION": { + "input": { + "description": "Input", + "instillUIOrder": 0, + "properties": { + "category": { + "$ref": "https://raw.githubusercontent.com/instill-ai/component/cdccadb78d0cd4551a43379924824c2b1b2bdfb9/schema.json#/$defs/instill_types/classification/properties/category", + "instillAcceptFormats": [ + "string" + ], + "instillUpstreamTypes": [ + "value", + "reference", + "template" + ] + }, + "image": { + "description": "Input image", + "instillAcceptFormats": [ + "image/*" + ], + "instillUIOrder": 0, + "instillUpstreamTypes": [ + "reference" + ], + "title": "Image", + "type": "string" + }, + "score": { + "$ref": "https://raw.githubusercontent.com/instill-ai/component/cdccadb78d0cd4551a43379924824c2b1b2bdfb9/schema.json#/$defs/instill_types/classification/properties/score", + "instillAcceptFormats": [ + "number", + "integer" + ], + "instillUpstreamTypes": [ + "value", + "reference" + ] + }, + "showScore": { + "description": "Show model confidence score on each instance", + "instillAcceptFormats": [ + "boolean" + ], + "instillUIOrder": 0, + "instillUpstreamTypes": [ + "value", + "reference" + ], + "title": "Show Score", + "type": "boolean" + } + }, + "required": [ + "image", + "category", + "score" + ], + "title": "Input", + "type": "object" + }, + "output": { + "description": "Output", + "instillEditOnNodeFields": [ + "image" + ], + "instillUIOrder": 0, + "properties": { + "image": { + "description": "Output image", + "instillFormat": "image/jpeg", + "instillUIOrder": 0, + "title": "Image", + "type": "string" + } + }, + "required": [ + "image" + ], + "title": "Output", + "type": "object" + } + }, + "TASK_DRAW_DETECTION": { + "input": { + "description": "Input", + "instillUIOrder": 0, + "properties": { + "image": { + "description": "Input image", + "instillAcceptFormats": [ + "image/*" + ], + "instillUIOrder": 0, + "instillUpstreamTypes": [ + "reference" + ], + "title": "Image", + "type": "string" + }, + "objects": { + "$ref": "https://raw.githubusercontent.com/instill-ai/component/cdccadb78d0cd4551a43379924824c2b1b2bdfb9/schema.json#/$defs/instill_types/detection/properties/objects", + "instillAcceptFormats": [ + "array:structured/detection_object" + ], + "instillUpstreamTypes": [ + "reference" + ] + }, + "showScore": { + "description": "Show model confidence score on each instance", + "instillAcceptFormats": [ + "boolean" + ], + "instillUIOrder": 0, + "instillUpstreamTypes": [ + "value", + "reference" + ], + "title": "Show Score", + "type": "boolean" + } + }, + "required": [ + "image", + "objects" + ], + "title": "Input", + "type": "object" + }, + "output": { + "description": "Output", + "instillEditOnNodeFields": [ + "image" + ], + "instillUIOrder": 0, + "properties": { + "image": { + "description": "Output image", + "instillFormat": "image/jpeg", + "instillUIOrder": 0, + "title": "Image", + "type": "string" + } + }, + "required": [ + "image" + ], + "title": "Output", + "type": "object" + } + }, + "TASK_DRAW_INSTANCE_SEGMENTATION": { + "input": { + "description": "Input", + "instillUIOrder": 0, + "properties": { + "image": { + "description": "Input image", + "instillAcceptFormats": [ + "image/*" + ], + "instillUIOrder": 0, + "instillUpstreamTypes": [ + "reference" + ], + "title": "Image", + "type": "string" + }, + "objects": { + "$ref": "https://raw.githubusercontent.com/instill-ai/component/cdccadb78d0cd4551a43379924824c2b1b2bdfb9/schema.json#/$defs/instill_types/instance_segmentation/properties/objects", + "instillAcceptFormats": [ + "array:structured/instance_segmentation_object" + ], + "instillUpstreamTypes": [ + "reference" + ] + }, + "showScore": { + "description": "Show model confidence score on each instance", + "instillAcceptFormats": [ + "boolean" + ], + "instillUIOrder": 0, + "instillUpstreamTypes": [ + "value", + "reference" + ], + "title": "Show Score", + "type": "boolean" + } + }, + "required": [ + "image", + "objects" + ], + "title": "Input", + "type": "object" + }, + "output": { + "description": "Output", + "instillEditOnNodeFields": [ + "image" + ], + "instillUIOrder": 0, + "properties": { + "image": { + "description": "Output image", + "instillFormat": "image/jpeg", + "instillUIOrder": 0, + "title": "Image", + "type": "string" + } + }, + "required": [ + "image" + ], + "title": "Output", + "type": "object" + } + }, + "TASK_DRAW_KEYPOINT": { + "input": { + "description": "Input", + "instillUIOrder": 0, + "properties": { + "image": { + "description": "Input image", + "instillAcceptFormats": [ + "image/*" + ], + "instillUIOrder": 0, + "instillUpstreamTypes": [ + "reference" + ], + "title": "Image", + "type": "string" + }, + "objects": { + "$ref": "https://raw.githubusercontent.com/instill-ai/component/cdccadb78d0cd4551a43379924824c2b1b2bdfb9/schema.json#/$defs/instill_types/keypoint/properties/objects", + "instillAcceptFormats": [ + "array:structured/keypoint_object" + ], + "instillUpstreamTypes": [ + "reference" + ] + }, + "showScore": { + "description": "Show model confidence score on each instance", + "instillAcceptFormats": [ + "boolean" + ], + "instillUIOrder": 0, + "instillUpstreamTypes": [ + "value", + "reference" + ], + "title": "Show Score", + "type": "boolean" + } + }, + "required": [ + "image", + "objects" + ], + "title": "Input", + "type": "object" + }, + "output": { + "description": "Output", + "instillEditOnNodeFields": [ + "image" + ], + "instillUIOrder": 0, + "properties": { + "image": { + "description": "Output image", + "instillFormat": "image/jpeg", + "instillUIOrder": 0, + "title": "Image", + "type": "string" + } + }, + "required": [ + "image" + ], + "title": "Output", + "type": "object" + } + }, + "TASK_DRAW_OCR": { + "input": { + "description": "Input", + "instillUIOrder": 0, + "properties": { + "image": { + "description": "Input image", + "instillAcceptFormats": [ + "image/*" + ], + "instillUIOrder": 0, + "instillUpstreamTypes": [ + "reference" + ], + "title": "Image", + "type": "string" + }, + "objects": { + "$ref": "https://raw.githubusercontent.com/instill-ai/component/cdccadb78d0cd4551a43379924824c2b1b2bdfb9/schema.json#/$defs/instill_types/ocr/properties/objects", + "instillAcceptFormats": [ + "array:structured/ocr_object" + ], + "instillUpstreamTypes": [ + "reference" + ] + }, + "showScore": { + "description": "Show model confidence score on each instance", + "instillAcceptFormats": [ + "boolean" + ], + "instillUIOrder": 0, + "instillUpstreamTypes": [ + "value", + "reference" + ], + "title": "Show Score", + "type": "boolean" + } + }, + "required": [ + "image", + "objects" + ], + "title": "Input", + "type": "object" + }, + "output": { + "description": "Output", + "instillEditOnNodeFields": [ + "image" + ], + "instillUIOrder": 0, + "properties": { + "image": { + "description": "Output image", + "instillFormat": "image/jpeg", + "instillUIOrder": 0, + "title": "Image", + "type": "string" + } + }, + "required": [ + "image" + ], + "title": "Output", + "type": "object" + } + }, + "TASK_DRAW_SEMANTIC_SEGMENTATION": { + "input": { + "description": "Input", + "instillUIOrder": 0, + "properties": { + "image": { + "description": "Input image", + "instillAcceptFormats": [ + "image/*" + ], + "instillUIOrder": 0, + "instillUpstreamTypes": [ + "reference" + ], + "title": "Image", + "type": "string" + }, + "showScore": { + "description": "Show model confidence score on each instance", + "instillAcceptFormats": [ + "boolean" + ], + "instillUIOrder": 0, + "instillUpstreamTypes": [ + "value", + "reference" + ], + "title": "Show Score", + "type": "boolean" + }, + "stuffs": { + "$ref": "https://raw.githubusercontent.com/instill-ai/component/cdccadb78d0cd4551a43379924824c2b1b2bdfb9/schema.json#/$defs/instill_types/semantic_segmentation/properties/stuffs", + "instillAcceptFormats": [ + "array:structured/semantic_segmentation_stuff" + ], + "instillUpstreamTypes": [ + "reference" + ] + } + }, + "required": [ + "image", + "stuffs" + ], + "title": "Input", + "type": "object" + }, + "output": { + "description": "Output", + "instillEditOnNodeFields": [ + "image" + ], + "instillUIOrder": 0, + "properties": { + "image": { + "description": "Output image", + "instillFormat": "image/jpeg", + "instillUIOrder": 0, + "title": "Image", + "type": "string" + } + }, + "required": [ + "image" + ], + "title": "Output", + "type": "object" + } + } +} diff --git a/instill/resources/schema/jsons/instill_definitions.json b/instill/resources/schema/jsons/instill_definitions.json new file mode 100644 index 0000000..f95b2ce --- /dev/null +++ b/instill/resources/schema/jsons/instill_definitions.json @@ -0,0 +1 @@ +{ "$schema": "http://json-schema.org/draft-07/schema#", "additionalProperties": true, "oneOf": [ { "properties": { "mode": { "const": "Internal Mode" } } }, { "properties": { "api_token": { "description": "To access models on Instill Core/Cloud, enter your Instill Core/Cloud API Token. You can find your tokens by visiting your Console's Settings > API Tokens page.", "instillCredentialField": true, "instillUIOrder": 0, "title": "API Token", "type": "string" }, "mode": { "const": "External Mode" }, "server_url": { "default": "https://api.instill.tech", "description": "Base URL for the Instill Cloud API. To access models on Instill Cloud, use the base URL `https://api.instill.tech`. To access models on your local Instill Core, use the base URL `http://api-gateway:8080`.", "instillUIOrder": 1, "title": "Server URL", "type": "string" } } } ], "required": [ "api_token", "server_url" ], "title": "Instill Model Connector", "type": "object" } diff --git a/instill/resources/schema/jsons/instill_task_classification_input.json b/instill/resources/schema/jsons/instill_task_classification_input.json new file mode 100644 index 0000000..7b703ae --- /dev/null +++ b/instill/resources/schema/jsons/instill_task_classification_input.json @@ -0,0 +1 @@ +{"$ref":"#/$defs/common","type":"object","$defs":{"common":{"description":"Input","instillEditOnNodeFields":["image_base64","model_namespace","model_id"],"instillUIOrder":0,"properties":{"image_base64":{"description":"Image base64","instillAcceptFormats":["image/*"],"instillUIOrder":2,"instillUpstreamTypes":["reference"],"title":"Image","type":"string"},"model_id":{"description":"ID of the Instill Model model to be used.","instillAcceptFormats":["string"],"instillUIOrder":1,"instillUpstreamTypes":["value","reference","template"],"title":"Model ID","type":"string"},"model_namespace":{"description":"Namespace of the Instill Model model to be used.","instillAcceptFormats":["string"],"instillUIOrder":0,"instillUpstreamTypes":["value","reference","template"],"title":"Model Namespace","type":"string"}},"required":["image_base64","model_namespace","model_id"],"title":"Input","type":"object"},"extra_params":{"instillAcceptFormats":["array:object"],"instillShortDescription":"Extra Params","instillUIOrder":10,"instillUpstreamTypes":["value","reference"],"items":{"properties":{"param_name":{"instillFormat":"string","instillUIMultiline":true,"instillUIOrder":0,"title":"Param Name","type":"string"},"param_value":{"instillFormat":"string","instillUIOrder":1,"title":"Param Value","type":"string"}},"required":["param_name","param_value"],"title":"Param","type":"object"},"title":"Extra Params","type":"array"}}} diff --git a/instill/resources/schema/jsons/instill_task_classification_output.json b/instill/resources/schema/jsons/instill_task_classification_output.json new file mode 100644 index 0000000..fc94a16 --- /dev/null +++ b/instill/resources/schema/jsons/instill_task_classification_output.json @@ -0,0 +1 @@ +{"$ref":"https://raw.githubusercontent.com/instill-ai/component/cdccadb78d0cd4551a43379924824c2b1b2bdfb9/schema.json#/$defs/instill_types/classification","description":"Output","instillUIOrder":0,"title":"Output","type":"object","$defs":{"common":{"description":"Input","instillEditOnNodeFields":["image_base64","model_namespace","model_id"],"instillUIOrder":0,"properties":{"image_base64":{"description":"Image base64","instillAcceptFormats":["image/*"],"instillUIOrder":2,"instillUpstreamTypes":["reference"],"title":"Image","type":"string"},"model_id":{"description":"ID of the Instill Model model to be used.","instillAcceptFormats":["string"],"instillUIOrder":1,"instillUpstreamTypes":["value","reference","template"],"title":"Model ID","type":"string"},"model_namespace":{"description":"Namespace of the Instill Model model to be used.","instillAcceptFormats":["string"],"instillUIOrder":0,"instillUpstreamTypes":["value","reference","template"],"title":"Model Namespace","type":"string"}},"required":["image_base64","model_namespace","model_id"],"title":"Input","type":"object"},"extra_params":{"instillAcceptFormats":["array:object"],"instillShortDescription":"Extra Params","instillUIOrder":10,"instillUpstreamTypes":["value","reference"],"items":{"properties":{"param_name":{"instillFormat":"string","instillUIMultiline":true,"instillUIOrder":0,"title":"Param Name","type":"string"},"param_value":{"instillFormat":"string","instillUIOrder":1,"title":"Param Value","type":"string"}},"required":["param_name","param_value"],"title":"Param","type":"object"},"title":"Extra Params","type":"array"}}} diff --git a/instill/resources/schema/jsons/instill_task_detection_input.json b/instill/resources/schema/jsons/instill_task_detection_input.json new file mode 100644 index 0000000..7b703ae --- /dev/null +++ b/instill/resources/schema/jsons/instill_task_detection_input.json @@ -0,0 +1 @@ +{"$ref":"#/$defs/common","type":"object","$defs":{"common":{"description":"Input","instillEditOnNodeFields":["image_base64","model_namespace","model_id"],"instillUIOrder":0,"properties":{"image_base64":{"description":"Image base64","instillAcceptFormats":["image/*"],"instillUIOrder":2,"instillUpstreamTypes":["reference"],"title":"Image","type":"string"},"model_id":{"description":"ID of the Instill Model model to be used.","instillAcceptFormats":["string"],"instillUIOrder":1,"instillUpstreamTypes":["value","reference","template"],"title":"Model ID","type":"string"},"model_namespace":{"description":"Namespace of the Instill Model model to be used.","instillAcceptFormats":["string"],"instillUIOrder":0,"instillUpstreamTypes":["value","reference","template"],"title":"Model Namespace","type":"string"}},"required":["image_base64","model_namespace","model_id"],"title":"Input","type":"object"},"extra_params":{"instillAcceptFormats":["array:object"],"instillShortDescription":"Extra Params","instillUIOrder":10,"instillUpstreamTypes":["value","reference"],"items":{"properties":{"param_name":{"instillFormat":"string","instillUIMultiline":true,"instillUIOrder":0,"title":"Param Name","type":"string"},"param_value":{"instillFormat":"string","instillUIOrder":1,"title":"Param Value","type":"string"}},"required":["param_name","param_value"],"title":"Param","type":"object"},"title":"Extra Params","type":"array"}}} diff --git a/instill/resources/schema/jsons/instill_task_detection_output.json b/instill/resources/schema/jsons/instill_task_detection_output.json new file mode 100644 index 0000000..9900aca --- /dev/null +++ b/instill/resources/schema/jsons/instill_task_detection_output.json @@ -0,0 +1 @@ +{"$ref":"https://raw.githubusercontent.com/instill-ai/component/cdccadb78d0cd4551a43379924824c2b1b2bdfb9/schema.json#/$defs/instill_types/detection","description":"Output","instillUIOrder":0,"title":"Output","type":"object","$defs":{"common":{"description":"Input","instillEditOnNodeFields":["image_base64","model_namespace","model_id"],"instillUIOrder":0,"properties":{"image_base64":{"description":"Image base64","instillAcceptFormats":["image/*"],"instillUIOrder":2,"instillUpstreamTypes":["reference"],"title":"Image","type":"string"},"model_id":{"description":"ID of the Instill Model model to be used.","instillAcceptFormats":["string"],"instillUIOrder":1,"instillUpstreamTypes":["value","reference","template"],"title":"Model ID","type":"string"},"model_namespace":{"description":"Namespace of the Instill Model model to be used.","instillAcceptFormats":["string"],"instillUIOrder":0,"instillUpstreamTypes":["value","reference","template"],"title":"Model Namespace","type":"string"}},"required":["image_base64","model_namespace","model_id"],"title":"Input","type":"object"},"extra_params":{"instillAcceptFormats":["array:object"],"instillShortDescription":"Extra Params","instillUIOrder":10,"instillUpstreamTypes":["value","reference"],"items":{"properties":{"param_name":{"instillFormat":"string","instillUIMultiline":true,"instillUIOrder":0,"title":"Param Name","type":"string"},"param_value":{"instillFormat":"string","instillUIOrder":1,"title":"Param Value","type":"string"}},"required":["param_name","param_value"],"title":"Param","type":"object"},"title":"Extra Params","type":"array"}}} diff --git a/instill/resources/schema/jsons/instill_task_image_to_image_input.json b/instill/resources/schema/jsons/instill_task_image_to_image_input.json new file mode 100644 index 0000000..a6e068e --- /dev/null +++ b/instill/resources/schema/jsons/instill_task_image_to_image_input.json @@ -0,0 +1 @@ +{"description":"Input","instillEditOnNodeFields":["prompt","image_base64","model_namespace","model_id"],"instillUIOrder":0,"properties":{"cfg_scale":{"description":"The guidance scale, default is 7.5","instillAcceptFormats":["number","integer"],"instillUIOrder":4,"instillUpstreamTypes":["value","reference"],"title":"CFG Scale","type":"number"},"extra_params":{"$ref":"#/$defs/extra_params"},"image_base64":{"description":"The prompt image","instillAcceptFormats":["image/*"],"instillUIOrder":3,"instillUpstreamTypes":["reference"],"title":"Prompt Image","type":"string"},"model_id":{"description":"ID of the Instill Model model to be used.","instillAcceptFormats":["string"],"instillUIOrder":1,"instillUpstreamTypes":["value","reference","template"],"title":"Model ID","type":"string"},"model_namespace":{"description":"Namespace of the Instill Model model to be used.","instillAcceptFormats":["string"],"instillUIOrder":0,"instillUpstreamTypes":["value","reference","template"],"title":"Model Namespace","type":"string"},"prompt":{"description":"The prompt text","instillAcceptFormats":["string"],"instillUIMultiline":true,"instillUIOrder":2,"instillUpstreamTypes":["value","reference","template"],"title":"Prompt","type":"string"},"samples":{"description":"The number of generated samples, default is 1","instillAcceptFormats":["integer"],"instillUIOrder":5,"instillUpstreamTypes":["value","reference"],"title":"Samples","type":"integer"},"seed":{"description":"The seed","instillAcceptFormats":["integer"],"instillUIOrder":4,"instillUpstreamTypes":["value","reference"],"title":"Seed","type":"integer"},"top_k":{"default":10,"description":"Top k for sampling","instillAcceptFormats":["integer"],"instillUIOrder":5,"instillUpstreamTypes":["value","reference"],"title":"Top K","type":"integer"}},"required":["prompt","image_base64","model_namespace","model_id"],"title":"Input","type":"object","$defs":{"common":{"description":"Input","instillEditOnNodeFields":["image_base64","model_namespace","model_id"],"instillUIOrder":0,"properties":{"image_base64":{"description":"Image base64","instillAcceptFormats":["image/*"],"instillUIOrder":2,"instillUpstreamTypes":["reference"],"title":"Image","type":"string"},"model_id":{"description":"ID of the Instill Model model to be used.","instillAcceptFormats":["string"],"instillUIOrder":1,"instillUpstreamTypes":["value","reference","template"],"title":"Model ID","type":"string"},"model_namespace":{"description":"Namespace of the Instill Model model to be used.","instillAcceptFormats":["string"],"instillUIOrder":0,"instillUpstreamTypes":["value","reference","template"],"title":"Model Namespace","type":"string"}},"required":["image_base64","model_namespace","model_id"],"title":"Input","type":"object"},"extra_params":{"instillAcceptFormats":["array:object"],"instillShortDescription":"Extra Params","instillUIOrder":10,"instillUpstreamTypes":["value","reference"],"items":{"properties":{"param_name":{"instillFormat":"string","instillUIMultiline":true,"instillUIOrder":0,"title":"Param Name","type":"string"},"param_value":{"instillFormat":"string","instillUIOrder":1,"title":"Param Value","type":"string"}},"required":["param_name","param_value"],"title":"Param","type":"object"},"title":"Extra Params","type":"array"}}} diff --git a/instill/resources/schema/jsons/instill_task_image_to_image_output.json b/instill/resources/schema/jsons/instill_task_image_to_image_output.json new file mode 100644 index 0000000..dad9f49 --- /dev/null +++ b/instill/resources/schema/jsons/instill_task_image_to_image_output.json @@ -0,0 +1 @@ +{"description":"Output","instillEditOnNodeFields":["images"],"instillUIOrder":0,"properties":{"images":{"description":"Images","instillUIOrder":0,"items":{"instillFormat":"image/jpeg","type":"string"},"title":"Images","type":"array"}},"required":["images"],"title":"Output","type":"object","$defs":{"common":{"description":"Input","instillEditOnNodeFields":["image_base64","model_namespace","model_id"],"instillUIOrder":0,"properties":{"image_base64":{"description":"Image base64","instillAcceptFormats":["image/*"],"instillUIOrder":2,"instillUpstreamTypes":["reference"],"title":"Image","type":"string"},"model_id":{"description":"ID of the Instill Model model to be used.","instillAcceptFormats":["string"],"instillUIOrder":1,"instillUpstreamTypes":["value","reference","template"],"title":"Model ID","type":"string"},"model_namespace":{"description":"Namespace of the Instill Model model to be used.","instillAcceptFormats":["string"],"instillUIOrder":0,"instillUpstreamTypes":["value","reference","template"],"title":"Model Namespace","type":"string"}},"required":["image_base64","model_namespace","model_id"],"title":"Input","type":"object"},"extra_params":{"instillAcceptFormats":["array:object"],"instillShortDescription":"Extra Params","instillUIOrder":10,"instillUpstreamTypes":["value","reference"],"items":{"properties":{"param_name":{"instillFormat":"string","instillUIMultiline":true,"instillUIOrder":0,"title":"Param Name","type":"string"},"param_value":{"instillFormat":"string","instillUIOrder":1,"title":"Param Value","type":"string"}},"required":["param_name","param_value"],"title":"Param","type":"object"},"title":"Extra Params","type":"array"}}} diff --git a/instill/resources/schema/jsons/instill_task_instance_segmentation_input.json b/instill/resources/schema/jsons/instill_task_instance_segmentation_input.json new file mode 100644 index 0000000..7b703ae --- /dev/null +++ b/instill/resources/schema/jsons/instill_task_instance_segmentation_input.json @@ -0,0 +1 @@ +{"$ref":"#/$defs/common","type":"object","$defs":{"common":{"description":"Input","instillEditOnNodeFields":["image_base64","model_namespace","model_id"],"instillUIOrder":0,"properties":{"image_base64":{"description":"Image base64","instillAcceptFormats":["image/*"],"instillUIOrder":2,"instillUpstreamTypes":["reference"],"title":"Image","type":"string"},"model_id":{"description":"ID of the Instill Model model to be used.","instillAcceptFormats":["string"],"instillUIOrder":1,"instillUpstreamTypes":["value","reference","template"],"title":"Model ID","type":"string"},"model_namespace":{"description":"Namespace of the Instill Model model to be used.","instillAcceptFormats":["string"],"instillUIOrder":0,"instillUpstreamTypes":["value","reference","template"],"title":"Model Namespace","type":"string"}},"required":["image_base64","model_namespace","model_id"],"title":"Input","type":"object"},"extra_params":{"instillAcceptFormats":["array:object"],"instillShortDescription":"Extra Params","instillUIOrder":10,"instillUpstreamTypes":["value","reference"],"items":{"properties":{"param_name":{"instillFormat":"string","instillUIMultiline":true,"instillUIOrder":0,"title":"Param Name","type":"string"},"param_value":{"instillFormat":"string","instillUIOrder":1,"title":"Param Value","type":"string"}},"required":["param_name","param_value"],"title":"Param","type":"object"},"title":"Extra Params","type":"array"}}} diff --git a/instill/resources/schema/jsons/instill_task_instance_segmentation_output.json b/instill/resources/schema/jsons/instill_task_instance_segmentation_output.json new file mode 100644 index 0000000..ab1523f --- /dev/null +++ b/instill/resources/schema/jsons/instill_task_instance_segmentation_output.json @@ -0,0 +1 @@ +{"$ref":"https://raw.githubusercontent.com/instill-ai/component/cdccadb78d0cd4551a43379924824c2b1b2bdfb9/schema.json#/$defs/instill_types/instance_segmentation","description":"Output","instillUIOrder":0,"title":"Output","type":"object","$defs":{"common":{"description":"Input","instillEditOnNodeFields":["image_base64","model_namespace","model_id"],"instillUIOrder":0,"properties":{"image_base64":{"description":"Image base64","instillAcceptFormats":["image/*"],"instillUIOrder":2,"instillUpstreamTypes":["reference"],"title":"Image","type":"string"},"model_id":{"description":"ID of the Instill Model model to be used.","instillAcceptFormats":["string"],"instillUIOrder":1,"instillUpstreamTypes":["value","reference","template"],"title":"Model ID","type":"string"},"model_namespace":{"description":"Namespace of the Instill Model model to be used.","instillAcceptFormats":["string"],"instillUIOrder":0,"instillUpstreamTypes":["value","reference","template"],"title":"Model Namespace","type":"string"}},"required":["image_base64","model_namespace","model_id"],"title":"Input","type":"object"},"extra_params":{"instillAcceptFormats":["array:object"],"instillShortDescription":"Extra Params","instillUIOrder":10,"instillUpstreamTypes":["value","reference"],"items":{"properties":{"param_name":{"instillFormat":"string","instillUIMultiline":true,"instillUIOrder":0,"title":"Param Name","type":"string"},"param_value":{"instillFormat":"string","instillUIOrder":1,"title":"Param Value","type":"string"}},"required":["param_name","param_value"],"title":"Param","type":"object"},"title":"Extra Params","type":"array"}}} diff --git a/instill/resources/schema/jsons/instill_task_keypoint_input.json b/instill/resources/schema/jsons/instill_task_keypoint_input.json new file mode 100644 index 0000000..7b703ae --- /dev/null +++ b/instill/resources/schema/jsons/instill_task_keypoint_input.json @@ -0,0 +1 @@ +{"$ref":"#/$defs/common","type":"object","$defs":{"common":{"description":"Input","instillEditOnNodeFields":["image_base64","model_namespace","model_id"],"instillUIOrder":0,"properties":{"image_base64":{"description":"Image base64","instillAcceptFormats":["image/*"],"instillUIOrder":2,"instillUpstreamTypes":["reference"],"title":"Image","type":"string"},"model_id":{"description":"ID of the Instill Model model to be used.","instillAcceptFormats":["string"],"instillUIOrder":1,"instillUpstreamTypes":["value","reference","template"],"title":"Model ID","type":"string"},"model_namespace":{"description":"Namespace of the Instill Model model to be used.","instillAcceptFormats":["string"],"instillUIOrder":0,"instillUpstreamTypes":["value","reference","template"],"title":"Model Namespace","type":"string"}},"required":["image_base64","model_namespace","model_id"],"title":"Input","type":"object"},"extra_params":{"instillAcceptFormats":["array:object"],"instillShortDescription":"Extra Params","instillUIOrder":10,"instillUpstreamTypes":["value","reference"],"items":{"properties":{"param_name":{"instillFormat":"string","instillUIMultiline":true,"instillUIOrder":0,"title":"Param Name","type":"string"},"param_value":{"instillFormat":"string","instillUIOrder":1,"title":"Param Value","type":"string"}},"required":["param_name","param_value"],"title":"Param","type":"object"},"title":"Extra Params","type":"array"}}} diff --git a/instill/resources/schema/jsons/instill_task_keypoint_output.json b/instill/resources/schema/jsons/instill_task_keypoint_output.json new file mode 100644 index 0000000..82c0b1c --- /dev/null +++ b/instill/resources/schema/jsons/instill_task_keypoint_output.json @@ -0,0 +1 @@ +{"$ref":"https://raw.githubusercontent.com/instill-ai/component/cdccadb78d0cd4551a43379924824c2b1b2bdfb9/schema.json#/$defs/instill_types/keypoint","description":"Output","instillUIOrder":0,"title":"Output","type":"object","$defs":{"common":{"description":"Input","instillEditOnNodeFields":["image_base64","model_namespace","model_id"],"instillUIOrder":0,"properties":{"image_base64":{"description":"Image base64","instillAcceptFormats":["image/*"],"instillUIOrder":2,"instillUpstreamTypes":["reference"],"title":"Image","type":"string"},"model_id":{"description":"ID of the Instill Model model to be used.","instillAcceptFormats":["string"],"instillUIOrder":1,"instillUpstreamTypes":["value","reference","template"],"title":"Model ID","type":"string"},"model_namespace":{"description":"Namespace of the Instill Model model to be used.","instillAcceptFormats":["string"],"instillUIOrder":0,"instillUpstreamTypes":["value","reference","template"],"title":"Model Namespace","type":"string"}},"required":["image_base64","model_namespace","model_id"],"title":"Input","type":"object"},"extra_params":{"instillAcceptFormats":["array:object"],"instillShortDescription":"Extra Params","instillUIOrder":10,"instillUpstreamTypes":["value","reference"],"items":{"properties":{"param_name":{"instillFormat":"string","instillUIMultiline":true,"instillUIOrder":0,"title":"Param Name","type":"string"},"param_value":{"instillFormat":"string","instillUIOrder":1,"title":"Param Value","type":"string"}},"required":["param_name","param_value"],"title":"Param","type":"object"},"title":"Extra Params","type":"array"}}} diff --git a/instill/resources/schema/jsons/instill_task_ocr_input.json b/instill/resources/schema/jsons/instill_task_ocr_input.json new file mode 100644 index 0000000..7b703ae --- /dev/null +++ b/instill/resources/schema/jsons/instill_task_ocr_input.json @@ -0,0 +1 @@ +{"$ref":"#/$defs/common","type":"object","$defs":{"common":{"description":"Input","instillEditOnNodeFields":["image_base64","model_namespace","model_id"],"instillUIOrder":0,"properties":{"image_base64":{"description":"Image base64","instillAcceptFormats":["image/*"],"instillUIOrder":2,"instillUpstreamTypes":["reference"],"title":"Image","type":"string"},"model_id":{"description":"ID of the Instill Model model to be used.","instillAcceptFormats":["string"],"instillUIOrder":1,"instillUpstreamTypes":["value","reference","template"],"title":"Model ID","type":"string"},"model_namespace":{"description":"Namespace of the Instill Model model to be used.","instillAcceptFormats":["string"],"instillUIOrder":0,"instillUpstreamTypes":["value","reference","template"],"title":"Model Namespace","type":"string"}},"required":["image_base64","model_namespace","model_id"],"title":"Input","type":"object"},"extra_params":{"instillAcceptFormats":["array:object"],"instillShortDescription":"Extra Params","instillUIOrder":10,"instillUpstreamTypes":["value","reference"],"items":{"properties":{"param_name":{"instillFormat":"string","instillUIMultiline":true,"instillUIOrder":0,"title":"Param Name","type":"string"},"param_value":{"instillFormat":"string","instillUIOrder":1,"title":"Param Value","type":"string"}},"required":["param_name","param_value"],"title":"Param","type":"object"},"title":"Extra Params","type":"array"}}} diff --git a/instill/resources/schema/jsons/instill_task_ocr_output.json b/instill/resources/schema/jsons/instill_task_ocr_output.json new file mode 100644 index 0000000..857c54e --- /dev/null +++ b/instill/resources/schema/jsons/instill_task_ocr_output.json @@ -0,0 +1 @@ +{"$ref":"https://raw.githubusercontent.com/instill-ai/component/cdccadb78d0cd4551a43379924824c2b1b2bdfb9/schema.json#/$defs/instill_types/ocr","description":"Output","instillUIOrder":0,"title":"Output","type":"object","$defs":{"common":{"description":"Input","instillEditOnNodeFields":["image_base64","model_namespace","model_id"],"instillUIOrder":0,"properties":{"image_base64":{"description":"Image base64","instillAcceptFormats":["image/*"],"instillUIOrder":2,"instillUpstreamTypes":["reference"],"title":"Image","type":"string"},"model_id":{"description":"ID of the Instill Model model to be used.","instillAcceptFormats":["string"],"instillUIOrder":1,"instillUpstreamTypes":["value","reference","template"],"title":"Model ID","type":"string"},"model_namespace":{"description":"Namespace of the Instill Model model to be used.","instillAcceptFormats":["string"],"instillUIOrder":0,"instillUpstreamTypes":["value","reference","template"],"title":"Model Namespace","type":"string"}},"required":["image_base64","model_namespace","model_id"],"title":"Input","type":"object"},"extra_params":{"instillAcceptFormats":["array:object"],"instillShortDescription":"Extra Params","instillUIOrder":10,"instillUpstreamTypes":["value","reference"],"items":{"properties":{"param_name":{"instillFormat":"string","instillUIMultiline":true,"instillUIOrder":0,"title":"Param Name","type":"string"},"param_value":{"instillFormat":"string","instillUIOrder":1,"title":"Param Value","type":"string"}},"required":["param_name","param_value"],"title":"Param","type":"object"},"title":"Extra Params","type":"array"}}} diff --git a/instill/resources/schema/jsons/instill_task_semantic_segmentation_input.json b/instill/resources/schema/jsons/instill_task_semantic_segmentation_input.json new file mode 100644 index 0000000..7b703ae --- /dev/null +++ b/instill/resources/schema/jsons/instill_task_semantic_segmentation_input.json @@ -0,0 +1 @@ +{"$ref":"#/$defs/common","type":"object","$defs":{"common":{"description":"Input","instillEditOnNodeFields":["image_base64","model_namespace","model_id"],"instillUIOrder":0,"properties":{"image_base64":{"description":"Image base64","instillAcceptFormats":["image/*"],"instillUIOrder":2,"instillUpstreamTypes":["reference"],"title":"Image","type":"string"},"model_id":{"description":"ID of the Instill Model model to be used.","instillAcceptFormats":["string"],"instillUIOrder":1,"instillUpstreamTypes":["value","reference","template"],"title":"Model ID","type":"string"},"model_namespace":{"description":"Namespace of the Instill Model model to be used.","instillAcceptFormats":["string"],"instillUIOrder":0,"instillUpstreamTypes":["value","reference","template"],"title":"Model Namespace","type":"string"}},"required":["image_base64","model_namespace","model_id"],"title":"Input","type":"object"},"extra_params":{"instillAcceptFormats":["array:object"],"instillShortDescription":"Extra Params","instillUIOrder":10,"instillUpstreamTypes":["value","reference"],"items":{"properties":{"param_name":{"instillFormat":"string","instillUIMultiline":true,"instillUIOrder":0,"title":"Param Name","type":"string"},"param_value":{"instillFormat":"string","instillUIOrder":1,"title":"Param Value","type":"string"}},"required":["param_name","param_value"],"title":"Param","type":"object"},"title":"Extra Params","type":"array"}}} diff --git a/instill/resources/schema/jsons/instill_task_semantic_segmentation_output.json b/instill/resources/schema/jsons/instill_task_semantic_segmentation_output.json new file mode 100644 index 0000000..0c6dd53 --- /dev/null +++ b/instill/resources/schema/jsons/instill_task_semantic_segmentation_output.json @@ -0,0 +1 @@ +{"$ref":"https://raw.githubusercontent.com/instill-ai/component/cdccadb78d0cd4551a43379924824c2b1b2bdfb9/schema.json#/$defs/instill_types/semantic_segmentation","description":"Output","instillUIOrder":0,"title":"Output","type":"object","$defs":{"common":{"description":"Input","instillEditOnNodeFields":["image_base64","model_namespace","model_id"],"instillUIOrder":0,"properties":{"image_base64":{"description":"Image base64","instillAcceptFormats":["image/*"],"instillUIOrder":2,"instillUpstreamTypes":["reference"],"title":"Image","type":"string"},"model_id":{"description":"ID of the Instill Model model to be used.","instillAcceptFormats":["string"],"instillUIOrder":1,"instillUpstreamTypes":["value","reference","template"],"title":"Model ID","type":"string"},"model_namespace":{"description":"Namespace of the Instill Model model to be used.","instillAcceptFormats":["string"],"instillUIOrder":0,"instillUpstreamTypes":["value","reference","template"],"title":"Model Namespace","type":"string"}},"required":["image_base64","model_namespace","model_id"],"title":"Input","type":"object"},"extra_params":{"instillAcceptFormats":["array:object"],"instillShortDescription":"Extra Params","instillUIOrder":10,"instillUpstreamTypes":["value","reference"],"items":{"properties":{"param_name":{"instillFormat":"string","instillUIMultiline":true,"instillUIOrder":0,"title":"Param Name","type":"string"},"param_value":{"instillFormat":"string","instillUIOrder":1,"title":"Param Value","type":"string"}},"required":["param_name","param_value"],"title":"Param","type":"object"},"title":"Extra Params","type":"array"}}} diff --git a/instill/resources/schema/jsons/instill_task_text_generation_input.json b/instill/resources/schema/jsons/instill_task_text_generation_input.json new file mode 100644 index 0000000..05c6475 --- /dev/null +++ b/instill/resources/schema/jsons/instill_task_text_generation_input.json @@ -0,0 +1 @@ +{"description":"Input","instillEditOnNodeFields":["prompt","model_namespace","model_id"],"instillUIOrder":0,"properties":{"extra_params":{"$ref":"#/$defs/extra_params"},"max_new_tokens":{"default":50,"description":"The maximum number of tokens for model to generate","instillAcceptFormats":["integer"],"instillUIOrder":6,"instillUpstreamTypes":["value","reference"],"title":"Max new tokens","type":"integer"},"model_id":{"description":"ID of the Instill Model model to be used.","instillAcceptFormats":["string"],"instillUIOrder":1,"instillUpstreamTypes":["value","reference","template"],"title":"Model ID","type":"string"},"model_namespace":{"description":"Namespace of the Instill Model model to be used.","instillAcceptFormats":["string"],"instillUIOrder":0,"instillUpstreamTypes":["value","reference","template"],"title":"Model Namespace","type":"string"},"prompt":{"description":"The prompt text","instillAcceptFormats":["string"],"instillUIMultiline":true,"instillUIOrder":2,"instillUpstreamTypes":["value","reference","template"],"title":"Prompt","type":"string"},"seed":{"description":"The seed","instillAcceptFormats":["integer"],"instillUIOrder":4,"instillUpstreamTypes":["value","reference"],"title":"Seed","type":"integer"},"temperature":{"default":0.7,"description":"The temperature for sampling","instillAcceptFormats":["number"],"instillUIOrder":5,"instillUpstreamTypes":["value","reference"],"title":"Temperature","type":"number"},"top_k":{"default":10,"description":"Top k for sampling","instillAcceptFormats":["integer"],"instillUIOrder":5,"instillUpstreamTypes":["value","reference"],"title":"Top K","type":"integer"}},"required":["prompt","model_namespace","model_id"],"title":"Input","type":"object","$defs":{"common":{"description":"Input","instillEditOnNodeFields":["image_base64","model_namespace","model_id"],"instillUIOrder":0,"properties":{"image_base64":{"description":"Image base64","instillAcceptFormats":["image/*"],"instillUIOrder":2,"instillUpstreamTypes":["reference"],"title":"Image","type":"string"},"model_id":{"description":"ID of the Instill Model model to be used.","instillAcceptFormats":["string"],"instillUIOrder":1,"instillUpstreamTypes":["value","reference","template"],"title":"Model ID","type":"string"},"model_namespace":{"description":"Namespace of the Instill Model model to be used.","instillAcceptFormats":["string"],"instillUIOrder":0,"instillUpstreamTypes":["value","reference","template"],"title":"Model Namespace","type":"string"}},"required":["image_base64","model_namespace","model_id"],"title":"Input","type":"object"},"extra_params":{"instillAcceptFormats":["array:object"],"instillShortDescription":"Extra Params","instillUIOrder":10,"instillUpstreamTypes":["value","reference"],"items":{"properties":{"param_name":{"instillFormat":"string","instillUIMultiline":true,"instillUIOrder":0,"title":"Param Name","type":"string"},"param_value":{"instillFormat":"string","instillUIOrder":1,"title":"Param Value","type":"string"}},"required":["param_name","param_value"],"title":"Param","type":"object"},"title":"Extra Params","type":"array"}}} diff --git a/instill/resources/schema/jsons/instill_task_text_generation_output.json b/instill/resources/schema/jsons/instill_task_text_generation_output.json new file mode 100644 index 0000000..8a0fa41 --- /dev/null +++ b/instill/resources/schema/jsons/instill_task_text_generation_output.json @@ -0,0 +1 @@ +{"description":"Output","instillEditOnNodeFields":["text"],"instillUIOrder":0,"properties":{"text":{"description":"Text","instillFormat":"string","instillUIMultiline":true,"instillUIOrder":0,"title":"Text","type":"string"}},"required":["text"],"title":"Output","type":"object","$defs":{"common":{"description":"Input","instillEditOnNodeFields":["image_base64","model_namespace","model_id"],"instillUIOrder":0,"properties":{"image_base64":{"description":"Image base64","instillAcceptFormats":["image/*"],"instillUIOrder":2,"instillUpstreamTypes":["reference"],"title":"Image","type":"string"},"model_id":{"description":"ID of the Instill Model model to be used.","instillAcceptFormats":["string"],"instillUIOrder":1,"instillUpstreamTypes":["value","reference","template"],"title":"Model ID","type":"string"},"model_namespace":{"description":"Namespace of the Instill Model model to be used.","instillAcceptFormats":["string"],"instillUIOrder":0,"instillUpstreamTypes":["value","reference","template"],"title":"Model Namespace","type":"string"}},"required":["image_base64","model_namespace","model_id"],"title":"Input","type":"object"},"extra_params":{"instillAcceptFormats":["array:object"],"instillShortDescription":"Extra Params","instillUIOrder":10,"instillUpstreamTypes":["value","reference"],"items":{"properties":{"param_name":{"instillFormat":"string","instillUIMultiline":true,"instillUIOrder":0,"title":"Param Name","type":"string"},"param_value":{"instillFormat":"string","instillUIOrder":1,"title":"Param Value","type":"string"}},"required":["param_name","param_value"],"title":"Param","type":"object"},"title":"Extra Params","type":"array"}}} diff --git a/instill/resources/schema/jsons/instill_task_text_to_image_input.json b/instill/resources/schema/jsons/instill_task_text_to_image_input.json new file mode 100644 index 0000000..7ed3ce6 --- /dev/null +++ b/instill/resources/schema/jsons/instill_task_text_to_image_input.json @@ -0,0 +1 @@ +{"description":"Input","instillEditOnNodeFields":["prompt","model_namespace","model_id"],"instillUIOrder":0,"properties":{"cfg_scale":{"description":"The guidance scale, default is 7.5","instillAcceptFormats":["number","integer"],"instillUIOrder":4,"instillUpstreamTypes":["value","reference"],"title":"CFG Scale","type":"number"},"extra_params":{"$ref":"#/$defs/extra_params"},"model_id":{"description":"ID of the Instill Model model to be used.","instillAcceptFormats":["string"],"instillUIOrder":1,"instillUpstreamTypes":["value","reference","template"],"title":"Model ID","type":"string"},"model_namespace":{"description":"Namespace of the Instill Model model to be used.","instillAcceptFormats":["string"],"instillUIOrder":0,"instillUpstreamTypes":["value","reference","template"],"title":"Model Namespace","type":"string"},"prompt":{"description":"The prompt text","instillAcceptFormats":["string"],"instillUIMultiline":true,"instillUIOrder":2,"instillUpstreamTypes":["value","reference","template"],"title":"Prompt","type":"string"},"samples":{"description":"The number of generated samples, default is 1","instillAcceptFormats":["integer"],"instillUIOrder":5,"instillUpstreamTypes":["value","reference"],"title":"Samples","type":"integer"},"seed":{"description":"The seed, default is 0","instillAcceptFormats":["integer"],"instillUIOrder":6,"instillUpstreamTypes":["value","reference"],"title":"Seed","type":"integer"},"steps":{"description":"The steps, default is 5","instillAcceptFormats":["integer"],"instillUIOrder":7,"instillUpstreamTypes":["value","reference"],"title":"Steps","type":"integer"}},"required":["prompt","model_namespace","model_id"],"title":"Input","type":"object","$defs":{"common":{"description":"Input","instillEditOnNodeFields":["image_base64","model_namespace","model_id"],"instillUIOrder":0,"properties":{"image_base64":{"description":"Image base64","instillAcceptFormats":["image/*"],"instillUIOrder":2,"instillUpstreamTypes":["reference"],"title":"Image","type":"string"},"model_id":{"description":"ID of the Instill Model model to be used.","instillAcceptFormats":["string"],"instillUIOrder":1,"instillUpstreamTypes":["value","reference","template"],"title":"Model ID","type":"string"},"model_namespace":{"description":"Namespace of the Instill Model model to be used.","instillAcceptFormats":["string"],"instillUIOrder":0,"instillUpstreamTypes":["value","reference","template"],"title":"Model Namespace","type":"string"}},"required":["image_base64","model_namespace","model_id"],"title":"Input","type":"object"},"extra_params":{"instillAcceptFormats":["array:object"],"instillShortDescription":"Extra Params","instillUIOrder":10,"instillUpstreamTypes":["value","reference"],"items":{"properties":{"param_name":{"instillFormat":"string","instillUIMultiline":true,"instillUIOrder":0,"title":"Param Name","type":"string"},"param_value":{"instillFormat":"string","instillUIOrder":1,"title":"Param Value","type":"string"}},"required":["param_name","param_value"],"title":"Param","type":"object"},"title":"Extra Params","type":"array"}}} diff --git a/instill/resources/schema/jsons/instill_task_text_to_image_output.json b/instill/resources/schema/jsons/instill_task_text_to_image_output.json new file mode 100644 index 0000000..dad9f49 --- /dev/null +++ b/instill/resources/schema/jsons/instill_task_text_to_image_output.json @@ -0,0 +1 @@ +{"description":"Output","instillEditOnNodeFields":["images"],"instillUIOrder":0,"properties":{"images":{"description":"Images","instillUIOrder":0,"items":{"instillFormat":"image/jpeg","type":"string"},"title":"Images","type":"array"}},"required":["images"],"title":"Output","type":"object","$defs":{"common":{"description":"Input","instillEditOnNodeFields":["image_base64","model_namespace","model_id"],"instillUIOrder":0,"properties":{"image_base64":{"description":"Image base64","instillAcceptFormats":["image/*"],"instillUIOrder":2,"instillUpstreamTypes":["reference"],"title":"Image","type":"string"},"model_id":{"description":"ID of the Instill Model model to be used.","instillAcceptFormats":["string"],"instillUIOrder":1,"instillUpstreamTypes":["value","reference","template"],"title":"Model ID","type":"string"},"model_namespace":{"description":"Namespace of the Instill Model model to be used.","instillAcceptFormats":["string"],"instillUIOrder":0,"instillUpstreamTypes":["value","reference","template"],"title":"Model Namespace","type":"string"}},"required":["image_base64","model_namespace","model_id"],"title":"Input","type":"object"},"extra_params":{"instillAcceptFormats":["array:object"],"instillShortDescription":"Extra Params","instillUIOrder":10,"instillUpstreamTypes":["value","reference"],"items":{"properties":{"param_name":{"instillFormat":"string","instillUIMultiline":true,"instillUIOrder":0,"title":"Param Name","type":"string"},"param_value":{"instillFormat":"string","instillUIOrder":1,"title":"Param Value","type":"string"}},"required":["param_name","param_value"],"title":"Param","type":"object"},"title":"Extra Params","type":"array"}}} diff --git a/instill/resources/schema/jsons/instill_task_visual_question_answering_input.json b/instill/resources/schema/jsons/instill_task_visual_question_answering_input.json new file mode 100644 index 0000000..a0def82 --- /dev/null +++ b/instill/resources/schema/jsons/instill_task_visual_question_answering_input.json @@ -0,0 +1 @@ +{"description":"Input","instillEditOnNodeFields":["prompt","image_base64","model_namespace","model_id"],"instillUIOrder":0,"properties":{"extra_params":{"$ref":"#/$defs/extra_params"},"image_base64":{"description":"The prompt image","instillAcceptFormats":["image/*"],"instillUIOrder":3,"instillUpstreamTypes":["reference"],"title":"Prompt Image","type":"string"},"max_new_tokens":{"default":50,"description":"The maximum number of tokens for model to generate","instillAcceptFormats":["integer"],"instillUIOrder":6,"instillUpstreamTypes":["value","reference"],"title":"Max new tokens","type":"integer"},"model_id":{"description":"ID of the Instill Model model to be used.","instillAcceptFormats":["string"],"instillUIOrder":1,"instillUpstreamTypes":["value","reference","template"],"title":"Model ID","type":"string"},"model_namespace":{"description":"Namespace of the Instill Model model to be used.","instillAcceptFormats":["string"],"instillUIOrder":0,"instillUpstreamTypes":["value","reference","template"],"title":"Model Namespace","type":"string"},"prompt":{"description":"The prompt text","instillAcceptFormats":["string"],"instillUIMultiline":true,"instillUIOrder":2,"instillUpstreamTypes":["value","reference","template"],"title":"Prompt","type":"string"},"seed":{"description":"The seed","instillAcceptFormats":["integer"],"instillUIOrder":4,"instillUpstreamTypes":["value","reference"],"title":"Seed","type":"integer"},"temperature":{"default":0.7,"description":"The temperature for sampling","instillAcceptFormats":["number"],"instillUIOrder":5,"instillUpstreamTypes":["value","reference"],"title":"Temperature","type":"number"},"top_k":{"default":10,"description":"Top k for sampling","instillAcceptFormats":["integer"],"instillUIOrder":5,"instillUpstreamTypes":["value","reference"],"title":"Top K","type":"integer"}},"required":["prompt","image_base64","model_namespace","model_id"],"title":"Input","type":"object","$defs":{"common":{"description":"Input","instillEditOnNodeFields":["image_base64","model_namespace","model_id"],"instillUIOrder":0,"properties":{"image_base64":{"description":"Image base64","instillAcceptFormats":["image/*"],"instillUIOrder":2,"instillUpstreamTypes":["reference"],"title":"Image","type":"string"},"model_id":{"description":"ID of the Instill Model model to be used.","instillAcceptFormats":["string"],"instillUIOrder":1,"instillUpstreamTypes":["value","reference","template"],"title":"Model ID","type":"string"},"model_namespace":{"description":"Namespace of the Instill Model model to be used.","instillAcceptFormats":["string"],"instillUIOrder":0,"instillUpstreamTypes":["value","reference","template"],"title":"Model Namespace","type":"string"}},"required":["image_base64","model_namespace","model_id"],"title":"Input","type":"object"},"extra_params":{"instillAcceptFormats":["array:object"],"instillShortDescription":"Extra Params","instillUIOrder":10,"instillUpstreamTypes":["value","reference"],"items":{"properties":{"param_name":{"instillFormat":"string","instillUIMultiline":true,"instillUIOrder":0,"title":"Param Name","type":"string"},"param_value":{"instillFormat":"string","instillUIOrder":1,"title":"Param Value","type":"string"}},"required":["param_name","param_value"],"title":"Param","type":"object"},"title":"Extra Params","type":"array"}}} diff --git a/instill/resources/schema/jsons/instill_task_visual_question_answering_output.json b/instill/resources/schema/jsons/instill_task_visual_question_answering_output.json new file mode 100644 index 0000000..8a0fa41 --- /dev/null +++ b/instill/resources/schema/jsons/instill_task_visual_question_answering_output.json @@ -0,0 +1 @@ +{"description":"Output","instillEditOnNodeFields":["text"],"instillUIOrder":0,"properties":{"text":{"description":"Text","instillFormat":"string","instillUIMultiline":true,"instillUIOrder":0,"title":"Text","type":"string"}},"required":["text"],"title":"Output","type":"object","$defs":{"common":{"description":"Input","instillEditOnNodeFields":["image_base64","model_namespace","model_id"],"instillUIOrder":0,"properties":{"image_base64":{"description":"Image base64","instillAcceptFormats":["image/*"],"instillUIOrder":2,"instillUpstreamTypes":["reference"],"title":"Image","type":"string"},"model_id":{"description":"ID of the Instill Model model to be used.","instillAcceptFormats":["string"],"instillUIOrder":1,"instillUpstreamTypes":["value","reference","template"],"title":"Model ID","type":"string"},"model_namespace":{"description":"Namespace of the Instill Model model to be used.","instillAcceptFormats":["string"],"instillUIOrder":0,"instillUpstreamTypes":["value","reference","template"],"title":"Model Namespace","type":"string"}},"required":["image_base64","model_namespace","model_id"],"title":"Input","type":"object"},"extra_params":{"instillAcceptFormats":["array:object"],"instillShortDescription":"Extra Params","instillUIOrder":10,"instillUpstreamTypes":["value","reference"],"items":{"properties":{"param_name":{"instillFormat":"string","instillUIMultiline":true,"instillUIOrder":0,"title":"Param Name","type":"string"},"param_value":{"instillFormat":"string","instillUIOrder":1,"title":"Param Value","type":"string"}},"required":["param_name","param_value"],"title":"Param","type":"object"},"title":"Extra Params","type":"array"}}} diff --git a/instill/resources/schema/jsons/instill_tasks.json b/instill/resources/schema/jsons/instill_tasks.json new file mode 100644 index 0000000..89441f1 --- /dev/null +++ b/instill/resources/schema/jsons/instill_tasks.json @@ -0,0 +1,944 @@ +{ + "$defs": { + "common": { + "description": "Input", + "instillEditOnNodeFields": [ + "image_base64", + "model_namespace", + "model_id" + ], + "instillUIOrder": 0, + "properties": { + "image_base64": { + "description": "Image base64", + "instillAcceptFormats": [ + "image/*" + ], + "instillUIOrder": 2, + "instillUpstreamTypes": [ + "reference" + ], + "title": "Image", + "type": "string" + }, + "model_id": { + "description": "ID of the Instill Model model to be used.", + "instillAcceptFormats": [ + "string" + ], + "instillUIOrder": 1, + "instillUpstreamTypes": [ + "value", + "reference", + "template" + ], + "title": "Model ID", + "type": "string" + }, + "model_namespace": { + "description": "Namespace of the Instill Model model to be used.", + "instillAcceptFormats": [ + "string" + ], + "instillUIOrder": 0, + "instillUpstreamTypes": [ + "value", + "reference", + "template" + ], + "title": "Model Namespace", + "type": "string" + } + }, + "required": [ + "image_base64", + "model_namespace", + "model_id" + ], + "title": "Input", + "type": "object" + }, + "extra_params": { + "instillAcceptFormats": [ + "array:object" + ], + "instillShortDescription": "Extra Params", + "instillUIOrder": 10, + "instillUpstreamTypes": [ + "value", + "reference" + ], + "items": { + "properties": { + "param_name": { + "instillFormat": "string", + "instillUIMultiline": true, + "instillUIOrder": 0, + "title": "Param Name", + "type": "string" + }, + "param_value": { + "instillFormat": "string", + "instillUIOrder": 1, + "title": "Param Value", + "type": "string" + } + }, + "required": [ + "param_name", + "param_value" + ], + "title": "Param", + "type": "object" + }, + "title": "Extra Params", + "type": "array" + } + }, + "TASK_CLASSIFICATION": { + "input": { + "$ref": "#/$defs/common", + "type": "object" + }, + "output": { + "$ref": "https://raw.githubusercontent.com/instill-ai/component/cdccadb78d0cd4551a43379924824c2b1b2bdfb9/schema.json#/$defs/instill_types/classification", + "description": "Output", + "instillUIOrder": 0, + "title": "Output", + "type": "object" + } + }, + "TASK_DETECTION": { + "input": { + "$ref": "#/$defs/common", + "type": "object" + }, + "output": { + "$ref": "https://raw.githubusercontent.com/instill-ai/component/cdccadb78d0cd4551a43379924824c2b1b2bdfb9/schema.json#/$defs/instill_types/detection", + "description": "Output", + "instillUIOrder": 0, + "title": "Output", + "type": "object" + } + }, + "TASK_IMAGE_TO_IMAGE": { + "input": { + "description": "Input", + "instillEditOnNodeFields": [ + "prompt", + "image_base64", + "model_namespace", + "model_id" + ], + "instillUIOrder": 0, + "properties": { + "cfg_scale": { + "description": "The guidance scale, default is 7.5", + "instillAcceptFormats": [ + "number", + "integer" + ], + "instillUIOrder": 4, + "instillUpstreamTypes": [ + "value", + "reference" + ], + "title": "CFG Scale", + "type": "number" + }, + "extra_params": { + "$ref": "#/$defs/extra_params" + }, + "image_base64": { + "description": "The prompt image", + "instillAcceptFormats": [ + "image/*" + ], + "instillUIOrder": 3, + "instillUpstreamTypes": [ + "reference" + ], + "title": "Prompt Image", + "type": "string" + }, + "model_id": { + "description": "ID of the Instill Model model to be used.", + "instillAcceptFormats": [ + "string" + ], + "instillUIOrder": 1, + "instillUpstreamTypes": [ + "value", + "reference", + "template" + ], + "title": "Model ID", + "type": "string" + }, + "model_namespace": { + "description": "Namespace of the Instill Model model to be used.", + "instillAcceptFormats": [ + "string" + ], + "instillUIOrder": 0, + "instillUpstreamTypes": [ + "value", + "reference", + "template" + ], + "title": "Model Namespace", + "type": "string" + }, + "prompt": { + "description": "The prompt text", + "instillAcceptFormats": [ + "string" + ], + "instillUIMultiline": true, + "instillUIOrder": 2, + "instillUpstreamTypes": [ + "value", + "reference", + "template" + ], + "title": "Prompt", + "type": "string" + }, + "samples": { + "description": "The number of generated samples, default is 1", + "instillAcceptFormats": [ + "integer" + ], + "instillUIOrder": 5, + "instillUpstreamTypes": [ + "value", + "reference" + ], + "title": "Samples", + "type": "integer" + }, + "seed": { + "description": "The seed", + "instillAcceptFormats": [ + "integer" + ], + "instillUIOrder": 4, + "instillUpstreamTypes": [ + "value", + "reference" + ], + "title": "Seed", + "type": "integer" + }, + "top_k": { + "default": 10, + "description": "Top k for sampling", + "instillAcceptFormats": [ + "integer" + ], + "instillUIOrder": 5, + "instillUpstreamTypes": [ + "value", + "reference" + ], + "title": "Top K", + "type": "integer" + } + }, + "required": [ + "prompt", + "image_base64", + "model_namespace", + "model_id" + ], + "title": "Input", + "type": "object" + }, + "output": { + "description": "Output", + "instillEditOnNodeFields": [ + "images" + ], + "instillUIOrder": 0, + "properties": { + "images": { + "description": "Images", + "instillUIOrder": 0, + "items": { + "instillFormat": "image/jpeg", + "type": "string" + }, + "title": "Images", + "type": "array" + } + }, + "required": [ + "images" + ], + "title": "Output", + "type": "object" + } + }, + "TASK_INSTANCE_SEGMENTATION": { + "input": { + "$ref": "#/$defs/common", + "type": "object" + }, + "output": { + "$ref": "https://raw.githubusercontent.com/instill-ai/component/cdccadb78d0cd4551a43379924824c2b1b2bdfb9/schema.json#/$defs/instill_types/instance_segmentation", + "description": "Output", + "instillUIOrder": 0, + "title": "Output", + "type": "object" + } + }, + "TASK_KEYPOINT": { + "input": { + "$ref": "#/$defs/common", + "type": "object" + }, + "output": { + "$ref": "https://raw.githubusercontent.com/instill-ai/component/cdccadb78d0cd4551a43379924824c2b1b2bdfb9/schema.json#/$defs/instill_types/keypoint", + "description": "Output", + "instillUIOrder": 0, + "title": "Output", + "type": "object" + } + }, + "TASK_OCR": { + "input": { + "$ref": "#/$defs/common", + "type": "object" + }, + "output": { + "$ref": "https://raw.githubusercontent.com/instill-ai/component/cdccadb78d0cd4551a43379924824c2b1b2bdfb9/schema.json#/$defs/instill_types/ocr", + "description": "Output", + "instillUIOrder": 0, + "title": "Output", + "type": "object" + } + }, + "TASK_SEMANTIC_SEGMENTATION": { + "input": { + "$ref": "#/$defs/common", + "type": "object" + }, + "output": { + "$ref": "https://raw.githubusercontent.com/instill-ai/component/cdccadb78d0cd4551a43379924824c2b1b2bdfb9/schema.json#/$defs/instill_types/semantic_segmentation", + "description": "Output", + "instillUIOrder": 0, + "title": "Output", + "type": "object" + } + }, + "TASK_TEXT_GENERATION": { + "input": { + "description": "Input", + "instillEditOnNodeFields": [ + "prompt", + "model_namespace", + "model_id" + ], + "instillUIOrder": 0, + "properties": { + "extra_params": { + "$ref": "#/$defs/extra_params" + }, + "max_new_tokens": { + "default": 50, + "description": "The maximum number of tokens for model to generate", + "instillAcceptFormats": [ + "integer" + ], + "instillUIOrder": 6, + "instillUpstreamTypes": [ + "value", + "reference" + ], + "title": "Max new tokens", + "type": "integer" + }, + "model_id": { + "description": "ID of the Instill Model model to be used.", + "instillAcceptFormats": [ + "string" + ], + "instillUIOrder": 1, + "instillUpstreamTypes": [ + "value", + "reference", + "template" + ], + "title": "Model ID", + "type": "string" + }, + "model_namespace": { + "description": "Namespace of the Instill Model model to be used.", + "instillAcceptFormats": [ + "string" + ], + "instillUIOrder": 0, + "instillUpstreamTypes": [ + "value", + "reference", + "template" + ], + "title": "Model Namespace", + "type": "string" + }, + "prompt": { + "description": "The prompt text", + "instillAcceptFormats": [ + "string" + ], + "instillUIMultiline": true, + "instillUIOrder": 2, + "instillUpstreamTypes": [ + "value", + "reference", + "template" + ], + "title": "Prompt", + "type": "string" + }, + "seed": { + "description": "The seed", + "instillAcceptFormats": [ + "integer" + ], + "instillUIOrder": 4, + "instillUpstreamTypes": [ + "value", + "reference" + ], + "title": "Seed", + "type": "integer" + }, + "temperature": { + "default": 0.7, + "description": "The temperature for sampling", + "instillAcceptFormats": [ + "number" + ], + "instillUIOrder": 5, + "instillUpstreamTypes": [ + "value", + "reference" + ], + "title": "Temperature", + "type": "number" + }, + "top_k": { + "default": 10, + "description": "Top k for sampling", + "instillAcceptFormats": [ + "integer" + ], + "instillUIOrder": 5, + "instillUpstreamTypes": [ + "value", + "reference" + ], + "title": "Top K", + "type": "integer" + } + }, + "required": [ + "prompt", + "model_namespace", + "model_id" + ], + "title": "Input", + "type": "object" + }, + "output": { + "description": "Output", + "instillEditOnNodeFields": [ + "text" + ], + "instillUIOrder": 0, + "properties": { + "text": { + "description": "Text", + "instillFormat": "string", + "instillUIMultiline": true, + "instillUIOrder": 0, + "title": "Text", + "type": "string" + } + }, + "required": [ + "text" + ], + "title": "Output", + "type": "object" + } + }, + "TASK_TEXT_GENERATION_CHAT": { + "input": { + "description": "Input", + "instillEditOnNodeFields": [ + "conversation", + "model_namespace", + "model_id" + ], + "instillUIOrder": 0, + "properties": { + "conversation": { + "description": "Conversion, each message should adhere to the format: : {\"role\": \"The message role, i.e. 'system', 'user' or 'assistant'\", \"content\": \"message content\"}.", + "instillAcceptFormats": [ + "array:*/*" + ], + "instillShortDescription": "Conversion, each message should adhere to the format: : {\"role\": \"The message role, i.e. 'system', 'user' or 'assistant'\", \"content\": \"message content\"}.", + "instillUIOrder": 2, + "instillUpstreamTypes": [ + "value", + "reference" + ], + "items": { + "properties": { + "content": { + "description": "The message content", + "instillFormat": "string", + "instillUIMultiline": true, + "instillUIOrder": 1, + "title": "Content", + "type": "string" + }, + "role": { + "description": "The message role, i.e. 'system', 'user' or 'assistant'", + "instillFormat": "string", + "instillUIOrder": 0, + "title": "Role", + "type": "string" + } + }, + "required": [ + "role", + "content" + ], + "title": "Conversation", + "type": "object" + }, + "title": "Conversation", + "type": "array" + }, + "extra_params": { + "$ref": "#/$defs/extra_params" + }, + "max_new_tokens": { + "default": 50, + "description": "The maximum number of tokens for model to generate", + "instillAcceptFormats": [ + "integer" + ], + "instillUIOrder": 6, + "instillUpstreamTypes": [ + "value", + "reference" + ], + "title": "Max new tokens", + "type": "integer" + }, + "model_id": { + "description": "ID of the Instill Model model to be used.", + "instillAcceptFormats": [ + "string" + ], + "instillUIOrder": 1, + "instillUpstreamTypes": [ + "value", + "reference", + "template" + ], + "title": "Model ID", + "type": "string" + }, + "model_namespace": { + "description": "Namespace of the Instill Model model to be used.", + "instillAcceptFormats": [ + "string" + ], + "instillUIOrder": 0, + "instillUpstreamTypes": [ + "value", + "reference", + "template" + ], + "title": "Model Namespace", + "type": "string" + }, + "seed": { + "description": "The seed", + "instillAcceptFormats": [ + "integer" + ], + "instillUIOrder": 4, + "instillUpstreamTypes": [ + "value", + "reference" + ], + "title": "Seed", + "type": "integer" + }, + "temperature": { + "default": 0.7, + "description": "The temperature for sampling", + "instillAcceptFormats": [ + "number" + ], + "instillUIOrder": 5, + "instillUpstreamTypes": [ + "value", + "reference" + ], + "title": "Temperature", + "type": "number" + }, + "top_k": { + "default": 10, + "description": "Top k for sampling", + "instillAcceptFormats": [ + "integer" + ], + "instillUIOrder": 5, + "instillUpstreamTypes": [ + "value", + "reference" + ], + "title": "Top K", + "type": "integer" + } + }, + "required": [ + "conversation", + "model_namespace", + "model_id" + ], + "title": "Input", + "type": "object" + }, + "output": { + "description": "Output", + "instillEditOnNodeFields": [ + "text" + ], + "instillUIOrder": 0, + "properties": { + "text": { + "description": "Text", + "instillFormat": "string", + "instillUIMultiline": true, + "instillUIOrder": 0, + "title": "Text", + "type": "string" + } + }, + "required": [ + "text" + ], + "title": "Output", + "type": "object" + } + }, + "TASK_TEXT_TO_IMAGE": { + "input": { + "description": "Input", + "instillEditOnNodeFields": [ + "prompt", + "model_namespace", + "model_id" + ], + "instillUIOrder": 0, + "properties": { + "cfg_scale": { + "description": "The guidance scale, default is 7.5", + "instillAcceptFormats": [ + "number", + "integer" + ], + "instillUIOrder": 4, + "instillUpstreamTypes": [ + "value", + "reference" + ], + "title": "CFG Scale", + "type": "number" + }, + "extra_params": { + "$ref": "#/$defs/extra_params" + }, + "model_id": { + "description": "ID of the Instill Model model to be used.", + "instillAcceptFormats": [ + "string" + ], + "instillUIOrder": 1, + "instillUpstreamTypes": [ + "value", + "reference", + "template" + ], + "title": "Model ID", + "type": "string" + }, + "model_namespace": { + "description": "Namespace of the Instill Model model to be used.", + "instillAcceptFormats": [ + "string" + ], + "instillUIOrder": 0, + "instillUpstreamTypes": [ + "value", + "reference", + "template" + ], + "title": "Model Namespace", + "type": "string" + }, + "prompt": { + "description": "The prompt text", + "instillAcceptFormats": [ + "string" + ], + "instillUIMultiline": true, + "instillUIOrder": 2, + "instillUpstreamTypes": [ + "value", + "reference", + "template" + ], + "title": "Prompt", + "type": "string" + }, + "samples": { + "description": "The number of generated samples, default is 1", + "instillAcceptFormats": [ + "integer" + ], + "instillUIOrder": 5, + "instillUpstreamTypes": [ + "value", + "reference" + ], + "title": "Samples", + "type": "integer" + }, + "seed": { + "description": "The seed, default is 0", + "instillAcceptFormats": [ + "integer" + ], + "instillUIOrder": 6, + "instillUpstreamTypes": [ + "value", + "reference" + ], + "title": "Seed", + "type": "integer" + }, + "steps": { + "description": "The steps, default is 5", + "instillAcceptFormats": [ + "integer" + ], + "instillUIOrder": 7, + "instillUpstreamTypes": [ + "value", + "reference" + ], + "title": "Steps", + "type": "integer" + } + }, + "required": [ + "prompt", + "model_namespace", + "model_id" + ], + "title": "Input", + "type": "object" + }, + "output": { + "description": "Output", + "instillEditOnNodeFields": [ + "images" + ], + "instillUIOrder": 0, + "properties": { + "images": { + "description": "Images", + "instillUIOrder": 0, + "items": { + "instillFormat": "image/jpeg", + "type": "string" + }, + "title": "Images", + "type": "array" + } + }, + "required": [ + "images" + ], + "title": "Output", + "type": "object" + } + }, + "TASK_VISUAL_QUESTION_ANSWERING": { + "input": { + "description": "Input", + "instillEditOnNodeFields": [ + "prompt", + "image_base64", + "model_namespace", + "model_id" + ], + "instillUIOrder": 0, + "properties": { + "extra_params": { + "$ref": "#/$defs/extra_params" + }, + "image_base64": { + "description": "The prompt image", + "instillAcceptFormats": [ + "image/*" + ], + "instillUIOrder": 3, + "instillUpstreamTypes": [ + "reference" + ], + "title": "Prompt Image", + "type": "string" + }, + "max_new_tokens": { + "default": 50, + "description": "The maximum number of tokens for model to generate", + "instillAcceptFormats": [ + "integer" + ], + "instillUIOrder": 6, + "instillUpstreamTypes": [ + "value", + "reference" + ], + "title": "Max new tokens", + "type": "integer" + }, + "model_id": { + "description": "ID of the Instill Model model to be used.", + "instillAcceptFormats": [ + "string" + ], + "instillUIOrder": 1, + "instillUpstreamTypes": [ + "value", + "reference", + "template" + ], + "title": "Model ID", + "type": "string" + }, + "model_namespace": { + "description": "Namespace of the Instill Model model to be used.", + "instillAcceptFormats": [ + "string" + ], + "instillUIOrder": 0, + "instillUpstreamTypes": [ + "value", + "reference", + "template" + ], + "title": "Model Namespace", + "type": "string" + }, + "prompt": { + "description": "The prompt text", + "instillAcceptFormats": [ + "string" + ], + "instillUIMultiline": true, + "instillUIOrder": 2, + "instillUpstreamTypes": [ + "value", + "reference", + "template" + ], + "title": "Prompt", + "type": "string" + }, + "seed": { + "description": "The seed", + "instillAcceptFormats": [ + "integer" + ], + "instillUIOrder": 4, + "instillUpstreamTypes": [ + "value", + "reference" + ], + "title": "Seed", + "type": "integer" + }, + "temperature": { + "default": 0.7, + "description": "The temperature for sampling", + "instillAcceptFormats": [ + "number" + ], + "instillUIOrder": 5, + "instillUpstreamTypes": [ + "value", + "reference" + ], + "title": "Temperature", + "type": "number" + }, + "top_k": { + "default": 10, + "description": "Top k for sampling", + "instillAcceptFormats": [ + "integer" + ], + "instillUIOrder": 5, + "instillUpstreamTypes": [ + "value", + "reference" + ], + "title": "Top K", + "type": "integer" + } + }, + "required": [ + "prompt", + "image_base64", + "model_namespace", + "model_id" + ], + "title": "Input", + "type": "object" + }, + "output": { + "description": "Output", + "instillEditOnNodeFields": [ + "text" + ], + "instillUIOrder": 0, + "properties": { + "text": { + "description": "Text", + "instillFormat": "string", + "instillUIMultiline": true, + "instillUIOrder": 0, + "title": "Text", + "type": "string" + } + }, + "required": [ + "text" + ], + "title": "Output", + "type": "object" + } + } +} diff --git a/instill/resources/schema/jsons/json_definitions.json b/instill/resources/schema/jsons/json_definitions.json new file mode 100644 index 0000000..4ffda8b --- /dev/null +++ b/instill/resources/schema/jsons/json_definitions.json @@ -0,0 +1,17 @@ +[ + { + "available_tasks": [ + "TASK_MARSHAL", + "TASK_UNMARSHAL" + ], + "custom": false, + "documentation_url": "https://www.instill.tech/docs/latest/vdp/operators/json", + "icon": "json.svg", + "icon_url": "", + "id": "json", + "public": true, + "spec": {}, + "title": "JSON", + "uid": "28f53d15-6150-46e6-99aa-f76b70a926c0" + } +] diff --git a/instill/resources/schema/jsons/json_task_marshal_input.json b/instill/resources/schema/jsons/json_task_marshal_input.json new file mode 100644 index 0000000..fb1aff9 --- /dev/null +++ b/instill/resources/schema/jsons/json_task_marshal_input.json @@ -0,0 +1 @@ +{"description":"Input","instillEditOnNodeFields":["object"],"instillUIOrder":0,"properties":{"object":{"description":"Json object to be marshaled","instillAcceptFormats":["object","semi-structured/*","structured/*"],"instillEditOnNodeFields":[],"instillUIOrder":0,"instillUpstreamTypes":["reference"],"required":[],"title":"Object","type":"object"}},"required":["object"],"title":"Input","type":"object"} diff --git a/instill/resources/schema/jsons/json_task_marshal_output.json b/instill/resources/schema/jsons/json_task_marshal_output.json new file mode 100644 index 0000000..f773bb9 --- /dev/null +++ b/instill/resources/schema/jsons/json_task_marshal_output.json @@ -0,0 +1 @@ +{"description":"Output","instillEditOnNodeFields":["string"],"instillUIOrder":0,"properties":{"string":{"description":"Data","instillFormat":"string","instillUIMultiline":true,"instillUIOrder":0,"title":"Data","type":"string"}},"required":["string"],"title":"Output","type":"object"} diff --git a/instill/resources/schema/jsons/json_task_unmarshal_input.json b/instill/resources/schema/jsons/json_task_unmarshal_input.json new file mode 100644 index 0000000..f573c44 --- /dev/null +++ b/instill/resources/schema/jsons/json_task_unmarshal_input.json @@ -0,0 +1 @@ +{"description":"Input","instillEditOnNodeFields":["string"],"instillUIOrder":0,"properties":{"string":{"description":"Json string to be unmarshaled","instillAcceptFormats":["string"],"instillUIMultiline":true,"instillUIOrder":0,"instillUpstreamTypes":["value","reference"],"title":"String","type":"string"}},"required":["string"],"title":"Input","type":"object"} diff --git a/instill/resources/schema/jsons/json_task_unmarshal_output.json b/instill/resources/schema/jsons/json_task_unmarshal_output.json new file mode 100644 index 0000000..b0eaba1 --- /dev/null +++ b/instill/resources/schema/jsons/json_task_unmarshal_output.json @@ -0,0 +1 @@ +{"description":"Output","instillEditOnNodeFields":["object"],"instillUIOrder":0,"properties":{"object":{"description":"Object","instillEditOnNodeFields":[],"instillFormat":"semi-structured/object","instillUIOrder":0,"required":[],"title":"Object","type":"object"}},"required":["object"],"title":"Output","type":"object"} diff --git a/instill/resources/schema/jsons/json_tasks.json b/instill/resources/schema/jsons/json_tasks.json new file mode 100644 index 0000000..ee0be99 --- /dev/null +++ b/instill/resources/schema/jsons/json_tasks.json @@ -0,0 +1,109 @@ +{ + "TASK_MARSHAL": { + "input": { + "description": "Input", + "instillEditOnNodeFields": [ + "object" + ], + "instillUIOrder": 0, + "properties": { + "object": { + "description": "Json object to be marshaled", + "instillAcceptFormats": [ + "object", + "semi-structured/*", + "structured/*" + ], + "instillEditOnNodeFields": [], + "instillUIOrder": 0, + "instillUpstreamTypes": [ + "reference" + ], + "required": [], + "title": "Object", + "type": "object" + } + }, + "required": [ + "object" + ], + "title": "Input", + "type": "object" + }, + "output": { + "description": "Output", + "instillEditOnNodeFields": [ + "string" + ], + "instillUIOrder": 0, + "properties": { + "string": { + "description": "Data", + "instillFormat": "string", + "instillUIMultiline": true, + "instillUIOrder": 0, + "title": "Data", + "type": "string" + } + }, + "required": [ + "string" + ], + "title": "Output", + "type": "object" + } + }, + "TASK_UNMARSHAL": { + "input": { + "description": "Input", + "instillEditOnNodeFields": [ + "string" + ], + "instillUIOrder": 0, + "properties": { + "string": { + "description": "Json string to be unmarshaled", + "instillAcceptFormats": [ + "string" + ], + "instillUIMultiline": true, + "instillUIOrder": 0, + "instillUpstreamTypes": [ + "value", + "reference" + ], + "title": "String", + "type": "string" + } + }, + "required": [ + "string" + ], + "title": "Input", + "type": "object" + }, + "output": { + "description": "Output", + "instillEditOnNodeFields": [ + "object" + ], + "instillUIOrder": 0, + "properties": { + "object": { + "description": "Object", + "instillEditOnNodeFields": [], + "instillFormat": "semi-structured/object", + "instillUIOrder": 0, + "required": [], + "title": "Object", + "type": "object" + } + }, + "required": [ + "object" + ], + "title": "Output", + "type": "object" + } + } +} diff --git a/instill/resources/schema/jsons/numbers_definitions.json b/instill/resources/schema/jsons/numbers_definitions.json new file mode 100644 index 0000000..13df446 --- /dev/null +++ b/instill/resources/schema/jsons/numbers_definitions.json @@ -0,0 +1 @@ +{ "$schema": "http://json-schema.org/draft-07/schema#", "additionalProperties": false, "properties": { "capture_token": { "description": "Fill 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.", "instillCredentialField": true, "instillUIOrder": 0, "title": "Capture token", "type": "string" } }, "required": [ "capture_token" ], "title": "Numbers Protocol Blockchain Connector Spec", "type": "object" } diff --git a/instill/resources/schema/jsons/numbers_tasks.json b/instill/resources/schema/jsons/numbers_tasks.json new file mode 100644 index 0000000..39c6c83 --- /dev/null +++ b/instill/resources/schema/jsons/numbers_tasks.json @@ -0,0 +1,205 @@ +{ + "TASK_COMMIT": { + "input": { + "description": "Input", + "instillUIOrder": 0, + "properties": { + "abstract": { + "description": "A summary or abstract of the asset.", + "instillAcceptFormats": [ + "string" + ], + "instillUIMultiline": true, + "instillUIOrder": 1, + "instillUpstreamTypes": [ + "value", + "reference", + "template" + ], + "title": "Abstract", + "type": "string" + }, + "asset_creator": { + "description": "Name of the asset creator.", + "instillAcceptFormats": [ + "string" + ], + "instillUIOrder": 2, + "instillUpstreamTypes": [ + "value", + "reference", + "template" + ], + "title": "Asset Creator", + "type": "string" + }, + "custom": { + "description": "Custom", + "instillUIOrder": 3, + "properties": { + "digital_source_type": { + "default": "trainedAlgorithmicMedia", + "description": "Specify the type of the source. More details here", + "enum": [ + "trainedAlgorithmicMedia", + "trainedAlgorithmicData", + "digitalCapture", + "digitalArt", + "algorithmicMedia" + ], + "instillAcceptFormats": [ + "string" + ], + "instillUIOrder": 1, + "instillUpstreamTypes": [ + "value", + "reference", + "template" + ], + "title": "Digital Source Type", + "type": "string" + }, + "generated_by": { + "description": "The AI model used to generate the content.", + "instillAcceptFormats": [ + "string" + ], + "instillUIOrder": 2, + "instillUpstreamTypes": [ + "value", + "reference", + "template" + ], + "title": "Generated By", + "type": "string" + }, + "license": { + "description": "License", + "instillUIOrder": 4, + "properties": { + "document": { + "description": "URL of the license file.", + "instillAcceptFormats": [ + "string" + ], + "instillEnableCopyButton": true, + "instillUIOrder": 0, + "instillUpstreamTypes": [ + "value", + "reference", + "template" + ], + "title": "License Document", + "type": "string" + }, + "name": { + "description": "License of the asset file.", + "instillAcceptFormats": [ + "string" + ], + "instillUIOrder": 1, + "instillUpstreamTypes": [ + "value", + "reference", + "template" + ], + "title": "License Name", + "type": "string" + } + }, + "required": [], + "title": "License", + "type": "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 or AI/ML training workflow. More details here", + "enum": [ + "dataMining", + "aiInference", + "notAllowed", + "aiGenerativeTraining", + "aiGenerativeTrainingWithAuthorship", + "aiTraining", + "aiTrainingWithAuthorship" + ], + "instillAcceptFormats": [ + "string" + ], + "instillShortDescription": "Designates the selection made by the asset creators or licensed owners. More details here", + "instillUIOrder": 5, + "instillUpstreamTypes": [ + "value", + "reference", + "template" + ], + "title": "Mining Preference", + "type": "string" + } + }, + "required": [], + "title": "Custom", + "type": "object" + }, + "headline": { + "description": "Headline of the asset", + "instillAcceptFormats": [ + "string" + ], + "instillUIOrder": 2, + "instillUpstreamTypes": [ + "value", + "reference", + "template" + ], + "title": "Headline", + "type": "string" + }, + "images": { + "description": "The images you want to upload to blockchain.", + "instillAcceptFormats": [ + "array:image/*" + ], + "instillUIOrder": 0, + "instillUpstreamTypes": [ + "reference" + ], + "items": { + "contentEncoding": "base64", + "type": "string" + }, + "title": "Images", + "type": "array" + } + }, + "required": [ + "images" + ], + "title": "Input", + "type": "object" + }, + "output": { + "description": "Output", + "instillUIOrder": 0, + "properties": { + "asset_urls": { + "description": "Asset Urls", + "instillEnableCopyButton": true, + "instillUIOrder": 0, + "items": { + "instillEnableCopyButton": true, + "instillFormat": "string", + "type": "string" + }, + "title": "Asset Urls", + "type": "array" + } + }, + "required": [ + "asset_urls" + ], + "title": "Output", + "type": "object" + } + } +} diff --git a/instill/resources/schema/jsons/openai.json b/instill/resources/schema/jsons/openai.json new file mode 100644 index 0000000..74356f9 --- /dev/null +++ b/instill/resources/schema/jsons/openai.json @@ -0,0 +1,8645 @@ +{ + "components": { + "schemas": { + "AssistantFileObject": { + "description": "A list of [Files](/docs/api-reference/files) attached to an `assistant`.", + "properties": { + "assistant_id": { + "description": "The assistant ID that the file is attached to.", + "type": "string" + }, + "created_at": { + "description": "The Unix timestamp (in seconds) for when the assistant file was created.", + "type": "integer" + }, + "id": { + "description": "The identifier, which can be referenced in API endpoints.", + "type": "string" + }, + "object": { + "description": "The object type, which is always `assistant.file`.", + "enum": [ + "assistant.file" + ], + "type": "string" + } + }, + "required": [ + "id", + "object", + "created_at", + "assistant_id" + ], + "title": "Assistant files", + "type": "object", + "x-oaiMeta": { + "beta": true, + "example": "{\n \"id\": \"file-wB6RM6wHdA49HfS2DJ9fEyrH\",\n \"object\": \"assistant.file\",\n \"created_at\": 1699055364,\n \"assistant_id\": \"asst_FBOFvAOHhwEWMghbMGseaPGQ\"\n}\n", + "name": "The assistant file object" + } + }, + "AssistantObject": { + "description": "Represents an `assistant` that can call the model and use tools.", + "properties": { + "created_at": { + "description": "The Unix timestamp (in seconds) for when the assistant was created.", + "type": "integer" + }, + "description": { + "description": "The description of the assistant. The maximum length is 512 characters.\n", + "maxLength": 512, + "nullable": true, + "type": "string" + }, + "file_ids": { + "default": [], + "description": "A list of [file](/docs/api-reference/files) IDs attached to this assistant. There can be a maximum of 20 files attached to the assistant. Files are ordered by their creation date in ascending order.\n", + "items": { + "type": "string" + }, + "maxItems": 20, + "type": "array" + }, + "id": { + "description": "The identifier, which can be referenced in API endpoints.", + "type": "string" + }, + "instructions": { + "description": "The system instructions that the assistant uses. The maximum length is 32768 characters.\n", + "maxLength": 32768, + "nullable": true, + "type": "string" + }, + "metadata": { + "description": "Set of 16 key-value pairs that can be attached to an object. This can be useful for storing additional information about the object in a structured format. Keys can be a maximum of 64 characters long and values can be a maxium of 512 characters long.\n", + "nullable": true, + "type": "object", + "x-oaiTypeLabel": "map" + }, + "model": { + "description": "ID of the model to use. You can use the [List models](/docs/api-reference/models/list) API to see all of your available models, or see our [Model overview](/docs/models/overview) for descriptions of them.\n", + "type": "string" + }, + "name": { + "description": "The name of the assistant. The maximum length is 256 characters.\n", + "maxLength": 256, + "nullable": true, + "type": "string" + }, + "object": { + "description": "The object type, which is always `assistant`.", + "enum": [ + "assistant" + ], + "type": "string" + }, + "tools": { + "default": [], + "description": "A list of tool enabled on the assistant. There can be a maximum of 128 tools per assistant. Tools can be of types `code_interpreter`, `retrieval`, or `function`.\n", + "items": { + "oneOf": [ + { + "$ref": "#/components/schemas/AssistantToolsCode" + }, + { + "$ref": "#/components/schemas/AssistantToolsRetrieval" + }, + { + "$ref": "#/components/schemas/AssistantToolsFunction" + } + ], + "x-oaiExpandable": true + }, + "maxItems": 128, + "type": "array" + } + }, + "required": [ + "id", + "object", + "created_at", + "name", + "description", + "model", + "instructions", + "tools", + "file_ids", + "metadata" + ], + "title": "Assistant", + "type": "object", + "x-oaiMeta": { + "beta": true, + "example": "{\n \"id\": \"asst_abc123\",\n \"object\": \"assistant\",\n \"created_at\": 1698984975,\n \"name\": \"Math Tutor\",\n \"description\": null,\n \"model\": \"gpt-4\",\n \"instructions\": \"You are a personal math tutor. When asked a question, write and run Python code to answer the question.\",\n \"tools\": [\n {\n \"type\": \"code_interpreter\"\n }\n ],\n \"file_ids\": [],\n \"metadata\": {}\n}\n", + "name": "The assistant object" + } + }, + "AssistantToolsCode": { + "properties": { + "type": { + "description": "The type of tool being defined: `code_interpreter`", + "enum": [ + "code_interpreter" + ], + "type": "string" + } + }, + "required": [ + "type" + ], + "title": "Code interpreter tool", + "type": "object" + }, + "AssistantToolsFunction": { + "properties": { + "function": { + "description": "The function definition.", + "properties": { + "description": { + "description": "A description of what the function does, used by the model to choose when and how to call the function.", + "type": "string" + }, + "name": { + "description": "The name of the function to be called. Must be a-z, A-Z, 0-9, or contain underscores and dashes, with a maximum length of 64.", + "type": "string" + }, + "parameters": { + "$ref": "#/components/schemas/ChatCompletionFunctionParameters" + } + }, + "required": [ + "name", + "parameters", + "description" + ], + "type": "object" + }, + "type": { + "description": "The type of tool being defined: `function`", + "enum": [ + "function" + ], + "type": "string" + } + }, + "required": [ + "type", + "function" + ], + "title": "Function tool", + "type": "object" + }, + "AssistantToolsRetrieval": { + "properties": { + "type": { + "description": "The type of tool being defined: `retrieval`", + "enum": [ + "retrieval" + ], + "type": "string" + } + }, + "required": [ + "type" + ], + "title": "Retrieval tool", + "type": "object" + }, + "ChatCompletionFunctionCallOption": { + "description": "Specifying a particular function via `{\"name\": \"my_function\"}` forces the model to call that function.\n", + "properties": { + "name": { + "description": "The name of the function to call.", + "type": "string" + } + }, + "required": [ + "name" + ], + "type": "object" + }, + "ChatCompletionFunctionParameters": { + "additionalProperties": true, + "description": "The parameters the functions accepts, described as a JSON Schema object. See the [guide](/docs/guides/gpt/function-calling) for examples, and the [JSON Schema reference](https://json-schema.org/understanding-json-schema/) for documentation about the format.\n\nTo describe a function that accepts no parameters, provide the value `{\"type\": \"object\", \"properties\": {}}`.", + "type": "object" + }, + "ChatCompletionFunctions": { + "deprecated": true, + "properties": { + "description": { + "description": "A description of what the function does, used by the model to choose when and how to call the function.", + "type": "string" + }, + "name": { + "description": "The name of the function to be called. Must be a-z, A-Z, 0-9, or contain underscores and dashes, with a maximum length of 64.", + "type": "string" + }, + "parameters": { + "$ref": "#/components/schemas/ChatCompletionFunctionParameters" + } + }, + "required": [ + "name", + "parameters" + ], + "type": "object" + }, + "ChatCompletionMessageToolCall": { + "properties": { + "function": { + "description": "The function that the model called.", + "properties": { + "arguments": { + "description": "The arguments to call the function with, as generated by the model in JSON format. Note that the model does not always generate valid JSON, and may hallucinate parameters not defined by your function schema. Validate the arguments in your code before calling your function.", + "type": "string" + }, + "name": { + "description": "The name of the function to call.", + "type": "string" + } + }, + "required": [ + "name", + "arguments" + ], + "type": "object" + }, + "id": { + "description": "The ID of the tool call.", + "type": "string" + }, + "type": { + "description": "The type of the tool. Currently, only `function` is supported.", + "enum": [ + "function" + ], + "type": "string" + } + }, + "required": [ + "id", + "type", + "function" + ], + "type": "object" + }, + "ChatCompletionMessageToolCallChunk": { + "properties": { + "function": { + "properties": { + "arguments": { + "description": "The arguments to call the function with, as generated by the model in JSON format. Note that the model does not always generate valid JSON, and may hallucinate parameters not defined by your function schema. Validate the arguments in your code before calling your function.", + "type": "string" + }, + "name": { + "description": "The name of the function to call.", + "type": "string" + } + }, + "type": "object" + }, + "id": { + "description": "The ID of the tool call.", + "type": "string" + }, + "index": { + "type": "integer" + }, + "type": { + "description": "The type of the tool. Currently, only `function` is supported.", + "enum": [ + "function" + ], + "type": "string" + } + }, + "required": [ + "index" + ], + "type": "object" + }, + "ChatCompletionMessageToolCalls": { + "description": "The tool calls generated by the model, such as function calls.", + "items": { + "$ref": "#/components/schemas/ChatCompletionMessageToolCall" + }, + "type": "array" + }, + "ChatCompletionNamedToolChoice": { + "description": "Specifies a tool the model should use. Use to force the model to call a specific function.", + "properties": { + "function": { + "properties": { + "name": { + "description": "The name of the function to call.", + "type": "string" + } + }, + "required": [ + "name" + ], + "type": "object" + }, + "type": { + "description": "The type of the tool. Currently, only `function` is supported.", + "enum": [ + "function" + ], + "type": "string" + } + }, + "type": "object" + }, + "ChatCompletionRequestAssistantMessage": { + "properties": { + "content": { + "description": "The contents of the assistant message.\n", + "nullable": true, + "type": "string" + }, + "function_call": { + "deprecated": true, + "description": "Deprecated and replaced by `tool_calls`. The name and arguments of a function that should be called, as generated by the model.", + "properties": { + "arguments": { + "description": "The arguments to call the function with, as generated by the model in JSON format. Note that the model does not always generate valid JSON, and may hallucinate parameters not defined by your function schema. Validate the arguments in your code before calling your function.", + "type": "string" + }, + "name": { + "description": "The name of the function to call.", + "type": "string" + } + }, + "required": [ + "arguments", + "name" + ], + "type": "object" + }, + "role": { + "description": "The role of the messages author, in this case `assistant`.", + "enum": [ + "assistant" + ], + "type": "string" + }, + "tool_calls": { + "$ref": "#/components/schemas/ChatCompletionMessageToolCalls" + } + }, + "required": [ + "content", + "role" + ], + "title": "Assistant message", + "type": "object" + }, + "ChatCompletionRequestFunctionMessage": { + "deprecated": true, + "properties": { + "content": { + "description": "The return value from the function call, to return to the model.", + "nullable": true, + "type": "string" + }, + "name": { + "description": "The name of the function to call.", + "type": "string" + }, + "role": { + "description": "The role of the messages author, in this case `function`.", + "enum": [ + "function" + ], + "type": "string" + } + }, + "required": [ + "role", + "name", + "content" + ], + "title": "Function message", + "type": "object" + }, + "ChatCompletionRequestMessage": { + "oneOf": [ + { + "$ref": "#/components/schemas/ChatCompletionRequestSystemMessage" + }, + { + "$ref": "#/components/schemas/ChatCompletionRequestUserMessage" + }, + { + "$ref": "#/components/schemas/ChatCompletionRequestAssistantMessage" + }, + { + "$ref": "#/components/schemas/ChatCompletionRequestToolMessage" + }, + { + "$ref": "#/components/schemas/ChatCompletionRequestFunctionMessage" + } + ], + "x-oaiExpandable": true + }, + "ChatCompletionRequestMessageContentPart": { + "oneOf": [ + { + "$ref": "#/components/schemas/ChatCompletionRequestMessageContentPartText" + }, + { + "$ref": "#/components/schemas/ChatCompletionRequestMessageContentPartImage" + } + ], + "x-oaiExpandable": true + }, + "ChatCompletionRequestMessageContentPartImage": { + "properties": { + "image_url": { + "properties": { + "detail": { + "default": "auto", + "description": "Specifies the detail level of the image.", + "enum": [ + "auto", + "low", + "high" + ], + "type": "string" + }, + "url": { + "description": "Either a URL of the image or the base64 encoded image data.", + "format": "uri", + "type": "string" + } + }, + "required": [ + "url" + ], + "type": "object" + }, + "type": { + "description": "The type of the content part.", + "enum": [ + "image_url" + ], + "type": "string" + } + }, + "required": [ + "type", + "image_url" + ], + "title": "Image content part", + "type": "object" + }, + "ChatCompletionRequestMessageContentPartText": { + "properties": { + "text": { + "description": "The text content.", + "type": "string" + }, + "type": { + "description": "The type of the content part.", + "enum": [ + "text" + ], + "type": "string" + } + }, + "required": [ + "type", + "text" + ], + "title": "Text content part", + "type": "object" + }, + "ChatCompletionRequestSystemMessage": { + "properties": { + "content": { + "description": "The contents of the system message.", + "nullable": true, + "type": "string" + }, + "role": { + "description": "The role of the messages author, in this case `system`.", + "enum": [ + "system" + ], + "type": "string" + } + }, + "required": [ + "content", + "role" + ], + "title": "System message", + "type": "object" + }, + "ChatCompletionRequestToolMessage": { + "properties": { + "content": { + "description": "The contents of the tool message.", + "nullable": true, + "type": "string" + }, + "role": { + "description": "The role of the messages author, in this case `tool`.", + "enum": [ + "tool" + ], + "type": "string" + }, + "tool_call_id": { + "description": "Tool call that this message is responding to.", + "type": "string" + } + }, + "required": [ + "role", + "content", + "tool_call_id" + ], + "title": "Tool message", + "type": "object" + }, + "ChatCompletionRequestUserMessage": { + "properties": { + "content": { + "description": "The contents of the user message.\n", + "nullable": true, + "oneOf": [ + { + "description": "The text contents of the message.", + "title": "Text content", + "type": "string" + }, + { + "description": "An array of content parts with a defined type, each can be of type `text` or `image_url` when passing in images. You can pass multiple images by adding multiple `image_url` content parts. Image input is only supported when using the `gpt-4-visual-preview` model.", + "items": { + "$ref": "#/components/schemas/ChatCompletionRequestMessageContentPart" + }, + "minItems": 1, + "title": "Array of content parts", + "type": "array" + } + ] + }, + "role": { + "description": "The role of the messages author, in this case `user`.", + "enum": [ + "user" + ], + "type": "string" + } + }, + "required": [ + "content", + "role" + ], + "title": "User message", + "type": "object" + }, + "ChatCompletionResponseMessage": { + "description": "A chat completion message generated by the model.", + "properties": { + "content": { + "description": "The contents of the message.", + "nullable": true, + "type": "string" + }, + "function_call": { + "deprecated": true, + "description": "Deprecated and replaced by `tool_calls`. The name and arguments of a function that should be called, as generated by the model.", + "properties": { + "arguments": { + "description": "The arguments to call the function with, as generated by the model in JSON format. Note that the model does not always generate valid JSON, and may hallucinate parameters not defined by your function schema. Validate the arguments in your code before calling your function.", + "type": "string" + }, + "name": { + "description": "The name of the function to call.", + "type": "string" + } + }, + "required": [ + "name", + "arguments" + ], + "type": "object" + }, + "role": { + "description": "The role of the author of this message.", + "enum": [ + "assistant" + ], + "type": "string" + }, + "tool_calls": { + "$ref": "#/components/schemas/ChatCompletionMessageToolCalls" + } + }, + "required": [ + "role", + "content" + ], + "type": "object" + }, + "ChatCompletionRole": { + "description": "The role of the author of a message", + "enum": [ + "system", + "user", + "assistant", + "tool", + "function" + ], + "type": "string" + }, + "ChatCompletionStreamResponseDelta": { + "description": "A chat completion delta generated by streamed model responses.", + "properties": { + "content": { + "description": "The contents of the chunk message.", + "nullable": true, + "type": "string" + }, + "function_call": { + "deprecated": true, + "description": "Deprecated and replaced by `tool_calls`. The name and arguments of a function that should be called, as generated by the model.", + "properties": { + "arguments": { + "description": "The arguments to call the function with, as generated by the model in JSON format. Note that the model does not always generate valid JSON, and may hallucinate parameters not defined by your function schema. Validate the arguments in your code before calling your function.", + "type": "string" + }, + "name": { + "description": "The name of the function to call.", + "type": "string" + } + }, + "type": "object" + }, + "role": { + "description": "The role of the author of this message.", + "enum": [ + "system", + "user", + "assistant", + "tool" + ], + "type": "string" + }, + "tool_calls": { + "items": { + "$ref": "#/components/schemas/ChatCompletionMessageToolCallChunk" + }, + "type": "array" + } + }, + "type": "object" + }, + "ChatCompletionTool": { + "properties": { + "function": { + "properties": { + "description": { + "description": "A description of what the function does, used by the model to choose when and how to call the function.", + "type": "string" + }, + "name": { + "description": "The name of the function to be called. Must be a-z, A-Z, 0-9, or contain underscores and dashes, with a maximum length of 64.", + "type": "string" + }, + "parameters": { + "$ref": "#/components/schemas/ChatCompletionFunctionParameters" + } + }, + "required": [ + "name", + "parameters" + ], + "type": "object" + }, + "type": { + "description": "The type of the tool. Currently, only `function` is supported.", + "enum": [ + "function" + ], + "type": "string" + } + }, + "required": [ + "type", + "function" + ], + "type": "object" + }, + "ChatCompletionToolChoiceOption": { + "description": "Controls which (if any) function is called by the model.\n`none` means the model will not call a function and instead generates a message.\n`auto` means the model can pick between generating a message or calling a function.\nSpecifying a particular function via `{\"type: \"function\", \"function\": {\"name\": \"my_function\"}}` forces the model to call that function.\n\n`none` is the default when no functions are present. `auto` is the default if functions are present.\n", + "oneOf": [ + { + "description": "`none` means the model will not call a function and instead generates a message. `auto` means the model can pick between generating a message or calling a function.\n", + "enum": [ + "none", + "auto" + ], + "type": "string" + }, + { + "$ref": "#/components/schemas/ChatCompletionNamedToolChoice" + } + ], + "x-oaiExpandable": true + }, + "CompletionUsage": { + "description": "Usage statistics for the completion request.", + "properties": { + "completion_tokens": { + "description": "Number of tokens in the generated completion.", + "type": "integer" + }, + "prompt_tokens": { + "description": "Number of tokens in the prompt.", + "type": "integer" + }, + "total_tokens": { + "description": "Total number of tokens used in the request (prompt + completion).", + "type": "integer" + } + }, + "required": [ + "prompt_tokens", + "completion_tokens", + "total_tokens" + ], + "type": "object" + }, + "CreateAssistantFileRequest": { + "additionalProperties": false, + "properties": { + "file_id": { + "description": "A [File](/docs/api-reference/files) ID (with `purpose=\"assistants\"`) that the assistant should use. Useful for tools like `retrieval` and `code_interpreter` that can access files.", + "type": "string" + } + }, + "required": [ + "file_id" + ], + "type": "object" + }, + "CreateAssistantRequest": { + "additionalProperties": false, + "properties": { + "description": { + "description": "The description of the assistant. The maximum length is 512 characters.\n", + "maxLength": 512, + "nullable": true, + "type": "string" + }, + "file_ids": { + "default": [], + "description": "A list of [file](/docs/api-reference/files) IDs attached to this assistant. There can be a maximum of 20 files attached to the assistant. Files are ordered by their creation date in ascending order.\n", + "items": { + "type": "string" + }, + "maxItems": 20, + "type": "array" + }, + "instructions": { + "description": "The system instructions that the assistant uses. The maximum length is 32768 characters.\n", + "maxLength": 32768, + "nullable": true, + "type": "string" + }, + "metadata": { + "description": "Set of 16 key-value pairs that can be attached to an object. This can be useful for storing additional information about the object in a structured format. Keys can be a maximum of 64 characters long and values can be a maxium of 512 characters long.\n", + "nullable": true, + "type": "object", + "x-oaiTypeLabel": "map" + }, + "model": { + "anyOf": [ + { + "type": "string" + } + ], + "description": "ID of the model to use. You can use the [List models](/docs/api-reference/models/list) API to see all of your available models, or see our [Model overview](/docs/models/overview) for descriptions of them.\n" + }, + "name": { + "description": "The name of the assistant. The maximum length is 256 characters.\n", + "maxLength": 256, + "nullable": true, + "type": "string" + }, + "tools": { + "default": [], + "description": "A list of tool enabled on the assistant. There can be a maximum of 128 tools per assistant. Tools can be of types `code_interpreter`, `retrieval`, or `function`.\n", + "items": { + "oneOf": [ + { + "$ref": "#/components/schemas/AssistantToolsCode" + }, + { + "$ref": "#/components/schemas/AssistantToolsRetrieval" + }, + { + "$ref": "#/components/schemas/AssistantToolsFunction" + } + ], + "x-oaiExpandable": true + }, + "maxItems": 128, + "type": "array" + } + }, + "required": [ + "model" + ], + "type": "object" + }, + "CreateChatCompletionFunctionResponse": { + "description": "Represents a chat completion response returned by model, based on the provided input.", + "properties": { + "choices": { + "description": "A list of chat completion choices. Can be more than one if `n` is greater than 1.", + "items": { + "properties": { + "finish_reason": { + "description": "The reason the model stopped generating tokens. This will be `stop` if the model hit a natural stop point or a provided stop sequence, `length` if the maximum number of tokens specified in the request was reached, `content_filter` if content was omitted due to a flag from our content filters, or `function_call` if the model called a function.\n", + "enum": [ + "stop", + "length", + "function_call", + "content_filter" + ], + "type": "string" + }, + "index": { + "description": "The index of the choice in the list of choices.", + "type": "integer" + }, + "message": { + "$ref": "#/components/schemas/ChatCompletionResponseMessage" + } + }, + "required": [ + "finish_reason", + "index", + "message" + ], + "type": "object" + }, + "type": "array" + }, + "created": { + "description": "The Unix timestamp (in seconds) of when the chat completion was created.", + "type": "integer" + }, + "id": { + "description": "A unique identifier for the chat completion.", + "type": "string" + }, + "model": { + "description": "The model used for the chat completion.", + "type": "string" + }, + "object": { + "description": "The object type, which is always `chat.completion`.", + "enum": [ + "chat.completion" + ], + "type": "string" + }, + "system_fingerprint": { + "description": "This fingerprint represents the backend configuration that the model runs with.\n\nCan be used in conjunction with the `seed` request parameter to understand when backend changes have been made that might impact determinism.\n", + "type": "string" + }, + "usage": { + "$ref": "#/components/schemas/CompletionUsage" + } + }, + "required": [ + "choices", + "created", + "id", + "model", + "object" + ], + "type": "object", + "x-oaiMeta": { + "example": "{\n \"choices\": [\n {\n \"finish_reason\": \"function_call\",\n \"index\": 0,\n \"message\": {\n \"content\": null,\n \"function_call\": {\n \"arguments\": \"{\\n \\\"location\\\": \\\"Boston, MA\\\"\\n}\",\n \"name\": \"get_current_weather\"\n },\n \"role\": \"assistant\"\n }\n }\n ],\n \"created\": 1694028367,\n \"model\": \"gpt-3.5-turbo-0613\",\n \"system_fingerprint\": \"fp_44709d6fcb\",\n \"object\": \"chat.completion\",\n \"usage\": {\n \"completion_tokens\": 18,\n \"prompt_tokens\": 82,\n \"total_tokens\": 100\n }\n}\n", + "group": "chat", + "name": "The chat completion object" + } + }, + "CreateChatCompletionImageResponse": { + "description": "Represents a streamed chunk of a chat completion response returned by model, based on the provided input.", + "type": "object", + "x-oaiMeta": { + "example": "{\n \"id\": \"chatcmpl-123\",\n \"object\": \"chat.completion\",\n \"created\": 1677652288,\n \"model\": \"gpt-3.5-turbo-0613\",\n \"system_fingerprint\": \"fp_44709d6fcb\",\n \"choices\": [{\n \"index\": 0,\n \"message\": {\n \"role\": \"assistant\",\n \"content\": \"\\n\\nHello there, how may I assist you today?\",\n },\n \"finish_reason\": \"stop\"\n }],\n \"usage\": {\n \"prompt_tokens\": 9,\n \"completion_tokens\": 12,\n \"total_tokens\": 21\n }\n}\n", + "group": "chat", + "name": "The chat completion chunk object" + } + }, + "CreateChatCompletionRequest": { + "properties": { + "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.\n\n[See more information about frequency and presence penalties.](/docs/guides/gpt/parameter-details)\n", + "maximum": 2, + "minimum": -2, + "nullable": true, + "type": "number" + }, + "function_call": { + "deprecated": true, + "description": "Deprecated in favor of `tool_choice`.\n\nControls which (if any) function is called by the model.\n`none` means the model will not call a function and instead generates a message.\n`auto` means the model can pick between generating a message or calling a function.\nSpecifying a particular function via `{\"name\": \"my_function\"}` forces the model to call that function.\n\n`none` is the default when no functions are present. `auto`` is the default if functions are present.\n", + "oneOf": [ + { + "description": "`none` means the model will not call a function and instead generates a message. `auto` means the model can pick between generating a message or calling a function.\n", + "enum": [ + "none", + "auto" + ], + "type": "string" + }, + { + "$ref": "#/components/schemas/ChatCompletionFunctionCallOption" + } + ], + "x-oaiExpandable": true + }, + "functions": { + "deprecated": true, + "description": "Deprecated in favor of `tools`.\n\nA list of functions the model may generate JSON inputs for.\n", + "items": { + "$ref": "#/components/schemas/ChatCompletionFunctions" + }, + "maxItems": 128, + "minItems": 1, + "type": "array" + }, + "logit_bias": { + "additionalProperties": { + "type": "integer" + }, + "default": null, + "description": "Modify the likelihood of specified tokens appearing in the completion.\n\nAccepts a JSON object that maps tokens (specified by their token ID in the tokenizer) to an associated bias value from -100 to 100. Mathematically, the bias is added to the logits generated by the model prior to sampling. The exact effect will vary per model, but values between -1 and 1 should decrease or increase likelihood of selection; values like -100 or 100 should result in a ban or exclusive selection of the relevant token.\n", + "nullable": true, + "type": "object", + "x-oaiTypeLabel": "map" + }, + "max_tokens": { + "description": "The maximum number of [tokens](/tokenizer) to generate in the chat completion.\n\nThe total length of input tokens and generated tokens is limited by the model's context length. [Example Python code](https://cookbook.openai.com/examples/how_to_count_tokens_with_tiktoken) for counting tokens.\n", + "nullable": true, + "type": "integer" + }, + "messages": { + "description": "A list of messages comprising the conversation so far. [Example Python code](https://cookbook.openai.com/examples/how_to_format_inputs_to_chatgpt_models).", + "items": { + "$ref": "#/components/schemas/ChatCompletionRequestMessage" + }, + "minItems": 1, + "type": "array" + }, + "model": { + "description": "ID of the model to use. See the [model endpoint compatibility](/docs/models/model-endpoint-compatibility) table for details on which models work with the Chat API.", + "enum": [ + "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-16k-0613" + ], + "example": "gpt-3.5-turbo", + "type": "string", + "x-oaiTypeLabel": "string" + }, + "n": { + "default": 1, + "description": "How many chat completion choices to generate for each input message.", + "example": 1, + "maximum": 128, + "minimum": 1, + "nullable": true, + "type": "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 likelihood to talk about new topics.\n\n[See more information about frequency and presence penalties.](/docs/guides/gpt/parameter-details)\n", + "maximum": 2, + "minimum": -2, + "nullable": true, + "type": "number" + }, + "response_format": { + "description": "An object specifying the format that the model must output. Used to enable JSON mode.", + "properties": { + "type": { + "default": "text", + "description": "Setting to `json_object` enables JSON mode. This guarantees that the message the model generates is valid JSON. \n\nNote that your system prompt must still instruct the model to produce JSON, and to help ensure you don't forget, the API will throw an error if the string `JSON` does not appear in your system message. Also note that the message content may be partial (i.e. cut off) if `finish_reason=\"length\"`, which indicates the generation exceeded `max_tokens` or the conversation exceeded the max context length. \n\nMust be one of `text` or `json_object`.\n", + "enum": [ + "text", + "json_object" + ], + "example": "text", + "type": "string" + } + }, + "type": "object" + }, + "seed": { + "description": "This feature is in Beta. \nIf specified, our system will make a best effort to sample deterministically, such that repeated requests with the same `seed` and parameters should return the same result.\nDeterminism is not guaranteed, and you should refer to the `system_fingerprint` response parameter to monitor changes in the backend.\n", + "maximum": 9223372036854776000, + "minimum": -9223372036854776000, + "nullable": true, + "type": "integer", + "x-oaiMeta": { + "beta": true + } + }, + "stop": { + "default": null, + "description": "Up to 4 sequences where the API will stop generating further tokens.\n", + "oneOf": [ + { + "nullable": true, + "type": "string" + }, + { + "items": { + "type": "string" + }, + "maxItems": 4, + "minItems": 1, + "type": "array" + } + ] + }, + "stream": { + "default": false, + "description": "If set, partial message deltas will be sent, like in ChatGPT. Tokens will be sent as data-only [server-sent events](https://developer.mozilla.org/en-US/docs/Web/API/Server-sent_events/Using_server-sent_events#Event_stream_format) as they become available, with the stream terminated by a `data: [DONE]` message. [Example Python code](https://cookbook.openai.com/examples/how_to_stream_completions).\n", + "nullable": true, + "type": "boolean" + }, + "temperature": { + "default": 1, + "description": "What sampling temperature to use, between 0 and 2. Higher values like 0.8 will make the output more random, while lower values like 0.2 will make it more focused and deterministic.\n\nWe generally recommend altering this or `top_p` but not both.\n", + "example": 1, + "maximum": 2, + "minimum": 0, + "nullable": true, + "type": "number" + }, + "tool_choice": { + "$ref": "#/components/schemas/ChatCompletionToolChoiceOption" + }, + "tools": { + "description": "A list of tools the model may call. Currently, only functions are supported as a tool. Use this to provide a list of functions the model may generate JSON inputs for.\n", + "items": { + "$ref": "#/components/schemas/ChatCompletionTool" + }, + "type": "array" + }, + "top_p": { + "default": 1, + "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.\n\nWe generally recommend altering this or `temperature` but not both.\n", + "example": 1, + "maximum": 1, + "minimum": 0, + "nullable": true, + "type": "number" + }, + "user": { + "description": "A unique identifier representing your end-user, which can help OpenAI to monitor and detect abuse. [Learn more](/docs/guides/safety-best-practices/end-user-ids).\n", + "example": "user-1234", + "type": "string" + } + }, + "required": [ + "model", + "messages" + ], + "type": "object" + }, + "CreateChatCompletionResponse": { + "description": "Represents a chat completion response returned by model, based on the provided input.", + "properties": { + "choices": { + "description": "A list of chat completion choices. Can be more than one if `n` is greater than 1.", + "items": { + "properties": { + "finish_reason": { + "description": "The reason the model stopped generating tokens. This will be `stop` if the model hit a natural stop point or a provided stop sequence,\n`length` if the maximum number of tokens specified in the request was reached,\n`content_filter` if content was omitted due to a flag from our content filters,\n`tool_calls` if the model called a tool, or `function_call` (deprecated) if the model called a function.\n", + "enum": [ + "stop", + "length", + "tool_calls", + "content_filter", + "function_call" + ], + "type": "string" + }, + "index": { + "description": "The index of the choice in the list of choices.", + "type": "integer" + }, + "message": { + "$ref": "#/components/schemas/ChatCompletionResponseMessage" + } + }, + "required": [ + "finish_reason", + "index", + "message" + ], + "type": "object" + }, + "type": "array" + }, + "created": { + "description": "The Unix timestamp (in seconds) of when the chat completion was created.", + "type": "integer" + }, + "id": { + "description": "A unique identifier for the chat completion.", + "type": "string" + }, + "model": { + "description": "The model used for the chat completion.", + "type": "string" + }, + "object": { + "description": "The object type, which is always `chat.completion`.", + "enum": [ + "chat.completion" + ], + "type": "string" + }, + "system_fingerprint": { + "description": "This fingerprint represents the backend configuration that the model runs with.\n\nCan be used in conjunction with the `seed` request parameter to understand when backend changes have been made that might impact determinism.\n", + "type": "string" + }, + "usage": { + "$ref": "#/components/schemas/CompletionUsage" + } + }, + "required": [ + "choices", + "created", + "id", + "model", + "object" + ], + "type": "object", + "x-oaiMeta": { + "example": "{\n \"id\": \"chatcmpl-123\",\n \"object\": \"chat.completion\",\n \"created\": 1677652288,\n \"model\": \"gpt-3.5-turbo-0613\",\n \"system_fingerprint\": \"fp_44709d6fcb\",\n \"choices\": [{\n \"index\": 0,\n \"message\": {\n \"role\": \"assistant\",\n \"content\": \"\\n\\nHello there, how may I assist you today?\",\n },\n \"finish_reason\": \"stop\"\n }],\n \"usage\": {\n \"prompt_tokens\": 9,\n \"completion_tokens\": 12,\n \"total_tokens\": 21\n }\n}\n", + "group": "chat", + "name": "The chat completion object" + } + }, + "CreateChatCompletionStreamResponse": { + "description": "Represents a streamed chunk of a chat completion response returned by model, based on the provided input.", + "properties": { + "choices": { + "description": "A list of chat completion choices. Can be more than one if `n` is greater than 1.", + "items": { + "properties": { + "delta": { + "$ref": "#/components/schemas/ChatCompletionStreamResponseDelta" + }, + "finish_reason": { + "description": "The reason the model stopped generating tokens. This will be `stop` if the model hit a natural stop point or a provided stop sequence,\n`length` if the maximum number of tokens specified in the request was reached,\n`content_filter` if content was omitted due to a flag from our content filters,\n`tool_calls` if the model called a tool, or `function_call` (deprecated) if the model called a function.\n", + "enum": [ + "stop", + "length", + "tool_calls", + "content_filter", + "function_call" + ], + "nullable": true, + "type": "string" + }, + "index": { + "description": "The index of the choice in the list of choices.", + "type": "integer" + } + }, + "required": [ + "delta", + "finish_reason", + "index" + ], + "type": "object" + }, + "type": "array" + }, + "created": { + "description": "The Unix timestamp (in seconds) of when the chat completion was created. Each chunk has the same timestamp.", + "type": "integer" + }, + "id": { + "description": "A unique identifier for the chat completion. Each chunk has the same ID.", + "type": "string" + }, + "model": { + "description": "The model to generate the completion.", + "type": "string" + }, + "object": { + "description": "The object type, which is always `chat.completion.chunk`.", + "enum": [ + "chat.completion.chunk" + ], + "type": "string" + }, + "system_fingerprint": { + "description": "This fingerprint represents the backend configuration that the model runs with.\n\nCan be used in conjunction with the `seed` request parameter to understand when backend changes have been made that might impact determinism.\n", + "type": "string" + } + }, + "required": [ + "choices", + "created", + "id", + "model", + "object" + ], + "type": "object", + "x-oaiMeta": { + "example": "{\"id\":\"chatcmpl-123\",\"object\":\"chat.completion.chunk\",\"created\":1694268190,\"model\":\"gpt-3.5-turbo-0613\", \"system_fingerprint\": \"fp_44709d6fcb\", \"choices\":[{\"index\":0,\"delta\":{\"role\":\"assistant\",\"content\":\"\"},\"finish_reason\":null}]}\n\n{\"id\":\"chatcmpl-123\",\"object\":\"chat.completion.chunk\",\"created\":1694268190,\"model\":\"gpt-3.5-turbo-0613\", \"system_fingerprint\": \"fp_44709d6fcb\", \"choices\":[{\"index\":0,\"delta\":{\"content\":\"Hello\"},\"finish_reason\":null}]}\n\n{\"id\":\"chatcmpl-123\",\"object\":\"chat.completion.chunk\",\"created\":1694268190,\"model\":\"gpt-3.5-turbo-0613\", \"system_fingerprint\": \"fp_44709d6fcb\", \"choices\":[{\"index\":0,\"delta\":{\"content\":\"!\"},\"finish_reason\":null}]}\n\n....\n\n{\"id\":\"chatcmpl-123\",\"object\":\"chat.completion.chunk\",\"created\":1694268190,\"model\":\"gpt-3.5-turbo-0613\", \"system_fingerprint\": \"fp_44709d6fcb\", \"choices\":[{\"index\":0,\"delta\":{\"content\":\" today\"},\"finish_reason\":null}]}\n\n{\"id\":\"chatcmpl-123\",\"object\":\"chat.completion.chunk\",\"created\":1694268190,\"model\":\"gpt-3.5-turbo-0613\", \"system_fingerprint\": \"fp_44709d6fcb\", \"choices\":[{\"index\":0,\"delta\":{\"content\":\"?\"},\"finish_reason\":null}]}\n\n{\"id\":\"chatcmpl-123\",\"object\":\"chat.completion.chunk\",\"created\":1694268190,\"model\":\"gpt-3.5-turbo-0613\", \"system_fingerprint\": \"fp_44709d6fcb\", \"choices\":[{\"index\":0,\"delta\":{},\"finish_reason\":\"stop\"}]}\n", + "group": "chat", + "name": "The chat completion chunk object" + } + }, + "CreateCompletionRequest": { + "properties": { + "best_of": { + "default": 1, + "description": "Generates `best_of` completions server-side and returns the \"best\" (the one with the highest log probability per token). Results cannot be streamed.\n\nWhen used with `n`, `best_of` controls the number of candidate completions and `n` specifies how many to return \u2013 `best_of` must be greater than `n`.\n\n**Note:** Because this parameter generates many completions, it can quickly consume your token quota. Use carefully and ensure that you have reasonable settings for `max_tokens` and `stop`.\n", + "maximum": 20, + "minimum": 0, + "nullable": true, + "type": "integer" + }, + "echo": { + "default": false, + "description": "Echo back the prompt in addition to the completion\n", + "nullable": true, + "type": "boolean" + }, + "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.\n\n[See more information about frequency and presence penalties.](/docs/guides/gpt/parameter-details)\n", + "maximum": 2, + "minimum": -2, + "nullable": true, + "type": "number" + }, + "logit_bias": { + "additionalProperties": { + "type": "integer" + }, + "default": null, + "description": "Modify the likelihood of specified tokens appearing in the completion.\n\nAccepts a JSON object that maps tokens (specified by their token ID in the GPT tokenizer) to an associated bias value from -100 to 100. You can use this [tokenizer tool](/tokenizer?view=bpe) (which works for both GPT-2 and GPT-3) to convert text to token IDs. Mathematically, the bias is added to the logits generated by the model prior to sampling. The exact effect will vary per model, but values between -1 and 1 should decrease or increase likelihood of selection; values like -100 or 100 should result in a ban or exclusive selection of the relevant token.\n\nAs an example, you can pass `{\"50256\": -100}` to prevent the <|endoftext|> token from being generated.\n", + "nullable": true, + "type": "object", + "x-oaiTypeLabel": "map" + }, + "logprobs": { + "default": null, + "description": "Include the log probabilities on the `logprobs` most likely tokens, as well the chosen tokens. For example, if `logprobs` is 5, the API will return a list of the 5 most likely tokens. The API will always return the `logprob` of the sampled token, so there may be up to `logprobs+1` elements in the response.\n\nThe maximum value for `logprobs` is 5.\n", + "maximum": 5, + "minimum": 0, + "nullable": true, + "type": "integer" + }, + "max_tokens": { + "default": 16, + "description": "The maximum number of [tokens](/tokenizer) to generate in the completion.\n\nThe token count of your prompt plus `max_tokens` cannot exceed the model's context length. [Example Python code](https://cookbook.openai.com/examples/how_to_count_tokens_with_tiktoken) for counting tokens.\n", + "example": 16, + "minimum": 0, + "nullable": true, + "type": "integer" + }, + "model": { + "anyOf": [ + { + "type": "string" + }, + { + "enum": [ + "babbage-002", + "davinci-002", + "gpt-3.5-turbo-instruct", + "text-davinci-003", + "text-davinci-002", + "text-davinci-001", + "code-davinci-002", + "text-curie-001", + "text-babbage-001", + "text-ada-001" + ], + "type": "string" + } + ], + "description": "ID of the model to use. You can use the [List models](/docs/api-reference/models/list) API to see all of your available models, or see our [Model overview](/docs/models/overview) for descriptions of them.\n", + "x-oaiTypeLabel": "string" + }, + "n": { + "default": 1, + "description": "How many completions to generate for each prompt.\n\n**Note:** Because this parameter generates many completions, it can quickly consume your token quota. Use carefully and ensure that you have reasonable settings for `max_tokens` and `stop`.\n", + "example": 1, + "maximum": 128, + "minimum": 1, + "nullable": true, + "type": "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 likelihood to talk about new topics.\n\n[See more information about frequency and presence penalties.](/docs/guides/gpt/parameter-details)\n", + "maximum": 2, + "minimum": -2, + "nullable": true, + "type": "number" + }, + "prompt": { + "default": "<|endoftext|>", + "description": "The prompt(s) to generate completions for, encoded as a string, array of strings, array of tokens, or array of token arrays.\n\nNote that <|endoftext|> is the document separator that the model sees during training, so if a prompt is not specified the model will generate as if from the beginning of a new document.\n", + "nullable": true, + "oneOf": [ + { + "default": "", + "example": "This is a test.", + "type": "string" + }, + { + "items": { + "default": "", + "example": "This is a test.", + "type": "string" + }, + "type": "array" + }, + { + "example": "[1212, 318, 257, 1332, 13]", + "items": { + "type": "integer" + }, + "minItems": 1, + "type": "array" + }, + { + "example": "[[1212, 318, 257, 1332, 13]]", + "items": { + "items": { + "type": "integer" + }, + "minItems": 1, + "type": "array" + }, + "minItems": 1, + "type": "array" + } + ] + }, + "seed": { + "description": "If specified, our system will make a best effort to sample deterministically, such that repeated requests with the same `seed` and parameters should return the same result.\n\nDeterminism is not guaranteed, and you should refer to the `system_fingerprint` response parameter to monitor changes in the backend.\n", + "maximum": 9223372036854776000, + "minimum": -9223372036854776000, + "nullable": true, + "type": "integer" + }, + "stop": { + "default": null, + "description": "Up to 4 sequences where the API will stop generating further tokens. The returned text will not contain the stop sequence.\n", + "nullable": true, + "oneOf": [ + { + "default": "<|endoftext|>", + "example": "\n", + "nullable": true, + "type": "string" + }, + { + "items": { + "example": "[\"\\n\"]", + "type": "string" + }, + "maxItems": 4, + "minItems": 1, + "type": "array" + } + ] + }, + "stream": { + "default": false, + "description": "Whether to stream back partial progress. If set, tokens will be sent as data-only [server-sent events](https://developer.mozilla.org/en-US/docs/Web/API/Server-sent_events/Using_server-sent_events#Event_stream_format) as they become available, with the stream terminated by a `data: [DONE]` message. [Example Python code](https://cookbook.openai.com/examples/how_to_stream_completions).\n", + "nullable": true, + "type": "boolean" + }, + "suffix": { + "default": null, + "description": "The suffix that comes after a completion of inserted text.", + "example": "test.", + "nullable": true, + "type": "string" + }, + "temperature": { + "default": 1, + "description": "What sampling temperature to use, between 0 and 2. Higher values like 0.8 will make the output more random, while lower values like 0.2 will make it more focused and deterministic.\n\nWe generally recommend altering this or `top_p` but not both.\n", + "example": 1, + "maximum": 2, + "minimum": 0, + "nullable": true, + "type": "number" + }, + "top_p": { + "default": 1, + "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.\n\nWe generally recommend altering this or `temperature` but not both.\n", + "example": 1, + "maximum": 1, + "minimum": 0, + "nullable": true, + "type": "number" + }, + "user": { + "description": "A unique identifier representing your end-user, which can help OpenAI to monitor and detect abuse. [Learn more](/docs/guides/safety-best-practices/end-user-ids).\n", + "example": "user-1234", + "type": "string" + } + }, + "required": [ + "model", + "prompt" + ], + "type": "object" + }, + "CreateCompletionResponse": { + "description": "Represents a completion response from the API. Note: both the streamed and non-streamed response objects share the same shape (unlike the chat endpoint).\n", + "properties": { + "choices": { + "description": "The list of completion choices the model generated for the input prompt.", + "items": { + "properties": { + "finish_reason": { + "description": "The reason the model stopped generating tokens. This will be `stop` if the model hit a natural stop point or a provided stop sequence,\n`length` if the maximum number of tokens specified in the request was reached,\nor `content_filter` if content was omitted due to a flag from our content filters.\n", + "enum": [ + "stop", + "length", + "content_filter" + ], + "type": "string" + }, + "index": { + "type": "integer" + }, + "logprobs": { + "nullable": true, + "properties": { + "text_offset": { + "items": { + "type": "integer" + }, + "type": "array" + }, + "token_logprobs": { + "items": { + "type": "number" + }, + "type": "array" + }, + "tokens": { + "items": { + "type": "string" + }, + "type": "array" + }, + "top_logprobs": { + "items": { + "additionalProperties": { + "type": "integer" + }, + "type": "object" + }, + "type": "array" + } + }, + "type": "object" + }, + "text": { + "type": "string" + } + }, + "required": [ + "finish_reason", + "index", + "logprobs", + "text" + ], + "type": "object" + }, + "type": "array" + }, + "created": { + "description": "The Unix timestamp (in seconds) of when the completion was created.", + "type": "integer" + }, + "id": { + "description": "A unique identifier for the completion.", + "type": "string" + }, + "model": { + "description": "The model used for completion.", + "type": "string" + }, + "object": { + "description": "The object type, which is always \"text_completion\"", + "enum": [ + "text_completion" + ], + "type": "string" + }, + "system_fingerprint": { + "description": "This fingerprint represents the backend configuration that the model runs with.\n\nCan be used in conjunction with the `seed` request parameter to understand when backend changes have been made that might impact determinism.\n", + "type": "string" + }, + "usage": { + "$ref": "#/components/schemas/CompletionUsage" + } + }, + "required": [ + "id", + "object", + "created", + "model", + "choices" + ], + "type": "object", + "x-oaiMeta": { + "example": "{\n \"id\": \"cmpl-uqkvlQyYK7bGYrRHQ0eXlWi7\",\n \"object\": \"text_completion\",\n \"created\": 1589478378,\n \"model\": \"gpt-3.5-turbo\",\n \"choices\": [\n {\n \"text\": \"\\n\\nThis is indeed a test\",\n \"index\": 0,\n \"logprobs\": null,\n \"finish_reason\": \"length\"\n }\n ],\n \"usage\": {\n \"prompt_tokens\": 5,\n \"completion_tokens\": 7,\n \"total_tokens\": 12\n }\n}\n", + "legacy": true, + "name": "The completion object" + } + }, + "CreateEditRequest": { + "properties": { + "input": { + "default": "", + "description": "The input text to use as a starting point for the edit.", + "example": "What day of the wek is it?", + "nullable": true, + "type": "string" + }, + "instruction": { + "description": "The instruction that tells the model how to edit the prompt.", + "example": "Fix the spelling mistakes.", + "type": "string" + }, + "model": { + "anyOf": [ + { + "type": "string" + }, + { + "enum": [ + "text-davinci-edit-001", + "code-davinci-edit-001" + ], + "type": "string" + } + ], + "description": "ID of the model to use. You can use the `text-davinci-edit-001` or `code-davinci-edit-001` model with this endpoint.", + "example": "text-davinci-edit-001", + "x-oaiTypeLabel": "string" + }, + "n": { + "default": 1, + "description": "How many edits to generate for the input and instruction.", + "example": 1, + "maximum": 20, + "minimum": 1, + "nullable": true, + "type": "integer" + }, + "temperature": { + "default": 1, + "description": "What sampling temperature to use, between 0 and 2. Higher values like 0.8 will make the output more random, while lower values like 0.2 will make it more focused and deterministic.\n\nWe generally recommend altering this or `top_p` but not both.\n", + "example": 1, + "maximum": 2, + "minimum": 0, + "nullable": true, + "type": "number" + }, + "top_p": { + "default": 1, + "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.\n\nWe generally recommend altering this or `temperature` but not both.\n", + "example": 1, + "maximum": 1, + "minimum": 0, + "nullable": true, + "type": "number" + } + }, + "required": [ + "model", + "instruction" + ], + "type": "object" + }, + "CreateEditResponse": { + "deprecated": true, + "properties": { + "choices": { + "description": "A list of edit choices. Can be more than one if `n` is greater than 1.", + "items": { + "properties": { + "finish_reason": { + "description": "The reason the model stopped generating tokens. This will be `stop` if the model hit a natural stop point or a provided stop sequence,\n`length` if the maximum number of tokens specified in the request was reached,\nor `content_filter` if content was omitted due to a flag from our content filters.\n", + "enum": [ + "stop", + "length" + ], + "type": "string" + }, + "index": { + "description": "The index of the choice in the list of choices.", + "type": "integer" + }, + "text": { + "description": "The edited result.", + "type": "string" + } + }, + "required": [ + "text", + "index", + "finish_reason" + ], + "type": "object" + }, + "type": "array" + }, + "created": { + "description": "The Unix timestamp (in seconds) of when the edit was created.", + "type": "integer" + }, + "object": { + "description": "The object type, which is always `edit`.", + "enum": [ + "edit" + ], + "type": "string" + }, + "usage": { + "$ref": "#/components/schemas/CompletionUsage" + } + }, + "required": [ + "object", + "created", + "choices", + "usage" + ], + "title": "Edit", + "type": "object", + "x-oaiMeta": { + "example": "{\n \"object\": \"edit\",\n \"created\": 1589478378,\n \"choices\": [\n {\n \"text\": \"What day of the week is it?\",\n \"index\": 0,\n }\n ],\n \"usage\": {\n \"prompt_tokens\": 25,\n \"completion_tokens\": 32,\n \"total_tokens\": 57\n }\n}\n", + "name": "The edit object" + } + }, + "CreateEmbeddingRequest": { + "additionalProperties": false, + "properties": { + "encoding_format": { + "default": "float", + "description": "The format to return the embeddings in. Can be either `float` or [`base64`](https://pypi.org/project/pybase64/).", + "enum": [ + "float", + "base64" + ], + "example": "float", + "type": "string" + }, + "input": { + "description": "Input text to embed, encoded as a string or array of tokens. To embed multiple inputs in a single request, pass an array of strings or array of token arrays. The input must not exceed the max input tokens for the model (8192 tokens for `text-embedding-ada-002`) and cannot be an empty string. [Example Python code](https://cookbook.openai.com/examples/how_to_count_tokens_with_tiktoken) for counting tokens.\n", + "example": "The quick brown fox jumped over the lazy dog", + "oneOf": [ + { + "default": "", + "example": "This is a test.", + "type": "string" + }, + { + "items": { + "default": "", + "example": "This is a test.", + "type": "string" + }, + "minItems": 1, + "type": "array" + }, + { + "example": "[1212, 318, 257, 1332, 13]", + "items": { + "type": "integer" + }, + "minItems": 1, + "type": "array" + }, + { + "example": "[[1212, 318, 257, 1332, 13]]", + "items": { + "items": { + "type": "integer" + }, + "minItems": 1, + "type": "array" + }, + "minItems": 1, + "type": "array" + } + ] + }, + "model": { + "description": "ID of the model to use. You can use the [List models](/docs/api-reference/models/list) API to see all of your available models, or see our [Model overview](/docs/models/overview) for descriptions of them.\n", + "enum": [ + "text-embedding-ada-002" + ], + "example": "text-embedding-ada-002", + "type": "string", + "x-oaiTypeLabel": "string" + }, + "user": { + "description": "A unique identifier representing your end-user, which can help OpenAI to monitor and detect abuse. [Learn more](/docs/guides/safety-best-practices/end-user-ids).\n", + "example": "user-1234", + "type": "string" + } + }, + "required": [ + "model", + "input" + ], + "type": "object" + }, + "CreateEmbeddingResponse": { + "properties": { + "data": { + "description": "The list of embeddings generated by the model.", + "items": { + "$ref": "#/components/schemas/Embedding" + }, + "type": "array" + }, + "model": { + "description": "The name of the model used to generate the embedding.", + "type": "string" + }, + "object": { + "description": "The object type, which is always \"embedding\".", + "enum": [ + "embedding" + ], + "type": "string" + }, + "usage": { + "description": "The usage information for the request.", + "properties": { + "prompt_tokens": { + "description": "The number of tokens used by the prompt.", + "type": "integer" + }, + "total_tokens": { + "description": "The total number of tokens used by the request.", + "type": "integer" + } + }, + "required": [ + "prompt_tokens", + "total_tokens" + ], + "type": "object" + } + }, + "required": [ + "object", + "model", + "data", + "usage" + ], + "type": "object" + }, + "CreateFileRequest": { + "additionalProperties": false, + "properties": { + "file": { + "description": "The File object (not file name) to be uploaded.\n", + "format": "binary", + "type": "string" + }, + "purpose": { + "description": "The intended purpose of the uploaded file.\n\nUse \"fine-tune\" for [Fine-tuning](/docs/api-reference/fine-tuning) and \"assistants\" for [Assistants](/docs/api-reference/assistants) and [Messages](/docs/api-reference/messages). This allows us to validate the format of the uploaded file is correct for fine-tuning.\n", + "enum": [ + "fine-tune", + "assistants" + ], + "type": "string" + } + }, + "required": [ + "file", + "purpose" + ], + "type": "object" + }, + "CreateFineTuneRequest": { + "properties": { + "batch_size": { + "default": null, + "description": "The batch size to use for training. The batch size is the number of\ntraining examples used to train a single forward and backward pass.\n\nBy default, the batch size will be dynamically configured to be\n~0.2% of the number of examples in the training set, capped at 256 -\nin general, we've found that larger batch sizes tend to work better\nfor larger datasets.\n", + "nullable": true, + "type": "integer" + }, + "classification_betas": { + "default": null, + "description": "If this is provided, we calculate F-beta scores at the specified\nbeta values. The F-beta score is a generalization of F-1 score.\nThis is only used for binary classification.\n\nWith a beta of 1 (i.e. the F-1 score), precision and recall are\ngiven the same weight. A larger beta score puts more weight on\nrecall and less on precision. A smaller beta score puts more weight\non precision and less on recall.\n", + "example": [ + 0.6, + 1, + 1.5, + 2 + ], + "items": { + "type": "number" + }, + "nullable": true, + "type": "array" + }, + "classification_n_classes": { + "default": null, + "description": "The number of classes in a classification task.\n\nThis parameter is required for multiclass classification.\n", + "nullable": true, + "type": "integer" + }, + "classification_positive_class": { + "default": null, + "description": "The positive class in binary classification.\n\nThis parameter is needed to generate precision, recall, and F1\nmetrics when doing binary classification.\n", + "nullable": true, + "type": "string" + }, + "compute_classification_metrics": { + "default": false, + "description": "If set, we calculate classification-specific metrics such as accuracy\nand F-1 score using the validation set at the end of every epoch.\nThese metrics can be viewed in the [results file](/docs/guides/legacy-fine-tuning/analyzing-your-fine-tuned-model).\n\nIn order to compute classification metrics, you must provide a\n`validation_file`. Additionally, you must\nspecify `classification_n_classes` for multiclass classification or\n`classification_positive_class` for binary classification.\n", + "nullable": true, + "type": "boolean" + }, + "hyperparameters": { + "description": "The hyperparameters used for the fine-tuning job.", + "properties": { + "n_epochs": { + "default": "auto", + "description": "The number of epochs to train the model for. An epoch refers to one\nfull cycle through the training dataset.\n", + "oneOf": [ + { + "enum": [ + "auto" + ], + "type": "string" + }, + { + "maximum": 50, + "minimum": 1, + "type": "integer" + } + ] + } + }, + "type": "object" + }, + "learning_rate_multiplier": { + "default": null, + "description": "The learning rate multiplier to use for training.\nThe fine-tuning learning rate is the original learning rate used for\npretraining multiplied by this value.\n\nBy default, the learning rate multiplier is the 0.05, 0.1, or 0.2\ndepending on final `batch_size` (larger learning rates tend to\nperform better with larger batch sizes). We recommend experimenting\nwith values in the range 0.02 to 0.2 to see what produces the best\nresults.\n", + "nullable": true, + "type": "number" + }, + "model": { + "anyOf": [ + { + "type": "string" + }, + { + "enum": [ + "ada", + "babbage", + "curie", + "davinci" + ], + "type": "string" + } + ], + "default": "curie", + "description": "The name of the base model to fine-tune. You can select one of \"ada\",\n\"babbage\", \"curie\", \"davinci\", or a fine-tuned model created after 2022-04-21 and before 2023-08-22.\nTo learn more about these models, see the\n[Models](/docs/models) documentation.\n", + "example": "curie", + "nullable": true, + "x-oaiTypeLabel": "string" + }, + "prompt_loss_weight": { + "default": 0.01, + "description": "The weight to use for loss on the prompt tokens. This controls how\nmuch the model tries to learn to generate the prompt (as compared\nto the completion which always has a weight of 1.0), and can add\na stabilizing effect to training when completions are short.\n\nIf prompts are extremely long (relative to completions), it may make\nsense to reduce this weight so as to avoid over-prioritizing\nlearning the prompt.\n", + "nullable": true, + "type": "number" + }, + "suffix": { + "default": null, + "description": "A string of up to 40 characters that will be added to your fine-tuned model name.\n\nFor example, a `suffix` of \"custom-model-name\" would produce a model name like `ada:ft-your-org:custom-model-name-2022-02-15-04-21-04`.\n", + "maxLength": 40, + "minLength": 1, + "nullable": true, + "type": "string" + }, + "training_file": { + "description": "The ID of an uploaded file that contains training data.\n\nSee [upload file](/docs/api-reference/files/upload) for how to upload a file.\n\nYour dataset must be formatted as a JSONL file, where each training\nexample is a JSON object with the keys \"prompt\" and \"completion\".\nAdditionally, you must upload your file with the purpose `fine-tune`.\n\nSee the [fine-tuning guide](/docs/guides/legacy-fine-tuning/creating-training-data) for more details.\n", + "example": "file-abc123", + "type": "string" + }, + "validation_file": { + "description": "The ID of an uploaded file that contains validation data.\n\nIf you provide this file, the data is used to generate validation\nmetrics periodically during fine-tuning. These metrics can be viewed in\nthe [fine-tuning results file](/docs/guides/legacy-fine-tuning/analyzing-your-fine-tuned-model).\nYour train and validation data should be mutually exclusive.\n\nYour dataset must be formatted as a JSONL file, where each validation\nexample is a JSON object with the keys \"prompt\" and \"completion\".\nAdditionally, you must upload your file with the purpose `fine-tune`.\n\nSee the [fine-tuning guide](/docs/guides/legacy-fine-tuning/creating-training-data) for more details.\n", + "example": "file-abc123", + "nullable": true, + "type": "string" + } + }, + "required": [ + "training_file" + ], + "type": "object" + }, + "CreateFineTuningJobRequest": { + "properties": { + "hyperparameters": { + "description": "The hyperparameters used for the fine-tuning job.", + "properties": { + "batch_size": { + "default": "auto", + "description": "Number of examples in each batch. A larger batch size means that model parameters\nare updated less frequently, but with lower variance.\n", + "oneOf": [ + { + "enum": [ + "auto" + ], + "type": "string" + }, + { + "maximum": 256, + "minimum": 1, + "type": "integer" + } + ] + }, + "learning_rate_multiplier": { + "default": "auto", + "description": "Scaling factor for the learning rate. A smaller learning rate may be useful to avoid\noverfitting.\n", + "oneOf": [ + { + "enum": [ + "auto" + ], + "type": "string" + }, + { + "exclusiveMinimum": true, + "minimum": 0, + "type": "number" + } + ] + }, + "n_epochs": { + "default": "auto", + "description": "The number of epochs to train the model for. An epoch refers to one full cycle \nthrough the training dataset.\n", + "oneOf": [ + { + "enum": [ + "auto" + ], + "type": "string" + }, + { + "maximum": 50, + "minimum": 1, + "type": "integer" + } + ] + } + }, + "type": "object" + }, + "model": { + "anyOf": [ + { + "type": "string" + }, + { + "enum": [ + "babbage-002", + "davinci-002", + "gpt-3.5-turbo" + ], + "type": "string" + } + ], + "description": "The name of the model to fine-tune. You can select one of the\n[supported models](/docs/guides/fine-tuning/what-models-can-be-fine-tuned).\n", + "example": "gpt-3.5-turbo", + "x-oaiTypeLabel": "string" + }, + "suffix": { + "default": null, + "description": "A string of up to 18 characters that will be added to your fine-tuned model name.\n\nFor example, a `suffix` of \"custom-model-name\" would produce a model name like `ft:gpt-3.5-turbo:openai:custom-model-name:7p4lURel`.\n", + "maxLength": 40, + "minLength": 1, + "nullable": true, + "type": "string" + }, + "training_file": { + "description": "The ID of an uploaded file that contains training data.\n\nSee [upload file](/docs/api-reference/files/upload) for how to upload a file.\n\nYour dataset must be formatted as a JSONL file. Additionally, you must upload your file with the purpose `fine-tune`.\n\nSee the [fine-tuning guide](/docs/guides/fine-tuning) for more details.\n", + "example": "file-abc123", + "type": "string" + }, + "validation_file": { + "description": "The ID of an uploaded file that contains validation data.\n\nIf you provide this file, the data is used to generate validation\nmetrics periodically during fine-tuning. These metrics can be viewed in\nthe fine-tuning results file.\nThe same data should not be present in both train and validation files.\n\nYour dataset must be formatted as a JSONL file. You must upload your file with the purpose `fine-tune`.\n\nSee the [fine-tuning guide](/docs/guides/fine-tuning) for more details.\n", + "example": "file-abc123", + "nullable": true, + "type": "string" + } + }, + "required": [ + "model", + "training_file" + ], + "type": "object" + }, + "CreateImageEditRequest": { + "properties": { + "image": { + "description": "The image to edit. Must be a valid PNG file, less than 4MB, and square. If mask is not provided, image must have transparency, which will be used as the mask.", + "format": "binary", + "type": "string" + }, + "mask": { + "description": "An additional image whose fully transparent areas (e.g. where alpha is zero) indicate where `image` should be edited. Must be a valid PNG file, less than 4MB, and have the same dimensions as `image`.", + "format": "binary", + "type": "string" + }, + "model": { + "anyOf": [ + { + "type": "string" + }, + { + "enum": [ + "dall-e-2" + ], + "type": "string" + } + ], + "default": "dall-e-2", + "description": "The model to use for image generation. Only `dall-e-2` is supported at this time.", + "example": "dall-e-2", + "nullable": true, + "x-oaiTypeLabel": "string" + }, + "n": { + "default": 1, + "description": "The number of images to generate. Must be between 1 and 10.", + "example": 1, + "maximum": 10, + "minimum": 1, + "nullable": true, + "type": "integer" + }, + "prompt": { + "description": "A text description of the desired image(s). The maximum length is 1000 characters.", + "example": "A cute baby sea otter wearing a beret", + "type": "string" + }, + "response_format": { + "default": "url", + "description": "The format in which the generated images are returned. Must be one of `url` or `b64_json`.", + "enum": [ + "url", + "b64_json" + ], + "example": "url", + "nullable": true, + "type": "string" + }, + "size": { + "default": "1024x1024", + "description": "The size of the generated images. Must be one of `256x256`, `512x512`, or `1024x1024`.", + "enum": [ + "256x256", + "512x512", + "1024x1024" + ], + "example": "1024x1024", + "nullable": true, + "type": "string" + }, + "user": { + "description": "A unique identifier representing your end-user, which can help OpenAI to monitor and detect abuse. [Learn more](/docs/guides/safety-best-practices/end-user-ids).\n", + "example": "user-1234", + "type": "string" + } + }, + "required": [ + "prompt", + "image" + ], + "type": "object" + }, + "CreateImageRequest": { + "properties": { + "model": { + "default": "dall-e-2", + "description": "The model to use for image generation.", + "enum": [ + "dall-e-2", + "dall-e-3" + ], + "example": "dall-e-3", + "nullable": true, + "type": "string", + "x-oaiTypeLabel": "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.", + "example": 1, + "maximum": 10, + "minimum": 1, + "nullable": true, + "type": "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`.", + "example": "A cute baby sea otter", + "type": "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 param is only supported for `dall-e-3`.", + "enum": [ + "standard", + "hd" + ], + "example": "standard", + "type": "string" + }, + "response_format": { + "default": "url", + "description": "The format in which the generated images are returned. Must be one of `url` or `b64_json`.", + "enum": [ + "url", + "b64_json" + ], + "example": "url", + "nullable": true, + "type": "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`, or `1024x1792` for `dall-e-3` models.", + "enum": [ + "256x256", + "512x512", + "1024x1024", + "1792x1024", + "1024x1792" + ], + "example": "1024x1024", + "nullable": true, + "type": "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`.", + "enum": [ + "vivid", + "natural" + ], + "example": "vivid", + "nullable": true, + "type": "string" + }, + "user": { + "description": "A unique identifier representing your end-user, which can help OpenAI to monitor and detect abuse. [Learn more](/docs/guides/safety-best-practices/end-user-ids).\n", + "example": "user-1234", + "type": "string" + } + }, + "required": [ + "prompt" + ], + "type": "object" + }, + "CreateImageVariationRequest": { + "properties": { + "image": { + "description": "The image to use as the basis for the variation(s). Must be a valid PNG file, less than 4MB, and square.", + "format": "binary", + "type": "string" + }, + "model": { + "anyOf": [ + { + "type": "string" + }, + { + "enum": [ + "dall-e-2" + ], + "type": "string" + } + ], + "default": "dall-e-2", + "description": "The model to use for image generation. Only `dall-e-2` is supported at this time.", + "example": "dall-e-2", + "nullable": true, + "x-oaiTypeLabel": "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.", + "example": 1, + "maximum": 10, + "minimum": 1, + "nullable": true, + "type": "integer" + }, + "response_format": { + "default": "url", + "description": "The format in which the generated images are returned. Must be one of `url` or `b64_json`.", + "enum": [ + "url", + "b64_json" + ], + "example": "url", + "nullable": true, + "type": "string" + }, + "size": { + "default": "1024x1024", + "description": "The size of the generated images. Must be one of `256x256`, `512x512`, or `1024x1024`.", + "enum": [ + "256x256", + "512x512", + "1024x1024" + ], + "example": "1024x1024", + "nullable": true, + "type": "string" + }, + "user": { + "description": "A unique identifier representing your end-user, which can help OpenAI to monitor and detect abuse. [Learn more](/docs/guides/safety-best-practices/end-user-ids).\n", + "example": "user-1234", + "type": "string" + } + }, + "required": [ + "image" + ], + "type": "object" + }, + "CreateMessageRequest": { + "additionalProperties": false, + "properties": { + "content": { + "description": "The content of the message.", + "maxLength": 32768, + "minLength": 1, + "type": "string" + }, + "file_ids": { + "default": [], + "description": "A list of [File](/docs/api-reference/files) IDs that the message should use. There can be a maximum of 10 files attached to a message. Useful for tools like `retrieval` and `code_interpreter` that can access and use files.", + "items": { + "type": "string" + }, + "maxItems": 10, + "minItems": 1, + "type": "array" + }, + "metadata": { + "description": "Set of 16 key-value pairs that can be attached to an object. This can be useful for storing additional information about the object in a structured format. Keys can be a maximum of 64 characters long and values can be a maxium of 512 characters long.\n", + "nullable": true, + "type": "object", + "x-oaiTypeLabel": "map" + }, + "role": { + "description": "The role of the entity that is creating the message. Currently only `user` is supported.", + "enum": [ + "user" + ], + "type": "string" + } + }, + "required": [ + "role", + "content" + ], + "type": "object" + }, + "CreateModerationRequest": { + "properties": { + "input": { + "description": "The input text to classify", + "oneOf": [ + { + "default": "", + "example": "I want to kill them.", + "type": "string" + }, + { + "items": { + "default": "", + "example": "I want to kill them.", + "type": "string" + }, + "type": "array" + } + ] + }, + "model": { + "anyOf": [ + { + "type": "string" + }, + { + "enum": [ + "text-moderation-latest", + "text-moderation-stable" + ], + "type": "string" + } + ], + "default": "text-moderation-latest", + "description": "Two content moderations models are available: `text-moderation-stable` and `text-moderation-latest`.\n\nThe default is `text-moderation-latest` which will be automatically upgraded over time. This ensures you are always using our most accurate model. If you use `text-moderation-stable`, we will provide advanced notice before updating the model. Accuracy of `text-moderation-stable` may be slightly lower than for `text-moderation-latest`.\n", + "example": "text-moderation-stable", + "nullable": false, + "x-oaiTypeLabel": "string" + } + }, + "required": [ + "input" + ], + "type": "object" + }, + "CreateModerationResponse": { + "description": "Represents policy compliance report by OpenAI's content moderation model against a given input.", + "properties": { + "id": { + "description": "The unique identifier for the moderation request.", + "type": "string" + }, + "model": { + "description": "The model used to generate the moderation results.", + "type": "string" + }, + "results": { + "description": "A list of moderation objects.", + "items": { + "properties": { + "categories": { + "description": "A list of the categories, and whether they are flagged or not.", + "properties": { + "harassment": { + "description": "Content that expresses, incites, or promotes harassing language towards any target.", + "type": "boolean" + }, + "harassment/threatening": { + "description": "Harassment content that also includes violence or serious harm towards any target.", + "type": "boolean" + }, + "hate": { + "description": "Content that expresses, incites, or promotes hate based on race, gender, ethnicity, religion, nationality, sexual orientation, disability status, or caste. Hateful content aimed at non-protected groups (e.g., chess players) is harrassment.", + "type": "boolean" + }, + "hate/threatening": { + "description": "Hateful content that also includes violence or serious harm towards the targeted group based on race, gender, ethnicity, religion, nationality, sexual orientation, disability status, or caste.", + "type": "boolean" + }, + "self-harm": { + "description": "Content that promotes, encourages, or depicts acts of self-harm, such as suicide, cutting, and eating disorders.", + "type": "boolean" + }, + "self-harm/instructions": { + "description": "Content that encourages performing acts of self-harm, such as suicide, cutting, and eating disorders, or that gives instructions or advice on how to commit such acts.", + "type": "boolean" + }, + "self-harm/intent": { + "description": "Content where the speaker expresses that they are engaging or intend to engage in acts of self-harm, such as suicide, cutting, and eating disorders.", + "type": "boolean" + }, + "sexual": { + "description": "Content meant to arouse sexual excitement, such as the description of sexual activity, or that promotes sexual services (excluding sex education and wellness).", + "type": "boolean" + }, + "sexual/minors": { + "description": "Sexual content that includes an individual who is under 18 years old.", + "type": "boolean" + }, + "violence": { + "description": "Content that depicts death, violence, or physical injury.", + "type": "boolean" + }, + "violence/graphic": { + "description": "Content that depicts death, violence, or physical injury in graphic detail.", + "type": "boolean" + } + }, + "required": [ + "hate", + "hate/threatening", + "harassment", + "harassment/threatening", + "self-harm", + "self-harm/intent", + "self-harm/instructions", + "sexual", + "sexual/minors", + "violence", + "violence/graphic" + ], + "type": "object" + }, + "category_scores": { + "description": "A list of the categories along with their scores as predicted by model.", + "properties": { + "harassment": { + "description": "The score for the category 'harassment'.", + "type": "number" + }, + "harassment/threatening": { + "description": "The score for the category 'harassment/threatening'.", + "type": "number" + }, + "hate": { + "description": "The score for the category 'hate'.", + "type": "number" + }, + "hate/threatening": { + "description": "The score for the category 'hate/threatening'.", + "type": "number" + }, + "self-harm": { + "description": "The score for the category 'self-harm'.", + "type": "number" + }, + "self-harm/instructions": { + "description": "The score for the category 'self-harm/instructions'.", + "type": "number" + }, + "self-harm/intent": { + "description": "The score for the category 'self-harm/intent'.", + "type": "number" + }, + "sexual": { + "description": "The score for the category 'sexual'.", + "type": "number" + }, + "sexual/minors": { + "description": "The score for the category 'sexual/minors'.", + "type": "number" + }, + "violence": { + "description": "The score for the category 'violence'.", + "type": "number" + }, + "violence/graphic": { + "description": "The score for the category 'violence/graphic'.", + "type": "number" + } + }, + "required": [ + "hate", + "hate/threatening", + "harassment", + "harassment/threatening", + "self-harm", + "self-harm/intent", + "self-harm/instructions", + "sexual", + "sexual/minors", + "violence", + "violence/graphic" + ], + "type": "object" + }, + "flagged": { + "description": "Whether the content violates [OpenAI's usage policies](/policies/usage-policies).", + "type": "boolean" + } + }, + "required": [ + "flagged", + "categories", + "category_scores" + ], + "type": "object" + }, + "type": "array" + } + }, + "required": [ + "id", + "model", + "results" + ], + "type": "object", + "x-oaiMeta": { + "example": "{\n \"id\": \"modr-XXXXX\",\n \"model\": \"text-moderation-005\",\n \"results\": [\n {\n \"flagged\": true,\n \"categories\": {\n \"sexual\": false,\n \"hate\": false,\n \"harassment\": false,\n \"self-harm\": false,\n \"sexual/minors\": false,\n \"hate/threatening\": false,\n \"violence/graphic\": false,\n \"self-harm/intent\": false,\n \"self-harm/instructions\": false,\n \"harassment/threatening\": true,\n \"violence\": true,\n },\n \"category_scores\": {\n \"sexual\": 1.2282071e-06,\n \"hate\": 0.010696256,\n \"harassment\": 0.29842457,\n \"self-harm\": 1.5236925e-08,\n \"sexual/minors\": 5.7246268e-08,\n \"hate/threatening\": 0.0060676364,\n \"violence/graphic\": 4.435014e-06,\n \"self-harm/intent\": 8.098441e-10,\n \"self-harm/instructions\": 2.8498655e-11,\n \"harassment/threatening\": 0.63055265,\n \"violence\": 0.99011886,\n }\n }\n ]\n}\n", + "name": "The moderation object" + } + }, + "CreateRunRequest": { + "additionalProperties": false, + "properties": { + "assistant_id": { + "description": "The ID of the [assistant](/docs/api-reference/assistants) to use to execute this run.", + "type": "string" + }, + "instructions": { + "description": "Override the default system message of the assistant. This is useful for modifying the behavior on a per-run basis.", + "nullable": true, + "type": "string" + }, + "metadata": { + "description": "Set of 16 key-value pairs that can be attached to an object. This can be useful for storing additional information about the object in a structured format. Keys can be a maximum of 64 characters long and values can be a maxium of 512 characters long.\n", + "nullable": true, + "type": "object", + "x-oaiTypeLabel": "map" + }, + "model": { + "description": "The ID of the [Model](/docs/api-reference/models) to be used to execute this run. If a value is provided here, it will override the model associated with the assistant. If not, the model associated with the assistant will be used.", + "nullable": true, + "type": "string" + }, + "tools": { + "description": "Override the tools the assistant can use for this run. This is useful for modifying the behavior on a per-run basis.", + "items": { + "oneOf": [ + { + "$ref": "#/components/schemas/AssistantToolsCode" + }, + { + "$ref": "#/components/schemas/AssistantToolsRetrieval" + }, + { + "$ref": "#/components/schemas/AssistantToolsFunction" + } + ], + "x-oaiExpandable": true + }, + "maxItems": 20, + "nullable": true, + "type": "array" + } + }, + "required": [ + "thread_id", + "assistant_id" + ], + "type": "object" + }, + "CreateSpeechRequest": { + "additionalProperties": false, + "properties": { + "input": { + "description": "The text to generate audio for. The maximum length is 4096 characters.", + "maxLength": 4096, + "type": "string" + }, + "model": { + "anyOf": [ + { + "type": "string" + }, + { + "enum": [ + "tts-1", + "tts-1-hd" + ], + "type": "string" + } + ], + "description": "One of the available [TTS models](/docs/models/tts): `tts-1` or `tts-1-hd`\n", + "x-oaiTypeLabel": "string" + }, + "response_format": { + "default": "mp3", + "description": "The format to audio in. Supported formats are `mp3`, `opus`, `aac`, and `flac`.", + "enum": [ + "mp3", + "opus", + "aac", + "flac" + ], + "type": "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.", + "maximum": 4, + "minimum": 0.25, + "type": "number" + }, + "voice": { + "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" + ], + "type": "string" + } + }, + "required": [ + "model", + "input", + "voice" + ], + "type": "object" + }, + "CreateThreadAndRunRequest": { + "additionalProperties": false, + "properties": { + "assistant_id": { + "description": "The ID of the [assistant](/docs/api-reference/assistants) to use to execute this run.", + "type": "string" + }, + "instructions": { + "description": "Override the default system message of the assistant. This is useful for modifying the behavior on a per-run basis.", + "nullable": true, + "type": "string" + }, + "metadata": { + "description": "Set of 16 key-value pairs that can be attached to an object. This can be useful for storing additional information about the object in a structured format. Keys can be a maximum of 64 characters long and values can be a maxium of 512 characters long.\n", + "nullable": true, + "type": "object", + "x-oaiTypeLabel": "map" + }, + "model": { + "description": "The ID of the [Model](/docs/api-reference/models) to be used to execute this run. If a value is provided here, it will override the model associated with the assistant. If not, the model associated with the assistant will be used.", + "nullable": true, + "type": "string" + }, + "thread": { + "$ref": "#/components/schemas/CreateThreadRequest", + "description": "If no thread is provided, an empty thread will be created." + }, + "tools": { + "description": "Override the tools the assistant can use for this run. This is useful for modifying the behavior on a per-run basis.", + "items": { + "oneOf": [ + { + "$ref": "#/components/schemas/AssistantToolsCode" + }, + { + "$ref": "#/components/schemas/AssistantToolsRetrieval" + }, + { + "$ref": "#/components/schemas/AssistantToolsFunction" + } + ] + }, + "maxItems": 20, + "nullable": true, + "type": "array" + } + }, + "required": [ + "thread_id", + "assistant_id" + ], + "type": "object" + }, + "CreateThreadRequest": { + "additionalProperties": false, + "properties": { + "messages": { + "description": "A list of [messages](/docs/api-reference/messages) to start the thread with.", + "items": { + "$ref": "#/components/schemas/CreateMessageRequest" + }, + "type": "array" + }, + "metadata": { + "description": "Set of 16 key-value pairs that can be attached to an object. This can be useful for storing additional information about the object in a structured format. Keys can be a maximum of 64 characters long and values can be a maxium of 512 characters long.\n", + "nullable": true, + "type": "object", + "x-oaiTypeLabel": "map" + } + }, + "type": "object" + }, + "CreateTranscriptionRequest": { + "additionalProperties": false, + "properties": { + "file": { + "description": "The audio file object (not file name) to transcribe, in one of these formats: flac, mp3, mp4, mpeg, mpga, m4a, ogg, wav, or webm.\n", + "format": "binary", + "type": "string", + "x-oaiTypeLabel": "file" + }, + "language": { + "description": "The language of the input audio. Supplying the input language in [ISO-639-1](https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes) format will improve accuracy and latency.\n", + "type": "string" + }, + "model": { + "description": "ID of the model to use. Only `whisper-1` is currently available.\n", + "enum": [ + "whisper-1" + ], + "example": "whisper-1", + "type": "string", + "x-oaiTypeLabel": "string" + }, + "prompt": { + "description": "An optional text to guide the model's style or continue a previous audio segment. The [prompt](/docs/guides/speech-to-text/prompting) should match the audio language.\n", + "type": "string" + }, + "response_format": { + "default": "json", + "description": "The format of the transcript output, in one of these options: `json`, `text`, `srt`, `verbose_json`, or `vtt`.\n", + "enum": [ + "json", + "text", + "srt", + "verbose_json", + "vtt" + ], + "type": "string" + }, + "temperature": { + "default": 0, + "description": "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](https://en.wikipedia.org/wiki/Log_probability) to automatically increase the temperature until certain thresholds are hit.\n", + "type": "number" + } + }, + "required": [ + "file", + "model" + ], + "type": "object" + }, + "CreateTranscriptionResponse": { + "properties": { + "text": { + "type": "string" + } + }, + "required": [ + "text" + ], + "type": "object" + }, + "CreateTranslationRequest": { + "additionalProperties": false, + "properties": { + "file": { + "description": "The audio file object (not file name) translate, in one of these formats: flac, mp3, mp4, mpeg, mpga, m4a, ogg, wav, or webm.\n", + "format": "binary", + "type": "string", + "x-oaiTypeLabel": "file" + }, + "model": { + "anyOf": [ + { + "type": "string" + }, + { + "enum": [ + "whisper-1" + ], + "type": "string" + } + ], + "description": "ID of the model to use. Only `whisper-1` is currently available.\n", + "example": "whisper-1", + "x-oaiTypeLabel": "string" + }, + "prompt": { + "description": "An optional text to guide the model's style or continue a previous audio segment. The [prompt](/docs/guides/speech-to-text/prompting) should be in English.\n", + "type": "string" + }, + "response_format": { + "default": "json", + "description": "The format of the transcript output, in one of these options: `json`, `text`, `srt`, `verbose_json`, or `vtt`.\n", + "type": "string" + }, + "temperature": { + "default": 0, + "description": "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](https://en.wikipedia.org/wiki/Log_probability) to automatically increase the temperature until certain thresholds are hit.\n", + "type": "number" + } + }, + "required": [ + "file", + "model" + ], + "type": "object" + }, + "CreateTranslationResponse": { + "properties": { + "text": { + "type": "string" + } + }, + "required": [ + "text" + ], + "type": "object" + }, + "DeleteAssistantFileResponse": { + "description": "Deletes the association between the assistant and the file, but does not delete the [File](/docs/api-reference/files) object itself.", + "properties": { + "deleted": { + "type": "boolean" + }, + "id": { + "type": "string" + }, + "object": { + "enum": [ + "assistant.file.deleted" + ], + "type": "string" + } + }, + "required": [ + "id", + "object", + "deleted" + ], + "type": "object" + }, + "DeleteAssistantResponse": { + "properties": { + "deleted": { + "type": "boolean" + }, + "id": { + "type": "string" + }, + "object": { + "enum": [ + "assistant.deleted" + ], + "type": "string" + } + }, + "required": [ + "id", + "object", + "deleted" + ], + "type": "object" + }, + "DeleteFileResponse": { + "properties": { + "deleted": { + "type": "boolean" + }, + "id": { + "type": "string" + }, + "object": { + "enum": [ + "file" + ], + "type": "string" + } + }, + "required": [ + "id", + "object", + "deleted" + ], + "type": "object" + }, + "DeleteMessageResponse": { + "properties": { + "deleted": { + "type": "boolean" + }, + "id": { + "type": "string" + }, + "object": { + "enum": [ + "thread.message.deleted" + ], + "type": "string" + } + }, + "required": [ + "id", + "object", + "deleted" + ], + "type": "object" + }, + "DeleteModelResponse": { + "properties": { + "deleted": { + "type": "boolean" + }, + "id": { + "type": "string" + }, + "object": { + "type": "string" + } + }, + "required": [ + "id", + "object", + "deleted" + ], + "type": "object" + }, + "DeleteThreadResponse": { + "properties": { + "deleted": { + "type": "boolean" + }, + "id": { + "type": "string" + }, + "object": { + "enum": [ + "thread.deleted" + ], + "type": "string" + } + }, + "required": [ + "id", + "object", + "deleted" + ], + "type": "object" + }, + "Embedding": { + "description": "Represents an embedding vector returned by embedding endpoint.\n", + "properties": { + "embedding": { + "description": "The embedding vector, which is a list of floats. The length of vector depends on the model as listed in the [embedding guide](/docs/guides/embeddings).\n", + "items": { + "type": "number" + }, + "type": "array" + }, + "index": { + "description": "The index of the embedding in the list of embeddings.", + "type": "integer" + }, + "object": { + "description": "The object type, which is always \"embedding\".", + "enum": [ + "embedding" + ], + "type": "string" + } + }, + "required": [ + "index", + "object", + "embedding" + ], + "type": "object", + "x-oaiMeta": { + "example": "{\n \"object\": \"embedding\",\n \"embedding\": [\n 0.0023064255,\n -0.009327292,\n .... (1536 floats total for ada-002)\n -0.0028842222,\n ],\n \"index\": 0\n}\n", + "name": "The embedding object" + } + }, + "Error": { + "properties": { + "code": { + "nullable": true, + "type": "string" + }, + "message": { + "nullable": false, + "type": "string" + }, + "param": { + "nullable": true, + "type": "string" + }, + "type": { + "nullable": false, + "type": "string" + } + }, + "required": [ + "type", + "message", + "param", + "code" + ], + "type": "object" + }, + "ErrorResponse": { + "properties": { + "error": { + "$ref": "#/components/schemas/Error" + } + }, + "required": [ + "error" + ], + "type": "object" + }, + "FineTune": { + "deprecated": true, + "description": "The `FineTune` object represents a legacy fine-tune job that has been created through the API.\n", + "properties": { + "created_at": { + "description": "The Unix timestamp (in seconds) for when the fine-tuning job was created.", + "type": "integer" + }, + "events": { + "description": "The list of events that have been observed in the lifecycle of the FineTune job.", + "items": { + "$ref": "#/components/schemas/FineTuneEvent" + }, + "type": "array" + }, + "fine_tuned_model": { + "description": "The name of the fine-tuned model that is being created.", + "nullable": true, + "type": "string" + }, + "hyperparams": { + "description": "The hyperparameters used for the fine-tuning job. See the [fine-tuning guide](/docs/guides/legacy-fine-tuning/hyperparameters) for more details.", + "properties": { + "batch_size": { + "description": "The batch size to use for training. The batch size is the number of\ntraining examples used to train a single forward and backward pass.\n", + "type": "integer" + }, + "classification_n_classes": { + "description": "The number of classes to use for computing classification metrics.\n", + "type": "integer" + }, + "classification_positive_class": { + "description": "The positive class to use for computing classification metrics.\n", + "type": "string" + }, + "compute_classification_metrics": { + "description": "The classification metrics to compute using the validation dataset at the end of every epoch.\n", + "type": "boolean" + }, + "learning_rate_multiplier": { + "description": "The learning rate multiplier to use for training.\n", + "type": "number" + }, + "n_epochs": { + "description": "The number of epochs to train the model for. An epoch refers to one\nfull cycle through the training dataset.\n", + "type": "integer" + }, + "prompt_loss_weight": { + "description": "The weight to use for loss on the prompt tokens.\n", + "type": "number" + } + }, + "required": [ + "batch_size", + "learning_rate_multiplier", + "n_epochs", + "prompt_loss_weight" + ], + "type": "object" + }, + "id": { + "description": "The object identifier, which can be referenced in the API endpoints.", + "type": "string" + }, + "model": { + "description": "The base model that is being fine-tuned.", + "type": "string" + }, + "object": { + "description": "The object type, which is always \"fine-tune\".", + "enum": [ + "fine-tune" + ], + "type": "string" + }, + "organization_id": { + "description": "The organization that owns the fine-tuning job.", + "type": "string" + }, + "result_files": { + "description": "The compiled results files for the fine-tuning job.", + "items": { + "$ref": "#/components/schemas/OpenAIFile" + }, + "type": "array" + }, + "status": { + "description": "The current status of the fine-tuning job, which can be either `created`, `running`, `succeeded`, `failed`, or `cancelled`.", + "type": "string" + }, + "training_files": { + "description": "The list of files used for training.", + "items": { + "$ref": "#/components/schemas/OpenAIFile" + }, + "type": "array" + }, + "updated_at": { + "description": "The Unix timestamp (in seconds) for when the fine-tuning job was last updated.", + "type": "integer" + }, + "validation_files": { + "description": "The list of files used for validation.", + "items": { + "$ref": "#/components/schemas/OpenAIFile" + }, + "type": "array" + } + }, + "required": [ + "created_at", + "fine_tuned_model", + "hyperparams", + "id", + "model", + "object", + "organization_id", + "result_files", + "status", + "training_files", + "updated_at", + "validation_files" + ], + "type": "object", + "x-oaiMeta": { + "example": "{\n \"id\": \"ft-AF1WoRqd3aJAHsqc9NY7iL8F\",\n \"object\": \"fine-tune\",\n \"model\": \"curie\",\n \"created_at\": 1614807352,\n \"events\": [\n {\n \"object\": \"fine-tune-event\",\n \"created_at\": 1614807352,\n \"level\": \"info\",\n \"message\": \"Job enqueued. Waiting for jobs ahead to complete. Queue number: 0.\"\n },\n {\n \"object\": \"fine-tune-event\",\n \"created_at\": 1614807356,\n \"level\": \"info\",\n \"message\": \"Job started.\"\n },\n {\n \"object\": \"fine-tune-event\",\n \"created_at\": 1614807861,\n \"level\": \"info\",\n \"message\": \"Uploaded snapshot: curie:ft-acmeco-2021-03-03-21-44-20.\"\n },\n {\n \"object\": \"fine-tune-event\",\n \"created_at\": 1614807864,\n \"level\": \"info\",\n \"message\": \"Uploaded result files: file-abc123.\"\n },\n {\n \"object\": \"fine-tune-event\",\n \"created_at\": 1614807864,\n \"level\": \"info\",\n \"message\": \"Job succeeded.\"\n }\n ],\n \"fine_tuned_model\": \"curie:ft-acmeco-2021-03-03-21-44-20\",\n \"hyperparams\": {\n \"batch_size\": 4,\n \"learning_rate_multiplier\": 0.1,\n \"n_epochs\": 4,\n \"prompt_loss_weight\": 0.1,\n },\n \"organization_id\": \"org-123\",\n \"result_files\": [\n {\n \"id\": \"file-abc123\",\n \"object\": \"file\",\n \"bytes\": 81509,\n \"created_at\": 1614807863,\n \"filename\": \"compiled_results.csv\",\n \"purpose\": \"fine-tune-results\"\n }\n ],\n \"status\": \"succeeded\",\n \"validation_files\": [],\n \"training_files\": [\n {\n \"id\": \"file-abc123\",\n \"object\": \"file\",\n \"bytes\": 1547276,\n \"created_at\": 1610062281,\n \"filename\": \"my-data-train.jsonl\",\n \"purpose\": \"fine-tune\"\n }\n ],\n \"updated_at\": 1614807865,\n}\n", + "name": "The fine-tune object" + } + }, + "FineTuneEvent": { + "deprecated": true, + "description": "Fine-tune event object", + "properties": { + "created_at": { + "type": "integer" + }, + "level": { + "type": "string" + }, + "message": { + "type": "string" + }, + "object": { + "enum": [ + "fine-tune-event" + ], + "type": "string" + } + }, + "required": [ + "object", + "created_at", + "level", + "message" + ], + "type": "object", + "x-oaiMeta": { + "example": "{\n \"object\": \"fine-tune-event\",\n \"created_at\": 1677610602,\n \"level\": \"info\",\n \"message\": \"Created fine-tune job\"\n}\n", + "name": "The fine-tune event object" + } + }, + "FineTuningJob": { + "description": "The `fine_tuning.job` object represents a fine-tuning job that has been created through the API.\n", + "properties": { + "created_at": { + "description": "The Unix timestamp (in seconds) for when the fine-tuning job was created.", + "type": "integer" + }, + "error": { + "description": "For fine-tuning jobs that have `failed`, this will contain more information on the cause of the failure.", + "nullable": true, + "properties": { + "code": { + "description": "A machine-readable error code.", + "type": "string" + }, + "message": { + "description": "A human-readable error message.", + "type": "string" + }, + "param": { + "description": "The parameter that was invalid, usually `training_file` or `validation_file`. This field will be null if the failure was not parameter-specific.", + "nullable": true, + "type": "string" + } + }, + "required": [ + "code", + "message", + "param" + ], + "type": "object" + }, + "fine_tuned_model": { + "description": "The name of the fine-tuned model that is being created. The value will be null if the fine-tuning job is still running.", + "nullable": true, + "type": "string" + }, + "finished_at": { + "description": "The Unix timestamp (in seconds) for when the fine-tuning job was finished. The value will be null if the fine-tuning job is still running.", + "nullable": true, + "type": "integer" + }, + "hyperparameters": { + "description": "The hyperparameters used for the fine-tuning job. See the [fine-tuning guide](/docs/guides/fine-tuning) for more details.", + "properties": { + "n_epochs": { + "default": "auto", + "description": "The number of epochs to train the model for. An epoch refers to one full cycle through the training dataset.\n\"auto\" decides the optimal number of epochs based on the size of the dataset. If setting the number manually, we support any number between 1 and 50 epochs.", + "oneOf": [ + { + "enum": [ + "auto" + ], + "type": "string" + }, + { + "maximum": 50, + "minimum": 1, + "type": "integer" + } + ] + } + }, + "required": [ + "n_epochs" + ], + "type": "object" + }, + "id": { + "description": "The object identifier, which can be referenced in the API endpoints.", + "type": "string" + }, + "model": { + "description": "The base model that is being fine-tuned.", + "type": "string" + }, + "object": { + "description": "The object type, which is always \"fine_tuning.job\".", + "enum": [ + "fine_tuning.job" + ], + "type": "string" + }, + "organization_id": { + "description": "The organization that owns the fine-tuning job.", + "type": "string" + }, + "result_files": { + "description": "The compiled results file ID(s) for the fine-tuning job. You can retrieve the results with the [Files API](/docs/api-reference/files/retrieve-contents).", + "items": { + "example": "file-abc123", + "type": "string" + }, + "type": "array" + }, + "status": { + "description": "The current status of the fine-tuning job, which can be either `validating_files`, `queued`, `running`, `succeeded`, `failed`, or `cancelled`.", + "enum": [ + "validating_files", + "queued", + "running", + "succeeded", + "failed", + "cancelled" + ], + "type": "string" + }, + "trained_tokens": { + "description": "The total number of billable tokens processed by this fine-tuning job. The value will be null if the fine-tuning job is still running.", + "nullable": true, + "type": "integer" + }, + "training_file": { + "description": "The file ID used for training. You can retrieve the training data with the [Files API](/docs/api-reference/files/retrieve-contents).", + "type": "string" + }, + "validation_file": { + "description": "The file ID used for validation. You can retrieve the validation results with the [Files API](/docs/api-reference/files/retrieve-contents).", + "nullable": true, + "type": "string" + } + }, + "required": [ + "created_at", + "error", + "finished_at", + "fine_tuned_model", + "hyperparameters", + "id", + "model", + "object", + "organization_id", + "result_files", + "status", + "trained_tokens", + "training_file", + "validation_file" + ], + "title": "FineTuningJob", + "type": "object", + "x-oaiMeta": { + "example": "{\n \"object\": \"fine_tuning.job\",\n \"id\": \"ftjob-abc123\",\n \"model\": \"davinci-002\",\n \"created_at\": 1692661014,\n \"finished_at\": 1692661190,\n \"fine_tuned_model\": \"ft:davinci-002:my-org:custom_suffix:7q8mpxmy\",\n \"organization_id\": \"org-123\",\n \"result_files\": [\n \"file-abc123\"\n ],\n \"status\": \"succeeded\",\n \"validation_file\": null,\n \"training_file\": \"file-abc123\",\n \"hyperparameters\": {\n \"n_epochs\": 4,\n },\n \"trained_tokens\": 5768\n}\n", + "name": "The fine-tuning job object" + } + }, + "FineTuningJobEvent": { + "description": "Fine-tuning job event object", + "properties": { + "created_at": { + "type": "integer" + }, + "id": { + "type": "string" + }, + "level": { + "enum": [ + "info", + "warn", + "error" + ], + "type": "string" + }, + "message": { + "type": "string" + }, + "object": { + "enum": [ + "fine_tuning.job.event" + ], + "type": "string" + } + }, + "required": [ + "id", + "object", + "created_at", + "level", + "message" + ], + "type": "object", + "x-oaiMeta": { + "example": "{\n \"object\": \"fine_tuning.job.event\",\n \"id\": \"ftevent-abc123\"\n \"created_at\": 1677610602,\n \"level\": \"info\",\n \"message\": \"Created fine-tuning job\"\n}\n", + "name": "The fine-tuning job event object" + } + }, + "Image": { + "description": "Represents the url or the content of an image generated by the OpenAI API.", + "properties": { + "b64_json": { + "description": "The base64-encoded JSON of the generated image, if `response_format` is `b64_json`.", + "type": "string" + }, + "revised_prompt": { + "description": "The prompt that was used to generate the image, if there was any revision to the prompt.", + "type": "string" + }, + "url": { + "description": "The URL of the generated image, if `response_format` is `url` (default).", + "type": "string" + } + }, + "type": "object", + "x-oaiMeta": { + "example": "{\n \"url\": \"...\",\n \"revised_prompt\": \"...\"\n}\n", + "name": "The image object" + } + }, + "ImagesResponse": { + "properties": { + "created": { + "type": "integer" + }, + "data": { + "items": { + "$ref": "#/components/schemas/Image" + }, + "type": "array" + } + }, + "required": [ + "created", + "data" + ] + }, + "ListAssistantFilesResponse": { + "properties": { + "data": { + "items": { + "$ref": "#/components/schemas/AssistantFileObject" + }, + "type": "array" + }, + "first_id": { + "example": "file-hLBK7PXBv5Lr2NQT7KLY0ag1", + "type": "string" + }, + "has_more": { + "example": false, + "type": "boolean" + }, + "last_id": { + "example": "file-QLoItBbqwyAJEzlTy4y9kOMM", + "type": "string" + }, + "object": { + "example": "list", + "type": "string" + } + }, + "required": [ + "object", + "data", + "items", + "first_id", + "last_id", + "has_more" + ] + }, + "ListAssistantsResponse": { + "properties": { + "data": { + "items": { + "$ref": "#/components/schemas/AssistantObject" + }, + "type": "array" + }, + "first_id": { + "example": "asst_hLBK7PXBv5Lr2NQT7KLY0ag1", + "type": "string" + }, + "has_more": { + "example": false, + "type": "boolean" + }, + "last_id": { + "example": "asst_QLoItBbqwyAJEzlTy4y9kOMM", + "type": "string" + }, + "object": { + "example": "list", + "type": "string" + } + }, + "required": [ + "object", + "data", + "first_id", + "last_id", + "has_more" + ], + "type": "object", + "x-oaiMeta": { + "example": "{\n \"object\": \"list\",\n \"data\": [\n {\n \"id\": \"asst_abc123\",\n \"object\": \"assistant\",\n \"created_at\": 1698982736,\n \"name\": \"Coding Tutor\",\n \"description\": null,\n \"model\": \"gpt-4\",\n \"instructions\": \"You are a helpful assistant designed to make me better at coding!\",\n \"tools\": [],\n \"file_ids\": [],\n \"metadata\": {}\n },\n {\n \"id\": \"asst_abc456\",\n \"object\": \"assistant\",\n \"created_at\": 1698982718,\n \"name\": \"My Assistant\",\n \"description\": null,\n \"model\": \"gpt-4\",\n \"instructions\": \"You are a helpful assistant designed to make me better at coding!\",\n \"tools\": [],\n \"file_ids\": [],\n \"metadata\": {}\n },\n {\n \"id\": \"asst_abc789\",\n \"object\": \"assistant\",\n \"created_at\": 1698982643,\n \"name\": null,\n \"description\": null,\n \"model\": \"gpt-4\",\n \"instructions\": null,\n \"tools\": [],\n \"file_ids\": [],\n \"metadata\": {}\n }\n ],\n \"first_id\": \"asst_abc123\",\n \"last_id\": \"asst_abc789\",\n \"has_more\": false\n}\n", + "group": "chat", + "name": "List assistants response object" + } + }, + "ListFilesResponse": { + "properties": { + "data": { + "items": { + "$ref": "#/components/schemas/OpenAIFile" + }, + "type": "array" + }, + "object": { + "enum": [ + "list" + ], + "type": "string" + } + }, + "required": [ + "object", + "data" + ], + "type": "object" + }, + "ListFineTuneEventsResponse": { + "properties": { + "data": { + "items": { + "$ref": "#/components/schemas/FineTuneEvent" + }, + "type": "array" + }, + "object": { + "enum": [ + "list" + ], + "type": "string" + } + }, + "required": [ + "object", + "data" + ], + "type": "object" + }, + "ListFineTunesResponse": { + "properties": { + "data": { + "items": { + "$ref": "#/components/schemas/FineTune" + }, + "type": "array" + }, + "object": { + "enum": [ + "list" + ], + "type": "string" + } + }, + "required": [ + "object", + "data" + ], + "type": "object" + }, + "ListFineTuningJobEventsResponse": { + "properties": { + "data": { + "items": { + "$ref": "#/components/schemas/FineTuningJobEvent" + }, + "type": "array" + }, + "object": { + "enum": [ + "list" + ], + "type": "string" + } + }, + "required": [ + "object", + "data" + ], + "type": "object" + }, + "ListMessageFilesResponse": { + "properties": { + "data": { + "items": { + "$ref": "#/components/schemas/MessageFileObject" + }, + "type": "array" + }, + "first_id": { + "example": "file-hLBK7PXBv5Lr2NQT7KLY0ag1", + "type": "string" + }, + "has_more": { + "example": false, + "type": "boolean" + }, + "last_id": { + "example": "file-QLoItBbqwyAJEzlTy4y9kOMM", + "type": "string" + }, + "object": { + "example": "list", + "type": "string" + } + }, + "required": [ + "object", + "data", + "items", + "first_id", + "last_id", + "has_more" + ] + }, + "ListMessagesResponse": { + "properties": { + "data": { + "items": { + "$ref": "#/components/schemas/MessageObject" + }, + "type": "array" + }, + "first_id": { + "example": "msg_hLBK7PXBv5Lr2NQT7KLY0ag1", + "type": "string" + }, + "has_more": { + "example": false, + "type": "boolean" + }, + "last_id": { + "example": "msg_QLoItBbqwyAJEzlTy4y9kOMM", + "type": "string" + }, + "object": { + "example": "list", + "type": "string" + } + }, + "required": [ + "object", + "data", + "first_id", + "last_id", + "has_more" + ] + }, + "ListModelsResponse": { + "properties": { + "data": { + "items": { + "$ref": "#/components/schemas/Model" + }, + "type": "array" + }, + "object": { + "enum": [ + "list" + ], + "type": "string" + } + }, + "required": [ + "object", + "data" + ], + "type": "object" + }, + "ListPaginatedFineTuningJobsResponse": { + "properties": { + "data": { + "items": { + "$ref": "#/components/schemas/FineTuningJob" + }, + "type": "array" + }, + "has_more": { + "type": "boolean" + }, + "object": { + "enum": [ + "list" + ], + "type": "string" + } + }, + "required": [ + "object", + "data", + "has_more" + ], + "type": "object" + }, + "ListRunStepsResponse": { + "properties": { + "data": { + "items": { + "$ref": "#/components/schemas/RunStepObject" + }, + "type": "array" + }, + "first_id": { + "example": "step_hLBK7PXBv5Lr2NQT7KLY0ag1", + "type": "string" + }, + "has_more": { + "example": false, + "type": "boolean" + }, + "last_id": { + "example": "step_QLoItBbqwyAJEzlTy4y9kOMM", + "type": "string" + }, + "object": { + "example": "list", + "type": "string" + } + }, + "required": [ + "object", + "data", + "first_id", + "last_id", + "has_more" + ] + }, + "ListRunsResponse": { + "properties": { + "data": { + "items": { + "$ref": "#/components/schemas/RunObject" + }, + "type": "array" + }, + "first_id": { + "example": "run_hLBK7PXBv5Lr2NQT7KLY0ag1", + "type": "string" + }, + "has_more": { + "example": false, + "type": "boolean" + }, + "last_id": { + "example": "run_QLoItBbqwyAJEzlTy4y9kOMM", + "type": "string" + }, + "object": { + "example": "list", + "type": "string" + } + }, + "required": [ + "object", + "data", + "first_id", + "last_id", + "has_more" + ], + "type": "object" + }, + "ListThreadsResponse": { + "properties": { + "data": { + "items": { + "$ref": "#/components/schemas/ThreadObject" + }, + "type": "array" + }, + "first_id": { + "example": "asst_hLBK7PXBv5Lr2NQT7KLY0ag1", + "type": "string" + }, + "has_more": { + "example": false, + "type": "boolean" + }, + "last_id": { + "example": "asst_QLoItBbqwyAJEzlTy4y9kOMM", + "type": "string" + }, + "object": { + "example": "list", + "type": "string" + } + }, + "required": [ + "object", + "data", + "first_id", + "last_id", + "has_more" + ] + }, + "MessageContentImageFileObject": { + "description": "References an image [File](/docs/api-reference/files) in the content of a message.", + "properties": { + "image_file": { + "properties": { + "file_id": { + "description": "The [File](/docs/api-reference/files) ID of the image in the message content.", + "type": "string" + } + }, + "required": [ + "file_id" + ], + "type": "object" + }, + "type": { + "description": "Always `image_file`.", + "enum": [ + "image_file" + ], + "type": "string" + } + }, + "required": [ + "type", + "image_file" + ], + "title": "Image file", + "type": "object" + }, + "MessageContentTextAnnotationsFileCitationObject": { + "description": "A citation within the message that points to a specific quote from a specific File associated with the assistant or the message. Generated when the assistant uses the \"retrieval\" tool to search files.", + "properties": { + "end_index": { + "minimum": 0, + "type": "integer" + }, + "file_citation": { + "properties": { + "file_id": { + "description": "The ID of the specific File the citation is from.", + "type": "string" + }, + "quote": { + "description": "The specific quote in the file.", + "type": "string" + } + }, + "required": [ + "file_id", + "quote" + ], + "type": "object" + }, + "start_index": { + "minimum": 0, + "type": "integer" + }, + "text": { + "description": "The text in the message content that needs to be replaced.", + "type": "string" + }, + "type": { + "description": "Always `file_citation`.", + "enum": [ + "file_citation" + ], + "type": "string" + } + }, + "required": [ + "type", + "text", + "file_citation", + "start_index", + "end_index" + ], + "title": "File citation", + "type": "object" + }, + "MessageContentTextAnnotationsFilePathObject": { + "description": "A URL for the file that's generated when the assistant used the `code_interpreter` tool to generate a file.", + "properties": { + "end_index": { + "minimum": 0, + "type": "integer" + }, + "file_path": { + "properties": { + "file_id": { + "description": "The ID of the file that was generated.", + "type": "string" + } + }, + "required": [ + "file_id" + ], + "type": "object" + }, + "start_index": { + "minimum": 0, + "type": "integer" + }, + "text": { + "description": "The text in the message content that needs to be replaced.", + "type": "string" + }, + "type": { + "description": "Always `file_path`.", + "enum": [ + "file_path" + ], + "type": "string" + } + }, + "required": [ + "type", + "text", + "file_path", + "start_index", + "end_index" + ], + "title": "File path", + "type": "object" + }, + "MessageContentTextObject": { + "description": "The text content that is part of a message.", + "properties": { + "text": { + "properties": { + "annotations": { + "items": { + "oneOf": [ + { + "$ref": "#/components/schemas/MessageContentTextAnnotationsFileCitationObject" + }, + { + "$ref": "#/components/schemas/MessageContentTextAnnotationsFilePathObject" + } + ], + "x-oaiExpandable": true + }, + "type": "array" + }, + "value": { + "description": "The data that makes up the text.", + "type": "string" + } + }, + "required": [ + "value", + "annotations" + ], + "type": "object" + }, + "type": { + "description": "Always `text`.", + "enum": [ + "text" + ], + "type": "string" + } + }, + "required": [ + "type", + "text" + ], + "title": "Text", + "type": "object" + }, + "MessageFileObject": { + "description": "A list of files attached to a `message`.", + "properties": { + "created_at": { + "description": "The Unix timestamp (in seconds) for when the message file was created.", + "type": "integer" + }, + "id": { + "description": "The identifier, which can be referenced in API endpoints.", + "type": "string" + }, + "message_id": { + "description": "The ID of the [message](/docs/api-reference/messages) that the [File](/docs/api-reference/files) is attached to.", + "type": "string" + }, + "object": { + "description": "The object type, which is always `thread.message.file`.", + "enum": [ + "thread.message.file" + ], + "type": "string" + } + }, + "required": [ + "id", + "object", + "created_at", + "message_id" + ], + "title": "Message files", + "type": "object", + "x-oaiMeta": { + "beta": true, + "example": "{\n \"id\": \"file-BK7bzQj3FfZFXr7DbL6xJwfo\",\n \"object\": \"thread.message.file\",\n \"created_at\": 1698107661,\n \"message_id\": \"message_QLoItBbqwyAJEzlTy4y9kOMM\",\n \"file_id\": \"file-BK7bzQj3FfZFXr7DbL6xJwfo\"\n}\n", + "name": "The message file object" + } + }, + "MessageObject": { + "description": "Represents a message within a [thread](/docs/api-reference/threads).", + "properties": { + "assistant_id": { + "description": "If applicable, the ID of the [assistant](/docs/api-reference/assistants) that authored this message.", + "nullable": true, + "type": "string" + }, + "content": { + "description": "The content of the message in array of text and/or images.", + "items": { + "oneOf": [ + { + "$ref": "#/components/schemas/MessageContentImageFileObject" + }, + { + "$ref": "#/components/schemas/MessageContentTextObject" + } + ], + "x-oaiExpandable": true + }, + "type": "array" + }, + "created_at": { + "description": "The Unix timestamp (in seconds) for when the message was created.", + "type": "integer" + }, + "file_ids": { + "default": [], + "description": "A list of [file](/docs/api-reference/files) IDs that the assistant should use. Useful for tools like retrieval and code_interpreter that can access files. A maximum of 10 files can be attached to a message.", + "items": { + "type": "string" + }, + "maxItems": 10, + "type": "array" + }, + "id": { + "description": "The identifier, which can be referenced in API endpoints.", + "type": "string" + }, + "metadata": { + "description": "Set of 16 key-value pairs that can be attached to an object. This can be useful for storing additional information about the object in a structured format. Keys can be a maximum of 64 characters long and values can be a maxium of 512 characters long.\n", + "nullable": true, + "type": "object", + "x-oaiTypeLabel": "map" + }, + "object": { + "description": "The object type, which is always `thread.message`.", + "enum": [ + "thread.message" + ], + "type": "string" + }, + "role": { + "description": "The entity that produced the message. One of `user` or `assistant`.", + "enum": [ + "user", + "assistant" + ], + "type": "string" + }, + "run_id": { + "description": "If applicable, the ID of the [run](/docs/api-reference/runs) associated with the authoring of this message.", + "nullable": true, + "type": "string" + }, + "thread_id": { + "description": "The [thread](/docs/api-reference/threads) ID that this message belongs to.", + "type": "string" + } + }, + "required": [ + "id", + "object", + "created_at", + "thread_id", + "role", + "content", + "assistant_id", + "run_id", + "file_ids", + "metadata" + ], + "title": "The message object", + "type": "object", + "x-oaiMeta": { + "beta": true, + "example": "{\n \"id\": \"msg_dKYDWyQvtjDBi3tudL1yWKDa\",\n \"object\": \"thread.message\",\n \"created_at\": 1698983503,\n \"thread_id\": \"thread_RGUhOuO9b2nrktrmsQ2uSR6I\",\n \"role\": \"assistant\",\n \"content\": [\n {\n \"type\": \"text\",\n \"text\": {\n \"value\": \"Hi! How can I help you today?\",\n \"annotations\": []\n }\n }\n ],\n \"file_ids\": [],\n \"assistant_id\": \"asst_ToSF7Gb04YMj8AMMm50ZLLtY\",\n \"run_id\": \"run_BjylUJgDqYK9bOhy4yjAiMrn\",\n \"metadata\": {}\n}\n", + "name": "The message object" + } + }, + "Model": { + "description": "Describes an OpenAI model offering that can be used with the API.", + "properties": { + "created": { + "description": "The Unix timestamp (in seconds) when the model was created.", + "type": "integer" + }, + "id": { + "description": "The model identifier, which can be referenced in the API endpoints.", + "type": "string" + }, + "object": { + "description": "The object type, which is always \"model\".", + "enum": [ + "model" + ], + "type": "string" + }, + "owned_by": { + "description": "The organization that owns the model.", + "type": "string" + } + }, + "required": [ + "id", + "object", + "created", + "owned_by" + ], + "title": "Model", + "x-oaiMeta": { + "example": "{\n \"id\": \"VAR_model_id\",\n \"object\": \"model\",\n \"created\": 1686935002,\n \"owned_by\": \"openai\"\n}\n", + "name": "The model object" + } + }, + "ModifyAssistantRequest": { + "additionalProperties": false, + "properties": { + "description": { + "description": "The description of the assistant. The maximum length is 512 characters.\n", + "maxLength": 512, + "nullable": true, + "type": "string" + }, + "file_ids": { + "default": [], + "description": "A list of [File](/docs/api-reference/files) IDs attached to this assistant. There can be a maximum of 20 files attached to the assistant. Files are ordered by their creation date in ascending order. If a file was previosuly attached to the list but does not show up in the list, it will be deleted from the assistant.\n", + "items": { + "type": "string" + }, + "maxItems": 20, + "type": "array" + }, + "instructions": { + "description": "The system instructions that the assistant uses. The maximum length is 32768 characters.\n", + "maxLength": 32768, + "nullable": true, + "type": "string" + }, + "metadata": { + "description": "Set of 16 key-value pairs that can be attached to an object. This can be useful for storing additional information about the object in a structured format. Keys can be a maximum of 64 characters long and values can be a maxium of 512 characters long.\n", + "nullable": true, + "type": "object", + "x-oaiTypeLabel": "map" + }, + "model": { + "anyOf": [ + { + "type": "string" + } + ], + "description": "ID of the model to use. You can use the [List models](/docs/api-reference/models/list) API to see all of your available models, or see our [Model overview](/docs/models/overview) for descriptions of them.\n" + }, + "name": { + "description": "The name of the assistant. The maximum length is 256 characters.\n", + "maxLength": 256, + "nullable": true, + "type": "string" + }, + "tools": { + "default": [], + "description": "A list of tool enabled on the assistant. There can be a maximum of 128 tools per assistant. Tools can be of types `code_interpreter`, `retrieval`, or `function`.\n", + "items": { + "oneOf": [ + { + "$ref": "#/components/schemas/AssistantToolsCode" + }, + { + "$ref": "#/components/schemas/AssistantToolsRetrieval" + }, + { + "$ref": "#/components/schemas/AssistantToolsFunction" + } + ], + "x-oaiExpandable": true + }, + "maxItems": 128, + "type": "array" + } + }, + "type": "object" + }, + "ModifyMessageRequest": { + "additionalProperties": false, + "properties": { + "metadata": { + "description": "Set of 16 key-value pairs that can be attached to an object. This can be useful for storing additional information about the object in a structured format. Keys can be a maximum of 64 characters long and values can be a maxium of 512 characters long.\n", + "nullable": true, + "type": "object", + "x-oaiTypeLabel": "map" + } + }, + "type": "object" + }, + "ModifyRunRequest": { + "additionalProperties": false, + "properties": { + "metadata": { + "description": "Set of 16 key-value pairs that can be attached to an object. This can be useful for storing additional information about the object in a structured format. Keys can be a maximum of 64 characters long and values can be a maxium of 512 characters long.\n", + "nullable": true, + "type": "object", + "x-oaiTypeLabel": "map" + } + }, + "type": "object" + }, + "ModifyThreadRequest": { + "additionalProperties": false, + "properties": { + "metadata": { + "description": "Set of 16 key-value pairs that can be attached to an object. This can be useful for storing additional information about the object in a structured format. Keys can be a maximum of 64 characters long and values can be a maxium of 512 characters long.\n", + "nullable": true, + "type": "object", + "x-oaiTypeLabel": "map" + } + }, + "type": "object" + }, + "OpenAIFile": { + "description": "The `File` object represents a document that has been uploaded to OpenAI.", + "properties": { + "bytes": { + "description": "The size of the file, in bytes.", + "type": "integer" + }, + "created_at": { + "description": "The Unix timestamp (in seconds) for when the file was created.", + "type": "integer" + }, + "filename": { + "description": "The name of the file.", + "type": "string" + }, + "id": { + "description": "The file identifier, which can be referenced in the API endpoints.", + "type": "string" + }, + "object": { + "description": "The object type, which is always `file`.", + "enum": [ + "file" + ], + "type": "string" + }, + "purpose": { + "description": "The intended purpose of the file. Supported values are `fine-tune`, `fine-tune-results`, `assistants`, and `assistants_output`.", + "enum": [ + "fine-tune", + "fine-tune-results", + "assistants", + "assistants_output" + ], + "type": "string" + }, + "status": { + "deprecated": true, + "description": "Deprecated. The current status of the file, which can be either `uploaded`, `processed`, or `error`.", + "enum": [ + "uploaded", + "processed", + "error" + ], + "type": "string" + }, + "status_details": { + "deprecated": true, + "description": "Deprecated. For details on why a fine-tuning training file failed validation, see the `error` field on `fine_tuning.job`.", + "type": "string" + } + }, + "required": [ + "id", + "object", + "bytes", + "created_at", + "filename", + "purpose", + "status" + ], + "title": "OpenAIFile", + "x-oaiMeta": { + "example": "{\n \"id\": \"file-BK7bzQj3FfZFXr7DbL6xJwfo\",\n \"object\": \"file\",\n \"bytes\": 120000,\n \"created_at\": 1677610602,\n \"filename\": \"salesOverview.pdf\",\n \"purpose\": \"assistants\",\n}\n", + "name": "The File object" + } + }, + "RunObject": { + "description": "Represents an execution run on a [thread](/docs/api-reference/threads).", + "properties": { + "assistant_id": { + "description": "The ID of the [assistant](/docs/api-reference/assistants) used for execution of this run.", + "type": "string" + }, + "cancelled_at": { + "description": "The Unix timestamp (in seconds) for when the run was cancelled.", + "nullable": true, + "type": "integer" + }, + "completed_at": { + "description": "The Unix timestamp (in seconds) for when the run was completed.", + "nullable": true, + "type": "integer" + }, + "created_at": { + "description": "The Unix timestamp (in seconds) for when the run was created.", + "type": "integer" + }, + "expires_at": { + "description": "The Unix timestamp (in seconds) for when the run will expire.", + "type": "integer" + }, + "failed_at": { + "description": "The Unix timestamp (in seconds) for when the run failed.", + "nullable": true, + "type": "integer" + }, + "file_ids": { + "default": [], + "description": "The list of [File](/docs/api-reference/files) IDs the [assistant](/docs/api-reference/assistants) used for this run.", + "items": { + "type": "string" + }, + "type": "array" + }, + "id": { + "description": "The identifier, which can be referenced in API endpoints.", + "type": "string" + }, + "instructions": { + "description": "The instructions that the [assistant](/docs/api-reference/assistants) used for this run.", + "type": "string" + }, + "last_error": { + "description": "The last error associated with this run. Will be `null` if there are no errors.", + "nullable": true, + "properties": { + "code": { + "description": "One of `server_error` or `rate_limit_exceeded`.", + "enum": [ + "server_error", + "rate_limit_exceeded" + ], + "type": "string" + }, + "message": { + "description": "A human-readable description of the error.", + "type": "string" + } + }, + "required": [ + "code", + "message" + ], + "type": "object" + }, + "metadata": { + "description": "Set of 16 key-value pairs that can be attached to an object. This can be useful for storing additional information about the object in a structured format. Keys can be a maximum of 64 characters long and values can be a maxium of 512 characters long.\n", + "nullable": true, + "type": "object", + "x-oaiTypeLabel": "map" + }, + "model": { + "description": "The model that the [assistant](/docs/api-reference/assistants) used for this run.", + "type": "string" + }, + "object": { + "description": "The object type, which is always `assistant.run`.", + "enum": [ + "assistant.run" + ], + "type": "string" + }, + "required_action": { + "description": "Details on the action required to continue the run. Will be `null` if no action is required.", + "nullable": true, + "properties": { + "submit_tool_outputs": { + "description": "Details on the tool outputs needed for this run to continue.", + "properties": { + "tool_calls": { + "description": "A list of the relevant tool calls.", + "items": { + "$ref": "#/components/schemas/RunToolCallObject" + }, + "type": "array" + } + }, + "required": [ + "tool_calls" + ], + "type": "object" + }, + "type": { + "description": "For now, this is always `submit_tool_outputs`.", + "enum": [ + "submit_tool_outputs" + ], + "type": "string" + } + }, + "required": [ + "type", + "submit_tool_outputs" + ], + "type": "object" + }, + "started_at": { + "description": "The Unix timestamp (in seconds) for when the run was started.", + "nullable": true, + "type": "integer" + }, + "status": { + "description": "The status of the run, which can be either `queued`, `in_progress`, `requires_action`, `cancelling`, `cancelled`, `failed`, `completed`, or `expired`.", + "enum": [ + "queued", + "in_progress", + "requires_action", + "cancelling", + "cancelled", + "failed", + "completed", + "expired" + ], + "type": "string" + }, + "thread_id": { + "description": "The ID of the [thread](/docs/api-reference/threads) that was executed on as a part of this run.", + "type": "string" + }, + "tools": { + "default": [], + "description": "The list of tools that the [assistant](/docs/api-reference/assistants) used for this run.", + "items": { + "oneOf": [ + { + "$ref": "#/components/schemas/AssistantToolsCode" + }, + { + "$ref": "#/components/schemas/AssistantToolsRetrieval" + }, + { + "$ref": "#/components/schemas/AssistantToolsFunction" + } + ], + "x-oaiExpandable": true + }, + "maxItems": 20, + "type": "array" + } + }, + "required": [ + "id", + "object", + "created_at", + "thread_id", + "assistant_id", + "status", + "required_action", + "last_error", + "expires_at", + "started_at", + "cancelled_at", + "failed_at", + "completed_at", + "model", + "instructions", + "tools", + "file_ids", + "metadata" + ], + "title": "A run on a thread", + "type": "object", + "x-oaiMeta": { + "beta": true, + "example": "{\n \"id\": \"run_example123\",\n \"object\": \"thread.run\",\n \"created_at\": 1698107661,\n \"assistant_id\": \"asst_gZ1aOomboBuYWPcXJx4vAYB0\",\n \"thread_id\": \"thread_adOpf7Jbb5Abymz0QbwxAh3c\",\n \"status\": \"completed\",\n \"started_at\": 1699073476,\n \"expires_at\": null,\n \"cancelled_at\": null,\n \"failed_at\": null,\n \"completed_at\": 1699073498,\n \"last_error\": null,\n \"model\": \"gpt-4\",\n \"instructions\": null,\n \"tools\": [{\"type\": \"retrieval\"}, {\"type\": \"code_interpreter\"}],\n \"file_ids\": [],\n \"metadata\": {}\n}\n", + "name": "The run object" + } + }, + "RunStepDetailsMessageCreationObject": { + "description": "Details of the message creation by the run step.", + "properties": { + "message_creation": { + "properties": { + "message_id": { + "description": "The ID of the message that was created by this run step.", + "type": "string" + } + }, + "required": [ + "message_id" + ], + "type": "object" + }, + "type": { + "description": "Always `message_creation``.", + "enum": [ + "message_creation" + ], + "type": "string" + } + }, + "required": [ + "type", + "message_creation" + ], + "title": "Message creation", + "type": "object" + }, + "RunStepDetailsToolCallsCodeObject": { + "description": "Details of the Code Interpreter tool call the run step was involved in.", + "properties": { + "code_interpreter": { + "description": "The Code Interpreter tool call definition.", + "properties": { + "input": { + "description": "The input to the Code Interpreter tool call.", + "type": "string" + }, + "outputs": { + "description": "The outputs from the Code Interpreter tool call. Code Interpreter can output one or more items, including text (`logs`) or images (`image`). Each of these are represented by a different object type.", + "items": { + "oneOf": [ + { + "$ref": "#/components/schemas/RunStepDetailsToolCallsCodeOutputLogsObject" + }, + { + "$ref": "#/components/schemas/RunStepDetailsToolCallsCodeOutputImageObject" + } + ], + "type": "object", + "x-oaiExpandable": true + }, + "type": "array" + } + }, + "required": [ + "input", + "outputs" + ], + "type": "object" + }, + "id": { + "description": "The ID of the tool call.", + "type": "string" + }, + "type": { + "description": "The type of tool call. This is always going to be `code_interpreter` for this type of tool call.", + "enum": [ + "code_interpreter" + ], + "type": "string" + } + }, + "required": [ + "id", + "type", + "code_interpreter" + ], + "title": "Code interpreter tool call", + "type": "object" + }, + "RunStepDetailsToolCallsCodeOutputImageObject": { + "properties": { + "image": { + "properties": { + "file_id": { + "description": "The [file](/docs/api-reference/files) ID of the image.", + "type": "string" + } + }, + "required": [ + "file_id" + ], + "type": "object" + }, + "type": { + "description": "Always `image`.", + "enum": [ + "image" + ], + "type": "string" + } + }, + "required": [ + "type", + "image" + ], + "title": "Code interpreter image output", + "type": "object" + }, + "RunStepDetailsToolCallsCodeOutputLogsObject": { + "description": "Text output from the Code Interpreter tool call as part of a run step.", + "properties": { + "logs": { + "description": "The text output from the Code Interpreter tool call.", + "type": "string" + }, + "type": { + "description": "Always `logs`.", + "enum": [ + "logs" + ], + "type": "string" + } + }, + "required": [ + "type", + "logs" + ], + "title": "Code interpreter log output", + "type": "object" + }, + "RunStepDetailsToolCallsFunctionObject": { + "properties": { + "function": { + "description": "The definition of the function that was called.", + "properties": { + "arguments": { + "description": "The arguments passed to the function.", + "type": "string" + }, + "name": { + "description": "The name of the function.", + "type": "string" + }, + "output": { + "description": "The output of the function. This will be `null` if the outputs have not been [submitted](/docs/api-reference/runs/submitToolOutputs) yet.", + "nullable": true, + "type": "string" + } + }, + "required": [ + "name", + "arguments", + "output" + ], + "type": "object" + }, + "id": { + "description": "The ID of the tool call object.", + "type": "string" + }, + "type": { + "description": "The type of tool call. This is always going to be `function` for this type of tool call.", + "enum": [ + "function" + ], + "type": "string" + } + }, + "required": [ + "id", + "type", + "function" + ], + "title": "Function tool call", + "type": "object" + }, + "RunStepDetailsToolCallsObject": { + "description": "Details of the tool call.", + "properties": { + "tool_calls": { + "description": "An array of tool calls the run step was involved in. These can be associated with one of three types of tools: `code_interpreter`, `retrieval`, or `function`.\n", + "items": { + "oneOf": [ + { + "$ref": "#/components/schemas/RunStepDetailsToolCallsCodeObject" + }, + { + "$ref": "#/components/schemas/RunStepDetailsToolCallsRetrievalObject" + }, + { + "$ref": "#/components/schemas/RunStepDetailsToolCallsFunctionObject" + } + ], + "type": "object", + "x-oaiExpandable": true + }, + "type": "array" + }, + "type": { + "description": "Always `tool_calls`.", + "enum": [ + "tool_calls" + ], + "type": "string" + } + }, + "required": [ + "type", + "tool_calls" + ], + "title": "Tool calls", + "type": "object" + }, + "RunStepDetailsToolCallsRetrievalObject": { + "properties": { + "id": { + "description": "The ID of the tool call object.", + "type": "string" + }, + "retrieval": { + "description": "For now, this is always going to be an empty object.", + "type": "object", + "x-oaiTypeLabel": "map" + }, + "type": { + "description": "The type of tool call. This is always going to be `retrieval` for this type of tool call.", + "enum": [ + "retrieval" + ], + "type": "string" + } + }, + "required": [ + "id", + "type", + "retrieval" + ], + "title": "Retrieval tool call", + "type": "object" + }, + "RunStepObject": { + "description": "Represents a step in execution of a run.\n", + "properties": { + "assistant_id": { + "description": "The ID of the [assistant](/docs/api-reference/assistants) associated with the run step.", + "type": "string" + }, + "cancelled_at": { + "description": "The Unix timestamp (in seconds) for when the run step was cancelled.", + "nullable": true, + "type": "integer" + }, + "completed_at": { + "description": "The Unix timestamp (in seconds) for when the run step completed.", + "nullable": true, + "type": "integer" + }, + "created_at": { + "description": "The Unix timestamp (in seconds) for when the run step was created.", + "type": "integer" + }, + "expired_at": { + "description": "The Unix timestamp (in seconds) for when the run step expired. A step is considered expired if the parent run is expired.", + "nullable": true, + "type": "integer" + }, + "failed_at": { + "description": "The Unix timestamp (in seconds) for when the run step failed.", + "nullable": true, + "type": "integer" + }, + "id": { + "description": "The identifier of the run step, which can be referenced in API endpoints.", + "type": "string" + }, + "last_error": { + "description": "The last error associated with this run step. Will be `null` if there are no errors.", + "nullable": true, + "properties": { + "code": { + "description": "One of `server_error` or `rate_limit_exceeded`.", + "enum": [ + "server_error", + "rate_limit_exceeded" + ], + "type": "string" + }, + "message": { + "description": "A human-readable description of the error.", + "type": "string" + } + }, + "required": [ + "code", + "message" + ], + "type": "object" + }, + "metadata": { + "description": "Set of 16 key-value pairs that can be attached to an object. This can be useful for storing additional information about the object in a structured format. Keys can be a maximum of 64 characters long and values can be a maxium of 512 characters long.\n", + "nullable": true, + "type": "object", + "x-oaiTypeLabel": "map" + }, + "object": { + "description": "The object type, which is always `assistant.run.step``.", + "enum": [ + "assistant.run.step" + ], + "type": "string" + }, + "run_id": { + "description": "The ID of the [run](/docs/api-reference/runs) that this run step is a part of.", + "type": "string" + }, + "status": { + "description": "The status of the run, which can be either `in_progress`, `cancelled`, `failed`, `completed`, or `expired`.", + "enum": [ + "in_progress", + "cancelled", + "failed", + "completed", + "expired" + ], + "type": "string" + }, + "step_details": { + "description": "The details of the run step.", + "oneOf": [ + { + "$ref": "#/components/schemas/RunStepDetailsMessageCreationObject" + }, + { + "$ref": "#/components/schemas/RunStepDetailsToolCallsObject" + } + ], + "type": "object", + "x-oaiExpandable": true + }, + "thread_id": { + "description": "The ID of the [thread](/docs/api-reference/threads) that was run.", + "type": "string" + }, + "type": { + "description": "The type of run step, which can be either `message_creation` or `tool_calls`.", + "enum": [ + "message_creation", + "tool_calls" + ], + "type": "string" + } + }, + "required": [ + "id", + "object", + "created_at", + "assistant_id", + "thread_id", + "run_id", + "type", + "status", + "step_details", + "last_error", + "expired_at", + "cancelled_at", + "failed_at", + "completed_at", + "metadata" + ], + "title": "Run steps", + "type": "object", + "x-oaiMeta": { + "beta": true, + "example": "{\n \"id\": \"step_QyjyrsVsysd7F4K894BZHG97\",\n \"object\": \"thread.run.step\",\n \"created_at\": 1699063291,\n \"run_id\": \"run_UWvV94U0FQYiT2rlbBrdEVmC\",\n \"assistant_id\": \"asst_nGl00s4xa9zmVY6Fvuvz9wwQ\",\n \"thread_id\": \"thread_BDDwIqM4KgHibXX3mqmN3Lgs\",\n \"type\": \"message_creation\",\n \"status\": \"completed\",\n \"cancelled_at\": null,\n \"completed_at\": 1699063291,\n \"expired_at\": null,\n \"failed_at\": null,\n \"last_error\": null,\n \"step_details\": {\n \"type\": \"message_creation\",\n \"message_creation\": {\n \"message_id\": \"msg_6YmiCRmMbbE6FALYNePPHqwm\"\n }\n }\n}\n", + "name": "The run step object" + } + }, + "RunToolCallObject": { + "description": "Tool call objects", + "properties": { + "function": { + "description": "The function definition.", + "properties": { + "arguments": { + "description": "The arguments that the model expects you to pass to the function.", + "type": "string" + }, + "name": { + "description": "The name of the function.", + "type": "string" + } + }, + "required": [ + "name", + "arguments" + ], + "type": "object" + }, + "id": { + "description": "The ID of the tool call. This ID must be referenced when you submit the tool outputs in using the [Submit tool outputs to run](/docs/api-reference/runs/submitToolOutputs) endpoint.", + "type": "string" + }, + "type": { + "description": "The type of tool call the output is required for. For now, this is always `function`.", + "enum": [ + "function" + ], + "type": "string" + } + }, + "required": [ + "id", + "type", + "function" + ], + "type": "object" + }, + "SubmitToolOutputsRunRequest": { + "additionalProperties": false, + "properties": { + "tool_outputs": { + "description": "A list of tools for which the outputs are being submitted.", + "items": { + "properties": { + "output": { + "description": "The output of the tool call to be submitted to continue the run.", + "type": "string" + }, + "tool_call_id": { + "description": "The ID of the tool call in the `required_action` object within the run object the output is being submitted for.", + "type": "string" + } + }, + "type": "object" + }, + "type": "array" + } + }, + "required": [ + "tool_outputs" + ], + "type": "object" + }, + "ThreadObject": { + "description": "Represents a thread that contains [messages](/docs/api-reference/messages).", + "properties": { + "created_at": { + "description": "The Unix timestamp (in seconds) for when the thread was created.", + "type": "integer" + }, + "id": { + "description": "The identifier, which can be referenced in API endpoints.", + "type": "string" + }, + "metadata": { + "description": "Set of 16 key-value pairs that can be attached to an object. This can be useful for storing additional information about the object in a structured format. Keys can be a maximum of 64 characters long and values can be a maxium of 512 characters long.\n", + "nullable": true, + "type": "object", + "x-oaiTypeLabel": "map" + }, + "object": { + "description": "The object type, which is always `thread`.", + "enum": [ + "thread" + ], + "type": "string" + } + }, + "required": [ + "id", + "object", + "created_at", + "metadata" + ], + "title": "Thread", + "type": "object", + "x-oaiMeta": { + "beta": true, + "example": "{\n \"id\": \"thread_abc123\",\n \"object\": \"thread\",\n \"created_at\": 1698107661,\n \"metadata\": {}\n}\n", + "name": "The thread object" + } + } + }, + "securitySchemes": { + "ApiKeyAuth": { + "scheme": "bearer", + "type": "http" + } + } + }, + "info": { + "contact": { + "name": "OpenAI Support", + "url": "https://help.openai.com/" + }, + "description": "The OpenAI REST API. Please see https://platform.openai.com/docs/api-reference for more details.", + "license": { + "name": "MIT", + "url": "https://github.com/openai/openai-openapi/blob/master/LICENSE" + }, + "termsOfService": "https://openai.com/policies/terms-of-use", + "title": "OpenAI API", + "version": "2.0.0" + }, + "openapi": "3.0.0", + "paths": { + "/assistants": { + "get": { + "operationId": "listAssistants", + "parameters": [ + { + "description": "A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 20.\n", + "in": "query", + "name": "limit", + "required": false, + "schema": { + "default": 20, + "type": "integer" + } + }, + { + "description": "Sort order by the `created_at` timestamp of the objects. `asc` for ascending order and `desc` for descending order.\n", + "in": "query", + "name": "order", + "schema": { + "default": "desc", + "enum": [ + "asc", + "desc" + ], + "type": "string" + } + }, + { + "description": "A cursor for use in pagination. `after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with obj_foo, your subsequent call can include after=obj_foo in order to fetch the next page of the list.\n", + "in": "query", + "name": "after", + "schema": { + "type": "string" + } + }, + { + "description": "A cursor for use in pagination. `before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with obj_foo, your subsequent call can include before=obj_foo in order to fetch the previous page of the list.\n", + "in": "query", + "name": "before", + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ListAssistantsResponse" + } + } + }, + "description": "OK" + } + }, + "summary": "Returns a list of assistants.", + "tags": [ + "Assistants" + ], + "x-oaiMeta": { + "beta": true, + "examples": { + "request": { + "curl": "curl \"https://api.openai.com/v1/assistants?order=desc&limit=20\" \\\n -H \"Content-Type: application/json\" \\\n -H \"Authorization: Bearer $OPENAI_API_KEY\" \\\n -H \"OpenAI-Beta: assistants=v1\"\n", + "node.js": "import OpenAI from \"openai\";\n\nconst openai = new OpenAI();\n\nasync function main() {\n const myAssistants = await openai.beta.assistants.list({\n order: \"desc\",\n limit: \"20\",\n });\n\n console.log(myAssistants.data);\n}\n\nmain();", + "python": "from openai import OpenAI\nclient = OpenAI()\n\nmy_assistants = openai.beta.assistants.list(\n order=\"desc\",\n limit=\"20\",\n)\nprint(my_assistants.data)\n" + }, + "response": "{\n \"object\": \"list\",\n \"data\": [\n {\n \"id\": \"asst_abc123\",\n \"object\": \"assistant\",\n \"created_at\": 1698982736,\n \"name\": \"Coding Tutor\",\n \"description\": null,\n \"model\": \"gpt-4\",\n \"instructions\": \"You are a helpful assistant designed to make me better at coding!\",\n \"tools\": [],\n \"file_ids\": [],\n \"metadata\": {}\n },\n {\n \"id\": \"asst_abc456\",\n \"object\": \"assistant\",\n \"created_at\": 1698982718,\n \"name\": \"My Assistant\",\n \"description\": null,\n \"model\": \"gpt-4\",\n \"instructions\": \"You are a helpful assistant designed to make me better at coding!\",\n \"tools\": [],\n \"file_ids\": [],\n \"metadata\": {}\n },\n {\n \"id\": \"asst_abc789\",\n \"object\": \"assistant\",\n \"created_at\": 1698982643,\n \"name\": null,\n \"description\": null,\n \"model\": \"gpt-4\",\n \"instructions\": null,\n \"tools\": [],\n \"file_ids\": [],\n \"metadata\": {}\n }\n ],\n \"first_id\": \"asst_abc123\",\n \"last_id\": \"asst_abc789\",\n \"has_more\": false\n}\n" + }, + "name": "List assistants", + "returns": "A list of [assistant](/docs/api-reference/assistants/object) objects." + } + }, + "post": { + "operationId": "createAssistant", + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/CreateAssistantRequest" + } + } + }, + "required": true + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/AssistantObject" + } + } + }, + "description": "OK" + } + }, + "summary": "Create an assistant with a model and instructions.", + "tags": [ + "Assistants" + ], + "x-oaiMeta": { + "beta": true, + "examples": [ + { + "request": { + "curl": "curl \"https://api.openai.com/v1/assistants\" \\\n -H \"Content-Type: application/json\" \\\n -H \"Authorization: Bearer $OPENAI_API_KEY\" \\\n -H \"OpenAI-Beta: assistants=v1\" \\\n -d '{\n \"instructions\": \"You are a personal math tutor. When asked a question, write and run Python code to answer the question.\",\n \"name\": \"Math Tutor\"\n \"tools\": [{\"type\": \"code_interpreter\"}],\n \"model\": \"gpt-4\"\n }'\n", + "node.js": "import OpenAI from \"openai\";\n\nconst openai = new OpenAI();\n\nasync function main() {\n const myAssistant = await openai.beta.assistants.create({\n instructions:\n \"You are a personal math tutor. When asked a question, write and run Python code to answer the question.\",\n name: \"Math Tutor\",\n tools: [{ type: \"code_interpreter\" }],\n model: \"gpt-4\",\n });\n\n console.log(myAssistant);\n}\n\nmain();", + "python": "from openai import OpenAI\nclient = OpenAI()\n\nmy_assistant = openai.beta.assistants.create(\n instructions=\"You are a personal math tutor. When asked a question, write and run Python code to answer the question.\",\n name=\"Math Tutor\",\n tools=[{\"type\": \"code_interpreter\"}],\n model=\"gpt-4\",\n)\nprint(my_assistant)\n" + }, + "response": "{\n \"id\": \"asst_abc123\",\n \"object\": \"assistant\",\n \"created_at\": 1698984975,\n \"name\": \"Math Tutor\",\n \"description\": null,\n \"model\": \"gpt-4\",\n \"instructions\": \"You are a personal math tutor. When asked a question, write and run Python code to answer the question.\",\n \"tools\": [\n {\n \"type\": \"code_interpreter\"\n }\n ],\n \"file_ids\": [],\n \"metadata\": {}\n}\n", + "title": "Code Interpreter" + }, + { + "request": { + "curl": "curl https://api.openai.com/v1/assistants \\\n -H \"Content-Type: application/json\" \\\n -H \"Authorization: Bearer $OPENAI_API_KEY\" \\\n -H \"OpenAI-Beta: assistants=v1\" \\\n -d '{\n \"instructions\": \"You are an HR bot, and you have access to files to answer employee questions about company policies.\",\n \"tools\": [{\"type\": \"retrieval\"}],\n \"model\": \"gpt-4\",\n \"file_ids\": [\"file-abc123\"]\n }'\n", + "node.js": "import OpenAI from \"openai\";\n\nconst openai = new OpenAI();\n\nasync function main() {\n const myAssistant = await openai.beta.assistants.create({\n instructions:\n \"You are an HR bot, and you have access to files to answer employee questions about company policies.\",\n name: \"HR Helper\",\n tools: [{ type: \"retrieval\" }],\n model: \"gpt-4\",\n file_ids: [\"file-abc123\"],\n });\n\n console.log(myAssistant);\n}\n\nmain();", + "python": "from openai import OpenAI\nclient = OpenAI()\n\nmy_assistant = openai.beta.assistants.create(\n instructions=\"You are an HR bot, and you have access to files to answer employee questions about company policies.\",\n name=\"HR Helper\",\n tools=[{\"type\": \"retrieval\"}],\n model=\"gpt-4\",\n file_ids=[\"file-abc123\"],\n)\nprint(my_assistant)\n" + }, + "response": "{\n \"id\": \"asst_abc123\",\n \"object\": \"assistant\",\n \"created_at\": 1699009403,\n \"name\": \"HR Helper\",\n \"description\": null,\n \"model\": \"gpt-4\",\n \"instructions\": \"You are an HR bot, and you have access to files to answer employee questions about company policies.\",\n \"tools\": [\n {\n \"type\": \"retrieval\"\n }\n ],\n \"file_ids\": [\n \"file-abc123\"\n ],\n \"metadata\": {}\n}\n", + "title": "Files" + } + ], + "name": "Create assistant", + "returns": "An [assistant](/docs/api-reference/assistants/object) object." + } + } + }, + "/assistants/{assistant_id}": { + "delete": { + "operationId": "deleteAssistant", + "parameters": [ + { + "description": "The ID of the assistant to delete.", + "in": "path", + "name": "assistant_id", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/DeleteAssistantResponse" + } + } + }, + "description": "OK" + } + }, + "summary": "Delete an assistant.", + "tags": [ + "Assistants" + ], + "x-oaiMeta": { + "beta": true, + "examples": { + "request": { + "curl": "curl https://api.openai.com/v1/assistants/asst_abc123 \\\n -H \"Content-Type: application/json\" \\\n -H \"Authorization: Bearer $OPENAI_API_KEY\" \\\n -H \"OpenAI-Beta: assistants=v1\" \\\n -X DELETE\n", + "node.js": "import OpenAI from \"openai\";\n\nconst openai = new OpenAI();\n\nasync function main() {\n const response = await openai.beta.assistants.del(\"asst_QLoItBbqwyAJEzlTy4y9kOMM\");\n\n console.log(response);\n}\nmain();", + "python": "from openai import OpenAI\nclient = OpenAI()\nresponse = openai.beta.assistants.delete(\"asst_QLoItBbqwyAJEzlTy4y9kOMM\")\nprint(response)\n" + }, + "response": "{\n \"id\": \"asst_abc123\",\n \"object\": \"assistant.deleted\",\n \"deleted\": true\n}\n" + }, + "name": "Delete assistant", + "returns": "Deletion status" + } + }, + "get": { + "operationId": "getAssistant", + "parameters": [ + { + "description": "The ID of the assistant to retrieve.", + "in": "path", + "name": "assistant_id", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/AssistantObject" + } + } + }, + "description": "OK" + } + }, + "summary": "Retrieves an assistant.", + "tags": [ + "Assistants" + ], + "x-oaiMeta": { + "beta": true, + "examples": { + "request": { + "curl": "curl https://api.openai.com/v1/assistants/asst_abc123 \\\n -H \"Content-Type: application/json\" \\\n -H \"Authorization: Bearer $OPENAI_API_KEY\" \\\n -H \"OpenAI-Beta: assistants=v1\"\n", + "node.js": "import OpenAI from \"openai\";\n\nconst openai = new OpenAI();\n\nasync function main() {\n const myAssistant = await openai.beta.assistants.retrieve(\n \"asst_abc123\"\n );\n\n console.log(myAssistant);\n}\n\nmain();", + "python": "from openai import OpenAI\nclient = OpenAI()\n\nmy_assistant = openai.beta.assistants.retrieve(\"asst_abc123\")\nprint(my_assistant)\n" + }, + "response": "{\n \"id\": \"asst_abc123\",\n \"object\": \"assistant\",\n \"created_at\": 1699009709,\n \"name\": \"HR Helper\",\n \"description\": null,\n \"model\": \"gpt-4\",\n \"instructions\": \"You are an HR bot, and you have access to files to answer employee questions about company policies.\",\n \"tools\": [\n {\n \"type\": \"retrieval\"\n }\n ],\n \"file_ids\": [\n \"file-abc123\"\n ],\n \"metadata\": {}\n}\n" + }, + "name": "Retrieve assistant", + "returns": "The [assistant](/docs/api-reference/assistants/object) object matching the specified ID." + } + }, + "post": { + "operationId": "modifyAssistant", + "parameters": [ + { + "description": "The ID of the assistant to modify.", + "in": "path", + "name": "assistant_id", + "required": true, + "schema": { + "type": "string" + } + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ModifyAssistantRequest" + } + } + }, + "required": true + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/AssistantObject" + } + } + }, + "description": "OK" + } + }, + "summary": "Modifies an assistant.", + "tags": [ + "Assistant" + ], + "x-oaiMeta": { + "beta": true, + "examples": { + "request": { + "curl": "curl https://api.openai.com/v1/assistants/asst_abc123 \\\n -H \"Content-Type: application/json\" \\\n -H \"Authorization: Bearer $OPENAI_API_KEY\" \\\n -H \"OpenAI-Beta: assistants=v1\" \\\n -d '{\n \"instructions\": \"You are an HR bot, and you have access to files to answer employee questions about company policies. Always response with info from either of the files.\",\n \"tools\": [{\"type\": \"retrieval\"}],\n \"model\": \"gpt-4\",\n \"file_ids\": [\"file-abc123\", \"file-abc456\"]\n }'\n", + "node.js": "import OpenAI from \"openai\";\n\nconst openai = new OpenAI();\n\nasync function main() {\n const myUpdatedAssistant = await openai.beta.assistants.update(\n \"asst_abc123\",\n {\n instructions:\n \"You are an HR bot, and you have access to files to answer employee questions about company policies. Always response with info from either of the files.\",\n name: \"HR Helper\",\n tools: [{ type: \"retrieval\" }],\n model: \"gpt-4\",\n file_ids: [\n \"file-abc123\",\n \"file-abc456\",\n ],\n }\n );\n\n console.log(myUpdatedAssistant);\n}\n\nmain();", + "python": "from openai import OpenAI\nclient = OpenAI()\nmy_updated_assistant = openai.beta.assistants.update(\n \"asst_abc123\",\n instructions=\"You are an HR bot, and you have access to files to answer employee questions about company policies. Always response with info from either of the files.\",\n name=\"HR Helper\",\n tools=[{\"type\": \"retrieval\"}],\n model=\"gpt-4\",\n file_ids=[\"file-abc123\", \"file-abc456\"],\n)\n\nprint(my_updated_assistant)\n" + }, + "response": "{\n \"id\": \"asst_abc123\",\n \"object\": \"assistant\",\n \"created_at\": 1699009709,\n \"name\": \"HR Helper\",\n \"description\": null,\n \"model\": \"gpt-4\",\n \"instructions\": \"You are an HR bot, and you have access to files to answer employee questions about company policies. Always response with info from either of the files.\",\n \"tools\": [\n {\n \"type\": \"retrieval\"\n }\n ],\n \"file_ids\": [\n \"file-abc123\",\n \"file-abc456\"\n ],\n \"metadata\": {}\n}\n" + }, + "name": "Modify assistant", + "returns": "The modified [assistant](/docs/api-reference/assistants/object) object." + } + } + }, + "/assistants/{assistant_id}/files": { + "get": { + "operationId": "listAssistantFiles", + "parameters": [ + { + "description": "The ID of the assistant the file belongs to.", + "in": "path", + "name": "assistant_id", + "required": true, + "schema": { + "type": "string" + } + }, + { + "description": "A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 20.\n", + "in": "query", + "name": "limit", + "required": false, + "schema": { + "default": 20, + "type": "integer" + } + }, + { + "description": "Sort order by the `created_at` timestamp of the objects. `asc` for ascending order and `desc` for descending order.\n", + "in": "query", + "name": "order", + "schema": { + "default": "desc", + "enum": [ + "asc", + "desc" + ], + "type": "string" + } + }, + { + "description": "A cursor for use in pagination. `after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with obj_foo, your subsequent call can include after=obj_foo in order to fetch the next page of the list.\n", + "in": "query", + "name": "after", + "schema": { + "type": "string" + } + }, + { + "description": "A cursor for use in pagination. `before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with obj_foo, your subsequent call can include before=obj_foo in order to fetch the previous page of the list.\n", + "in": "query", + "name": "before", + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ListAssistantFilesResponse" + } + } + }, + "description": "OK" + } + }, + "summary": "Returns a list of assistant files.", + "tags": [ + "Assistants" + ], + "x-oaiMeta": { + "beta": true, + "examples": { + "request": { + "curl": "curl https://api.openai.com/v1/assistants/asst_DUGk5I7sK0FpKeijvrO30z9J/files \\\n -H 'Authorization: Bearer $OPENAI_API_KEY' \\\n -H 'Content-Type: application/json' \\\n -H 'OpenAI-Beta: assistants=v1'\n", + "node.js": "import OpenAI from \"openai\";\nconst openai = new OpenAI();\n\nasync function main() {\n const assistantFiles = await openai.beta.assistants.files.list(\n \"asst_FBOFvAOHhwEWMghbMGseaPGQ\"\n );\n console.log(assistantFiles);\n}\n\nmain();\n", + "python": "from openai import OpenAI\nclient = OpenAI()\n\nassistant_files = client.beta.assistants.files.list(\n assistant_id=\"asst_DUGk5I7sK0FpKeijvrO30z9J\"\n)\nprint(assistant_files)\n" + }, + "response": "{\n \"object\": \"list\",\n \"data\": [\n {\n \"id\": \"file-dEWwUbt2UGHp3v0e0DpCzemP\",\n \"object\": \"assistant.file\",\n \"created_at\": 1699060412,\n \"assistant_id\": \"asst_DUGk5I7sK0FpKeijvrO30z9J\"\n },\n {\n \"id\": \"file-9F1ex49ipEnKzyLUNnCA0Yzx\",\n \"object\": \"assistant.file\",\n \"created_at\": 1699060412,\n \"assistant_id\": \"asst_DUGk5I7sK0FpKeijvrO30z9J\"\n }\n ],\n \"first_id\": \"file-dEWwUbt2UGHp3v0e0DpCzemP\",\n \"last_id\": \"file-9F1ex49ipEnKzyLUNnCA0Yzx\",\n \"has_more\": false\n}\n" + }, + "name": "List assistant files", + "returns": "A list of [assistant file](/docs/api-reference/assistants/file-object) objects." + } + }, + "post": { + "operationId": "createAssistantFile", + "parameters": [ + { + "description": "The ID of the assistant for which to create a File.\n", + "in": "path", + "name": "assistant_id", + "required": true, + "schema": { + "example": "file-AF1WoRqd3aJAHsqc9NY7iL8F", + "type": "string" + } + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/CreateAssistantFileRequest" + } + } + }, + "required": true + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/AssistantFileObject" + } + } + }, + "description": "OK" + } + }, + "summary": "Create an assistant file by attaching a [File](/docs/api-reference/files) to an [assistant](/docs/api-reference/assistants).", + "tags": [ + "Assistants" + ], + "x-oaiMeta": { + "beta": true, + "examples": { + "request": { + "curl": "curl https://api.openai.com/v1/assistants/asst_FBOFvAOHhwEWMghbMGseaPGQ/files \\\n -H 'Authorization: Bearer $OPENAI_API_KEY\"' \\\n -H 'Content-Type: application/json' \\\n -H 'OpenAI-Beta: assistants=v1' \\\n -d '{\n \"file_id\": \"file-wB6RM6wHdA49HfS2DJ9fEyrH\"\n }'\n", + "node.js": "import OpenAI from \"openai\";\nconst openai = new OpenAI();\n\nasync function main() {\n const myAssistantFile = await openai.beta.assistants.files.create(\n \"asst_FBOFvAOHhwEWMghbMGseaPGQ\", \n { \n file_id: \"file-wB6RM6wHdA49HfS2DJ9fEyrH\"\n }\n );\n console.log(myAssistantFile);\n}\n\nmain();\n", + "python": "from openai import OpenAI\nclient = OpenAI()\n\nassistant_file = client.beta.assistants.files.create(\n assistant_id=\"asst_FBOFvAOHhwEWMghbMGseaPGQ\", \n file_id=\"file-wB6RM6wHdA49HfS2DJ9fEyrH\"\n)\nprint(assistant_file)\n" + }, + "response": "{\n \"id\": \"file-wB6RM6wHdA49HfS2DJ9fEyrH\",\n \"object\": \"assistant.file\",\n \"created_at\": 1699055364,\n \"assistant_id\": \"asst_FBOFvAOHhwEWMghbMGseaPGQ\"\n}\n" + }, + "name": "Create assistant file", + "returns": "An [assistant file](/docs/api-reference/assistants/file-object) object." + } + } + }, + "/assistants/{assistant_id}/files/{file_id}": { + "delete": { + "operationId": "deleteAssistantFile", + "parameters": [ + { + "description": "The ID of the assistant that the file belongs to.", + "in": "path", + "name": "assistant_id", + "required": true, + "schema": { + "type": "string" + } + }, + { + "description": "The ID of the file to delete.", + "in": "path", + "name": "file_id", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/DeleteAssistantFileResponse" + } + } + }, + "description": "OK" + } + }, + "summary": "Delete an assistant file.", + "tags": [ + "Assistants" + ], + "x-oaiMeta": { + "beta": true, + "examples": { + "request": { + "curl": "curl https://api.openai.com/v1/assistants/asst_DUGk5I7sK0FpKeijvrO30z9J/files/file-9F1ex49ipEnKzyLUNnCA0Yzx \\\n -H 'Authorization: Bearer $OPENAI_API_KEY' \\\n -H 'Content-Type: application/json' \\\n -H 'OpenAI-Beta: assistants=v1' \\\n -X DELETE\n", + "node.js": "import OpenAI from \"openai\";\nconst openai = new OpenAI();\n\nasync function main() {\n const deletedAssistantFile = await openai.beta.assistants.files.del(\n \"asst_FBOFvAOHhwEWMghbMGseaPGQ\",\n \"file-wB6RM6wHdA49HfS2DJ9fEyrH\"\n );\n console.log(deletedAssistantFile);\n}\n\nmain();\n", + "python": "from openai import OpenAI\nclient = OpenAI()\n\ndeleted_assistant_file = client.beta.assistants.files.delete(\n assistant_id=\"asst_DUGk5I7sK0FpKeijvrO30z9J\",\n file_id=\"file-dEWwUbt2UGHp3v0e0DpCzemP\"\n)\nprint(deleted_assistant_file)\n" + }, + "response": "{\n id: \"file-BK7bzQj3FfZFXr7DbL6xJwfo\",\n object: \"assistant.file.deleted\",\n deleted: true\n}\n" + }, + "name": "Delete assistant file", + "returns": "Deletion status" + } + }, + "get": { + "operationId": "getAssistantFile", + "parameters": [ + { + "description": "The ID of the assistant who the file belongs to.", + "in": "path", + "name": "assistant_id", + "required": true, + "schema": { + "type": "string" + } + }, + { + "description": "The ID of the file we're getting.", + "in": "path", + "name": "file_id", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/AssistantFileObject" + } + } + }, + "description": "OK" + } + }, + "summary": "Retrieves an AssistantFile.", + "tags": [ + "Assistants" + ], + "x-oaiMeta": { + "beta": true, + "examples": { + "request": { + "curl": "curl https://api.openai.com/v1/assistants/asst_FBOFvAOHhwEWMghbMGseaPGQ/files/file-wB6RM6wHdA49HfS2DJ9fEyrH \\\n -H 'Authorization: Bearer $OPENAI_API_KEY\"' \\\n -H 'Content-Type: application/json' \\\n -H 'OpenAI-Beta: assistants=v1'\n", + "node.js": "import OpenAI from \"openai\";\nconst openai = new OpenAI();\n\nasync function main() {\n const myAssistantFile = await openai.beta.assistants.files.retrieve(\n \"asst_FBOFvAOHhwEWMghbMGseaPGQ\",\n \"file-wB6RM6wHdA49HfS2DJ9fEyrH\"\n );\n console.log(myAssistantFile);\n}\n\nmain();\n", + "python": "from openai import OpenAI\nclient = OpenAI()\n\nassistant_file = client.beta.assistants.files.retrieve(\n assistant_id=\"asst_FBOFvAOHhwEWMghbMGseaPGQ\",\n file_id=\"file-wB6RM6wHdA49HfS2DJ9fEyrH\"\n)\nprint(assistant_file)\n" + }, + "response": "{\n \"id\": \"file-wB6RM6wHdA49HfS2DJ9fEyrH\",\n \"object\": \"assistant.file\",\n \"created_at\": 1699055364,\n \"assistant_id\": \"asst_FBOFvAOHhwEWMghbMGseaPGQ\"\n}\n" + }, + "name": "Retrieve assistant file", + "returns": "The [assistant file](/docs/api-reference/assistants/file-object) object matching the specified ID." + } + } + }, + "/audio/speech": { + "post": { + "operationId": "createSpeech", + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/CreateSpeechRequest" + } + } + }, + "required": true + }, + "responses": { + "200": { + "content": { + "application/octet-stream": { + "schema": { + "format": "binary", + "type": "string" + } + } + }, + "description": "OK", + "headers": { + "Transfer-Encoding": { + "description": "chunked", + "schema": { + "type": "string" + } + } + } + } + }, + "summary": "Generates audio from the input text.", + "tags": [ + "Audio" + ], + "x-oaiMeta": { + "examples": { + "request": { + "curl": "curl https://api.openai.com/v1/audio/speech \\\n -H \"Authorization: Bearer $OPENAI_API_KEY\" \\\n -H \"Content-Type: application/json\" \\\n -d '{\n \"model\": \"tts-1\",\n \"input\": \"The quick brown fox jumped over the lazy dog.\",\n \"voice\": \"alloy\"\n }' \\\n --output speech.mp3\n", + "node": "import fs from \"fs\";\nimport path from \"path\";\nimport OpenAI from \"openai\";\n\nconst openai = new OpenAI();\n\nconst speechFile = path.resolve(\"./speech.mp3\");\n\nasync function main() {\n const mp3 = await openai.audio.speech.create({\n model: \"tts-1\",\n voice: \"alloy\",\n input: \"Today is a wonderful day to build something people love!\",\n });\n console.log(speechFile);\n const buffer = Buffer.from(await mp3.arrayBuffer());\n await fs.promises.writeFile(speechFile, buffer);\n}\nmain();\n", + "python": "from pathlib import Path\nimport openai\n\nspeech_file_path = Path(__file__).parent / \"speech.mp3\"\nresponse = openai.audio.speech.create(\n model=\"tts-1\",\n voice=\"alloy\",\n input=\"The quick brown fox jumped over the lazy dog.\"\n)\nresponse.stream_to_file(speech_file_path)\n" + } + }, + "name": "Create speech", + "returns": "The audio file content." + } + } + }, + "/audio/transcriptions": { + "post": { + "operationId": "createTranscription", + "requestBody": { + "content": { + "multipart/form-data": { + "schema": { + "$ref": "#/components/schemas/CreateTranscriptionRequest" + } + } + }, + "required": true + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/CreateTranscriptionResponse" + } + } + }, + "description": "OK" + } + }, + "summary": "Transcribes audio into the input language.", + "tags": [ + "Audio" + ], + "x-oaiMeta": { + "examples": { + "request": { + "curl": "curl https://api.openai.com/v1/audio/transcriptions \\\n -H \"Authorization: Bearer $OPENAI_API_KEY\" \\\n -H \"Content-Type: multipart/form-data\" \\\n -F file=\"@/path/to/file/audio.mp3\" \\\n -F model=\"whisper-1\"\n", + "node": "import fs from \"fs\";\nimport OpenAI from \"openai\";\n\nconst openai = new OpenAI();\n\nasync function main() {\n const transcription = await openai.audio.transcriptions.create({\n file: fs.createReadStream(\"audio.mp3\"),\n model: \"whisper-1\",\n });\n\n console.log(transcription.text);\n}\nmain();\n", + "python": "from openai import OpenAI\nclient = OpenAI()\n\naudio_file = open(\"speech.mp3\", \"rb\")\ntranscript = client.audio.transcriptions.create(\n model=\"whisper-1\", \n file=audio_file\n)\n" + }, + "response": "{\n \"text\": \"Imagine the wildest idea that you've ever had, and you're curious about how it might scale to something that's a 100, a 1,000 times bigger. This is a place where you can get to do that.\"\n}\n" + }, + "name": "Create transcription", + "returns": "The transcribed text." + } + } + }, + "/audio/translations": { + "post": { + "operationId": "createTranslation", + "requestBody": { + "content": { + "multipart/form-data": { + "schema": { + "$ref": "#/components/schemas/CreateTranslationRequest" + } + } + }, + "required": true + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/CreateTranslationResponse" + } + } + }, + "description": "OK" + } + }, + "summary": "Translates audio into English.", + "tags": [ + "Audio" + ], + "x-oaiMeta": { + "examples": { + "request": { + "curl": "curl https://api.openai.com/v1/audio/translations \\\n -H \"Authorization: Bearer $OPENAI_API_KEY\" \\\n -H \"Content-Type: multipart/form-data\" \\\n -F file=\"@/path/to/file/german.m4a\" \\\n -F model=\"whisper-1\"\n", + "node": "const { Configuration, OpenAIApi } = require(\"openai\");\nconst configuration = new Configuration({\n apiKey: process.env.OPENAI_API_KEY,\n});\nconst openai = new OpenAIApi(configuration);\nconst resp = await openai.createTranslation(\n fs.createReadStream(\"audio.mp3\"),\n \"whisper-1\"\n);\n", + "python": "from openai import OpenAI\nclient = OpenAI()\n\naudio_file = open(\"speech.mp3\", \"rb\")\ntranscript = client.audio.translations.create(\n model=\"whisper-1\", \n file=audio_file\n)\n" + }, + "response": "{\n \"text\": \"Hello, my name is Wolfgang and I come from Germany. Where are you heading today?\"\n}\n" + }, + "name": "Create translation", + "returns": "The translated text." + } + } + }, + "/chat/completions": { + "post": { + "operationId": "createChatCompletion", + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/CreateChatCompletionRequest" + } + } + }, + "required": true + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/CreateChatCompletionResponse" + } + } + }, + "description": "OK" + } + }, + "summary": "Creates a model response for the given chat conversation.", + "tags": [ + "Chat" + ], + "x-oaiMeta": { + "examples": [ + { + "request": { + "curl": "curl https://api.openai.com/v1/chat/completions \\\n -H \"Content-Type: application/json\" \\\n -H \"Authorization: Bearer $OPENAI_API_KEY\" \\\n -d '{\n \"model\": \"VAR_model_id\",\n \"messages\": [\n {\n \"role\": \"system\",\n \"content\": \"You are a helpful assistant.\"\n },\n {\n \"role\": \"user\",\n \"content\": \"Hello!\"\n }\n ]\n }'\n", + "node.js": "import OpenAI from \"openai\";\n\nconst openai = new OpenAI();\n\nasync function main() {\n const completion = await openai.chat.completions.create({\n messages: [{ role: \"system\", content: \"You are a helpful assistant.\" }],\n model: \"VAR_model_id\",\n });\n\n console.log(completion.choices[0]);\n}\n\nmain();", + "python": "from openai import OpenAI\nclient = OpenAI()\n\ncompletion = client.chat.completions.create(\n model=\"VAR_model_id\",\n messages=[\n {\"role\": \"system\", \"content\": \"You are a helpful assistant.\"},\n {\"role\": \"user\", \"content\": \"Hello!\"}\n ]\n)\n\nprint(completion.choices[0].message)\n" + }, + "response": "{\n \"id\": \"chatcmpl-123\",\n \"object\": \"chat.completion\",\n \"created\": 1677652288,\n \"model\": \"gpt-3.5-turbo-0613\",\n \"system_fingerprint\": \"fp_44709d6fcb\",\n \"choices\": [{\n \"index\": 0,\n \"message\": {\n \"role\": \"assistant\",\n \"content\": \"\\n\\nHello there, how may I assist you today?\",\n },\n \"finish_reason\": \"stop\"\n }],\n \"usage\": {\n \"prompt_tokens\": 9,\n \"completion_tokens\": 12,\n \"total_tokens\": 21\n }\n}\n", + "title": "Default" + }, + { + "request": { + "curl": "curl https://api.openai.com/v1/chat/completions \\\n -H \"Content-Type: application/json\" \\\n -H \"Authorization: Bearer $OPENAI_API_KEY\" \\\n -d '{\n \"model\": \"VAR_model_id\",\n \"messages\": [\n {\n \"role\": \"system\",\n \"content\": \"You are a helpful assistant.\"\n },\n {\n \"role\": \"user\",\n \"content\": \"Hello!\"\n }\n ]\n }'\n", + "node.js": "import OpenAI from \"openai\";\n\nconst openai = new OpenAI();\n\nasync function main() {\n const completion = await openai.chat.completions.create({\n messages: [{ role: \"system\", content: \"You are a helpful assistant.\" }],\n model: \"VAR_model_id\",\n });\n\n console.log(completion.choices[0]);\n}\n\nmain();", + "python": "from openai import OpenAI\nclient = OpenAI()\n\ncompletion = client.chat.completions.create(\n model=\"VAR_model_id\",\n messages=[\n {\"role\": \"system\", \"content\": \"You are a helpful assistant.\"},\n {\"role\": \"user\", \"content\": \"Hello!\"}\n ]\n)\n\nprint(completion.choices[0].message)\n" + }, + "response": "{\n \"id\": \"chatcmpl-123\",\n \"object\": \"chat.completion\",\n \"created\": 1677652288,\n \"model\": \"gpt-3.5-turbo-0613\",\n \"system_fingerprint\": \"fp_44709d6fcb\",\n \"choices\": [{\n \"index\": 0,\n \"message\": {\n \"role\": \"assistant\",\n \"content\": \"\\n\\nHello there, how may I assist you today?\",\n },\n \"finish_reason\": \"stop\"\n }],\n \"usage\": {\n \"prompt_tokens\": 9,\n \"completion_tokens\": 12,\n \"total_tokens\": 21\n }\n}\n", + "title": "Image input" + }, + { + "request": { + "curl": "curl https://api.openai.com/v1/chat/completions \\\n -H \"Content-Type: application/json\" \\\n -H \"Authorization: Bearer $OPENAI_API_KEY\" \\\n -d '{\n \"model\": \"VAR_model_id\",\n \"messages\": [\n {\n \"role\": \"system\",\n \"content\": \"You are a helpful assistant.\"\n },\n {\n \"role\": \"user\",\n \"content\": \"Hello!\"\n }\n ],\n \"stream\": true\n }'\n", + "node.js": "import OpenAI from \"openai\";\n\nconst openai = new OpenAI();\n\nasync function main() {\n const completion = await openai.chat.completions.create({\n model: \"VAR_model_id\",\n messages: [\n {\"role\": \"system\", \"content\": \"You are a helpful assistant.\"},\n {\"role\": \"user\", \"content\": \"Hello!\"}\n ],\n stream: true,\n });\n\n for await (const chunk of completion) {\n console.log(chunk.choices[0].delta.content);\n }\n}\n\nmain();", + "python": "from openai import OpenAI\nclient = OpenAI()\n\ncompletion = client.chat.completions.create(\n model=\"VAR_model_id\",\n messages=[\n {\"role\": \"system\", \"content\": \"You are a helpful assistant.\"},\n {\"role\": \"user\", \"content\": \"Hello!\"}\n ],\n stream=True\n)\n\nfor chunk in completion:\n print(chunk.choices[0].delta)\n" + }, + "response": "{\"id\":\"chatcmpl-123\",\"object\":\"chat.completion.chunk\",\"created\":1694268190,\"model\":\"gpt-3.5-turbo-0613\", \"system_fingerprint\": \"fp_44709d6fcb\", \"choices\":[{\"index\":0,\"delta\":{\"role\":\"assistant\",\"content\":\"\"},\"finish_reason\":null}]}\n\n{\"id\":\"chatcmpl-123\",\"object\":\"chat.completion.chunk\",\"created\":1694268190,\"model\":\"gpt-3.5-turbo-0613\", \"system_fingerprint\": \"fp_44709d6fcb\", \"choices\":[{\"index\":0,\"delta\":{\"content\":\"Hello\"},\"finish_reason\":null}]}\n\n{\"id\":\"chatcmpl-123\",\"object\":\"chat.completion.chunk\",\"created\":1694268190,\"model\":\"gpt-3.5-turbo-0613\", \"system_fingerprint\": \"fp_44709d6fcb\", \"choices\":[{\"index\":0,\"delta\":{\"content\":\"!\"},\"finish_reason\":null}]}\n\n....\n\n{\"id\":\"chatcmpl-123\",\"object\":\"chat.completion.chunk\",\"created\":1694268190,\"model\":\"gpt-3.5-turbo-0613\", \"system_fingerprint\": \"fp_44709d6fcb\", \"choices\":[{\"index\":0,\"delta\":{\"content\":\" today\"},\"finish_reason\":null}]}\n\n{\"id\":\"chatcmpl-123\",\"object\":\"chat.completion.chunk\",\"created\":1694268190,\"model\":\"gpt-3.5-turbo-0613\", \"system_fingerprint\": \"fp_44709d6fcb\", \"choices\":[{\"index\":0,\"delta\":{\"content\":\"?\"},\"finish_reason\":null}]}\n\n{\"id\":\"chatcmpl-123\",\"object\":\"chat.completion.chunk\",\"created\":1694268190,\"model\":\"gpt-3.5-turbo-0613\", \"system_fingerprint\": \"fp_44709d6fcb\", \"choices\":[{\"index\":0,\"delta\":{},\"finish_reason\":\"stop\"}]}\n", + "title": "Streaming" + }, + { + "request": { + "curl": "curl https://api.openai.com/v1/chat/completions \\\n-H \"Content-Type: application/json\" \\\n-H \"Authorization: Bearer $OPENAI_API_KEY\" \\\n-d '{\n \"model\": \"gpt-3.5-turbo\",\n \"messages\": [\n {\n \"role\": \"user\",\n \"content\": \"What is the weather like in Boston?\"\n }\n ],\n \"functions\": [\n {\n \"name\": \"get_current_weather\",\n \"description\": \"Get the current weather in a given location\",\n \"parameters\": {\n \"type\": \"object\",\n \"properties\": {\n \"location\": {\n \"type\": \"string\",\n \"description\": \"The city and state, e.g. San Francisco, CA\"\n },\n \"unit\": {\n \"type\": \"string\",\n \"enum\": [\"celsius\", \"fahrenheit\"]\n }\n },\n \"required\": [\"location\"]\n }\n }\n ],\n \"function_call\": \"auto\"\n}'\n", + "node.js": "import OpenAI from \"openai\";\n\nconst openai = new OpenAI();\n\nasync function main() {\n const messages = [{\"role\": \"user\", \"content\": \"What's the weather like in Boston today?\"}];\n const functions = [\n {\n \"name\": \"get_current_weather\",\n \"description\": \"Get the current weather in a given location\",\n \"parameters\": {\n \"type\": \"object\",\n \"properties\": {\n \"location\": {\n \"type\": \"string\",\n \"description\": \"The city and state, e.g. San Francisco, CA\",\n },\n \"unit\": {\"type\": \"string\", \"enum\": [\"celsius\", \"fahrenheit\"]},\n },\n \"required\": [\"location\"],\n },\n }\n ];\n\n const response = await openai.chat.completions.create({\n model: \"gpt-3.5-turbo\",\n messages: messages,\n functions: functions,\n function_call: \"auto\", // auto is default, but we'll be explicit\n });\n\n console.log(response);\n}\n\nmain();", + "python": "from openai import OpenAI\nclient = OpenAI()\n\nfunctions = [\n {\n \"name\": \"get_current_weather\",\n \"description\": \"Get the current weather in a given location\",\n \"parameters\": {\n \"type\": \"object\",\n \"properties\": {\n \"location\": {\n \"type\": \"string\",\n \"description\": \"The city and state, e.g. San Francisco, CA\",\n },\n \"unit\": {\"type\": \"string\", \"enum\": [\"celsius\", \"fahrenheit\"]},\n },\n \"required\": [\"location\"],\n },\n }\n]\nmessages = [{\"role\": \"user\", \"content\": \"What's the weather like in Boston today?\"}]\ncompletion = client.chat.completions.create(\n model=\"VAR_model_id\",\n messages=messages,\n functions=functions,\n function_call=\"auto\"\n)\n\nprint(completion)\n" + }, + "response": "{\n \"choices\": [\n {\n \"finish_reason\": \"function_call\",\n \"index\": 0,\n \"message\": {\n \"content\": null,\n \"function_call\": {\n \"arguments\": \"{\\n \\\"location\\\": \\\"Boston, MA\\\"\\n}\",\n \"name\": \"get_current_weather\"\n },\n \"role\": \"assistant\"\n }\n }\n ],\n \"created\": 1694028367,\n \"model\": \"gpt-3.5-turbo-0613\",\n \"system_fingerprint\": \"fp_44709d6fcb\",\n \"object\": \"chat.completion\",\n \"usage\": {\n \"completion_tokens\": 18,\n \"prompt_tokens\": 82,\n \"total_tokens\": 100\n }\n}\n", + "title": "Function calling" + } + ], + "group": "chat", + "name": "Create chat completion", + "path": "create", + "returns": "Returns a [chat completion](/docs/api-reference/chat/object) object, or a streamed sequence of [chat completion chunk](/docs/api-reference/chat/streaming) objects if the request is streamed.\n" + } + } + }, + "/completions": { + "post": { + "operationId": "createCompletion", + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/CreateCompletionRequest" + } + } + }, + "required": true + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/CreateCompletionResponse" + } + } + }, + "description": "OK" + } + }, + "summary": "Creates a completion for the provided prompt and parameters.", + "tags": [ + "Completions" + ], + "x-oaiMeta": { + "examples": [ + { + "request": { + "curl": "curl https://api.openai.com/v1/completions \\\n -H \"Content-Type: application/json\" \\\n -H \"Authorization: Bearer $OPENAI_API_KEY\" \\\n -d '{\n \"model\": \"VAR_model_id\",\n \"prompt\": \"Say this is a test\",\n \"max_tokens\": 7,\n \"temperature\": 0\n }'\n", + "node.js": "import OpenAI from \"openai\";\n\nconst openai = new OpenAI();\n\nasync function main() {\n const completion = await openai.completions.create({\n model: \"VAR_model_id\",\n prompt: \"Say this is a test.\",\n max_tokens: 7,\n temperature: 0,\n });\n\n console.log(completion);\n}\nmain();", + "python": "from openai import OpenAI\nclient = OpenAI()\n\nclient.completions.create(\n model=\"VAR_model_id\",\n prompt=\"Say this is a test\",\n max_tokens=7,\n temperature=0\n)\n" + }, + "response": "{\n \"id\": \"cmpl-uqkvlQyYK7bGYrRHQ0eXlWi7\",\n \"object\": \"text_completion\",\n \"created\": 1589478378,\n \"model\": \"VAR_model_id\",\n \"system_fingerprint\": \"fp_44709d6fcb\",\n \"choices\": [\n {\n \"text\": \"\\n\\nThis is indeed a test\",\n \"index\": 0,\n \"logprobs\": null,\n \"finish_reason\": \"length\"\n }\n ],\n \"usage\": {\n \"prompt_tokens\": 5,\n \"completion_tokens\": 7,\n \"total_tokens\": 12\n }\n}\n", + "title": "No streaming" + }, + { + "request": { + "curl": "curl https://api.openai.com/v1/completions \\\n -H \"Content-Type: application/json\" \\\n -H \"Authorization: Bearer $OPENAI_API_KEY\" \\\n -d '{\n \"model\": \"VAR_model_id\",\n \"prompt\": \"Say this is a test\",\n \"max_tokens\": 7,\n \"temperature\": 0,\n \"stream\": true\n }'\n", + "node.js": "import OpenAI from \"openai\";\n\nconst openai = new OpenAI();\n\nasync function main() {\n const stream = await openai.completions.create({\n model: \"VAR_model_id\",\n prompt: \"Say this is a test.\",\n stream: true,\n });\n\n for await (const chunk of stream) {\n console.log(chunk.choices[0].text)\n }\n}\nmain();", + "python": "from openai import OpenAI\nclient = OpenAI()\n\nfor chunk in client.completions.create(\n model=\"VAR_model_id\",\n prompt=\"Say this is a test\",\n max_tokens=7,\n temperature=0,\n stream=True\n):\n print(chunk.choices[0].text)\n" + }, + "response": "{\n \"id\": \"cmpl-7iA7iJjj8V2zOkCGvWF2hAkDWBQZe\",\n \"object\": \"text_completion\",\n \"created\": 1690759702,\n \"choices\": [\n {\n \"text\": \"This\",\n \"index\": 0,\n \"logprobs\": null,\n \"finish_reason\": null\n }\n ],\n \"model\": \"gpt-3.5-turbo-instruct\"\n \"system_fingerprint\": \"fp_44709d6fcb\",\n}\n", + "title": "Streaming" + } + ], + "legacy": true, + "name": "Create completion", + "returns": "Returns a [completion](/docs/api-reference/completions/object) object, or a sequence of completion objects if the request is streamed.\n" + } + } + }, + "/edits": { + "post": { + "deprecated": true, + "operationId": "createEdit", + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/CreateEditRequest" + } + } + }, + "required": true + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/CreateEditResponse" + } + } + }, + "description": "OK" + } + }, + "summary": "Creates a new edit for the provided input, instruction, and parameters.", + "tags": [ + "Edits" + ], + "x-oaiMeta": { + "examples": { + "request": { + "curl": "curl https://api.openai.com/v1/edits \\\n -H \"Content-Type: application/json\" \\\n -H \"Authorization: Bearer $OPENAI_API_KEY\" \\\n -d '{\n \"model\": \"VAR_model_id\",\n \"input\": \"What day of the wek is it?\",\n \"instruction\": \"Fix the spelling mistakes\"\n }'\n", + "node.js": "import OpenAI from \"openai\";\n\nconst openai = new OpenAI();\n\nasync function main() {\n const edit = await openai.edits.create({\n model: \"VAR_model_id\",\n input: \"What day of the wek is it?\",\n instruction: \"Fix the spelling mistakes.\",\n });\n\n console.log(edit);\n}\n\nmain();", + "python": "from openai import OpenAI\nclient = OpenAI()\n\nclient.edits.create(\n model=\"VAR_model_id\",\n input=\"What day of the wek is it?\",\n instruction=\"Fix the spelling mistakes\"\n)\n" + }, + "response": "{\n \"object\": \"edit\",\n \"created\": 1589478378,\n \"choices\": [\n {\n \"text\": \"What day of the week is it?\",\n \"index\": 0,\n }\n ],\n \"usage\": {\n \"prompt_tokens\": 25,\n \"completion_tokens\": 32,\n \"total_tokens\": 57\n }\n}\n" + }, + "group": "edits", + "name": "Create edit", + "returns": "Returns an [edit](/docs/api-reference/edits/object) object.\n" + } + } + }, + "/embeddings": { + "post": { + "operationId": "createEmbedding", + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/CreateEmbeddingRequest" + } + } + }, + "required": true + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/CreateEmbeddingResponse" + } + } + }, + "description": "OK" + } + }, + "summary": "Creates an embedding vector representing the input text.", + "tags": [ + "Embeddings" + ], + "x-oaiMeta": { + "examples": { + "request": { + "curl": "curl https://api.openai.com/v1/embeddings \\\n -H \"Authorization: Bearer $OPENAI_API_KEY\" \\\n -H \"Content-Type: application/json\" \\\n -d '{\n \"input\": \"The food was delicious and the waiter...\",\n \"model\": \"text-embedding-ada-002\",\n \"encoding_format\": \"float\"\n }'\n", + "node.js": "import OpenAI from \"openai\";\n\nconst openai = new OpenAI();\n\nasync function main() {\n const embedding = await openai.embeddings.create({\n model: \"text-embedding-ada-002\",\n input: \"The quick brown fox jumped over the lazy dog\",\n encoding_format: \"float\",\n });\n\n console.log(embedding);\n}\n\nmain();", + "python": "from openai import OpenAI\nclient = OpenAI()\n\nclient.embeddings.create(\n model=\"text-embedding-ada-002\",\n input=\"The food was delicious and the waiter...\",\n encoding_format=\"float\"\n)\n" + }, + "response": "{\n \"object\": \"list\",\n \"data\": [\n {\n \"object\": \"embedding\",\n \"embedding\": [\n 0.0023064255,\n -0.009327292,\n .... (1536 floats total for ada-002)\n -0.0028842222,\n ],\n \"index\": 0\n }\n ],\n \"model\": \"text-embedding-ada-002\",\n \"usage\": {\n \"prompt_tokens\": 8,\n \"total_tokens\": 8\n }\n}\n" + }, + "name": "Create embeddings", + "returns": "A list of [embedding](/docs/api-reference/embeddings/object) objects." + } + } + }, + "/files": { + "get": { + "operationId": "listFiles", + "parameters": [ + { + "description": "Only return files with the given purpose.", + "in": "query", + "name": "purpose", + "required": false, + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ListFilesResponse" + } + } + }, + "description": "OK" + } + }, + "summary": "Returns a list of files that belong to the user's organization.", + "tags": [ + "Files" + ], + "x-oaiMeta": { + "examples": { + "request": { + "curl": "curl https://api.openai.com/v1/files \\\n -H \"Authorization: Bearer $OPENAI_API_KEY\"\n", + "node.js": "import OpenAI from \"openai\";\n\nconst openai = new OpenAI();\n\nasync function main() {\n const list = await openai.files.list();\n\n for await (const file of list) {\n console.log(file);\n }\n}\n\nmain();", + "python": "from openai import OpenAI\nclient = OpenAI()\n\nclient.files.list()\n" + }, + "response": "{\n \"data\": [\n {\n \"id\": \"file-abc123\",\n \"object\": \"file\",\n \"bytes\": 175,\n \"created_at\": 1613677385,\n \"filename\": \"salesOverview.pdf\",\n \"purpose\": \"assistants\",\n },\n {\n \"id\": \"file-abc123\",\n \"object\": \"file\",\n \"bytes\": 140,\n \"created_at\": 1613779121,\n \"filename\": \"puppy.jsonl\",\n \"purpose\": \"fine-tune\",\n }\n ],\n \"object\": \"list\"\n}\n" + }, + "name": "List files", + "returns": "A list of [File](/docs/api-reference/files/object) objects." + } + }, + "post": { + "operationId": "createFile", + "requestBody": { + "content": { + "multipart/form-data": { + "schema": { + "$ref": "#/components/schemas/CreateFileRequest" + } + } + }, + "required": true + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/OpenAIFile" + } + } + }, + "description": "OK" + } + }, + "summary": "Upload a file that can be used across various endpoints/features. The size of all the files uploaded by one organization can be up to 100 GB.\n\nThe size of individual files for can be a maximum of 512MB. See the [Assistants Tools guide](/docs/assistants/tools) to learn more about the types of files supported. The Fine-tuning API only supports `.jsonl` files.\n\nPlease [contact us](https://help.openai.com/) if you need to increase these storage limits.\n", + "tags": [ + "Files" + ], + "x-oaiMeta": { + "examples": { + "request": { + "curl": "curl https://api.openai.com/v1/files \\\n -H \"Authorization: Bearer $OPENAI_API_KEY\" \\\n -F purpose=\"fine-tune\" \\\n -F file=\"@mydata.jsonl\"\n", + "node.js": "import fs from \"fs\";\nimport OpenAI from \"openai\";\n\nconst openai = new OpenAI();\n\nasync function main() {\n const file = await openai.files.create({\n file: fs.createReadStream(\"mydata.jsonl\"),\n purpose: \"fine-tune\",\n });\n\n console.log(file);\n}\n\nmain();", + "python": "from openai import OpenAI\nclient = OpenAI()\n\nclient.files.create(\n file=open(\"mydata.jsonl\", \"rb\"),\n purpose=\"fine-tune\"\n)\n" + }, + "response": "{\n \"id\": \"file-BK7bzQj3FfZFXr7DbL6xJwfo\",\n \"object\": \"file\",\n \"bytes\": 120000,\n \"created_at\": 1677610602,\n \"filename\": \"mydata.jsonl\",\n \"purpose\": \"fine-tune\",\n}\n" + }, + "name": "Upload file", + "returns": "The uploaded [File](/docs/api-reference/files/object) object." + } + } + }, + "/files/{file_id}": { + "delete": { + "operationId": "deleteFile", + "parameters": [ + { + "description": "The ID of the file to use for this request.", + "in": "path", + "name": "file_id", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/DeleteFileResponse" + } + } + }, + "description": "OK" + } + }, + "summary": "Delete a file.", + "tags": [ + "Files" + ], + "x-oaiMeta": { + "examples": { + "request": { + "curl": "curl https://api.openai.com/v1/files/file-abc123 \\\n -X DELETE \\\n -H \"Authorization: Bearer $OPENAI_API_KEY\"\n", + "node.js": "import OpenAI from \"openai\";\n\nconst openai = new OpenAI();\n\nasync function main() {\n const file = await openai.files.del(\"file-abc123\");\n\n console.log(file);\n}\n\nmain();", + "python": "from openai import OpenAI\nclient = OpenAI()\n\nclient.files.delete(\"file-oaG6vwLtV3v3mWpvxexWDKxq\")\n" + }, + "response": "{\n \"id\": \"file-abc123\",\n \"object\": \"file\",\n \"deleted\": true\n}\n" + }, + "name": "Delete file", + "returns": "Deletion status." + } + }, + "get": { + "operationId": "retrieveFile", + "parameters": [ + { + "description": "The ID of the file to use for this request.", + "in": "path", + "name": "file_id", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/OpenAIFile" + } + } + }, + "description": "OK" + } + }, + "summary": "Returns information about a specific file.", + "tags": [ + "Files" + ], + "x-oaiMeta": { + "examples": { + "request": { + "curl": "curl https://api.openai.com/v1/files/file-BK7bzQj3FfZFXr7DbL6xJwfo \\\n -H \"Authorization: Bearer $OPENAI_API_KEY\"\n", + "node.js": "import OpenAI from \"openai\";\n\nconst openai = new OpenAI();\n\nasync function main() {\n const file = await openai.files.retrieve(\"file-BK7bzQj3FfZFXr7DbL6xJwfo\");\n\n console.log(file);\n}\n\nmain();", + "python": "from openai import OpenAI\nclient = OpenAI()\n\nclient.files.retrieve(\"file-BK7bzQj3FfZFXr7DbL6xJwfo\")\n" + }, + "response": "{\n \"id\": \"file-BK7bzQj3FfZFXr7DbL6xJwfo\",\n \"object\": \"file\",\n \"bytes\": 120000,\n \"created_at\": 1677610602,\n \"filename\": \"mydata.jsonl\",\n \"purpose\": \"fine-tune\",\n}\n" + }, + "name": "Retrieve file", + "returns": "The [File](/docs/api-reference/files/object) object matching the specified ID." + } + } + }, + "/files/{file_id}/content": { + "get": { + "operationId": "downloadFile", + "parameters": [ + { + "description": "The ID of the file to use for this request.", + "in": "path", + "name": "file_id", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "type": "string" + } + } + }, + "description": "OK" + } + }, + "summary": "Returns the contents of the specified file.", + "tags": [ + "Files" + ], + "x-oaiMeta": { + "examples": { + "request": { + "curl": "curl https://api.openai.com/v1/files/file-BK7bzQj3FfZFXr7DbL6xJwfo/content \\\n -H \"Authorization: Bearer $OPENAI_API_KEY\" > file.jsonl\n", + "node.js": "import OpenAI from \"openai\";\n\nconst openai = new OpenAI();\n\nasync function main() {\n const file = await openai.files.retrieveContent(\"file-BK7bzQj3FfZFXr7DbL6xJwfo\");\n\n console.log(file);\n}\n\nmain();\n", + "python": "from openai import OpenAI\nclient = OpenAI()\n\ncontent = client.files.retrieve_content(\"file-BK7bzQj3FfZFXr7DbL6xJwfo\")\n" + } + }, + "name": "Retrieve file content", + "returns": "The file content." + } + } + }, + "/fine-tunes": { + "get": { + "deprecated": true, + "operationId": "listFineTunes", + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ListFineTunesResponse" + } + } + }, + "description": "OK" + } + }, + "summary": "List your organization's fine-tuning jobs\n", + "tags": [ + "Fine-tunes" + ], + "x-oaiMeta": { + "examples": { + "request": { + "curl": "curl https://api.openai.com/v1/fine-tunes \\\n -H \"Authorization: Bearer $OPENAI_API_KEY\"\n", + "node.js": "import OpenAI from \"openai\";\n\nconst openai = new OpenAI();\n\nasync function main() {\n const list = await openai.fineTunes.list();\n\n for await (const fineTune of list) {\n console.log(fineTune);\n }\n}\n\nmain();", + "python": "# deprecated\n" + }, + "response": "{\n \"object\": \"list\",\n \"data\": [\n {\n \"id\": \"ft-AF1WoRqd3aJAHsqc9NY7iL8F\",\n \"object\": \"fine-tune\",\n \"model\": \"curie\",\n \"created_at\": 1614807352,\n \"fine_tuned_model\": null,\n \"hyperparams\": { ... },\n \"organization_id\": \"org-123\",\n \"result_files\": [],\n \"status\": \"pending\",\n \"validation_files\": [],\n \"training_files\": [ { ... } ],\n \"updated_at\": 1614807352,\n },\n { ... },\n { ... }\n ]\n}\n" + }, + "name": "List fine-tunes", + "returns": "A list of [fine-tune](/docs/api-reference/fine-tunes/object) objects." + } + }, + "post": { + "deprecated": true, + "operationId": "createFineTune", + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/CreateFineTuneRequest" + } + } + }, + "required": true + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/FineTune" + } + } + }, + "description": "OK" + } + }, + "summary": "Creates a job that fine-tunes a specified model from a given dataset.\n\nResponse includes details of the enqueued job including job status and the name of the fine-tuned models once complete.\n\n[Learn more about fine-tuning](/docs/guides/legacy-fine-tuning)\n", + "tags": [ + "Fine-tunes" + ], + "x-oaiMeta": { + "examples": { + "request": { + "curl": "curl https://api.openai.com/v1/fine-tunes \\\n -H \"Content-Type: application/json\" \\\n -H \"Authorization: Bearer $OPENAI_API_KEY\" \\\n -d '{\n \"training_file\": \"file-abc123\"\n }'\n", + "node.js": "import OpenAI from \"openai\";\n\nconst openai = new OpenAI();\n\nasync function main() {\n const fineTune = await openai.fineTunes.create({\n training_file: \"file-abc123\"\n });\n\n console.log(fineTune);\n}\n\nmain();\n", + "python": "# deprecated\n" + }, + "response": "{\n \"id\": \"ft-AF1WoRqd3aJAHsqc9NY7iL8F\",\n \"object\": \"fine-tune\",\n \"model\": \"curie\",\n \"created_at\": 1614807352,\n \"events\": [\n {\n \"object\": \"fine-tune-event\",\n \"created_at\": 1614807352,\n \"level\": \"info\",\n \"message\": \"Job enqueued. Waiting for jobs ahead to complete. Queue number: 0.\"\n }\n ],\n \"fine_tuned_model\": null,\n \"hyperparams\": {\n \"batch_size\": 4,\n \"learning_rate_multiplier\": 0.1,\n \"n_epochs\": 4,\n \"prompt_loss_weight\": 0.1,\n },\n \"organization_id\": \"org-123\",\n \"result_files\": [],\n \"status\": \"pending\",\n \"validation_files\": [],\n \"training_files\": [\n {\n \"id\": \"file-abc123\",\n \"object\": \"file\",\n \"bytes\": 1547276,\n \"created_at\": 1610062281,\n \"filename\": \"my-data-train.jsonl\",\n \"purpose\": \"fine-tune-results\"\n }\n ],\n \"updated_at\": 1614807352,\n}\n" + }, + "name": "Create fine-tune", + "returns": "A [fine-tune](/docs/api-reference/fine-tunes/object) object." + } + } + }, + "/fine-tunes/{fine_tune_id}": { + "get": { + "deprecated": true, + "operationId": "retrieveFineTune", + "parameters": [ + { + "description": "The ID of the fine-tune job\n", + "in": "path", + "name": "fine_tune_id", + "required": true, + "schema": { + "example": "ft-AF1WoRqd3aJAHsqc9NY7iL8F", + "type": "string" + } + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/FineTune" + } + } + }, + "description": "OK" + } + }, + "summary": "Gets info about the fine-tune job.\n\n[Learn more about fine-tuning](/docs/guides/legacy-fine-tuning)\n", + "tags": [ + "Fine-tunes" + ], + "x-oaiMeta": { + "examples": { + "request": { + "curl": "curl https://api.openai.com/v1/fine-tunes/ft-AF1WoRqd3aJAHsqc9NY7iL8F \\\n -H \"Authorization: Bearer $OPENAI_API_KEY\"\n", + "node.js": "import OpenAI from \"openai\";\n\nconst openai = new OpenAI();\n\nasync function main() {\n const fineTune = await openai.fineTunes.retrieve(\"ft-AF1WoRqd3aJAHsqc9NY7iL8F\");\n\n console.log(fineTune);\n}\n\nmain();", + "python": "# deprecated\n" + }, + "response": "{\n \"id\": \"ft-AF1WoRqd3aJAHsqc9NY7iL8F\",\n \"object\": \"fine-tune\",\n \"model\": \"curie\",\n \"created_at\": 1614807352,\n \"events\": [\n {\n \"object\": \"fine-tune-event\",\n \"created_at\": 1614807352,\n \"level\": \"info\",\n \"message\": \"Job enqueued. Waiting for jobs ahead to complete. Queue number: 0.\"\n },\n {\n \"object\": \"fine-tune-event\",\n \"created_at\": 1614807356,\n \"level\": \"info\",\n \"message\": \"Job started.\"\n },\n {\n \"object\": \"fine-tune-event\",\n \"created_at\": 1614807861,\n \"level\": \"info\",\n \"message\": \"Uploaded snapshot: curie:ft-acmeco-2021-03-03-21-44-20.\"\n },\n {\n \"object\": \"fine-tune-event\",\n \"created_at\": 1614807864,\n \"level\": \"info\",\n \"message\": \"Uploaded result files: file-abc123.\"\n },\n {\n \"object\": \"fine-tune-event\",\n \"created_at\": 1614807864,\n \"level\": \"info\",\n \"message\": \"Job succeeded.\"\n }\n ],\n \"fine_tuned_model\": \"curie:ft-acmeco-2021-03-03-21-44-20\",\n \"hyperparams\": {\n \"batch_size\": 4,\n \"learning_rate_multiplier\": 0.1,\n \"n_epochs\": 4,\n \"prompt_loss_weight\": 0.1,\n },\n \"organization_id\": \"org-123\",\n \"result_files\": [\n {\n \"id\": \"file-abc123\",\n \"object\": \"file\",\n \"bytes\": 81509,\n \"created_at\": 1614807863,\n \"filename\": \"compiled_results.csv\",\n \"purpose\": \"fine-tune-results\"\n }\n ],\n \"status\": \"succeeded\",\n \"validation_files\": [],\n \"training_files\": [\n {\n \"id\": \"file-abc123\",\n \"object\": \"file\",\n \"bytes\": 1547276,\n \"created_at\": 1610062281,\n \"filename\": \"my-data-train.jsonl\",\n \"purpose\": \"fine-tune\"\n }\n ],\n \"updated_at\": 1614807865,\n}\n" + }, + "name": "Retrieve fine-tune", + "returns": "The [fine-tune](/docs/api-reference/fine-tunes/object) object with the given ID." + } + } + }, + "/fine-tunes/{fine_tune_id}/cancel": { + "post": { + "deprecated": true, + "operationId": "cancelFineTune", + "parameters": [ + { + "description": "The ID of the fine-tune job to cancel\n", + "in": "path", + "name": "fine_tune_id", + "required": true, + "schema": { + "example": "ft-AF1WoRqd3aJAHsqc9NY7iL8F", + "type": "string" + } + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/FineTune" + } + } + }, + "description": "OK" + } + }, + "summary": "Immediately cancel a fine-tune job.\n", + "tags": [ + "Fine-tunes" + ], + "x-oaiMeta": { + "examples": { + "request": { + "curl": "curl https://api.openai.com/v1/fine-tunes/ft-AF1WoRqd3aJAHsqc9NY7iL8F/cancel \\\n -H \"Authorization: Bearer $OPENAI_API_KEY\"\n", + "node.js": "import OpenAI from \"openai\";\n\nconst openai = new OpenAI();\n\nasync function main() {\n const fineTune = await openai.fineTunes.cancel(\"ft-AF1WoRqd3aJAHsqc9NY7iL8F\");\n\n console.log(fineTune);\n}\nmain();", + "python": "# deprecated\n" + }, + "response": "{\n \"id\": \"ft-xhrpBbvVUzYGo8oUO1FY4nI7\",\n \"object\": \"fine-tune\",\n \"model\": \"curie\",\n \"created_at\": 1614807770,\n \"events\": [ { ... } ],\n \"fine_tuned_model\": null,\n \"hyperparams\": { ... },\n \"organization_id\": \"org-123\",\n \"result_files\": [],\n \"status\": \"cancelled\",\n \"validation_files\": [],\n \"training_files\": [\n {\n \"id\": \"file-abc123\",\n \"object\": \"file\",\n \"bytes\": 1547276,\n \"created_at\": 1610062281,\n \"filename\": \"my-data-train.jsonl\",\n \"purpose\": \"fine-tune\"\n }\n ],\n \"updated_at\": 1614807789,\n}\n" + }, + "name": "Cancel fine-tune", + "returns": "The cancelled [fine-tune](/docs/api-reference/fine-tunes/object) object." + } + } + }, + "/fine-tunes/{fine_tune_id}/events": { + "get": { + "deprecated": true, + "operationId": "listFineTuneEvents", + "parameters": [ + { + "description": "The ID of the fine-tune job to get events for.\n", + "in": "path", + "name": "fine_tune_id", + "required": true, + "schema": { + "example": "ft-AF1WoRqd3aJAHsqc9NY7iL8F", + "type": "string" + } + }, + { + "description": "Whether to stream events for the fine-tune job. If set to true,\nevents will be sent as data-only\n[server-sent events](https://developer.mozilla.org/en-US/docs/Web/API/Server-sent_events/Using_server-sent_events#Event_stream_format)\nas they become available. The stream will terminate with a\n`data: [DONE]` message when the job is finished (succeeded, cancelled,\nor failed).\n\nIf set to false, only events generated so far will be returned.\n", + "in": "query", + "name": "stream", + "required": false, + "schema": { + "default": false, + "type": "boolean" + } + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ListFineTuneEventsResponse" + } + } + }, + "description": "OK" + } + }, + "summary": "Get fine-grained status updates for a fine-tune job.\n", + "tags": [ + "Fine-tunes" + ], + "x-oaiMeta": { + "examples": { + "request": { + "curl": "curl https://api.openai.com/v1/fine-tunes/ft-AF1WoRqd3aJAHsqc9NY7iL8F/events \\\n -H \"Authorization: Bearer $OPENAI_API_KEY\"\n", + "node.js": "import OpenAI from \"openai\";\n\nconst openai = new OpenAI();\n\nasync function main() {\n const fineTune = await openai.fineTunes.listEvents(\"ft-AF1WoRqd3aJAHsqc9NY7iL8F\");\n\n console.log(fineTune);\n}\nmain();", + "python": "# deprecated\n" + }, + "response": "{\n \"object\": \"list\",\n \"data\": [\n {\n \"object\": \"fine-tune-event\",\n \"created_at\": 1614807352,\n \"level\": \"info\",\n \"message\": \"Job enqueued. Waiting for jobs ahead to complete. Queue number: 0.\"\n },\n {\n \"object\": \"fine-tune-event\",\n \"created_at\": 1614807356,\n \"level\": \"info\",\n \"message\": \"Job started.\"\n },\n {\n \"object\": \"fine-tune-event\",\n \"created_at\": 1614807861,\n \"level\": \"info\",\n \"message\": \"Uploaded snapshot: curie:ft-acmeco-2021-03-03-21-44-20.\"\n },\n {\n \"object\": \"fine-tune-event\",\n \"created_at\": 1614807864,\n \"level\": \"info\",\n \"message\": \"Uploaded result files: file-abc123\"\n },\n {\n \"object\": \"fine-tune-event\",\n \"created_at\": 1614807864,\n \"level\": \"info\",\n \"message\": \"Job succeeded.\"\n }\n ]\n}\n" + }, + "name": "List fine-tune events", + "returns": "A list of fine-tune event objects." + } + } + }, + "/fine_tuning/jobs": { + "get": { + "operationId": "listPaginatedFineTuningJobs", + "parameters": [ + { + "description": "Identifier for the last job from the previous pagination request.", + "in": "query", + "name": "after", + "required": false, + "schema": { + "type": "string" + } + }, + { + "description": "Number of fine-tuning jobs to retrieve.", + "in": "query", + "name": "limit", + "required": false, + "schema": { + "default": 20, + "type": "integer" + } + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ListPaginatedFineTuningJobsResponse" + } + } + }, + "description": "OK" + } + }, + "summary": "List your organization's fine-tuning jobs\n", + "tags": [ + "Fine-tuning" + ], + "x-oaiMeta": { + "examples": { + "request": { + "curl": "curl https://api.openai.com/v1/fine_tuning/jobs?limit=2 \\\n -H \"Authorization: Bearer $OPENAI_API_KEY\"\n", + "node.js": "import OpenAI from \"openai\";\n\nconst openai = new OpenAI();\n\nasync function main() {\n const list = await openai.fineTuning.jobs.list();\n\n for await (const fineTune of list) {\n console.log(fineTune);\n }\n}\n\nmain();", + "python": "from openai import OpenAI\nclient = OpenAI()\n\nclient.fine_tuning.jobs.list()\n" + }, + "response": "{\n \"object\": \"list\",\n \"data\": [\n {\n \"object\": \"fine_tuning.job.event\",\n \"id\": \"ft-event-TjX0lMfOniCZX64t9PUQT5hn\",\n \"created_at\": 1689813489,\n \"level\": \"warn\",\n \"message\": \"Fine tuning process stopping due to job cancellation\",\n \"data\": null,\n \"type\": \"message\"\n },\n { ... },\n { ... }\n ], \"has_more\": true\n}\n" + }, + "name": "List fine-tuning jobs", + "returns": "A list of paginated [fine-tuning job](/docs/api-reference/fine-tuning/object) objects." + } + }, + "post": { + "operationId": "createFineTuningJob", + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/CreateFineTuningJobRequest" + } + } + }, + "required": true + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/FineTuningJob" + } + } + }, + "description": "OK" + } + }, + "summary": "Creates a job that fine-tunes a specified model from a given dataset.\n\nResponse includes details of the enqueued job including job status and the name of the fine-tuned models once complete.\n\n[Learn more about fine-tuning](/docs/guides/fine-tuning)\n", + "tags": [ + "Fine-tuning" + ], + "x-oaiMeta": { + "examples": [ + { + "request": { + "curl": "curl https://api.openai.com/v1/fine_tuning/jobs \\\n -H \"Content-Type: application/json\" \\\n -H \"Authorization: Bearer $OPENAI_API_KEY\" \\\n -d '{\n \"training_file\": \"file-BK7bzQj3FfZFXr7DbL6xJwfo\",\n \"model\": \"gpt-3.5-turbo\"\n }'\n", + "node.js": "import OpenAI from \"openai\";\n\nconst openai = new OpenAI();\n\nasync function main() {\n const fineTune = await openai.fineTuning.jobs.create({\n training_file: \"file-abc123\"\n });\n\n console.log(fineTune);\n}\n\nmain();\n", + "python": "from openai import OpenAI\nclient = OpenAI()\n\nclient.fine_tuning.jobs.create(\n training_file=\"file-abc123\", \n model=\"gpt-3.5-turbo\"\n)\n" + }, + "response": "{\n \"object\": \"fine_tuning.job\",\n \"id\": \"ftjob-abc123\",\n \"model\": \"gpt-3.5-turbo-0613\",\n \"created_at\": 1614807352,\n \"fine_tuned_model\": null,\n \"organization_id\": \"org-123\",\n \"result_files\": [],\n \"status\": \"queued\",\n \"validation_file\": null,\n \"training_file\": \"file-abc123\",\n}\n", + "title": "No hyperparameters" + }, + { + "request": { + "curl": "curl https://api.openai.com/v1/fine_tuning/jobs \\\n -H \"Content-Type: application/json\" \\\n -H \"Authorization: Bearer $OPENAI_API_KEY\" \\\n -d '{\n \"training_file\": \"file-abc123\",\n \"model\": \"gpt-3.5-turbo\",\n \"hyperparameters\": {\n \"n_epochs\": 2\n }\n }'\n", + "node.js": "import OpenAI from \"openai\";\n\nconst openai = new OpenAI();\n\nasync function main() {\n const fineTune = await openai.fineTuning.jobs.create({\n training_file: \"file-abc123\",\n model: \"gpt-3.5-turbo\",\n hyperparameters: { n_epochs: 2 }\n });\n\n console.log(fineTune);\n}\n\nmain();\n", + "python": "from openai import OpenAI\nclient = OpenAI()\n\nclient.fine_tuning.jobs.create(\n training_file=\"file-abc123\", \n model=\"gpt-3.5-turbo\", \n hyperparameters={\n \"n_epochs\":2\n }\n)\n" + }, + "response": "{\n \"object\": \"fine_tuning.job\",\n \"id\": \"ftjob-abc123\",\n \"model\": \"gpt-3.5-turbo-0613\",\n \"created_at\": 1614807352,\n \"fine_tuned_model\": null,\n \"organization_id\": \"org-123\",\n \"result_files\": [],\n \"status\": \"queued\",\n \"validation_file\": null,\n \"training_file\": \"file-abc123\",\n \"hyperparameters\": {\"n_epochs\": 2},\n}\n", + "title": "Hyperparameters" + }, + { + "request": { + "curl": "curl https://api.openai.com/v1/fine_tuning/jobs \\\n -H \"Content-Type: application/json\" \\\n -H \"Authorization: Bearer $OPENAI_API_KEY\" \\\n -d '{\n \"training_file\": \"file-abc123\",\n \"validation_file\": \"file-abc123\",\n \"model\": \"gpt-3.5-turbo\"\n }'\n", + "node.js": "import OpenAI from \"openai\";\n\nconst openai = new OpenAI();\n\nasync function main() {\n const fineTune = await openai.fineTuning.jobs.create({\n training_file: \"file-abc123\",\n validation_file: \"file-abc123\"\n });\n\n console.log(fineTune);\n}\n\nmain();\n", + "python": "from openai import OpenAI\nclient = OpenAI()\n\nclient.fine_tuning.jobs.create(\n training_file=\"file-abc123\", \n validation_file=\"file-def456\", \n model=\"gpt-3.5-turbo\"\n)\n" + }, + "response": "{\n \"object\": \"fine_tuning.job\",\n \"id\": \"ftjob-abc123\",\n \"model\": \"gpt-3.5-turbo-0613\",\n \"created_at\": 1614807352,\n \"fine_tuned_model\": null,\n \"organization_id\": \"org-123\",\n \"result_files\": [],\n \"status\": \"queued\",\n \"validation_file\": \"file-abc123\",\n \"training_file\": \"file-abc123\",\n}\n", + "title": "Validation file" + } + ], + "name": "Create fine-tuning job", + "returns": "A [fine-tuning.job](/docs/api-reference/fine-tuning/object) object." + } + } + }, + "/fine_tuning/jobs/{fine_tuning_job_id}": { + "get": { + "operationId": "retrieveFineTuningJob", + "parameters": [ + { + "description": "The ID of the fine-tuning job.\n", + "in": "path", + "name": "fine_tuning_job_id", + "required": true, + "schema": { + "example": "ft-AF1WoRqd3aJAHsqc9NY7iL8F", + "type": "string" + } + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/FineTuningJob" + } + } + }, + "description": "OK" + } + }, + "summary": "Get info about a fine-tuning job.\n\n[Learn more about fine-tuning](/docs/guides/fine-tuning)\n", + "tags": [ + "Fine-tuning" + ], + "x-oaiMeta": { + "examples": { + "request": { + "curl": "curl https://api.openai.com/v1/fine_tuning/jobs/ft-AF1WoRqd3aJAHsqc9NY7iL8F \\\n -H \"Authorization: Bearer $OPENAI_API_KEY\"\n", + "node.js": "import OpenAI from \"openai\";\n\nconst openai = new OpenAI();\n\nasync function main() {\n const fineTune = await openai.fineTuning.jobs.retrieve(\"ftjob-abc123\");\n\n console.log(fineTune);\n}\n\nmain();\n", + "python": "from openai import OpenAI\nclient = OpenAI()\n\nclient.fine_tuning.jobs.retrieve(\"ftjob-abc123\")\n" + }, + "response": "{\n \"object\": \"fine_tuning.job\",\n \"id\": \"ftjob-abc123\",\n \"model\": \"davinci-002\",\n \"created_at\": 1692661014,\n \"finished_at\": 1692661190,\n \"fine_tuned_model\": \"ft:davinci-002:my-org:custom_suffix:7q8mpxmy\",\n \"organization_id\": \"org-123\",\n \"result_files\": [\n \"file-abc123\"\n ],\n \"status\": \"succeeded\",\n \"validation_file\": null,\n \"training_file\": \"file-abc123\",\n \"hyperparameters\": {\n \"n_epochs\": 4,\n },\n \"trained_tokens\": 5768\n}\n" + }, + "name": "Retrieve fine-tuning job", + "returns": "The [fine-tuning](/docs/api-reference/fine-tunes/object) object with the given ID." + } + } + }, + "/fine_tuning/jobs/{fine_tuning_job_id}/cancel": { + "post": { + "operationId": "cancelFineTuningJob", + "parameters": [ + { + "description": "The ID of the fine-tuning job to cancel.\n", + "in": "path", + "name": "fine_tuning_job_id", + "required": true, + "schema": { + "example": "ft-AF1WoRqd3aJAHsqc9NY7iL8F", + "type": "string" + } + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/FineTuningJob" + } + } + }, + "description": "OK" + } + }, + "summary": "Immediately cancel a fine-tune job.\n", + "tags": [ + "Fine-tuning" + ], + "x-oaiMeta": { + "examples": { + "request": { + "curl": "curl -X POST https://api.openai.com/v1/fine_tuning/jobs/ftjob-abc123/cancel \\\n -H \"Authorization: Bearer $OPENAI_API_KEY\"\n", + "node.js": "import OpenAI from \"openai\";\n\nconst openai = new OpenAI();\n\nasync function main() {\n const fineTune = await openai.fineTuning.jobs.cancel(\"ftjob-abc123\");\n\n console.log(fineTune);\n}\nmain();", + "python": "from openai import OpenAI\nclient = OpenAI()\n\nclient.fine_tuning.jobs.cancel(\"ftjob-abc123\")\n" + }, + "response": "{\n \"object\": \"fine_tuning.job\",\n \"id\": \"ftjob-abc123\",\n \"model\": \"gpt-3.5-turbo-0613\",\n \"created_at\": 1689376978,\n \"fine_tuned_model\": null,\n \"organization_id\": \"org-123\",\n \"result_files\": [],\n \"hyperparameters\": {\n \"n_epochs\": \"auto\"\n },\n \"status\": \"cancelled\",\n \"validation_file\": \"file-abc123\",\n \"training_file\": \"file-abc123\"\n}\n" + }, + "name": "Cancel fine-tuning", + "returns": "The cancelled [fine-tuning](/docs/api-reference/fine-tuning/object) object." + } + } + }, + "/fine_tuning/jobs/{fine_tuning_job_id}/events": { + "get": { + "operationId": "listFineTuningEvents", + "parameters": [ + { + "description": "The ID of the fine-tuning job to get events for.\n", + "in": "path", + "name": "fine_tuning_job_id", + "required": true, + "schema": { + "example": "ft-AF1WoRqd3aJAHsqc9NY7iL8F", + "type": "string" + } + }, + { + "description": "Identifier for the last event from the previous pagination request.", + "in": "query", + "name": "after", + "required": false, + "schema": { + "type": "string" + } + }, + { + "description": "Number of events to retrieve.", + "in": "query", + "name": "limit", + "required": false, + "schema": { + "default": 20, + "type": "integer" + } + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ListFineTuningJobEventsResponse" + } + } + }, + "description": "OK" + } + }, + "summary": "Get status updates for a fine-tuning job.\n", + "tags": [ + "Fine-tuning" + ], + "x-oaiMeta": { + "examples": { + "request": { + "curl": "curl https://api.openai.com/v1/fine_tuning/jobs/ftjob-abc123/events \\\n -H \"Authorization: Bearer $OPENAI_API_KEY\"\n", + "node.js": "import OpenAI from \"openai\";\n\nconst openai = new OpenAI();\n\nasync function main() {\n const list = await openai.fineTuning.list_events(id=\"ftjob-abc123\", limit=2);\n\n for await (const fineTune of list) {\n console.log(fineTune);\n }\n}\n\nmain();", + "python": "from openai import OpenAI\nclient = OpenAI()\n\nclient.fine_tuning.jobs.list_events(\n fine_tuning_job_id=\"ftjob-abc123\", \n limit=2\n)\n" + }, + "response": "{\n \"object\": \"list\",\n \"data\": [\n {\n \"object\": \"fine_tuning.job.event\",\n \"id\": \"ft-event-ddTJfwuMVpfLXseO0Am0Gqjm\",\n \"created_at\": 1692407401,\n \"level\": \"info\",\n \"message\": \"Fine tuning job successfully completed\",\n \"data\": null,\n \"type\": \"message\"\n },\n {\n \"object\": \"fine_tuning.job.event\",\n \"id\": \"ft-event-tyiGuB72evQncpH87xe505Sv\",\n \"created_at\": 1692407400,\n \"level\": \"info\",\n \"message\": \"New fine-tuned model created: ft:gpt-3.5-turbo:openai::7p4lURel\",\n \"data\": null,\n \"type\": \"message\"\n }\n ],\n \"has_more\": true\n}\n" + }, + "name": "List fine-tuning events", + "returns": "A list of fine-tuning event objects." + } + } + }, + "/images/edits": { + "post": { + "operationId": "createImageEdit", + "requestBody": { + "content": { + "multipart/form-data": { + "schema": { + "$ref": "#/components/schemas/CreateImageEditRequest" + } + } + }, + "required": true + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ImagesResponse" + } + } + }, + "description": "OK" + } + }, + "summary": "Creates an edited or extended image given an original image and a prompt.", + "tags": [ + "Images" + ], + "x-oaiMeta": { + "examples": { + "request": { + "curl": "curl https://api.openai.com/v1/images/edits \\\n -H \"Authorization: Bearer $OPENAI_API_KEY\" \\\n -F image=\"@otter.png\" \\\n -F mask=\"@mask.png\" \\\n -F prompt=\"A cute baby sea otter wearing a beret\" \\\n -F n=2 \\\n -F size=\"1024x1024\"\n", + "node.js": "import fs from \"fs\";\nimport OpenAI from \"openai\";\n\nconst openai = new OpenAI();\n\nasync function main() {\n const image = await openai.images.edit({\n image: fs.createReadStream(\"otter.png\"),\n mask: fs.createReadStream(\"mask.png\"),\n prompt: \"A cute baby sea otter wearing a beret\",\n });\n\n console.log(image.data);\n}\nmain();", + "python": "from openai import OpenAI\nclient = OpenAI()\n\nclient.images.edit(\n image=open(\"otter.png\", \"rb\"),\n mask=open(\"mask.png\", \"rb\"),\n prompt=\"A cute baby sea otter wearing a beret\",\n n=2,\n size=\"1024x1024\"\n)\n" + }, + "response": "{\n \"created\": 1589478378,\n \"data\": [\n {\n \"url\": \"https://...\"\n },\n {\n \"url\": \"https://...\"\n }\n ]\n}\n" + }, + "name": "Create image edit", + "returns": "Returns a list of [image](/docs/api-reference/images/object) objects." + } + } + }, + "/images/generations": { + "post": { + "operationId": "createImage", + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/CreateImageRequest" + } + } + }, + "required": true + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ImagesResponse" + } + } + }, + "description": "OK" + } + }, + "summary": "Creates an image given a prompt.", + "tags": [ + "Images" + ], + "x-oaiMeta": { + "examples": { + "request": { + "curl": "curl https://api.openai.com/v1/images/generations \\\n -H \"Content-Type: application/json\" \\\n -H \"Authorization: Bearer $OPENAI_API_KEY\" \\\n -d '{\n \"model\": \"dall-e-3\",\n \"prompt\": \"A cute baby sea otter\",\n \"n\": 1,\n \"size\": \"1024x1024\"\n }'\n", + "node.js": "import OpenAI from \"openai\";\n\nconst openai = new OpenAI();\n\nasync function main() {\n const image = await openai.images.generate({ model: \"dall-e-3\", prompt: \"A cute baby sea otter\" });\n\n console.log(image.data);\n}\nmain();", + "python": "from openai import OpenAI\nclient = OpenAI()\n\nclient.images.generate(\n model=\"dall-e-3\",\n prompt=\"A cute baby sea otter\",\n n=1,\n size=\"1024x1024\"\n)\n" + }, + "response": "{\n \"created\": 1589478378,\n \"data\": [\n {\n \"url\": \"https://...\"\n },\n {\n \"url\": \"https://...\"\n }\n ]\n}\n" + }, + "name": "Create image", + "returns": "Returns a list of [image](/docs/api-reference/images/object) objects." + } + } + }, + "/images/variations": { + "post": { + "operationId": "createImageVariation", + "requestBody": { + "content": { + "multipart/form-data": { + "schema": { + "$ref": "#/components/schemas/CreateImageVariationRequest" + } + } + }, + "required": true + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ImagesResponse" + } + } + }, + "description": "OK" + } + }, + "summary": "Creates a variation of a given image.", + "tags": [ + "Images" + ], + "x-oaiMeta": { + "examples": { + "request": { + "curl": "curl https://api.openai.com/v1/images/variations \\\n -H \"Authorization: Bearer $OPENAI_API_KEY\" \\\n -F image=\"@otter.png\" \\\n -F n=2 \\\n -F size=\"1024x1024\"\n", + "node.js": "import fs from \"fs\";\nimport OpenAI from \"openai\";\n\nconst openai = new OpenAI();\n\nasync function main() {\n const image = await openai.images.createVariation({\n image: fs.createReadStream(\"otter.png\"),\n });\n\n console.log(image.data);\n}\nmain();", + "python": "from openai import OpenAI\nclient = OpenAI()\n\nresponse = client.images.create_variation(\n image=open(\"image_edit_original.png\", \"rb\"),\n n=2,\n size=\"1024x1024\"\n)\n" + }, + "response": "{\n \"created\": 1589478378,\n \"data\": [\n {\n \"url\": \"https://...\"\n },\n {\n \"url\": \"https://...\"\n }\n ]\n}\n" + }, + "name": "Create image variation", + "returns": "Returns a list of [image](/docs/api-reference/images/object) objects." + } + } + }, + "/models": { + "get": { + "operationId": "listModels", + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ListModelsResponse" + } + } + }, + "description": "OK" + } + }, + "summary": "Lists the currently available models, and provides basic information about each one such as the owner and availability.", + "tags": [ + "Models" + ], + "x-oaiMeta": { + "examples": { + "request": { + "curl": "curl https://api.openai.com/v1/models \\\n -H \"Authorization: Bearer $OPENAI_API_KEY\"\n", + "node.js": "import OpenAI from \"openai\";\n\nconst openai = new OpenAI();\n\nasync function main() {\n const list = await openai.models.list();\n\n for await (const model of list) {\n console.log(model);\n }\n}\nmain();", + "python": "from openai import OpenAI\nclient = OpenAI()\n\nclient.models.list()\n" + }, + "response": "{\n \"object\": \"list\",\n \"data\": [\n {\n \"id\": \"model-id-0\",\n \"object\": \"model\",\n \"created\": 1686935002,\n \"owned_by\": \"organization-owner\"\n },\n {\n \"id\": \"model-id-1\",\n \"object\": \"model\",\n \"created\": 1686935002,\n \"owned_by\": \"organization-owner\",\n },\n {\n \"id\": \"model-id-2\",\n \"object\": \"model\",\n \"created\": 1686935002,\n \"owned_by\": \"openai\"\n },\n ],\n \"object\": \"list\"\n}\n" + }, + "name": "List models", + "returns": "A list of [model](/docs/api-reference/models/object) objects." + } + } + }, + "/models/{model}": { + "delete": { + "operationId": "deleteModel", + "parameters": [ + { + "description": "The model to delete", + "in": "path", + "name": "model", + "required": true, + "schema": { + "example": "ft:gpt-3.5-turbo:acemeco:suffix:abc123", + "type": "string" + } + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/DeleteModelResponse" + } + } + }, + "description": "OK" + } + }, + "summary": "Delete a fine-tuned model. You must have the Owner role in your organization to delete a model.", + "tags": [ + "Models" + ], + "x-oaiMeta": { + "examples": { + "request": { + "curl": "curl https://api.openai.com/v1/models/ft:gpt-3.5-turbo:acemeco:suffix:abc123 \\\n -X DELETE \\\n -H \"Authorization: Bearer $OPENAI_API_KEY\"\n", + "node.js": "import OpenAI from \"openai\";\n\nconst openai = new OpenAI();\n\nasync function main() {\n const model = await openai.models.del(\"ft:gpt-3.5-turbo:acemeco:suffix:abc123\");\n\n console.log(model);\n}\nmain();", + "python": "from openai import OpenAI\nclient = OpenAI()\n\nclient.models.delete(\"ft:gpt-3.5-turbo:acemeco:suffix:abc123\")\n" + }, + "response": "{\n \"id\": \"ft:gpt-3.5-turbo:acemeco:suffix:abc123\",\n \"object\": \"model\",\n \"deleted\": true\n}\n" + }, + "name": "Delete fine-tune model", + "returns": "Deletion status." + } + }, + "get": { + "operationId": "retrieveModel", + "parameters": [ + { + "description": "The ID of the model to use for this request", + "in": "path", + "name": "model", + "required": true, + "schema": { + "example": "gpt-3.5-turbo", + "type": "string" + } + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Model" + } + } + }, + "description": "OK" + } + }, + "summary": "Retrieves a model instance, providing basic information about the model such as the owner and permissioning.", + "tags": [ + "Models" + ], + "x-oaiMeta": { + "examples": { + "request": { + "curl": "curl https://api.openai.com/v1/models/VAR_model_id \\\n -H \"Authorization: Bearer $OPENAI_API_KEY\"\n", + "node.js": "import OpenAI from \"openai\";\n\nconst openai = new OpenAI();\n\nasync function main() {\n const model = await openai.models.retrieve(\"gpt-3.5-turbo\");\n\n console.log(model);\n}\n\nmain();", + "python": "from openai import OpenAI\nclient = OpenAI()\n\nclient.models.retrieve(\"VAR_model_id\")\n" + }, + "response": "{\n \"id\": \"VAR_model_id\",\n \"object\": \"model\",\n \"created\": 1686935002,\n \"owned_by\": \"openai\"\n}\n" + }, + "name": "Retrieve model", + "returns": "The [model](/docs/api-reference/models/object) object matching the specified ID." + } + } + }, + "/moderations": { + "post": { + "operationId": "createModeration", + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/CreateModerationRequest" + } + } + }, + "required": true + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/CreateModerationResponse" + } + } + }, + "description": "OK" + } + }, + "summary": "Classifies if text violates OpenAI's Content Policy", + "tags": [ + "Moderations" + ], + "x-oaiMeta": { + "examples": { + "request": { + "curl": "curl https://api.openai.com/v1/moderations \\\n -H \"Content-Type: application/json\" \\\n -H \"Authorization: Bearer $OPENAI_API_KEY\" \\\n -d '{\n \"input\": \"I want to kill them.\"\n }'\n", + "node.js": "import OpenAI from \"openai\";\n\nconst openai = new OpenAI();\n\nasync function main() {\n const moderation = await openai.moderations.create({ input: \"I want to kill them.\" });\n\n console.log(moderation);\n}\nmain();\n", + "python": "from openai import OpenAI\nclient = OpenAI()\n\nclient.moderations.create(input=\"I want to kill them.\")\n" + }, + "response": "{\n \"id\": \"modr-XXXXX\",\n \"model\": \"text-moderation-005\",\n \"results\": [\n {\n \"flagged\": true,\n \"categories\": {\n \"sexual\": false,\n \"hate\": false,\n \"harassment\": false,\n \"self-harm\": false,\n \"sexual/minors\": false,\n \"hate/threatening\": false,\n \"violence/graphic\": false,\n \"self-harm/intent\": false,\n \"self-harm/instructions\": false,\n \"harassment/threatening\": true,\n \"violence\": true,\n },\n \"category_scores\": {\n \"sexual\": 1.2282071e-06,\n \"hate\": 0.010696256,\n \"harassment\": 0.29842457,\n \"self-harm\": 1.5236925e-08,\n \"sexual/minors\": 5.7246268e-08,\n \"hate/threatening\": 0.0060676364,\n \"violence/graphic\": 4.435014e-06,\n \"self-harm/intent\": 8.098441e-10,\n \"self-harm/instructions\": 2.8498655e-11,\n \"harassment/threatening\": 0.63055265,\n \"violence\": 0.99011886,\n }\n }\n ]\n}\n" + }, + "name": "Create moderation", + "returns": "A [moderation](/docs/api-reference/moderations/object) object." + } + } + }, + "/threads": { + "post": { + "operationId": "createThread", + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/CreateThreadRequest" + } + } + } + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ThreadObject" + } + } + }, + "description": "OK" + } + }, + "summary": "Create a thread.", + "tags": [ + "Assistants" + ], + "x-oaiMeta": { + "beta": true, + "examples": [ + { + "request": { + "curl": "curl https://api.openai.com/v1/threads \\\n -H \"Content-Type: application/json\" \\\n -H \"Authorization: Bearer $OPENAI_API_KEY\" \\\n -H \"OpenAI-Beta: assistants=v1\" \\\n -d ''\n", + "node.js": "import OpenAI from \"openai\";\n\nconst openai = new OpenAI();\n\nasync function main() {\n const emptyThread = await openai.beta.threads.create();\n\n console.log(emptyThread);\n}\n\nmain();", + "python": "from openai import OpenAI\nclient = OpenAI()\n\nempty_thread = openai.beta.threads.create()\nprint(empty_thread)\n" + }, + "response": "{\n \"id\": \"thread_abc123\",\n \"object\": \"thread\",\n \"created_at\": 1699012949,\n \"metadata\": {}\n}\n", + "title": "Empty" + }, + { + "request": { + "curl": "curl https://api.openai.com/v1/threads \\\n-H \"Content-Type: application/json\" \\\n-H \"Authorization: Bearer $OPENAI_API_KEY\" \\\n-H \"OpenAI-Beta: assistants=v1\" \\\n-d '{\n \"messages\": [{\n \"role\": \"user\",\n \"content\": \"Hello, what is AI?\",\n \"file_ids\": [\"file-abc123\"]\n }, {\n \"role\": \"user\",\n \"content\": \"How does AI work? Explain it in simple terms.\"\n }]\n }'\n", + "node.js": "import OpenAI from \"openai\";\n\nconst openai = new OpenAI();\n\nasync function main() {\n const messageThread = await openai.beta.threads.create({\n messages: [\n {\n role: \"user\",\n content: \"Hello, what is AI?\",\n file_ids: [\"file-abc123\"],\n },\n {\n role: \"user\",\n content: \"How does AI work? Explain it in simple terms.\",\n },\n ],\n });\n\n console.log(messageThread);\n}\n\nmain();", + "python": "from openai import OpenAI\nclient = OpenAI()\n\nmessage_thread = openai.beta.threads.create(\n messages=[\n {\n \"role\": \"user\",\n \"content\": \"Hello, what is AI?\",\n \"file_ids\": [\"file-abc123\"],\n },\n {\n \"role\": \"user\",\n \"content\": \"How does AI work? Explain it in simple terms.\"\n },\n ]\n)\n\nprint(message_thread)\n" + }, + "response": "{\n id: 'thread_abc123',\n object: 'thread',\n created_at: 1699014083,\n metadata: {}\n}\n", + "title": "Messages" + } + ], + "name": "Create thread", + "returns": "A [thread](/docs/api-reference/threads) object." + } + } + }, + "/threads/runs": { + "post": { + "operationId": "createThreadAndRun", + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/CreateThreadAndRunRequest" + } + } + }, + "required": true + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/RunObject" + } + } + }, + "description": "OK" + } + }, + "summary": "Create a thread and run it in one request.", + "tags": [ + "Assistants" + ], + "x-oaiMeta": { + "beta": true, + "examples": { + "request": { + "curl": "curl https://api.openai.com/v1/threads/runs \\\n -H 'Authorization: Bearer $OPENAI_API_KEY' \\\n -H 'Content-Type: application/json' \\\n -H 'OpenAI-Beta: assistants=v1' \\\n -d '{\n \"assistant_id\": \"asst_IgmpQTah3ZfPHCVZjTqAY8Kv\",\n \"thread\": {\n \"messages\": [\n {\"role\": \"user\", \"content\": \"Explain deep learning to a 5 year old.\"}\n ]\n }\n }'\n", + "node.js": "import OpenAI from \"openai\";\n\nconst openai = new OpenAI();\n\nasync function main() {\n const run = await openai.beta.threads.createAndRun({\n assistant_id: \"asst_IgmpQTah3ZfPHCVZjTqAY8Kv\",\n thread: {\n messages: [\n { role: \"user\", content: \"Explain deep learning to a 5 year old.\" },\n ],\n },\n });\n\n console.log(run);\n}\n\nmain();\n", + "python": "from openai import OpenAI\nclient = OpenAI()\n\nrun = client.beta.threads.create_and_run(\n assistant_id=\"asst_IgmpQTah3ZfPHCVZjTqAY8Kv\",\n thread={\n \"messages\": [\n {\"role\": \"user\", \"content\": \"Explain deep learning to a 5 year old.\"}\n ]\n }\n)\n" + }, + "response": "{\n \"id\": \"run_3Qudf05GGhCleEg9ggwfJQih\",\n \"object\": \"thread.run\",\n \"created_at\": 1699076792,\n \"assistant_id\": \"asst_IgmpQTah3ZfPHCVZjTqAY8Kv\",\n \"thread_id\": \"thread_Ec3eKZcWI00WDZRC7FZci8hP\",\n \"status\": \"queued\",\n \"started_at\": null,\n \"expires_at\": 1699077392,\n \"cancelled_at\": null,\n \"failed_at\": null,\n \"completed_at\": null,\n \"last_error\": null,\n \"model\": \"gpt-4\",\n \"instructions\": \"You are a helpful assistant.\",\n \"tools\": [],\n \"file_ids\": [],\n \"metadata\": {}\n}\n" + }, + "name": "Create thread and run", + "returns": "A [run](/docs/api-reference/runs/object) object." + } + } + }, + "/threads/{thread_id}": { + "delete": { + "operationId": "deleteThread", + "parameters": [ + { + "description": "The ID of the thread to delete.", + "in": "path", + "name": "thread_id", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/DeleteThreadResponse" + } + } + }, + "description": "OK" + } + }, + "summary": "Delete a thread.", + "tags": [ + "Assistants" + ], + "x-oaiMeta": { + "beta": true, + "examples": { + "request": { + "curl": "curl https://api.openai.com/v1/threads/thread_abc123 \\\n -H \"Content-Type: application/json\" \\\n -H \"Authorization: Bearer $OPENAI_API_KEY\" \\\n -H \"OpenAI-Beta: assistants=v1\" \\\n -X DELETE\n", + "node.js": "import OpenAI from \"openai\";\n\nconst openai = new OpenAI();\n\nasync function main() {\n const response = await openai.beta.threads.del(\"thread_abc123\");\n\n console.log(response);\n}\nmain();", + "python": "from openai import OpenAI\nclient = OpenAI()\n\nresponse = openai.beta.threads.delete(\"thread_abc123\")\nprint(response)\n" + }, + "response": "{\n \"id\": \"thread_abc123\",\n \"object\": \"thread.deleted\",\n \"deleted\": true\n}\n" + }, + "name": "Delete thread", + "returns": "Deletion status" + } + }, + "get": { + "operationId": "getThread", + "parameters": [ + { + "description": "The ID of the thread to retrieve.", + "in": "path", + "name": "thread_id", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ThreadObject" + } + } + }, + "description": "OK" + } + }, + "summary": "Retrieves a thread.", + "tags": [ + "Assistants" + ], + "x-oaiMeta": { + "beta": true, + "examples": { + "request": { + "curl": "curl https://api.openai.com/v1/threads/thread_abc123 \\\n -H \"Content-Type: application/json\" \\\n -H \"Authorization: Bearer $OPENAI_API_KEY\" \\\n -H \"OpenAI-Beta: assistants=v1\"\n", + "node.js": "import OpenAI from \"openai\";\n\nconst openai = new OpenAI();\n\nasync function main() {\n const myThread = await openai.beta.threads.retrieve(\n \"thread_abc123\"\n );\n\n console.log(myThread);\n}\n\nmain();", + "python": "from openai import OpenAI\nclient = OpenAI()\n\nmy_thread = openai.beta.threads.retrieve(\"thread_abc123\")\nprint(my_thread)\n" + }, + "response": "{\n \"id\": \"thread_abc123\",\n \"object\": \"thread\",\n \"created_at\": 1699014083,\n \"metadata\": {}\n}\n" + }, + "name": "Retrieve thread", + "returns": "The [thread](/docs/api-reference/threads/object) object matching the specified ID." + } + }, + "post": { + "operationId": "modifyThread", + "parameters": [ + { + "description": "The ID of the thread to modify. Only the `metadata` can be modified.", + "in": "path", + "name": "thread_id", + "required": true, + "schema": { + "type": "string" + } + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ModifyThreadRequest" + } + } + }, + "required": true + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ThreadObject" + } + } + }, + "description": "OK" + } + }, + "summary": "Modifies a thread.", + "tags": [ + "Assistants" + ], + "x-oaiMeta": { + "beta": true, + "examples": { + "request": { + "curl": "curl https://api.openai.com/v1/threads/thread_abc123 \\\n -H \"Content-Type: application/json\" \\\n -H \"Authorization: Bearer $OPENAI_API_KEY\" \\\n -H \"OpenAI-Beta: assistants=v1\" \\\n -d '{\n \"metadata\": {\n \"modified\": \"true\",\n \"user\": \"abc123\"\n }\n }'\n", + "node.js": "import OpenAI from \"openai\";\n\nconst openai = new OpenAI();\n\nasync function main() {\n const updatedThread = await openai.beta.threads.update(\n \"thread_abc123\",\n {\n metadata: { modified: \"true\", user: \"abc123\" },\n }\n );\n\n console.log(updatedThread);\n}\n\nmain();", + "python": "from openai import OpenAI\nclient = OpenAI()\n\nmy_updated_thread = openai.beta.threads.update(\n \"thread_abc123\", \n metadata={\n \"modified\": \"true\", \n \"user\": \"abc123\"\n }\n)\nprint(my_updated_thread)\n" + }, + "response": "{\n \"id\": \"thread_abc123\",\n \"object\": \"thread\",\n \"created_at\": 1699014083,\n \"metadata\": {\n \"modified\": \"true\",\n \"user\": \"abc123\"\n }\n}\n" + }, + "name": "Modify thread", + "returns": "The modified [thread](/docs/api-reference/threads/object) object matching the specified ID." + } + } + }, + "/threads/{thread_id}/messages": { + "get": { + "operationId": "listMessages", + "parameters": [ + { + "description": "The ID of the [thread](/docs/api-reference/threads) the messages belong to.", + "in": "path", + "name": "thread_id", + "required": true, + "schema": { + "type": "string" + } + }, + { + "description": "A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 20.\n", + "in": "query", + "name": "limit", + "required": false, + "schema": { + "default": 20, + "type": "integer" + } + }, + { + "description": "Sort order by the `created_at` timestamp of the objects. `asc` for ascending order and `desc` for descending order.\n", + "in": "query", + "name": "order", + "schema": { + "default": "desc", + "enum": [ + "asc", + "desc" + ], + "type": "string" + } + }, + { + "description": "A cursor for use in pagination. `after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with obj_foo, your subsequent call can include after=obj_foo in order to fetch the next page of the list.\n", + "in": "query", + "name": "after", + "schema": { + "type": "string" + } + }, + { + "description": "A cursor for use in pagination. `before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with obj_foo, your subsequent call can include before=obj_foo in order to fetch the previous page of the list.\n", + "in": "query", + "name": "before", + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ListMessagesResponse" + } + } + }, + "description": "OK" + } + }, + "summary": "Returns a list of messages for a given thread.", + "tags": [ + "Assistants" + ], + "x-oaiMeta": { + "beta": true, + "examples": { + "request": { + "curl": "curl https://api.openai.com/v1/threads/thread_abc123/messages \\\n -H \"Content-Type: application/json\" \\\n -H \"Authorization: Bearer $OPENAI_API_KEY\" \\\n -H \"OpenAI-Beta: assistants=v1\"\n", + "node.js": "import OpenAI from \"openai\";\n\nconst openai = new OpenAI();\n\nasync function main() {\n const threadMessages = await openai.beta.threads.messages.list(\n \"thread_1OWaSqVIxJdy3KYnJLbXEWhy\"\n );\n\n console.log(threadMessages.data);\n}\n\nmain();", + "python": "from openai import OpenAI\nclient = OpenAI()\n\nthread_messages = openai.beta.threads.messages.list(\"thread_1OWaSqVIxJdy3KYnJLbXEWhy\")\nprint(thread_messages.data)\n" + }, + "response": "{\n \"object\": \"list\",\n \"data\": [\n {\n \"id\": \"msg_abc123\",\n \"object\": \"thread.message\",\n \"created_at\": 1699016383,\n \"thread_id\": \"thread_abc123\",\n \"role\": \"user\",\n \"content\": [\n {\n \"type\": \"text\",\n \"text\": {\n \"value\": \"How does AI work? Explain it in simple terms.\",\n \"annotations\": []\n }\n }\n ],\n \"file_ids\": [],\n \"assistant_id\": null,\n \"run_id\": null,\n \"metadata\": {}\n },\n {\n \"id\": \"msg_abc456\",\n \"object\": \"thread.message\",\n \"created_at\": 1699016383,\n \"thread_id\": \"thread_abc123\",\n \"role\": \"user\",\n \"content\": [\n {\n \"type\": \"text\",\n \"text\": {\n \"value\": \"Hello, what is AI?\",\n \"annotations\": []\n }\n }\n ],\n \"file_ids\": [\n \"file-abc123\"\n ],\n \"assistant_id\": null,\n \"run_id\": null,\n \"metadata\": {}\n }\n ],\n \"first_id\": \"msg_abc123\",\n \"last_id\": \"msg_abc456\",\n \"has_more\": false\n}\n" + }, + "name": "List messages", + "returns": "A list of [message](/docs/api-reference/messages) objects." + } + }, + "post": { + "operationId": "createMessage", + "parameters": [ + { + "description": "The ID of the [thread](/docs/api-reference/threads) to create a message for.", + "in": "path", + "name": "thread_id", + "required": true, + "schema": { + "type": "string" + } + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/CreateMessageRequest" + } + } + }, + "required": true + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/MessageObject" + } + } + }, + "description": "OK" + } + }, + "summary": "Create a message.", + "tags": [ + "Assistants" + ], + "x-oaiMeta": { + "beta": true, + "examples": { + "request": { + "curl": "curl https://api.openai.com/v1/threads/thread_abc123/messages \\\n -H \"Content-Type: application/json\" \\\n -H \"Authorization: Bearer $OPENAI_API_KEY\" \\\n -H \"OpenAI-Beta: assistants=v1\" \\\n -d '{\n \"role\": \"user\",\n \"content\": \"How does AI work? Explain it in simple terms.\"\n }'\n", + "node.js": "import OpenAI from \"openai\";\n\nconst openai = new OpenAI();\n\nasync function main() {\n const threadMessages = await openai.beta.threads.messages.create(\n \"thread_abc123\",\n { role: \"user\", content: \"How does AI work? Explain it in simple terms.\" }\n );\n\n console.log(threadMessages);\n}\n\nmain();", + "python": "from openai import OpenAI\nclient = OpenAI()\n\nthread_message = openai.beta.threads.messages.create(\n \"thread_abc123\",\n role=\"user\",\n content=\"How does AI work? Explain it in simple terms.\",\n)\nprint(thread_message)\n" + }, + "response": "{\n \"id\": \"msg_abc123\",\n \"object\": \"thread.message\",\n \"created_at\": 1699017614,\n \"thread_id\": \"thread_abc123\",\n \"role\": \"user\",\n \"content\": [\n {\n \"type\": \"text\",\n \"text\": {\n \"value\": \"How does AI work? Explain it in simple terms.\",\n \"annotations\": []\n }\n }\n ],\n \"file_ids\": [],\n \"assistant_id\": null,\n \"run_id\": null,\n \"metadata\": {}\n}\n" + }, + "name": "Create message", + "returns": "A [message](/docs/api-reference/messages/object) object." + } + } + }, + "/threads/{thread_id}/messages/{message_id}": { + "get": { + "operationId": "getMessage", + "parameters": [ + { + "description": "The ID of the [thread](/docs/api-reference/threads) to which this message belongs.", + "in": "path", + "name": "thread_id", + "required": true, + "schema": { + "type": "string" + } + }, + { + "description": "The ID of the message to retrieve.", + "in": "path", + "name": "message_id", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/MessageObject" + } + } + }, + "description": "OK" + } + }, + "summary": "Retrieve a message.", + "tags": [ + "Assistants" + ], + "x-oaiMeta": { + "beta": true, + "examples": { + "request": { + "curl": "curl https://api.openai.com/v1/threads/thread_abc123/messages/msg_abc123 \\\n -H \"Content-Type: application/json\" \\\n -H \"Authorization: Bearer $OPENAI_API_KEY\" \\\n -H \"OpenAI-Beta: assistants=v1\"\n", + "node.js": "import OpenAI from \"openai\";\n\nconst openai = new OpenAI();\n\nasync function main() {\n const message = await openai.beta.threads.messages.retrieve(\n \"thread_abc123\",\n \"msg_abc123\"\n );\n\n console.log(message);\n}\n\nmain();", + "python": "from openai import OpenAI\nclient = OpenAI()\n\nmessage = openai.beta.threads.messages.retrieve(\n message_id=\"msg_abc123\",\n thread_id=\"thread_abc123\",\n)\nprint(message)\n" + }, + "response": "{\n \"id\": \"msg_abc123\",\n \"object\": \"thread.message\",\n \"created_at\": 1699017614,\n \"thread_id\": \"thread_abc123\",\n \"role\": \"user\",\n \"content\": [\n {\n \"type\": \"text\",\n \"text\": {\n \"value\": \"How does AI work? Explain it in simple terms.\",\n \"annotations\": []\n }\n }\n ],\n \"file_ids\": [],\n \"assistant_id\": null,\n \"run_id\": null,\n \"metadata\": {}\n}\n" + }, + "name": "Retrieve message", + "returns": "The [message](/docs/api-reference/threads/messages/object) object matching the specified ID." + } + }, + "post": { + "operationId": "modifyMessage", + "parameters": [ + { + "description": "The ID of the thread to which this message belongs.", + "in": "path", + "name": "thread_id", + "required": true, + "schema": { + "type": "string" + } + }, + { + "description": "The ID of the message to modify.", + "in": "path", + "name": "message_id", + "required": true, + "schema": { + "type": "string" + } + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ModifyMessageRequest" + } + } + }, + "required": true + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/MessageObject" + } + } + }, + "description": "OK" + } + }, + "summary": "Modifies a message.", + "tags": [ + "Assistants" + ], + "x-oaiMeta": { + "beta": true, + "examples": { + "request": { + "curl": "curl https://api.openai.com/v1/threads/thread_abc123/messages/msg_abc123 \\\n -H \"Content-Type: application/json\" \\\n -H \"Authorization: Bearer $OPENAI_API_KEY\" \\\n -H \"OpenAI-Beta: assistants=v1\" \\\n -d '{\n \"metadata\": {\n \"modified\": \"true\",\n \"user\": \"abc123\"\n }\n }'\n", + "node.js": "import OpenAI from \"openai\";\n\nconst openai = new OpenAI();\n\nasync function main() {\n const message = await openai.beta.threads.messages.update(\n \"thread_abc123\",\n \"msg_abc123\",\n {\n metadata: {\n modified: \"true\",\n user: \"abc123\",\n },\n }\n }'", + "python": "from openai import OpenAI\nclient = OpenAI()\n\nmessage = openai.beta.threads.messages.update(\n message_id=\"msg_abc12\",\n thread_id=\"thread_abc123\",\n metadata={\n \"modified\": \"true\",\n \"user\": \"abc123\",\n },\n)\nprint(message)\n" + }, + "response": "{\n \"id\": \"msg_abc123\",\n \"object\": \"thread.message\",\n \"created_at\": 1699017614,\n \"thread_id\": \"thread_abc123\",\n \"role\": \"user\",\n \"content\": [\n {\n \"type\": \"text\",\n \"text\": {\n \"value\": \"How does AI work? Explain it in simple terms.\",\n \"annotations\": []\n }\n }\n ],\n \"file_ids\": [],\n \"assistant_id\": null,\n \"run_id\": null,\n \"metadata\": {\n \"modified\": \"true\",\n \"user\": \"abc123\"\n }\n}\n" + }, + "name": "Modify message", + "returns": "The modified [message](/docs/api-reference/threads/messages/object) object." + } + } + }, + "/threads/{thread_id}/messages/{message_id}/files": { + "get": { + "operationId": "listMessageFiles", + "parameters": [ + { + "description": "The ID of the thread that the message and files belong to.", + "in": "path", + "name": "thread_id", + "required": true, + "schema": { + "type": "string" + } + }, + { + "description": "The ID of the message that the files belongs to.", + "in": "path", + "name": "message_id", + "required": true, + "schema": { + "type": "string" + } + }, + { + "description": "A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 20.\n", + "in": "query", + "name": "limit", + "required": false, + "schema": { + "default": 20, + "type": "integer" + } + }, + { + "description": "Sort order by the `created_at` timestamp of the objects. `asc` for ascending order and `desc` for descending order.\n", + "in": "query", + "name": "order", + "schema": { + "default": "desc", + "enum": [ + "asc", + "desc" + ], + "type": "string" + } + }, + { + "description": "A cursor for use in pagination. `after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with obj_foo, your subsequent call can include after=obj_foo in order to fetch the next page of the list.\n", + "in": "query", + "name": "after", + "schema": { + "type": "string" + } + }, + { + "description": "A cursor for use in pagination. `before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with obj_foo, your subsequent call can include before=obj_foo in order to fetch the previous page of the list.\n", + "in": "query", + "name": "before", + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ListMessageFilesResponse" + } + } + }, + "description": "OK" + } + }, + "summary": "Returns a list of message files.", + "tags": [ + "Assistants" + ], + "x-oaiMeta": { + "beta": true, + "examples": { + "request": { + "curl": "curl https://api.openai.com/v1/threads/thread_RGUhOuO9b2nrktrmsQ2uSR6I/messages/msg_q3XhbGmMzsqEFa81gMLBDAVU/files \\\n -H 'Authorization: Bearer $OPENAI_API_KEY' \\\n -H 'Content-Type: application/json' \\\n -H 'OpenAI-Beta: assistants=v1'\n", + "node.js": "import OpenAI from \"openai\";\nconst openai = new OpenAI();\n\nasync function main() {\n const messageFiles = await openai.beta.threads.messages.files.list(\n \"thread_RGUhOuO9b2nrktrmsQ2uSR6I\",\n \"msg_q3XhbGmMzsqEFa81gMLBDAVU\"\n );\n console.log(messageFiles);\n}\n\nmain();\n", + "python": "from openai import OpenAI\nclient = OpenAI()\n\nmessage_files = client.beta.threads.messages.files.list(\n thread_id=\"thread_RGUhOuO9b2nrktrmsQ2uSR6I\",\n message_id=\"msg_q3XhbGmMzsqEFa81gMLBDAVU\"\n)\nprint(message_files)\n" + }, + "response": "{\n \"object\": \"list\",\n \"data\": [\n {\n \"id\": \"file-dEWwUbt2UGHp3v0e0DpCzemP\",\n \"object\": \"thread.message.file\",\n \"created_at\": 1699061776,\n \"message_id\": \"msg_q3XhbGmMzsqEFa81gMLBDAVU\"\n },\n {\n \"id\": \"file-dEWwUbt2UGHp3v0e0DpCzemP\",\n \"object\": \"thread.message.file\",\n \"created_at\": 1699061776,\n \"message_id\": \"msg_q3XhbGmMzsqEFa81gMLBDAVU\"\n }\n ],\n \"first_id\": \"file-dEWwUbt2UGHp3v0e0DpCzemP\",\n \"last_id\": \"file-dEWwUbt2UGHp3v0e0DpCzemP\",\n \"has_more\": false\n}\n" + }, + "name": "List message files", + "returns": "A list of [message file](/docs/api-reference/messages/file-object) objects." + } + } + }, + "/threads/{thread_id}/messages/{message_id}/files/{file_id}": { + "get": { + "operationId": "getMessageFile", + "parameters": [ + { + "description": "The ID of the thread to which the message and File belong.", + "in": "path", + "name": "thread_id", + "required": true, + "schema": { + "example": "thread_AF1WoRqd3aJAHsqc9NY7iL8F", + "type": "string" + } + }, + { + "description": "The ID of the message the file belongs to.", + "in": "path", + "name": "message_id", + "required": true, + "schema": { + "example": "msg_AF1WoRqd3aJAHsqc9NY7iL8F", + "type": "string" + } + }, + { + "description": "The ID of the file being retrieved.", + "in": "path", + "name": "file_id", + "required": true, + "schema": { + "example": "file-AF1WoRqd3aJAHsqc9NY7iL8F", + "type": "string" + } + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/MessageFileObject" + } + } + }, + "description": "OK" + } + }, + "summary": "Retrieves a message file.", + "tags": [ + "Assistants" + ], + "x-oaiMeta": { + "beta": true, + "examples": { + "request": { + "curl": "curl https://api.openai.com/v1/threads/thread_RGUhOuO9b2nrktrmsQ2uSR6I/messages/msg_q3XhbGmMzsqEFa81gMLBDAVU/files/file-dEWwUbt2UGHp3v0e0DpCzemP \\\n -H 'Authorization: Bearer $OPENAI_API_KEY' \\\n -H 'Content-Type: application/json' \\\n -H 'OpenAI-Beta: assistants=v1'\n", + "node.js": "import OpenAI from \"openai\";\nconst openai = new OpenAI();\n\nasync function main() {\n const messageFile = await openai.beta.threads.messages.files.retrieve(\n \"thread_RGUhOuO9b2nrktrmsQ2uSR6I\",\n \"msg_q3XhbGmMzsqEFa81gMLBDAVU\",\n \"file-dEWwUbt2UGHp3v0e0DpCzemP\"\n );\n console.log(messageFile);\n}\n\nmain();\n", + "python": "from openai import OpenAI\nclient = OpenAI()\n\nmessage_files = client.beta.threads.messages.files.retrieve(\n thread_id=\"thread_RGUhOuO9b2nrktrmsQ2uSR6I\",\n message_id=\"msg_q3XhbGmMzsqEFa81gMLBDAVU\",\n file_id=\"file-dEWwUbt2UGHp3v0e0DpCzemP\"\n)\nprint(message_files)\n" + }, + "response": "{\n \"id\": \"file-dEWwUbt2UGHp3v0e0DpCzemP\",\n \"object\": \"thread.message.file\",\n \"created_at\": 1699061776,\n \"message_id\": \"msg_q3XhbGmMzsqEFa81gMLBDAVU\"\n}\n" + }, + "name": "Retrieve message file", + "returns": "The [message file](/docs/api-reference/messages/file-object) object." + } + } + }, + "/threads/{thread_id}/runs": { + "get": { + "operationId": "listRuns", + "parameters": [ + { + "description": "The ID of the thread the run belongs to.", + "in": "path", + "name": "thread_id", + "required": true, + "schema": { + "type": "string" + } + }, + { + "description": "A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 20.\n", + "in": "query", + "name": "limit", + "required": false, + "schema": { + "default": 20, + "type": "integer" + } + }, + { + "description": "Sort order by the `created_at` timestamp of the objects. `asc` for ascending order and `desc` for descending order.\n", + "in": "query", + "name": "order", + "schema": { + "default": "desc", + "enum": [ + "asc", + "desc" + ], + "type": "string" + } + }, + { + "description": "A cursor for use in pagination. `after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with obj_foo, your subsequent call can include after=obj_foo in order to fetch the next page of the list.\n", + "in": "query", + "name": "after", + "schema": { + "type": "string" + } + }, + { + "description": "A cursor for use in pagination. `before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with obj_foo, your subsequent call can include before=obj_foo in order to fetch the previous page of the list.\n", + "in": "query", + "name": "before", + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ListRunsResponse" + } + } + }, + "description": "OK" + } + }, + "summary": "Returns a list of runs belonging to a thread.", + "tags": [ + "Assistants" + ], + "x-oaiMeta": { + "beta": true, + "examples": { + "request": { + "curl": "curl https://api.openai.com/v1/threads/thread_BDDwIqM4KgHibXX3mqmN3Lgs/runs \\\n -H 'Authorization: Bearer $OPENAI_API_KEY' \\\n -H 'Content-Type: application/json' \\\n -H 'OpenAI-Beta: assistants=v1'\n", + "node.js": "import OpenAI from \"openai\";\n\nconst openai = new OpenAI();\n\nasync function main() {\n const runs = await openai.beta.threads.runs.list(\n \"thread_BDDwIqM4KgHibXX3mqmN3Lgs\"\n );\n\n console.log(runs);\n}\n\nmain();\n", + "python": "from openai import OpenAI\nclient = OpenAI()\n\nruns = client.beta.threads.runs.list(\n \"thread_BDDwIqM4KgHibXX3mqmN3Lgs\"\n)\nprint(runs)\n" + }, + "response": "{\n \"object\": \"list\",\n \"data\": [\n {\n \"id\": \"run_5pyUEwhaPk11vCKiDneUWXXY\",\n \"object\": \"thread.run\",\n \"created_at\": 1699075072,\n \"assistant_id\": \"asst_nGl00s4xa9zmVY6Fvuvz9wwQ\",\n \"thread_id\": \"thread_BDDwIqM4KgHibXX3mqmN3Lgs\",\n \"status\": \"completed\",\n \"started_at\": 1699075072,\n \"expires_at\": null,\n \"cancelled_at\": null,\n \"failed_at\": null,\n \"completed_at\": 1699075073,\n \"last_error\": null,\n \"model\": \"gpt-3.5-turbo\",\n \"instructions\": null,\n \"tools\": [\n {\n \"type\": \"code_interpreter\"\n }\n ],\n \"file_ids\": [\n \"file-9F1ex49ipEnKzyLUNnCA0Yzx\",\n \"file-dEWwUbt2UGHp3v0e0DpCzemP\"\n ],\n \"metadata\": {}\n },\n {\n \"id\": \"run_UWvV94U0FQYiT2rlbBrdEVmC\",\n \"object\": \"thread.run\",\n \"created_at\": 1699063290,\n \"assistant_id\": \"asst_nGl00s4xa9zmVY6Fvuvz9wwQ\",\n \"thread_id\": \"thread_BDDwIqM4KgHibXX3mqmN3Lgs\",\n \"status\": \"completed\",\n \"started_at\": 1699063290,\n \"expires_at\": null,\n \"cancelled_at\": null,\n \"failed_at\": null,\n \"completed_at\": 1699063291,\n \"last_error\": null,\n \"model\": \"gpt-3.5-turbo\",\n \"instructions\": null,\n \"tools\": [\n {\n \"type\": \"code_interpreter\"\n }\n ],\n \"file_ids\": [\n \"file-9F1ex49ipEnKzyLUNnCA0Yzx\",\n \"file-dEWwUbt2UGHp3v0e0DpCzemP\"\n ],\n \"metadata\": {}\n }\n ],\n \"first_id\": \"run_5pyUEwhaPk11vCKiDneUWXXY\",\n \"last_id\": \"run_UWvV94U0FQYiT2rlbBrdEVmC\",\n \"has_more\": false\n}\n" + }, + "name": "List runs", + "returns": "A list of [run](/docs/api-reference/runs/object) objects." + } + }, + "post": { + "operationId": "createRun", + "parameters": [ + { + "description": "The ID of the thread to run.", + "in": "path", + "name": "thread_id", + "required": true, + "schema": { + "type": "string" + } + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/CreateRunRequest" + } + } + }, + "required": true + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/RunObject" + } + } + }, + "description": "OK" + } + }, + "summary": "Create a run.", + "tags": [ + "Assistants" + ], + "x-oaiMeta": { + "beta": true, + "examples": { + "request": { + "curl": "curl https://api.openai.com/v1/threads/thread_BDDwIqM4KgHibXX3mqmN3Lgs/runs \\\n -H 'Authorization: Bearer $OPENAI_API_KEY' \\\n -H 'Content-Type: application/json' \\\n -H 'OpenAI-Beta: assistants=v1' \\\n -d '{\n \"assistant_id\": \"asst_nGl00s4xa9zmVY6Fvuvz9wwQ\"\n }'\n", + "node.js": "import OpenAI from \"openai\";\n\nconst openai = new OpenAI();\n\nasync function main() {\n const run = await openai.beta.threads.runs.create(\n \"thread_BDDwIqM4KgHibXX3mqmN3Lgs\",\n { assistant_id: \"asst_nGl00s4xa9zmVY6Fvuvz9wwQ\" }\n );\n\n console.log(run);\n}\n\nmain();\n", + "python": "from openai import OpenAI\nclient = OpenAI()\n\nrun = client.beta.threads.runs.create(\n thread_id=\"thread_BDDwIqM4KgHibXX3mqmN3Lgs\",\n assistant_id=\"asst_nGl00s4xa9zmVY6Fvuvz9wwQ\"\n)\nprint(run)\n" + }, + "response": "{\n \"id\": \"run_UWvV94U0FQYiT2rlbBrdEVmC\",\n \"object\": \"thread.run\",\n \"created_at\": 1699063290,\n \"assistant_id\": \"asst_nGl00s4xa9zmVY6Fvuvz9wwQ\",\n \"thread_id\": \"thread_BDDwIqM4KgHibXX3mqmN3Lgs\",\n \"status\": \"queued\",\n \"started_at\": 1699063290,\n \"expires_at\": null,\n \"cancelled_at\": null,\n \"failed_at\": null,\n \"completed_at\": 1699063291,\n \"last_error\": null,\n \"model\": \"gpt-4\",\n \"instructions\": null,\n \"tools\": [\n {\n \"type\": \"code_interpreter\"\n }\n ],\n \"file_ids\": [\n \"file-9F1ex49ipEnKzyLUNnCA0Yzx\",\n \"file-dEWwUbt2UGHp3v0e0DpCzemP\"\n ],\n \"metadata\": {}\n}\n" + }, + "name": "Create run", + "returns": "A [run](/docs/api-reference/runs/object) object." + } + } + }, + "/threads/{thread_id}/runs/{run_id}": { + "get": { + "operationId": "getRun", + "parameters": [ + { + "description": "The ID of the [thread](/docs/api-reference/threads) that was run.", + "in": "path", + "name": "thread_id", + "required": true, + "schema": { + "type": "string" + } + }, + { + "description": "The ID of the run to retrieve.", + "in": "path", + "name": "run_id", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/RunObject" + } + } + }, + "description": "OK" + } + }, + "summary": "Retrieves a run.", + "tags": [ + "Assistants" + ], + "x-oaiMeta": { + "beta": true, + "examples": { + "request": { + "curl": "curl https://api.openai.com/v1/threads/thread_BDDwIqM4KgHibXX3mqmN3Lgs/runs/run_5pyUEwhaPk11vCKiDneUWXXY \\\n -H 'Authorization: Bearer $OPENAI_API_KEY' \\\n -H 'OpenAI-Beta: assistants=v1'\n", + "node.js": "import OpenAI from \"openai\";\n\nconst openai = new OpenAI();\n\nasync function main() {\n const run = await openai.beta.threads.runs.retrieve(\n \"thread_BDDwIqM4KgHibXX3mqmN3Lgs\",\n \"run_5pyUEwhaPk11vCKiDneUWXXY\"\n );\n\n console.log(run);\n}\n\nmain();\n", + "python": "from openai import OpenAI\nclient = OpenAI()\n\nrun = client.beta.threads.runs.retrieve(\n thread_id=\"thread_BDDwIqM4KgHibXX3mqmN3Lgs\",\n run_id=\"run_5pyUEwhaPk11vCKiDneUWXXY\"\n)\nprint(run)\n" + }, + "response": "{\n \"id\": \"run_5pyUEwhaPk11vCKiDneUWXXY\",\n \"object\": \"thread.run\",\n \"created_at\": 1699075072,\n \"assistant_id\": \"asst_nGl00s4xa9zmVY6Fvuvz9wwQ\",\n \"thread_id\": \"thread_BDDwIqM4KgHibXX3mqmN3Lgs\",\n \"status\": \"completed\",\n \"started_at\": 1699075072,\n \"expires_at\": null,\n \"cancelled_at\": null,\n \"failed_at\": null,\n \"completed_at\": 1699075073,\n \"last_error\": null,\n \"model\": \"gpt-3.5-turbo\",\n \"instructions\": null,\n \"tools\": [\n {\n \"type\": \"code_interpreter\"\n }\n ],\n \"file_ids\": [\n \"file-9F1ex49ipEnKzyLUNnCA0Yzx\",\n \"file-dEWwUbt2UGHp3v0e0DpCzemP\"\n ],\n \"metadata\": {}\n}\n" + }, + "name": "Retrieve run", + "returns": "The [run](/docs/api-reference/runs/object) object matching the specified ID." + } + }, + "post": { + "operationId": "modifyRun", + "parameters": [ + { + "description": "The ID of the [thread](/docs/api-reference/threads) that was run.", + "in": "path", + "name": "thread_id", + "required": true, + "schema": { + "type": "string" + } + }, + { + "description": "The ID of the run to modify.", + "in": "path", + "name": "run_id", + "required": true, + "schema": { + "type": "string" + } + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ModifyRunRequest" + } + } + }, + "required": true + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/RunObject" + } + } + }, + "description": "OK" + } + }, + "summary": "Modifies a run.", + "tags": [ + "Assistants" + ], + "x-oaiMeta": { + "beta": true, + "examples": { + "request": { + "curl": "curl https://api.openai.com/v1/threads/thread_BDDwIqM4KgHibXX3mqmN3Lgs/runs/run_5pyUEwhaPk11vCKiDneUWXXY \\\n -H 'Authorization: Bearer $OPENAI_API_KEY' \\\n -H 'Content-Type: application/json' \\\n -H 'OpenAI-Beta: assistants=v1' \\\n -d '{\n \"metadata\": {\n \"user_id\": \"user_zmVY6FvuBDDwIqM4KgH\"\n }\n }'\n", + "node.js": "import OpenAI from \"openai\";\n\nconst openai = new OpenAI();\n\nasync function main() {\n const run = await openai.beta.threads.runs.update(\n \"thread_BDDwIqM4KgHibXX3mqmN3Lgs\",\n \"run_5pyUEwhaPk11vCKiDneUWXXY\",\n {\n metadata: {\n user_id: \"user_zmVY6FvuBDDwIqM4KgH\",\n },\n }\n );\n\n console.log(run);\n}\n\nmain();\n", + "python": "from openai import OpenAI\nclient = OpenAI()\n\nrun = client.beta.threads.runs.update(\n thread_id=\"thread_BDDwIqM4KgHibXX3mqmN3Lgs\",\n run_id=\"run_5pyUEwhaPk11vCKiDneUWXXY\",\n metadata={\"user_id\": \"user_zmVY6FvuBDDwIqM4KgH\"},\n)\nprint(run)\n" + }, + "response": "{\n \"id\": \"run_5pyUEwhaPk11vCKiDneUWXXY\",\n \"object\": \"thread.run\",\n \"created_at\": 1699075072,\n \"assistant_id\": \"asst_nGl00s4xa9zmVY6Fvuvz9wwQ\",\n \"thread_id\": \"thread_BDDwIqM4KgHibXX3mqmN3Lgs\",\n \"status\": \"completed\",\n \"started_at\": 1699075072,\n \"expires_at\": null,\n \"cancelled_at\": null,\n \"failed_at\": null,\n \"completed_at\": 1699075073,\n \"last_error\": null,\n \"model\": \"gpt-3.5-turbo\",\n \"instructions\": null,\n \"tools\": [\n {\n \"type\": \"code_interpreter\"\n }\n ],\n \"file_ids\": [\n \"file-9F1ex49ipEnKzyLUNnCA0Yzx\",\n \"file-dEWwUbt2UGHp3v0e0DpCzemP\"\n ],\n \"metadata\": {\n \"user_id\": \"user_zmVY6FvuBDDwIqM4KgH\"\n }\n}\n" + }, + "name": "Modify run", + "returns": "The modified [run](/docs/api-reference/runs/object) object matching the specified ID." + } + } + }, + "/threads/{thread_id}/runs/{run_id}/cancel": { + "post": { + "operationId": "cancelRun", + "parameters": [ + { + "description": "The ID of the thread to which this run belongs.", + "in": "path", + "name": "thread_id", + "required": true, + "schema": { + "type": "string" + } + }, + { + "description": "The ID of the run to cancel.", + "in": "path", + "name": "run_id", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/RunObject" + } + } + }, + "description": "OK" + } + }, + "summary": "Cancels a run that is `in_progress`.", + "tags": [ + "Assistants" + ], + "x-oaiMeta": { + "beta": true, + "examples": { + "request": { + "curl": "curl https://api.openai.com/v1/threads/thread_1cjnJPXj8MFiqTx58jU9TivC/runs/run_BeRGmpGt2wb1VI22ZRniOkrR/cancel \\\n -H 'Authorization: Bearer $OPENAI_API_KEY' \\\n -H 'OpenAI-Beta: assistants=v1' \\\n -X POST\n", + "node.js": "import OpenAI from \"openai\";\n\nconst openai = new OpenAI();\n\nasync function main() {\n const run = await openai.beta.threads.runs.cancel(\n \"thread_1cjnJPXj8MFiqTx58jU9TivC\",\n \"run_BeRGmpGt2wb1VI22ZRniOkrR\"\n );\n\n console.log(run);\n}\n\nmain();\n", + "python": "from openai import OpenAI\nclient = OpenAI()\n\nrun = client.beta.threads.runs.cancel(\n thread_id=\"thread_1cjnJPXj8MFiqTx58jU9TivC\",\n run_id=\"run_BeRGmpGt2wb1VI22ZRniOkrR\"\n)\nprint(run)\n" + }, + "response": "{\n \"id\": \"run_BeRGmpGt2wb1VI22ZRniOkrR\",\n \"object\": \"thread.run\",\n \"created_at\": 1699076126,\n \"assistant_id\": \"asst_IgmpQTah3ZfPHCVZjTqAY8Kv\",\n \"thread_id\": \"thread_1cjnJPXj8MFiqTx58jU9TivC\",\n \"status\": \"cancelling\",\n \"started_at\": 1699076126,\n \"expires_at\": 1699076726,\n \"cancelled_at\": null,\n \"failed_at\": null,\n \"completed_at\": null,\n \"last_error\": null,\n \"model\": \"gpt-4\",\n \"instructions\": \"You summarize books.\",\n \"tools\": [\n {\n \"type\": \"retrieval\"\n }\n ],\n \"file_ids\": [],\n \"metadata\": {}\n}\n" + }, + "name": "Cancel a run", + "returns": "The modified [run](/docs/api-reference/runs/object) object matching the specified ID." + } + } + }, + "/threads/{thread_id}/runs/{run_id}/steps": { + "get": { + "operationId": "listRunSteps", + "parameters": [ + { + "description": "The ID of the thread the run and run steps belong to.", + "in": "path", + "name": "thread_id", + "required": true, + "schema": { + "type": "string" + } + }, + { + "description": "The ID of the run the run steps belong to.", + "in": "path", + "name": "run_id", + "required": true, + "schema": { + "type": "string" + } + }, + { + "description": "A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 20.\n", + "in": "query", + "name": "limit", + "required": false, + "schema": { + "default": 20, + "type": "integer" + } + }, + { + "description": "Sort order by the `created_at` timestamp of the objects. `asc` for ascending order and `desc` for descending order.\n", + "in": "query", + "name": "order", + "schema": { + "default": "desc", + "enum": [ + "asc", + "desc" + ], + "type": "string" + } + }, + { + "description": "A cursor for use in pagination. `after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with obj_foo, your subsequent call can include after=obj_foo in order to fetch the next page of the list.\n", + "in": "query", + "name": "after", + "schema": { + "type": "string" + } + }, + { + "description": "A cursor for use in pagination. `before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with obj_foo, your subsequent call can include before=obj_foo in order to fetch the previous page of the list.\n", + "in": "query", + "name": "before", + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ListRunStepsResponse" + } + } + }, + "description": "OK" + } + }, + "summary": "Returns a list of run steps belonging to a run.", + "tags": [ + "Assistants" + ], + "x-oaiMeta": { + "beta": true, + "examples": { + "request": { + "curl": "curl https://api.openai.com/v1/threads/thread_BDDwIqM4KgHibXX3mqmN3Lgs/runs/run_UWvV94U0FQYiT2rlbBrdEVmC/steps \\\n -H 'Authorization: Bearer $OPENAI_API_KEY' \\\n -H 'Content-Type: application/json' \\\n -H 'OpenAI-Beta: assistants=v1'\n", + "node.js": "import OpenAI from \"openai\";\nconst openai = new OpenAI();\n\nasync function main() {\n const runStep = await openai.beta.threads.runs.steps.list(\n \"thread_BDDwIqM4KgHibXX3mqmN3Lgs\",\n \"run_UWvV94U0FQYiT2rlbBrdEVmC\"\n );\n console.log(runStep);\n}\n\nmain();\n", + "python": "from openai import OpenAI\nclient = OpenAI()\n\nrun_steps = client.beta.threads.runs.steps.list(\n thread_id=\"thread_BDDwIqM4KgHibXX3mqmN3Lgs\",\n run_id=\"run_UWvV94U0FQYiT2rlbBrdEVmC\"\n)\nprint(run_steps)\n" + }, + "response": "{\n \"object\": \"list\",\n \"data\": [\n {\n \"id\": \"step_QyjyrsVsysd7F4K894BZHG97\",\n \"object\": \"thread.run.step\",\n \"created_at\": 1699063291,\n \"run_id\": \"run_UWvV94U0FQYiT2rlbBrdEVmC\",\n \"assistant_id\": \"asst_nGl00s4xa9zmVY6Fvuvz9wwQ\",\n \"thread_id\": \"thread_BDDwIqM4KgHibXX3mqmN3Lgs\",\n \"type\": \"message_creation\",\n \"status\": \"completed\",\n \"cancelled_at\": null,\n \"completed_at\": 1699063291,\n \"expired_at\": null,\n \"failed_at\": null,\n \"last_error\": null,\n \"step_details\": {\n \"type\": \"message_creation\",\n \"message_creation\": {\n \"message_id\": \"msg_6YmiCRmMbbE6FALYNePPHqwm\"\n }\n }\n }\n ],\n \"first_id\": \"step_QyjyrsVsysd7F4K894BZHG97\",\n \"last_id\": \"step_QyjyrsVsysd7F4K894BZHG97\",\n \"has_more\": false\n}\n" + }, + "name": "List run steps", + "returns": "A list of [run step](/docs/api-reference/runs/step-object) objects." + } + } + }, + "/threads/{thread_id}/runs/{run_id}/steps/{step_id}": { + "get": { + "operationId": "getRunStep", + "parameters": [ + { + "description": "The ID of the thread to which the run and run step belongs.", + "in": "path", + "name": "thread_id", + "required": true, + "schema": { + "type": "string" + } + }, + { + "description": "The ID of the run to which the run step belongs.", + "in": "path", + "name": "run_id", + "required": true, + "schema": { + "type": "string" + } + }, + { + "description": "The ID of the run step to retrieve.", + "in": "path", + "name": "step_id", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/RunStepObject" + } + } + }, + "description": "OK" + } + }, + "summary": "Retrieves a run step.", + "tags": [ + "Assistants" + ], + "x-oaiMeta": { + "beta": true, + "examples": { + "request": { + "curl": "curl https://api.openai.com/v1/threads/thread_BDDwIqM4KgHibXX3mqmN3Lgs/runs/run_UWvV94U0FQYiT2rlbBrdEVmC/steps/step_QyjyrsVsysd7F4K894BZHG97 \\\n -H 'Authorization: Bearer $OPENAI_API_KEY' \\\n -H 'Content-Type: application/json' \\\n -H 'OpenAI-Beta: assistants=v1'\n", + "node.js": "import OpenAI from \"openai\";\nconst openai = new OpenAI();\n\nasync function main() {\n const runStep = await openai.beta.threads.runs.steps.retrieve(\n \"thread_BDDwIqM4KgHibXX3mqmN3Lgs\",\n \"run_UWvV94U0FQYiT2rlbBrdEVmC\",\n \"step_QyjyrsVsysd7F4K894BZHG97\"\n );\n console.log(runStep);\n}\n\nmain();\n", + "python": "from openai import OpenAI\nclient = OpenAI()\n\nrun_step = client.beta.threads.runs.steps.retrieve(\n thread_id=\"thread_BDDwIqM4KgHibXX3mqmN3Lgs\",\n run_id=\"run_UWvV94U0FQYiT2rlbBrdEVmC\",\n step_id=\"step_QyjyrsVsysd7F4K894BZHG97\"\n)\nprint(run_step)\n" + }, + "response": "{\n \"id\": \"step_QyjyrsVsysd7F4K894BZHG97\",\n \"object\": \"thread.run.step\",\n \"created_at\": 1699063291,\n \"run_id\": \"run_UWvV94U0FQYiT2rlbBrdEVmC\",\n \"assistant_id\": \"asst_nGl00s4xa9zmVY6Fvuvz9wwQ\",\n \"thread_id\": \"thread_BDDwIqM4KgHibXX3mqmN3Lgs\",\n \"type\": \"message_creation\",\n \"status\": \"completed\",\n \"cancelled_at\": null,\n \"completed_at\": 1699063291,\n \"expired_at\": null,\n \"failed_at\": null,\n \"last_error\": null,\n \"step_details\": {\n \"type\": \"message_creation\",\n \"message_creation\": {\n \"message_id\": \"msg_6YmiCRmMbbE6FALYNePPHqwm\"\n }\n }\n}\n" + }, + "name": "Retrieve run step", + "returns": "The [run step](/docs/api-reference/runs/step-object) object matching the specified ID." + } + } + }, + "/threads/{thread_id}/runs/{run_id}/submit_tool_outputs": { + "post": { + "operationId": "submitToolOuputsToRun", + "parameters": [ + { + "description": "The ID of the [thread](/docs/api-reference/threads) to which this run belongs.", + "in": "path", + "name": "thread_id", + "required": true, + "schema": { + "type": "string" + } + }, + { + "description": "The ID of the run that requires the tool output submission.", + "in": "path", + "name": "run_id", + "required": true, + "schema": { + "type": "string" + } + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/SubmitToolOutputsRunRequest" + } + } + }, + "required": true + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/RunObject" + } + } + }, + "description": "OK" + } + }, + "summary": "When a run has the `status: \"requires_action\"` and `required_action.type` is `submit_tool_outputs`, this endpoint can be used to submit the outputs from the tool calls once they're all completed. All outputs must be submitted in a single request.\n", + "tags": [ + "Assistants" + ], + "x-oaiMeta": { + "beta": true, + "examples": { + "request": { + "curl": "curl https://api.openai.com/v1/threads/thread_EdR8UvCDJ035LFEJZMt3AxCd/runs/run_PHLyHQYIQn4F7JrSXslEYWwh/submit_tool_outputs \\\n -H 'Authorization: Bearer $OPENAI_API_KEY' \\\n -H 'Content-Type: application/json' \\\n -H 'OpenAI-Beta: assistants=v1' \\\n -d '{\n \"tool_outputs\": [\n {\n \"tool_call_id\": \"call_MbELIQcB72cq35Yzo2MRw5qs\",\n \"output\": \"28C\"\n }\n ]\n }'\n", + "node.js": "import OpenAI from \"openai\";\n\nconst openai = new OpenAI();\n\nasync function main() {\n const run = await openai.beta.threads.runs.submitToolOutputs(\n \"thread_EdR8UvCDJ035LFEJZMt3AxCd\",\n \"run_PHLyHQYIQn4F7JrSXslEYWwh\",\n {\n tool_outputs: [\n {\n tool_call_id: \"call_MbELIQcB72cq35Yzo2MRw5qs\",\n output: \"28C\",\n },\n ],\n }\n );\n\n console.log(run);\n}\n\nmain();\n", + "python": "from openai import OpenAI\nclient = OpenAI()\n\nrun = client.beta.threads.runs.submit_tool_outputs(\n thread_id=\"thread_EdR8UvCDJ035LFEJZMt3AxCd\",\n run_id=\"run_PHLyHQYIQn4F7JrSXslEYWwh\",\n tool_outputs=[\n {\n \"tool_call_id\": \"call_MbELIQcB72cq35Yzo2MRw5qs\",\n \"output\": \"28C\"\n }\n ]\n)\nprint(run)\n" + }, + "response": "{\n \"id\": \"run_PHLyHQYIQn4F7JrSXslEYWwh\",\n \"object\": \"thread.run\",\n \"created_at\": 1699075592,\n \"assistant_id\": \"asst_IgmpQTah3ZfPHCVZjTqAY8Kv\",\n \"thread_id\": \"thread_EdR8UvCDJ035LFEJZMt3AxCd\",\n \"status\": \"queued\",\n \"started_at\": 1699075592,\n \"expires_at\": 1699076192,\n \"cancelled_at\": null,\n \"failed_at\": null,\n \"completed_at\": null,\n \"last_error\": null,\n \"model\": \"gpt-4\",\n \"instructions\": \"You tell the weather.\",\n \"tools\": [\n {\n \"type\": \"function\",\n \"function\": {\n \"name\": \"get_weather\",\n \"description\": \"Determine weather in my location\",\n \"parameters\": {\n \"type\": \"object\",\n \"properties\": {\n \"location\": {\n \"type\": \"string\",\n \"description\": \"The city and state e.g. San Francisco, CA\"\n },\n \"unit\": {\n \"type\": \"string\",\n \"enum\": [\n \"c\",\n \"f\"\n ]\n }\n },\n \"required\": [\n \"location\"\n ]\n }\n }\n }\n ],\n \"file_ids\": [],\n \"metadata\": {}\n}\n" + }, + "name": "Submit tool outputs to run", + "returns": "The modified [run](/docs/api-reference/runs/object) object matching the specified ID." + } + } + } + }, + "security": [ + { + "ApiKeyAuth": [] + } + ], + "servers": [ + { + "url": "https://api.openai.com/v1" + } + ], + "tags": [ + { + "description": "Build Assistants that can call models and use tools.", + "name": "Assistants" + }, + { + "description": "Learn how to turn audio into text or text into audio.", + "name": "Audio" + }, + { + "description": "Given a list of messages comprising a conversation, the model will return a response.", + "name": "Chat" + }, + { + "description": "Given a prompt, the model will return one or more predicted completions, and can also return the probabilities of alternative tokens at each position.", + "name": "Completions" + }, + { + "description": "Get a vector representation of a given input that can be easily consumed by machine learning models and algorithms.", + "name": "Embeddings" + }, + { + "description": "Manage fine-tuning jobs to tailor a model to your specific training data.", + "name": "Fine-tuning" + }, + { + "description": "Files are used to upload documents that can be used with features like Assistants and Fine-tuning.", + "name": "Files" + }, + { + "description": "Given a prompt and/or an input image, the model will generate a new image.", + "name": "Images" + }, + { + "description": "List and describe the various models available in the API.", + "name": "Models" + }, + { + "description": "Given a input text, outputs if the model classifies it as violating OpenAI's content policy.", + "name": "Moderations" + }, + { + "description": "Manage legacy fine-tuning jobs to tailor a model to your specific training data.", + "name": "Fine-tunes" + }, + { + "description": "Given a prompt and an instruction, the model will return an edited version of the prompt.", + "name": "Edits" + } + ], + "x-oaiMeta": { + "groups": [ + { + "description": "Learn how to turn audio into text or text into audio.\n\nRelated guide: [Speech to text](/docs/guides/speech-to-text)\n", + "id": "audio", + "sections": [ + { + "key": "createSpeech", + "path": "createSpeech", + "type": "endpoint" + }, + { + "key": "createTranscription", + "path": "createTranscription", + "type": "endpoint" + }, + { + "key": "createTranslation", + "path": "createTranslation", + "type": "endpoint" + } + ], + "title": "Audio" + }, + { + "description": "Given a list of messages comprising a conversation, the model will return a response.\n\nRelated guide: [Chat Completions](/docs/guides/gpt)\n", + "id": "chat", + "sections": [ + { + "key": "CreateChatCompletionResponse", + "path": "object", + "type": "object" + }, + { + "key": "CreateChatCompletionStreamResponse", + "path": "streaming", + "type": "object" + }, + { + "key": "createChatCompletion", + "path": "create", + "type": "endpoint" + } + ], + "title": "Chat" + }, + { + "description": "Given a prompt, the model will return one or more predicted completions, and can also return the probabilities of alternative tokens at each position. We recommend most users use our Chat Completions API. [Learn more](/docs/deprecations/2023-07-06-gpt-and-embeddings)\n\nRelated guide: [Legacy Completions](/docs/guides/gpt/completions-api)\n", + "id": "completions", + "legacy": true, + "sections": [ + { + "key": "CreateCompletionResponse", + "path": "object", + "type": "object" + }, + { + "key": "createCompletion", + "path": "create", + "type": "endpoint" + } + ], + "title": "Completions" + }, + { + "description": "Get a vector representation of a given input that can be easily consumed by machine learning models and algorithms.\n\nRelated guide: [Embeddings](/docs/guides/embeddings)\n", + "id": "embeddings", + "sections": [ + { + "key": "Embedding", + "path": "object", + "type": "object" + }, + { + "key": "createEmbedding", + "path": "create", + "type": "endpoint" + } + ], + "title": "Embeddings" + }, + { + "description": "Manage fine-tuning jobs to tailor a model to your specific training data.\n\nRelated guide: [Fine-tune models](/docs/guides/fine-tuning)\n", + "id": "fine-tuning", + "sections": [ + { + "key": "FineTuningJob", + "path": "object", + "type": "object" + }, + { + "key": "createFineTuningJob", + "path": "create", + "type": "endpoint" + }, + { + "key": "listPaginatedFineTuningJobs", + "path": "list", + "type": "endpoint" + }, + { + "key": "retrieveFineTuningJob", + "path": "retrieve", + "type": "endpoint" + }, + { + "key": "cancelFineTuningJob", + "path": "cancel", + "type": "endpoint" + }, + { + "key": "FineTuningJobEvent", + "path": "event-object", + "type": "object" + }, + { + "key": "listFineTuningEvents", + "path": "list-events", + "type": "endpoint" + } + ], + "title": "Fine-tuning" + }, + { + "description": "Files are used to upload documents that can be used with features like [Assistants](/docs/api-reference/assistants) and [Fine-tuning](/docs/api-reference/fine-tuning).\n", + "id": "files", + "sections": [ + { + "key": "OpenAIFile", + "path": "object", + "type": "object" + }, + { + "key": "listFiles", + "path": "list", + "type": "endpoint" + }, + { + "key": "createFile", + "path": "create", + "type": "endpoint" + }, + { + "key": "deleteFile", + "path": "delete", + "type": "endpoint" + }, + { + "key": "retrieveFile", + "path": "retrieve", + "type": "endpoint" + }, + { + "key": "downloadFile", + "path": "retrieve-contents", + "type": "endpoint" + } + ], + "title": "Files" + }, + { + "description": "Given a prompt and/or an input image, the model will generate a new image.\n\nRelated guide: [Image generation](/docs/guides/images)\n", + "id": "images", + "sections": [ + { + "key": "Image", + "path": "object", + "type": "object" + }, + { + "key": "createImage", + "path": "create", + "type": "endpoint" + }, + { + "key": "createImageEdit", + "path": "createEdit", + "type": "endpoint" + }, + { + "key": "createImageVariation", + "path": "createVariation", + "type": "endpoint" + } + ], + "title": "Images" + }, + { + "description": "List and describe the various models available in the API. You can refer to the [Models](/docs/models) documentation to understand what models are available and the differences between them.\n", + "id": "models", + "sections": [ + { + "key": "Model", + "path": "object", + "type": "object" + }, + { + "key": "listModels", + "path": "list", + "type": "endpoint" + }, + { + "key": "retrieveModel", + "path": "retrieve", + "type": "endpoint" + }, + { + "key": "deleteModel", + "path": "delete", + "type": "endpoint" + } + ], + "title": "Models" + }, + { + "description": "Given a input text, outputs if the model classifies it as violating OpenAI's content policy.\n\nRelated guide: [Moderations](/docs/guides/moderation)\n", + "id": "moderations", + "sections": [ + { + "key": "CreateModerationResponse", + "path": "object", + "type": "object" + }, + { + "key": "createModeration", + "path": "create", + "type": "endpoint" + } + ], + "title": "Moderations" + }, + { + "beta": true, + "description": "Build assistants that can call models and use tools to perform tasks.\n\n[Get started with the Assistants API](/docs/assistants)\n", + "id": "assistants", + "sections": [ + { + "key": "AssistantObject", + "path": "object", + "type": "object" + }, + { + "key": "createAssistant", + "path": "createAssistant", + "type": "endpoint" + }, + { + "key": "getAssistant", + "path": "getAssistant", + "type": "endpoint" + }, + { + "key": "modifyAssistant", + "path": "modifyAssistant", + "type": "endpoint" + }, + { + "key": "deleteAssistant", + "path": "deleteAssistant", + "type": "endpoint" + }, + { + "key": "listAssistants", + "path": "listAssistants", + "type": "endpoint" + }, + { + "key": "AssistantFileObject", + "path": "file-object", + "type": "object" + }, + { + "key": "createAssistantFile", + "path": "createAssistantFile", + "type": "endpoint" + }, + { + "key": "getAssistantFile", + "path": "getAssistantFile", + "type": "endpoint" + }, + { + "key": "deleteAssistantFile", + "path": "deleteAssistantFile", + "type": "endpoint" + }, + { + "key": "listAssistantFiles", + "path": "listAssistantFiles", + "type": "endpoint" + } + ], + "title": "Assistants" + }, + { + "beta": true, + "description": "Create threads that assistants can interact with.\n\nRelated guide: [Assistants](/docs/assistants/overview)\n", + "id": "threads", + "sections": [ + { + "key": "ThreadObject", + "path": "object", + "type": "object" + }, + { + "key": "createThread", + "path": "createThread", + "type": "endpoint" + }, + { + "key": "getThread", + "path": "getThread", + "type": "endpoint" + }, + { + "key": "modifyThread", + "path": "modifyThread", + "type": "endpoint" + }, + { + "key": "deleteThread", + "path": "deleteThread", + "type": "endpoint" + } + ], + "title": "Threads" + }, + { + "beta": true, + "description": "Create messages within threads\n\nRelated guide: [Assistants](/docs/assistants/overview)\n", + "id": "messages", + "sections": [ + { + "key": "MessageObject", + "path": "object", + "type": "object" + }, + { + "key": "createMessage", + "path": "createMessage", + "type": "endpoint" + }, + { + "key": "getMessage", + "path": "getMessage", + "type": "endpoint" + }, + { + "key": "modifyMessage", + "path": "modifyMessage", + "type": "endpoint" + }, + { + "key": "listMessages", + "path": "listMessages", + "type": "endpoint" + }, + { + "key": "MessageFileObject", + "path": "file-object", + "type": "object" + }, + { + "key": "getMessageFile", + "path": "getMessageFile", + "type": "endpoint" + }, + { + "key": "listMessageFiles", + "path": "listMessageFiles", + "type": "endpoint" + } + ], + "title": "Messages" + }, + { + "beta": true, + "description": "Represents an execution run on a thread.\n\nRelated guide: [Assistants](/docs/assistants/overview)\n", + "id": "runs", + "sections": [ + { + "key": "RunObject", + "path": "object", + "type": "object" + }, + { + "key": "createRun", + "path": "createRun", + "type": "endpoint" + }, + { + "key": "getRun", + "path": "getRun", + "type": "endpoint" + }, + { + "key": "modifyRun", + "path": "modifyRun", + "type": "endpoint" + }, + { + "key": "listRuns", + "path": "listRuns", + "type": "endpoint" + }, + { + "key": "submitToolOuputsToRun", + "path": "submitToolOutputs", + "type": "endpoint" + }, + { + "key": "cancelRun", + "path": "cancelRun", + "type": "endpoint" + }, + { + "key": "createThreadAndRun", + "path": "createThreadAndRun", + "type": "endpoint" + }, + { + "key": "RunStepObject", + "path": "step-object", + "type": "object" + }, + { + "key": "getRunStep", + "path": "getRunStep", + "type": "endpoint" + }, + { + "key": "listRunSteps", + "path": "listRunSteps", + "type": "endpoint" + } + ], + "title": "Runs" + }, + { + "deprecated": true, + "description": "Manage legacy fine-tuning jobs to tailor a model to your specific training data.\n\nWe recommend transitioning to the updating [fine-tuning API](/docs/guides/fine-tuning)\n", + "id": "fine-tunes", + "sections": [ + { + "key": "FineTune", + "path": "object", + "type": "object" + }, + { + "key": "createFineTune", + "path": "create", + "type": "endpoint" + }, + { + "key": "listFineTunes", + "path": "list", + "type": "endpoint" + }, + { + "key": "retrieveFineTune", + "path": "retrieve", + "type": "endpoint" + }, + { + "key": "cancelFineTune", + "path": "cancel", + "type": "endpoint" + }, + { + "key": "FineTuneEvent", + "path": "event-object", + "type": "object" + }, + { + "key": "listFineTuneEvents", + "path": "list-events", + "type": "endpoint" + } + ], + "title": "Fine-tunes" + }, + { + "deprecated": true, + "description": "Given a prompt and an instruction, the model will return an edited version of the prompt.\n", + "id": "edits", + "sections": [ + { + "key": "CreateEditResponse", + "path": "object", + "type": "object" + }, + { + "key": "createEdit", + "path": "create", + "type": "endpoint" + } + ], + "title": "Edits" + } + ] + } +} diff --git a/instill/resources/schema/jsons/openai_definitions.json b/instill/resources/schema/jsons/openai_definitions.json new file mode 100644 index 0000000..06703fd --- /dev/null +++ b/instill/resources/schema/jsons/openai_definitions.json @@ -0,0 +1 @@ +{ "$schema": "http://json-schema.org/draft-07/schema#", "additionalProperties": true, "properties": { "api_key": { "description": "Fill your OpenAI API key. To find your keys, visit your OpenAI's API Keys page.", "instillCredentialField": true, "instillUIOrder": 0, "title": "API Key", "type": "string" }, "organization": { "description": "Specify which organization is used for the requests. Usage will count against the specified organization's subscription quota.", "instillUIOrder": 1, "title": "Organization ID", "type": "string" } }, "required": [ "api_key" ], "title": "OpenAI Connector Resource", "type": "object" } diff --git a/instill/resources/schema/jsons/openai_task_speech_recognition_input.json b/instill/resources/schema/jsons/openai_task_speech_recognition_input.json new file mode 100644 index 0000000..c3ff1d0 --- /dev/null +++ b/instill/resources/schema/jsons/openai_task_speech_recognition_input.json @@ -0,0 +1 @@ +{"instillUIOrder":0,"properties":{"audio":{"$ref":"openai.json#/components/schemas/CreateTranscriptionRequest/properties/file","instillAcceptFormats":["audio/*"],"instillUIOrder":1,"instillUpstreamTypes":["reference"],"title":"Audio"},"language":{"$ref":"openai.json#/components/schemas/CreateTranscriptionRequest/properties/language","instillAcceptFormats":["string"],"instillShortDescription":"The language of the input audio.","instillUIOrder":3,"instillUpstreamTypes":["value","reference","template"],"title":"Language"},"model":{"$ref":"openai.json#/components/schemas/CreateTranscriptionRequest/properties/model","instillAcceptFormats":["string"],"instillShortDescription":"ID of the model to use","instillUIOrder":0,"instillUpstreamTypes":["value","reference","template"],"title":"Model"},"prompt":{"$ref":"openai.json#/components/schemas/CreateTranscriptionRequest/properties/prompt","instillAcceptFormats":["string"],"instillShortDescription":"An optional text to guide the model's style or continue a previous audio segment.","instillUIOrder":2,"instillUpstreamTypes":["value","reference","template"],"title":"Prompt"},"temperature":{"$ref":"openai.json#/components/schemas/CreateTranscriptionRequest/properties/temperature","instillAcceptFormats":["number","integer"],"instillShortDescription":"The sampling temperature, between 0 and 1.","instillUIOrder":4,"instillUpstreamTypes":["value","reference"],"title":"Temperature"}},"required":["audio","model"],"title":"Input","type":"object","$defs":{"chat_message":{"properties":{"content":{"description":"The message content","instillFormat":"string","instillUIMultiline":true,"instillUIOrder":1,"title":"Content","type":"string"},"role":{"description":"The message role, i.e. 'system', 'user' or 'assistant'","instillFormat":"string","instillUIOrder":0,"title":"Role","type":"string"}},"required":["role","content"],"title":"Chat Message","type":"object"}}} diff --git a/instill/resources/schema/jsons/openai_task_speech_recognition_output.json b/instill/resources/schema/jsons/openai_task_speech_recognition_output.json new file mode 100644 index 0000000..451bb73 --- /dev/null +++ b/instill/resources/schema/jsons/openai_task_speech_recognition_output.json @@ -0,0 +1 @@ +{"instillUIOrder":0,"properties":{"text":{"$ref":"openai.json#/components/schemas/CreateTranscriptionResponse/properties/text","instillFormat":"string","instillUIOrder":0,"title":"Text"}},"required":["text"],"title":"Output","type":"object","$defs":{"chat_message":{"properties":{"content":{"description":"The message content","instillFormat":"string","instillUIMultiline":true,"instillUIOrder":1,"title":"Content","type":"string"},"role":{"description":"The message role, i.e. 'system', 'user' or 'assistant'","instillFormat":"string","instillUIOrder":0,"title":"Role","type":"string"}},"required":["role","content"],"title":"Chat Message","type":"object"}}} diff --git a/instill/resources/schema/jsons/openai_task_text_embeddings_input.json b/instill/resources/schema/jsons/openai_task_text_embeddings_input.json new file mode 100644 index 0000000..5568e01 --- /dev/null +++ b/instill/resources/schema/jsons/openai_task_text_embeddings_input.json @@ -0,0 +1 @@ +{"instillUIOrder":0,"properties":{"model":{"$ref":"openai.json#/components/schemas/CreateEmbeddingRequest/properties/model","instillAcceptFormats":["string"],"instillShortDescription":"ID of the model to use","instillUIOrder":0,"instillUpstreamTypes":["value","reference","template"],"title":"Model"},"text":{"description":"The text","instillAcceptFormats":["string"],"instillUIMultiline":true,"instillUIOrder":1,"instillUpstreamTypes":["value","reference","template"],"title":"Text","type":"string"}},"required":["text","model"],"title":"Input","type":"object","$defs":{"chat_message":{"properties":{"content":{"description":"The message content","instillFormat":"string","instillUIMultiline":true,"instillUIOrder":1,"title":"Content","type":"string"},"role":{"description":"The message role, i.e. 'system', 'user' or 'assistant'","instillFormat":"string","instillUIOrder":0,"title":"Role","type":"string"}},"required":["role","content"],"title":"Chat Message","type":"object"}}} diff --git a/instill/resources/schema/jsons/openai_task_text_embeddings_output.json b/instill/resources/schema/jsons/openai_task_text_embeddings_output.json new file mode 100644 index 0000000..cd4135b --- /dev/null +++ b/instill/resources/schema/jsons/openai_task_text_embeddings_output.json @@ -0,0 +1 @@ +{"instillUIOrder":0,"properties":{"embedding":{"$ref":"https://raw.githubusercontent.com/instill-ai/component/0bcb5ecde3302537078ece28f218eb2f8d95ef0a/shared_schema.json#/$defs/instill_types/embedding","instillUIOrder":0,"title":"Embedding"}},"required":["embedding"],"title":"Output","type":"object","$defs":{"chat_message":{"properties":{"content":{"description":"The message content","instillFormat":"string","instillUIMultiline":true,"instillUIOrder":1,"title":"Content","type":"string"},"role":{"description":"The message role, i.e. 'system', 'user' or 'assistant'","instillFormat":"string","instillUIOrder":0,"title":"Role","type":"string"}},"required":["role","content"],"title":"Chat Message","type":"object"}}} diff --git a/instill/resources/schema/jsons/openai_task_text_to_image_input.json b/instill/resources/schema/jsons/openai_task_text_to_image_input.json new file mode 100644 index 0000000..44bfa70 --- /dev/null +++ b/instill/resources/schema/jsons/openai_task_text_to_image_input.json @@ -0,0 +1 @@ +{"instillUIOrder":0,"properties":{"model":{"$ref":"openai.json#/components/schemas/CreateImageRequest/properties/model","instillAcceptFormats":["string"],"instillShortDescription":"ID of the model to use","instillUIOrder":0,"instillUpstreamTypes":["value","reference","template"],"title":"Model"},"n":{"$ref":"openai.json#/components/schemas/CreateImageRequest/properties/n","instillAcceptFormats":["integer"],"instillUIOrder":2,"instillUpstreamTypes":["value","reference"],"title":"N"},"prompt":{"$ref":"openai.json#/components/schemas/CreateImageRequest/properties/prompt","instillAcceptFormats":["string"],"instillShortDescription":"A text description of the desired image(s).","instillUIOrder":1,"instillUpstreamTypes":["value","reference","template"],"title":"Prompt"},"quality":{"$ref":"openai.json#/components/schemas/CreateImageRequest/properties/quality","instillAcceptFormats":["string"],"instillShortDescription":"The quality of the image that will be generated.","instillUIOrder":3,"instillUpstreamTypes":["value","reference"],"title":"Quality"},"size":{"$ref":"openai.json#/components/schemas/CreateImageRequest/properties/size","instillAcceptFormats":["string"],"instillShortDescription":"The size of the generated images.","instillUIOrder":4,"instillUpstreamTypes":["value","reference"],"title":"Size"},"style":{"$ref":"openai.json#/components/schemas/CreateImageRequest/properties/style","instillAcceptFormats":["string"],"instillShortDescription":"The style of the generated images.","instillUIOrder":5,"instillUpstreamTypes":["value","reference"],"title":"N"}},"required":["prompt","model"],"title":"Input","type":"object","$defs":{"chat_message":{"properties":{"content":{"description":"The message content","instillFormat":"string","instillUIMultiline":true,"instillUIOrder":1,"title":"Content","type":"string"},"role":{"description":"The message role, i.e. 'system', 'user' or 'assistant'","instillFormat":"string","instillUIOrder":0,"title":"Role","type":"string"}},"required":["role","content"],"title":"Chat Message","type":"object"}}} diff --git a/instill/resources/schema/jsons/openai_task_text_to_image_output.json b/instill/resources/schema/jsons/openai_task_text_to_image_output.json new file mode 100644 index 0000000..2898e27 --- /dev/null +++ b/instill/resources/schema/jsons/openai_task_text_to_image_output.json @@ -0,0 +1 @@ +{"instillUIOrder":0,"properties":{"results":{"description":"Generated results","instillUIOrder":0,"items":{"description":"Generated result","properties":{"image":{"description":"Generated image","instillFormat":"image/webp","type":"string"},"revised_prompt":{"description":"Revised prompt","instillFormat":"string","instillUIMultiline":true,"type":"string"}},"required":["image","revised_prompt"],"type":"object"},"title":"Images","type":"array"}},"required":["results"],"title":"Output","type":"object","$defs":{"chat_message":{"properties":{"content":{"description":"The message content","instillFormat":"string","instillUIMultiline":true,"instillUIOrder":1,"title":"Content","type":"string"},"role":{"description":"The message role, i.e. 'system', 'user' or 'assistant'","instillFormat":"string","instillUIOrder":0,"title":"Role","type":"string"}},"required":["role","content"],"title":"Chat Message","type":"object"}}} diff --git a/instill/resources/schema/jsons/openai_task_text_to_speech_input.json b/instill/resources/schema/jsons/openai_task_text_to_speech_input.json new file mode 100644 index 0000000..4451157 --- /dev/null +++ b/instill/resources/schema/jsons/openai_task_text_to_speech_input.json @@ -0,0 +1 @@ +{"instillUIOrder":0,"properties":{"model":{"$ref":"openai.json#/components/schemas/CreateSpeechRequest/properties/model","default":"tts-1","enum":["tts-1","tts-1-hd"],"instillAcceptFormats":["string"],"instillShortDescription":"ID of the model to use","instillUIOrder":0,"instillUpstreamTypes":["value","reference","template"],"title":"Model","type":"string"},"response_format":{"$ref":"openai.json#/components/schemas/CreateSpeechRequest/properties/response_format","instillAcceptFormats":["string"],"instillShortDescription":"The format to audio","instillUIOrder":3,"instillUpstreamTypes":["value","reference"],"title":"Response Format"},"speed":{"$ref":"openai.json#/components/schemas/CreateSpeechRequest/properties/speed","instillAcceptFormats":["number"],"instillShortDescription":"The speed of the generated audio","instillUIOrder":4,"instillUpstreamTypes":["value","reference"],"title":"Speed"},"text":{"$ref":"openai.json#/components/schemas/CreateSpeechRequest/properties/input","instillAcceptFormats":["string"],"instillShortDescription":"The text to generate audio for","instillUIOrder":1,"instillUpstreamTypes":["value","reference","template"],"title":"Text"},"voice":{"$ref":"openai.json#/components/schemas/CreateSpeechRequest/properties/voice","instillAcceptFormats":["string"],"instillShortDescription":"The voice to use when generating the audio","instillUIOrder":2,"instillUpstreamTypes":["value","reference","template"],"title":"Voice"}},"required":["text","model","voice"],"title":"Input","type":"object","$defs":{"chat_message":{"properties":{"content":{"description":"The message content","instillFormat":"string","instillUIMultiline":true,"instillUIOrder":1,"title":"Content","type":"string"},"role":{"description":"The message role, i.e. 'system', 'user' or 'assistant'","instillFormat":"string","instillUIOrder":0,"title":"Role","type":"string"}},"required":["role","content"],"title":"Chat Message","type":"object"}}} diff --git a/instill/resources/schema/jsons/openai_task_text_to_speech_output.json b/instill/resources/schema/jsons/openai_task_text_to_speech_output.json new file mode 100644 index 0000000..b6ca247 --- /dev/null +++ b/instill/resources/schema/jsons/openai_task_text_to_speech_output.json @@ -0,0 +1 @@ +{"instillUIOrder":0,"properties":{"audio":{"description":"AI generated audio","instillFormat":"audio/wav","instillUIOrder":0,"title":"Audio","type":"string"}},"required":[],"title":"Output","type":"object","$defs":{"chat_message":{"properties":{"content":{"description":"The message content","instillFormat":"string","instillUIMultiline":true,"instillUIOrder":1,"title":"Content","type":"string"},"role":{"description":"The message role, i.e. 'system', 'user' or 'assistant'","instillFormat":"string","instillUIOrder":0,"title":"Role","type":"string"}},"required":["role","content"],"title":"Chat Message","type":"object"}}} diff --git a/instill/resources/schema/jsons/openai_tasks.json b/instill/resources/schema/jsons/openai_tasks.json new file mode 100644 index 0000000..08afb7c --- /dev/null +++ b/instill/resources/schema/jsons/openai_tasks.json @@ -0,0 +1,632 @@ +{ + "$defs": { + "chat_message": { + "properties": { + "content": { + "description": "The message content", + "instillFormat": "string", + "instillUIMultiline": true, + "instillUIOrder": 1, + "title": "Content", + "type": "string" + }, + "role": { + "description": "The message role, i.e. 'system', 'user' or 'assistant'", + "instillFormat": "string", + "instillUIOrder": 0, + "title": "Role", + "type": "string" + } + }, + "required": [ + "role", + "content" + ], + "title": "Chat Message", + "type": "object" + } + }, + "TASK_SPEECH_RECOGNITION": { + "input": { + "instillUIOrder": 0, + "properties": { + "audio": { + "$ref": "openai.json#/components/schemas/CreateTranscriptionRequest/properties/file", + "instillAcceptFormats": [ + "audio/*" + ], + "instillUIOrder": 1, + "instillUpstreamTypes": [ + "reference" + ], + "title": "Audio" + }, + "language": { + "$ref": "openai.json#/components/schemas/CreateTranscriptionRequest/properties/language", + "instillAcceptFormats": [ + "string" + ], + "instillShortDescription": "The language of the input audio.", + "instillUIOrder": 3, + "instillUpstreamTypes": [ + "value", + "reference", + "template" + ], + "title": "Language" + }, + "model": { + "$ref": "openai.json#/components/schemas/CreateTranscriptionRequest/properties/model", + "instillAcceptFormats": [ + "string" + ], + "instillShortDescription": "ID of the model to use", + "instillUIOrder": 0, + "instillUpstreamTypes": [ + "value", + "reference", + "template" + ], + "title": "Model" + }, + "prompt": { + "$ref": "openai.json#/components/schemas/CreateTranscriptionRequest/properties/prompt", + "instillAcceptFormats": [ + "string" + ], + "instillShortDescription": "An optional text to guide the model's style or continue a previous audio segment.", + "instillUIOrder": 2, + "instillUpstreamTypes": [ + "value", + "reference", + "template" + ], + "title": "Prompt" + }, + "temperature": { + "$ref": "openai.json#/components/schemas/CreateTranscriptionRequest/properties/temperature", + "instillAcceptFormats": [ + "number", + "integer" + ], + "instillShortDescription": "The sampling temperature, between 0 and 1.", + "instillUIOrder": 4, + "instillUpstreamTypes": [ + "value", + "reference" + ], + "title": "Temperature" + } + }, + "required": [ + "audio", + "model" + ], + "title": "Input", + "type": "object" + }, + "output": { + "instillUIOrder": 0, + "properties": { + "text": { + "$ref": "openai.json#/components/schemas/CreateTranscriptionResponse/properties/text", + "instillFormat": "string", + "instillUIOrder": 0, + "title": "Text" + } + }, + "required": [ + "text" + ], + "title": "Output", + "type": "object" + } + }, + "TASK_TEXT_EMBEDDINGS": { + "input": { + "instillUIOrder": 0, + "properties": { + "model": { + "$ref": "openai.json#/components/schemas/CreateEmbeddingRequest/properties/model", + "instillAcceptFormats": [ + "string" + ], + "instillShortDescription": "ID of the model to use", + "instillUIOrder": 0, + "instillUpstreamTypes": [ + "value", + "reference", + "template" + ], + "title": "Model" + }, + "text": { + "description": "The text", + "instillAcceptFormats": [ + "string" + ], + "instillUIMultiline": true, + "instillUIOrder": 1, + "instillUpstreamTypes": [ + "value", + "reference", + "template" + ], + "title": "Text", + "type": "string" + } + }, + "required": [ + "text", + "model" + ], + "title": "Input", + "type": "object" + }, + "output": { + "instillUIOrder": 0, + "properties": { + "embedding": { + "$ref": "https://raw.githubusercontent.com/instill-ai/component/0bcb5ecde3302537078ece28f218eb2f8d95ef0a/shared_schema.json#/$defs/instill_types/embedding", + "instillUIOrder": 0, + "title": "Embedding" + } + }, + "required": [ + "embedding" + ], + "title": "Output", + "type": "object" + } + }, + "TASK_TEXT_GENERATION": { + "input": { + "instillUIOrder": 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\"}.", + "instillAcceptFormats": [ + "array:*/*" + ], + "instillShortDescription": "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\"}.", + "instillUIOrder": 4, + "instillUpstreamTypes": [ + "value", + "reference" + ], + "items": { + "$ref": "#/$defs/chat_message" + }, + "title": "Chat history", + "type": "array" + }, + "frequency_penalty": { + "$ref": "openai.json#/components/schemas/CreateChatCompletionRequest/properties/frequency_penalty", + "instillAcceptFormats": [ + "number", + "integer" + ], + "instillShortDescription": "Number between -2.0 and 2.0", + "instillUIOrder": 11, + "instillUpstreamTypes": [ + "value", + "reference", + "template" + ], + "title": "Frequency Penalty" + }, + "images": { + "description": "The images", + "instillAcceptFormats": [ + "array:image/*" + ], + "instillUIOrder": 3, + "instillUpstreamTypes": [ + "reference" + ], + "items": { + "type": "string" + }, + "title": "Image", + "type": "array" + }, + "max_tokens": { + "$ref": "openai.json#/components/schemas/CreateChatCompletionRequest/properties/max_tokens", + "instillAcceptFormats": [ + "integer" + ], + "instillShortDescription": "The maximum number of tokens to generate in the chat completion.", + "instillUIOrder": 7, + "instillUpstreamTypes": [ + "value", + "reference" + ], + "title": "Max Tokens" + }, + "model": { + "$ref": "openai.json#/components/schemas/CreateChatCompletionRequest/properties/model", + "instillAcceptFormats": [ + "string" + ], + "instillShortDescription": "ID of the model to use", + "instillUIOrder": 0, + "instillUpstreamTypes": [ + "value", + "reference", + "template" + ], + "title": "Model" + }, + "n": { + "$ref": "openai.json#/components/schemas/CreateChatCompletionRequest/properties/n", + "instillAcceptFormats": [ + "integer" + ], + "instillUIOrder": 6, + "instillUpstreamTypes": [ + "value", + "reference" + ], + "title": "N" + }, + "presence_penalty": { + "$ref": "openai.json#/components/schemas/CreateChatCompletionRequest/properties/presence_penalty", + "instillAcceptFormats": [ + "number", + "integer" + ], + "instillShortDescription": "Number between -2.0 and 2.0", + "instillUIOrder": 10, + "instillUpstreamTypes": [ + "value", + "reference", + "template" + ], + "title": "Presence Penalty" + }, + "prompt": { + "description": "The prompt text", + "instillAcceptFormats": [ + "string" + ], + "instillUIMultiline": true, + "instillUIOrder": 1, + "instillUpstreamTypes": [ + "value", + "reference", + "template" + ], + "title": "Prompt", + "type": "string" + }, + "response_format": { + "description": "An object specifying the format that the model must output. Used to enable JSON mode.", + "instillUIOrder": 8, + "properties": { + "type": { + "$ref": "openai.json#/components/schemas/CreateChatCompletionRequest/properties/response_format/properties/type", + "instillAcceptFormats": [ + "string" + ], + "instillShortDescription": "Setting to `json_object` enables JSON mode. ", + "instillUIOrder": 0, + "instillUpstreamTypes": [ + "value", + "reference" + ] + } + }, + "required": [ + "type" + ], + "title": "Response Format", + "type": "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\u2019s behavior is using a generic message as \"You are a helpful assistant.\"", + "instillAcceptFormats": [ + "string" + ], + "instillShortDescription": "The system message helps set the behavior of the assistant", + "instillUIMultiline": true, + "instillUIOrder": 2, + "instillUpstreamTypes": [ + "value", + "reference", + "template" + ], + "title": "System message", + "type": "string" + }, + "temperature": { + "$ref": "openai.json#/components/schemas/CreateChatCompletionRequest/properties/temperature", + "instillAcceptFormats": [ + "number", + "integer" + ], + "instillShortDescription": "What sampling temperature to use, between 0 and 2.", + "instillUIOrder": 5, + "instillUpstreamTypes": [ + "value", + "reference" + ], + "title": "Temperature" + }, + "top_p": { + "$ref": "openai.json#/components/schemas/CreateChatCompletionRequest/properties/top_p", + "instillAcceptFormats": [ + "number", + "integer" + ], + "instillShortDescription": "An alternative to sampling with temperature, called nucleus sampling", + "instillUIOrder": 9, + "instillUpstreamTypes": [ + "value", + "reference" + ], + "title": "Top P" + } + }, + "required": [ + "model", + "prompt" + ], + "title": "Input", + "type": "object" + }, + "output": { + "instillUIOrder": 0, + "properties": { + "texts": { + "instillUIOrder": 0, + "items": { + "instillFormat": "string", + "instillMultiline": true, + "instillUIMultiline": true, + "type": "string" + }, + "title": "Texts", + "type": "array" + } + }, + "required": [ + "texts" + ], + "title": "Output", + "type": "object" + } + }, + "TASK_TEXT_TO_IMAGE": { + "input": { + "instillUIOrder": 0, + "properties": { + "model": { + "$ref": "openai.json#/components/schemas/CreateImageRequest/properties/model", + "instillAcceptFormats": [ + "string" + ], + "instillShortDescription": "ID of the model to use", + "instillUIOrder": 0, + "instillUpstreamTypes": [ + "value", + "reference", + "template" + ], + "title": "Model" + }, + "n": { + "$ref": "openai.json#/components/schemas/CreateImageRequest/properties/n", + "instillAcceptFormats": [ + "integer" + ], + "instillUIOrder": 2, + "instillUpstreamTypes": [ + "value", + "reference" + ], + "title": "N" + }, + "prompt": { + "$ref": "openai.json#/components/schemas/CreateImageRequest/properties/prompt", + "instillAcceptFormats": [ + "string" + ], + "instillShortDescription": "A text description of the desired image(s).", + "instillUIOrder": 1, + "instillUpstreamTypes": [ + "value", + "reference", + "template" + ], + "title": "Prompt" + }, + "quality": { + "$ref": "openai.json#/components/schemas/CreateImageRequest/properties/quality", + "instillAcceptFormats": [ + "string" + ], + "instillShortDescription": "The quality of the image that will be generated.", + "instillUIOrder": 3, + "instillUpstreamTypes": [ + "value", + "reference" + ], + "title": "Quality" + }, + "size": { + "$ref": "openai.json#/components/schemas/CreateImageRequest/properties/size", + "instillAcceptFormats": [ + "string" + ], + "instillShortDescription": "The size of the generated images.", + "instillUIOrder": 4, + "instillUpstreamTypes": [ + "value", + "reference" + ], + "title": "Size" + }, + "style": { + "$ref": "openai.json#/components/schemas/CreateImageRequest/properties/style", + "instillAcceptFormats": [ + "string" + ], + "instillShortDescription": "The style of the generated images.", + "instillUIOrder": 5, + "instillUpstreamTypes": [ + "value", + "reference" + ], + "title": "N" + } + }, + "required": [ + "prompt", + "model" + ], + "title": "Input", + "type": "object" + }, + "output": { + "instillUIOrder": 0, + "properties": { + "results": { + "description": "Generated results", + "instillUIOrder": 0, + "items": { + "description": "Generated result", + "properties": { + "image": { + "description": "Generated image", + "instillFormat": "image/webp", + "type": "string" + }, + "revised_prompt": { + "description": "Revised prompt", + "instillFormat": "string", + "instillUIMultiline": true, + "type": "string" + } + }, + "required": [ + "image", + "revised_prompt" + ], + "type": "object" + }, + "title": "Images", + "type": "array" + } + }, + "required": [ + "results" + ], + "title": "Output", + "type": "object" + } + }, + "TASK_TEXT_TO_SPEECH": { + "input": { + "instillUIOrder": 0, + "properties": { + "model": { + "$ref": "openai.json#/components/schemas/CreateSpeechRequest/properties/model", + "default": "tts-1", + "enum": [ + "tts-1", + "tts-1-hd" + ], + "instillAcceptFormats": [ + "string" + ], + "instillShortDescription": "ID of the model to use", + "instillUIOrder": 0, + "instillUpstreamTypes": [ + "value", + "reference", + "template" + ], + "title": "Model", + "type": "string" + }, + "response_format": { + "$ref": "openai.json#/components/schemas/CreateSpeechRequest/properties/response_format", + "instillAcceptFormats": [ + "string" + ], + "instillShortDescription": "The format to audio", + "instillUIOrder": 3, + "instillUpstreamTypes": [ + "value", + "reference" + ], + "title": "Response Format" + }, + "speed": { + "$ref": "openai.json#/components/schemas/CreateSpeechRequest/properties/speed", + "instillAcceptFormats": [ + "number" + ], + "instillShortDescription": "The speed of the generated audio", + "instillUIOrder": 4, + "instillUpstreamTypes": [ + "value", + "reference" + ], + "title": "Speed" + }, + "text": { + "$ref": "openai.json#/components/schemas/CreateSpeechRequest/properties/input", + "instillAcceptFormats": [ + "string" + ], + "instillShortDescription": "The text to generate audio for", + "instillUIOrder": 1, + "instillUpstreamTypes": [ + "value", + "reference", + "template" + ], + "title": "Text" + }, + "voice": { + "$ref": "openai.json#/components/schemas/CreateSpeechRequest/properties/voice", + "instillAcceptFormats": [ + "string" + ], + "instillShortDescription": "The voice to use when generating the audio", + "instillUIOrder": 2, + "instillUpstreamTypes": [ + "value", + "reference", + "template" + ], + "title": "Voice" + } + }, + "required": [ + "text", + "model", + "voice" + ], + "title": "Input", + "type": "object" + }, + "output": { + "instillUIOrder": 0, + "properties": { + "audio": { + "description": "AI generated audio", + "instillFormat": "audio/wav", + "instillUIOrder": 0, + "title": "Audio", + "type": "string" + } + }, + "required": [], + "title": "Output", + "type": "object" + } + } +} diff --git a/instill/resources/schema/jsons/pinecone_definitions.json b/instill/resources/schema/jsons/pinecone_definitions.json new file mode 100644 index 0000000..2d4ae9b --- /dev/null +++ b/instill/resources/schema/jsons/pinecone_definitions.json @@ -0,0 +1 @@ +{ "$schema": "http://json-schema.org/draft-07/schema#", "additionalProperties": false, "properties": { "api_key": { "description": "Fill your Pinecone AI API key. You can create a api key in [Pinecone Console](https://app.pinecone.io/)", "instillCredentialField": true, "instillUIOrder": 0, "title": "API Key", "type": "string" }, "url": { "description": "Fill in your Pinecone base URL. It is in the form [https://index_name-project_id.svc.environment.pinecone.io]", "instillCredentialField": false, "instillUIOrder": 1, "title": "Pinecone Base URL", "type": "string" } }, "required": [ "api_key", "url" ], "title": "Pinecone Connector Spec", "type": "object" } diff --git a/instill/resources/schema/jsons/pinecone_task_query_input.json b/instill/resources/schema/jsons/pinecone_task_query_input.json new file mode 100644 index 0000000..f22f3ed --- /dev/null +++ b/instill/resources/schema/jsons/pinecone_task_query_input.json @@ -0,0 +1 @@ +{"instillUIOrder":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.","instillShortDescription":"Query by vector ID instead of by vector","instillAcceptFormats":["string"],"instillUIOrder":0,"instillUpstreamTypes":["reference","template"],"title":"ID","type":"string"},"namespace":{"description":"The namespace to query","instillAcceptFormats":["string"],"instillUIOrder":1,"instillUpstreamTypes":["value","reference","template"],"title":"Namespace","type":"string"},"vector":{"description":"An array of dimensions for the query vector.","instillAcceptFormats":["array:number","array:integer"],"instillUIOrder":2,"instillUpstreamTypes":["reference"],"items":{"description":"A dimension of the vector","example":0.8167237,"type":"number"},"minItems":1,"title":"Vector","type":"array"},"filter":{"description":"The filter to apply. You can use vector metadata to limit your search. See https://www.pinecone.io/docs/metadata-filtering/.","instillAcceptFormats":["semi-structured/object"],"instillShortDescription":"The filter to apply on vector metadata","instillUIOrder":3,"instillUpstreamTypes":["reference"],"order":1,"required":[],"title":"Filter","type":"object"},"include_values":{"default":false,"description":"Indicates whether vector values are included in the response","instillAcceptFormats":["boolean"],"instillUIOrder":4,"instillUpstreamTypes":["value","reference"],"title":"Include Values","type":"boolean"},"include_metadata":{"default":false,"description":"Indicates whether metadata is included in the response as well as the IDs","instillAcceptFormats":["boolean"],"instillUIOrder":5,"instillUpstreamTypes":["value","reference"],"title":"Include Metadata","type":"boolean"},"top_k":{"description":"The number of results to return for each query","instillAcceptFormats":["integer"],"instillUIOrder":6,"instillUpstreamTypes":["value","reference"],"title":"Top K","type":"integer"}},"required":["top_k","vector"],"title":"Input","type":"object"} diff --git a/instill/resources/schema/jsons/pinecone_task_query_output.json b/instill/resources/schema/jsons/pinecone_task_query_output.json new file mode 100644 index 0000000..769f667 --- /dev/null +++ b/instill/resources/schema/jsons/pinecone_task_query_output.json @@ -0,0 +1 @@ +{"instillUIOrder":0,"properties":{"matches":{"description":"The matches returned for the query","instillUIOrder":1,"items":{"properties":{"id":{"description":"The ID of the matched vector","instillFormat":"string","instillUIOrder":0,"title":"ID","type":"string"},"metadata":{"description":"Metadata","instillUIOrder":3,"instillFormat":"semi-structured/object","required":[],"title":"Metadata","type":"object"},"score":{"description":"A measure of similarity between this vector and the query vector. The higher the score, the more similar they are.","instillFormat":"number","instillUIOrder":1,"title":"Score","type":"number"},"values":{"description":"Vector data values","instillUIOrder":2,"items":{"description":"Each float value represents one dimension","type":"number"},"title":"Values","type":"array"}},"required":["id","score"],"title":"Match","type":"object"},"title":"Matches","type":"array"},"namespace":{"description":"The namespace of the query","instillFormat":"string","instillUIOrder":0,"title":"Namespace","type":"string"}},"required":["namespace","matches"],"title":"Output","type":"object"} diff --git a/instill/resources/schema/jsons/pinecone_task_upsert_input.json b/instill/resources/schema/jsons/pinecone_task_upsert_input.json new file mode 100644 index 0000000..e50f456 --- /dev/null +++ b/instill/resources/schema/jsons/pinecone_task_upsert_input.json @@ -0,0 +1 @@ +{"instillUIOrder":0,"properties":{"id":{"description":"This is the vector's unique id","instillAcceptFormats":["string"],"instillUIOrder":0,"instillUpstreamTypes":["value","reference","template"],"title":"ID","type":"string"},"values":{"description":"An array of dimensions for the vector to be saved","instillAcceptFormats":["array:number","array:integer"],"instillUIOrder":1,"instillUpstreamTypes":["reference"],"items":{"description":"A dimension of the vector","example":0.8167237,"type":"number"},"minItems":1,"title":"Values","type":"array"},"metadata":{"description":"The vector metadata","instillAcceptFormats":["semi-structured/object"],"instillShortDescription":"The vector metadata","instillUIOrder":2,"instillUpstreamTypes":["reference"],"order":1,"required":[],"title":"Metadata","type":"object"}},"required":["id","values"],"title":"Input","type":"object"} diff --git a/instill/resources/schema/jsons/pinecone_task_upsert_output.json b/instill/resources/schema/jsons/pinecone_task_upsert_output.json new file mode 100644 index 0000000..85a826f --- /dev/null +++ b/instill/resources/schema/jsons/pinecone_task_upsert_output.json @@ -0,0 +1 @@ +{"instillUIOrder":0,"properties":{"upserted_count":{"description":"Number of records modified or added","instillFormat":"integer","instillUIOrder":0,"title":"Upserted Count","type":"integer"}},"required":["upserted_count"],"title":"Output","type":"object"} diff --git a/instill/resources/schema/jsons/pinecone_tasks.json b/instill/resources/schema/jsons/pinecone_tasks.json new file mode 100644 index 0000000..9e4ea6b --- /dev/null +++ b/instill/resources/schema/jsons/pinecone_tasks.json @@ -0,0 +1,262 @@ +{ + "TASK_QUERY": { + "input": { + "instillUIOrder": 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.", + "instillShortDescription": "Query by vector ID instead of by vector", + "instillAcceptFormats": [ + "string" + ], + "instillUIOrder": 0, + "instillUpstreamTypes": [ + "reference", + "template" + ], + "title": "ID", + "type": "string" + }, + "namespace": { + "description": "The namespace to query", + "instillAcceptFormats": [ + "string" + ], + "instillUIOrder": 1, + "instillUpstreamTypes": [ + "value", + "reference", + "template" + ], + "title": "Namespace", + "type": "string" + }, + "vector": { + "description": "An array of dimensions for the query vector.", + "instillAcceptFormats": [ + "array:number", + "array:integer" + ], + "instillUIOrder": 2, + "instillUpstreamTypes": [ + "reference" + ], + "items": { + "description": "A dimension of the vector", + "example": 0.8167237, + "type": "number" + }, + "minItems": 1, + "title": "Vector", + "type": "array" + }, + "filter": { + "description": "The filter to apply. You can use vector metadata to limit your search. See https://www.pinecone.io/docs/metadata-filtering/.", + "instillAcceptFormats": [ + "semi-structured/object" + ], + "instillShortDescription": "The filter to apply on vector metadata", + "instillUIOrder": 3, + "instillUpstreamTypes": [ + "reference" + ], + "order": 1, + "required": [], + "title": "Filter", + "type": "object" + }, + "include_values": { + "default": false, + "description": "Indicates whether vector values are included in the response", + "instillAcceptFormats": [ + "boolean" + ], + "instillUIOrder": 4, + "instillUpstreamTypes": [ + "value", + "reference" + ], + "title": "Include Values", + "type": "boolean" + }, + "include_metadata": { + "default": false, + "description": "Indicates whether metadata is included in the response as well as the IDs", + "instillAcceptFormats": [ + "boolean" + ], + "instillUIOrder": 5, + "instillUpstreamTypes": [ + "value", + "reference" + ], + "title": "Include Metadata", + "type": "boolean" + }, + "top_k": { + "description": "The number of results to return for each query", + "instillAcceptFormats": [ + "integer" + ], + "instillUIOrder": 6, + "instillUpstreamTypes": [ + "value", + "reference" + ], + "title": "Top K", + "type": "integer" + } + }, + "required": [ + "top_k", + "vector" + ], + "title": "Input", + "type": "object" + }, + "output": { + "instillUIOrder": 0, + "properties": { + "matches": { + "description": "The matches returned for the query", + "instillUIOrder": 1, + "items": { + "properties": { + "id": { + "description": "The ID of the matched vector", + "instillFormat": "string", + "instillUIOrder": 0, + "title": "ID", + "type": "string" + }, + "metadata": { + "description": "Metadata", + "instillUIOrder": 3, + "instillFormat": "semi-structured/object", + "required": [], + "title": "Metadata", + "type": "object" + }, + "score": { + "description": "A measure of similarity between this vector and the query vector. The higher the score, the more similar they are.", + "instillFormat": "number", + "instillUIOrder": 1, + "title": "Score", + "type": "number" + }, + "values": { + "description": "Vector data values", + "instillUIOrder": 2, + "items": { + "description": "Each float value represents one dimension", + "type": "number" + }, + "title": "Values", + "type": "array" + } + }, + "required": [ + "id", + "score" + ], + "title": "Match", + "type": "object" + }, + "title": "Matches", + "type": "array" + }, + "namespace": { + "description": "The namespace of the query", + "instillFormat": "string", + "instillUIOrder": 0, + "title": "Namespace", + "type": "string" + } + }, + "required": [ + "namespace", + "matches" + ], + "title": "Output", + "type": "object" + } + }, + "TASK_UPSERT": { + "input": { + "instillUIOrder": 0, + "properties": { + "id": { + "description": "This is the vector's unique id", + "instillAcceptFormats": [ + "string" + ], + "instillUIOrder": 0, + "instillUpstreamTypes": [ + "value", + "reference", + "template" + ], + "title": "ID", + "type": "string" + }, + "values": { + "description": "An array of dimensions for the vector to be saved", + "instillAcceptFormats": [ + "array:number", + "array:integer" + ], + "instillUIOrder": 1, + "instillUpstreamTypes": [ + "reference" + ], + "items": { + "description": "A dimension of the vector", + "example": 0.8167237, + "type": "number" + }, + "minItems": 1, + "title": "Values", + "type": "array" + }, + "metadata": { + "description": "The vector metadata", + "instillAcceptFormats": [ + "semi-structured/object" + ], + "instillShortDescription": "The vector metadata", + "instillUIOrder": 2, + "instillUpstreamTypes": [ + "reference" + ], + "order": 1, + "required": [], + "title": "Metadata", + "type": "object" + } + }, + "required": [ + "id", + "values" + ], + "title": "Input", + "type": "object" + }, + "output": { + "instillUIOrder": 0, + "properties": { + "upserted_count": { + "description": "Number of records modified or added", + "instillFormat": "integer", + "instillUIOrder": 0, + "title": "Upserted Count", + "type": "integer" + } + }, + "required": [ + "upserted_count" + ], + "title": "Output", + "type": "object" + } + } +} diff --git a/instill/resources/schema/jsons/redis_definitions.json b/instill/resources/schema/jsons/redis_definitions.json new file mode 100644 index 0000000..ba45abf --- /dev/null +++ b/instill/resources/schema/jsons/redis_definitions.json @@ -0,0 +1 @@ +{ "$schema": "http://json-schema.org/draft-07/schema#", "additionalProperties": true, "properties": { "host": { "default": "localhost", "description": "Redis host to connect to", "examples": [ "localhost,127.0.0.1" ], "instillCredentialField": false, "instillUIOrder": 0, "title": "Host", "type": "string" }, "password": { "description": "Password associated with Redis", "instillCredentialField": true, "instillUIOrder": 3, "title": "Password", "type": "string" }, "port": { "default": 6379, "description": "Port of Redis", "instillUIOrder": 1, "maximum": 65536, "minimum": 0, "title": "Port", "type": "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.", "instillUIOrder": 4, "title": "SSL Connection", "type": "boolean" }, "ssl_mode": { "description": "SSL connection modes. \n
  • verify-full - This is the most secure mode. Always require encryption and verifies the identity of the source database server", "instillUIOrder": 5, "oneOf": [ { "additionalProperties": false, "description": "Disable SSL mode.", "properties": { "mode": { "const": "disable", "default": "disable", "description": "Disable SSL mode", "enum": [ "disable" ], "instillUIOrder": 0, "order": 0, "title": "Disable SSL", "type": "string" } }, "required": [ "mode" ], "title": "Disable SSL Mode" }, { "additionalProperties": false, "description": "Verify-full SSL mode. Always require encryption and verifies the identity of the server.", "properties": { "ca_cert": { "description": "CA certificate to use for SSL connection", "instillCredentialField": true, "instillUIOrder": 1, "multiline": true, "order": 1, "title": "CA Certificate", "type": "string" }, "client_cert": { "description": "Client certificate to use for SSL connection", "instillCredentialField": true, "instillUIOrder": 2, "multiline": true, "order": 2, "title": "Client Certificate", "type": "string" }, "client_key": { "description": "Client key to use for SSL connection", "instillCredentialField": true, "instillUIOrder": 3, "multiline": true, "order": 3, "title": "Client Key", "type": "string" }, "mode": { "const": "verify-full", "default": "verify-full", "description": "Verify-full SSL mode. Always require encryption and verifies the identity of the server.", "enum": [ "verify-full" ], "instillUIOrder": 0, "order": 0, "title": "Enable", "type": "string" } }, "required": [ "mode", "ca_cert", "client_cert", "client_key" ], "title": "Verify Full SSL Mode" } ], "required": [ "mode" ], "title": "SSL Configuration", "type": "object" }, "username": { "description": "Username associated with Redis", "instillUIOrder": 2, "title": "Username", "type": "string" } }, "required": [ "host", "port" ], "title": "Redis Connector Resource", "type": "object" } diff --git a/instill/resources/schema/jsons/redis_task_chat_history_retrieve_input.json b/instill/resources/schema/jsons/redis_task_chat_history_retrieve_input.json new file mode 100644 index 0000000..83b25b3 --- /dev/null +++ b/instill/resources/schema/jsons/redis_task_chat_history_retrieve_input.json @@ -0,0 +1 @@ +{"instillUIOrder":0,"properties":{"include_system_message":{"default":true,"description":"Include system message in the retrieved conversation turns if exists","instillAcceptFormats":["boolean"],"instillUIOrder":2,"instillUpstreamTypes":["value","reference"],"title":"Include System Message If Exists","type":"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.","instillAcceptFormats":["integer"],"instillUIOrder":1,"instillUpstreamTypes":["value","reference"],"minimum":1,"title":"Latest K","type":"integer"},"session_id":{"description":"A unique identifier for the chat session","instillAcceptFormats":["string"],"instillUIOrder":0,"instillUpstreamTypes":["value","reference","template"],"title":"Session ID","type":"string"}},"required":["session_id"],"title":"Input","type":"object","$defs":{"message":{"properties":{"content":{"description":"The message content","instillFormat":"string","instillUIMultiline":true,"instillUIOrder":1,"title":"Content","type":"string"},"metadata":{"additionalProperties":true,"description":"The message metadata","instillUIOrder":2,"required":[],"title":"Metadata","type":"object"},"role":{"description":"The message role, i.e. 'system', 'user' or 'assistant'","instillFormat":"string","instillUIOrder":0,"title":"Role","type":"string"}},"required":["role","content"],"title":"Message","type":"object"}}} diff --git a/instill/resources/schema/jsons/redis_task_chat_history_retrieve_output.json b/instill/resources/schema/jsons/redis_task_chat_history_retrieve_output.json new file mode 100644 index 0000000..eace6b0 --- /dev/null +++ b/instill/resources/schema/jsons/redis_task_chat_history_retrieve_output.json @@ -0,0 +1 @@ +{"instillUIOrder":0,"properties":{"messages":{"description":"The retrieved chat messages","instillUIOrder":0,"items":{"$ref":"#/$defs/message"},"title":"Messages","type":"array"}},"required":["messages"],"title":"Output","type":"object","$defs":{"message":{"properties":{"content":{"description":"The message content","instillFormat":"string","instillUIMultiline":true,"instillUIOrder":1,"title":"Content","type":"string"},"metadata":{"additionalProperties":true,"description":"The message metadata","instillUIOrder":2,"required":[],"title":"Metadata","type":"object"},"role":{"description":"The message role, i.e. 'system', 'user' or 'assistant'","instillFormat":"string","instillUIOrder":0,"title":"Role","type":"string"}},"required":["role","content"],"title":"Message","type":"object"}}} diff --git a/instill/resources/schema/jsons/redis_task_chat_message_write_input.json b/instill/resources/schema/jsons/redis_task_chat_message_write_input.json new file mode 100644 index 0000000..38323c6 --- /dev/null +++ b/instill/resources/schema/jsons/redis_task_chat_message_write_input.json @@ -0,0 +1 @@ +{"instillUIOrder":0,"properties":{"content":{"description":"The message content","instillAcceptFormats":["string"],"instillUIMultiline":true,"instillUIOrder":2,"instillUpstreamTypes":["value","reference","template"],"title":"Content","type":"string"},"metadata":{"additionalProperties":true,"description":"The message metadata","instillUIOrder":3,"required":[],"title":"Metadata","type":"object"},"role":{"description":"The message role, i.e. 'system', 'user' or 'assistant'","instillAcceptFormats":["string"],"instillUIOrder":1,"instillUpstreamTypes":["value","reference","template"],"title":"Role","type":"string"},"session_id":{"description":"A unique identifier for the chat session","instillAcceptFormats":["string"],"instillUIOrder":0,"instillUpstreamTypes":["value","reference","template"],"title":"Session ID","type":"string"}},"required":["session_id","role","content"],"title":"Input","type":"object","$defs":{"message":{"properties":{"content":{"description":"The message content","instillFormat":"string","instillUIMultiline":true,"instillUIOrder":1,"title":"Content","type":"string"},"metadata":{"additionalProperties":true,"description":"The message metadata","instillUIOrder":2,"required":[],"title":"Metadata","type":"object"},"role":{"description":"The message role, i.e. 'system', 'user' or 'assistant'","instillFormat":"string","instillUIOrder":0,"title":"Role","type":"string"}},"required":["role","content"],"title":"Message","type":"object"}}} diff --git a/instill/resources/schema/jsons/redis_task_chat_message_write_output.json b/instill/resources/schema/jsons/redis_task_chat_message_write_output.json new file mode 100644 index 0000000..9fefd65 --- /dev/null +++ b/instill/resources/schema/jsons/redis_task_chat_message_write_output.json @@ -0,0 +1 @@ +{"instillUIOrder":0,"properties":{"status":{"description":"The status of the write operation","instillFormat":"boolean","instillUIOrder":0,"title":"Status","type":"boolean"}},"required":["status"],"title":"Output","type":"object","$defs":{"message":{"properties":{"content":{"description":"The message content","instillFormat":"string","instillUIMultiline":true,"instillUIOrder":1,"title":"Content","type":"string"},"metadata":{"additionalProperties":true,"description":"The message metadata","instillUIOrder":2,"required":[],"title":"Metadata","type":"object"},"role":{"description":"The message role, i.e. 'system', 'user' or 'assistant'","instillFormat":"string","instillUIOrder":0,"title":"Role","type":"string"}},"required":["role","content"],"title":"Message","type":"object"}}} diff --git a/instill/resources/schema/jsons/redis_tasks.json b/instill/resources/schema/jsons/redis_tasks.json new file mode 100644 index 0000000..84c42e2 --- /dev/null +++ b/instill/resources/schema/jsons/redis_tasks.json @@ -0,0 +1,193 @@ +{ + "$defs": { + "message": { + "properties": { + "content": { + "description": "The message content", + "instillFormat": "string", + "instillUIMultiline": true, + "instillUIOrder": 1, + "title": "Content", + "type": "string" + }, + "metadata": { + "additionalProperties": true, + "description": "The message metadata", + "instillUIOrder": 2, + "required": [], + "title": "Metadata", + "type": "object" + }, + "role": { + "description": "The message role, i.e. 'system', 'user' or 'assistant'", + "instillFormat": "string", + "instillUIOrder": 0, + "title": "Role", + "type": "string" + } + }, + "required": [ + "role", + "content" + ], + "title": "Message", + "type": "object" + } + }, + "TASK_CHAT_HISTORY_RETRIEVE": { + "input": { + "instillUIOrder": 0, + "properties": { + "include_system_message": { + "default": true, + "description": "Include system message in the retrieved conversation turns if exists", + "instillAcceptFormats": [ + "boolean" + ], + "instillUIOrder": 2, + "instillUpstreamTypes": [ + "value", + "reference" + ], + "title": "Include System Message If Exists", + "type": "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.", + "instillAcceptFormats": [ + "integer" + ], + "instillUIOrder": 1, + "instillUpstreamTypes": [ + "value", + "reference" + ], + "minimum": 1, + "title": "Latest K", + "type": "integer" + }, + "session_id": { + "description": "A unique identifier for the chat session", + "instillAcceptFormats": [ + "string" + ], + "instillUIOrder": 0, + "instillUpstreamTypes": [ + "value", + "reference", + "template" + ], + "title": "Session ID", + "type": "string" + } + }, + "required": [ + "session_id" + ], + "title": "Input", + "type": "object" + }, + "output": { + "instillUIOrder": 0, + "properties": { + "messages": { + "description": "The retrieved chat messages", + "instillUIOrder": 0, + "items": { + "$ref": "#/$defs/message" + }, + "title": "Messages", + "type": "array" + } + }, + "required": [ + "messages" + ], + "title": "Output", + "type": "object" + } + }, + "TASK_CHAT_MESSAGE_WRITE": { + "input": { + "instillUIOrder": 0, + "properties": { + "content": { + "description": "The message content", + "instillAcceptFormats": [ + "string" + ], + "instillUIMultiline": true, + "instillUIOrder": 2, + "instillUpstreamTypes": [ + "value", + "reference", + "template" + ], + "title": "Content", + "type": "string" + }, + "metadata": { + "additionalProperties": true, + "description": "The message metadata", + "instillUIOrder": 3, + "required": [], + "title": "Metadata", + "type": "object" + }, + "role": { + "description": "The message role, i.e. 'system', 'user' or 'assistant'", + "instillAcceptFormats": [ + "string" + ], + "instillUIOrder": 1, + "instillUpstreamTypes": [ + "value", + "reference", + "template" + ], + "title": "Role", + "type": "string" + }, + "session_id": { + "description": "A unique identifier for the chat session", + "instillAcceptFormats": [ + "string" + ], + "instillUIOrder": 0, + "instillUpstreamTypes": [ + "value", + "reference", + "template" + ], + "title": "Session ID", + "type": "string" + } + }, + "required": [ + "session_id", + "role", + "content" + ], + "title": "Input", + "type": "object" + }, + "output": { + "instillUIOrder": 0, + "properties": { + "status": { + "description": "The status of the write operation", + "instillFormat": "boolean", + "instillUIOrder": 0, + "title": "Status", + "type": "boolean" + } + }, + "required": [ + "status" + ], + "title": "Output", + "type": "object" + } + } +} diff --git a/instill/resources/schema/jsons/restapi_definitions.json b/instill/resources/schema/jsons/restapi_definitions.json new file mode 100644 index 0000000..46c5688 --- /dev/null +++ b/instill/resources/schema/jsons/restapi_definitions.json @@ -0,0 +1 @@ +{ "$schema": "http://json-schema.org/draft-07/schema#", "additionalProperties": false, "properties": { "authentication": { "description": "Authentication method to use for the REST API", "instillUIOrder": 1, "oneOf": [ { "properties": { "auth_type": { "const": "NO_AUTH", "description": "No Authentication", "instillUIOrder": 0, "order": 0, "type": "string" } }, "required": [ "auth_type" ], "title": "No Auth" }, { "properties": { "auth_type": { "const": "BASIC_AUTH", "description": "Basic auth", "instillUIOrder": 0, "order": 0, "type": "string" }, "password": { "description": "Password for Basic auth", "instillCredentialField": true, "instillUIOrder": 2, "order": 2, "title": "Password", "type": "string" }, "username": { "description": "Username for Basic Auth", "instillUIOrder": 1, "order": 1, "title": "Username", "type": "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" ], "instillUIOrder": 3, "order": 3, "title": "Where to Add API Key to", "type": "string" }, "auth_type": { "const": "API_KEY", "description": "API key authentication", "instillUIOrder": 0, "order": 0, "type": "string" }, "key": { "default": "X-API-Key", "description": "Key name for API key authentication", "instillUIOrder": 1, "order": 1, "title": "Key Name", "type": "string" }, "value": { "description": "Key value for API key authentication", "instillCredentialField": true, "instillUIOrder": 2, "order": 2, "title": "Key Value", "type": "string" } }, "required": [ "auth_type", "key", "value", "auth_location" ], "title": "API Key" }, { "properties": { "auth_type": { "const": "BEARER_TOKEN", "description": "Bearer token authentication", "instillUIOrder": 0, "order": 0, "type": "string" }, "token": { "description": "Bearer token", "instillCredentialField": true, "instillUIOrder": 1, "order": 1, "title": "Token", "type": "string" } }, "required": [ "auth_type", "token" ], "title": "Bearer Token" } ], "order": 1, "title": "Authentication", "type": "object" }, "base_url": { "description": "Base URL of the REST API", "examples": [ "https://api.example.com/v1" ], "instillUIOrder": 0, "order": 0, "title": "Base URL", "type": "string" } }, "required": [ "base_url", "authentication" ], "title": "REST API Connector Spec", "type": "object" } diff --git a/instill/resources/schema/jsons/restapi_task_delete_input.json b/instill/resources/schema/jsons/restapi_task_delete_input.json new file mode 100644 index 0000000..f851328 --- /dev/null +++ b/instill/resources/schema/jsons/restapi_task_delete_input.json @@ -0,0 +1 @@ +{"$ref":"#/$defs/inputWithBody","$defs":{"inputWithBody":{"instillEditOnNodeFields":["body","endpoint_path"],"instillUIOrder":0,"properties":{"body":{"description":"The request body","instillAcceptFormats":["semi-structured/object"],"instillShortDescription":"The request body","instillUIOrder":1,"instillUpstreamTypes":["reference"],"order":1,"required":[],"title":"Body","type":"object"},"endpoint_path":{"description":"The API endpoint path relative to the base URL","instillAcceptFormats":["string"],"instillUIOrder":0,"instillUpstreamTypes":["value","reference","template"],"title":"Endpoint Path","type":"string"}},"required":["endpoint_path"],"title":"Input","type":"object"},"inputWithoutBody":{"instillUIOrder":0,"properties":{"endpoint_path":{"description":"The API endpoint path relative to the base URL","instillAcceptFormats":["string"],"instillUIOrder":0,"instillUpstreamTypes":["value","reference","template"],"title":"Endpoint Path","type":"string"}},"required":["endpoint_path"],"title":"Input","type":"object"},"output":{"description":"The HTTP response from the API","instillUIOrder":0,"properties":{"body":{"description":"The body of the response","instillFormat":"semi-structured/object","instillUIOrder":1,"required":[],"title":"Body","type":"object"},"header":{"description":"The HTTP header of the response","instillFormat":"semi-structured/object","instillUIOrder":2,"required":[],"title":"Header","type":"object"},"status_code":{"description":"The HTTP status code of the response","instillFormat":"integer","instillUIOrder":0,"title":"Status Code","type":"integer"}},"required":["status_code","body","header"],"title":"Output","type":"object"}}} diff --git a/instill/resources/schema/jsons/restapi_task_delete_output.json b/instill/resources/schema/jsons/restapi_task_delete_output.json new file mode 100644 index 0000000..9bcd743 --- /dev/null +++ b/instill/resources/schema/jsons/restapi_task_delete_output.json @@ -0,0 +1 @@ +{"$ref":"#/$defs/output","$defs":{"inputWithBody":{"instillEditOnNodeFields":["body","endpoint_path"],"instillUIOrder":0,"properties":{"body":{"description":"The request body","instillAcceptFormats":["semi-structured/object"],"instillShortDescription":"The request body","instillUIOrder":1,"instillUpstreamTypes":["reference"],"order":1,"required":[],"title":"Body","type":"object"},"endpoint_path":{"description":"The API endpoint path relative to the base URL","instillAcceptFormats":["string"],"instillUIOrder":0,"instillUpstreamTypes":["value","reference","template"],"title":"Endpoint Path","type":"string"}},"required":["endpoint_path"],"title":"Input","type":"object"},"inputWithoutBody":{"instillUIOrder":0,"properties":{"endpoint_path":{"description":"The API endpoint path relative to the base URL","instillAcceptFormats":["string"],"instillUIOrder":0,"instillUpstreamTypes":["value","reference","template"],"title":"Endpoint Path","type":"string"}},"required":["endpoint_path"],"title":"Input","type":"object"},"output":{"description":"The HTTP response from the API","instillUIOrder":0,"properties":{"body":{"description":"The body of the response","instillFormat":"semi-structured/object","instillUIOrder":1,"required":[],"title":"Body","type":"object"},"header":{"description":"The HTTP header of the response","instillFormat":"semi-structured/object","instillUIOrder":2,"required":[],"title":"Header","type":"object"},"status_code":{"description":"The HTTP status code of the response","instillFormat":"integer","instillUIOrder":0,"title":"Status Code","type":"integer"}},"required":["status_code","body","header"],"title":"Output","type":"object"}}} diff --git a/instill/resources/schema/jsons/restapi_task_get_input.json b/instill/resources/schema/jsons/restapi_task_get_input.json new file mode 100644 index 0000000..7cb79db --- /dev/null +++ b/instill/resources/schema/jsons/restapi_task_get_input.json @@ -0,0 +1 @@ +{"$ref":"#/$defs/inputWithoutBody","$defs":{"inputWithBody":{"instillEditOnNodeFields":["body","endpoint_path"],"instillUIOrder":0,"properties":{"body":{"description":"The request body","instillAcceptFormats":["semi-structured/object"],"instillShortDescription":"The request body","instillUIOrder":1,"instillUpstreamTypes":["reference"],"order":1,"required":[],"title":"Body","type":"object"},"endpoint_path":{"description":"The API endpoint path relative to the base URL","instillAcceptFormats":["string"],"instillUIOrder":0,"instillUpstreamTypes":["value","reference","template"],"title":"Endpoint Path","type":"string"}},"required":["endpoint_path"],"title":"Input","type":"object"},"inputWithoutBody":{"instillUIOrder":0,"properties":{"endpoint_path":{"description":"The API endpoint path relative to the base URL","instillAcceptFormats":["string"],"instillUIOrder":0,"instillUpstreamTypes":["value","reference","template"],"title":"Endpoint Path","type":"string"}},"required":["endpoint_path"],"title":"Input","type":"object"},"output":{"description":"The HTTP response from the API","instillUIOrder":0,"properties":{"body":{"description":"The body of the response","instillFormat":"semi-structured/object","instillUIOrder":1,"required":[],"title":"Body","type":"object"},"header":{"description":"The HTTP header of the response","instillFormat":"semi-structured/object","instillUIOrder":2,"required":[],"title":"Header","type":"object"},"status_code":{"description":"The HTTP status code of the response","instillFormat":"integer","instillUIOrder":0,"title":"Status Code","type":"integer"}},"required":["status_code","body","header"],"title":"Output","type":"object"}}} diff --git a/instill/resources/schema/jsons/restapi_task_get_output.json b/instill/resources/schema/jsons/restapi_task_get_output.json new file mode 100644 index 0000000..9bcd743 --- /dev/null +++ b/instill/resources/schema/jsons/restapi_task_get_output.json @@ -0,0 +1 @@ +{"$ref":"#/$defs/output","$defs":{"inputWithBody":{"instillEditOnNodeFields":["body","endpoint_path"],"instillUIOrder":0,"properties":{"body":{"description":"The request body","instillAcceptFormats":["semi-structured/object"],"instillShortDescription":"The request body","instillUIOrder":1,"instillUpstreamTypes":["reference"],"order":1,"required":[],"title":"Body","type":"object"},"endpoint_path":{"description":"The API endpoint path relative to the base URL","instillAcceptFormats":["string"],"instillUIOrder":0,"instillUpstreamTypes":["value","reference","template"],"title":"Endpoint Path","type":"string"}},"required":["endpoint_path"],"title":"Input","type":"object"},"inputWithoutBody":{"instillUIOrder":0,"properties":{"endpoint_path":{"description":"The API endpoint path relative to the base URL","instillAcceptFormats":["string"],"instillUIOrder":0,"instillUpstreamTypes":["value","reference","template"],"title":"Endpoint Path","type":"string"}},"required":["endpoint_path"],"title":"Input","type":"object"},"output":{"description":"The HTTP response from the API","instillUIOrder":0,"properties":{"body":{"description":"The body of the response","instillFormat":"semi-structured/object","instillUIOrder":1,"required":[],"title":"Body","type":"object"},"header":{"description":"The HTTP header of the response","instillFormat":"semi-structured/object","instillUIOrder":2,"required":[],"title":"Header","type":"object"},"status_code":{"description":"The HTTP status code of the response","instillFormat":"integer","instillUIOrder":0,"title":"Status Code","type":"integer"}},"required":["status_code","body","header"],"title":"Output","type":"object"}}} diff --git a/instill/resources/schema/jsons/restapi_task_head_input.json b/instill/resources/schema/jsons/restapi_task_head_input.json new file mode 100644 index 0000000..7cb79db --- /dev/null +++ b/instill/resources/schema/jsons/restapi_task_head_input.json @@ -0,0 +1 @@ +{"$ref":"#/$defs/inputWithoutBody","$defs":{"inputWithBody":{"instillEditOnNodeFields":["body","endpoint_path"],"instillUIOrder":0,"properties":{"body":{"description":"The request body","instillAcceptFormats":["semi-structured/object"],"instillShortDescription":"The request body","instillUIOrder":1,"instillUpstreamTypes":["reference"],"order":1,"required":[],"title":"Body","type":"object"},"endpoint_path":{"description":"The API endpoint path relative to the base URL","instillAcceptFormats":["string"],"instillUIOrder":0,"instillUpstreamTypes":["value","reference","template"],"title":"Endpoint Path","type":"string"}},"required":["endpoint_path"],"title":"Input","type":"object"},"inputWithoutBody":{"instillUIOrder":0,"properties":{"endpoint_path":{"description":"The API endpoint path relative to the base URL","instillAcceptFormats":["string"],"instillUIOrder":0,"instillUpstreamTypes":["value","reference","template"],"title":"Endpoint Path","type":"string"}},"required":["endpoint_path"],"title":"Input","type":"object"},"output":{"description":"The HTTP response from the API","instillUIOrder":0,"properties":{"body":{"description":"The body of the response","instillFormat":"semi-structured/object","instillUIOrder":1,"required":[],"title":"Body","type":"object"},"header":{"description":"The HTTP header of the response","instillFormat":"semi-structured/object","instillUIOrder":2,"required":[],"title":"Header","type":"object"},"status_code":{"description":"The HTTP status code of the response","instillFormat":"integer","instillUIOrder":0,"title":"Status Code","type":"integer"}},"required":["status_code","body","header"],"title":"Output","type":"object"}}} diff --git a/instill/resources/schema/jsons/restapi_task_head_output.json b/instill/resources/schema/jsons/restapi_task_head_output.json new file mode 100644 index 0000000..9bcd743 --- /dev/null +++ b/instill/resources/schema/jsons/restapi_task_head_output.json @@ -0,0 +1 @@ +{"$ref":"#/$defs/output","$defs":{"inputWithBody":{"instillEditOnNodeFields":["body","endpoint_path"],"instillUIOrder":0,"properties":{"body":{"description":"The request body","instillAcceptFormats":["semi-structured/object"],"instillShortDescription":"The request body","instillUIOrder":1,"instillUpstreamTypes":["reference"],"order":1,"required":[],"title":"Body","type":"object"},"endpoint_path":{"description":"The API endpoint path relative to the base URL","instillAcceptFormats":["string"],"instillUIOrder":0,"instillUpstreamTypes":["value","reference","template"],"title":"Endpoint Path","type":"string"}},"required":["endpoint_path"],"title":"Input","type":"object"},"inputWithoutBody":{"instillUIOrder":0,"properties":{"endpoint_path":{"description":"The API endpoint path relative to the base URL","instillAcceptFormats":["string"],"instillUIOrder":0,"instillUpstreamTypes":["value","reference","template"],"title":"Endpoint Path","type":"string"}},"required":["endpoint_path"],"title":"Input","type":"object"},"output":{"description":"The HTTP response from the API","instillUIOrder":0,"properties":{"body":{"description":"The body of the response","instillFormat":"semi-structured/object","instillUIOrder":1,"required":[],"title":"Body","type":"object"},"header":{"description":"The HTTP header of the response","instillFormat":"semi-structured/object","instillUIOrder":2,"required":[],"title":"Header","type":"object"},"status_code":{"description":"The HTTP status code of the response","instillFormat":"integer","instillUIOrder":0,"title":"Status Code","type":"integer"}},"required":["status_code","body","header"],"title":"Output","type":"object"}}} diff --git a/instill/resources/schema/jsons/restapi_task_options_input.json b/instill/resources/schema/jsons/restapi_task_options_input.json new file mode 100644 index 0000000..f851328 --- /dev/null +++ b/instill/resources/schema/jsons/restapi_task_options_input.json @@ -0,0 +1 @@ +{"$ref":"#/$defs/inputWithBody","$defs":{"inputWithBody":{"instillEditOnNodeFields":["body","endpoint_path"],"instillUIOrder":0,"properties":{"body":{"description":"The request body","instillAcceptFormats":["semi-structured/object"],"instillShortDescription":"The request body","instillUIOrder":1,"instillUpstreamTypes":["reference"],"order":1,"required":[],"title":"Body","type":"object"},"endpoint_path":{"description":"The API endpoint path relative to the base URL","instillAcceptFormats":["string"],"instillUIOrder":0,"instillUpstreamTypes":["value","reference","template"],"title":"Endpoint Path","type":"string"}},"required":["endpoint_path"],"title":"Input","type":"object"},"inputWithoutBody":{"instillUIOrder":0,"properties":{"endpoint_path":{"description":"The API endpoint path relative to the base URL","instillAcceptFormats":["string"],"instillUIOrder":0,"instillUpstreamTypes":["value","reference","template"],"title":"Endpoint Path","type":"string"}},"required":["endpoint_path"],"title":"Input","type":"object"},"output":{"description":"The HTTP response from the API","instillUIOrder":0,"properties":{"body":{"description":"The body of the response","instillFormat":"semi-structured/object","instillUIOrder":1,"required":[],"title":"Body","type":"object"},"header":{"description":"The HTTP header of the response","instillFormat":"semi-structured/object","instillUIOrder":2,"required":[],"title":"Header","type":"object"},"status_code":{"description":"The HTTP status code of the response","instillFormat":"integer","instillUIOrder":0,"title":"Status Code","type":"integer"}},"required":["status_code","body","header"],"title":"Output","type":"object"}}} diff --git a/instill/resources/schema/jsons/restapi_task_options_output.json b/instill/resources/schema/jsons/restapi_task_options_output.json new file mode 100644 index 0000000..9bcd743 --- /dev/null +++ b/instill/resources/schema/jsons/restapi_task_options_output.json @@ -0,0 +1 @@ +{"$ref":"#/$defs/output","$defs":{"inputWithBody":{"instillEditOnNodeFields":["body","endpoint_path"],"instillUIOrder":0,"properties":{"body":{"description":"The request body","instillAcceptFormats":["semi-structured/object"],"instillShortDescription":"The request body","instillUIOrder":1,"instillUpstreamTypes":["reference"],"order":1,"required":[],"title":"Body","type":"object"},"endpoint_path":{"description":"The API endpoint path relative to the base URL","instillAcceptFormats":["string"],"instillUIOrder":0,"instillUpstreamTypes":["value","reference","template"],"title":"Endpoint Path","type":"string"}},"required":["endpoint_path"],"title":"Input","type":"object"},"inputWithoutBody":{"instillUIOrder":0,"properties":{"endpoint_path":{"description":"The API endpoint path relative to the base URL","instillAcceptFormats":["string"],"instillUIOrder":0,"instillUpstreamTypes":["value","reference","template"],"title":"Endpoint Path","type":"string"}},"required":["endpoint_path"],"title":"Input","type":"object"},"output":{"description":"The HTTP response from the API","instillUIOrder":0,"properties":{"body":{"description":"The body of the response","instillFormat":"semi-structured/object","instillUIOrder":1,"required":[],"title":"Body","type":"object"},"header":{"description":"The HTTP header of the response","instillFormat":"semi-structured/object","instillUIOrder":2,"required":[],"title":"Header","type":"object"},"status_code":{"description":"The HTTP status code of the response","instillFormat":"integer","instillUIOrder":0,"title":"Status Code","type":"integer"}},"required":["status_code","body","header"],"title":"Output","type":"object"}}} diff --git a/instill/resources/schema/jsons/restapi_task_patch_input.json b/instill/resources/schema/jsons/restapi_task_patch_input.json new file mode 100644 index 0000000..f851328 --- /dev/null +++ b/instill/resources/schema/jsons/restapi_task_patch_input.json @@ -0,0 +1 @@ +{"$ref":"#/$defs/inputWithBody","$defs":{"inputWithBody":{"instillEditOnNodeFields":["body","endpoint_path"],"instillUIOrder":0,"properties":{"body":{"description":"The request body","instillAcceptFormats":["semi-structured/object"],"instillShortDescription":"The request body","instillUIOrder":1,"instillUpstreamTypes":["reference"],"order":1,"required":[],"title":"Body","type":"object"},"endpoint_path":{"description":"The API endpoint path relative to the base URL","instillAcceptFormats":["string"],"instillUIOrder":0,"instillUpstreamTypes":["value","reference","template"],"title":"Endpoint Path","type":"string"}},"required":["endpoint_path"],"title":"Input","type":"object"},"inputWithoutBody":{"instillUIOrder":0,"properties":{"endpoint_path":{"description":"The API endpoint path relative to the base URL","instillAcceptFormats":["string"],"instillUIOrder":0,"instillUpstreamTypes":["value","reference","template"],"title":"Endpoint Path","type":"string"}},"required":["endpoint_path"],"title":"Input","type":"object"},"output":{"description":"The HTTP response from the API","instillUIOrder":0,"properties":{"body":{"description":"The body of the response","instillFormat":"semi-structured/object","instillUIOrder":1,"required":[],"title":"Body","type":"object"},"header":{"description":"The HTTP header of the response","instillFormat":"semi-structured/object","instillUIOrder":2,"required":[],"title":"Header","type":"object"},"status_code":{"description":"The HTTP status code of the response","instillFormat":"integer","instillUIOrder":0,"title":"Status Code","type":"integer"}},"required":["status_code","body","header"],"title":"Output","type":"object"}}} diff --git a/instill/resources/schema/jsons/restapi_task_patch_output.json b/instill/resources/schema/jsons/restapi_task_patch_output.json new file mode 100644 index 0000000..9bcd743 --- /dev/null +++ b/instill/resources/schema/jsons/restapi_task_patch_output.json @@ -0,0 +1 @@ +{"$ref":"#/$defs/output","$defs":{"inputWithBody":{"instillEditOnNodeFields":["body","endpoint_path"],"instillUIOrder":0,"properties":{"body":{"description":"The request body","instillAcceptFormats":["semi-structured/object"],"instillShortDescription":"The request body","instillUIOrder":1,"instillUpstreamTypes":["reference"],"order":1,"required":[],"title":"Body","type":"object"},"endpoint_path":{"description":"The API endpoint path relative to the base URL","instillAcceptFormats":["string"],"instillUIOrder":0,"instillUpstreamTypes":["value","reference","template"],"title":"Endpoint Path","type":"string"}},"required":["endpoint_path"],"title":"Input","type":"object"},"inputWithoutBody":{"instillUIOrder":0,"properties":{"endpoint_path":{"description":"The API endpoint path relative to the base URL","instillAcceptFormats":["string"],"instillUIOrder":0,"instillUpstreamTypes":["value","reference","template"],"title":"Endpoint Path","type":"string"}},"required":["endpoint_path"],"title":"Input","type":"object"},"output":{"description":"The HTTP response from the API","instillUIOrder":0,"properties":{"body":{"description":"The body of the response","instillFormat":"semi-structured/object","instillUIOrder":1,"required":[],"title":"Body","type":"object"},"header":{"description":"The HTTP header of the response","instillFormat":"semi-structured/object","instillUIOrder":2,"required":[],"title":"Header","type":"object"},"status_code":{"description":"The HTTP status code of the response","instillFormat":"integer","instillUIOrder":0,"title":"Status Code","type":"integer"}},"required":["status_code","body","header"],"title":"Output","type":"object"}}} diff --git a/instill/resources/schema/jsons/restapi_task_post_input.json b/instill/resources/schema/jsons/restapi_task_post_input.json new file mode 100644 index 0000000..f851328 --- /dev/null +++ b/instill/resources/schema/jsons/restapi_task_post_input.json @@ -0,0 +1 @@ +{"$ref":"#/$defs/inputWithBody","$defs":{"inputWithBody":{"instillEditOnNodeFields":["body","endpoint_path"],"instillUIOrder":0,"properties":{"body":{"description":"The request body","instillAcceptFormats":["semi-structured/object"],"instillShortDescription":"The request body","instillUIOrder":1,"instillUpstreamTypes":["reference"],"order":1,"required":[],"title":"Body","type":"object"},"endpoint_path":{"description":"The API endpoint path relative to the base URL","instillAcceptFormats":["string"],"instillUIOrder":0,"instillUpstreamTypes":["value","reference","template"],"title":"Endpoint Path","type":"string"}},"required":["endpoint_path"],"title":"Input","type":"object"},"inputWithoutBody":{"instillUIOrder":0,"properties":{"endpoint_path":{"description":"The API endpoint path relative to the base URL","instillAcceptFormats":["string"],"instillUIOrder":0,"instillUpstreamTypes":["value","reference","template"],"title":"Endpoint Path","type":"string"}},"required":["endpoint_path"],"title":"Input","type":"object"},"output":{"description":"The HTTP response from the API","instillUIOrder":0,"properties":{"body":{"description":"The body of the response","instillFormat":"semi-structured/object","instillUIOrder":1,"required":[],"title":"Body","type":"object"},"header":{"description":"The HTTP header of the response","instillFormat":"semi-structured/object","instillUIOrder":2,"required":[],"title":"Header","type":"object"},"status_code":{"description":"The HTTP status code of the response","instillFormat":"integer","instillUIOrder":0,"title":"Status Code","type":"integer"}},"required":["status_code","body","header"],"title":"Output","type":"object"}}} diff --git a/instill/resources/schema/jsons/restapi_task_post_output.json b/instill/resources/schema/jsons/restapi_task_post_output.json new file mode 100644 index 0000000..9bcd743 --- /dev/null +++ b/instill/resources/schema/jsons/restapi_task_post_output.json @@ -0,0 +1 @@ +{"$ref":"#/$defs/output","$defs":{"inputWithBody":{"instillEditOnNodeFields":["body","endpoint_path"],"instillUIOrder":0,"properties":{"body":{"description":"The request body","instillAcceptFormats":["semi-structured/object"],"instillShortDescription":"The request body","instillUIOrder":1,"instillUpstreamTypes":["reference"],"order":1,"required":[],"title":"Body","type":"object"},"endpoint_path":{"description":"The API endpoint path relative to the base URL","instillAcceptFormats":["string"],"instillUIOrder":0,"instillUpstreamTypes":["value","reference","template"],"title":"Endpoint Path","type":"string"}},"required":["endpoint_path"],"title":"Input","type":"object"},"inputWithoutBody":{"instillUIOrder":0,"properties":{"endpoint_path":{"description":"The API endpoint path relative to the base URL","instillAcceptFormats":["string"],"instillUIOrder":0,"instillUpstreamTypes":["value","reference","template"],"title":"Endpoint Path","type":"string"}},"required":["endpoint_path"],"title":"Input","type":"object"},"output":{"description":"The HTTP response from the API","instillUIOrder":0,"properties":{"body":{"description":"The body of the response","instillFormat":"semi-structured/object","instillUIOrder":1,"required":[],"title":"Body","type":"object"},"header":{"description":"The HTTP header of the response","instillFormat":"semi-structured/object","instillUIOrder":2,"required":[],"title":"Header","type":"object"},"status_code":{"description":"The HTTP status code of the response","instillFormat":"integer","instillUIOrder":0,"title":"Status Code","type":"integer"}},"required":["status_code","body","header"],"title":"Output","type":"object"}}} diff --git a/instill/resources/schema/jsons/restapi_task_put_input.json b/instill/resources/schema/jsons/restapi_task_put_input.json new file mode 100644 index 0000000..f851328 --- /dev/null +++ b/instill/resources/schema/jsons/restapi_task_put_input.json @@ -0,0 +1 @@ +{"$ref":"#/$defs/inputWithBody","$defs":{"inputWithBody":{"instillEditOnNodeFields":["body","endpoint_path"],"instillUIOrder":0,"properties":{"body":{"description":"The request body","instillAcceptFormats":["semi-structured/object"],"instillShortDescription":"The request body","instillUIOrder":1,"instillUpstreamTypes":["reference"],"order":1,"required":[],"title":"Body","type":"object"},"endpoint_path":{"description":"The API endpoint path relative to the base URL","instillAcceptFormats":["string"],"instillUIOrder":0,"instillUpstreamTypes":["value","reference","template"],"title":"Endpoint Path","type":"string"}},"required":["endpoint_path"],"title":"Input","type":"object"},"inputWithoutBody":{"instillUIOrder":0,"properties":{"endpoint_path":{"description":"The API endpoint path relative to the base URL","instillAcceptFormats":["string"],"instillUIOrder":0,"instillUpstreamTypes":["value","reference","template"],"title":"Endpoint Path","type":"string"}},"required":["endpoint_path"],"title":"Input","type":"object"},"output":{"description":"The HTTP response from the API","instillUIOrder":0,"properties":{"body":{"description":"The body of the response","instillFormat":"semi-structured/object","instillUIOrder":1,"required":[],"title":"Body","type":"object"},"header":{"description":"The HTTP header of the response","instillFormat":"semi-structured/object","instillUIOrder":2,"required":[],"title":"Header","type":"object"},"status_code":{"description":"The HTTP status code of the response","instillFormat":"integer","instillUIOrder":0,"title":"Status Code","type":"integer"}},"required":["status_code","body","header"],"title":"Output","type":"object"}}} diff --git a/instill/resources/schema/jsons/restapi_task_put_output.json b/instill/resources/schema/jsons/restapi_task_put_output.json new file mode 100644 index 0000000..9bcd743 --- /dev/null +++ b/instill/resources/schema/jsons/restapi_task_put_output.json @@ -0,0 +1 @@ +{"$ref":"#/$defs/output","$defs":{"inputWithBody":{"instillEditOnNodeFields":["body","endpoint_path"],"instillUIOrder":0,"properties":{"body":{"description":"The request body","instillAcceptFormats":["semi-structured/object"],"instillShortDescription":"The request body","instillUIOrder":1,"instillUpstreamTypes":["reference"],"order":1,"required":[],"title":"Body","type":"object"},"endpoint_path":{"description":"The API endpoint path relative to the base URL","instillAcceptFormats":["string"],"instillUIOrder":0,"instillUpstreamTypes":["value","reference","template"],"title":"Endpoint Path","type":"string"}},"required":["endpoint_path"],"title":"Input","type":"object"},"inputWithoutBody":{"instillUIOrder":0,"properties":{"endpoint_path":{"description":"The API endpoint path relative to the base URL","instillAcceptFormats":["string"],"instillUIOrder":0,"instillUpstreamTypes":["value","reference","template"],"title":"Endpoint Path","type":"string"}},"required":["endpoint_path"],"title":"Input","type":"object"},"output":{"description":"The HTTP response from the API","instillUIOrder":0,"properties":{"body":{"description":"The body of the response","instillFormat":"semi-structured/object","instillUIOrder":1,"required":[],"title":"Body","type":"object"},"header":{"description":"The HTTP header of the response","instillFormat":"semi-structured/object","instillUIOrder":2,"required":[],"title":"Header","type":"object"},"status_code":{"description":"The HTTP status code of the response","instillFormat":"integer","instillUIOrder":0,"title":"Status Code","type":"integer"}},"required":["status_code","body","header"],"title":"Output","type":"object"}}} diff --git a/instill/resources/schema/jsons/restapi_tasks.json b/instill/resources/schema/jsons/restapi_tasks.json new file mode 100644 index 0000000..a39e4bc --- /dev/null +++ b/instill/resources/schema/jsons/restapi_tasks.json @@ -0,0 +1,163 @@ +{ + "$defs": { + "inputWithBody": { + "instillEditOnNodeFields": [ + "body", + "endpoint_path" + ], + "instillUIOrder": 0, + "properties": { + "body": { + "description": "The request body", + "instillAcceptFormats": [ + "semi-structured/object" + ], + "instillShortDescription": "The request body", + "instillUIOrder": 1, + "instillUpstreamTypes": [ + "reference" + ], + "order": 1, + "required": [], + "title": "Body", + "type": "object" + }, + "endpoint_path": { + "description": "The API endpoint path relative to the base URL", + "instillAcceptFormats": [ + "string" + ], + "instillUIOrder": 0, + "instillUpstreamTypes": [ + "value", + "reference", + "template" + ], + "title": "Endpoint Path", + "type": "string" + } + }, + "required": [ + "endpoint_path" + ], + "title": "Input", + "type": "object" + }, + "inputWithoutBody": { + "instillUIOrder": 0, + "properties": { + "endpoint_path": { + "description": "The API endpoint path relative to the base URL", + "instillAcceptFormats": [ + "string" + ], + "instillUIOrder": 0, + "instillUpstreamTypes": [ + "value", + "reference", + "template" + ], + "title": "Endpoint Path", + "type": "string" + } + }, + "required": [ + "endpoint_path" + ], + "title": "Input", + "type": "object" + }, + "output": { + "description": "The HTTP response from the API", + "instillUIOrder": 0, + "properties": { + "body": { + "description": "The body of the response", + "instillFormat": "semi-structured/object", + "instillUIOrder": 1, + "required": [], + "title": "Body", + "type": "object" + }, + "header": { + "description": "The HTTP header of the response", + "instillFormat": "semi-structured/object", + "instillUIOrder": 2, + "required": [], + "title": "Header", + "type": "object" + }, + "status_code": { + "description": "The HTTP status code of the response", + "instillFormat": "integer", + "instillUIOrder": 0, + "title": "Status Code", + "type": "integer" + } + }, + "required": [ + "status_code", + "body", + "header" + ], + "title": "Output", + "type": "object" + } + }, + "TASK_DELETE": { + "input": { + "$ref": "#/$defs/inputWithBody" + }, + "output": { + "$ref": "#/$defs/output" + } + }, + "TASK_GET": { + "input": { + "$ref": "#/$defs/inputWithoutBody" + }, + "output": { + "$ref": "#/$defs/output" + } + }, + "TASK_HEAD": { + "input": { + "$ref": "#/$defs/inputWithoutBody" + }, + "output": { + "$ref": "#/$defs/output" + } + }, + "TASK_OPTIONS": { + "input": { + "$ref": "#/$defs/inputWithBody" + }, + "output": { + "$ref": "#/$defs/output" + } + }, + "TASK_PATCH": { + "input": { + "$ref": "#/$defs/inputWithBody" + }, + "output": { + "$ref": "#/$defs/output" + } + }, + "TASK_POST": { + "input": { + "$ref": "#/$defs/inputWithBody" + }, + "output": { + "$ref": "#/$defs/output" + } + }, + "TASK_PUT": { + "input": { + "$ref": "#/$defs/inputWithBody" + }, + "output": { + "$ref": "#/$defs/output" + } + } +} diff --git a/instill/resources/schema/jsons/stabilityai.json b/instill/resources/schema/jsons/stabilityai.json new file mode 100644 index 0000000..9e84a21 --- /dev/null +++ b/instill/resources/schema/jsons/stabilityai.json @@ -0,0 +1,1721 @@ +{ + "components": { + "headers": { + "Content-Length": { + "required": true, + "schema": { + "type": "integer" + } + }, + "Content-Type": { + "required": true, + "schema": { + "enum": [ + "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.", + "example": 3817857576, + "schema": { + "example": 787078103, + "type": "integer" + } + } + }, + "parameters": { + "accept": { + "allowEmptyValue": false, + "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" + ], + "type": "string" + } + }, + "engineID": { + "example": "stable-diffusion-v1-6", + "in": "path", + "name": "engine_id", + "required": true, + "schema": { + "example": "stable-diffusion-v1-6", + "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.", + "example": "org-123456", + "in": "header", + "name": "Organization", + "schema": { + "type": "string" + }, + "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.", + "example": "my-great-plugin", + "in": "header", + "name": "Stability-Client-ID", + "schema": { + "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.", + "example": "1.2.1", + "in": "header", + "name": "Stability-Client-Version", + "schema": { + "type": "string" + } + }, + "upscaleEngineID": { + "examples": { + "ESRGAN_X2_PLUS": { + "description": "ESRGAN x2 Upscaler", + "value": "esrgan-v1-x2plus" + }, + "LATENT_UPSCALER_X4": { + "description": "Stable Diffusion x4 Latent Upscaler", + "value": "stable-diffusion-x4-latent-upscaler" + } + }, + "in": "path", + "name": "engine_id", + "required": true, + "schema": { + "type": "string" + } + } + }, + "responses": { + "400FromGeneration": { + "content": { + "application/json": { + "example": { + "id": "296a972f-666a-44a1-a3df-c9c28a1f56c0", + "message": "init_image: is required", + "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" + }, + "400FromUpscale": { + "content": { + "application/json": { + "example": { + "id": "296a972f-666a-44a1-a3df-c9c28a1f56c0", + "message": "image: is required", + "name": "bad_request" + }, + "schema": { + "$ref": "#/components/schemas/Error" + } + } + }, + "description": "General error for invalid parameters, see below for specific errors.\n\n - bad_request: one or more provided parameters are invalid (see error description for details)\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_pixel_count: The requested image would exceed the maximum pixel count of 4,194,304" + }, + "401": { + "content": { + "application/json": { + "example": { + "id": "9160aa70-222f-4a36-9eb7-475e2668362a", + "message": "missing authorization header", + "name": "unauthorized" + }, + "schema": { + "$ref": "#/components/schemas/Error" + } + } + }, + "description": "unauthorized: API key missing or invalid" + }, + "403": { + "content": { + "application/json": { + "example": { + "id": "5cf19777-d17f-49fe-9bd9-39ff0ec6bb50", + "message": "You do not have permission to access this resource", + "name": "permission_denied" + }, + "schema": { + "$ref": "#/components/schemas/Error" + } + } + }, + "description": "permission_denied: You lack the necessary permissions to perform this action" + }, + "404": { + "content": { + "application/json": { + "example": { + "id": "92b19e7f-22a2-4e71-a821-90edda229293", + "message": "The specified engine (ID some-fake-engine) was not found.", + "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)" + }, + "500": { + "content": { + "application/json": { + "example": { + "id": "f81964d6-619b-453e-97bc-9fd7ac3f04e7", + "message": "An unexpected server error occurred, please try again.", + "name": "server_error" + }, + "schema": { + "$ref": "#/components/schemas/Error" + } + } + }, + "description": "server_error: Some unexpected server error occurred" + }, + "GenerationResponse": { + "content": { + "application/json": { + "schema": { + "description": "An array of results from the generation request, where each image is a base64 encoded PNG.", + "properties": { + "artifacts": { + "items": { + "$ref": "#/components/schemas/Image" + }, + "type": "array", + "x-go-type-skip-optional-pointer": true + } + }, + "type": "object" + } + }, + "image/png": { + "example": "The bytes of the generated image, what did you expect?", + "schema": { + "description": "The bytes of the generated PNG image", + "format": "binary", + "type": "string" + } + } + }, + "description": "One or more images were successfully generated.", + "headers": { + "Content-Length": { + "$ref": "#/components/headers/Content-Length" + }, + "Content-Type": { + "$ref": "#/components/headers/Content-Type" + }, + "Finish-Reason": { + "$ref": "#/components/headers/Finish-Reason" + }, + "Seed": { + "$ref": "#/components/headers/Seed" + } + } + } + }, + "schemas": { + "AccountResponseBody": { + "properties": { + "email": { + "description": "The user's email", + "example": "example@stability.ai", + "format": "email", + "type": "string" + }, + "id": { + "description": "The user's ID", + "example": "user-1234", + "type": "string", + "x-go-name": "ID" + }, + "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" + } + ], + "items": { + "$ref": "#/components/schemas/OrganizationMembership" + }, + "type": "array" + }, + "profile_picture": { + "description": "The user's profile picture", + "example": "https://api.stability.ai/example.png", + "format": "uri", + "type": "string" + } + }, + "required": [ + "id", + "email", + "organizations" + ], + "type": "object" + }, + "BalanceResponseBody": { + "example": { + "credits": 0.07903292496944721 + }, + "properties": { + "credits": { + "description": "The balance of the account/organization associated with the API key", + "example": 0.41122252265928866, + "format": "double", + "type": "number" + } + }, + "required": [ + "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)", + "example": 7, + "maximum": 35, + "minimum": 0, + "type": "number" + }, + "ClipGuidancePreset": { + "default": "NONE", + "enum": [ + "FAST_BLUE", + "FAST_GREEN", + "NONE", + "SIMPLE", + "SLOW", + "SLOWER", + "SLOWEST" + ], + "example": "FAST_BLUE", + "type": "string" + }, + "DiffuseImageHeight": { + "default": 512, + "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": 512, + "minimum": 128, + "multipleOf": 64, + "type": "integer", + "x-go-type": "uint64" + }, + "DiffuseImageWidth": { + "default": 512, + "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": 512, + "minimum": 128, + "multipleOf": 64, + "type": "integer", + "x-go-type": "uint64" + }, + "Engine": { + "properties": { + "description": { + "type": "string" + }, + "id": { + "description": "Unique identifier for the engine", + "example": "stable-diffusion-v1-6", + "type": "string", + "x-go-name": "ID" + }, + "name": { + "description": "Name of the engine", + "example": "Stable Diffusion XL v1.0", + "type": "string" + }, + "type": { + "description": "The type of content this engine produces", + "enum": [ + "AUDIO", + "CLASSIFICATION", + "PICTURE", + "STORAGE", + "TEXT", + "VIDEO" + ], + "example": "PICTURE", + "type": "string" + } + }, + "required": [ + "id", + "name", + "description", + "type" + ], + "type": "object" + }, + "Error": { + "properties": { + "id": { + "description": "A unique identifier for this particular occurrence of the problem.", + "example": "296a972f-666a-44a1-a3df-c9c28a1f56c0", + "type": "string", + "x-go-name": "ID" + }, + "message": { + "description": "A human-readable explanation specific to this occurrence of the problem.", + "example": "Header parameter Authorization is required, but not found", + "type": "string" + }, + "name": { + "description": "The short-name of this class of errors e.g. `bad_request`.", + "example": "bad_request", + "type": "string" + } + }, + "required": [ + "name", + "id", + "message", + "status" + ], + "type": "object", + "x-go-name": "RESTError" + }, + "Extras": { + "description": "Extra parameters passed to the engine.\nThese parameters are used for in-development or experimental features and may change\nwithout warning, so please use with caution.", + "type": "object" + }, + "FinishReason": { + "description": "The result of the generation process.\n- `SUCCESS` indicates success\n- `ERROR` indicates an error\n- `CONTENT_FILTERED` indicates the result affected by the content filter and may be blurred.\n\nThis 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" + ], + "type": "string" + }, + "GenerationRequestOptionalParams": { + "description": "Represents the optional parameters that can be passed to any generation request.", + "properties": { + "cfg_scale": { + "$ref": "#/components/schemas/CfgScale" + }, + "clip_guidance_preset": { + "$ref": "#/components/schemas/ClipGuidancePreset" + }, + "extras": { + "$ref": "#/components/schemas/Extras" + }, + "sampler": { + "$ref": "#/components/schemas/Sampler" + }, + "samples": { + "$ref": "#/components/schemas/Samples" + }, + "seed": { + "$ref": "#/components/schemas/Seed" + }, + "steps": { + "$ref": "#/components/schemas/Steps" + }, + "style_preset": { + "$ref": "#/components/schemas/StylePreset" + } + }, + "type": "object" + }, + "Image": { + "example": [ + { + "base64": "...very long string...", + "finishReason": "SUCCESS", + "seed": 1050625087 + }, + { + "base64": "...very long string...", + "finishReason": "CONTENT_FILTERED", + "seed": 1229191277 + } + ], + "properties": { + "base64": { + "description": "Image encoded in base64", + "type": "string", + "x-go-type-skip-optional-pointer": true + }, + "finishReason": { + "enum": [ + "SUCCESS", + "ERROR", + "CONTENT_FILTERED" + ], + "example": "CONTENT_FILTERED", + "type": "string", + "x-go-type-skip-optional-pointer": true + }, + "seed": { + "description": "The seed associated with this image", + "example": 1229191277, + "type": "number", + "x-go-type-skip-optional-pointer": true + } + }, + "type": "object" + }, + "ImageToImageRequestBody": { + "discriminator": { + "mapping": { + "IMAGE_STRENGTH": "#/components/schemas/ImageToImageUsingImageStrengthRequestBody", + "STEP_SCHEDULE": "#/components/schemas/ImageToImageUsingStepScheduleRequestBody" + }, + "propertyName": "init_image_mode" + }, + "properties": { + "cfg_scale": { + "$ref": "#/components/schemas/CfgScale" + }, + "clip_guidance_preset": { + "$ref": "#/components/schemas/ClipGuidancePreset" + }, + "extras": { + "$ref": "#/components/schemas/Extras" + }, + "image_strength": { + "$ref": "#/components/schemas/InitImageStrength" + }, + "init_image": { + "$ref": "#/components/schemas/InitImage" + }, + "init_image_mode": { + "$ref": "#/components/schemas/InitImageMode" + }, + "sampler": { + "$ref": "#/components/schemas/Sampler" + }, + "samples": { + "$ref": "#/components/schemas/Samples" + }, + "seed": { + "$ref": "#/components/schemas/Seed" + }, + "step_schedule_end": { + "$ref": "#/components/schemas/StepScheduleEnd" + }, + "step_schedule_start": { + "$ref": "#/components/schemas/StepScheduleStart" + }, + "steps": { + "$ref": "#/components/schemas/Steps" + }, + "style_preset": { + "$ref": "#/components/schemas/StylePreset" + }, + "text_prompts": { + "$ref": "#/components/schemas/TextPrompts" + } + }, + "required": [ + "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" + } + ] + }, + "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" + } + ] + }, + "InitImage": { + "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.", + "enum": [ + "IMAGE_STRENGTH", + "STEP_SCHEDULE" + ], + "type": "string" + }, + "InitImageStrength": { + "default": 0.35, + "description": "How much influence the `init_image` has on the diffusion process. Values close to `1` will yield images very similar to the `init_image` while values close to `0` will yield images wildly different than the `init_image`. The behavior of this is meant to mirror DreamStudio's \"Image Strength\" slider.

    This parameter is just an alternate way to set `step_schedule_start`, which is done via the calculation `1 - image_strength`. For example, passing in an Image Strength of 35% (`0.35`) would result in a `step_schedule_start` of `0.65`.\n", + "example": 0.4, + "format": "float", + "maximum": 1, + "minimum": 0, + "type": "number" + }, + "InputImage": { + "example": "", + "format": "binary", + "type": "string", + "x-go-type": "[]byte" + }, + "LatentUpscalerUpscaleRequestBody": { + "properties": { + "cfg_scale": { + "$ref": "#/components/schemas/CfgScale" + }, + "height": { + "$ref": "#/components/schemas/UpscaleImageHeight" + }, + "image": { + "$ref": "#/components/schemas/InputImage" + }, + "seed": { + "$ref": "#/components/schemas/Seed" + }, + "steps": { + "$ref": "#/components/schemas/Steps" + }, + "text_prompts": { + "$ref": "#/components/schemas/TextPrompts" + }, + "width": { + "$ref": "#/components/schemas/UpscaleImageWidth" + } + }, + "required": [ + "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" + } + ], + "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.", + "example": "", + "format": "binary", + "type": "string", + "x-go-type": "[]byte" + }, + "MaskSource": { + "description": "For any given pixel, the mask determines the strength of generation on a linear scale. This parameter determines where to source the mask from:\n- `MASK_IMAGE_WHITE` will use the white pixels of the mask_image as the mask, where white pixels are completely replaced and black pixels are unchanged\n- `MASK_IMAGE_BLACK` will use the black pixels of the mask_image as the mask, where black pixels are completely replaced and white pixels are unchanged\n- `INIT_IMAGE_ALPHA` will use the alpha channel of the init_image as the mask, where fully transparent pixels are completely replaced and fully opaque pixels are unchanged", + "type": "string" + }, + "MaskingRequestBody": { + "discriminator": { + "mapping": { + "INIT_IMAGE_ALPHA": "#/components/schemas/MaskingUsingInitImageAlphaRequestBody", + "MASK_IMAGE_BLACK": "#/components/schemas/MaskingUsingMaskImageRequestBody", + "MASK_IMAGE_WHITE": "#/components/schemas/MaskingUsingMaskImageRequestBody" + }, + "propertyName": "mask_source" + }, + "properties": { + "cfg_scale": { + "$ref": "#/components/schemas/CfgScale" + }, + "clip_guidance_preset": { + "$ref": "#/components/schemas/ClipGuidancePreset" + }, + "extras": { + "$ref": "#/components/schemas/Extras" + }, + "init_image": { + "$ref": "#/components/schemas/InitImage" + }, + "mask_image": { + "$ref": "#/components/schemas/MaskImage" + }, + "mask_source": { + "$ref": "#/components/schemas/MaskSource" + }, + "sampler": { + "$ref": "#/components/schemas/Sampler" + }, + "samples": { + "$ref": "#/components/schemas/Samples" + }, + "seed": { + "$ref": "#/components/schemas/Seed" + }, + "steps": { + "$ref": "#/components/schemas/Steps" + }, + "style_preset": { + "$ref": "#/components/schemas/StylePreset" + }, + "text_prompts": { + "$ref": "#/components/schemas/TextPrompts" + } + }, + "required": [ + "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" + } + ] + }, + "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" + } + ] + }, + "OrganizationMembership": { + "properties": { + "id": { + "example": "org-123456", + "type": "string", + "x-go-name": "ID" + }, + "is_default": { + "example": false, + "type": "boolean" + }, + "name": { + "example": "My Organization", + "type": "string" + }, + "role": { + "example": "MEMBER", + "type": "string" + } + }, + "required": [ + "id", + "name", + "role", + "is_default" + ], + "type": "object" + }, + "RealESRGANUpscaleRequestBody": { + "properties": { + "height": { + "$ref": "#/components/schemas/UpscaleImageHeight" + }, + "image": { + "$ref": "#/components/schemas/InputImage" + }, + "width": { + "$ref": "#/components/schemas/UpscaleImageWidth" + } + }, + "required": [ + "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.", + "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" + ], + "example": "K_DPM_2_ANCESTRAL", + "type": "string" + }, + "Samples": { + "default": 1, + "description": "Number of images to generate", + "example": 1, + "maximum": 10, + "minimum": 1, + "type": "integer", + "x-go-type": "uint64" + }, + "Seed": { + "default": 0, + "description": "Random noise seed (omit this option or use `0` for a random seed)", + "example": 0, + "maximum": 4294967295, + "minimum": 0, + "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.", + "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.)", + "example": 0.4, + "maximum": 1, + "minimum": 0, + "type": "number" + }, + "Steps": { + "default": 30, + "description": "Number of diffusion steps to run.", + "example": 50, + "maximum": 50, + "minimum": 10, + "type": "integer", + "x-go-type": "uint64" + }, + "StylePreset": { + "description": "Pass in a style preset to guide the image model towards a particular style.\nThis 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" + ], + "type": "string" + }, + "TextPrompt": { + "description": "Text prompt for image generation", + "properties": { + "text": { + "description": "The prompt itself", + "example": "A lighthouse on a cliff", + "maxLength": 2000, + "type": "string" + }, + "weight": { + "description": "Weight of the prompt (use negative numbers for negative prompts)", + "example": 0.8167237, + "format": "float", + "type": "number" + } + }, + "required": [ + "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```", + "items": { + "$ref": "#/components/schemas/TextPrompt" + }, + "minItems": 1, + "type": "array" + }, + "TextPromptsForTextToImage": { + "description": "An array of text prompts to use for generation.\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\n```\n\"text_prompts\": [\n {\n \"text\": \"A lighthouse on a cliff\",\n \"weight\": 0.5\n }\n]\n```", + "items": { + "$ref": "#/components/schemas/TextPrompt" + }, + "minItems": 1, + "title": "TextPrompts", + "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" + } + ], + "example": { + "cfg_scale": 7, + "clip_guidance_preset": "FAST_BLUE", + "height": 512, + "sampler": "K_DPM_2_ANCESTRAL", + "samples": 1, + "seed": 0, + "steps": 30, + "text_prompts": [ + { + "text": "A lighthouse on a cliff", + "weight": 1 + } + ], + "width": 512 + }, + "required": [ + "text_prompts" + ], + "type": "object" + }, + "UpscaleImageHeight": { + "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.", + "minimum": 512, + "type": "integer", + "x-go-type": "uint64" + } + }, + "securitySchemes": { + "STABILITY_API_KEY": { + "in": "header", + "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](https://platform.stability.ai/account/keys) 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](https://stabilityai.instatus.com/) to view the current health of our REST/gRPC APIs.\n\nIf you run into issues, please reach out to us:\n - [Support Form](https://platform.stability.ai/support)\n - [platform@stability.ai](mailto:platform@stability.ai) \n - [Discord](https://discord.com/channels/1002292111942635562/1042896447311454361)\n", + "termsOfService": "https://platform.stability.ai/docs/terms-of-service", + "title": "Stability.ai REST API", + "version": "v1", + "x-logo": { + "altText": "Stability.ai REST API", + "url": "/docs/StabilityLogo.png" + } + }, + "openapi": "3.0.3", + "paths": { + "/v1/engines/list": { + "get": { + "description": "List all engines available to your organization/user", + "operationId": "listEngines", + "parameters": [ + { + "$ref": "#/components/parameters/organization" + }, + { + "$ref": "#/components/parameters/stabilityClientID" + }, + { + "$ref": "#/components/parameters/stabilityClientVersion" + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ListEnginesResponseBody" + } + } + }, + "description": "OK response." + }, + "401": { + "$ref": "#/components/responses/401" + }, + "500": { + "$ref": "#/components/responses/500" + } + }, + "security": [ + { + "STABILITY_API_KEY": [] + } + ], + "summary": "list", + "tags": [ + "v1/engines" + ], + "x-codeSamples": [ + { + "lang": "Python", + "source": "import os\nimport requests\n\napi_host = os.getenv('API_HOST', 'https://api.stability.ai')\nurl = f\"{api_host}/v1/engines/list\"\n\napi_key = os.getenv(\"STABILITY_API_KEY\")\nif api_key is None:\n raise Exception(\"Missing Stability API key.\")\n\nresponse = requests.get(url, headers={\n \"Authorization\": f\"Bearer {api_key}\"\n})\n\nif response.status_code != 200:\n raise Exception(\"Non-200 response: \" + str(response.text))\n\n# Do something with the payload...\npayload = response.json()\n\n" + }, + { + "label": "TypeScript", + "lang": "Javascript", + "source": "import fetch from 'node-fetch'\n\nconst apiHost = process.env.API_HOST ?? 'https://api.stability.ai'\nconst url = `${apiHost}/v1/engines/list`\n\nconst apiKey = process.env.STABILITY_API_KEY\nif (!apiKey) throw new Error('Missing Stability API key.')\n\nconst response = await fetch(url, {\n method: 'GET',\n headers: {\n Authorization: `Bearer ${apiKey}`,\n },\n})\n\nif (!response.ok) {\n throw new Error(`Non-200 response: ${await response.text()}`)\n}\n\ninterface Payload {\n engines: Array<{\n id: string\n name: string\n description: string\n type: string\n }>\n}\n\n// Do something with the payload...\nconst payload = (await response.json()) as Payload\n" + }, + { + "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\n echo \"STABILITY_API_KEY environment variable is not set\"\n exit 1\nfi\n\nBASE_URL=${API_HOST:-https://api.stability.ai}\nURL=\"$BASE_URL/v1/engines/list\"\n\ncurl -f -sS \"$URL\" \\\n -H 'Accept: application/json' \\\n -H \"Authorization: Bearer $STABILITY_API_KEY\"\n" + } + ] + } + }, + "/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" + } + ], + "requestBody": { + "content": { + "multipart/form-data": { + "examples": { + "IMAGE_STRENGTH": { + "description": "Request using 35% image_strength", + "summary": "Using IMAGE_STRENGTH", + "value": { + "cfg_scale": 7, + "clip_guidance_preset": "FAST_BLUE", + "image_strength": 0.35, + "init_image": "", + "init_image_mode": "IMAGE_STRENGTH", + "sampler": "K_DPM_2_ANCESTRAL", + "samples": 3, + "steps": 30, + "text_prompts[0][text]": "A dog space commander", + "text_prompts[0][weight]": 1 + } + }, + "STEP_SCHEDULE": { + "description": "Equivalent request using step_schedule_start", + "summary": "Using STEP_SCHEDULE", + "value": { + "cfg_scale": 7, + "clip_guidance_preset": "FAST_BLUE", + "init_image": "", + "init_image_mode": "STEP_SCHEDULE", + "sampler": "K_DPM_2_ANCESTRAL", + "samples": 3, + "step_schedule_start": 0.65, + "steps": 30, + "text_prompts[0][text]": "A dog space commander", + "text_prompts[0][weight]": 1 + } + } + }, + "schema": { + "$ref": "#/components/schemas/ImageToImageRequestBody" + } + } + }, + "required": true + }, + "responses": { + "200": { + "$ref": "#/components/responses/GenerationResponse" + }, + "400": { + "$ref": "#/components/responses/400FromGeneration" + }, + "401": { + "$ref": "#/components/responses/401" + }, + "403": { + "$ref": "#/components/responses/403" + }, + "404": { + "$ref": "#/components/responses/404" + }, + "500": { + "$ref": "#/components/responses/500" + } + }, + "security": [ + { + "STABILITY_API_KEY": [] + } + ], + "summary": "image-to-image", + "tags": [ + "v1/generation" + ], + "x-codeSamples": [ + { + "lang": "Python", + "source": "import base64\nimport os\nimport requests\n\nengine_id = \"stable-diffusion-xl-1024-v1-0\"\napi_host = os.getenv(\"API_HOST\", \"https://api.stability.ai\")\napi_key = os.getenv(\"STABILITY_API_KEY\")\n\nif api_key is None:\n raise Exception(\"Missing Stability API key.\")\n\nresponse = requests.post(\n f\"{api_host}/v1/generation/{engine_id}/image-to-image\",\n headers={\n \"Accept\": \"application/json\",\n \"Authorization\": f\"Bearer {api_key}\"\n },\n files={\n \"init_image\": open(\"../init_image_1024.png\", \"rb\")\n },\n data={\n \"image_strength\": 0.35,\n \"init_image_mode\": \"IMAGE_STRENGTH\",\n \"text_prompts[0][text]\": \"Galactic dog with a cape\",\n \"cfg_scale\": 7,\n \"samples\": 1,\n \"steps\": 30,\n }\n)\n\nif response.status_code != 200:\n raise Exception(\"Non-200 response: \" + str(response.text))\n\ndata = response.json()\n\nfor i, image in enumerate(data[\"artifacts\"]):\n with open(f\"./out/v1_img2img_{i}.png\", \"wb\") as f:\n f.write(base64.b64decode(image[\"base64\"]))\n" + }, + { + "label": "TypeScript", + "lang": "Javascript", + "source": "import fetch from 'node-fetch'\nimport FormData from 'form-data'\nimport fs from 'node:fs'\n\nconst engineId = 'stable-diffusion-xl-1024-v1-0'\nconst apiHost = process.env.API_HOST ?? 'https://api.stability.ai'\nconst apiKey = process.env.STABILITY_API_KEY\n\nif (!apiKey) throw new Error('Missing Stability API key.')\n\n// NOTE: This example is using a NodeJS FormData library.\n// Browsers should use their native FormData class.\n// React Native apps should also use their native FormData class.\nconst formData = new FormData()\nformData.append('init_image', fs.readFileSync('../init_image_1024.png'))\nformData.append('init_image_mode', 'IMAGE_STRENGTH')\nformData.append('image_strength', 0.35)\nformData.append('text_prompts[0][text]', 'Galactic dog wearing a cape')\nformData.append('cfg_scale', 7)\nformData.append('samples', 1)\nformData.append('steps', 30)\n\nconst response = await fetch(\n `${apiHost}/v1/generation/${engineId}/image-to-image`,\n {\n method: 'POST',\n headers: {\n ...formData.getHeaders(),\n Accept: 'application/json',\n Authorization: `Bearer ${apiKey}`,\n },\n body: formData,\n }\n)\n\nif (!response.ok) {\n throw new Error(`Non-200 response: ${await response.text()}`)\n}\n\ninterface GenerationResponse {\n artifacts: Array<{\n base64: string\n seed: number\n finishReason: string\n }>\n}\n\nconst responseJSON = (await response.json()) as GenerationResponse\n\nresponseJSON.artifacts.forEach((image, index) => {\n fs.writeFileSync(\n `out/v1_img2img_${index}.png`,\n Buffer.from(image.base64, 'base64')\n )\n})\n" + }, + { + "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\tif !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\n echo \"STABILITY_API_KEY environment variable is not set\"\n exit 1\nfi\n\nOUTPUT_FILE=./out/v1_img2img.png\nBASE_URL=${API_HOST:-https://api.stability.ai}\nURL=\"$BASE_URL/v1/generation/stable-diffusion-xl-1024-v1-0/image-to-image\"\n\ncurl -f -sS -X POST \"$URL\" \\\n -H 'Content-Type: multipart/form-data' \\\n -H 'Accept: image/png' \\\n -H \"Authorization: Bearer $STABILITY_API_KEY\" \\\n -F 'init_image=@\"../init_image_1024.png\"' \\\n -F 'init_image_mode=IMAGE_STRENGTH' \\\n -F 'image_strength=0.35' \\\n -F 'text_prompts[0][text]=A galactic dog in space' \\\n -F 'cfg_scale=7' \\\n -F 'samples=1' \\\n -F 'steps=30' \\\n -o \"$OUTPUT_FILE\"\n" + } + ] + } + }, + "/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" + } + ], + "requestBody": { + "content": { + "multipart/form-data": { + "examples": { + "INIT_IMAGE_ALPHA": { + "value": { + "cfg_scale": 7, + "clip_guidance_preset": "FAST_BLUE", + "init_image": "", + "mask_source": "INIT_IMAGE_ALPHA", + "sampler": "K_DPM_2_ANCESTRAL", + "samples": 3, + "steps": 30, + "text_prompts[0][text]": "A dog space commander", + "text_prompts[0][weight]": 1 + } + }, + "MASK_IMAGE_BLACK": { + "value": { + "cfg_scale": 7, + "clip_guidance_preset": "FAST_BLUE", + "init_image": "", + "mask_image": "", + "mask_source": "MASK_IMAGE_BLACK", + "sampler": "K_DPM_2_ANCESTRAL", + "samples": 3, + "steps": 30, + "text_prompts[0][text]": "A dog space commander", + "text_prompts[0][weight]": 1 + } + }, + "MASK_IMAGE_WHITE": { + "value": { + "cfg_scale": 7, + "clip_guidance_preset": "FAST_BLUE", + "init_image": "", + "mask_image": "", + "mask_source": "MASK_IMAGE_WHITE", + "sampler": "K_DPM_2_ANCESTRAL", + "samples": 3, + "steps": 30, + "text_prompts[0][text]": "A dog space commander", + "text_prompts[0][weight]": 1 + } + } + }, + "schema": { + "$ref": "#/components/schemas/MaskingRequestBody" + } + } + }, + "required": true + }, + "responses": { + "200": { + "$ref": "#/components/responses/GenerationResponse" + }, + "400": { + "$ref": "#/components/responses/400FromGeneration" + }, + "401": { + "$ref": "#/components/responses/401" + }, + "403": { + "$ref": "#/components/responses/403" + }, + "404": { + "$ref": "#/components/responses/404" + }, + "500": { + "$ref": "#/components/responses/500" + } + }, + "security": [ + { + "STABILITY_API_KEY": [] + } + ], + "summary": "image-to-image/masking", + "tags": [ + "v1/generation" + ], + "x-codeSamples": [ + { + "lang": "Python", + "source": "import base64\nimport os\nimport requests\n\nengine_id = \"stable-diffusion-xl-1024-v1-0\"\napi_host = os.getenv('API_HOST', 'https://api.stability.ai')\napi_key = os.getenv(\"STABILITY_API_KEY\")\n\nif api_key is None:\n raise Exception(\"Missing Stability API key.\")\n\nresponse = requests.post(\n f\"{api_host}/v1/generation/{engine_id}/image-to-image/masking\",\n headers={\n \"Accept\": 'application/json',\n \"Authorization\": f\"Bearer {api_key}\"\n },\n files={\n 'init_image': open(\"../init_image_1024.png\", 'rb'),\n 'mask_image': open(\"../mask_image_black_1024.png\", 'rb'),\n },\n data={\n \"mask_source\": \"MASK_IMAGE_BLACK\",\n \"text_prompts[0][text]\": \"A large spiral galaxy with a bright central bulge and a ring of stars around it\",\n \"cfg_scale\": 7,\n \"clip_guidance_preset\": \"FAST_BLUE\",\n \"samples\": 1,\n \"steps\": 30,\n }\n)\n\nif response.status_code != 200:\n raise Exception(\"Non-200 response: \" + str(response.text))\n\ndata = response.json()\n\nfor i, image in enumerate(data[\"artifacts\"]):\n with open(f\"./out/v1_img2img_masking_{i}.png\", \"wb\") as f:\n f.write(base64.b64decode(image[\"base64\"]))\n" + }, + { + "label": "TypeScript", + "lang": "Javascript", + "source": "import fetch from 'node-fetch'\nimport FormData from 'form-data'\nimport fs from 'node:fs'\n\nconst engineId = 'stable-diffusion-xl-1024-v1-0'\nconst apiHost = process.env.API_HOST ?? 'https://api.stability.ai'\nconst apiKey = process.env.STABILITY_API_KEY\n\nif (!apiKey) throw new Error('Missing Stability API key.')\n\n// NOTE: This example is using a NodeJS FormData library. Browser\n// implementations should use their native FormData class. React Native\n// implementations should also use their native FormData class.\nconst formData = new FormData()\nformData.append('init_image', fs.readFileSync('../init_image_1024.png'))\nformData.append('mask_image', fs.readFileSync('../mask_image_black_1024.png'))\nformData.append('mask_source', 'MASK_IMAGE_BLACK')\nformData.append(\n 'text_prompts[0][text]',\n 'A large spiral galaxy with a bright central bulge and a ring of stars around it'\n)\nformData.append('cfg_scale', '7')\nformData.append('clip_guidance_preset', 'FAST_BLUE')\nformData.append('samples', 1)\nformData.append('steps', 30)\n\nconst response = await fetch(\n `${apiHost}/v1/generation/${engineId}/image-to-image/masking`,\n {\n method: 'POST',\n headers: {\n ...formData.getHeaders(),\n Accept: 'application/json',\n Authorization: `Bearer ${apiKey}`,\n },\n body: formData,\n }\n)\n\nif (!response.ok) {\n throw new Error(`Non-200 response: ${await response.text()}`)\n}\n\ninterface GenerationResponse {\n artifacts: Array<{\n base64: string\n seed: number\n finishReason: string\n }>\n}\n\nconst responseJSON = (await response.json()) as GenerationResponse\n\nresponseJSON.artifacts.forEach((image, index) => {\n fs.writeFileSync(\n `out/v1_img2img_masking_${index}.png`,\n Buffer.from(image.base64, 'base64')\n )\n})\n" + }, + { + "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\tpanic(err)\n\t\t}\n\t}\n}\n" + }, + { + "lang": "cURL", + "source": "#!/bin/sh\n\nset -e\n\nif [ -z \"$STABILITY_API_KEY\" ]; then\n echo \"STABILITY_API_KEY environment variable is not set\"\n exit 1\nfi\n\nOUTPUT_FILE=./out/v1_img2img_masking.png\nBASE_URL=${API_HOST:-https://api.stability.ai}\nURL=\"$BASE_URL/v1/generation/stable-diffusion-xl-1024-v1-0/image-to-image/masking\"\n\ncurl -f -sS -X POST \"$URL\" \\\n -H 'Content-Type: multipart/form-data' \\\n -H 'Accept: image/png' \\\n -H \"Authorization: Bearer $STABILITY_API_KEY\" \\\n -F 'init_image=@\"../init_image_1024.png\"' \\\n -F 'mask_image=@\"../mask_image_black_1024.png\"' \\\n -F 'mask_source=MASK_IMAGE_BLACK' \\\n -F 'text_prompts[0][text]=A large spiral galaxy with a bright central bulge and a ring of stars around it' \\\n -F 'cfg_scale=7' \\\n -F 'clip_guidance_preset=FAST_BLUE' \\\n -F 'samples=1' \\\n -F 'steps=30' \\\n -o \"$OUTPUT_FILE\"\n" + } + ] + } + }, + "/v1/generation/{engine_id}/image-to-image/upscale": { + "post": { + "description": "Create a higher resolution version of an input image.\n\nThis operation outputs an image with a maximum pixel count of **4,194,304**. This is equivalent to dimensions such as `2048x2048` and `4096x1024`.\n\nBy default, the input image will be upscaled by a factor of 2. For additional control over the output dimensions, a `width` or `height` parameter may be specified.\n\nFor upscaler engines that are ESRGAN-based, refer to the `RealESRGANUpscaleRequestBody` body option below. For upscaler engines that are Stable Diffusion Latent Upscaler-based, refer to the `LatentUpscalerUpscaleRequestBody` body option below.\n\nFor more details on the upscaler engines, refer to the [documentation on the Platform site.](https://platform.stability.ai/docs/features/image-upscaling?tab=python)\n", + "operationId": "upscaleImage", + "parameters": [ + { + "$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.", + "value": { + "height": 1024, + "image": "" + } + }, + "DESIRED_WIDTH": { + "description": "Upscale input image to desired width with ESRGAN or the Latent Upscaler.", + "value": { + "image": "", + "width": 1024 + } + }, + "ESRGAN": { + "description": "Upscale input image by 2x using ESRGAN.", + "value": { + "image": "" + } + }, + "LATENT_UPSCALER": { + "description": "Request using the Latent Upscaler. Refer to the LatentUpscalerUpscaleRequestBody for reference.", + "value": { + "cfg_scale": 7, + "image": "", + "seed": 5555, + "steps": 30, + "text_prompts[0][text]": "A dog space commander", + "text_prompts[0][weight]": 1 + } + } + }, + "schema": { + "oneOf": [ + { + "$ref": "#/components/schemas/RealESRGANUpscaleRequestBody" + }, + { + "$ref": "#/components/schemas/LatentUpscalerUpscaleRequestBody" + } + ] + } + } + }, + "required": true + }, + "responses": { + "200": { + "$ref": "#/components/responses/GenerationResponse" + }, + "400": { + "$ref": "#/components/responses/400FromUpscale" + }, + "401": { + "$ref": "#/components/responses/401" + }, + "403": { + "$ref": "#/components/responses/403" + }, + "404": { + "$ref": "#/components/responses/404" + }, + "500": { + "$ref": "#/components/responses/500" + } + }, + "security": [ + { + "STABILITY_API_KEY": [] + } + ], + "summary": "image-to-image/upscale", + "tags": [ + "v1/generation" + ], + "x-codeSamples": [ + { + "lang": "Python", + "source": "import os\nimport requests\n\nengine_id = \"esrgan-v1-x2plus\"\napi_host = os.getenv(\"API_HOST\", \"https://api.stability.ai\")\napi_key = os.getenv(\"STABILITY_API_KEY\")\n\nif api_key is None:\n raise Exception(\"Missing Stability API key.\")\n\nresponse = requests.post(\n f\"{api_host}/v1/generation/{engine_id}/image-to-image/upscale\",\n headers={\n \"Accept\": \"image/png\",\n \"Authorization\": f\"Bearer {api_key}\"\n },\n files={\n \"image\": open(\"../init_image.png\", \"rb\")\n },\n data={\n \"width\": 1024,\n }\n)\n\nif response.status_code != 200:\n raise Exception(\"Non-200 response: \" + str(response.text))\n\nwith open(f\"./out/v1_upscaled_image.png\", \"wb\") as f:\n f.write(response.content)\n" + }, + { + "label": "TypeScript", + "lang": "Javascript", + "source": "import fetch from 'node-fetch'\nimport FormData from 'form-data'\nimport fs from 'node:fs'\n\nconst engineId = 'esrgan-v1-x2plus'\nconst apiHost = process.env.API_HOST ?? 'https://api.stability.ai'\nconst apiKey = process.env.STABILITY_API_KEY\n\nif (!apiKey) throw new Error('Missing Stability API key.')\n\n// NOTE: This example is using a NodeJS FormData library.\n// Browsers should use their native FormData class.\n// React Native apps should also use their native FormData class.\nconst formData = new FormData()\nformData.append('image', fs.readFileSync('../init_image.png'))\nformData.append('width', 1024)\n\nconst response = await fetch(\n `${apiHost}/v1/generation/${engineId}/image-to-image/upscale`,\n {\n method: 'POST',\n headers: {\n ...formData.getHeaders(),\n Accept: 'image/png',\n Authorization: `Bearer ${apiKey}`,\n },\n body: formData,\n }\n)\n\nif (!response.ok) {\n throw new Error(`Non-200 response: ${await response.text()}`)\n}\n\nconst image = await response.arrayBuffer()\nfs.writeFileSync('./out/v1_upscaled_image.png', Buffer.from(image))\n" + }, + { + "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\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\n echo \"STABILITY_API_KEY environment variable is not set\"\n exit 1\nfi\n\nOUTPUT_FILE=./out/v1_upscaled_image.png\nBASE_URL=${API_HOST:-https://api.stability.ai}\nURL=\"$BASE_URL/v1/generation/esrgan-v1-x2plus/image-to-image/upscale\"\n\ncurl -f -sS -X POST \"$URL\" \\\n -H 'Content-Type: multipart/form-data' \\\n -H 'Accept: image/png' \\\n -H \"Authorization: Bearer $STABILITY_API_KEY\" \\\n -F 'image=@\"../init_image.png\"' \\\n -F 'width=1024' \\\n -o \"$OUTPUT_FILE\"\n" + } + ] + } + }, + "/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" + } + ], + "requestBody": { + "content": { + "application/json": { + "example": { + "cfg_scale": 7, + "clip_guidance_preset": "FAST_BLUE", + "height": 512, + "sampler": "K_DPM_2_ANCESTRAL", + "samples": 1, + "steps": 30, + "text_prompts": [ + { + "text": "A lighthouse on a cliff", + "weight": 1 + } + ], + "width": 512 + }, + "schema": { + "$ref": "#/components/schemas/TextToImageRequestBody" + } + } + }, + "required": true + }, + "responses": { + "200": { + "$ref": "#/components/responses/GenerationResponse" + }, + "400": { + "$ref": "#/components/responses/400FromGeneration" + }, + "401": { + "$ref": "#/components/responses/401" + }, + "403": { + "$ref": "#/components/responses/403" + }, + "404": { + "$ref": "#/components/responses/404" + }, + "500": { + "$ref": "#/components/responses/500" + } + }, + "security": [ + { + "STABILITY_API_KEY": [] + } + ], + "summary": "text-to-image", + "tags": [ + "v1/generation" + ], + "x-codeSamples": [ + { + "lang": "Python", + "source": "import base64\nimport os\nimport requests\n\nengine_id = \"stable-diffusion-v1-6\"\napi_host = os.getenv('API_HOST', 'https://api.stability.ai')\napi_key = os.getenv(\"STABILITY_API_KEY\")\n\nif api_key is None:\n raise Exception(\"Missing Stability API key.\")\n\nresponse = requests.post(\n f\"{api_host}/v1/generation/{engine_id}/text-to-image\",\n headers={\n \"Content-Type\": \"application/json\",\n \"Accept\": \"application/json\",\n \"Authorization\": f\"Bearer {api_key}\"\n },\n json={\n \"text_prompts\": [\n {\n \"text\": \"A lighthouse on a cliff\"\n }\n ],\n \"cfg_scale\": 7,\n \"height\": 1024,\n \"width\": 1024,\n \"samples\": 1,\n \"steps\": 30,\n },\n)\n\nif response.status_code != 200:\n raise Exception(\"Non-200 response: \" + str(response.text))\n\ndata = response.json()\n\nfor i, image in enumerate(data[\"artifacts\"]):\n with open(f\"./out/v1_txt2img_{i}.png\", \"wb\") as f:\n f.write(base64.b64decode(image[\"base64\"]))\n" + }, + { + "label": "TypeScript", + "lang": "Javascript", + "source": "import fetch from 'node-fetch'\nimport fs from 'node:fs'\n\nconst engineId = 'stable-diffusion-v1-6'\nconst apiHost = process.env.API_HOST ?? 'https://api.stability.ai'\nconst apiKey = process.env.STABILITY_API_KEY\n\nif (!apiKey) throw new Error('Missing Stability API key.')\n\nconst response = await fetch(\n `${apiHost}/v1/generation/${engineId}/text-to-image`,\n {\n method: 'POST',\n headers: {\n 'Content-Type': 'application/json',\n Accept: 'application/json',\n Authorization: `Bearer ${apiKey}`,\n },\n body: JSON.stringify({\n text_prompts: [\n {\n text: 'A lighthouse on a cliff',\n },\n ],\n cfg_scale: 7,\n height: 1024,\n width: 1024,\n steps: 30,\n samples: 1,\n }),\n }\n)\n\nif (!response.ok) {\n throw new Error(`Non-200 response: ${await response.text()}`)\n}\n\ninterface GenerationResponse {\n artifacts: Array<{\n base64: string\n seed: number\n finishReason: string\n }>\n}\n\nconst responseJSON = (await response.json()) as GenerationResponse\n\nresponseJSON.artifacts.forEach((image, index) => {\n fs.writeFileSync(\n `./out/v1_txt2img_${index}.png`,\n Buffer.from(image.base64, 'base64')\n )\n})\n" + }, + { + "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\n echo \"STABILITY_API_KEY environment variable is not set\"\n exit 1\nfi\n\nOUTPUT_FILE=./out/v1_txt2img.png\nBASE_URL=${API_HOST:-https://api.stability.ai}\nURL=\"$BASE_URL/v1/generation/stable-diffusion-v1-6/text-to-image\"\n\ncurl -f -sS -X POST \"$URL\" \\\n -H 'Content-Type: application/json' \\\n -H 'Accept: image/png' \\\n -H \"Authorization: Bearer $STABILITY_API_KEY\" \\\n --data-raw '{\n \"text_prompts\": [\n {\n \"text\": \"A lighthouse on a cliff\"\n }\n ],\n \"cfg_scale\": 7,\n \"height\": 1024,\n \"width\": 1024,\n \"samples\": 1,\n \"steps\": 30\n }' \\\n -o \"$OUTPUT_FILE\"\n" + } + ] + } + }, + "/v1/user/account": { + "get": { + "description": "Get information about the account associated with the provided API key", + "operationId": "userAccount", + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/AccountResponseBody" + } + } + }, + "description": "OK response." + }, + "401": { + "$ref": "#/components/responses/401" + }, + "500": { + "$ref": "#/components/responses/500" + } + }, + "security": [ + { + "STABILITY_API_KEY": [] + } + ], + "summary": "account", + "tags": [ + "v1/user" + ], + "x-codeSamples": [ + { + "lang": "Python", + "source": "import os\nimport requests\n\napi_host = os.getenv('API_HOST', 'https://api.stability.ai')\nurl = f\"{api_host}/v1/user/account\"\n\napi_key = os.getenv(\"STABILITY_API_KEY\")\nif api_key is None:\n raise Exception(\"Missing Stability API key.\")\n\nresponse = requests.get(url, headers={\n \"Authorization\": f\"Bearer {api_key}\"\n})\n\nif response.status_code != 200:\n raise Exception(\"Non-200 response: \" + str(response.text))\n\n# Do something with the payload...\npayload = response.json()\n\n" + }, + { + "label": "TypeScript", + "lang": "Javascript", + "source": "import fetch from 'node-fetch'\n\nconst apiHost = process.env.API_HOST ?? 'https://api.stability.ai'\nconst url = `${apiHost}/v1/user/account`\n\nconst apiKey = process.env.STABILITY_API_KEY\nif (!apiKey) throw new Error('Missing Stability API key.')\n\nconst response = await fetch(url, {\n method: 'GET',\n headers: {\n Authorization: `Bearer ${apiKey}`,\n },\n})\n\nif (!response.ok) {\n throw new Error(`Non-200 response: ${await response.text()}`)\n}\n\ninterface User {\n id: string\n profile_picture: string\n email: string\n organizations?: Array<{\n id: string\n name: string\n role: string\n is_default: boolean\n }>\n}\n\n// Do something with the user...\nconst user = (await response.json()) as User\n" + }, + { + "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\n echo \"STABILITY_API_KEY environment variable is not set\"\n exit 1\nfi\n\n# Determine the URL to use for the request\nBASE_URL=${API_HOST:-https://api.stability.ai}\nURL=\"$BASE_URL/v1/user/account\"\n\ncurl -f -sS \"$URL\" \\\n -H 'Accept: application/json' \\\n -H \"Authorization: Bearer $STABILITY_API_KEY\"\n" + } + ] + } + }, + "/v1/user/balance": { + "get": { + "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" + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "example": { + "credits": 0.6336833840314097 + }, + "schema": { + "$ref": "#/components/schemas/BalanceResponseBody" + } + } + }, + "description": "OK response." + }, + "401": { + "$ref": "#/components/responses/401" + }, + "500": { + "$ref": "#/components/responses/500" + } + }, + "security": [ + { + "STABILITY_API_KEY": [] + } + ], + "summary": "balance", + "tags": [ + "v1/user" + ], + "x-codeSamples": [ + { + "lang": "Python", + "source": "import os\nimport requests\n\napi_host = os.getenv('API_HOST', 'https://api.stability.ai')\nurl = f\"{api_host}/v1/user/balance\"\n\napi_key = os.getenv(\"STABILITY_API_KEY\")\nif api_key is None:\n raise Exception(\"Missing Stability API key.\")\n\nresponse = requests.get(url, headers={\n \"Authorization\": f\"Bearer {api_key}\"\n})\n\nif response.status_code != 200:\n raise Exception(\"Non-200 response: \" + str(response.text))\n\n# Do something with the payload...\npayload = response.json()\n\n" + }, + { + "label": "TypeScript", + "lang": "Javascript", + "source": "import fetch from 'node-fetch'\n\nconst apiHost = process.env.API_HOST ?? 'https://api.stability.ai'\nconst url = `${apiHost}/v1/user/balance`\n\nconst apiKey = process.env.STABILITY_API_KEY\nif (!apiKey) throw new Error('Missing Stability API key.')\n\nconst response = await fetch(url, {\n method: 'GET',\n headers: {\n Authorization: `Bearer ${apiKey}`,\n },\n})\n\nif (!response.ok) {\n throw new Error(`Non-200 response: ${await response.text()}`)\n}\n\ninterface Balance {\n credits: number\n}\n\n// Do something with the balance...\nconst balance = (await response.json()) as Balance\n" + }, + { + "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\n echo \"STABILITY_API_KEY environment variable is not set\"\n exit 1\nfi\n\n# Determine the URL to use for the request\nBASE_URL=${API_HOST:-https://api.stability.ai}\nURL=\"$BASE_URL/v1/user/balance\"\n\ncurl -f -sS \"$URL\" \\\n -H 'Content-Type: application/json' \\\n -H \"Authorization: Bearer $STABILITY_API_KEY\"\n" + } + ] + } + } + }, + "servers": [ + { + "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" + } + ] +} diff --git a/instill/resources/schema/jsons/stabilityai_definitions.json b/instill/resources/schema/jsons/stabilityai_definitions.json new file mode 100644 index 0000000..10fb278 --- /dev/null +++ b/instill/resources/schema/jsons/stabilityai_definitions.json @@ -0,0 +1 @@ +{ "$schema": "http://json-schema.org/draft-07/schema#", "additionalProperties": false, "properties": { "api_key": { "description": "Fill your Stability AI API key. To find your keys, visit - https://platform.stability.ai/account/keys", "instillCredentialField": true, "instillUIOrder": 0, "title": "API Key", "type": "string" } }, "required": [ "api_key" ], "title": "Stability AI Connector Resource", "type": "object" } diff --git a/instill/resources/schema/jsons/stabilityai_task_image_to_image_input.json b/instill/resources/schema/jsons/stabilityai_task_image_to_image_input.json new file mode 100644 index 0000000..6c71257 --- /dev/null +++ b/instill/resources/schema/jsons/stabilityai_task_image_to_image_input.json @@ -0,0 +1 @@ +{"additionalProperties":false,"description":"Input","instillEditOnNodeFields":["prompts","engine"],"instillUIOrder":0,"properties":{"cfg_scale":{"$ref":"stabilityai.json#/components/schemas/CfgScale","instillAcceptFormats":["number","integer"],"instillUIOrder":6,"instillUpstreamTypes":["value","reference"],"title":"Cfg Scale"},"clip_guidance_preset":{"$ref":"stabilityai.json#/components/schemas/ClipGuidancePreset","description":"Clip guidance preset","instillAcceptFormats":["string"],"instillUIOrder":3,"instillUpstreamTypes":["value","reference","template"],"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"],"instillAcceptFormats":["string"],"instillUIOrder":0,"instillUpstreamTypes":["value","reference","template"],"title":"Engine","type":"string"},"image_strength":{"$ref":"stabilityai.json#/components/schemas/InitImageStrength","instillAcceptFormats":["number","integer"],"instillShortDescription":"How much influence the `init_image` has on the diffusion process.","instillUIOrder":5,"instillUpstreamTypes":["value","reference"],"title":"Image Strength"},"init_image":{"$ref":"stabilityai.json#/components/schemas/InitImage","instillAcceptFormats":["image/*"],"instillUIOrder":2,"instillUpstreamTypes":["reference"],"title":"Init Image"},"init_image_mode":{"$ref":"stabilityai.json#/components/schemas/InitImageMode","instillAcceptFormats":["string"],"instillUIOrder":7,"instillUpstreamTypes":["value","reference","template"],"title":"Init Image Mode"},"prompts":{"description":"An array of prompts to use for generation.","instillAcceptFormats":["array:string"],"instillUIOrder":1,"instillUpstreamTypes":["reference"],"items":{"$ref":"stabilityai.json#/components/schemas/TextPrompt/properties/text"},"minItems":1,"title":"Prompts","type":"array"},"sampler":{"$ref":"stabilityai.json#/components/schemas/Sampler","instillAcceptFormats":["string"],"instillShortDescription":"Which sampler to use for the diffusion process","instillUIOrder":8,"instillUpstreamTypes":["value","reference","template"],"title":"Sampler"},"samples":{"$ref":"stabilityai.json#/components/schemas/Samples","instillAcceptFormats":["integer"],"instillUIOrder":9,"instillUpstreamTypes":["value","reference"],"title":"Samples"},"seed":{"$ref":"stabilityai.json#/components/schemas/Seed","instillAcceptFormats":["number","integer"],"instillUIOrder":10,"instillUpstreamTypes":["value","reference"],"title":"Seed"},"step_schedule_end":{"$ref":"stabilityai.json#/components/schemas/StepScheduleEnd","instillAcceptFormats":["number","integer"],"instillShortDescription":"Skips a proportion of the end of the diffusion steps","instillUIOrder":12,"instillUpstreamTypes":["value","reference"],"title":"Step Schedule End"},"step_schedule_start":{"$ref":"stabilityai.json#/components/schemas/StepScheduleStart","instillAcceptFormats":["number","integer"],"instillShortDescription":"Skips a proportion of the start of the diffusion steps","instillUIOrder":11,"instillUpstreamTypes":["value","reference"],"title":"Step Schedule Start"},"steps":{"$ref":"stabilityai.json#/components/schemas/Steps","instillAcceptFormats":["integer"],"instillUIOrder":13,"instillUpstreamTypes":["value","reference"],"title":"Steps"},"style_preset":{"$ref":"stabilityai.json#/components/schemas/StylePreset","instillAcceptFormats":["string"],"instillUIOrder":14,"instillUpstreamTypes":["value","reference","template"],"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.","instillAcceptFormats":["array:number","array:integer"],"instillUIOrder":2,"instillUpstreamTypes":["reference"],"items":{"$ref":"stabilityai.json#/components/schemas/TextPrompt/properties/weight"},"minItems":1,"title":"Weights","type":"array"}},"required":["prompts","engine"],"title":"Input","type":"object"} diff --git a/instill/resources/schema/jsons/stabilityai_task_image_to_image_output.json b/instill/resources/schema/jsons/stabilityai_task_image_to_image_output.json new file mode 100644 index 0000000..6bbfa8a --- /dev/null +++ b/instill/resources/schema/jsons/stabilityai_task_image_to_image_output.json @@ -0,0 +1 @@ +{"$ref":"#/TASK_TEXT_TO_IMAGE/output"} diff --git a/instill/resources/schema/jsons/stabilityai_task_text_to_image_input.json b/instill/resources/schema/jsons/stabilityai_task_text_to_image_input.json new file mode 100644 index 0000000..787cf82 --- /dev/null +++ b/instill/resources/schema/jsons/stabilityai_task_text_to_image_input.json @@ -0,0 +1 @@ +{"additionalProperties":false,"description":"Input","instillEditOnNodeFields":["prompts","engine"],"instillUIOrder":0,"properties":{"cfg_scale":{"$ref":"stabilityai.json#/components/schemas/CfgScale","instillAcceptFormats":["number","integer"],"instillUIOrder":3,"instillUpstreamTypes":["value","reference"],"title":"CFG Scale"},"clip_guidance_preset":{"$ref":"stabilityai.json#/components/schemas/ClipGuidancePreset","description":"Clip guidance preset","instillAcceptFormats":["string"],"instillUIOrder":4,"instillUpstreamTypes":["value","reference","template"],"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"],"instillAcceptFormats":["string"],"instillUIOrder":0,"instillUpstreamTypes":["value","reference","template"],"title":"Engine","type":"string"},"height":{"$ref":"stabilityai.json#/components/schemas/DiffuseImageHeight","description":"The image height","instillAcceptFormats":["integer"],"instillUIOrder":5,"instillUpstreamTypes":["value","reference"],"title":"Height"},"prompts":{"description":"An array of prompts to use for generation.","instillAcceptFormats":["array:string"],"instillUIOrder":1,"instillUpstreamTypes":["reference"],"items":{"$ref":"stabilityai.json#/components/schemas/TextPrompt/properties/text"},"minItems":1,"title":"Prompts","type":"array"},"sampler":{"$ref":"stabilityai.json#/components/schemas/Sampler","instillAcceptFormats":["string"],"instillUIOrder":6,"instillUpstreamTypes":["value","reference","template"],"title":"Sampler"},"samples":{"$ref":"stabilityai.json#/components/schemas/Samples","instillAcceptFormats":["integer"],"instillUIOrder":7,"instillUpstreamTypes":["value","reference"],"title":"Samples"},"seed":{"$ref":"stabilityai.json#/components/schemas/Seed","instillAcceptFormats":["number","integer"],"instillUIOrder":8,"instillUpstreamTypes":["value","reference"],"title":"Seed"},"steps":{"$ref":"stabilityai.json#/components/schemas/Steps","instillAcceptFormats":["integer"],"instillUIOrder":9,"instillUpstreamTypes":["value","reference"],"title":"Steps"},"style_preset":{"$ref":"stabilityai.json#/components/schemas/StylePreset","instillAcceptFormats":["string"],"instillUIOrder":10,"instillUpstreamTypes":["value","reference","template"],"title":"Style Preset"},"weights":{"description":"An array of weights to use for generation.","instillAcceptFormats":["array:number","array:integer"],"instillUIOrder":2,"instillUpstreamTypes":["reference"],"items":{"$ref":"stabilityai.json#/components/schemas/TextPrompt/properties/weight"},"minItems":1,"title":"Weights","type":"array"},"width":{"$ref":"stabilityai.json#/components/schemas/DiffuseImageWidth","description":"The image width","instillAcceptFormats":["integer"],"instillUIOrder":5,"instillUpstreamTypes":["value","reference"],"title":"Width"}},"required":["prompts","engine"],"title":"Input","type":"object"} diff --git a/instill/resources/schema/jsons/stabilityai_task_text_to_image_output.json b/instill/resources/schema/jsons/stabilityai_task_text_to_image_output.json new file mode 100644 index 0000000..fb7a284 --- /dev/null +++ b/instill/resources/schema/jsons/stabilityai_task_text_to_image_output.json @@ -0,0 +1 @@ +{"additionalProperties":false,"description":"Output","instillEditOnNodeFields":["images","seeds"],"instillUIOrder":0,"properties":{"images":{"description":"Generated images","instillUIOrder":0,"items":{"instillFormat":"image/png","type":"string"},"title":"Images","type":"array"},"seeds":{"description":"Seeds of generated images","instillUIOrder":1,"items":{"$ref":"stabilityai.json#/components/schemas/Image/properties/seed","instillFormat":"number"},"title":"Seeds","type":"array"}},"required":["images","seeds"],"title":"Output","type":"object"} diff --git a/instill/resources/schema/jsons/stabilityai_tasks.json b/instill/resources/schema/jsons/stabilityai_tasks.json new file mode 100644 index 0000000..8b12a15 --- /dev/null +++ b/instill/resources/schema/jsons/stabilityai_tasks.json @@ -0,0 +1,465 @@ +{ + "TASK_IMAGE_TO_IMAGE": { + "input": { + "additionalProperties": false, + "description": "Input", + "instillEditOnNodeFields": [ + "prompts", + "engine" + ], + "instillUIOrder": 0, + "properties": { + "cfg_scale": { + "$ref": "stabilityai.json#/components/schemas/CfgScale", + "instillAcceptFormats": [ + "number", + "integer" + ], + "instillUIOrder": 6, + "instillUpstreamTypes": [ + "value", + "reference" + ], + "title": "Cfg Scale" + }, + "clip_guidance_preset": { + "$ref": "stabilityai.json#/components/schemas/ClipGuidancePreset", + "description": "Clip guidance preset", + "instillAcceptFormats": [ + "string" + ], + "instillUIOrder": 3, + "instillUpstreamTypes": [ + "value", + "reference", + "template" + ], + "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" + ], + "instillAcceptFormats": [ + "string" + ], + "instillUIOrder": 0, + "instillUpstreamTypes": [ + "value", + "reference", + "template" + ], + "title": "Engine", + "type": "string" + }, + "image_strength": { + "$ref": "stabilityai.json#/components/schemas/InitImageStrength", + "instillAcceptFormats": [ + "number", + "integer" + ], + "instillShortDescription": "How much influence the `init_image` has on the diffusion process.", + "instillUIOrder": 5, + "instillUpstreamTypes": [ + "value", + "reference" + ], + "title": "Image Strength" + }, + "init_image": { + "$ref": "stabilityai.json#/components/schemas/InitImage", + "instillAcceptFormats": [ + "image/*" + ], + "instillUIOrder": 2, + "instillUpstreamTypes": [ + "reference" + ], + "title": "Init Image" + }, + "init_image_mode": { + "$ref": "stabilityai.json#/components/schemas/InitImageMode", + "instillAcceptFormats": [ + "string" + ], + "instillUIOrder": 7, + "instillUpstreamTypes": [ + "value", + "reference", + "template" + ], + "title": "Init Image Mode" + }, + "prompts": { + "description": "An array of prompts to use for generation.", + "instillAcceptFormats": [ + "array:string" + ], + "instillUIOrder": 1, + "instillUpstreamTypes": [ + "reference" + ], + "items": { + "$ref": "stabilityai.json#/components/schemas/TextPrompt/properties/text" + }, + "minItems": 1, + "title": "Prompts", + "type": "array" + }, + "sampler": { + "$ref": "stabilityai.json#/components/schemas/Sampler", + "instillAcceptFormats": [ + "string" + ], + "instillShortDescription": "Which sampler to use for the diffusion process", + "instillUIOrder": 8, + "instillUpstreamTypes": [ + "value", + "reference", + "template" + ], + "title": "Sampler" + }, + "samples": { + "$ref": "stabilityai.json#/components/schemas/Samples", + "instillAcceptFormats": [ + "integer" + ], + "instillUIOrder": 9, + "instillUpstreamTypes": [ + "value", + "reference" + ], + "title": "Samples" + }, + "seed": { + "$ref": "stabilityai.json#/components/schemas/Seed", + "instillAcceptFormats": [ + "number", + "integer" + ], + "instillUIOrder": 10, + "instillUpstreamTypes": [ + "value", + "reference" + ], + "title": "Seed" + }, + "step_schedule_end": { + "$ref": "stabilityai.json#/components/schemas/StepScheduleEnd", + "instillAcceptFormats": [ + "number", + "integer" + ], + "instillShortDescription": "Skips a proportion of the end of the diffusion steps", + "instillUIOrder": 12, + "instillUpstreamTypes": [ + "value", + "reference" + ], + "title": "Step Schedule End" + }, + "step_schedule_start": { + "$ref": "stabilityai.json#/components/schemas/StepScheduleStart", + "instillAcceptFormats": [ + "number", + "integer" + ], + "instillShortDescription": "Skips a proportion of the start of the diffusion steps", + "instillUIOrder": 11, + "instillUpstreamTypes": [ + "value", + "reference" + ], + "title": "Step Schedule Start" + }, + "steps": { + "$ref": "stabilityai.json#/components/schemas/Steps", + "instillAcceptFormats": [ + "integer" + ], + "instillUIOrder": 13, + "instillUpstreamTypes": [ + "value", + "reference" + ], + "title": "Steps" + }, + "style_preset": { + "$ref": "stabilityai.json#/components/schemas/StylePreset", + "instillAcceptFormats": [ + "string" + ], + "instillUIOrder": 14, + "instillUpstreamTypes": [ + "value", + "reference", + "template" + ], + "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.", + "instillAcceptFormats": [ + "array:number", + "array:integer" + ], + "instillUIOrder": 2, + "instillUpstreamTypes": [ + "reference" + ], + "items": { + "$ref": "stabilityai.json#/components/schemas/TextPrompt/properties/weight" + }, + "minItems": 1, + "title": "Weights", + "type": "array" + } + }, + "required": [ + "prompts", + "engine" + ], + "title": "Input", + "type": "object" + }, + "output": { + "$ref": "#/TASK_TEXT_TO_IMAGE/output" + } + }, + "TASK_TEXT_TO_IMAGE": { + "input": { + "additionalProperties": false, + "description": "Input", + "instillEditOnNodeFields": [ + "prompts", + "engine" + ], + "instillUIOrder": 0, + "properties": { + "cfg_scale": { + "$ref": "stabilityai.json#/components/schemas/CfgScale", + "instillAcceptFormats": [ + "number", + "integer" + ], + "instillUIOrder": 3, + "instillUpstreamTypes": [ + "value", + "reference" + ], + "title": "CFG Scale" + }, + "clip_guidance_preset": { + "$ref": "stabilityai.json#/components/schemas/ClipGuidancePreset", + "description": "Clip guidance preset", + "instillAcceptFormats": [ + "string" + ], + "instillUIOrder": 4, + "instillUpstreamTypes": [ + "value", + "reference", + "template" + ], + "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" + ], + "instillAcceptFormats": [ + "string" + ], + "instillUIOrder": 0, + "instillUpstreamTypes": [ + "value", + "reference", + "template" + ], + "title": "Engine", + "type": "string" + }, + "height": { + "$ref": "stabilityai.json#/components/schemas/DiffuseImageHeight", + "description": "The image height", + "instillAcceptFormats": [ + "integer" + ], + "instillUIOrder": 5, + "instillUpstreamTypes": [ + "value", + "reference" + ], + "title": "Height" + }, + "prompts": { + "description": "An array of prompts to use for generation.", + "instillAcceptFormats": [ + "array:string" + ], + "instillUIOrder": 1, + "instillUpstreamTypes": [ + "reference" + ], + "items": { + "$ref": "stabilityai.json#/components/schemas/TextPrompt/properties/text" + }, + "minItems": 1, + "title": "Prompts", + "type": "array" + }, + "sampler": { + "$ref": "stabilityai.json#/components/schemas/Sampler", + "instillAcceptFormats": [ + "string" + ], + "instillUIOrder": 6, + "instillUpstreamTypes": [ + "value", + "reference", + "template" + ], + "title": "Sampler" + }, + "samples": { + "$ref": "stabilityai.json#/components/schemas/Samples", + "instillAcceptFormats": [ + "integer" + ], + "instillUIOrder": 7, + "instillUpstreamTypes": [ + "value", + "reference" + ], + "title": "Samples" + }, + "seed": { + "$ref": "stabilityai.json#/components/schemas/Seed", + "instillAcceptFormats": [ + "number", + "integer" + ], + "instillUIOrder": 8, + "instillUpstreamTypes": [ + "value", + "reference" + ], + "title": "Seed" + }, + "steps": { + "$ref": "stabilityai.json#/components/schemas/Steps", + "instillAcceptFormats": [ + "integer" + ], + "instillUIOrder": 9, + "instillUpstreamTypes": [ + "value", + "reference" + ], + "title": "Steps" + }, + "style_preset": { + "$ref": "stabilityai.json#/components/schemas/StylePreset", + "instillAcceptFormats": [ + "string" + ], + "instillUIOrder": 10, + "instillUpstreamTypes": [ + "value", + "reference", + "template" + ], + "title": "Style Preset" + }, + "weights": { + "description": "An array of weights to use for generation.", + "instillAcceptFormats": [ + "array:number", + "array:integer" + ], + "instillUIOrder": 2, + "instillUpstreamTypes": [ + "reference" + ], + "items": { + "$ref": "stabilityai.json#/components/schemas/TextPrompt/properties/weight" + }, + "minItems": 1, + "title": "Weights", + "type": "array" + }, + "width": { + "$ref": "stabilityai.json#/components/schemas/DiffuseImageWidth", + "description": "The image width", + "instillAcceptFormats": [ + "integer" + ], + "instillUIOrder": 5, + "instillUpstreamTypes": [ + "value", + "reference" + ], + "title": "Width" + } + }, + "required": [ + "prompts", + "engine" + ], + "title": "Input", + "type": "object" + }, + "output": { + "additionalProperties": false, + "description": "Output", + "instillEditOnNodeFields": [ + "images", + "seeds" + ], + "instillUIOrder": 0, + "properties": { + "images": { + "description": "Generated images", + "instillUIOrder": 0, + "items": { + "instillFormat": "image/png", + "type": "string" + }, + "title": "Images", + "type": "array" + }, + "seeds": { + "description": "Seeds of generated images", + "instillUIOrder": 1, + "items": { + "$ref": "stabilityai.json#/components/schemas/Image/properties/seed", + "instillFormat": "number" + }, + "title": "Seeds", + "type": "array" + } + }, + "required": [ + "images", + "seeds" + ], + "title": "Output", + "type": "object" + } + } +} diff --git a/instill/resources/schema/jsons/start_definitions.json b/instill/resources/schema/jsons/start_definitions.json new file mode 100644 index 0000000..f9b6963 --- /dev/null +++ b/instill/resources/schema/jsons/start_definitions.json @@ -0,0 +1,17 @@ +[ + { + "available_tasks": [ + "TASK_START" + ], + "custom": false, + "documentation_url": "https://www.instill.tech/docs/latest/vdp/operators/op-start", + "icon": "start.svg", + "icon_url": "", + "id": "start", + "public": true, + "spec": {}, + "title": "Start", + "tombstone": false, + "uid": "2ac8be70-0f7a-4b61-a33d-098b8acfa6f3" + } +] diff --git a/instill/resources/schema/jsons/start_task_start_input.json b/instill/resources/schema/jsons/start_task_start_input.json new file mode 100644 index 0000000..289d9d4 --- /dev/null +++ b/instill/resources/schema/jsons/start_task_start_input.json @@ -0,0 +1 @@ +{"description":"Input","instillEditOnNodeFields":[],"instillUIOrder":0,"required":[],"title":"Input","type":"object"} diff --git a/instill/resources/schema/jsons/start_task_start_metadata.json b/instill/resources/schema/jsons/start_task_start_metadata.json new file mode 100644 index 0000000..dded90b --- /dev/null +++ b/instill/resources/schema/jsons/start_task_start_metadata.json @@ -0,0 +1 @@ +{"additionalProperties":false,"patternProperties":{"^[a-z_][-a-z_0-9]{0,31}$":{"properties":{"description":{"type":"string"},"instillFormat":{"type":"string"},"items":{"properties":{"instillFormat":{"type":"string"},"type":{"type":"string"}},"required":["type","instillFormat"],"type":"object"},"title":{"type":"string"},"type":{"type":"string"}},"required":["type","instillFormat"],"type":"object"}},"type":"object"} diff --git a/instill/resources/schema/jsons/start_task_start_output.json b/instill/resources/schema/jsons/start_task_start_output.json new file mode 100644 index 0000000..8f98762 --- /dev/null +++ b/instill/resources/schema/jsons/start_task_start_output.json @@ -0,0 +1 @@ +{"description":"Output","instillEditOnNodeFields":[],"instillUIOrder":0,"required":[],"title":"Output","type":"object"} diff --git a/instill/resources/schema/jsons/start_tasks.json b/instill/resources/schema/jsons/start_tasks.json new file mode 100644 index 0000000..b50f18e --- /dev/null +++ b/instill/resources/schema/jsons/start_tasks.json @@ -0,0 +1,62 @@ +{ + "TASK_START": { + "input": { + "description": "Input", + "instillEditOnNodeFields": [], + "instillUIOrder": 0, + "required": [], + "title": "Input", + "type": "object" + }, + "metadata": { + "additionalProperties": false, + "patternProperties": { + "^[a-z_][-a-z_0-9]{0,31}$": { + "properties": { + "description": { + "type": "string" + }, + "instillFormat": { + "type": "string" + }, + "items": { + "properties": { + "instillFormat": { + "type": "string" + }, + "type": { + "type": "string" + } + }, + "required": [ + "type", + "instillFormat" + ], + "type": "object" + }, + "title": { + "type": "string" + }, + "type": { + "type": "string" + } + }, + "required": [ + "type", + "instillFormat" + ], + "type": "object" + } + }, + "type": "object" + }, + "output": { + "description": "Output", + "instillEditOnNodeFields": [], + "instillUIOrder": 0, + "required": [], + "title": "Output", + "type": "object" + } + } +} diff --git a/instill/resources/schema/jsons/text_definitions.json b/instill/resources/schema/jsons/text_definitions.json new file mode 100644 index 0000000..3693c37 --- /dev/null +++ b/instill/resources/schema/jsons/text_definitions.json @@ -0,0 +1,17 @@ +[ + { + "available_tasks": [ + "TASK_CONVERT_TO_TEXT", + "TASK_SPLIT_BY_TOKEN" + ], + "custom": false, + "documentation_url": "https://www.instill.tech/docs/latest/vdp/operators/text", + "icon": "text.svg", + "icon_url": "", + "id": "text", + "public": true, + "spec": {}, + "title": "Text", + "uid": "5b7aca5b-1ae3-477f-bf60-d34e1c993c87" + } +] diff --git a/instill/resources/schema/jsons/text_task_convert_to_text_input.json b/instill/resources/schema/jsons/text_task_convert_to_text_input.json new file mode 100644 index 0000000..055357b --- /dev/null +++ b/instill/resources/schema/jsons/text_task_convert_to_text_input.json @@ -0,0 +1 @@ +{"description":"Input","instillEditOnNodeFields":["doc"],"instillUIOrder":0,"properties":{"doc":{"description":"Base64 encoded document (PDF, DOC, DOCX, XML, HTML, RTF, etc.) to be converted to plain text","instillAcceptFormats":["*/*"],"instillUIMultiline":true,"instillUIOrder":0,"instillUpstreamTypes":["reference"],"title":"Document","type":"string"}},"required":["doc"],"title":"Input","type":"object"} diff --git a/instill/resources/schema/jsons/text_task_convert_to_text_output.json b/instill/resources/schema/jsons/text_task_convert_to_text_output.json new file mode 100644 index 0000000..f9e3b7f --- /dev/null +++ b/instill/resources/schema/jsons/text_task_convert_to_text_output.json @@ -0,0 +1 @@ +{"description":"Output","instillUIOrder":0,"properties":{"body":{"description":"Plain text converted from the document","instillFormat":"string","instillUIMultiline":true,"instillUIOrder":0,"title":"Body","type":"string"},"error":{"description":"Error message if any during the conversion process","instillFormat":"string","instillUIMultiline":true,"instillUIOrder":3,"title":"Error","type":"string"},"meta":{"description":"Metadata extracted from the document","instillFormat":"semi-structured/object","instillUIOrder":1,"required":[],"title":"Meta","type":"object"},"msecs":{"description":"Time taken to convert the document","instillFormat":"number","instillUIOrder":2,"title":"MSecs","type":"number"}},"required":["body","meta","msecs","error"],"title":"Output","type":"object"} diff --git a/instill/resources/schema/jsons/text_task_split_by_token_input.json b/instill/resources/schema/jsons/text_task_split_by_token_input.json new file mode 100644 index 0000000..d800c2c --- /dev/null +++ b/instill/resources/schema/jsons/text_task_split_by_token_input.json @@ -0,0 +1 @@ +{"description":"Input","instillEditOnNodeFields":["text"],"instillUIOrder":0,"properties":{"chunk_token_size":{"default":500,"description":"Number of tokens per text chunk","instillAcceptFormats":["integer"],"instillUIOrder":2,"instillUpstreamTypes":["value","reference"],"minimum":1,"title":"Chunk Token Size","type":"integer"},"model":{"description":"ID of the model to use 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"],"instillAcceptFormats":["string"],"instillUIOrder":1,"instillUpstreamTypes":["value","reference","template"],"title":"Model","type":"string"},"text":{"description":"Text to be split","instillAcceptFormats":["string"],"instillUIMultiline":true,"instillUIOrder":0,"instillUpstreamTypes":["value","reference","template"],"title":"Text","type":"string"}},"required":["text","model"],"title":"Input","type":"object"} diff --git a/instill/resources/schema/jsons/text_task_split_by_token_output.json b/instill/resources/schema/jsons/text_task_split_by_token_output.json new file mode 100644 index 0000000..33e6754 --- /dev/null +++ b/instill/resources/schema/jsons/text_task_split_by_token_output.json @@ -0,0 +1 @@ +{"description":"Output","instillEditOnNodeFields":["texts"],"instillUIOrder":0,"properties":{"chunk_num":{"description":"Total number of output text chunks","instillUIOrder":2,"title":"Number of Text Chunks","type":"integer"},"text_chunks":{"description":"Text chunks after splitting","instillUIOrder":1,"items":{"instillFormat":"string","instillMultiline":true,"instillUIMultiline":true,"type":"string"},"title":"Text Chunks","type":"array"},"token_count":{"description":"Total count of tokens in the input text","instillUIOrder":0,"title":"Token Count","type":"integer"}},"required":["token_count","text_chunks","chunk_num"],"title":"Output","type":"object"} diff --git a/instill/resources/schema/jsons/text_tasks.json b/instill/resources/schema/jsons/text_tasks.json new file mode 100644 index 0000000..807cf02 --- /dev/null +++ b/instill/resources/schema/jsons/text_tasks.json @@ -0,0 +1,211 @@ +{ + "TASK_CONVERT_TO_TEXT": { + "input": { + "description": "Input", + "instillEditOnNodeFields": [ + "doc" + ], + "instillUIOrder": 0, + "properties": { + "doc": { + "description": "Base64 encoded document (PDF, DOC, DOCX, XML, HTML, RTF, etc.) to be converted to plain text", + "instillAcceptFormats": [ + "*/*" + ], + "instillUIMultiline": true, + "instillUIOrder": 0, + "instillUpstreamTypes": [ + "reference" + ], + "title": "Document", + "type": "string" + } + }, + "required": [ + "doc" + ], + "title": "Input", + "type": "object" + }, + "output": { + "description": "Output", + "instillUIOrder": 0, + "properties": { + "body": { + "description": "Plain text converted from the document", + "instillFormat": "string", + "instillUIMultiline": true, + "instillUIOrder": 0, + "title": "Body", + "type": "string" + }, + "error": { + "description": "Error message if any during the conversion process", + "instillFormat": "string", + "instillUIMultiline": true, + "instillUIOrder": 3, + "title": "Error", + "type": "string" + }, + "meta": { + "description": "Metadata extracted from the document", + "instillFormat": "semi-structured/object", + "instillUIOrder": 1, + "required": [], + "title": "Meta", + "type": "object" + }, + "msecs": { + "description": "Time taken to convert the document", + "instillFormat": "number", + "instillUIOrder": 2, + "title": "MSecs", + "type": "number" + } + }, + "required": [ + "body", + "meta", + "msecs", + "error" + ], + "title": "Output", + "type": "object" + } + }, + "TASK_SPLIT_BY_TOKEN": { + "input": { + "description": "Input", + "instillEditOnNodeFields": [ + "text" + ], + "instillUIOrder": 0, + "properties": { + "chunk_token_size": { + "default": 500, + "description": "Number of tokens per text chunk", + "instillAcceptFormats": [ + "integer" + ], + "instillUIOrder": 2, + "instillUpstreamTypes": [ + "value", + "reference" + ], + "minimum": 1, + "title": "Chunk Token Size", + "type": "integer" + }, + "model": { + "description": "ID of the model to use 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" + ], + "instillAcceptFormats": [ + "string" + ], + "instillUIOrder": 1, + "instillUpstreamTypes": [ + "value", + "reference", + "template" + ], + "title": "Model", + "type": "string" + }, + "text": { + "description": "Text to be split", + "instillAcceptFormats": [ + "string" + ], + "instillUIMultiline": true, + "instillUIOrder": 0, + "instillUpstreamTypes": [ + "value", + "reference", + "template" + ], + "title": "Text", + "type": "string" + } + }, + "required": [ + "text", + "model" + ], + "title": "Input", + "type": "object" + }, + "output": { + "description": "Output", + "instillEditOnNodeFields": [ + "texts" + ], + "instillUIOrder": 0, + "properties": { + "chunk_num": { + "description": "Total number of output text chunks", + "instillUIOrder": 2, + "title": "Number of Text Chunks", + "type": "integer" + }, + "text_chunks": { + "description": "Text chunks after splitting", + "instillUIOrder": 1, + "items": { + "instillFormat": "string", + "instillMultiline": true, + "instillUIMultiline": true, + "type": "string" + }, + "title": "Text Chunks", + "type": "array" + }, + "token_count": { + "description": "Total count of tokens in the input text", + "instillUIOrder": 0, + "title": "Token Count", + "type": "integer" + } + }, + "required": [ + "token_count", + "text_chunks", + "chunk_num" + ], + "title": "Output", + "type": "object" + } + } +} diff --git a/instill/resources/schema/jsons/website_definitions.json b/instill/resources/schema/jsons/website_definitions.json new file mode 100644 index 0000000..f1c2392 --- /dev/null +++ b/instill/resources/schema/jsons/website_definitions.json @@ -0,0 +1 @@ +{ "$schema": "http://json-schema.org/draft-07/schema#", "additionalProperties": true, "properties": {}, "required": [], "title": "Website Connector Resource", "type": "object" } diff --git a/instill/resources/schema/jsons/website_task_scrape_website_input.json b/instill/resources/schema/jsons/website_task_scrape_website_input.json new file mode 100644 index 0000000..b8307b6 --- /dev/null +++ b/instill/resources/schema/jsons/website_task_scrape_website_input.json @@ -0,0 +1 @@ +{"instillUIOrder":0,"properties":{"allowed_domains":{"description":"A list of domains that are allowed to be scraped. If empty, all domains are allowed.","instillAcceptFormats":["array:string"],"instillUIOrder":1,"instillUpstreamTypes":["value","reference"],"items":{"type":"string"},"title":"Allowed Domains","type":"array"},"include_link_html":{"default":false,"description":"Indicate whether to scrape the link and include the raw HTML of the link associated with this page in the 'link_html' field","instillAcceptFormats":["boolean"],"instillUIOrder":4,"instillUpstreamTypes":["value","reference"],"title":"Include Link HTML","type":"boolean"},"include_link_text":{"default":false,"description":"Indicate whether to scrape the link and include the text of the link associated with this page in the 'link_text' field","instillAcceptFormats":["boolean"],"instillUIOrder":3,"instillUpstreamTypes":["value","reference"],"title":"Include Link Text","type":"boolean"},"max_k":{"default":10,"description":"The max number of pages to return. If the number is set to 0, all pages will be returned. If the number is set to a positive integer, at most max k pages will be returned.","instillAcceptFormats":["integer"],"instillUIOrder":2,"instillUpstreamTypes":["value","reference"],"maximum":100,"minimum":0,"title":"Max Number of Pages","type":"integer"},"target_url":{"description":"The root URL to scrape. All links on this page will be scraped, and all links on those pages, and so on.","instillAcceptFormats":["string"],"instillUIMultiline":true,"instillUIOrder":0,"instillUpstreamTypes":["value","reference","template"],"title":"Query","type":"string"}},"required":["target_url","max_k"],"title":"Input","type":"object","$defs":{"page_info":{"properties":{"link":{"description":"The full URL to which the webpage link is pointing, e.g., http://www.example.com/foo/bar.","instillFormat":"string","instillUIOrder":0,"title":"Link","type":"string"},"link_html":{"description":"The scraped raw html of the link associated with this webpage link","instillFormat":"string","instillUIMultiline":true,"instillUIOrder":3,"title":"Link HTML","type":"string"},"link_text":{"description":"The scraped text of the link associated with this webpage link, in plain text","instillFormat":"string","instillUIMultiline":true,"instillUIOrder":2,"title":"Link Text","type":"string"},"title":{"description":"The title of a webpage link, in plain text","instillFormat":"string","instillUIMultiline":true,"instillUIOrder":1,"title":"Title","type":"string"}},"required":["link"],"title":"Page Information","type":"object"}}} diff --git a/instill/resources/schema/jsons/website_task_scrape_website_output.json b/instill/resources/schema/jsons/website_task_scrape_website_output.json new file mode 100644 index 0000000..ce1f62c --- /dev/null +++ b/instill/resources/schema/jsons/website_task_scrape_website_output.json @@ -0,0 +1 @@ +{"instillUIOrder":0,"properties":{"pages":{"description":"The scraped webpages","instillUIOrder":0,"items":{"$ref":"#/$defs/page_info"},"title":"Pages","type":"array"}},"required":["pages"],"title":"Output","type":"object","$defs":{"page_info":{"properties":{"link":{"description":"The full URL to which the webpage link is pointing, e.g., http://www.example.com/foo/bar.","instillFormat":"string","instillUIOrder":0,"title":"Link","type":"string"},"link_html":{"description":"The scraped raw html of the link associated with this webpage link","instillFormat":"string","instillUIMultiline":true,"instillUIOrder":3,"title":"Link HTML","type":"string"},"link_text":{"description":"The scraped text of the link associated with this webpage link, in plain text","instillFormat":"string","instillUIMultiline":true,"instillUIOrder":2,"title":"Link Text","type":"string"},"title":{"description":"The title of a webpage link, in plain text","instillFormat":"string","instillUIMultiline":true,"instillUIOrder":1,"title":"Title","type":"string"}},"required":["link"],"title":"Page Information","type":"object"}}} diff --git a/instill/resources/schema/jsons/website_tasks.json b/instill/resources/schema/jsons/website_tasks.json new file mode 100644 index 0000000..62c67b3 --- /dev/null +++ b/instill/resources/schema/jsons/website_tasks.json @@ -0,0 +1,151 @@ +{ + "$defs": { + "page_info": { + "properties": { + "link": { + "description": "The full URL to which the webpage link is pointing, e.g., http://www.example.com/foo/bar.", + "instillFormat": "string", + "instillUIOrder": 0, + "title": "Link", + "type": "string" + }, + "link_html": { + "description": "The scraped raw html of the link associated with this webpage link", + "instillFormat": "string", + "instillUIMultiline": true, + "instillUIOrder": 3, + "title": "Link HTML", + "type": "string" + }, + "link_text": { + "description": "The scraped text of the link associated with this webpage link, in plain text", + "instillFormat": "string", + "instillUIMultiline": true, + "instillUIOrder": 2, + "title": "Link Text", + "type": "string" + }, + "title": { + "description": "The title of a webpage link, in plain text", + "instillFormat": "string", + "instillUIMultiline": true, + "instillUIOrder": 1, + "title": "Title", + "type": "string" + } + }, + "required": [ + "link" + ], + "title": "Page Information", + "type": "object" + } + }, + "TASK_SCRAPE_WEBSITE": { + "input": { + "instillUIOrder": 0, + "properties": { + "allowed_domains": { + "description": "A list of domains that are allowed to be scraped. If empty, all domains are allowed.", + "instillAcceptFormats": [ + "array:string" + ], + "instillUIOrder": 1, + "instillUpstreamTypes": [ + "value", + "reference" + ], + "items": { + "type": "string" + }, + "title": "Allowed Domains", + "type": "array" + }, + "include_link_html": { + "default": false, + "description": "Indicate whether to scrape the link and include the raw HTML of the link associated with this page in the 'link_html' field", + "instillAcceptFormats": [ + "boolean" + ], + "instillUIOrder": 4, + "instillUpstreamTypes": [ + "value", + "reference" + ], + "title": "Include Link HTML", + "type": "boolean" + }, + "include_link_text": { + "default": false, + "description": "Indicate whether to scrape the link and include the text of the link associated with this page in the 'link_text' field", + "instillAcceptFormats": [ + "boolean" + ], + "instillUIOrder": 3, + "instillUpstreamTypes": [ + "value", + "reference" + ], + "title": "Include Link Text", + "type": "boolean" + }, + "max_k": { + "default": 10, + "description": "The max number of pages to return. If the number is set to 0, all pages will be returned. If the number is set to a positive integer, at most max k pages will be returned.", + "instillAcceptFormats": [ + "integer" + ], + "instillUIOrder": 2, + "instillUpstreamTypes": [ + "value", + "reference" + ], + "maximum": 100, + "minimum": 0, + "title": "Max Number of Pages", + "type": "integer" + }, + "target_url": { + "description": "The root URL to scrape. All links on this page will be scraped, and all links on those pages, and so on.", + "instillAcceptFormats": [ + "string" + ], + "instillUIMultiline": true, + "instillUIOrder": 0, + "instillUpstreamTypes": [ + "value", + "reference", + "template" + ], + "title": "Query", + "type": "string" + } + }, + "required": [ + "target_url", + "max_k" + ], + "title": "Input", + "type": "object" + }, + "output": { + "instillUIOrder": 0, + "properties": { + "pages": { + "description": "The scraped webpages", + "instillUIOrder": 0, + "items": { + "$ref": "#/$defs/page_info" + }, + "title": "Pages", + "type": "array" + } + }, + "required": [ + "pages" + ], + "title": "Output", + "type": "object" + } + } +} diff --git a/instill/resources/schema/numbers.py b/instill/resources/schema/numbers.py new file mode 100644 index 0000000..763813a --- /dev/null +++ b/instill/resources/schema/numbers.py @@ -0,0 +1,11 @@ +# generated by datamodel-codegen: +# filename: numbers_definitions.json + +from __future__ import annotations + +from dataclasses import dataclass + + +@dataclass +class NumbersProtocolBlockchainConnectorSpec: + capture_token: str diff --git a/instill/resources/schema/openai.py b/instill/resources/schema/openai.py new file mode 100644 index 0000000..0f6628d --- /dev/null +++ b/instill/resources/schema/openai.py @@ -0,0 +1,13 @@ +# generated by datamodel-codegen: +# filename: openai_definitions.json + +from __future__ import annotations + +from dataclasses import dataclass +from typing import Optional + + +@dataclass +class OpenAIConnectorResource: + api_key: str + organization: Optional[str] diff --git a/instill/resources/schema/openai_task_speech_recognition_input.py b/instill/resources/schema/openai_task_speech_recognition_input.py new file mode 100644 index 0000000..4dc605c --- /dev/null +++ b/instill/resources/schema/openai_task_speech_recognition_input.py @@ -0,0 +1,43 @@ +# generated by datamodel-codegen: +# filename: openai_task_speech_recognition_input.json + +from __future__ import annotations + +from dataclasses import dataclass +from enum import Enum +from typing import Optional + +File = bytes + + +Language = str + + +class Model(Enum): + """ + ID of the model to use. Only `whisper-1` is currently available. + + """ + + whisper_1 = 'whisper-1' + + +Prompt = str + + +Temperature = float + + +@dataclass +class ChatMessage: + content: str + role: str + + +@dataclass +class Input: + audio: File + language: Optional[Language] + model: Model + prompt: Optional[Prompt] + temperature: Optional[Temperature] diff --git a/instill/resources/schema/openai_task_speech_recognition_output.py b/instill/resources/schema/openai_task_speech_recognition_output.py new file mode 100644 index 0000000..b87d393 --- /dev/null +++ b/instill/resources/schema/openai_task_speech_recognition_output.py @@ -0,0 +1,19 @@ +# generated by datamodel-codegen: +# filename: openai_task_speech_recognition_output.json + +from __future__ import annotations + +from dataclasses import dataclass + +Text = str + + +@dataclass +class ChatMessage: + content: str + role: str + + +@dataclass +class Output: + text: Text diff --git a/instill/resources/schema/openai_task_text_embeddings_input.py b/instill/resources/schema/openai_task_text_embeddings_input.py new file mode 100644 index 0000000..ebd7ce9 --- /dev/null +++ b/instill/resources/schema/openai_task_text_embeddings_input.py @@ -0,0 +1,28 @@ +# generated by datamodel-codegen: +# filename: openai_task_text_embeddings_input.json + +from __future__ import annotations + +from dataclasses import dataclass +from enum import Enum + + +class Model(Enum): + """ + ID of the model to use. You can use the [List models](/docs/api-reference/models/list) API to see all of your available models, or see our [Model overview](/docs/models/overview) for descriptions of them. + + """ + + text_embedding_ada_002 = 'text-embedding-ada-002' + + +@dataclass +class ChatMessage: + content: str + role: str + + +@dataclass +class Input: + model: Model + text: str diff --git a/instill/resources/schema/openai_task_text_embeddings_output.py b/instill/resources/schema/openai_task_text_embeddings_output.py new file mode 100644 index 0000000..f70ef13 --- /dev/null +++ b/instill/resources/schema/openai_task_text_embeddings_output.py @@ -0,0 +1,26 @@ +# generated by datamodel-codegen: +# filename: openai_task_text_embeddings_output.json + +from __future__ import annotations + +from dataclasses import dataclass +from typing import Any, List + +Embedding = List[float] + + +UpstreamValue = str + + +InstillTypes = Any + + +@dataclass +class ChatMessage: + content: str + role: str + + +@dataclass +class Output: + embedding: Embedding diff --git a/instill/resources/schema/openai_task_text_to_image_input.py b/instill/resources/schema/openai_task_text_to_image_input.py new file mode 100644 index 0000000..8807f5d --- /dev/null +++ b/instill/resources/schema/openai_task_text_to_image_input.py @@ -0,0 +1,69 @@ +# generated by datamodel-codegen: +# filename: openai_task_text_to_image_input.json + +from __future__ import annotations + +from dataclasses import dataclass +from enum import Enum +from typing import Optional + + +class Model(Enum): + """ + The model to use for image generation. + """ + + dall_e_2 = 'dall-e-2' + dall_e_3 = 'dall-e-3' + + +N = Optional[int] + + +Prompt = str + + +class Quality(Enum): + """ + 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`. + """ + + standard = 'standard' + hd = 'hd' + + +class Size(Enum): + """ + 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. + """ + + field_256x256 = '256x256' + field_512x512 = '512x512' + field_1024x1024 = '1024x1024' + field_1792x1024 = '1792x1024' + field_1024x1792 = '1024x1792' + + +class Style(Enum): + """ + 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`. + """ + + vivid = 'vivid' + natural = 'natural' + + +@dataclass +class ChatMessage: + content: str + role: str + + +@dataclass +class Input: + model: Model + n: Optional[N] + prompt: Prompt + quality: Optional[Quality] = Quality.standard + size: Optional[Size] = Size.field_1024x1024 + style: Optional[Style] = Style.vivid diff --git a/instill/resources/schema/openai_task_text_to_image_output.py b/instill/resources/schema/openai_task_text_to_image_output.py new file mode 100644 index 0000000..479eadd --- /dev/null +++ b/instill/resources/schema/openai_task_text_to_image_output.py @@ -0,0 +1,28 @@ +# generated by datamodel-codegen: +# filename: openai_task_text_to_image_output.json + +from __future__ import annotations + +from dataclasses import dataclass +from typing import List + + +@dataclass +class Image: + """ + Generated result + """ + + image: str + revised_prompt: str + + +@dataclass +class Output: + results: List[Image] + + +@dataclass +class ChatMessage: + content: str + role: str diff --git a/instill/resources/schema/openai_task_text_to_speech_input.py b/instill/resources/schema/openai_task_text_to_speech_input.py new file mode 100644 index 0000000..7167722 --- /dev/null +++ b/instill/resources/schema/openai_task_text_to_speech_input.py @@ -0,0 +1,66 @@ +# generated by datamodel-codegen: +# filename: openai_task_text_to_speech_input.json + +from __future__ import annotations + +from dataclasses import dataclass +from enum import Enum +from typing import Optional, Union + + +class Model1(Enum): + """ + One of the available [TTS models](/docs/models/tts): `tts-1` or `tts-1-hd` + + """ + + tts_1 = 'tts-1' + tts_1_hd = 'tts-1-hd' + + +Model = Union[str, Model1] + + +class ResponseFormat(Enum): + """ + The format to audio in. Supported formats are `mp3`, `opus`, `aac`, and `flac`. + """ + + mp3 = 'mp3' + opus = 'opus' + aac = 'aac' + flac = 'flac' + + +Speed = float + + +Input = str + + +class Voice(Enum): + """ + The voice to use when generating the audio. Supported voices are `alloy`, `echo`, `fable`, `onyx`, `nova`, and `shimmer`. + """ + + alloy = 'alloy' + echo = 'echo' + fable = 'fable' + onyx = 'onyx' + nova = 'nova' + shimmer = 'shimmer' + + +@dataclass +class ChatMessage: + content: str + role: str + + +@dataclass +class InputModel: + model: Model + response_format: Optional[ResponseFormat] = ResponseFormat.mp3 + speed: Optional[Speed] + text: Input + voice: Voice diff --git a/instill/resources/schema/openai_task_text_to_speech_output.py b/instill/resources/schema/openai_task_text_to_speech_output.py new file mode 100644 index 0000000..7c589c9 --- /dev/null +++ b/instill/resources/schema/openai_task_text_to_speech_output.py @@ -0,0 +1,18 @@ +# generated by datamodel-codegen: +# filename: openai_task_text_to_speech_output.json + +from __future__ import annotations + +from dataclasses import dataclass +from typing import Optional + + +@dataclass +class Output: + audio: Optional[str] + + +@dataclass +class ChatMessage: + content: str + role: str diff --git a/instill/resources/schema/pinecone.py b/instill/resources/schema/pinecone.py new file mode 100644 index 0000000..6b61c59 --- /dev/null +++ b/instill/resources/schema/pinecone.py @@ -0,0 +1,12 @@ +# generated by datamodel-codegen: +# filename: pinecone_definitions.json + +from __future__ import annotations + +from dataclasses import dataclass + + +@dataclass +class PineconeConnectorSpec: + api_key: str + url: str diff --git a/instill/resources/schema/pinecone_task_query_input.py b/instill/resources/schema/pinecone_task_query_input.py new file mode 100644 index 0000000..ba60546 --- /dev/null +++ b/instill/resources/schema/pinecone_task_query_input.py @@ -0,0 +1,18 @@ +# generated by datamodel-codegen: +# filename: pinecone_task_query_input.json + +from __future__ import annotations + +from dataclasses import dataclass +from typing import Any, Dict, List, Optional + + +@dataclass +class Input: + id: Optional[str] + namespace: Optional[str] + vector: List[float] + filter: Optional[Dict[str, Any]] + top_k: int + include_values: Optional[bool] = False + include_metadata: Optional[bool] = False diff --git a/instill/resources/schema/pinecone_task_query_output.py b/instill/resources/schema/pinecone_task_query_output.py new file mode 100644 index 0000000..0e52ab3 --- /dev/null +++ b/instill/resources/schema/pinecone_task_query_output.py @@ -0,0 +1,21 @@ +# generated by datamodel-codegen: +# filename: pinecone_task_query_output.json + +from __future__ import annotations + +from dataclasses import dataclass +from typing import Any, Dict, List, Optional + + +@dataclass +class Match: + id: str + metadata: Optional[Dict[str, Any]] + score: float + values: Optional[List[float]] + + +@dataclass +class Output: + matches: List[Match] + namespace: str diff --git a/instill/resources/schema/pinecone_task_upsert_input.py b/instill/resources/schema/pinecone_task_upsert_input.py new file mode 100644 index 0000000..5d6f6ee --- /dev/null +++ b/instill/resources/schema/pinecone_task_upsert_input.py @@ -0,0 +1,14 @@ +# generated by datamodel-codegen: +# filename: pinecone_task_upsert_input.json + +from __future__ import annotations + +from dataclasses import dataclass +from typing import Any, Dict, List, Optional + + +@dataclass +class Input: + id: str + values: List[float] + metadata: Optional[Dict[str, Any]] diff --git a/instill/resources/schema/pinecone_task_upsert_output.py b/instill/resources/schema/pinecone_task_upsert_output.py new file mode 100644 index 0000000..136bc40 --- /dev/null +++ b/instill/resources/schema/pinecone_task_upsert_output.py @@ -0,0 +1,11 @@ +# generated by datamodel-codegen: +# filename: pinecone_task_upsert_output.json + +from __future__ import annotations + +from dataclasses import dataclass + + +@dataclass +class Output: + upserted_count: int diff --git a/instill/resources/schema/redis.py b/instill/resources/schema/redis.py new file mode 100644 index 0000000..13393ca --- /dev/null +++ b/instill/resources/schema/redis.py @@ -0,0 +1,55 @@ +# generated by datamodel-codegen: +# filename: redis_definitions.json + +from __future__ import annotations + +from dataclasses import dataclass +from enum import Enum +from typing import Optional, Union + + +class DisableSSL(Enum): + """ + Disable SSL mode + """ + + disable = 'disable' + + +@dataclass +class DisableSSLMode: + """ + Disable SSL mode. + """ + + mode: DisableSSL + + +class Enable(Enum): + """ + Verify-full SSL mode. Always require encryption and verifies the identity of the server. + """ + + verify_full = 'verify-full' + + +@dataclass +class VerifyFullSSLMode: + """ + Verify-full SSL mode. Always require encryption and verifies the identity of the server. + """ + + ca_cert: str + client_cert: str + client_key: str + mode: Enable + + +@dataclass +class RedisConnectorResource: + host: str + password: Optional[str] + port: int + ssl_mode: Optional[Union[DisableSSLMode, VerifyFullSSLMode]] + username: Optional[str] + ssl: Optional[bool] = False diff --git a/instill/resources/schema/redis_task_chat_history_retrieve_input.py b/instill/resources/schema/redis_task_chat_history_retrieve_input.py new file mode 100644 index 0000000..7d84e3e --- /dev/null +++ b/instill/resources/schema/redis_task_chat_history_retrieve_input.py @@ -0,0 +1,21 @@ +# generated by datamodel-codegen: +# filename: redis_task_chat_history_retrieve_input.json + +from __future__ import annotations + +from dataclasses import dataclass +from typing import Any, Dict, Optional + + +@dataclass +class Input: + session_id: str + include_system_message: Optional[bool] = True + latest_k: Optional[int] = 5 + + +@dataclass +class Message: + content: str + metadata: Optional[Dict[str, Any]] + role: str diff --git a/instill/resources/schema/redis_task_chat_history_retrieve_output.py b/instill/resources/schema/redis_task_chat_history_retrieve_output.py new file mode 100644 index 0000000..bc85b09 --- /dev/null +++ b/instill/resources/schema/redis_task_chat_history_retrieve_output.py @@ -0,0 +1,19 @@ +# generated by datamodel-codegen: +# filename: redis_task_chat_history_retrieve_output.json + +from __future__ import annotations + +from dataclasses import dataclass +from typing import Any, Dict, List, Optional + + +@dataclass +class Message: + content: str + metadata: Optional[Dict[str, Any]] + role: str + + +@dataclass +class Output: + messages: List[Message] diff --git a/instill/resources/schema/redis_task_chat_message_write_input.py b/instill/resources/schema/redis_task_chat_message_write_input.py new file mode 100644 index 0000000..340828d --- /dev/null +++ b/instill/resources/schema/redis_task_chat_message_write_input.py @@ -0,0 +1,22 @@ +# generated by datamodel-codegen: +# filename: redis_task_chat_message_write_input.json + +from __future__ import annotations + +from dataclasses import dataclass +from typing import Any, Dict, Optional + + +@dataclass +class Input: + content: str + metadata: Optional[Dict[str, Any]] + role: str + session_id: str + + +@dataclass +class Message: + content: str + metadata: Optional[Dict[str, Any]] + role: str diff --git a/instill/resources/schema/redis_task_chat_message_write_output.py b/instill/resources/schema/redis_task_chat_message_write_output.py new file mode 100644 index 0000000..0c3c9fb --- /dev/null +++ b/instill/resources/schema/redis_task_chat_message_write_output.py @@ -0,0 +1,19 @@ +# generated by datamodel-codegen: +# filename: redis_task_chat_message_write_output.json + +from __future__ import annotations + +from dataclasses import dataclass +from typing import Any, Dict, Optional + + +@dataclass +class Output: + status: bool + + +@dataclass +class Message: + content: str + metadata: Optional[Dict[str, Any]] + role: str diff --git a/instill/resources/schema/restapi.py b/instill/resources/schema/restapi.py new file mode 100644 index 0000000..73b4105 --- /dev/null +++ b/instill/resources/schema/restapi.py @@ -0,0 +1,65 @@ +# generated by datamodel-codegen: +# filename: restapi_definitions.json + +from __future__ import annotations + +from dataclasses import dataclass +from enum import Enum +from typing import Union + + +@dataclass +class NoAuth: + """ + Authentication method to use for the REST API + """ + + auth_type: str + + +@dataclass +class BasicAuth: + """ + Authentication method to use for the REST API + """ + + auth_type: str + password: str + username: str + + +class WhereToAddAPIKeyTo(Enum): + """ + Add the API key to the header or query params + """ + + header = 'header' + query = 'query' + + +@dataclass +class APIKey: + """ + Authentication method to use for the REST API + """ + + auth_location: WhereToAddAPIKeyTo + auth_type: str + key: str + value: str + + +@dataclass +class BearerToken: + """ + Authentication method to use for the REST API + """ + + auth_type: str + token: str + + +@dataclass +class RESTAPIConnectorSpec: + authentication: Union[NoAuth, BasicAuth, APIKey, BearerToken] + base_url: str diff --git a/instill/resources/schema/restapi_task_delete_input.py b/instill/resources/schema/restapi_task_delete_input.py new file mode 100644 index 0000000..ad218b4 --- /dev/null +++ b/instill/resources/schema/restapi_task_delete_input.py @@ -0,0 +1,32 @@ +# generated by datamodel-codegen: +# filename: restapi_task_delete_input.json + +from __future__ import annotations + +from dataclasses import dataclass +from typing import Any, Dict, Optional + + +@dataclass +class Input: + body: Optional[Dict[str, Any]] + endpoint_path: str + + +@dataclass +class Input1: + endpoint_path: str + + +@dataclass +class Output: + """ + The HTTP response from the API + """ + + body: Dict[str, Any] + header: Dict[str, Any] + status_code: int + + +Model = Input diff --git a/instill/resources/schema/restapi_task_delete_output.py b/instill/resources/schema/restapi_task_delete_output.py new file mode 100644 index 0000000..796891c --- /dev/null +++ b/instill/resources/schema/restapi_task_delete_output.py @@ -0,0 +1,32 @@ +# generated by datamodel-codegen: +# filename: restapi_task_delete_output.json + +from __future__ import annotations + +from dataclasses import dataclass +from typing import Any, Dict, Optional + + +@dataclass +class Input: + body: Optional[Dict[str, Any]] + endpoint_path: str + + +@dataclass +class Input1: + endpoint_path: str + + +@dataclass +class Output: + """ + The HTTP response from the API + """ + + body: Dict[str, Any] + header: Dict[str, Any] + status_code: int + + +Model = Output diff --git a/instill/resources/schema/restapi_task_get_input.py b/instill/resources/schema/restapi_task_get_input.py new file mode 100644 index 0000000..0b26d41 --- /dev/null +++ b/instill/resources/schema/restapi_task_get_input.py @@ -0,0 +1,32 @@ +# generated by datamodel-codegen: +# filename: restapi_task_get_input.json + +from __future__ import annotations + +from dataclasses import dataclass +from typing import Any, Dict, Optional + + +@dataclass +class Input: + body: Optional[Dict[str, Any]] + endpoint_path: str + + +@dataclass +class Input1: + endpoint_path: str + + +@dataclass +class Output: + """ + The HTTP response from the API + """ + + body: Dict[str, Any] + header: Dict[str, Any] + status_code: int + + +Model = Input1 diff --git a/instill/resources/schema/restapi_task_get_output.py b/instill/resources/schema/restapi_task_get_output.py new file mode 100644 index 0000000..b0ba770 --- /dev/null +++ b/instill/resources/schema/restapi_task_get_output.py @@ -0,0 +1,32 @@ +# generated by datamodel-codegen: +# filename: restapi_task_get_output.json + +from __future__ import annotations + +from dataclasses import dataclass +from typing import Any, Dict, Optional + + +@dataclass +class Input: + body: Optional[Dict[str, Any]] + endpoint_path: str + + +@dataclass +class Input1: + endpoint_path: str + + +@dataclass +class Output: + """ + The HTTP response from the API + """ + + body: Dict[str, Any] + header: Dict[str, Any] + status_code: int + + +Model = Output diff --git a/instill/resources/schema/restapi_task_head_input.py b/instill/resources/schema/restapi_task_head_input.py new file mode 100644 index 0000000..a5e1b57 --- /dev/null +++ b/instill/resources/schema/restapi_task_head_input.py @@ -0,0 +1,32 @@ +# generated by datamodel-codegen: +# filename: restapi_task_head_input.json + +from __future__ import annotations + +from dataclasses import dataclass +from typing import Any, Dict, Optional + + +@dataclass +class Input: + body: Optional[Dict[str, Any]] + endpoint_path: str + + +@dataclass +class Input1: + endpoint_path: str + + +@dataclass +class Output: + """ + The HTTP response from the API + """ + + body: Dict[str, Any] + header: Dict[str, Any] + status_code: int + + +Model = Input1 diff --git a/instill/resources/schema/restapi_task_head_output.py b/instill/resources/schema/restapi_task_head_output.py new file mode 100644 index 0000000..2cdd7fd --- /dev/null +++ b/instill/resources/schema/restapi_task_head_output.py @@ -0,0 +1,32 @@ +# generated by datamodel-codegen: +# filename: restapi_task_head_output.json + +from __future__ import annotations + +from dataclasses import dataclass +from typing import Any, Dict, Optional + + +@dataclass +class Input: + body: Optional[Dict[str, Any]] + endpoint_path: str + + +@dataclass +class Input1: + endpoint_path: str + + +@dataclass +class Output: + """ + The HTTP response from the API + """ + + body: Dict[str, Any] + header: Dict[str, Any] + status_code: int + + +Model = Output diff --git a/instill/resources/schema/restapi_task_options_input.py b/instill/resources/schema/restapi_task_options_input.py new file mode 100644 index 0000000..585614a --- /dev/null +++ b/instill/resources/schema/restapi_task_options_input.py @@ -0,0 +1,32 @@ +# generated by datamodel-codegen: +# filename: restapi_task_options_input.json + +from __future__ import annotations + +from dataclasses import dataclass +from typing import Any, Dict, Optional + + +@dataclass +class Input: + body: Optional[Dict[str, Any]] + endpoint_path: str + + +@dataclass +class Input1: + endpoint_path: str + + +@dataclass +class Output: + """ + The HTTP response from the API + """ + + body: Dict[str, Any] + header: Dict[str, Any] + status_code: int + + +Model = Input diff --git a/instill/resources/schema/restapi_task_options_output.py b/instill/resources/schema/restapi_task_options_output.py new file mode 100644 index 0000000..da60041 --- /dev/null +++ b/instill/resources/schema/restapi_task_options_output.py @@ -0,0 +1,32 @@ +# generated by datamodel-codegen: +# filename: restapi_task_options_output.json + +from __future__ import annotations + +from dataclasses import dataclass +from typing import Any, Dict, Optional + + +@dataclass +class Input: + body: Optional[Dict[str, Any]] + endpoint_path: str + + +@dataclass +class Input1: + endpoint_path: str + + +@dataclass +class Output: + """ + The HTTP response from the API + """ + + body: Dict[str, Any] + header: Dict[str, Any] + status_code: int + + +Model = Output diff --git a/instill/resources/schema/restapi_task_patch_input.py b/instill/resources/schema/restapi_task_patch_input.py new file mode 100644 index 0000000..34567b4 --- /dev/null +++ b/instill/resources/schema/restapi_task_patch_input.py @@ -0,0 +1,32 @@ +# generated by datamodel-codegen: +# filename: restapi_task_patch_input.json + +from __future__ import annotations + +from dataclasses import dataclass +from typing import Any, Dict, Optional + + +@dataclass +class Input: + body: Optional[Dict[str, Any]] + endpoint_path: str + + +@dataclass +class Input1: + endpoint_path: str + + +@dataclass +class Output: + """ + The HTTP response from the API + """ + + body: Dict[str, Any] + header: Dict[str, Any] + status_code: int + + +Model = Input diff --git a/instill/resources/schema/restapi_task_patch_output.py b/instill/resources/schema/restapi_task_patch_output.py new file mode 100644 index 0000000..a3f1190 --- /dev/null +++ b/instill/resources/schema/restapi_task_patch_output.py @@ -0,0 +1,32 @@ +# generated by datamodel-codegen: +# filename: restapi_task_patch_output.json + +from __future__ import annotations + +from dataclasses import dataclass +from typing import Any, Dict, Optional + + +@dataclass +class Input: + body: Optional[Dict[str, Any]] + endpoint_path: str + + +@dataclass +class Input1: + endpoint_path: str + + +@dataclass +class Output: + """ + The HTTP response from the API + """ + + body: Dict[str, Any] + header: Dict[str, Any] + status_code: int + + +Model = Output diff --git a/instill/resources/schema/restapi_task_post_input.py b/instill/resources/schema/restapi_task_post_input.py new file mode 100644 index 0000000..bbf9e27 --- /dev/null +++ b/instill/resources/schema/restapi_task_post_input.py @@ -0,0 +1,32 @@ +# generated by datamodel-codegen: +# filename: restapi_task_post_input.json + +from __future__ import annotations + +from dataclasses import dataclass +from typing import Any, Dict, Optional + + +@dataclass +class Input: + body: Optional[Dict[str, Any]] + endpoint_path: str + + +@dataclass +class Input1: + endpoint_path: str + + +@dataclass +class Output: + """ + The HTTP response from the API + """ + + body: Dict[str, Any] + header: Dict[str, Any] + status_code: int + + +Model = Input diff --git a/instill/resources/schema/restapi_task_post_output.py b/instill/resources/schema/restapi_task_post_output.py new file mode 100644 index 0000000..e8413fb --- /dev/null +++ b/instill/resources/schema/restapi_task_post_output.py @@ -0,0 +1,32 @@ +# generated by datamodel-codegen: +# filename: restapi_task_post_output.json + +from __future__ import annotations + +from dataclasses import dataclass +from typing import Any, Dict, Optional + + +@dataclass +class Input: + body: Optional[Dict[str, Any]] + endpoint_path: str + + +@dataclass +class Input1: + endpoint_path: str + + +@dataclass +class Output: + """ + The HTTP response from the API + """ + + body: Dict[str, Any] + header: Dict[str, Any] + status_code: int + + +Model = Output diff --git a/instill/resources/schema/restapi_task_put_input.py b/instill/resources/schema/restapi_task_put_input.py new file mode 100644 index 0000000..a117cf2 --- /dev/null +++ b/instill/resources/schema/restapi_task_put_input.py @@ -0,0 +1,32 @@ +# generated by datamodel-codegen: +# filename: restapi_task_put_input.json + +from __future__ import annotations + +from dataclasses import dataclass +from typing import Any, Dict, Optional + + +@dataclass +class Input: + body: Optional[Dict[str, Any]] + endpoint_path: str + + +@dataclass +class Input1: + endpoint_path: str + + +@dataclass +class Output: + """ + The HTTP response from the API + """ + + body: Dict[str, Any] + header: Dict[str, Any] + status_code: int + + +Model = Input diff --git a/instill/resources/schema/restapi_task_put_output.py b/instill/resources/schema/restapi_task_put_output.py new file mode 100644 index 0000000..79b4252 --- /dev/null +++ b/instill/resources/schema/restapi_task_put_output.py @@ -0,0 +1,32 @@ +# generated by datamodel-codegen: +# filename: restapi_task_put_output.json + +from __future__ import annotations + +from dataclasses import dataclass +from typing import Any, Dict, Optional + + +@dataclass +class Input: + body: Optional[Dict[str, Any]] + endpoint_path: str + + +@dataclass +class Input1: + endpoint_path: str + + +@dataclass +class Output: + """ + The HTTP response from the API + """ + + body: Dict[str, Any] + header: Dict[str, Any] + status_code: int + + +Model = Output diff --git a/instill/resources/schema/stabilityai.py b/instill/resources/schema/stabilityai.py new file mode 100644 index 0000000..85e99db --- /dev/null +++ b/instill/resources/schema/stabilityai.py @@ -0,0 +1,11 @@ +# generated by datamodel-codegen: +# filename: stabilityai_definitions.json + +from __future__ import annotations + +from dataclasses import dataclass + + +@dataclass +class StabilityAIConnectorResource: + api_key: str diff --git a/instill/resources/schema/stabilityai_task_image_to_image_input.py b/instill/resources/schema/stabilityai_task_image_to_image_input.py new file mode 100644 index 0000000..fdcc148 --- /dev/null +++ b/instill/resources/schema/stabilityai_task_image_to_image_input.py @@ -0,0 +1,135 @@ +# generated by datamodel-codegen: +# filename: stabilityai_task_image_to_image_input.json + +from __future__ import annotations + +from dataclasses import dataclass +from enum import Enum +from typing import List, Optional + + +class Engine(Enum): + """ + Stability AI Engine (model) to be used. + """ + + stable_diffusion_xl_1024_v1_0 = 'stable-diffusion-xl-1024-v1-0' + stable_diffusion_xl_1024_v0_9 = 'stable-diffusion-xl-1024-v0-9' + stable_diffusion_v1_6 = 'stable-diffusion-v1-6' + esrgan_v1_x2plus = 'esrgan-v1-x2plus' + stable_diffusion_512_v2_1 = 'stable-diffusion-512-v2-1' + stable_diffusion_xl_beta_v2_2_2 = 'stable-diffusion-xl-beta-v2-2-2' + + +CfgScale = float + + +class ClipGuidancePreset(Enum): + FAST_BLUE = 'FAST_BLUE' + FAST_GREEN = 'FAST_GREEN' + NONE = 'NONE' + SIMPLE = 'SIMPLE' + SLOW = 'SLOW' + SLOWER = 'SLOWER' + SLOWEST = 'SLOWEST' + + +InitImageStrength = float + + +InitImage = bytes + + +class InitImageMode(Enum): + """ + Whether to use `image_strength` or `step_schedule_*` to control how much influence the `init_image` has on the result. + """ + + IMAGE_STRENGTH = 'IMAGE_STRENGTH' + STEP_SCHEDULE = 'STEP_SCHEDULE' + + +Text = str + + +class Sampler(Enum): + """ + Which sampler to use for the diffusion process. If this value is omitted we'll automatically select an appropriate sampler for you. + """ + + DDIM = 'DDIM' + DDPM = 'DDPM' + K_DPMPP_2M = 'K_DPMPP_2M' + K_DPMPP_2S_ANCESTRAL = 'K_DPMPP_2S_ANCESTRAL' + K_DPM_2 = 'K_DPM_2' + K_DPM_2_ANCESTRAL = 'K_DPM_2_ANCESTRAL' + K_EULER = 'K_EULER' + K_EULER_ANCESTRAL = 'K_EULER_ANCESTRAL' + K_HEUN = 'K_HEUN' + K_LMS = 'K_LMS' + + +Samples = int + + +Seed = int + + +StepScheduleEnd = float + + +StepScheduleStart = float + + +Steps = int + + +class StylePreset(Enum): + """ + Pass in a style preset to guide the image model towards a particular style. + This list of style presets is subject to change. + """ + + enhance = 'enhance' + anime = 'anime' + photographic = 'photographic' + digital_art = 'digital-art' + comic_book = 'comic-book' + fantasy_art = 'fantasy-art' + line_art = 'line-art' + analog_film = 'analog-film' + neon_punk = 'neon-punk' + isometric = 'isometric' + low_poly = 'low-poly' + origami = 'origami' + modeling_compound = 'modeling-compound' + cinematic = 'cinematic' + field_3d_model = '3d-model' + pixel_art = 'pixel-art' + tile_texture = 'tile-texture' + + +Weight = float + + +@dataclass +class Input: + """ + Input + """ + + cfg_scale: Optional[CfgScale] + clip_guidance_preset: Optional[ClipGuidancePreset] = ClipGuidancePreset.NONE + engine: Engine + image_strength: Optional[InitImageStrength] + init_image: Optional[InitImage] + init_image_mode: Optional[InitImageMode] = InitImageMode.IMAGE_STRENGTH + prompts: List[Text] + sampler: Optional[Sampler] + samples: Optional[Samples] + seed: Optional[Seed] + step_schedule_end: Optional[StepScheduleEnd] + step_schedule_start: Optional[StepScheduleStart] + steps: Optional[Steps] + style_preset: Optional[StylePreset] + weights: Optional[List[Weight]] diff --git a/instill/resources/schema/stabilityai_task_text_to_image_input.py b/instill/resources/schema/stabilityai_task_text_to_image_input.py new file mode 100644 index 0000000..cdff924 --- /dev/null +++ b/instill/resources/schema/stabilityai_task_text_to_image_input.py @@ -0,0 +1,117 @@ +# generated by datamodel-codegen: +# filename: stabilityai_task_text_to_image_input.json + +from __future__ import annotations + +from dataclasses import dataclass +from enum import Enum +from typing import List, Optional + + +class Engine(Enum): + """ + Stability AI Engine (model) to be used. + """ + + stable_diffusion_xl_1024_v1_0 = 'stable-diffusion-xl-1024-v1-0' + stable_diffusion_xl_1024_v0_9 = 'stable-diffusion-xl-1024-v0-9' + stable_diffusion_v1_6 = 'stable-diffusion-v1-6' + esrgan_v1_x2plus = 'esrgan-v1-x2plus' + stable_diffusion_512_v2_1 = 'stable-diffusion-512-v2-1' + stable_diffusion_xl_beta_v2_2_2 = 'stable-diffusion-xl-beta-v2-2-2' + + +CfgScale = float + + +class ClipGuidancePreset(Enum): + FAST_BLUE = 'FAST_BLUE' + FAST_GREEN = 'FAST_GREEN' + NONE = 'NONE' + SIMPLE = 'SIMPLE' + SLOW = 'SLOW' + SLOWER = 'SLOWER' + SLOWEST = 'SLOWEST' + + +DiffuseImageHeight = int + + +Text = str + + +class Sampler(Enum): + """ + Which sampler to use for the diffusion process. If this value is omitted we'll automatically select an appropriate sampler for you. + """ + + DDIM = 'DDIM' + DDPM = 'DDPM' + K_DPMPP_2M = 'K_DPMPP_2M' + K_DPMPP_2S_ANCESTRAL = 'K_DPMPP_2S_ANCESTRAL' + K_DPM_2 = 'K_DPM_2' + K_DPM_2_ANCESTRAL = 'K_DPM_2_ANCESTRAL' + K_EULER = 'K_EULER' + K_EULER_ANCESTRAL = 'K_EULER_ANCESTRAL' + K_HEUN = 'K_HEUN' + K_LMS = 'K_LMS' + + +Samples = int + + +Seed = int + + +Steps = int + + +class StylePreset(Enum): + """ + Pass in a style preset to guide the image model towards a particular style. + This list of style presets is subject to change. + """ + + enhance = 'enhance' + anime = 'anime' + photographic = 'photographic' + digital_art = 'digital-art' + comic_book = 'comic-book' + fantasy_art = 'fantasy-art' + line_art = 'line-art' + analog_film = 'analog-film' + neon_punk = 'neon-punk' + isometric = 'isometric' + low_poly = 'low-poly' + origami = 'origami' + modeling_compound = 'modeling-compound' + cinematic = 'cinematic' + field_3d_model = '3d-model' + pixel_art = 'pixel-art' + tile_texture = 'tile-texture' + + +Weight = float + + +DiffuseImageWidth = int + + +@dataclass +class Input: + """ + Input + """ + + cfg_scale: Optional[CfgScale] + clip_guidance_preset: Optional[ClipGuidancePreset] = ClipGuidancePreset.NONE + engine: Engine + height: Optional[DiffuseImageHeight] + prompts: List[Text] + sampler: Optional[Sampler] + samples: Optional[Samples] + seed: Optional[Seed] + steps: Optional[Steps] + style_preset: Optional[StylePreset] + weights: Optional[List[Weight]] + width: Optional[DiffuseImageWidth] diff --git a/instill/resources/schema/stabilityai_task_text_to_image_output.py b/instill/resources/schema/stabilityai_task_text_to_image_output.py new file mode 100644 index 0000000..f587218 --- /dev/null +++ b/instill/resources/schema/stabilityai_task_text_to_image_output.py @@ -0,0 +1,19 @@ +# generated by datamodel-codegen: +# filename: stabilityai_task_text_to_image_output.json + +from __future__ import annotations + +from dataclasses import dataclass +from typing import List + +Seed = float + + +@dataclass +class Output: + """ + Output + """ + + images: List[str] + seeds: List[Seed] diff --git a/instill/resources/schema/start_task_start_input.py b/instill/resources/schema/start_task_start_input.py new file mode 100644 index 0000000..a134999 --- /dev/null +++ b/instill/resources/schema/start_task_start_input.py @@ -0,0 +1,13 @@ +# generated by datamodel-codegen: +# filename: start_task_start_input.json + +from __future__ import annotations + +from dataclasses import dataclass + + +@dataclass +class Input: + """ + Input + """ diff --git a/instill/resources/schema/start_task_start_metadata.py b/instill/resources/schema/start_task_start_metadata.py new file mode 100644 index 0000000..452f76e --- /dev/null +++ b/instill/resources/schema/start_task_start_metadata.py @@ -0,0 +1,25 @@ +# generated by datamodel-codegen: +# filename: start_task_start_metadata.json + +from __future__ import annotations + +from dataclasses import dataclass +from typing import Dict, Optional + + +@dataclass +class Items: + instillFormat: str + type: str + + +@dataclass +class Model1: + description: Optional[str] + instillFormat: str + items: Optional[Items] + title: Optional[str] + type: str + + +Model = Dict[str, Model1] diff --git a/instill/resources/schema/start_task_start_output.py b/instill/resources/schema/start_task_start_output.py new file mode 100644 index 0000000..384c103 --- /dev/null +++ b/instill/resources/schema/start_task_start_output.py @@ -0,0 +1,13 @@ +# generated by datamodel-codegen: +# filename: start_task_start_output.json + +from __future__ import annotations + +from dataclasses import dataclass + + +@dataclass +class Output: + """ + Output + """ diff --git a/instill/resources/schema/text_task_convert_to_text_input.py b/instill/resources/schema/text_task_convert_to_text_input.py new file mode 100644 index 0000000..9fe3d23 --- /dev/null +++ b/instill/resources/schema/text_task_convert_to_text_input.py @@ -0,0 +1,15 @@ +# generated by datamodel-codegen: +# filename: text_task_convert_to_text_input.json + +from __future__ import annotations + +from dataclasses import dataclass + + +@dataclass +class Input: + """ + Input + """ + + doc: str diff --git a/instill/resources/schema/text_task_convert_to_text_output.py b/instill/resources/schema/text_task_convert_to_text_output.py new file mode 100644 index 0000000..dd45eab --- /dev/null +++ b/instill/resources/schema/text_task_convert_to_text_output.py @@ -0,0 +1,19 @@ +# generated by datamodel-codegen: +# filename: text_task_convert_to_text_output.json + +from __future__ import annotations + +from dataclasses import dataclass +from typing import Any, Dict + + +@dataclass +class Output: + """ + Output + """ + + body: str + error: str + meta: Dict[str, Any] + msecs: float diff --git a/instill/resources/schema/text_task_split_by_token_input.py b/instill/resources/schema/text_task_split_by_token_input.py new file mode 100644 index 0000000..93b24d0 --- /dev/null +++ b/instill/resources/schema/text_task_split_by_token_input.py @@ -0,0 +1,58 @@ +# generated by datamodel-codegen: +# filename: text_task_split_by_token_input.json + +from __future__ import annotations + +from dataclasses import dataclass +from enum import Enum +from typing import Optional + + +class Model(Enum): + """ + ID of the model to use for tokenization + """ + + gpt_4 = 'gpt-4' + gpt_3_5_turbo = 'gpt-3.5-turbo' + text_davinci_003 = 'text-davinci-003' + text_davinci_002 = 'text-davinci-002' + text_davinci_001 = 'text-davinci-001' + text_curie_001 = 'text-curie-001' + text_babbage_001 = 'text-babbage-001' + text_ada_001 = 'text-ada-001' + davinci = 'davinci' + curie = 'curie' + babbage = 'babbage' + ada = 'ada' + code_davinci_002 = 'code-davinci-002' + code_davinci_001 = 'code-davinci-001' + code_cushman_002 = 'code-cushman-002' + code_cushman_001 = 'code-cushman-001' + davinci_codex = 'davinci-codex' + cushman_codex = 'cushman-codex' + text_davinci_edit_001 = 'text-davinci-edit-001' + code_davinci_edit_001 = 'code-davinci-edit-001' + text_embedding_ada_002 = 'text-embedding-ada-002' + text_similarity_davinci_001 = 'text-similarity-davinci-001' + text_similarity_curie_001 = 'text-similarity-curie-001' + text_similarity_babbage_001 = 'text-similarity-babbage-001' + text_similarity_ada_001 = 'text-similarity-ada-001' + text_search_davinci_doc_001 = 'text-search-davinci-doc-001' + text_search_curie_doc_001 = 'text-search-curie-doc-001' + text_search_babbage_doc_001 = 'text-search-babbage-doc-001' + text_search_ada_doc_001 = 'text-search-ada-doc-001' + code_search_babbage_code_001 = 'code-search-babbage-code-001' + code_search_ada_code_001 = 'code-search-ada-code-001' + gpt2 = 'gpt2' + + +@dataclass +class Input: + """ + Input + """ + + model: Model + text: str + chunk_token_size: Optional[int] = 500 diff --git a/instill/resources/schema/text_task_split_by_token_output.py b/instill/resources/schema/text_task_split_by_token_output.py new file mode 100644 index 0000000..b58759c --- /dev/null +++ b/instill/resources/schema/text_task_split_by_token_output.py @@ -0,0 +1,18 @@ +# generated by datamodel-codegen: +# filename: text_task_split_by_token_output.json + +from __future__ import annotations + +from dataclasses import dataclass +from typing import List + + +@dataclass +class Output: + """ + Output + """ + + chunk_num: int + text_chunks: List[str] + token_count: int diff --git a/instill/resources/schema/website.py b/instill/resources/schema/website.py new file mode 100644 index 0000000..a8c2b27 --- /dev/null +++ b/instill/resources/schema/website.py @@ -0,0 +1,11 @@ +# generated by datamodel-codegen: +# filename: website_definitions.json + +from __future__ import annotations + +from dataclasses import dataclass + + +@dataclass +class WebsiteConnectorResource: + pass diff --git a/instill/resources/schema/website_task_scrape_website_input.py b/instill/resources/schema/website_task_scrape_website_input.py new file mode 100644 index 0000000..556645d --- /dev/null +++ b/instill/resources/schema/website_task_scrape_website_input.py @@ -0,0 +1,24 @@ +# generated by datamodel-codegen: +# filename: website_task_scrape_website_input.json + +from __future__ import annotations + +from dataclasses import dataclass +from typing import List, Optional + + +@dataclass +class Input: + allowed_domains: Optional[List[str]] + max_k: int + target_url: str + include_link_html: Optional[bool] = False + include_link_text: Optional[bool] = False + + +@dataclass +class PageInformation: + link: str + link_html: Optional[str] + link_text: Optional[str] + title: Optional[str] diff --git a/instill/resources/schema/website_task_scrape_website_output.py b/instill/resources/schema/website_task_scrape_website_output.py new file mode 100644 index 0000000..76bc8ba --- /dev/null +++ b/instill/resources/schema/website_task_scrape_website_output.py @@ -0,0 +1,20 @@ +# generated by datamodel-codegen: +# filename: website_task_scrape_website_output.json + +from __future__ import annotations + +from dataclasses import dataclass +from typing import List, Optional + + +@dataclass +class PageInformation: + link: str + link_html: Optional[str] + link_text: Optional[str] + title: Optional[str] + + +@dataclass +class Output: + pages: List[PageInformation] diff --git a/poetry.lock b/poetry.lock index 78cc4e1..6561d1f 100644 --- a/poetry.lock +++ b/poetry.lock @@ -214,6 +214,20 @@ files = [ {file = "appnope-0.1.3.tar.gz", hash = "sha256:02bd91c4de869fbb1e1c50aafc4098827a7a54ab2f39d9dcba6c9547ed920e24"}, ] +[[package]] +name = "argcomplete" +version = "3.2.1" +description = "Bash tab completion for argparse" +optional = false +python-versions = ">=3.8" +files = [ + {file = "argcomplete-3.2.1-py3-none-any.whl", hash = "sha256:30891d87f3c1abe091f2142613c9d33cac84a5e15404489f033b20399b691fec"}, + {file = "argcomplete-3.2.1.tar.gz", hash = "sha256:437f67fb9b058da5a090df505ef9be0297c4883993f3f56cb186ff087778cfb4"}, +] + +[package.extras] +test = ["coverage", "mypy", "pexpect", "ruff", "wheel"] + [[package]] name = "astroid" version = "2.13.5" @@ -229,8 +243,8 @@ files = [ lazy-object-proxy = ">=1.4.0" typing-extensions = {version = ">=4.0.0", markers = "python_version < \"3.11\""} wrapt = [ - {version = ">=1.11,<2", markers = "python_version < \"3.11\""}, {version = ">=1.14,<2", markers = "python_version >= \"3.11\""}, + {version = ">=1.11,<2", markers = "python_version < \"3.11\""}, ] [[package]] @@ -707,6 +721,40 @@ ssh = ["bcrypt (>=3.1.5)"] test = ["pretend", "pytest (>=6.2.0)", "pytest-benchmark", "pytest-cov", "pytest-xdist"] test-randomorder = ["pytest-randomly"] +[[package]] +name = "datamodel-code-generator" +version = "0.25.2" +description = "Datamodel Code Generator" +optional = false +python-versions = ">=3.7,<4.0" +files = [ + {file = "datamodel_code_generator-0.25.2-py3-none-any.whl", hash = "sha256:a7e25d438c652e44a5236117b698da2fab307339b43e68c7d959fd3ec55357f2"}, + {file = "datamodel_code_generator-0.25.2.tar.gz", hash = "sha256:ebe3a66d1838bbc3368f1ee5e779773acb375b0103c833d597e3d7162354d464"}, +] + +[package.dependencies] +argcomplete = ">=1.10,<4.0" +black = ">=19.10b0" +genson = ">=1.2.1,<2.0" +inflect = ">=4.1.0,<6.0" +isort = ">=4.3.21,<6.0" +jinja2 = ">=2.10.1,<4.0" +packaging = "*" +pydantic = [ + {version = ">=1.10.0,<2.0.0 || >2.0.0,<2.0.1 || >2.0.1,<2.4.0 || >2.4.0,<3.0", extras = ["email"], markers = "python_version >= \"3.12\" and python_version < \"4.0\""}, + {version = ">=1.10.0,<2.4.0 || >2.4.0,<3.0", extras = ["email"], markers = "python_version >= \"3.11\" and python_version < \"3.12\""}, + {version = ">=1.5.1,<2.4.0 || >2.4.0,<3.0", extras = ["email"], markers = "python_version < \"3.10\""}, + {version = ">=1.9.0,<2.4.0 || >2.4.0,<3.0", extras = ["email"], markers = "python_version >= \"3.10\" and python_version < \"3.11\""}, +] +pyyaml = ">=6.0.1" +toml = {version = ">=0.10.0,<1.0.0", markers = "python_version < \"3.11\""} + +[package.extras] +debug = ["PySnooper (>=0.4.1,<2.0.0)"] +graphql = ["graphql-core (>=3.2.3,<4.0.0)"] +http = ["httpx"] +validation = ["openapi-spec-validator (>=0.2.8,<0.7.0)", "prance (>=0.18.2)"] + [[package]] name = "decorator" version = "5.1.1" @@ -743,6 +791,25 @@ files = [ {file = "distlib-0.3.7.tar.gz", hash = "sha256:9dafe54b34a028eafd95039d5e5d4851a13734540f1331060d31c9916e7147a8"}, ] +[[package]] +name = "dnspython" +version = "2.4.2" +description = "DNS toolkit" +optional = false +python-versions = ">=3.8,<4.0" +files = [ + {file = "dnspython-2.4.2-py3-none-any.whl", hash = "sha256:57c6fbaaeaaf39c891292012060beb141791735dbb4004798328fc2c467402d8"}, + {file = "dnspython-2.4.2.tar.gz", hash = "sha256:8dcfae8c7460a2f84b4072e26f1c9f4101ca20c071649cb7c34e8b6a93d58984"}, +] + +[package.extras] +dnssec = ["cryptography (>=2.6,<42.0)"] +doh = ["h2 (>=4.1.0)", "httpcore (>=0.17.3)", "httpx (>=0.24.1)"] +doq = ["aioquic (>=0.9.20)"] +idna = ["idna (>=2.1,<4.0)"] +trio = ["trio (>=0.14,<0.23)"] +wmi = ["wmi (>=1.5.1,<2.0.0)"] + [[package]] name = "docopt" version = "0.6.2" @@ -764,6 +831,21 @@ files = [ {file = "docutils-0.20.1.tar.gz", hash = "sha256:f08a4e276c3a1583a86dce3e34aba3fe04d02bba2dd51ed16106244e8a923e3b"}, ] +[[package]] +name = "email-validator" +version = "2.1.0.post1" +description = "A robust email address syntax and deliverability validation library." +optional = false +python-versions = ">=3.8" +files = [ + {file = "email_validator-2.1.0.post1-py3-none-any.whl", hash = "sha256:c973053efbeddfef924dc0bd93f6e77a1ea7ee0fce935aea7103c7a3d6d2d637"}, + {file = "email_validator-2.1.0.post1.tar.gz", hash = "sha256:a4b0bd1cf55f073b924258d19321b1f3aa74b4b5a71a42c305575dba920e1a44"}, +] + +[package.dependencies] +dnspython = ">=2.0.0" +idna = ">=2.0.0" + [[package]] name = "exceptiongroup" version = "1.2.0" @@ -912,6 +994,16 @@ files = [ {file = "frozenlist-1.4.0.tar.gz", hash = "sha256:09163bdf0b2907454042edb19f887c6d33806adc71fbd54afc14908bfdc22251"}, ] +[[package]] +name = "genson" +version = "1.2.2" +description = "GenSON is a powerful, user-friendly JSON Schema generator." +optional = false +python-versions = "*" +files = [ + {file = "genson-1.2.2.tar.gz", hash = "sha256:8caf69aa10af7aee0e1a1351d1d06801f4696e005f06cedef438635384346a16"}, +] + [[package]] name = "ghp-import" version = "2.1.0" @@ -1251,6 +1343,21 @@ zipp = {version = ">=3.1.0", markers = "python_version < \"3.10\""} docs = ["furo", "jaraco.packaging (>=9.3)", "jaraco.tidelift (>=1.4)", "rst.linker (>=1.9)", "sphinx (<7.2.5)", "sphinx (>=3.5)", "sphinx-lint"] testing = ["pytest (>=6)", "pytest-black (>=0.3.7)", "pytest-checkdocs (>=2.4)", "pytest-cov", "pytest-enabler (>=2.2)", "pytest-mypy (>=0.9.1)", "pytest-ruff", "zipp (>=3.17)"] +[[package]] +name = "inflect" +version = "5.6.2" +description = "Correctly generate plurals, singular nouns, ordinals, indefinite articles; convert numbers to words" +optional = false +python-versions = ">=3.7" +files = [ + {file = "inflect-5.6.2-py3-none-any.whl", hash = "sha256:b45d91a4a28a4e617ff1821117439b06eaa86e2a4573154af0149e9be6687238"}, + {file = "inflect-5.6.2.tar.gz", hash = "sha256:aadc7ed73928f5e014129794bbac03058cca35d0a973a5fc4eb45c7fa26005f9"}, +] + +[package.extras] +docs = ["jaraco.packaging (>=9)", "jaraco.tidelift (>=1.4)", "rst.linker (>=1.9)", "sphinx"] +testing = ["pygments", "pytest (>=6)", "pytest-black (>=0.3.7)", "pytest-checkdocs (>=2.4)", "pytest-cov", "pytest-enabler (>=1.3)", "pytest-flake8", "pytest-mypy (>=0.9.1)"] + [[package]] name = "iniconfig" version = "2.0.0" @@ -2511,6 +2618,7 @@ files = [ [package.dependencies] annotated-types = ">=0.4.0" +email-validator = {version = ">=2.0.0", optional = true, markers = "extra == \"email\""} pydantic-core = "2.14.6" typing-extensions = ">=4.6.1" @@ -2725,8 +2833,8 @@ files = [ astroid = ">=2.12.13,<=2.14.0-dev0" colorama = {version = ">=0.4.5", markers = "sys_platform == \"win32\""} dill = [ - {version = ">=0.2", markers = "python_version < \"3.11\""}, {version = ">=0.3.6", markers = "python_version >= \"3.11\""}, + {version = ">=0.2", markers = "python_version < \"3.11\""}, ] isort = ">=4.2.5,<6" mccabe = ">=0.6,<0.8" @@ -2997,8 +3105,8 @@ filelock = "*" frozenlist = "*" gpustat = {version = ">=1.0.0", optional = true, markers = "extra == \"serve\""} grpcio = [ - {version = ">=1.32.0", optional = true, markers = "python_version < \"3.10\" and extra == \"serve\""}, {version = ">=1.42.0", optional = true, markers = "python_version >= \"3.10\" and extra == \"serve\""}, + {version = ">=1.32.0", optional = true, markers = "python_version < \"3.10\" and extra == \"serve\""}, ] jsonschema = "*" msgpack = ">=1.0.0,<2.0.0" @@ -3425,6 +3533,17 @@ typing-extensions = {version = ">=3.10.0", markers = "python_version < \"3.10\"" [package.extras] full = ["httpx (>=0.22.0)", "itsdangerous", "jinja2", "python-multipart", "pyyaml"] +[[package]] +name = "toml" +version = "0.10.2" +description = "Python Library for Tom's Obvious, Minimal Language" +optional = false +python-versions = ">=2.6, !=3.0.*, !=3.1.*, !=3.2.*" +files = [ + {file = "toml-0.10.2-py2.py3-none-any.whl", hash = "sha256:806143ae5bfb6a3c6e736a764057db0e6a0e05e338b5630894a5f779cabb4f9b"}, + {file = "toml-0.10.2.tar.gz", hash = "sha256:b3bda1d108d5dd99f4a20d24d9c348e91c4db7ab1b749200bded2f839ccbe68f"}, +] + [[package]] name = "tomli" version = "2.0.1" @@ -4056,4 +4175,4 @@ testing = ["big-O", "jaraco.functools", "jaraco.itertools", "more-itertools", "p [metadata] lock-version = "2.0" python-versions = ">=3.8,<3.13" -content-hash = "6c7bc22fdc92f78babc1e4326fcbadd9f91759d771eea0944d6a869d7f5cd022" +content-hash = "3f14b340c61e7f501d7962a22c6ac067e07e579ac690076de237b3c8c9b5193e" diff --git a/pyproject.toml b/pyproject.toml index 557b577..3a1b96c 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -38,6 +38,7 @@ protoc-gen-openapiv2 = "^0.0.1" pydantic = ">=1.10.13" pillow = "^10.1.0" ray = {version = "2.9.0", extras = ["serve"]} +jsonschema = "^4.20.0" [tool.poetry.dev-dependencies] @@ -75,6 +76,7 @@ pync = { version = "*", platform = "darwin" } ipython = "^8.10.0" mypy-protobuf = "^3.5.0" grpcio-tools = "^1.54.2" +datamodel-code-generator = "^0.25.2" # Publish twine = "^4.0.2" @@ -98,6 +100,7 @@ exclude = ''' | _build | buck-out | protogen + | schema | protobufs | build | dist @@ -113,7 +116,9 @@ profile = "black" skip_glob = ["**/protogen/*", "**/protobufs/*"] [tool.mypy] - +exclude = [ + 'instill/resources/schema', +] ignore_missing_imports = true no_implicit_optional = true check_untyped_defs = true