diff --git a/examples/kitchen-sink.ts b/examples/kitchen-sink.ts index a33a40a..a33ba7f 100755 --- a/examples/kitchen-sink.ts +++ b/examples/kitchen-sink.ts @@ -19,11 +19,8 @@ import { StableDiffusionXLIPAdapter, StableDiffusionXLControlNet, FillMask, - BigLaMa, UpscaleImage, - RealESRGAN, RemoveBackground, - DISISNet, SegmentUnderPoint, SegmentAnything, TranscribeMedia, @@ -45,7 +42,7 @@ import { Mixtral8x7BInstruct, Llama3Instruct8B, Llama3Instruct70B, - RunCode, + RunPython, } from "substrate"; const urls = { @@ -473,29 +470,6 @@ const examples = [ }), envs: ALL_ENVS, }, - { - // FIXME: it looks like this should work for v1, but doesn't yet - node: new DISISNet({ - image_uri: "https://media.substrate.run/docs-seurat.jpg", - store: "hosted", - }), - envs: [STAGING_V0, PRODUCTION_V1], - }, - { - node: new BigLaMa({ - image_uri: "https://media.substrate.run/docs-seurat.jpg", - mask_image_uri: "https://media.substrate.run/spiral-logo.jpeg", - // store: "hosted", // FIXME: not working yet - }), - envs: [STAGING_V1, PRODUCTION_V1], - }, - { - node: new RealESRGAN({ - image_uri: "https://media.substrate.run/docs-seurat.jpg", - // store: "hosted", // FIXME: not working yet - }), - envs: [STAGING_V1, PRODUCTION_V1], - }, { node: new SegmentAnything({ image_uri: "https://media.substrate.run/docs-vg-bedroom.jpg", @@ -535,10 +509,12 @@ const examples = [ envs: [STAGING_V1, PRODUCTION_V1], }, { - node: new RunCode({ - language: "python", - code: `import sys; print(f"hello {sys.argv[1]}")`, - args: ["substrate"], + node: new RunPython({ + code: "import numpy as np; print(SB_IN['foo']); SB_OUT['result']=np.sum([1,2]).item()", + input: { + foo: "bar", + }, + pip_install: ["numpy"], }), envs: [STAGING_V1, PRODUCTION_V1], }, diff --git a/examples/run-python.ts b/examples/run-python.ts new file mode 100755 index 0000000..354f07d --- /dev/null +++ b/examples/run-python.ts @@ -0,0 +1,22 @@ +#!/usr/bin/env -S npx ts-node --transpileOnly + +import { Substrate, RunPython } from "substrate"; + +async function main() { + const SUBSTRATE_API_KEY = process.env["SUBSTRATE_API_KEY"]; + + const substrate = new Substrate({ apiKey: SUBSTRATE_API_KEY }); + + const node = new RunPython({ + code: "import numpy as np; print(SB_IN['foo']); SB_OUT['result']=np.sum([1,2]).item()", + input: { + foo: "bar", + }, + pip_install: ["numpy"], + }); + + const res = await substrate.run(node); + + console.log(res.get(node)); +} +main(); diff --git a/package-lock.json b/package-lock.json index 89724d3..cfe1ede 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "substrate", - "version": "120240418.0.13", + "version": "120240530.0.13", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "substrate", - "version": "120240418.0.13", + "version": "120240530.0.13", "license": "MIT", "dependencies": { "@types/node-fetch": "^2.6.11", diff --git a/package.json b/package.json index 4ef8fa6..8fe8bd4 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "substrate", - "version": "120240418.0.13", + "version": "120240530.0.13", "description": "The official SDK for the Substrate API", "repository": { "type": "git", diff --git a/src/GEN_VERSION b/src/GEN_VERSION index 1f311ed..9674ffc 100644 --- a/src/GEN_VERSION +++ b/src/GEN_VERSION @@ -1 +1 @@ -20240418.20240430 \ No newline at end of file +20240530.20240531 \ No newline at end of file diff --git a/src/Nodes.ts b/src/Nodes.ts index 2f6d123..dcf1b83 100644 --- a/src/Nodes.ts +++ b/src/Nodes.ts @@ -1,7 +1,7 @@ /** - * ꩜ Substrate + * 𐃏 Substrate * @generated file - * 20240418.20240430 + * 20240530.20240531 */ import * as OpenAPI from "substrate/OpenAPI"; @@ -43,19 +43,22 @@ type FutureExpandAny = T extends (infer U)[][] ? FutureExpandObject : FutureExpandScalar; -/** List of command line arguments. */ -export class RunCodeInArgs extends FutureArray { +export class ExperimentalInArgs extends FutureAnyObject {} +export class ExperimentalOutOutput extends FutureAnyObject {} +export class RunPythonInInput extends FutureAnyObject {} +/** Python packages to install. You must import them in your code. */ +export class RunPythonInPipInstall extends FutureArray { /** Returns `FutureString` at given index. */ override at(index: number) { return new FutureString(this._directive.next(index)); } - /** Returns the result for `RunCodeInArgs` once it's node has been run. */ + /** Returns the result for `RunPythonInPipInstall` once it's node has been run. */ protected override async result(): Promise { return super.result() as Promise; } } -export class RunCodeInArgsItem extends FutureString {} -export class RunCodeOutJsonOutput extends FutureAnyObject {} +export class RunPythonInPipInstallItem extends FutureString {} +export class RunPythonOutOutput extends FutureAnyObject {} export class GenerateJSONInJsonSchema extends FutureAnyObject {} export class GenerateJSONOutJsonObject extends FutureAnyObject {} /** Response choices. */ @@ -154,6 +157,8 @@ export class Mixtral8x7BInstructOutChoices extends FutureArray { return super.result() as Promise; } } +export class Llama3Instruct8BInJsonSchema extends FutureAnyObject {} +export class Llama3Instruct8BChoiceJsonObject extends FutureAnyObject {} /** Response choices. */ export class Llama3Instruct8BOutChoices extends FutureArray { /** Returns `Llama3Instruct8BChoice` at given index. */ @@ -731,52 +736,78 @@ export class ErrorOut extends FutureObject { get message() { return new FutureString(this._directive.next("message")); } - /** (Optional) A unique identifier for the request. */ - get request_id() { - return new FutureString(this._directive.next("request_id")); - } /** returns the result for `ErrorOut` once it's node has been run. */ protected override async result(): Promise { return super.result() as Promise; } } -/** RunCodeIn */ -export class RunCodeIn extends FutureObject { - /** Code to execute. */ - get code() { - return new FutureString(this._directive.next("code")); +/** ExperimentalIn */ +export class ExperimentalIn extends FutureObject { + /** Identifier. */ + get name() { + return new FutureString(this._directive.next("name")); } - - /** (Optional) List of command line arguments. */ + /** Arguments. */ get args() { - return new RunCodeInArgs(this._directive.next("args")); + return new FutureAnyObject(this._directive.next("args")); } - /** (Optional) Interpreter to use. */ - get language() { - return new FutureString(this._directive.next("language")); + /** (Optional) Timeout in seconds. */ + get timeout() { + return new FutureNumber(this._directive.next("timeout")); } - /** returns the result for `RunCodeIn` once it's node has been run. */ - protected override async result(): Promise { - return super.result() as Promise; + /** returns the result for `ExperimentalIn` once it's node has been run. */ + protected override async result(): Promise { + return super.result() as Promise; } } -/** RunCodeOut */ -export class RunCodeOut extends FutureObject { - /** (Optional) Contents of `stdout` after executing the code. */ +/** ExperimentalOut */ +export class ExperimentalOut extends FutureObject { + /** Response. */ get output() { - return new FutureString(this._directive.next("output")); + return new FutureAnyObject(this._directive.next("output")); + } + /** returns the result for `ExperimentalOut` once it's node has been run. */ + protected override async result(): Promise { + return super.result() as Promise; + } +} +/** RunPythonIn */ +export class RunPythonIn extends FutureObject { + /** Python code to execute. In your code, access values from the `input` parameter using the `SB_IN` variable. Update the `SB_OUT` variable with results you want returned in `output`. */ + get code() { + return new FutureString(this._directive.next("code")); + } + /** (Optional) Input to your code, accessible using the preloaded `SB_IN` variable. */ + get input() { + return new FutureAnyObject(this._directive.next("input")); + } + + /** (Optional) Python packages to install. You must import them in your code. */ + get pip_install() { + return new RunPythonInPipInstall(this._directive.next("pip_install")); + } + /** returns the result for `RunPythonIn` once it's node has been run. */ + protected override async result(): Promise { + return super.result() as Promise; + } +} +/** RunPythonOut */ +export class RunPythonOut extends FutureObject { + /** Everything printed to stdout while running your code. */ + get stdout() { + return new FutureString(this._directive.next("stdout")); } - /** `output` as parsed JSON. Print serialized json to `stdout` to receive JSON. */ - get json_output() { - return new FutureAnyObject(this._directive.next("json_output")); + /** Contents of the `SB_OUT` variable after running your code. */ + get output() { + return new FutureAnyObject(this._directive.next("output")); } - /** (Optional) Contents of `stderr` after executing the code. */ - get error() { - return new FutureString(this._directive.next("error")); + /** Contents of stderr if your code did not run successfully. */ + get stderr() { + return new FutureString(this._directive.next("stderr")); } - /** returns the result for `RunCodeOut` once it's node has been run. */ - protected override async result(): Promise { - return super.result() as Promise; + /** returns the result for `RunPythonOut` once it's node has been run. */ + protected override async result(): Promise { + return super.result() as Promise; } } /** GenerateTextIn */ @@ -846,6 +877,10 @@ export class GenerateJSONOut extends FutureObject { get json_object() { return new FutureAnyObject(this._directive.next("json_object")); } + /** If the model output could not be parsed to JSON, this is the raw text output. */ + get text() { + return new FutureString(this._directive.next("text")); + } /** returns the result for `GenerateJSONOut` once it's node has been run. */ protected override async result(): Promise { return super.result() as Promise; @@ -903,10 +938,6 @@ export class BatchGenerateTextIn extends FutureObject { get max_tokens() { return new FutureNumber(this._directive.next("max_tokens")); } - /** (Optional) Selected node. */ - get node() { - return new FutureString(this._directive.next("node")); - } /** returns the result for `BatchGenerateTextIn` once it's node has been run. */ protected override async result(): Promise { return super.result() as Promise; @@ -967,6 +998,11 @@ export class MultiGenerateJSONOut extends FutureObject { } /** BatchGenerateJSONIn */ export class BatchGenerateJSONIn extends FutureObject { + /** (Optional) Selected node. */ + get node() { + return new FutureString(this._directive.next("node")); + } + /** Batch input prompts. */ get prompts() { return new BatchGenerateJSONInPrompts(this._directive.next("prompts")); @@ -983,10 +1019,6 @@ export class BatchGenerateJSONIn extends FutureObject { get max_tokens() { return new FutureNumber(this._directive.next("max_tokens")); } - /** (Optional) Selected node. */ - get node() { - return new FutureString(this._directive.next("node")); - } /** returns the result for `BatchGenerateJSONIn` once it's node has been run. */ protected override async result(): Promise { return super.result() as Promise; @@ -1127,6 +1159,10 @@ export class Llama3Instruct8BIn extends FutureObject { get max_tokens() { return new FutureNumber(this._directive.next("max_tokens")); } + /** (Optional) JSON schema to guide response. */ + get json_schema() { + return new FutureAnyObject(this._directive.next("json_schema")); + } /** returns the result for `Llama3Instruct8BIn` once it's node has been run. */ protected override async result(): Promise { return super.result() as Promise; @@ -1138,6 +1174,10 @@ export class Llama3Instruct8BChoice extends FutureObject { get text() { return new FutureString(this._directive.next("text")); } + /** JSON response, if `json_schema` was provided. */ + get json_object() { + return new FutureAnyObject(this._directive.next("json_object")); + } /** returns the result for `Llama3Instruct8BChoice` once it's node has been run. */ protected override async result(): Promise { return super.result() as Promise; @@ -1216,10 +1256,6 @@ export class GenerateTextVisionIn extends FutureObject { get max_tokens() { return new FutureNumber(this._directive.next("max_tokens")); } - /** (Optional) Selected node. */ - get node() { - return new FutureString(this._directive.next("node")); - } /** returns the result for `GenerateTextVisionIn` once it's node has been run. */ protected override async result(): Promise { return super.result() as Promise; @@ -1277,10 +1313,6 @@ export class GenerateImageIn extends FutureObject { get store() { return new FutureString(this._directive.next("store")); } - /** (Optional) Selected node. */ - get node() { - return new FutureString(this._directive.next("node")); - } /** returns the result for `GenerateImageIn` once it's node has been run. */ protected override async result(): Promise { return super.result() as Promise; @@ -1311,10 +1343,6 @@ export class MultiGenerateImageIn extends FutureObject { get store() { return new FutureString(this._directive.next("store")); } - /** (Optional) Selected node. */ - get node() { - return new FutureString(this._directive.next("node")); - } /** returns the result for `MultiGenerateImageIn` once it's node has been run. */ protected override async result(): Promise { return super.result() as Promise; @@ -1456,7 +1484,7 @@ export class StableDiffusionXLIPAdapterIn extends FutureObject { get prompt() { return new FutureString(this._directive.next("prompt")); } - /** (Optional) Image prompt. */ + /** Image prompt. */ get image_prompt_uri() { return new FutureString(this._directive.next("image_prompt_uri")); } @@ -1584,10 +1612,6 @@ export class GenerativeEditImageIn extends FutureObject { get store() { return new FutureString(this._directive.next("store")); } - /** (Optional) Selected node. */ - get node() { - return new FutureString(this._directive.next("node")); - } /** returns the result for `GenerativeEditImageIn` once it's node has been run. */ protected override async result(): Promise { return super.result() as Promise; @@ -1626,10 +1650,6 @@ export class MultiGenerativeEditImageIn extends FutureObject { get store() { return new FutureString(this._directive.next("store")); } - /** (Optional) Selected node. */ - get node() { - return new FutureString(this._directive.next("node")); - } /** returns the result for `MultiGenerativeEditImageIn` once it's node has been run. */ protected override async result(): Promise { return super.result() as Promise; @@ -1757,10 +1777,6 @@ export class FillMaskIn extends FutureObject { get store() { return new FutureString(this._directive.next("store")); } - /** (Optional) Selected node. */ - get node() { - return new FutureString(this._directive.next("node")); - } /** returns the result for `FillMaskIn` once it's node has been run. */ protected override async result(): Promise { return super.result() as Promise; @@ -1825,10 +1841,6 @@ export class RemoveBackgroundIn extends FutureObject { get store() { return new FutureString(this._directive.next("store")); } - /** (Optional) Selected node. */ - get node() { - return new FutureString(this._directive.next("node")); - } /** returns the result for `RemoveBackgroundIn` once it's node has been run. */ protected override async result(): Promise { return super.result() as Promise; @@ -1881,10 +1893,6 @@ export class UpscaleImageIn extends FutureObject { get store() { return new FutureString(this._directive.next("store")); } - /** (Optional) Selected node. */ - get node() { - return new FutureString(this._directive.next("node")); - } /** returns the result for `UpscaleImageIn` once it's node has been run. */ protected override async result(): Promise { return super.result() as Promise; @@ -1941,10 +1949,6 @@ export class SegmentUnderPointIn extends FutureObject { get store() { return new FutureString(this._directive.next("store")); } - /** (Optional) Selected node. */ - get node() { - return new FutureString(this._directive.next("node")); - } /** returns the result for `SegmentUnderPointIn` once it's node has been run. */ protected override async result(): Promise { return super.result() as Promise; @@ -2131,10 +2135,6 @@ export class GenerateSpeechIn extends FutureObject { get store() { return new FutureString(this._directive.next("store")); } - /** (Optional) Selected node. */ - get node() { - return new FutureString(this._directive.next("node")); - } /** returns the result for `GenerateSpeechIn` once it's node has been run. */ protected override async result(): Promise { return super.result() as Promise; @@ -2214,7 +2214,7 @@ export class EmbedTextIn extends FutureObject { get collection_name() { return new FutureString(this._directive.next("collection_name")); } - /** (Optional) Metadata that can be used to query the vector store. Ignored if `store` is unset. */ + /** (Optional) Metadata that can be used to query the vector store. Ignored if `collection_name` is unset. */ get metadata() { return new FutureAnyObject(this._directive.next("metadata")); } @@ -2255,11 +2255,11 @@ export class EmbedTextItem extends FutureObject { get text() { return new FutureString(this._directive.next("text")); } - /** (Optional) Metadata that can be used to query the vector store. Ignored if `store` is unset. */ + /** (Optional) Metadata that can be used to query the vector store. Ignored if `collection_name` is unset. */ get metadata() { return new FutureAnyObject(this._directive.next("metadata")); } - /** (Optional) Vector store document ID. Ignored if `store` is unset. */ + /** (Optional) Vector store document ID. Ignored if `collection_name` is unset. */ get doc_id() { return new FutureString(this._directive.next("doc_id")); } @@ -2348,7 +2348,7 @@ export class EmbedImageIn extends FutureObject { get collection_name() { return new FutureString(this._directive.next("collection_name")); } - /** (Optional) Vector store document ID. Ignored if `store` is unset. */ + /** (Optional) Vector store document ID. Ignored if `collection_name` is unset. */ get doc_id() { return new FutureString(this._directive.next("doc_id")); } @@ -2378,7 +2378,7 @@ export class EmbedImageItem extends FutureObject { get image_uri() { return new FutureString(this._directive.next("image_uri")); } - /** (Optional) Vector store document ID. Ignored if `store` is unset. */ + /** (Optional) Vector store document ID. Ignored if `collection_name` is unset. */ get doc_id() { return new FutureString(this._directive.next("doc_id")); } @@ -2397,11 +2397,11 @@ export class EmbedTextOrImageItem extends FutureObject { get text() { return new FutureString(this._directive.next("text")); } - /** Metadata that can be used to query the vector store. Ignored if `store` is unset. */ + /** Metadata that can be used to query the vector store. Ignored if `collection_name` is unset. */ get metadata() { return new FutureAnyObject(this._directive.next("metadata")); } - /** Vector store document ID. Ignored if `store` is unset. */ + /** Vector store document ID. Ignored if `collection_name` is unset. */ get doc_id() { return new FutureString(this._directive.next("doc_id")); } @@ -2816,37 +2816,37 @@ export class QueryVectorStoreOut extends FutureObject { return super.result() as Promise; } } -export namespace RunCode { +export namespace Experimental { /** - * RunCode Input - * https://www.substrate.run/nodes#RunCode + * Experimental Input + * https://www.substrate.run/nodes#Experimental */ export type Input = FutureExpandAny< - OpenAPI.components["schemas"]["RunCodeIn"] + OpenAPI.components["schemas"]["ExperimentalIn"] >; /** - * RunCode Output - * https://www.substrate.run/nodes#RunCode + * Experimental Output + * https://www.substrate.run/nodes#Experimental */ - export type Output = OpenAPI.components["schemas"]["RunCodeOut"]; + export type Output = OpenAPI.components["schemas"]["ExperimentalOut"]; } /** - * Evaluate code using a code interpreter. + * Experimental node. * - * https://www.substrate.run/nodes#RunCode + * https://www.substrate.run/nodes#Experimental */ -export class RunCode extends Node { +export class Experimental extends Node { /** - * Input arguments: `code`, `args` (optional), `language` (optional) + * Input arguments: `name`, `args`, `timeout` (optional) * - * Output fields: `output` (optional), `json_output`, `error` (optional) + * Output fields: `output` * - * https://www.substrate.run/nodes#RunCode + * https://www.substrate.run/nodes#Experimental */ constructor( - args: FutureExpandAny, + args: FutureExpandAny, options?: Options, ) { super(args, options); @@ -2855,31 +2855,97 @@ export class RunCode extends Node { /** * Retrieve this node's output from a response. * - * Output fields: `output` (optional), `json_output`, `error` (optional) + * Output fields: `output` * - * https://www.substrate.run/nodes#RunCode + * https://www.substrate.run/nodes#Experimental */ protected override async result(): Promise< - OpenAPI.components["schemas"]["RunCodeOut"] | undefined + OpenAPI.components["schemas"]["ExperimentalOut"] | undefined > { return Promise.resolve( this._response ? this._response.get(this) : undefined, - ) as Promise; + ) as Promise; } /** * Future reference to this node's output. * - * Output fields: `output` (optional), `json_output`, `error` (optional) + * Output fields: `output` * - * https://www.substrate.run/nodes#RunCode + * https://www.substrate.run/nodes#Experimental */ - override get future(): RunCodeOut { - return new RunCodeOut(new Trace([], this)); + override get future(): ExperimentalOut { + return new ExperimentalOut(new Trace([], this)); } - protected override output(): OpenAPI.components["schemas"]["RunCodeOut"] { - return super.output() as OpenAPI.components["schemas"]["RunCodeOut"]; + protected override output(): OpenAPI.components["schemas"]["ExperimentalOut"] { + return super.output() as OpenAPI.components["schemas"]["ExperimentalOut"]; + } +} +export namespace RunPython { + /** + * RunPython Input + * https://www.substrate.run/nodes#RunPython + */ + export type Input = FutureExpandAny< + OpenAPI.components["schemas"]["RunPythonIn"] + >; + + /** + * RunPython Output + * https://www.substrate.run/nodes#RunPython + */ + export type Output = OpenAPI.components["schemas"]["RunPythonOut"]; +} + +/** + * Run code using a Python interpreter. + * + * https://www.substrate.run/nodes#RunPython + */ +export class RunPython extends Node { + /** + * Input arguments: `code`, `input` (optional), `pip_install` (optional) + * + * Output fields: `stdout`, `output`, `stderr` + * + * https://www.substrate.run/nodes#RunPython + */ + constructor( + args: FutureExpandAny, + options?: Options, + ) { + super(args, options); + } + + /** + * Retrieve this node's output from a response. + * + * Output fields: `stdout`, `output`, `stderr` + * + * https://www.substrate.run/nodes#RunPython + */ + protected override async result(): Promise< + OpenAPI.components["schemas"]["RunPythonOut"] | undefined + > { + return Promise.resolve( + this._response ? this._response.get(this) : undefined, + ) as Promise; + } + + /** + * Future reference to this node's output. + * + * Output fields: `stdout`, `output`, `stderr` + * + * https://www.substrate.run/nodes#RunPython + */ + override get future(): RunPythonOut { + return new RunPythonOut(new Trace([], this)); + } + + protected override output(): OpenAPI.components["schemas"]["RunPythonOut"] { + return super.output() as OpenAPI.components["schemas"]["RunPythonOut"]; } } export namespace GenerateText { @@ -3039,7 +3105,7 @@ export namespace BatchGenerateText { */ export class BatchGenerateText extends Node { /** - * Input arguments: `prompts`, `temperature` (optional), `max_tokens` (optional), `node` (optional) + * Input arguments: `prompts`, `temperature` (optional), `max_tokens` (optional) * * Output fields: `outputs` * @@ -3107,7 +3173,7 @@ export namespace BatchGenerateJSON { */ export class BatchGenerateJSON extends Node { /** - * Input arguments: `prompts`, `json_schema`, `temperature` (optional), `max_tokens` (optional), `node` (optional) + * Input arguments: `node` (optional), `prompts`, `json_schema`, `temperature` (optional), `max_tokens` (optional) * * Output fields: `outputs` * @@ -3177,7 +3243,7 @@ export class GenerateJSON extends Node { /** * Input arguments: `prompt`, `json_schema`, `temperature` (optional), `max_tokens` (optional), `node` (optional) * - * Output fields: `json_object` + * Output fields: `json_object` (optional), `text` (optional) * * https://www.substrate.run/nodes#GenerateJSON */ @@ -3191,7 +3257,7 @@ export class GenerateJSON extends Node { /** * Retrieve this node's output from a response. * - * Output fields: `json_object` + * Output fields: `json_object` (optional), `text` (optional) * * https://www.substrate.run/nodes#GenerateJSON */ @@ -3206,7 +3272,7 @@ export class GenerateJSON extends Node { /** * Future reference to this node's output. * - * Output fields: `json_object` + * Output fields: `json_object` (optional), `text` (optional) * * https://www.substrate.run/nodes#GenerateJSON */ @@ -3309,7 +3375,7 @@ export namespace GenerateTextVision { */ export class GenerateTextVision extends Node { /** - * Input arguments: `prompt`, `image_uris`, `max_tokens` (optional), `node` (optional) + * Input arguments: `prompt`, `image_uris`, `max_tokens` (optional) * * Output fields: `text` * @@ -3517,7 +3583,7 @@ export namespace Llama3Instruct8B { */ export class Llama3Instruct8B extends Node { /** - * Input arguments: `prompt`, `num_choices` (optional), `temperature` (optional), `max_tokens` (optional) + * Input arguments: `prompt`, `num_choices` (optional), `temperature` (optional), `max_tokens` (optional), `json_schema` (optional) * * Output fields: `choices` * @@ -3719,7 +3785,7 @@ export namespace GenerateImage { */ export class GenerateImage extends Node { /** - * Input arguments: `prompt`, `store` (optional), `node` (optional) + * Input arguments: `prompt`, `store` (optional) * * Output fields: `image_uri` * @@ -3785,7 +3851,7 @@ export namespace MultiGenerateImage { */ export class MultiGenerateImage extends Node { /** - * Input arguments: `prompt`, `num_images`, `store` (optional), `node` (optional) + * Input arguments: `prompt`, `num_images`, `store` (optional) * * Output fields: `outputs` * @@ -3855,7 +3921,7 @@ export namespace GenerativeEditImage { */ export class GenerativeEditImage extends Node { /** - * Input arguments: `image_uri`, `prompt`, `mask_image_uri` (optional), `store` (optional), `node` (optional) + * Input arguments: `image_uri`, `prompt`, `mask_image_uri` (optional), `store` (optional) * * Output fields: `image_uri` * @@ -3926,7 +3992,7 @@ export namespace MultiGenerativeEditImage { */ export class MultiGenerativeEditImage extends Node { /** - * Input arguments: `image_uri`, `prompt`, `mask_image_uri` (optional), `num_images`, `store` (optional), `node` (optional) + * Input arguments: `image_uri`, `prompt`, `mask_image_uri` (optional), `num_images`, `store` (optional) * * Output fields: `outputs` * @@ -4279,7 +4345,7 @@ export namespace StableDiffusionXLIPAdapter { */ export class StableDiffusionXLIPAdapter extends Node { /** - * Input arguments: `prompt`, `image_prompt_uri` (optional), `num_images`, `ip_adapter_scale` (optional), `negative_prompt` (optional), `store` (optional), `width` (optional), `height` (optional), `seeds` (optional) + * Input arguments: `prompt`, `image_prompt_uri`, `num_images`, `ip_adapter_scale` (optional), `negative_prompt` (optional), `store` (optional), `width` (optional), `height` (optional), `seeds` (optional) * * Output fields: `outputs` * @@ -4417,7 +4483,7 @@ export namespace GenerateSpeech { */ export class GenerateSpeech extends Node { /** - * Input arguments: `text`, `store` (optional), `node` (optional) + * Input arguments: `text`, `store` (optional) * * Output fields: `audio_uri` * @@ -4551,7 +4617,7 @@ export namespace RemoveBackground { */ export class RemoveBackground extends Node { /** - * Input arguments: `image_uri`, `return_mask` (optional), `background_color` (optional), `store` (optional), `node` (optional) + * Input arguments: `image_uri`, `return_mask` (optional), `background_color` (optional), `store` (optional) * * Output fields: `image_uri` * @@ -4619,7 +4685,7 @@ export namespace FillMask { */ export class FillMask extends Node { /** - * Input arguments: `image_uri`, `mask_image_uri`, `store` (optional), `node` (optional) + * Input arguments: `image_uri`, `mask_image_uri`, `store` (optional) * * Output fields: `image_uri` * @@ -4685,7 +4751,7 @@ export namespace UpscaleImage { */ export class UpscaleImage extends Node { /** - * Input arguments: `image_uri`, `store` (optional), `node` (optional) + * Input arguments: `image_uri`, `store` (optional) * * Output fields: `image_uri` * @@ -4751,7 +4817,7 @@ export namespace SegmentUnderPoint { */ export class SegmentUnderPoint extends Node { /** - * Input arguments: `image_uri`, `point`, `store` (optional), `node` (optional) + * Input arguments: `image_uri`, `point`, `store` (optional) * * Output fields: `mask_image_uri` * @@ -4796,204 +4862,6 @@ export class SegmentUnderPoint extends Node { return super.output() as OpenAPI.components["schemas"]["SegmentUnderPointOut"]; } } -export namespace DISISNet { - /** - * DISISNet Input - * https://www.substrate.run/nodes#DISISNet - */ - export type Input = FutureExpandAny< - OpenAPI.components["schemas"]["DISISNetIn"] - >; - - /** - * DISISNet Output - * https://www.substrate.run/nodes#DISISNet - */ - export type Output = OpenAPI.components["schemas"]["DISISNetOut"]; -} - -/** - * Segment image foreground using [DIS IS-Net](https://github.com/xuebinqin/DIS). - * - * https://www.substrate.run/nodes#DISISNet - */ -export class DISISNet extends Node { - /** - * Input arguments: `image_uri`, `store` (optional) - * - * Output fields: `image_uri` - * - * https://www.substrate.run/nodes#DISISNet - */ - constructor( - args: FutureExpandAny, - options?: Options, - ) { - super(args, options); - } - - /** - * Retrieve this node's output from a response. - * - * Output fields: `image_uri` - * - * https://www.substrate.run/nodes#DISISNet - */ - protected override async result(): Promise< - OpenAPI.components["schemas"]["DISISNetOut"] | undefined - > { - return Promise.resolve( - this._response ? this._response.get(this) : undefined, - ) as Promise; - } - - /** - * Future reference to this node's output. - * - * Output fields: `image_uri` - * - * https://www.substrate.run/nodes#DISISNet - */ - override get future(): DISISNetOut { - return new DISISNetOut(new Trace([], this)); - } - - protected override output(): OpenAPI.components["schemas"]["DISISNetOut"] { - return super.output() as OpenAPI.components["schemas"]["DISISNetOut"]; - } -} -export namespace BigLaMa { - /** - * BigLaMa Input - * https://www.substrate.run/nodes#BigLaMa - */ - export type Input = FutureExpandAny< - OpenAPI.components["schemas"]["BigLaMaIn"] - >; - - /** - * BigLaMa Output - * https://www.substrate.run/nodes#BigLaMa - */ - export type Output = OpenAPI.components["schemas"]["BigLaMaOut"]; -} - -/** - * Inpaint a mask using [LaMa](https://github.com/advimman/lama). - * - * https://www.substrate.run/nodes#BigLaMa - */ -export class BigLaMa extends Node { - /** - * Input arguments: `image_uri`, `mask_image_uri`, `store` (optional) - * - * Output fields: `image_uri` - * - * https://www.substrate.run/nodes#BigLaMa - */ - constructor( - args: FutureExpandAny, - options?: Options, - ) { - super(args, options); - } - - /** - * Retrieve this node's output from a response. - * - * Output fields: `image_uri` - * - * https://www.substrate.run/nodes#BigLaMa - */ - protected override async result(): Promise< - OpenAPI.components["schemas"]["BigLaMaOut"] | undefined - > { - return Promise.resolve( - this._response ? this._response.get(this) : undefined, - ) as Promise; - } - - /** - * Future reference to this node's output. - * - * Output fields: `image_uri` - * - * https://www.substrate.run/nodes#BigLaMa - */ - override get future(): BigLaMaOut { - return new BigLaMaOut(new Trace([], this)); - } - - protected override output(): OpenAPI.components["schemas"]["BigLaMaOut"] { - return super.output() as OpenAPI.components["schemas"]["BigLaMaOut"]; - } -} -export namespace RealESRGAN { - /** - * RealESRGAN Input - * https://www.substrate.run/nodes#RealESRGAN - */ - export type Input = FutureExpandAny< - OpenAPI.components["schemas"]["RealESRGANIn"] - >; - - /** - * RealESRGAN Output - * https://www.substrate.run/nodes#RealESRGAN - */ - export type Output = OpenAPI.components["schemas"]["RealESRGANOut"]; -} - -/** - * Upscale an image using [RealESRGAN](https://github.com/xinntao/Real-ESRGAN). - * - * https://www.substrate.run/nodes#RealESRGAN - */ -export class RealESRGAN extends Node { - /** - * Input arguments: `image_uri`, `store` (optional) - * - * Output fields: `image_uri` - * - * https://www.substrate.run/nodes#RealESRGAN - */ - constructor( - args: FutureExpandAny, - options?: Options, - ) { - super(args, options); - } - - /** - * Retrieve this node's output from a response. - * - * Output fields: `image_uri` - * - * https://www.substrate.run/nodes#RealESRGAN - */ - protected override async result(): Promise< - OpenAPI.components["schemas"]["RealESRGANOut"] | undefined - > { - return Promise.resolve( - this._response ? this._response.get(this) : undefined, - ) as Promise; - } - - /** - * Future reference to this node's output. - * - * Output fields: `image_uri` - * - * https://www.substrate.run/nodes#RealESRGAN - */ - override get future(): RealESRGANOut { - return new RealESRGANOut(new Trace([], this)); - } - - protected override output(): OpenAPI.components["schemas"]["RealESRGANOut"] { - return super.output() as OpenAPI.components["schemas"]["RealESRGANOut"]; - } -} export namespace SegmentAnything { /** * SegmentAnything Input @@ -5931,7 +5799,8 @@ export class DeleteVectors extends Node { } } export type AnyNode = - | RunCode + | Experimental + | RunPython | GenerateText | MultiGenerateText | BatchGenerateText @@ -5960,9 +5829,6 @@ export type AnyNode = | FillMask | UpscaleImage | SegmentUnderPoint - | DISISNet - | BigLaMa - | RealESRGAN | SegmentAnything | EmbedText | MultiEmbedText @@ -5978,96 +5844,92 @@ export type AnyNode = | UpdateVectors | DeleteVectors; -export type NodeOutput = T extends RunCode - ? OpenAPI.components["schemas"]["RunCodeOut"] - : T extends GenerateText - ? OpenAPI.components["schemas"]["GenerateTextOut"] - : T extends MultiGenerateText - ? OpenAPI.components["schemas"]["MultiGenerateTextOut"] - : T extends BatchGenerateText - ? OpenAPI.components["schemas"]["BatchGenerateTextOut"] - : T extends BatchGenerateJSON - ? OpenAPI.components["schemas"]["BatchGenerateJSONOut"] - : T extends GenerateJSON - ? OpenAPI.components["schemas"]["GenerateJSONOut"] - : T extends MultiGenerateJSON - ? OpenAPI.components["schemas"]["MultiGenerateJSONOut"] - : T extends GenerateTextVision - ? OpenAPI.components["schemas"]["GenerateTextVisionOut"] - : T extends Mistral7BInstruct - ? OpenAPI.components["schemas"]["Mistral7BInstructOut"] - : T extends Mixtral8x7BInstruct - ? OpenAPI.components["schemas"]["Mixtral8x7BInstructOut"] - : T extends Llama3Instruct8B - ? OpenAPI.components["schemas"]["Llama3Instruct8BOut"] - : T extends Llama3Instruct70B - ? OpenAPI.components["schemas"]["Llama3Instruct70BOut"] - : T extends Firellava13B - ? OpenAPI.components["schemas"]["Firellava13BOut"] - : T extends GenerateImage - ? OpenAPI.components["schemas"]["GenerateImageOut"] - : T extends MultiGenerateImage - ? OpenAPI.components["schemas"]["MultiGenerateImageOut"] - : T extends GenerativeEditImage - ? OpenAPI.components["schemas"]["GenerativeEditImageOut"] - : T extends MultiGenerativeEditImage - ? OpenAPI.components["schemas"]["MultiGenerativeEditImageOut"] - : T extends StableDiffusionXL - ? OpenAPI.components["schemas"]["StableDiffusionXLOut"] - : T extends StableDiffusionXLLightning - ? OpenAPI.components["schemas"]["StableDiffusionXLLightningOut"] - : T extends StableDiffusionXLInpaint - ? OpenAPI.components["schemas"]["StableDiffusionXLInpaintOut"] - : T extends StableDiffusionXLControlNet - ? OpenAPI.components["schemas"]["StableDiffusionXLControlNetOut"] - : T extends StableDiffusionXLIPAdapter - ? OpenAPI.components["schemas"]["StableDiffusionXLIPAdapterOut"] - : T extends TranscribeMedia - ? OpenAPI.components["schemas"]["TranscribeMediaOut"] - : T extends GenerateSpeech - ? OpenAPI.components["schemas"]["GenerateSpeechOut"] - : T extends XTTSV2 - ? OpenAPI.components["schemas"]["XTTSV2Out"] - : T extends RemoveBackground - ? OpenAPI.components["schemas"]["RemoveBackgroundOut"] - : T extends FillMask - ? OpenAPI.components["schemas"]["FillMaskOut"] - : T extends UpscaleImage - ? OpenAPI.components["schemas"]["UpscaleImageOut"] - : T extends SegmentUnderPoint - ? OpenAPI.components["schemas"]["SegmentUnderPointOut"] - : T extends DISISNet - ? OpenAPI.components["schemas"]["DISISNetOut"] - : T extends BigLaMa - ? OpenAPI.components["schemas"]["BigLaMaOut"] - : T extends RealESRGAN - ? OpenAPI.components["schemas"]["RealESRGANOut"] - : T extends SegmentAnything - ? OpenAPI.components["schemas"]["SegmentAnythingOut"] - : T extends EmbedText - ? OpenAPI.components["schemas"]["EmbedTextOut"] - : T extends MultiEmbedText - ? OpenAPI.components["schemas"]["MultiEmbedTextOut"] - : T extends EmbedImage - ? OpenAPI.components["schemas"]["EmbedImageOut"] - : T extends MultiEmbedImage - ? OpenAPI.components["schemas"]["MultiEmbedImageOut"] - : T extends JinaV2 - ? OpenAPI.components["schemas"]["JinaV2Out"] - : T extends CLIP - ? OpenAPI.components["schemas"]["CLIPOut"] - : T extends CreateVectorStore - ? OpenAPI.components["schemas"]["CreateVectorStoreOut"] - : T extends ListVectorStores - ? OpenAPI.components["schemas"]["ListVectorStoresOut"] - : T extends DeleteVectorStore - ? OpenAPI.components["schemas"]["DeleteVectorStoreOut"] - : T extends QueryVectorStore - ? OpenAPI.components["schemas"]["QueryVectorStoreOut"] - : T extends FetchVectors - ? OpenAPI.components["schemas"]["FetchVectorsOut"] - : T extends UpdateVectors - ? OpenAPI.components["schemas"]["UpdateVectorsOut"] - : T extends DeleteVectors - ? OpenAPI.components["schemas"]["DeleteVectorsOut"] - : never; +export type NodeOutput = T extends Experimental + ? OpenAPI.components["schemas"]["ExperimentalOut"] + : T extends RunPython + ? OpenAPI.components["schemas"]["RunPythonOut"] + : T extends GenerateText + ? OpenAPI.components["schemas"]["GenerateTextOut"] + : T extends MultiGenerateText + ? OpenAPI.components["schemas"]["MultiGenerateTextOut"] + : T extends BatchGenerateText + ? OpenAPI.components["schemas"]["BatchGenerateTextOut"] + : T extends BatchGenerateJSON + ? OpenAPI.components["schemas"]["BatchGenerateJSONOut"] + : T extends GenerateJSON + ? OpenAPI.components["schemas"]["GenerateJSONOut"] + : T extends MultiGenerateJSON + ? OpenAPI.components["schemas"]["MultiGenerateJSONOut"] + : T extends GenerateTextVision + ? OpenAPI.components["schemas"]["GenerateTextVisionOut"] + : T extends Mistral7BInstruct + ? OpenAPI.components["schemas"]["Mistral7BInstructOut"] + : T extends Mixtral8x7BInstruct + ? OpenAPI.components["schemas"]["Mixtral8x7BInstructOut"] + : T extends Llama3Instruct8B + ? OpenAPI.components["schemas"]["Llama3Instruct8BOut"] + : T extends Llama3Instruct70B + ? OpenAPI.components["schemas"]["Llama3Instruct70BOut"] + : T extends Firellava13B + ? OpenAPI.components["schemas"]["Firellava13BOut"] + : T extends GenerateImage + ? OpenAPI.components["schemas"]["GenerateImageOut"] + : T extends MultiGenerateImage + ? OpenAPI.components["schemas"]["MultiGenerateImageOut"] + : T extends GenerativeEditImage + ? OpenAPI.components["schemas"]["GenerativeEditImageOut"] + : T extends MultiGenerativeEditImage + ? OpenAPI.components["schemas"]["MultiGenerativeEditImageOut"] + : T extends StableDiffusionXL + ? OpenAPI.components["schemas"]["StableDiffusionXLOut"] + : T extends StableDiffusionXLLightning + ? OpenAPI.components["schemas"]["StableDiffusionXLLightningOut"] + : T extends StableDiffusionXLInpaint + ? OpenAPI.components["schemas"]["StableDiffusionXLInpaintOut"] + : T extends StableDiffusionXLControlNet + ? OpenAPI.components["schemas"]["StableDiffusionXLControlNetOut"] + : T extends StableDiffusionXLIPAdapter + ? OpenAPI.components["schemas"]["StableDiffusionXLIPAdapterOut"] + : T extends TranscribeMedia + ? OpenAPI.components["schemas"]["TranscribeMediaOut"] + : T extends GenerateSpeech + ? OpenAPI.components["schemas"]["GenerateSpeechOut"] + : T extends XTTSV2 + ? OpenAPI.components["schemas"]["XTTSV2Out"] + : T extends RemoveBackground + ? OpenAPI.components["schemas"]["RemoveBackgroundOut"] + : T extends FillMask + ? OpenAPI.components["schemas"]["FillMaskOut"] + : T extends UpscaleImage + ? OpenAPI.components["schemas"]["UpscaleImageOut"] + : T extends SegmentUnderPoint + ? OpenAPI.components["schemas"]["SegmentUnderPointOut"] + : T extends SegmentAnything + ? OpenAPI.components["schemas"]["SegmentAnythingOut"] + : T extends EmbedText + ? OpenAPI.components["schemas"]["EmbedTextOut"] + : T extends MultiEmbedText + ? OpenAPI.components["schemas"]["MultiEmbedTextOut"] + : T extends EmbedImage + ? OpenAPI.components["schemas"]["EmbedImageOut"] + : T extends MultiEmbedImage + ? OpenAPI.components["schemas"]["MultiEmbedImageOut"] + : T extends JinaV2 + ? OpenAPI.components["schemas"]["JinaV2Out"] + : T extends CLIP + ? OpenAPI.components["schemas"]["CLIPOut"] + : T extends CreateVectorStore + ? OpenAPI.components["schemas"]["CreateVectorStoreOut"] + : T extends ListVectorStores + ? OpenAPI.components["schemas"]["ListVectorStoresOut"] + : T extends DeleteVectorStore + ? OpenAPI.components["schemas"]["DeleteVectorStoreOut"] + : T extends QueryVectorStore + ? OpenAPI.components["schemas"]["QueryVectorStoreOut"] + : T extends FetchVectors + ? OpenAPI.components["schemas"]["FetchVectorsOut"] + : T extends UpdateVectors + ? OpenAPI.components["schemas"]["UpdateVectorsOut"] + : T extends DeleteVectors + ? OpenAPI.components["schemas"]["DeleteVectorsOut"] + : never; diff --git a/src/OpenAPI.ts b/src/OpenAPI.ts index 8f38ac3..75dbd88 100644 --- a/src/OpenAPI.ts +++ b/src/OpenAPI.ts @@ -4,12 +4,19 @@ */ export interface paths { - "/RunCode": { + "/Experimental": { /** - * RunCode - * @description Evaluate code using a code interpreter. + * Experimental + * @description Experimental node. */ - post: operations["RunCode"]; + post: operations["Experimental"]; + }; + "/RunPython": { + /** + * RunPython + * @description Run code using a Python interpreter. + */ + post: operations["RunPython"]; }; "/GenerateText": { /** @@ -207,27 +214,6 @@ export interface paths { */ post: operations["SegmentUnderPoint"]; }; - "/DISISNet": { - /** - * DISISNet - * @description Segment image foreground using [DIS IS-Net](https://github.com/xuebinqin/DIS). - */ - post: operations["DISISNet"]; - }; - "/BigLaMa": { - /** - * BigLaMa - * @description Inpaint a mask using [LaMa](https://github.com/advimman/lama). - */ - post: operations["BigLaMa"]; - }; - "/RealESRGAN": { - /** - * RealESRGAN - * @description Upscale an image using [RealESRGAN](https://github.com/xinntao/Real-ESRGAN). - */ - post: operations["RealESRGAN"]; - }; "/SegmentAnything": { /** * SegmentAnything @@ -341,32 +327,49 @@ export interface components { type: "api_error" | "invalid_request_error"; /** @description A message providing more details about the error. */ message: string; - /** @description A unique identifier for the request. */ - request_id?: string; }; - /** RunCodeIn */ - RunCodeIn: { - /** @description Code to execute. */ - code: string; - /** @description List of command line arguments. */ - args?: string[]; + /** ExperimentalIn */ + ExperimentalIn: { + /** @description Identifier. */ + name: string; + /** @description Arguments. */ + args: { + [key: string]: unknown; + }; /** - * @description Interpreter to use. - * @default python - * @enum {string} + * @description Timeout in seconds. + * @default 60 */ - language?: "python" | "typescript" | "javascript"; - }; - /** RunCodeOut */ - RunCodeOut: { - /** @description Contents of `stdout` after executing the code. */ - output?: string; - /** @description `output` as parsed JSON. Print serialized json to `stdout` to receive JSON. */ - json_output: { + timeout?: number; + }; + /** ExperimentalOut */ + ExperimentalOut: { + /** @description Response. */ + output: { + [key: string]: unknown; + }; + }; + /** RunPythonIn */ + RunPythonIn: { + /** @description Python code to execute. In your code, access values from the `input` parameter using the `SB_IN` variable. Update the `SB_OUT` variable with results you want returned in `output`. */ + code: string; + /** @description Input to your code, accessible using the preloaded `SB_IN` variable. */ + input?: { + [key: string]: unknown; + }; + /** @description Python packages to install. You must import them in your code. */ + pip_install?: string[]; + }; + /** RunPythonOut */ + RunPythonOut: { + /** @description Everything printed to stdout while running your code. */ + stdout: string; + /** @description Contents of the `SB_OUT` variable after running your code. */ + output: { [key: string]: unknown; }; - /** @description Contents of `stderr` after executing the code. */ - error?: string; + /** @description Contents of stderr if your code did not run successfully. */ + stderr: string; }; /** GenerateTextIn */ GenerateTextIn: { @@ -417,14 +420,16 @@ export interface components { * @default Mistral7BInstruct * @enum {string} */ - node?: "Mistral7BInstruct" | "Mixtral8x7BInstruct"; + node?: "Mistral7BInstruct" | "Mixtral8x7BInstruct" | "Llama3Instruct8B"; }; /** GenerateJSONOut */ GenerateJSONOut: { /** @description JSON response. */ - json_object: { + json_object?: { [key: string]: unknown; }; + /** @description If the model output could not be parsed to JSON, this is the raw text output. */ + text?: string; }; /** MultiGenerateTextIn */ MultiGenerateTextIn: { @@ -474,12 +479,6 @@ export interface components { temperature?: number; /** @description Maximum number of tokens to generate. */ max_tokens?: number; - /** - * @description Selected node. - * @default Mistral7BInstruct - * @enum {string} - */ - node?: "Mistral7BInstruct"; }; /** BatchGenerateTextOut */ BatchGenerateTextOut: { @@ -515,20 +514,28 @@ export interface components { * @default Mistral7BInstruct * @enum {string} */ - node?: "Mistral7BInstruct" | "Mixtral8x7BInstruct"; + node?: "Mistral7BInstruct" | "Mixtral8x7BInstruct" | "Llama3Instruct8B"; }; /** MultiGenerateJSONOut */ MultiGenerateJSONOut: { /** @description Response choices. */ choices: { /** @description JSON response. */ - json_object: { + json_object?: { [key: string]: unknown; }; + /** @description If the model output could not be parsed to JSON, this is the raw text output. */ + text?: string; }[]; }; /** BatchGenerateJSONIn */ BatchGenerateJSONIn: { + /** + * @description Selected node. + * @default Mistral7BInstruct + * @enum {string} + */ + node?: "Mistral7BInstruct" | "Llama3Instruct8B"; /** @description Batch input prompts. */ prompts: string[]; /** @description JSON schema to guide `json_object` response. */ @@ -543,21 +550,17 @@ export interface components { temperature?: number; /** @description Maximum number of tokens to generate. */ max_tokens?: number; - /** - * @description Selected node. - * @default Mistral7BInstruct - * @enum {string} - */ - node?: "Mistral7BInstruct"; }; /** BatchGenerateJSONOut */ BatchGenerateJSONOut: { /** @description Batch outputs. */ outputs: { /** @description JSON response. */ - json_object: { + json_object?: { [key: string]: unknown; }; + /** @description If the model output could not be parsed to JSON, this is the raw text output. */ + text?: string; }[]; }; /** Mistral7BInstructIn */ @@ -660,11 +663,19 @@ export interface components { temperature?: number; /** @description Maximum number of tokens to generate. */ max_tokens?: number; + /** @description JSON schema to guide response. */ + json_schema?: { + [key: string]: unknown; + }; }; /** Llama3Instruct8BChoice */ Llama3Instruct8BChoice: { /** @description Text response. */ text?: string; + /** @description JSON response, if `json_schema` was provided. */ + json_object?: { + [key: string]: unknown; + }; }; /** Llama3Instruct8BOut */ Llama3Instruct8BOut: { @@ -672,6 +683,10 @@ export interface components { choices: { /** @description Text response. */ text?: string; + /** @description JSON response, if `json_schema` was provided. */ + json_object?: { + [key: string]: unknown; + }; }[]; }; /** Llama3Instruct70BIn */ @@ -715,12 +730,6 @@ export interface components { * @default 800 */ max_tokens?: number; - /** - * @description Selected node. - * @default Firellava13B - * @enum {string} - */ - node?: "Firellava13B"; }; /** GenerateTextVisionOut */ GenerateTextVisionOut: { @@ -750,12 +759,6 @@ export interface components { prompt: string; /** @description Use "hosted" to return an image URL hosted on Substrate. You can also provide a URL to a registered [file store](https://guides.substrate.run/guides/external-file-storage). If unset, the image data will be returned as a base64-encoded string. */ store?: string; - /** - * @description Selected node. - * @default StableDiffusionXL - * @enum {string} - */ - node?: "StableDiffusionXL"; }; /** GenerateImageOut */ GenerateImageOut: { @@ -773,12 +776,6 @@ export interface components { num_images: number; /** @description Use "hosted" to return an image URL hosted on Substrate. You can also provide a URL to a registered [file store](https://guides.substrate.run/guides/external-file-storage). If unset, the image data will be returned as a base64-encoded string. */ store?: string; - /** - * @description Selected node. - * @default StableDiffusionXL - * @enum {string} - */ - node?: "StableDiffusionXL"; }; /** MultiGenerateImageOut */ MultiGenerateImageOut: { @@ -883,7 +880,7 @@ export interface components { /** @description Text prompt. */ prompt: string; /** @description Image prompt. */ - image_prompt_uri?: string; + image_prompt_uri: string; /** * @description Number of images to generate. * @default 1 @@ -976,12 +973,6 @@ export interface components { mask_image_uri?: string; /** @description Use "hosted" to return an image URL hosted on Substrate. You can also provide a URL to a registered [file store](https://guides.substrate.run/guides/external-file-storage). If unset, the image data will be returned as a base64-encoded string. */ store?: string; - /** - * @description Selected node. - * @default StableDiffusionXLInpaint - * @enum {string} - */ - node?: "StableDiffusionXLInpaint"; }; /** GenerativeEditImageOut */ GenerativeEditImageOut: { @@ -1003,12 +994,6 @@ export interface components { num_images: number; /** @description Use "hosted" to return an image URL hosted on Substrate. You can also provide a URL to a registered [file store](https://guides.substrate.run/guides/external-file-storage). If unset, the image data will be returned as a base64-encoded string. */ store?: string; - /** - * @description Selected node. - * @default StableDiffusionXLInpaint - * @enum {string} - */ - node?: "StableDiffusionXLInpaint"; }; /** MultiGenerativeEditImageOut */ MultiGenerativeEditImageOut: { @@ -1097,12 +1082,6 @@ export interface components { mask_image_uri: string; /** @description Use "hosted" to return an image URL hosted on Substrate. You can also provide a URL to a registered [file store](https://guides.substrate.run/guides/external-file-storage). If unset, the image data will be returned as a base64-encoded string. */ store?: string; - /** - * @description Selected node. - * @default BigLaMa - * @enum {string} - */ - node?: "BigLaMa"; }; /** FillMaskOut */ FillMaskOut: { @@ -1136,12 +1115,6 @@ export interface components { background_color?: string; /** @description Use "hosted" to return an image URL hosted on Substrate. You can also provide a URL to a registered [file store](https://guides.substrate.run/guides/external-file-storage). If unset, the image data will be returned as a base64-encoded string. */ store?: string; - /** - * @description Selected node. - * @default DISISNet - * @enum {string} - */ - node?: "DISISNet"; }; /** RemoveBackgroundOut */ RemoveBackgroundOut: { @@ -1166,12 +1139,6 @@ export interface components { image_uri: string; /** @description Use "hosted" to return an image URL hosted on Substrate. You can also provide a URL to a registered [file store](https://guides.substrate.run/guides/external-file-storage). If unset, the image data will be returned as a base64-encoded string. */ store?: string; - /** - * @description Selected node. - * @default RealESRGAN - * @enum {string} - */ - node?: "RealESRGAN"; }; /** UpscaleImageOut */ UpscaleImageOut: { @@ -1203,12 +1170,6 @@ export interface components { }; /** @description Use "hosted" to return an image URL hosted on Substrate. You can also provide a URL to a registered [file store](https://guides.substrate.run/guides/external-file-storage). If unset, the image data will be returned as a base64-encoded string. */ store?: string; - /** - * @description Selected node. - * @default SegmentAnything - * @enum {string} - */ - node?: "SegmentAnything"; }; /** SegmentUnderPointOut */ SegmentUnderPointOut: { @@ -1405,12 +1366,6 @@ export interface components { text: string; /** @description Use "hosted" to return an audio URL hosted on Substrate. You can also provide a URL to a registered [file store](https://guides.substrate.run/guides/external-file-storage). If unset, the audio data will be returned as a base64-encoded string. */ store?: string; - /** - * @description Selected node. - * @default XTTSV2 - * @enum {string} - */ - node?: "XTTSV2"; }; /** GenerateSpeechOut */ GenerateSpeechOut: { @@ -1453,7 +1408,7 @@ export interface components { text: string; /** @description Vector store name. */ collection_name?: string; - /** @description Metadata that can be used to query the vector store. Ignored if `store` is unset. */ + /** @description Metadata that can be used to query the vector store. Ignored if `collection_name` is unset. */ metadata?: { [key: string]: unknown; }; @@ -1486,11 +1441,11 @@ export interface components { EmbedTextItem: { /** @description Text to embed. */ text: string; - /** @description Metadata that can be used to query the vector store. Ignored if `store` is unset. */ + /** @description Metadata that can be used to query the vector store. Ignored if `collection_name` is unset. */ metadata?: { [key: string]: unknown; }; - /** @description Vector store document ID. Ignored if `store` is unset. */ + /** @description Vector store document ID. Ignored if `collection_name` is unset. */ doc_id?: string; }; /** MultiEmbedTextIn */ @@ -1499,11 +1454,11 @@ export interface components { items: { /** @description Text to embed. */ text: string; - /** @description Metadata that can be used to query the vector store. Ignored if `store` is unset. */ + /** @description Metadata that can be used to query the vector store. Ignored if `collection_name` is unset. */ metadata?: { [key: string]: unknown; }; - /** @description Vector store document ID. Ignored if `store` is unset. */ + /** @description Vector store document ID. Ignored if `collection_name` is unset. */ doc_id?: string; }[]; /** @description Vector store name. */ @@ -1537,11 +1492,11 @@ export interface components { items: { /** @description Text to embed. */ text: string; - /** @description Metadata that can be used to query the vector store. Ignored if `store` is unset. */ + /** @description Metadata that can be used to query the vector store. Ignored if `collection_name` is unset. */ metadata?: { [key: string]: unknown; }; - /** @description Vector store document ID. Ignored if `store` is unset. */ + /** @description Vector store document ID. Ignored if `collection_name` is unset. */ doc_id?: string; }[]; /** @description Vector store name. */ @@ -1569,7 +1524,7 @@ export interface components { image_uri: string; /** @description Vector store name. */ collection_name?: string; - /** @description Vector store document ID. Ignored if `store` is unset. */ + /** @description Vector store document ID. Ignored if `collection_name` is unset. */ doc_id?: string; /** * @description Selected embedding model. @@ -1596,7 +1551,7 @@ export interface components { EmbedImageItem: { /** @description Image to embed. */ image_uri: string; - /** @description Vector store document ID. Ignored if `store` is unset. */ + /** @description Vector store document ID. Ignored if `collection_name` is unset. */ doc_id?: string; }; /** EmbedTextOrImageItem */ @@ -1605,11 +1560,11 @@ export interface components { image_uri?: string; /** @description Text to embed. */ text?: string; - /** @description Metadata that can be used to query the vector store. Ignored if `store` is unset. */ + /** @description Metadata that can be used to query the vector store. Ignored if `collection_name` is unset. */ metadata?: { [key: string]: unknown; }; - /** @description Vector store document ID. Ignored if `store` is unset. */ + /** @description Vector store document ID. Ignored if `collection_name` is unset. */ doc_id?: string; }; /** MultiEmbedImageIn */ @@ -1618,7 +1573,7 @@ export interface components { items: { /** @description Image to embed. */ image_uri: string; - /** @description Vector store document ID. Ignored if `store` is unset. */ + /** @description Vector store document ID. Ignored if `collection_name` is unset. */ doc_id?: string; }[]; /** @description Vector store name. */ @@ -1652,11 +1607,11 @@ export interface components { image_uri?: string; /** @description Text to embed. */ text?: string; - /** @description Metadata that can be used to query the vector store. Ignored if `store` is unset. */ + /** @description Metadata that can be used to query the vector store. Ignored if `collection_name` is unset. */ metadata?: { [key: string]: unknown; }; - /** @description Vector store document ID. Ignored if `store` is unset. */ + /** @description Vector store document ID. Ignored if `collection_name` is unset. */ doc_id?: string; }[]; /** @description Vector store name. */ @@ -1978,32 +1933,76 @@ export type external = Record; export interface operations { /** - * RunCode - * @description Evaluate code using a code interpreter. + * Experimental + * @description Experimental node. */ - RunCode: { + Experimental: { requestBody?: { content: { /** * @example { - * "code": "import json\nimport sys\nprint(json.dumps({'foo':sys.argv[1]}))", - * "args": [ - * "bar" - * ], - * "language": "python" + * "name": "some_name", + * "args": { + * "foo": "bar" + * } * } */ "application/json": { - /** @description Code to execute. */ - code: string; - /** @description List of command line arguments. */ - args?: string[]; + /** @description Identifier. */ + name: string; + /** @description Arguments. */ + args: { + [key: string]: unknown; + }; /** - * @description Interpreter to use. - * @default python - * @enum {string} + * @description Timeout in seconds. + * @default 60 */ - language?: "python" | "typescript" | "javascript"; + timeout?: number; + }; + }; + }; + responses: { + /** @description OK */ + 200: { + content: { + "application/json": { + /** @description Response. */ + output: { + [key: string]: unknown; + }; + }; + }; + }; + }; + }; + /** + * RunPython + * @description Run code using a Python interpreter. + */ + RunPython: { + requestBody?: { + content: { + /** + * @example { + * "code": "import numpy as np; print(SB_IN['foo']); SB_OUT['result']=np.sum([1,2]).item()", + * "input": { + * "foo": "bar" + * }, + * "pip_install": [ + * "numpy" + * ] + * } + */ + "application/json": { + /** @description Python code to execute. In your code, access values from the `input` parameter using the `SB_IN` variable. Update the `SB_OUT` variable with results you want returned in `output`. */ + code: string; + /** @description Input to your code, accessible using the preloaded `SB_IN` variable. */ + input?: { + [key: string]: unknown; + }; + /** @description Python packages to install. You must import them in your code. */ + pip_install?: string[]; }; }; }; @@ -2012,14 +2011,14 @@ export interface operations { 200: { content: { "application/json": { - /** @description Contents of `stdout` after executing the code. */ - output?: string; - /** @description `output` as parsed JSON. Print serialized json to `stdout` to receive JSON. */ - json_output: { + /** @description Everything printed to stdout while running your code. */ + stdout: string; + /** @description Contents of the `SB_OUT` variable after running your code. */ + output: { [key: string]: unknown; }; - /** @description Contents of `stderr` after executing the code. */ - error?: string; + /** @description Contents of stderr if your code did not run successfully. */ + stderr: string; }; }; }; @@ -2160,12 +2159,6 @@ export interface operations { temperature?: number; /** @description Maximum number of tokens to generate. */ max_tokens?: number; - /** - * @description Selected node. - * @default Mistral7BInstruct - * @enum {string} - */ - node?: "Mistral7BInstruct"; }; }; }; @@ -2214,6 +2207,12 @@ export interface operations { * } */ "application/json": { + /** + * @description Selected node. + * @default Mistral7BInstruct + * @enum {string} + */ + node?: "Mistral7BInstruct" | "Llama3Instruct8B"; /** @description Batch input prompts. */ prompts: string[]; /** @description JSON schema to guide `json_object` response. */ @@ -2228,12 +2227,6 @@ export interface operations { temperature?: number; /** @description Maximum number of tokens to generate. */ max_tokens?: number; - /** - * @description Selected node. - * @default Mistral7BInstruct - * @enum {string} - */ - node?: "Mistral7BInstruct"; }; }; }; @@ -2245,9 +2238,11 @@ export interface operations { /** @description Batch outputs. */ outputs: { /** @description JSON response. */ - json_object: { + json_object?: { [key: string]: unknown; }; + /** @description If the model output could not be parsed to JSON, this is the raw text output. */ + text?: string; }[]; }; }; @@ -2301,7 +2296,10 @@ export interface operations { * @default Mistral7BInstruct * @enum {string} */ - node?: "Mistral7BInstruct" | "Mixtral8x7BInstruct"; + node?: + | "Mistral7BInstruct" + | "Mixtral8x7BInstruct" + | "Llama3Instruct8B"; }; }; }; @@ -2311,9 +2309,11 @@ export interface operations { content: { "application/json": { /** @description JSON response. */ - json_object: { + json_object?: { [key: string]: unknown; }; + /** @description If the model output could not be parsed to JSON, this is the raw text output. */ + text?: string; }; }; }; @@ -2372,7 +2372,10 @@ export interface operations { * @default Mistral7BInstruct * @enum {string} */ - node?: "Mistral7BInstruct" | "Mixtral8x7BInstruct"; + node?: + | "Mistral7BInstruct" + | "Mixtral8x7BInstruct" + | "Llama3Instruct8B"; }; }; }; @@ -2384,9 +2387,11 @@ export interface operations { /** @description Response choices. */ choices: { /** @description JSON response. */ - json_object: { + json_object?: { [key: string]: unknown; }; + /** @description If the model output could not be parsed to JSON, this is the raw text output. */ + text?: string; }[]; }; }; @@ -2419,12 +2424,6 @@ export interface operations { * @default 800 */ max_tokens?: number; - /** - * @description Selected node. - * @default Firellava13B - * @enum {string} - */ - node?: "Firellava13B"; }; }; }; @@ -2582,6 +2581,10 @@ export interface operations { temperature?: number; /** @description Maximum number of tokens to generate. */ max_tokens?: number; + /** @description JSON schema to guide response. */ + json_schema?: { + [key: string]: unknown; + }; }; }; }; @@ -2594,6 +2597,10 @@ export interface operations { choices: { /** @description Text response. */ text?: string; + /** @description JSON response, if `json_schema` was provided. */ + json_object?: { + [key: string]: unknown; + }; }[]; }; }; @@ -2707,12 +2714,6 @@ export interface operations { prompt: string; /** @description Use "hosted" to return an image URL hosted on Substrate. You can also provide a URL to a registered [file store](https://guides.substrate.run/guides/external-file-storage). If unset, the image data will be returned as a base64-encoded string. */ store?: string; - /** - * @description Selected node. - * @default StableDiffusionXL - * @enum {string} - */ - node?: "StableDiffusionXL"; }; }; }; @@ -2738,8 +2739,8 @@ export interface operations { /** * @example { * "prompt": "hokusai futuristic supercell spiral cloud with glowing core over turbulent ocean", - * "store": "hosted", - * "num_images": 2 + * "num_images": 2, + * "store": "hosted" * } */ "application/json": { @@ -2752,12 +2753,6 @@ export interface operations { num_images: number; /** @description Use "hosted" to return an image URL hosted on Substrate. You can also provide a URL to a registered [file store](https://guides.substrate.run/guides/external-file-storage). If unset, the image data will be returned as a base64-encoded string. */ store?: string; - /** - * @description Selected node. - * @default StableDiffusionXL - * @enum {string} - */ - node?: "StableDiffusionXL"; }; }; }; @@ -2800,12 +2795,6 @@ export interface operations { mask_image_uri?: string; /** @description Use "hosted" to return an image URL hosted on Substrate. You can also provide a URL to a registered [file store](https://guides.substrate.run/guides/external-file-storage). If unset, the image data will be returned as a base64-encoded string. */ store?: string; - /** - * @description Selected node. - * @default StableDiffusionXLInpaint - * @enum {string} - */ - node?: "StableDiffusionXLInpaint"; }; }; }; @@ -2851,12 +2840,6 @@ export interface operations { num_images: number; /** @description Use "hosted" to return an image URL hosted on Substrate. You can also provide a URL to a registered [file store](https://guides.substrate.run/guides/external-file-storage). If unset, the image data will be returned as a base64-encoded string. */ store?: string; - /** - * @description Selected node. - * @default StableDiffusionXLInpaint - * @enum {string} - */ - node?: "StableDiffusionXLInpaint"; }; }; }; @@ -2961,12 +2944,12 @@ export interface operations { * @example { * "prompt": "hokusai futuristic supercell spiral cloud with glowing core over turbulent ocean", * "negative_prompt": "night, moon", - * "store": "hosted", * "num_images": 2, * "seeds": [ * 3306990332671669000, * 13641924104177017000 - * ] + * ], + * "store": "hosted" * } */ "application/json": { @@ -3182,7 +3165,7 @@ export interface operations { /** @description Text prompt. */ prompt: string; /** @description Image prompt. */ - image_prompt_uri?: string; + image_prompt_uri: string; /** * @description Number of images to generate. * @default 1 @@ -3354,12 +3337,6 @@ export interface operations { text: string; /** @description Use "hosted" to return an audio URL hosted on Substrate. You can also provide a URL to a registered [file store](https://guides.substrate.run/guides/external-file-storage). If unset, the audio data will be returned as a base64-encoded string. */ store?: string; - /** - * @description Selected node. - * @default XTTSV2 - * @enum {string} - */ - node?: "XTTSV2"; }; }; }; @@ -3425,10 +3402,8 @@ export interface operations { content: { /** * @example { - * "image_uri": "https://guides.substrate.run/hokusai.jpeg", - * "store": "hosted", - * "background_color": "#E16E77", - * "return_mask": false + * "image_uri": "https://media.substrate.run/apple-forest.jpeg", + * "store": "hosted" * } */ "application/json": { @@ -3443,12 +3418,6 @@ export interface operations { background_color?: string; /** @description Use "hosted" to return an image URL hosted on Substrate. You can also provide a URL to a registered [file store](https://guides.substrate.run/guides/external-file-storage). If unset, the image data will be returned as a base64-encoded string. */ store?: string; - /** - * @description Selected node. - * @default DISISNet - * @enum {string} - */ - node?: "DISISNet"; }; }; }; @@ -3473,8 +3442,8 @@ export interface operations { content: { /** * @example { - * "image_uri": "https://media.substrate.run/docs-seurat.jpg", - * "mask_image_uri": "https://media.substrate.run/spiral-logo.jpeg", + * "image_uri": "https://media.substrate.run/apple-forest.jpeg", + * "mask_image_uri": "https://media.substrate.run/apple-forest-mask.jpeg", * "store": "hosted" * } */ @@ -3485,12 +3454,6 @@ export interface operations { mask_image_uri: string; /** @description Use "hosted" to return an image URL hosted on Substrate. You can also provide a URL to a registered [file store](https://guides.substrate.run/guides/external-file-storage). If unset, the image data will be returned as a base64-encoded string. */ store?: string; - /** - * @description Selected node. - * @default BigLaMa - * @enum {string} - */ - node?: "BigLaMa"; }; }; }; @@ -3524,12 +3487,6 @@ export interface operations { image_uri: string; /** @description Use "hosted" to return an image URL hosted on Substrate. You can also provide a URL to a registered [file store](https://guides.substrate.run/guides/external-file-storage). If unset, the image data will be returned as a base64-encoded string. */ store?: string; - /** - * @description Selected node. - * @default RealESRGAN - * @enum {string} - */ - node?: "RealESRGAN"; }; }; }; @@ -3574,12 +3531,6 @@ export interface operations { }; /** @description Use "hosted" to return an image URL hosted on Substrate. You can also provide a URL to a registered [file store](https://guides.substrate.run/guides/external-file-storage). If unset, the image data will be returned as a base64-encoded string. */ store?: string; - /** - * @description Selected node. - * @default SegmentAnything - * @enum {string} - */ - node?: "SegmentAnything"; }; }; }; @@ -3595,108 +3546,6 @@ export interface operations { }; }; }; - /** - * DISISNet - * @description Segment image foreground using [DIS IS-Net](https://github.com/xuebinqin/DIS). - */ - DISISNet: { - requestBody?: { - content: { - /** - * @example { - * "image_uri": "https://guides.substrate.run/hokusai.jpeg", - * "store": "hosted" - * } - */ - "application/json": { - /** @description Input image. */ - image_uri: string; - /** @description Use "hosted" to return an image URL hosted on Substrate. You can also provide a URL to a registered [file store](https://guides.substrate.run/guides/external-file-storage). If unset, the image data will be returned as a base64-encoded string. */ - store?: string; - }; - }; - }; - responses: { - /** @description OK */ - 200: { - content: { - "application/json": { - /** @description Base 64-encoded JPEG image bytes, or a hosted image url if `store` is provided. */ - image_uri: string; - }; - }; - }; - }; - }; - /** - * BigLaMa - * @description Inpaint a mask using [LaMa](https://github.com/advimman/lama). - */ - BigLaMa: { - requestBody?: { - content: { - /** - * @example { - * "image_uri": "https://media.substrate.run/docs-seurat.jpg", - * "mask_image_uri": "https://media.substrate.run/spiral-logo.jpeg", - * "store": "hosted" - * } - */ - "application/json": { - /** @description Input image. */ - image_uri: string; - /** @description Mask image that controls which pixels are inpainted. */ - mask_image_uri: string; - /** @description Use "hosted" to return an image URL hosted on Substrate. You can also provide a URL to a registered [file store](https://guides.substrate.run/guides/external-file-storage). If unset, the image data will be returned as a base64-encoded string. */ - store?: string; - }; - }; - }; - responses: { - /** @description OK */ - 200: { - content: { - "application/json": { - /** @description Base 64-encoded JPEG image bytes, or a hosted image url if `store` is provided. */ - image_uri: string; - }; - }; - }; - }; - }; - /** - * RealESRGAN - * @description Upscale an image using [RealESRGAN](https://github.com/xinntao/Real-ESRGAN). - */ - RealESRGAN: { - requestBody?: { - content: { - /** - * @example { - * "image_uri": "https://media.substrate.run/docs-seurat.jpg", - * "store": "hosted" - * } - */ - "application/json": { - /** @description Input image. */ - image_uri: string; - /** @description Use "hosted" to return an image URL hosted on Substrate. You can also provide a URL to a registered [file store](https://guides.substrate.run/guides/external-file-storage). If unset, the image data will be returned as a base64-encoded string. */ - store?: string; - }; - }; - }; - responses: { - /** @description OK */ - 200: { - content: { - "application/json": { - /** @description Base 64-encoded JPEG image bytes, or a hosted image url if `store` is provided. */ - image_uri: string; - }; - }; - }; - }; - }; /** * SegmentAnything * @description Segment an image using [SegmentAnything](https://github.com/facebookresearch/segment-anything). @@ -3791,7 +3640,7 @@ export interface operations { text: string; /** @description Vector store name. */ collection_name?: string; - /** @description Metadata that can be used to query the vector store. Ignored if `store` is unset. */ + /** @description Metadata that can be used to query the vector store. Ignored if `collection_name` is unset. */ metadata?: { [key: string]: unknown; }; @@ -3864,11 +3713,11 @@ export interface operations { items: { /** @description Text to embed. */ text: string; - /** @description Metadata that can be used to query the vector store. Ignored if `store` is unset. */ + /** @description Metadata that can be used to query the vector store. Ignored if `collection_name` is unset. */ metadata?: { [key: string]: unknown; }; - /** @description Vector store document ID. Ignored if `store` is unset. */ + /** @description Vector store document ID. Ignored if `collection_name` is unset. */ doc_id?: string; }[]; /** @description Vector store name. */ @@ -3923,7 +3772,7 @@ export interface operations { image_uri: string; /** @description Vector store name. */ collection_name?: string; - /** @description Vector store document ID. Ignored if `store` is unset. */ + /** @description Vector store document ID. Ignored if `collection_name` is unset. */ doc_id?: string; /** * @description Selected embedding model. @@ -3980,7 +3829,7 @@ export interface operations { items: { /** @description Image to embed. */ image_uri: string; - /** @description Vector store document ID. Ignored if `store` is unset. */ + /** @description Vector store document ID. Ignored if `collection_name` is unset. */ doc_id?: string; }[]; /** @description Vector store name. */ @@ -4049,11 +3898,11 @@ export interface operations { items: { /** @description Text to embed. */ text: string; - /** @description Metadata that can be used to query the vector store. Ignored if `store` is unset. */ + /** @description Metadata that can be used to query the vector store. Ignored if `collection_name` is unset. */ metadata?: { [key: string]: unknown; }; - /** @description Vector store document ID. Ignored if `store` is unset. */ + /** @description Vector store document ID. Ignored if `collection_name` is unset. */ doc_id?: string; }[]; /** @description Vector store name. */ @@ -4111,11 +3960,11 @@ export interface operations { image_uri?: string; /** @description Text to embed. */ text?: string; - /** @description Metadata that can be used to query the vector store. Ignored if `store` is unset. */ + /** @description Metadata that can be used to query the vector store. Ignored if `collection_name` is unset. */ metadata?: { [key: string]: unknown; }; - /** @description Vector store document ID. Ignored if `store` is unset. */ + /** @description Vector store document ID. Ignored if `collection_name` is unset. */ doc_id?: string; }[]; /** @description Vector store name. */ diff --git a/src/index.ts b/src/index.ts index 29d9374..992f9f0 100644 --- a/src/index.ts +++ b/src/index.ts @@ -1,12 +1,13 @@ /** - * ꩜ Substrate TypeScript SDK + * 𐃏 Substrate TypeScript SDK * @generated file - * 20240418.20240430 + * 20240530.20240531 */ export { SubstrateError } from "substrate/Error"; export { - RunCode, + Experimental, + RunPython, GenerateText, MultiGenerateText, BatchGenerateText, @@ -35,9 +36,6 @@ export { FillMask, UpscaleImage, SegmentUnderPoint, - DISISNet, - BigLaMa, - RealESRGAN, SegmentAnything, EmbedText, MultiEmbedText, diff --git a/src/openapi.json b/src/openapi.json index 23fe354..6c26a3c 100644 --- a/src/openapi.json +++ b/src/openapi.json @@ -2,7 +2,7 @@ "openapi": "3.1.0", "info": { "title": "Substrate API", - "version": "2024-04-18", + "version": "2024-05-30", "contact": { "email": "support@substrate.run" }, @@ -28,57 +28,89 @@ "message": { "type": "string", "description": "A message providing more details about the error." - }, - "request_id": { - "type": "string", - "description": "A unique identifier for the request." } }, "required": ["type", "message"] }, - "RunCodeIn": { - "title": "RunCodeIn", + "ExperimentalIn": { + "title": "ExperimentalIn", "type": "object", "properties": { - "code": { + "name": { "type": "string", - "description": "Code to execute." + "description": "Identifier.", + "x-loggable": true }, "args": { - "description": "List of command line arguments.", + "type": "object", + "description": "Arguments.", + "additionalProperties": true, + "x-loggable": true + }, + "timeout": { + "type": "integer", + "description": "Timeout in seconds.", + "default": 60, + "x-loggable": true + } + }, + "required": ["name", "args"] + }, + "ExperimentalOut": { + "title": "ExperimentalOut", + "type": "object", + "properties": { + "output": { + "type": "object", + "description": "Response.", + "additionalProperties": true + } + }, + "required": ["output"] + }, + "RunPythonIn": { + "title": "RunPythonIn", + "type": "object", + "properties": { + "code": { + "type": "string", + "description": "Python code to execute. In your code, access values from the `input` parameter using the `SB_IN` variable. Update the `SB_OUT` variable with results you want returned in `output`." + }, + "input": { + "type": "object", + "description": "Input to your code, accessible using the preloaded `SB_IN` variable.", + "additionalProperties": true + }, + "pip_install": { + "description": "Python packages to install. You must import them in your code.", "type": "array", "items": { "type": "string" - } - }, - "language": { - "type": "string", - "enum": ["python", "typescript", "javascript"], - "description": "Interpreter to use.", - "default": "python" + }, + "x-loggable": true } }, "required": ["code"] }, - "RunCodeOut": { - "title": "RunCodeOut", + "RunPythonOut": { + "title": "RunPythonOut", "type": "object", "properties": { - "output": { + "stdout": { "type": "string", - "description": "Contents of `stdout` after executing the code." + "description": "Everything printed to stdout while running your code." }, - "json_output": { + "output": { "type": "object", - "description": "`output` as parsed JSON. Print serialized json to `stdout` to receive JSON.", + "description": "Contents of the `SB_OUT` variable after running your code.", "additionalProperties": true }, - "error": { + "stderr": { "type": "string", - "description": "Contents of `stderr` after executing the code." + "description": "Contents of stderr if your code did not run successfully." } }, - "required": ["json_output"] + "required": ["stdout", "output", "stderr"] }, "GenerateTextIn": { "title": "GenerateTextIn", @@ -94,11 +126,13 @@ "minimum": 0, "maximum": 1, "default": 0.4, - "description": "Sampling temperature to use. Higher values make the output more random, lower values make the output more deterministic." + "description": "Sampling temperature to use. Higher values make the output more random, lower values make the output more deterministic.", + "x-loggable": true }, "max_tokens": { "type": "integer", - "description": "Maximum number of tokens to generate." + "description": "Maximum number of tokens to generate.", + "x-loggable": true }, "node": { "type": "string", @@ -109,7 +143,8 @@ "Llama3Instruct70B" ], "description": "Selected node.", - "default": "Mistral7BInstruct" + "default": "Mistral7BInstruct", + "x-loggable": true } }, "required": ["prompt"] @@ -144,17 +179,24 @@ "minimum": 0, "maximum": 1, "default": 0.4, - "description": "Sampling temperature to use. Higher values make the output more random, lower values make the output more deterministic." + "description": "Sampling temperature to use. Higher values make the output more random, lower values make the output more deterministic.", + "x-loggable": true }, "max_tokens": { "type": "integer", - "description": "Maximum number of tokens to generate." + "description": "Maximum number of tokens to generate.", + "x-loggable": true }, "node": { "type": "string", - "enum": ["Mistral7BInstruct", "Mixtral8x7BInstruct"], + "enum": [ + "Mistral7BInstruct", + "Mixtral8x7BInstruct", + "Llama3Instruct8B" + ], "description": "Selected node.", - "default": "Mistral7BInstruct" + "default": "Mistral7BInstruct", + "x-loggable": true } }, "required": ["prompt", "json_schema"] @@ -167,9 +209,13 @@ "type": "object", "description": "JSON response.", "additionalProperties": true + }, + "text": { + "type": "string", + "description": "If the model output could not be parsed to JSON, this is the raw text output." } }, - "required": ["json_object"] + "required": [] }, "MultiGenerateTextIn": { "title": "MultiGenerateTextIn", @@ -184,7 +230,8 @@ "description": "Number of choices to generate.", "minimum": 1, "maximum": 8, - "default": 1 + "default": 1, + "x-loggable": true }, "temperature": { "type": "number", @@ -192,11 +239,13 @@ "minimum": 0, "maximum": 1, "default": 0.4, - "description": "Sampling temperature to use. Higher values make the output more random, lower values make the output more deterministic." + "description": "Sampling temperature to use. Higher values make the output more random, lower values make the output more deterministic.", + "x-loggable": true }, "max_tokens": { "type": "integer", - "description": "Maximum number of tokens to generate." + "description": "Maximum number of tokens to generate.", + "x-loggable": true }, "node": { "type": "string", @@ -243,17 +292,13 @@ "minimum": 0, "maximum": 1, "default": 0.4, - "description": "Sampling temperature to use. Higher values make the output more random, lower values make the output more deterministic." + "description": "Sampling temperature to use. Higher values make the output more random, lower values make the output more deterministic.", + "x-loggable": true }, "max_tokens": { "type": "integer", - "description": "Maximum number of tokens to generate." - }, - "node": { - "type": "string", - "enum": ["Mistral7BInstruct"], - "description": "Selected node.", - "default": "Mistral7BInstruct" + "description": "Maximum number of tokens to generate.", + "x-loggable": true } }, "required": ["prompts"] @@ -290,7 +335,8 @@ "description": "Number of choices to generate.", "minimum": 1, "maximum": 8, - "default": 2 + "default": 2, + "x-loggable": true }, "temperature": { "type": "number", @@ -298,17 +344,24 @@ "minimum": 0, "maximum": 1, "default": 0.4, - "description": "Sampling temperature to use. Higher values make the output more random, lower values make the output more deterministic." + "description": "Sampling temperature to use. Higher values make the output more random, lower values make the output more deterministic.", + "x-loggable": true }, "max_tokens": { "type": "integer", - "description": "Maximum number of tokens to generate." + "description": "Maximum number of tokens to generate.", + "x-loggable": true }, "node": { "type": "string", - "enum": ["Mistral7BInstruct", "Mixtral8x7BInstruct"], + "enum": [ + "Mistral7BInstruct", + "Mixtral8x7BInstruct", + "Llama3Instruct8B" + ], "description": "Selected node.", - "default": "Mistral7BInstruct" + "default": "Mistral7BInstruct", + "x-loggable": true } }, "required": ["prompt", "num_choices", "json_schema"] @@ -331,6 +384,13 @@ "title": "BatchGenerateJSONIn", "type": "object", "properties": { + "node": { + "type": "string", + "enum": ["Mistral7BInstruct", "Llama3Instruct8B"], + "description": "Selected node.", + "default": "Mistral7BInstruct", + "x-loggable": true + }, "prompts": { "description": "Batch input prompts.", "type": "array", @@ -349,17 +409,13 @@ "minimum": 0, "maximum": 1, "default": 0.4, - "description": "Sampling temperature to use. Higher values make the output more random, lower values make the output more deterministic." + "description": "Sampling temperature to use. Higher values make the output more random, lower values make the output more deterministic.", + "x-loggable": true }, "max_tokens": { "type": "integer", - "description": "Maximum number of tokens to generate." - }, - "node": { - "type": "string", - "enum": ["Mistral7BInstruct"], - "description": "Selected node.", - "default": "Mistral7BInstruct" + "description": "Maximum number of tokens to generate.", + "x-loggable": true } }, "required": ["prompts", "json_schema"] @@ -391,7 +447,8 @@ "description": "Number of choices to generate.", "minimum": 1, "maximum": 8, - "default": 1 + "default": 1, + "x-loggable": true }, "json_schema": { "type": "object", @@ -403,11 +460,13 @@ "format": "float", "minimum": 0, "maximum": 1, - "description": "Sampling temperature to use. Higher values make the output more random, lower values make the output more deterministic." + "description": "Sampling temperature to use. Higher values make the output more random, lower values make the output more deterministic.", + "x-loggable": true }, "max_tokens": { "type": "integer", - "description": "Maximum number of tokens to generate." + "description": "Maximum number of tokens to generate.", + "x-loggable": true } }, "required": ["prompt"] @@ -454,7 +513,8 @@ "description": "Number of choices to generate.", "minimum": 1, "maximum": 8, - "default": 1 + "default": 1, + "x-loggable": true }, "json_schema": { "type": "object", @@ -466,11 +526,13 @@ "format": "float", "minimum": 0, "maximum": 1, - "description": "Sampling temperature to use. Higher values make the output more random, lower values make the output more deterministic." + "description": "Sampling temperature to use. Higher values make the output more random, lower values make the output more deterministic.", + "x-loggable": true }, "max_tokens": { "type": "integer", - "description": "Maximum number of tokens to generate." + "description": "Maximum number of tokens to generate.", + "x-loggable": true } }, "required": ["prompt"] @@ -517,18 +579,26 @@ "description": "Number of choices to generate.", "minimum": 1, "maximum": 8, - "default": 1 + "default": 1, + "x-loggable": true }, "temperature": { "type": "number", "format": "float", "minimum": 0, "maximum": 1, - "description": "Sampling temperature to use. Higher values make the output more random, lower values make the output more deterministic." + "description": "Sampling temperature to use. Higher values make the output more random, lower values make the output more deterministic.", + "x-loggable": true }, "max_tokens": { "type": "integer", - "description": "Maximum number of tokens to generate." + "description": "Maximum number of tokens to generate.", + "x-loggable": true + }, + "json_schema": { + "type": "object", + "description": "JSON schema to guide response.", + "additionalProperties": true } }, "required": ["prompt"] @@ -540,6 +610,11 @@ "text": { "type": "string", "description": "Text response." + }, + "json_object": { + "type": "object", + "description": "JSON response, if `json_schema` was provided.", + "additionalProperties": true } } }, @@ -570,18 +645,21 @@ "description": "Number of choices to generate.", "minimum": 1, "maximum": 8, - "default": 1 + "default": 1, + "x-loggable": true }, "temperature": { "type": "number", "format": "float", "minimum": 0, "maximum": 1, - "description": "Sampling temperature to use. Higher values make the output more random, lower values make the output more deterministic." + "description": "Sampling temperature to use. Higher values make the output more random, lower values make the output more deterministic.", + "x-loggable": true }, "max_tokens": { "type": "integer", - "description": "Maximum number of tokens to generate." + "description": "Maximum number of tokens to generate.", + "x-loggable": true } }, "required": ["prompt"] @@ -628,13 +706,8 @@ "max_tokens": { "type": "integer", "description": "Maximum number of tokens to generate.", - "default": 800 - }, - "node": { - "type": "string", - "enum": ["Firellava13B"], - "description": "Selected node.", - "default": "Firellava13B" + "default": 800, + "x-loggable": true } }, "required": ["prompt", "image_uris"] @@ -668,7 +741,8 @@ "max_tokens": { "type": "integer", "description": "Maximum number of tokens to generate.", - "default": 800 + "default": 800, + "x-loggable": true } }, "required": ["prompt", "image_uris"] @@ -695,12 +769,6 @@ "store": { "type": "string", "description": "Use \"hosted\" to return an image URL hosted on Substrate. You can also provide a URL to a registered [file store](https://guides.substrate.run/guides/external-file-storage). If unset, the image data will be returned as a base64-encoded string." - }, - "node": { - "type": "string", - "enum": ["StableDiffusionXL"], - "description": "Selected node.", - "default": "StableDiffusionXL" } }, "required": ["prompt"] @@ -729,17 +797,12 @@ "description": "Number of images to generate.", "minimum": 1, "default": 2, - "maximum": 8 + "maximum": 8, + "x-loggable": true }, "store": { "type": "string", "description": "Use \"hosted\" to return an image URL hosted on Substrate. You can also provide a URL to a registered [file store](https://guides.substrate.run/guides/external-file-storage). If unset, the image data will be returned as a base64-encoded string." - }, - "node": { - "type": "string", - "enum": ["StableDiffusionXL"], - "description": "Selected node.", - "default": "StableDiffusionXL" } }, "required": ["prompt", "num_images"] @@ -775,14 +838,16 @@ "description": "Number of diffusion steps.", "default": 30, "minimum": 0, - "maximum": 150 + "maximum": 150, + "x-loggable": true }, "num_images": { "type": "integer", "description": "Number of images to generate.", "minimum": 1, "default": 1, - "maximum": 8 + "maximum": 8, + "x-loggable": true }, "store": { "type": "string", @@ -793,21 +858,24 @@ "description": "Height of output image, in pixels.", "minimum": 256, "maximum": 1536, - "default": 1024 + "default": 1024, + "x-loggable": true }, "width": { "type": "integer", "description": "Width of output image, in pixels.", "minimum": 256, "maximum": 1536, - "default": 1024 + "default": 1024, + "x-loggable": true }, "seeds": { "type": "array", "items": { "type": "integer" }, - "description": "Seeds for deterministic generation. Default is a random seed." + "description": "Seeds for deterministic generation. Default is a random seed.", + "x-loggable": true }, "guidance_scale": { "type": "number", @@ -815,7 +883,8 @@ "description": "Higher values adhere to the text prompt more strongly, typically at the expense of image quality.", "minimum": 0, "default": 7, - "maximum": 30 + "maximum": 30, + "x-loggable": true } }, "required": ["prompt", "num_images"] @@ -866,7 +935,8 @@ "description": "Number of images to generate.", "default": 1, "minimum": 1, - "maximum": 8 + "maximum": 8, + "x-loggable": true }, "store": { "type": "string", @@ -877,21 +947,24 @@ "description": "Height of output image, in pixels.", "minimum": 256, "maximum": 1536, - "default": 1024 + "default": 1024, + "x-loggable": true }, "width": { "type": "integer", "description": "Width of output image, in pixels.", "minimum": 256, "maximum": 1536, - "default": 1024 + "default": 1024, + "x-loggable": true }, "seeds": { "type": "array", "items": { "type": "integer" }, - "description": "Seeds for deterministic generation. Default is a random seed." + "description": "Seeds for deterministic generation. Default is a random seed.", + "x-loggable": true } }, "required": ["prompt"] @@ -927,7 +1000,8 @@ "description": "Number of images to generate.", "default": 1, "minimum": 1, - "maximum": 8 + "maximum": 8, + "x-loggable": true }, "ip_adapter_scale": { "type": "number", @@ -935,7 +1009,8 @@ "description": "Controls the influence of the image prompt on the generated output.", "minimum": 0, "maximum": 1, - "default": 0.5 + "default": 0.5, + "x-loggable": true }, "negative_prompt": { "type": "string", @@ -950,24 +1025,27 @@ "description": "Width of output image, in pixels.", "minimum": 640, "maximum": 1536, - "default": 1024 + "default": 1024, + "x-loggable": true }, "height": { "type": "integer", "description": "Height of output image, in pixels.", "minimum": 640, "maximum": 1536, - "default": 1024 + "default": 1024, + "x-loggable": true }, "seeds": { "description": "Random noise seeds. Default is random seeds for each generation.", "type": "array", "items": { "type": "integer" - } + }, + "x-loggable": true } }, - "required": ["prompt", "num_images"] + "required": ["prompt", "image_prompt_uri", "num_images"] }, "StableDiffusionXLIPAdapterOut": { "title": "StableDiffusionXLIPAdapterOut", @@ -994,7 +1072,8 @@ "control_method": { "type": "string", "enum": ["edge", "depth", "illusion"], - "description": "Strategy to control generation using the input image." + "description": "Strategy to control generation using the input image.", + "x-loggable": true }, "prompt": { "type": "string", @@ -1005,12 +1084,14 @@ "description": "Number of images to generate.", "default": 1, "minimum": 1, - "maximum": 8 + "maximum": 8, + "x-loggable": true }, "output_resolution": { "type": "integer", "description": "Resolution of the output image, in pixels.", - "default": 1024 + "default": 1024, + "x-loggable": true }, "negative_prompt": { "type": "string", @@ -1026,14 +1107,16 @@ "description": "Controls the influence of the input image on the generated output.", "minimum": 0, "maximum": 1, - "default": 0.5 + "default": 0.5, + "x-loggable": true }, "seeds": { "description": "Random noise seeds. Default is random seeds for each generation.", "type": "array", "items": { "type": "integer" - } + }, + "x-loggable": true } }, "required": ["image_uri", "control_method", "prompt", "num_images"] @@ -1071,12 +1154,6 @@ "store": { "type": "string", "description": "Use \"hosted\" to return an image URL hosted on Substrate. You can also provide a URL to a registered [file store](https://guides.substrate.run/guides/external-file-storage). If unset, the image data will be returned as a base64-encoded string." - }, - "node": { - "type": "string", - "enum": ["StableDiffusionXLInpaint"], - "description": "Selected node.", - "default": "StableDiffusionXLInpaint" } }, "required": ["image_uri", "prompt"] @@ -1113,17 +1190,12 @@ "description": "Number of images to generate.", "minimum": 1, "default": 2, - "maximum": 8 + "maximum": 8, + "x-loggable": true }, "store": { "type": "string", "description": "Use \"hosted\" to return an image URL hosted on Substrate. You can also provide a URL to a registered [file store](https://guides.substrate.run/guides/external-file-storage). If unset, the image data will be returned as a base64-encoded string." - }, - "node": { - "type": "string", - "enum": ["StableDiffusionXLInpaint"], - "description": "Selected node.", - "default": "StableDiffusionXLInpaint" } }, "required": ["image_uri", "prompt", "num_images"] @@ -1163,12 +1235,14 @@ "description": "Number of images to generate.", "default": 1, "minimum": 1, - "maximum": 8 + "maximum": 8, + "x-loggable": true }, "output_resolution": { "type": "integer", "description": "Resolution of the output image, in pixels.", - "default": 1024 + "default": 1024, + "x-loggable": true }, "negative_prompt": { "type": "string", @@ -1184,14 +1258,16 @@ "description": "Controls the strength of the generation process.", "minimum": 0, "maximum": 1, - "default": 0.8 + "default": 0.8, + "x-loggable": true }, "seeds": { "description": "Random noise seeds. Default is random seeds for each generation.", "type": "array", "items": { "type": "integer" - } + }, + "x-loggable": true } }, "required": ["image_uri", "prompt", "num_images"] @@ -1267,12 +1343,6 @@ "store": { "type": "string", "description": "Use \"hosted\" to return an image URL hosted on Substrate. You can also provide a URL to a registered [file store](https://guides.substrate.run/guides/external-file-storage). If unset, the image data will be returned as a base64-encoded string." - }, - "node": { - "type": "string", - "enum": ["BigLaMa"], - "description": "Selected node.", - "default": "BigLaMa" } }, "required": ["image_uri", "mask_image_uri"] @@ -1333,17 +1403,12 @@ }, "background_color": { "type": "string", - "description": "Hex value background color. Transparent if unset." + "description": "Hex value background color. Transparent if unset.", + "x-loggable": true }, "store": { "type": "string", "description": "Use \"hosted\" to return an image URL hosted on Substrate. You can also provide a URL to a registered [file store](https://guides.substrate.run/guides/external-file-storage). If unset, the image data will be returned as a base64-encoded string." - }, - "node": { - "type": "string", - "enum": ["DISISNet"], - "description": "Selected node.", - "default": "DISISNet" } }, "required": ["image_uri"] @@ -1396,12 +1461,6 @@ "store": { "type": "string", "description": "Use \"hosted\" to return an image URL hosted on Substrate. You can also provide a URL to a registered [file store](https://guides.substrate.run/guides/external-file-storage). If unset, the image data will be returned as a base64-encoded string." - }, - "node": { - "type": "string", - "enum": ["RealESRGAN"], - "description": "Selected node.", - "default": "RealESRGAN" } }, "required": ["image_uri"] @@ -1454,17 +1513,12 @@ "point": { "description": "Point prompt.", "type": "object", - "$ref": "#/components/schemas/Point" + "$ref": "#/components/schemas/Point", + "x-loggable": true }, "store": { "type": "string", "description": "Use \"hosted\" to return an image URL hosted on Substrate. You can also provide a URL to a registered [file store](https://guides.substrate.run/guides/external-file-storage). If unset, the image data will be returned as a base64-encoded string." - }, - "node": { - "type": "string", - "enum": ["SegmentAnything"], - "description": "Selected node.", - "default": "SegmentAnything" } }, "required": ["image_uri", "point"] @@ -1493,14 +1547,16 @@ "type": "array", "items": { "$ref": "#/components/schemas/Point" - } + }, + "x-loggable": true }, "box_prompts": { "description": "Box prompts, to detect a segment within the bounding box. One of `point_prompts` or `box_prompts` must be set.", "type": "array", "items": { "$ref": "#/components/schemas/BoundingBox" - } + }, + "x-loggable": true }, "store": { "type": "string", @@ -1535,27 +1591,32 @@ "language": { "type": "string", "default": "en", - "description": "Language of input audio in [ISO-639-1](https://en.wikipedia.org/wiki/List_of_ISO_639_language_codes) format." + "description": "Language of input audio in [ISO-639-1](https://en.wikipedia.org/wiki/List_of_ISO_639_language_codes) format.", + "x-loggable": true }, "segment": { "type": "boolean", "default": false, - "description": "Segment the text into sentences with approximate timestamps." + "description": "Segment the text into sentences with approximate timestamps.", + "x-loggable": true }, "align": { "type": "boolean", "default": false, - "description": "Align transcription to produce more accurate sentence-level timestamps and word-level timestamps. An array of word segments will be included in each sentence segment." + "description": "Align transcription to produce more accurate sentence-level timestamps and word-level timestamps. An array of word segments will be included in each sentence segment.", + "x-loggable": true }, "diarize": { "type": "boolean", "default": false, - "description": "Identify speakers for each segment. Speaker IDs will be included in each segment." + "description": "Identify speakers for each segment. Speaker IDs will be included in each segment.", + "x-loggable": true }, "suggest_chapters": { "type": "boolean", "default": false, - "description": "Suggest automatic chapter markers." + "description": "Suggest automatic chapter markers.", + "x-loggable": true } }, "required": ["audio_uri"] @@ -1669,12 +1730,6 @@ "store": { "type": "string", "description": "Use \"hosted\" to return an audio URL hosted on Substrate. You can also provide a URL to a registered [file store](https://guides.substrate.run/guides/external-file-storage). If unset, the audio data will be returned as a base64-encoded string." - }, - "node": { - "type": "string", - "enum": ["XTTSV2"], - "description": "Selected node.", - "default": "XTTSV2" } }, "required": ["text"] @@ -1705,7 +1760,8 @@ "language": { "type": "string", "default": "en", - "description": "Language of input text. Supported languages: `en, de, fr, es, it, pt, pl, zh, ar, cs, ru, nl, tr, hu, ko`." + "description": "Language of input text. Supported languages: `en, de, fr, es, it, pt, pl, zh, ar, cs, ru, nl, tr, hu, ko`.", + "x-loggable": true }, "store": { "type": "string", @@ -1739,7 +1795,8 @@ }, "doc_id": { "type": "string", - "description": "Vector store document ID." + "description": "Vector store document ID.", + "x-loggable": true }, "metadata": { "type": "object", @@ -1763,7 +1820,7 @@ }, "metadata": { "type": "object", - "description": "Metadata that can be used to query the vector store. Ignored if `store` is unset.", + "description": "Metadata that can be used to query the vector store. Ignored if `collection_name` is unset.", "additionalProperties": true }, "embedded_metadata_keys": { @@ -1781,7 +1838,8 @@ "type": "string", "enum": ["jina-v2", "clip"], "description": "Selected embedding model.", - "default": "jina-v2" + "default": "jina-v2", + "x-loggable": true } }, "required": ["text"] @@ -1808,12 +1866,12 @@ }, "metadata": { "type": "object", - "description": "Metadata that can be used to query the vector store. Ignored if `store` is unset.", + "description": "Metadata that can be used to query the vector store. Ignored if `collection_name` is unset.", "additionalProperties": true }, "doc_id": { "type": "string", - "description": "Vector store document ID. Ignored if `store` is unset." + "description": "Vector store document ID. Ignored if `collection_name` is unset." } }, "required": ["text"] @@ -1844,7 +1902,8 @@ "type": "string", "enum": ["jina-v2", "clip"], "description": "Selected embedding model.", - "default": "jina-v2" + "default": "jina-v2", + "x-loggable": true } }, "required": ["items"] @@ -1916,13 +1975,15 @@ }, "doc_id": { "type": "string", - "description": "Vector store document ID. Ignored if `store` is unset." + "description": "Vector store document ID. Ignored if `collection_name` is unset.", + "x-loggable": true }, "model": { "type": "string", "enum": ["clip"], "description": "Selected embedding model.", - "default": "clip" + "default": "clip", + "x-loggable": true } }, "required": ["image_uri"] @@ -1949,7 +2010,7 @@ }, "doc_id": { "type": "string", - "description": "Vector store document ID. Ignored if `store` is unset." + "description": "Vector store document ID. Ignored if `collection_name` is unset." } }, "required": ["image_uri"] @@ -1968,12 +2029,12 @@ }, "metadata": { "type": "object", - "description": "Metadata that can be used to query the vector store. Ignored if `store` is unset.", + "description": "Metadata that can be used to query the vector store. Ignored if `collection_name` is unset.", "additionalProperties": true }, "doc_id": { "type": "string", - "description": "Vector store document ID. Ignored if `store` is unset." + "description": "Vector store document ID. Ignored if `collection_name` is unset." } }, "required": [] @@ -1997,7 +2058,8 @@ "type": "string", "enum": ["clip"], "description": "Selected embedding model.", - "default": "clip" + "default": "clip", + "x-loggable": true } }, "required": ["items"] @@ -2068,27 +2130,31 @@ "model": { "type": "string", "description": "Selected embedding model.", - "enum": ["jina-v2", "clip"] + "enum": ["jina-v2", "clip"], + "x-loggable": true }, "m": { "type": "integer", "minimum": 1, "maximum": 64, "default": 16, - "description": "The max number of connections per layer for the index." + "description": "The max number of connections per layer for the index.", + "x-loggable": true }, "ef_construction": { "type": "integer", "minimum": 1, "maximum": 128, "description": "The size of the dynamic candidate list for constructing the index graph.", - "default": 64 + "default": 64, + "x-loggable": true }, "metric": { "type": "string", "enum": ["cosine", "l2", "inner"], "default": "inner", - "description": "The distance metric to construct the index with." + "description": "The distance metric to construct the index with.", + "x-loggable": true } }, "required": ["collection_name", "model"] @@ -2166,7 +2232,8 @@ "model": { "type": "string", "description": "Selected embedding model.", - "enum": ["jina-v2", "clip"] + "enum": ["jina-v2", "clip"], + "x-loggable": true } }, "required": ["collection_name", "model"] @@ -2223,7 +2290,8 @@ "model": { "type": "string", "description": "Selected embedding model.", - "enum": ["jina-v2", "clip"] + "enum": ["jina-v2", "clip"], + "x-loggable": true }, "ids": { "type": "array", @@ -2231,7 +2299,7 @@ "items": { "type": "string" }, - "maxItems": 100 + "x-loggable": true } }, "required": ["collection_name", "model", "ids"] @@ -2307,15 +2375,15 @@ "model": { "type": "string", "description": "Selected embedding model.", - "enum": ["jina-v2", "clip"] + "enum": ["jina-v2", "clip"], + "x-loggable": true }, "vectors": { "type": "array", "description": "Vectors to upsert.", "items": { "$ref": "#/components/schemas/UpdateVectorParams" - }, - "maxItems": 100 + } } }, "required": ["collection_name", "model", "vectors"] @@ -2331,7 +2399,8 @@ "model": { "type": "string", "description": "Selected embedding model.", - "enum": ["jina-v2", "clip"] + "enum": ["jina-v2", "clip"], + "x-loggable": true }, "ids": { "type": "array", @@ -2339,7 +2408,7 @@ "items": { "type": "string" }, - "maxItems": 100 + "x-loggable": true } }, "required": ["collection_name", "model", "ids"] @@ -2355,7 +2424,8 @@ "model": { "type": "string", "description": "Selected embedding model.", - "enum": ["jina-v2", "clip"] + "enum": ["jina-v2", "clip"], + "x-loggable": true }, "query_strings": { "type": "array", @@ -2387,31 +2457,36 @@ "description": "Document IDs to use for the query.", "items": { "type": "string" - } + }, + "x-loggable": true }, "top_k": { "type": "integer", "minimum": 1, "maximum": 1000, "default": 10, - "description": "Number of results to return." + "description": "Number of results to return.", + "x-loggable": true }, "ef_search": { "type": "integer", "minimum": 1, "maximum": 1000, "default": 40, - "description": "The size of the dynamic candidate list for searching the index graph." + "description": "The size of the dynamic candidate list for searching the index graph.", + "x-loggable": true }, "include_values": { "type": "boolean", "default": false, - "description": "Include the values of the vectors in the response." + "description": "Include the values of the vectors in the response.", + "x-loggable": true }, "include_metadata": { "type": "boolean", "default": false, - "description": "Include the metadata of the vectors in the response." + "description": "Include the metadata of the vectors in the response.", + "x-loggable": true }, "filters": { "type": "object", @@ -2427,12 +2502,14 @@ "properties": { "id": { "type": "string", - "description": "Document ID." + "description": "Document ID.", + "x-loggable": true }, "distance": { "type": "number", "format": "float", - "description": "Similarity score." + "description": "Similarity score.", + "x-loggable": true }, "vector": { "type": "array", @@ -2484,22 +2561,21 @@ } }, "paths": { - "/RunCode": { + "/Experimental": { "post": { - "summary": "RunCode", - "operationId": "RunCode", - "tags": ["category:utility", "backend:v1"], - "description": "Evaluate code using a code interpreter.", + "summary": "Experimental", + "operationId": "Experimental", + "tags": ["category:utility"], + "description": "Experimental node.", "requestBody": { "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/RunCodeIn" + "$ref": "#/components/schemas/ExperimentalIn" }, "example": { - "code": "import json\nimport sys\nprint(json.dumps({'foo':sys.argv[1]}))", - "args": ["bar"], - "language": "python" + "name": "some_name", + "args": { "foo": "bar" } } } } @@ -2510,13 +2586,51 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/RunCodeOut" + "$ref": "#/components/schemas/ExperimentalOut" }, "example": { - "output": "{\"foo\": \"bar\"}\n", - "json_output": { - "foo": "bar" - } + "output": { "foo": "bar" } + } + } + } + } + } + } + }, + "/RunPython": { + "post": { + "summary": "RunPython", + "operationId": "RunPython", + "tags": ["category:utility"], + "description": "Run code using a Python interpreter.", + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/RunPythonIn" + }, + "example": { + "code": "import numpy as np; print(SB_IN['foo']); SB_OUT['result']=np.sum([1,2]).item()", + "input": { "foo": "bar" }, + "pip_install": ["numpy"] + } + } + } + }, + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/RunPythonOut" + }, + "example": { + "stdout": "bar", + "output": { + "result": 3 + }, + "stderr": "" } } } @@ -2528,7 +2642,7 @@ "post": { "summary": "GenerateText", "operationId": "GenerateText", - "tags": ["category:language-generation", "backend:v1"], + "tags": ["category:language-generation"], "description": "Generate text using a language model.", "requestBody": { "content": { @@ -2565,7 +2679,7 @@ "post": { "summary": "MultiGenerateText", "operationId": "MultiGenerateText", - "tags": ["category:language-generation", "backend:v1"], + "tags": ["category:language-generation"], "description": "Generate multiple text choices using a language model.", "requestBody": { "content": { @@ -2609,7 +2723,7 @@ "post": { "summary": "BatchGenerateText", "operationId": "BatchGenerateText", - "tags": ["category:language-generation", "backend:v1"], + "tags": ["category:language-generation"], "description": "Generate text for multiple prompts in batch using a language model.", "requestBody": { "content": { @@ -2652,7 +2766,7 @@ "post": { "summary": "BatchGenerateJSON", "operationId": "BatchGenerateJSON", - "tags": ["category:language-generation", "backend:v1"], + "tags": ["category:language-generation"], "description": "Generate JSON for multiple prompts in batch using a language model.", "requestBody": { "content": { @@ -2708,7 +2822,7 @@ "post": { "summary": "GenerateJSON", "operationId": "GenerateJSON", - "tags": ["category:language-generation", "backend:v1"], + "tags": ["category:language-generation"], "description": "Generate JSON using a language model.", "requestBody": { "content": { @@ -2758,7 +2872,7 @@ "post": { "summary": "MultiGenerateJSON", "operationId": "MultiGenerateJSON", - "tags": ["category:language-generation", "backend:v1"], + "tags": ["category:language-generation"], "description": "Generate multiple JSON choices using a language model.", "requestBody": { "content": { @@ -2816,7 +2930,7 @@ "post": { "summary": "GenerateTextVision", "operationId": "GenerateTextVision", - "tags": ["category:language-generation", "backend:v1"], + "tags": ["category:language-generation"], "description": "Generate text with image input.", "requestBody": { "content": { @@ -2855,11 +2969,7 @@ "post": { "summary": "Mistral7BInstruct", "operationId": "Mistral7BInstruct", - "tags": [ - "category:language-generation", - "backend:v1", - "type:low-level" - ], + "tags": ["category:language-generation", "type:low-level"], "description": "Generate text using [Mistral 7B Instruct](https://mistral.ai/news/announcing-mistral-7b).", "requestBody": { "content": { @@ -2904,11 +3014,7 @@ "post": { "summary": "Mixtral8x7BInstruct", "operationId": "Mixtral8x7BInstruct", - "tags": [ - "category:language-generation", - "backend:v1", - "type:low-level" - ], + "tags": ["category:language-generation", "type:low-level"], "description": "Generate text using instruct-tuned [Mixtral 8x7B](https://mistral.ai/news/mixtral-of-experts/).", "requestBody": { "content": { @@ -2953,11 +3059,7 @@ "post": { "summary": "Llama3Instruct8B", "operationId": "Llama3Instruct8B", - "tags": [ - "category:language-generation", - "backend:v1", - "type:low-level" - ], + "tags": ["category:language-generation", "type:low-level"], "description": "Generate text using instruct-tuned [Llama 3 8B](https://llama.meta.com/llama3/).", "requestBody": { "content": { @@ -3002,11 +3104,7 @@ "post": { "summary": "Llama3Instruct70B", "operationId": "Llama3Instruct70B", - "tags": [ - "category:language-generation", - "backend:v1", - "type:low-level" - ], + "tags": ["category:language-generation", "type:low-level"], "description": "Generate text using instruct-tuned [Llama 3 70B](https://llama.meta.com/llama3/).", "requestBody": { "content": { @@ -3051,11 +3149,7 @@ "post": { "summary": "Firellava13B", "operationId": "Firellava13B", - "tags": [ - "category:language-generation", - "backend:v1", - "type:low-level" - ], + "tags": ["category:language-generation", "type:low-level"], "description": "Generate text with image input using [FireLLaVA 13B](https://fireworks.ai/blog/firellava-the-first-commercially-permissive-oss-llava-model).", "requestBody": { "content": { @@ -3094,7 +3188,7 @@ "post": { "summary": "GenerateImage", "operationId": "GenerateImage", - "tags": ["category:image-generation", "backend:v0"], + "tags": ["category:image-generation"], "description": "Generate an image.", "requestBody": { "content": { @@ -3130,7 +3224,7 @@ "post": { "summary": "MultiGenerateImage", "operationId": "MultiGenerateImage", - "tags": ["category:image-generation", "backend:v0"], + "tags": ["category:image-generation"], "description": "Generate multiple images.", "requestBody": { "content": { @@ -3140,8 +3234,8 @@ }, "example": { "prompt": "hokusai futuristic supercell spiral cloud with glowing core over turbulent ocean", - "store": "hosted", - "num_images": 2 + "num_images": 2, + "store": "hosted" } } } @@ -3174,7 +3268,7 @@ "post": { "summary": "GenerativeEditImage", "operationId": "GenerativeEditImage", - "tags": ["category:image-generation", "backend:v0"], + "tags": ["category:image-generation"], "description": "Edit an image using image generation.", "requestBody": { "content": { @@ -3212,7 +3306,7 @@ "post": { "summary": "MultiGenerativeEditImage", "operationId": "MultiGenerativeEditImage", - "tags": ["category:image-generation", "backend:v0"], + "tags": ["category:image-generation"], "description": "Edit multiple images using image generation.", "requestBody": { "content": { @@ -3258,7 +3352,7 @@ "post": { "summary": "StableDiffusionXL", "operationId": "StableDiffusionXL", - "tags": ["category:image-generation", "backend:v0", "type:low-level"], + "tags": ["category:image-generation", "type:low-level"], "description": "Generate an image using [Stable Diffusion XL](https://arxiv.org/abs/2307.01952).", "requestBody": { "content": { @@ -3307,7 +3401,7 @@ "post": { "summary": "StableDiffusionXLLightning", "operationId": "StableDiffusionXLLightning", - "tags": ["category:image-generation", "backend:v0", "type:low-level"], + "tags": ["category:image-generation", "type:low-level"], "description": "Generate an image using [Stable Diffusion XL Lightning](https://arxiv.org/abs/2402.13929).", "requestBody": { "content": { @@ -3318,9 +3412,9 @@ "example": { "prompt": "hokusai futuristic supercell spiral cloud with glowing core over turbulent ocean", "negative_prompt": "night, moon", - "store": "hosted", "num_images": 2, - "seeds": [3306990332671669418, 13641924104177017164] + "seeds": [3306990332671669418, 13641924104177017164], + "store": "hosted" } } } @@ -3355,7 +3449,7 @@ "post": { "summary": "StableDiffusionXLInpaint", "operationId": "StableDiffusionXLInpaint", - "tags": ["category:image-generation", "backend:v0", "type:low-level"], + "tags": ["category:image-generation", "type:low-level"], "description": "Edit an image using [Stable Diffusion XL](https://arxiv.org/abs/2307.01952). Supports inpainting (edit part of the image with a mask) and image-to-image (edit the full image).", "requestBody": { "content": { @@ -3406,7 +3500,7 @@ "post": { "summary": "StableDiffusionXLControlNet", "operationId": "StableDiffusionXLControlNet", - "tags": ["category:image-generation", "type:low-level", "backend:v0"], + "tags": ["category:image-generation"], "description": "Generate an image with generation structured by an input image, using Stable Diffusion XL with [ControlNet](https://arxiv.org/abs/2302.05543).", "requestBody": { "content": { @@ -3456,7 +3550,7 @@ "post": { "summary": "StableDiffusionXLIPAdapter", "operationId": "StableDiffusionXLIPAdapter", - "tags": ["category:image-generation", "type:low-level", "backend:v0"], + "tags": ["category:image-generation", "type:low-level"], "description": "Generate an image with an image prompt, using Stable Diffusion XL with [IP-Adapter](https://arxiv.org/abs/2308.06721).", "requestBody": { "content": { @@ -3506,7 +3600,7 @@ "post": { "summary": "TranscribeMedia", "operationId": "TranscribeMedia", - "tags": ["category:audio", "backend:v0"], + "tags": ["category:audio"], "description": "Transcribe speech in an audio or video file.", "requestBody": { "content": { @@ -3614,7 +3708,7 @@ "post": { "summary": "XTTSV2", "operationId": "XTTSV2", - "tags": ["category:audio", "type:low-level", "backend:v1"], + "tags": ["category:audio", "type:low-level"], "description": "Generate speech from text using [XTTS v2](https://docs.coqui.ai/en/latest/models/xtts.html).", "requestBody": { "content": { @@ -3651,7 +3745,7 @@ "post": { "summary": "RemoveBackground", "operationId": "RemoveBackground", - "tags": ["category:image-utility", "backend:v1"], + "tags": ["category:image-utility"], "description": "Remove the background from an image, with the option to return the foreground as a mask.", "requestBody": { "content": { @@ -3660,10 +3754,8 @@ "$ref": "#/components/schemas/RemoveBackgroundIn" }, "example": { - "image_uri": "https://guides.substrate.run/hokusai.jpeg", - "store": "hosted", - "background_color": "#E16E77", - "return_mask": false + "image_uri": "https://media.substrate.run/apple-forest.jpeg", + "store": "hosted" } } } @@ -3689,7 +3781,7 @@ "post": { "summary": "FillMask", "operationId": "FillMask", - "tags": ["category:image-utility", "backend:v1"], + "tags": ["category:image-utility"], "description": "Fill (inpaint) part of an image, e.g. to 'remove' an object.", "requestBody": { "content": { @@ -3698,8 +3790,8 @@ "$ref": "#/components/schemas/FillMaskIn" }, "example": { - "image_uri": "https://media.substrate.run/docs-seurat.jpg", - "mask_image_uri": "https://media.substrate.run/spiral-logo.jpeg", + "image_uri": "https://media.substrate.run/apple-forest.jpeg", + "mask_image_uri": "https://media.substrate.run/apple-forest-mask.jpeg", "store": "hosted" } } @@ -3726,7 +3818,7 @@ "post": { "summary": "UpscaleImage", "operationId": "UpscaleImage", - "tags": ["category:image-utility", "backend:v1"], + "tags": ["category:image-utility"], "description": "Upscale an image.", "requestBody": { "content": { @@ -3762,7 +3854,7 @@ "post": { "summary": "SegmentUnderPoint", "operationId": "SegmentUnderPoint", - "tags": ["category:image-utility", "backend:v1"], + "tags": ["category:image-utility"], "description": "Segment an image under a point and return the segment.", "requestBody": { "content": { @@ -3798,120 +3890,11 @@ } } }, - "/DISISNet": { - "post": { - "summary": "DISISNet", - "operationId": "DISISNet", - "tags": ["category:image-utility", "backend:v1"], - "description": "Segment image foreground using [DIS IS-Net](https://github.com/xuebinqin/DIS).", - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/DISISNetIn" - }, - "example": { - "image_uri": "https://guides.substrate.run/hokusai.jpeg", - "store": "hosted" - } - } - } - }, - "responses": { - "200": { - "description": "OK", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/DISISNetOut" - }, - "example": { - "image_uri": "https://assets.substrate.run/84848484.jpg" - } - } - } - } - } - } - }, - "/BigLaMa": { - "post": { - "summary": "BigLaMa", - "operationId": "BigLaMa", - "tags": ["category:image-utility", "type:low-level", "backend:v1"], - "description": "Inpaint a mask using [LaMa](https://github.com/advimman/lama).", - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/BigLaMaIn" - }, - "example": { - "image_uri": "https://media.substrate.run/docs-seurat.jpg", - "mask_image_uri": "https://media.substrate.run/spiral-logo.jpeg", - "store": "hosted" - } - } - } - }, - "responses": { - "200": { - "description": "OK", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/BigLaMaOut" - }, - "example": { - "image_uri": "https://assets.substrate.run/84848484.jpg" - } - } - } - } - } - } - }, - "/RealESRGAN": { - "post": { - "summary": "RealESRGAN", - "operationId": "RealESRGAN", - "tags": ["category:image-utility", "type:low-level", "backend:v1"], - "description": "Upscale an image using [RealESRGAN](https://github.com/xinntao/Real-ESRGAN).", - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/RealESRGANIn" - }, - "example": { - "image_uri": "https://media.substrate.run/docs-seurat.jpg", - "store": "hosted" - } - } - } - }, - "responses": { - "200": { - "description": "OK", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/RealESRGANOut" - }, - "example": { - "image_uri": "https://assets.substrate.run/84848484.jpg" - } - } - } - } - } - } - }, "/SegmentAnything": { "post": { "summary": "SegmentAnything", "operationId": "SegmentAnything", - "tags": ["category:image-utility", "type:low-level", "backend:v1"], + "tags": ["category:image-utility", "type:low-level"], "description": "Segment an image using [SegmentAnything](https://github.com/facebookresearch/segment-anything).", "requestBody": { "content": { @@ -3953,7 +3936,7 @@ "post": { "summary": "EmbedText", "operationId": "EmbedText", - "tags": ["category:embedding", "backend:v1"], + "tags": ["category:embedding"], "description": "Generate embedding for a text document.", "requestBody": { "content": { @@ -4005,7 +3988,7 @@ "post": { "summary": "MultiEmbedText", "operationId": "MultiEmbedText", - "tags": ["category:embedding", "backend:v1"], + "tags": ["category:embedding"], "description": "Generate embeddings for multiple text documents.", "requestBody": { "content": { @@ -4081,7 +4064,7 @@ "post": { "summary": "EmbedImage", "operationId": "EmbedImage", - "tags": ["category:embedding", "backend:v1"], + "tags": ["category:embedding"], "description": "Generate embedding for an image.", "requestBody": { "content": { @@ -4123,7 +4106,7 @@ "post": { "summary": "MultiEmbedImage", "operationId": "MultiEmbedImage", - "tags": ["category:embedding", "backend:v1"], + "tags": ["category:embedding"], "description": "Generate embeddings for multiple images.", "requestBody": { "content": { @@ -4181,7 +4164,7 @@ "post": { "summary": "JinaV2", "operationId": "JinaV2", - "tags": ["category:embedding", "type:low-level", "backend:v1"], + "tags": ["category:embedding", "type:low-level"], "description": "Generate embeddings for multiple text documents using [Jina Embeddings 2](https://arxiv.org/abs/2310.19923).", "requestBody": { "content": { @@ -4256,7 +4239,7 @@ "post": { "summary": "CLIP", "operationId": "CLIP", - "tags": ["category:embedding", "type:low-level", "backend:v1"], + "tags": ["category:embedding", "type:low-level"], "description": "Generate embeddings for text or images using [CLIP](https://openai.com/research/clip).", "requestBody": { "content": { @@ -4312,7 +4295,7 @@ }, "/CreateVectorStore": { "post": { - "tags": ["category:vector-store", "backend:v1"], + "tags": ["category:vector-store"], "summary": "CreateVectorStore", "operationId": "CreateVectorStore", "description": "Create a vector store for storing and querying embeddings.", @@ -4352,7 +4335,7 @@ }, "/ListVectorStores": { "post": { - "tags": ["category:vector-store", "backend:v1"], + "tags": ["category:vector-store"], "summary": "ListVectorStores", "operationId": "ListVectorStores", "description": "List all vector stores.", @@ -4400,7 +4383,7 @@ }, "/DeleteVectorStore": { "post": { - "tags": ["category:vector-store", "backend:v1"], + "tags": ["category:vector-store"], "summary": "DeleteVectorStore", "operationId": "DeleteVectorStore", "description": "Delete a vector store.", @@ -4437,7 +4420,7 @@ }, "/QueryVectorStore": { "post": { - "tags": ["category:vector-store", "backend:v1"], + "tags": ["category:vector-store"], "summary": "QueryVectorStore", "operationId": "QueryVectorStore", "description": "Query a vector store for similar vectors.", @@ -4502,7 +4485,7 @@ }, "/FetchVectors": { "post": { - "tags": ["category:vector-store", "backend:v1"], + "tags": ["category:vector-store"], "summary": "FetchVectors", "operationId": "FetchVectors", "description": "Fetch vectors from a vector store.", @@ -4549,7 +4532,7 @@ }, "/UpdateVectors": { "post": { - "tags": ["category:vector-store", "backend:v1"], + "tags": ["category:vector-store"], "summary": "UpdateVectors", "operationId": "UpdateVectors", "description": "Update vectors in a vector store.", @@ -4593,7 +4576,7 @@ }, "/DeleteVectors": { "post": { - "tags": ["category:vector-store", "backend:v1"], + "tags": ["category:vector-store"], "summary": "DeleteVectors", "operationId": "DeleteVectors", "description": "Delete vectors in a vector store.", diff --git a/src/version.ts b/src/version.ts index 197f8a8..78bd8aa 100644 --- a/src/version.ts +++ b/src/version.ts @@ -1 +1 @@ -export const VERSION = "120240418.0.13"; +export const VERSION = "120240530.0.13";