From f1374bf72f49cbba18b7e9f214c99eff08a45540 Mon Sep 17 00:00:00 2001 From: Rob Cheung Date: Wed, 11 Sep 2024 13:59:18 -0400 Subject: [PATCH 1/3] other keys --- src/Substrate.ts | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/src/Substrate.ts b/src/Substrate.ts index 4ecb6cc..7dbbfd3 100644 --- a/src/Substrate.ts +++ b/src/Substrate.ts @@ -41,6 +41,8 @@ type Configuration = { export type Secrets = { openai?: string; anthropic?: string; + together?: string; + jina?: string; }; /** @@ -82,6 +84,13 @@ export class Substrate { this.additionalHeaders["x-substrate-anthropic-api-key"] = secrets.anthropic; } + if (secrets.together) { + this.additionalHeaders["x-substrate-together-api-key"] = + secrets.together; + } + if (secrets.jina) { + this.additionalHeaders["x-substrate-jina-api-key"] = secrets.jina; + } } } From 59dbc1cb7cc6ec7eef87767fb319de6e35a753fa Mon Sep 17 00:00:00 2001 From: Rob Cheung Date: Wed, 11 Sep 2024 14:20:18 -0400 Subject: [PATCH 2/3] --wip-- [skip ci] --- examples/basic.ts | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/examples/basic.ts b/examples/basic.ts index 8d55cce..cef54a6 100755 --- a/examples/basic.ts +++ b/examples/basic.ts @@ -7,9 +7,15 @@ async function main() { const substrate = new Substrate({ apiKey: SUBSTRATE_API_KEY }); - const story = new ComputeText({ prompt: "tell me a story" }); + const story = new ComputeText({ + prompt: "tell me a story", + model: "Llama3Instruct8B", + temperature: 0.8, + }); const summary = new ComputeText({ + model: "Llama3Instruct8B", prompt: sb.interpolate`summarize this story in one sentence: ${story.future.text}`, + temperature: 0.3, }); const res = await substrate.run(story, summary); From 78fa4a265d2cf58e6fbcab325d93087b8600b2a6 Mon Sep 17 00:00:00 2001 From: Rob Cheung Date: Wed, 11 Sep 2024 14:22:13 -0400 Subject: [PATCH 3/3] sync --- src/GEN_VERSION | 2 +- src/Nodes.ts | 16 +- src/OpenAPI.ts | 2248 ++++++++++++++++------------------------------ src/index.ts | 2 +- src/openapi.json | 8 +- 5 files changed, 770 insertions(+), 1506 deletions(-) diff --git a/src/GEN_VERSION b/src/GEN_VERSION index 710ae09..e5884d6 100644 --- a/src/GEN_VERSION +++ b/src/GEN_VERSION @@ -1 +1 @@ -20240617.20240815 \ No newline at end of file +20240617.20240911 \ No newline at end of file diff --git a/src/Nodes.ts b/src/Nodes.ts index 669cc77..e38ee4a 100644 --- a/src/Nodes.ts +++ b/src/Nodes.ts @@ -1,7 +1,7 @@ /** * 𐃏 Substrate * @generated file - * 20240617.20240815 + * 20240617.20240911 */ import * as OpenAPI from "substrate/OpenAPI"; @@ -2301,11 +2301,11 @@ export class TranscribeSpeechIn extends FutureObject { get prompt() { return new FutureString(this._directive.next("prompt")); } - /** (Optional) Language of input audio in [ISO-639-1](https://en.wikipedia.org/wiki/List_of_ISO_639_language_codes) format. */ + /** (Optional) Language of input audio in [ISO-639-1](https://en.wikipedia.org/wiki/List_of_ISO_639_language_codes) format. Use `auto` to automatically detect the language. */ get language() { return new FutureString(this._directive.next("language")); } - /** (Optional) Segment the text into sentences with approximate timestamps. */ + /** (Optional) (Deprecated) Segment the text into sentences with approximate timestamps. */ get segment() { return new FutureBoolean(this._directive.next("segment")); } @@ -2403,6 +2403,10 @@ export class TranscribeSpeechOut extends FutureObject { get segments() { return new TranscribeSpeechOutSegments(this._directive.next("segments")); } + /** (Optional) Language code of transcribed text. */ + get language() { + return new FutureString(this._directive.next("language")); + } /** (Optional) Chapter markers, if `suggest_chapters` is enabled. */ get chapters() { @@ -4866,7 +4870,7 @@ export class TranscribeSpeech extends Node { /** * Input arguments: `audio_uri`, `prompt` (optional), `language` (optional), `segment` (optional), `align` (optional), `diarize` (optional), `suggest_chapters` (optional) * - * Output fields: `text`, `segments` (optional), `chapters` (optional) + * Output fields: `text`, `segments` (optional), `language` (optional), `chapters` (optional) * * https://www.substrate.run/nodes#TranscribeSpeech */ @@ -4881,7 +4885,7 @@ export class TranscribeSpeech extends Node { /** * Retrieve this node's output from a response. * - * Output fields: `text`, `segments` (optional), `chapters` (optional) + * Output fields: `text`, `segments` (optional), `language` (optional), `chapters` (optional) * * https://www.substrate.run/nodes#TranscribeSpeech */ @@ -4898,7 +4902,7 @@ export class TranscribeSpeech extends Node { /** * Future reference to this node's output. * - * Output fields: `text`, `segments` (optional), `chapters` (optional) + * Output fields: `text`, `segments` (optional), `language` (optional), `chapters` (optional) * * https://www.substrate.run/nodes#TranscribeSpeech */ diff --git a/src/OpenAPI.ts b/src/OpenAPI.ts index c4083a1..ea79dd8 100644 --- a/src/OpenAPI.ts +++ b/src/OpenAPI.ts @@ -5,947 +5,338 @@ export interface paths { "/Experimental": { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; - get?: never; - put?: never; /** * Experimental * @description Experimental node. */ post: operations["Experimental"]; - delete?: never; - options?: never; - head?: never; - patch?: never; - trace?: never; }; "/Box": { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; - get?: never; - put?: never; /** * Box * @description Combine multiple values into a single output. */ post: operations["Box"]; - delete?: never; - options?: never; - head?: never; - patch?: never; - trace?: never; }; "/If": { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; - get?: never; - put?: never; /** * If * @description Return one of two options based on a condition. */ post: operations["If"]; - delete?: never; - options?: never; - head?: never; - patch?: never; - trace?: never; }; "/RunPython": { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; - get?: never; - put?: never; /** * RunPython * @description Run code using a Python interpreter. */ post: operations["RunPython"]; - delete?: never; - options?: never; - head?: never; - patch?: never; - trace?: never; }; "/ComputeText": { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; - get?: never; - put?: never; /** * ComputeText * @description Compute text using a language model. */ post: operations["ComputeText"]; - delete?: never; - options?: never; - head?: never; - patch?: never; - trace?: never; }; "/MultiComputeText": { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; - get?: never; - put?: never; /** * MultiComputeText * @description Generate multiple text choices using a language model. */ post: operations["MultiComputeText"]; - delete?: never; - options?: never; - head?: never; - patch?: never; - trace?: never; }; "/BatchComputeText": { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; - get?: never; - put?: never; /** * BatchComputeText * @description Compute text for multiple prompts in batch using a language model. */ post: operations["BatchComputeText"]; - delete?: never; - options?: never; - head?: never; - patch?: never; - trace?: never; }; "/BatchComputeJSON": { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; - get?: never; - put?: never; /** * BatchComputeJSON * @description Compute JSON for multiple prompts in batch using a language model. */ post: operations["BatchComputeJSON"]; - delete?: never; - options?: never; - head?: never; - patch?: never; - trace?: never; }; "/ComputeJSON": { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; - get?: never; - put?: never; /** * ComputeJSON * @description Compute JSON using a language model. */ post: operations["ComputeJSON"]; - delete?: never; - options?: never; - head?: never; - patch?: never; - trace?: never; }; "/MultiComputeJSON": { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; - get?: never; - put?: never; /** * MultiComputeJSON * @description Compute multiple JSON choices using a language model. */ post: operations["MultiComputeJSON"]; - delete?: never; - options?: never; - head?: never; - patch?: never; - trace?: never; }; "/GenerateCode": { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; - get?: never; - put?: never; /** * GenerateCode * @description Generate code in the specified language based on the prompt. */ post: operations["GenerateCode"]; - delete?: never; - options?: never; - head?: never; - patch?: never; - trace?: never; }; "/MultiGenerateCode": { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; - get?: never; - put?: never; /** * MultiGenerateCode * @description Generate multiple choices of code in the specified language based on the prompt. */ post: operations["MultiGenerateCode"]; - delete?: never; - options?: never; - head?: never; - patch?: never; - trace?: never; }; "/Mistral7BInstruct": { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; - get?: never; - put?: never; /** * Mistral7BInstruct * @description Compute text using [Mistral 7B Instruct](https://mistral.ai/news/announcing-mistral-7b). */ post: operations["Mistral7BInstruct"]; - delete?: never; - options?: never; - head?: never; - patch?: never; - trace?: never; }; "/Mixtral8x7BInstruct": { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; - get?: never; - put?: never; /** * Mixtral8x7BInstruct * @description Compute text using instruct-tuned [Mixtral 8x7B](https://mistral.ai/news/mixtral-of-experts/). */ post: operations["Mixtral8x7BInstruct"]; - delete?: never; - options?: never; - head?: never; - patch?: never; - trace?: never; }; "/Llama3Instruct8B": { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; - get?: never; - put?: never; /** * Llama3Instruct8B * @description Compute text using instruct-tuned [Llama 3 8B](https://llama.meta.com/llama3/). */ post: operations["Llama3Instruct8B"]; - delete?: never; - options?: never; - head?: never; - patch?: never; - trace?: never; }; "/Llama3Instruct70B": { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; - get?: never; - put?: never; /** * Llama3Instruct70B * @description Compute text using instruct-tuned [Llama 3 70B](https://llama.meta.com/llama3/). */ post: operations["Llama3Instruct70B"]; - delete?: never; - options?: never; - head?: never; - patch?: never; - trace?: never; }; "/Firellava13B": { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; - get?: never; - put?: never; /** * Firellava13B * @description Compute text with image input using [FireLLaVA 13B](https://fireworks.ai/blog/firellava-the-first-commercially-permissive-oss-llava-model). */ post: operations["Firellava13B"]; - delete?: never; - options?: never; - head?: never; - patch?: never; - trace?: never; }; "/GenerateImage": { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; - get?: never; - put?: never; /** * GenerateImage * @description Generate an image. */ post: operations["GenerateImage"]; - delete?: never; - options?: never; - head?: never; - patch?: never; - trace?: never; }; "/MultiGenerateImage": { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; - get?: never; - put?: never; /** * MultiGenerateImage * @description Generate multiple images. */ post: operations["MultiGenerateImage"]; - delete?: never; - options?: never; - head?: never; - patch?: never; - trace?: never; }; "/InpaintImage": { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; - get?: never; - put?: never; /** * InpaintImage * @description Edit an image using image generation inside part of the image or the full image. */ post: operations["InpaintImage"]; - delete?: never; - options?: never; - head?: never; - patch?: never; - trace?: never; }; "/MultiInpaintImage": { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; - get?: never; - put?: never; /** * MultiInpaintImage * @description Edit multiple images using image generation. */ post: operations["MultiInpaintImage"]; - delete?: never; - options?: never; - head?: never; - patch?: never; - trace?: never; }; "/StableDiffusionXLLightning": { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; - get?: never; - put?: never; /** * StableDiffusionXLLightning * @description Generate an image using [Stable Diffusion XL Lightning](https://arxiv.org/abs/2402.13929). */ post: operations["StableDiffusionXLLightning"]; - delete?: never; - options?: never; - head?: never; - patch?: never; - trace?: never; }; "/StableDiffusionXLInpaint": { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; - get?: never; - put?: never; /** * StableDiffusionXLInpaint * @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). */ post: operations["StableDiffusionXLInpaint"]; - delete?: never; - options?: never; - head?: never; - patch?: never; - trace?: never; }; "/StableDiffusionXLControlNet": { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; - get?: never; - put?: never; /** * StableDiffusionXLControlNet * @description Generate an image with generation structured by an input image, using Stable Diffusion XL with [ControlNet](https://arxiv.org/abs/2302.05543). */ post: operations["StableDiffusionXLControlNet"]; - delete?: never; - options?: never; - head?: never; - patch?: never; - trace?: never; }; "/StableVideoDiffusion": { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; - get?: never; - put?: never; /** * StableVideoDiffusion * @description Generates a video using a still image as conditioning frame. */ post: operations["StableVideoDiffusion"]; - delete?: never; - options?: never; - head?: never; - patch?: never; - trace?: never; }; "/InterpolateFrames": { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; - get?: never; - put?: never; /** * InterpolateFrames * @description Generates a interpolation frames between each adjacent frames. */ post: operations["InterpolateFrames"]; - delete?: never; - options?: never; - head?: never; - patch?: never; - trace?: never; }; "/TranscribeSpeech": { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; - get?: never; - put?: never; /** * TranscribeSpeech * @description Transcribe speech in an audio or video file. */ post: operations["TranscribeSpeech"]; - delete?: never; - options?: never; - head?: never; - patch?: never; - trace?: never; }; "/GenerateSpeech": { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; - get?: never; - put?: never; /** * GenerateSpeech * @description Generate speech from text. */ post: operations["GenerateSpeech"]; - delete?: never; - options?: never; - head?: never; - patch?: never; - trace?: never; }; "/RemoveBackground": { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; - get?: never; - put?: never; /** * RemoveBackground * @description Remove the background from an image and return the foreground segment as a cut-out or a mask. */ post: operations["RemoveBackground"]; - delete?: never; - options?: never; - head?: never; - patch?: never; - trace?: never; }; "/EraseImage": { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; - get?: never; - put?: never; /** * EraseImage * @description Erase the masked part of an image, e.g. to remove an object by inpainting. */ post: operations["EraseImage"]; - delete?: never; - options?: never; - head?: never; - patch?: never; - trace?: never; }; "/UpscaleImage": { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; - get?: never; - put?: never; /** * UpscaleImage * @description Upscale an image using image generation. */ post: operations["UpscaleImage"]; - delete?: never; - options?: never; - head?: never; - patch?: never; - trace?: never; }; "/SegmentUnderPoint": { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; - get?: never; - put?: never; /** * SegmentUnderPoint * @description Segment an image under a point and return the segment. */ post: operations["SegmentUnderPoint"]; - delete?: never; - options?: never; - head?: never; - patch?: never; - trace?: never; }; "/SegmentAnything": { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; - get?: never; - put?: never; /** * SegmentAnything * @description Segment an image using [SegmentAnything](https://github.com/facebookresearch/segment-anything). */ post: operations["SegmentAnything"]; - delete?: never; - options?: never; - head?: never; - patch?: never; - trace?: never; }; "/SplitDocument": { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; - get?: never; - put?: never; /** * SplitDocument * @description Split document into text segments. */ post: operations["SplitDocument"]; - delete?: never; - options?: never; - head?: never; - patch?: never; - trace?: never; }; "/EmbedText": { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; - get?: never; - put?: never; /** * EmbedText * @description Generate embedding for a text document. */ post: operations["EmbedText"]; - delete?: never; - options?: never; - head?: never; - patch?: never; - trace?: never; }; "/MultiEmbedText": { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; - get?: never; - put?: never; /** * MultiEmbedText * @description Generate embeddings for multiple text documents. */ post: operations["MultiEmbedText"]; - delete?: never; - options?: never; - head?: never; - patch?: never; - trace?: never; }; "/EmbedImage": { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; - get?: never; - put?: never; /** * EmbedImage * @description Generate embedding for an image. */ post: operations["EmbedImage"]; - delete?: never; - options?: never; - head?: never; - patch?: never; - trace?: never; }; "/MultiEmbedImage": { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; - get?: never; - put?: never; /** * MultiEmbedImage * @description Generate embeddings for multiple images. */ post: operations["MultiEmbedImage"]; - delete?: never; - options?: never; - head?: never; - patch?: never; - trace?: never; }; "/JinaV2": { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; - get?: never; - put?: never; /** * JinaV2 * @description Generate embeddings for multiple text documents using [Jina Embeddings 2](https://arxiv.org/abs/2310.19923). */ post: operations["JinaV2"]; - delete?: never; - options?: never; - head?: never; - patch?: never; - trace?: never; }; "/CLIP": { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; - get?: never; - put?: never; /** * CLIP * @description Generate embeddings for text or images using [CLIP](https://openai.com/research/clip). */ post: operations["CLIP"]; - delete?: never; - options?: never; - head?: never; - patch?: never; - trace?: never; }; "/FindOrCreateVectorStore": { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; - get?: never; - put?: never; /** * FindOrCreateVectorStore * @description Find a vector store matching the given collection name, or create a new vector store. */ post: operations["FindOrCreateVectorStore"]; - delete?: never; - options?: never; - head?: never; - patch?: never; - trace?: never; }; "/ListVectorStores": { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; - get?: never; - put?: never; /** * ListVectorStores * @description List all vector stores. */ post: operations["ListVectorStores"]; - delete?: never; - options?: never; - head?: never; - patch?: never; - trace?: never; }; "/DeleteVectorStore": { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; - get?: never; - put?: never; /** * DeleteVectorStore * @description Delete a vector store. */ post: operations["DeleteVectorStore"]; - delete?: never; - options?: never; - head?: never; - patch?: never; - trace?: never; }; "/QueryVectorStore": { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; - get?: never; - put?: never; /** * QueryVectorStore * @description Query a vector store for similar vectors. */ post: operations["QueryVectorStore"]; - delete?: never; - options?: never; - head?: never; - patch?: never; - trace?: never; }; "/FetchVectors": { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; - get?: never; - put?: never; /** * FetchVectors * @description Fetch vectors from a vector store. */ post: operations["FetchVectors"]; - delete?: never; - options?: never; - head?: never; - patch?: never; - trace?: never; }; "/UpdateVectors": { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; - get?: never; - put?: never; /** * UpdateVectors * @description Update vectors in a vector store. */ post: operations["UpdateVectors"]; - delete?: never; - options?: never; - head?: never; - patch?: never; - trace?: never; }; "/DeleteVectors": { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; - get?: never; - put?: never; /** * DeleteVectors * @description Delete vectors in a vector store. */ post: operations["DeleteVectors"]; - delete?: never; - options?: never; - head?: never; - patch?: never; - trace?: never; }; } + export type webhooks = Record; + export interface components { schemas: { /** ErrorOut */ @@ -961,7 +352,7 @@ export interface components { * @description The HTTP status code for the error. * @default 500 */ - status_code: number; + status_code?: number; }; /** ExperimentalIn */ ExperimentalIn: { @@ -975,7 +366,7 @@ export interface components { * @description Timeout in seconds. * @default 60 */ - timeout: number; + timeout?: number; }; /** ExperimentalOut */ ExperimentalOut: { @@ -1043,7 +434,7 @@ export interface components { * @description Sampling temperature to use. Higher values make the output more random, lower values make the output more deterministic. * @default 0.4 */ - temperature: number; + temperature?: number; /** @description Maximum number of tokens to generate. */ max_tokens?: number; /** @@ -1051,7 +442,7 @@ export interface components { * @default Llama3Instruct8B * @enum {string} */ - model: + model?: | "Mistral7BInstruct" | "Mixtral8x7BInstruct" | "Llama3Instruct8B" @@ -1080,7 +471,7 @@ export interface components { * @description Sampling temperature to use. Higher values make the output more random, lower values make the output more deterministic. * @default 0.4 */ - temperature: number; + temperature?: number; /** @description Maximum number of tokens to generate. */ max_tokens?: number; /** @@ -1088,7 +479,7 @@ export interface components { * @default Llama3Instruct8B * @enum {string} */ - model: + model?: | "Mistral7BInstruct" | "Mixtral8x7BInstruct" | "Llama3Instruct8B" @@ -1176,7 +567,7 @@ export interface components { * @description Number of choices to generate. * @default 1 */ - num_choices: number; + num_choices?: number; /** * Format: float * @description Higher values make the output more random, lower values make the output more deterministic. @@ -1207,7 +598,7 @@ export interface components { * @description Sampling temperature to use. Higher values make the output more random, lower values make the output more deterministic. * @default 0.4 */ - temperature: number; + temperature?: number; /** @description Maximum number of tokens to generate. */ max_tokens?: number; /** @@ -1215,7 +606,7 @@ export interface components { * @default Llama3Instruct8B * @enum {string} */ - model: + model?: | "Mistral7BInstruct" | "Mixtral8x7BInstruct" | "Llama3Instruct8B" @@ -1238,7 +629,7 @@ export interface components { * @description Sampling temperature to use. Higher values make the output more random, lower values make the output more deterministic. * @default 0.4 */ - temperature: number; + temperature?: number; /** @description Maximum number of tokens to generate. */ max_tokens?: number; /** @@ -1246,7 +637,7 @@ export interface components { * @default Llama3Instruct8B * @enum {string} */ - model: "Mistral7BInstruct" | "Llama3Instruct8B"; + model?: "Mistral7BInstruct" | "Llama3Instruct8B"; }; /** BatchComputeTextOut */ BatchComputeTextOut: { @@ -1274,7 +665,7 @@ export interface components { * @description Sampling temperature to use. Higher values make the output more random, lower values make the output more deterministic. * @default 0.4 */ - temperature: number; + temperature?: number; /** @description Maximum number of tokens to generate. */ max_tokens?: number; /** @@ -1282,7 +673,7 @@ export interface components { * @default Llama3Instruct8B * @enum {string} */ - model: "Mistral7BInstruct" | "Mixtral8x7BInstruct" | "Llama3Instruct8B"; + model?: "Mistral7BInstruct" | "Mixtral8x7BInstruct" | "Llama3Instruct8B"; }; /** MultiComputeJSONOut */ MultiComputeJSONOut: { @@ -1309,7 +700,7 @@ export interface components { * @description Sampling temperature to use. Higher values make the output more random, lower values make the output more deterministic. * @default 0.4 */ - temperature: number; + temperature?: number; /** @description Maximum number of tokens to generate. */ max_tokens?: number; /** @@ -1317,7 +708,7 @@ export interface components { * @default Llama3Instruct8B * @enum {string} */ - model: "Mistral7BInstruct" | "Llama3Instruct8B"; + model?: "Mistral7BInstruct" | "Llama3Instruct8B"; }; /** BatchComputeJSONOut */ BatchComputeJSONOut: { @@ -1341,7 +732,7 @@ export interface components { * @description Number of choices to generate. * @default 1 */ - num_choices: number; + num_choices?: number; /** @description JSON schema to guide response. */ json_schema?: { [key: string]: unknown; @@ -1356,25 +747,25 @@ export interface components { * @description Higher values decrease the likelihood of repeating previous tokens. * @default 0 */ - frequency_penalty: number; + frequency_penalty?: number; /** * Format: float * @description Higher values decrease the likelihood of repeated sequences. * @default 1 */ - repetition_penalty: number; + repetition_penalty?: number; /** * Format: float * @description Higher values increase the likelihood of new topics appearing. * @default 1.1 */ - presence_penalty: number; + presence_penalty?: number; /** * Format: float * @description Probability below which less likely tokens are filtered out. * @default 0.95 */ - top_p: number; + top_p?: number; /** @description Maximum number of tokens to generate. */ max_tokens?: number; }; @@ -1409,7 +800,7 @@ export interface components { * @description Number of choices to generate. * @default 1 */ - num_choices: number; + num_choices?: number; /** @description JSON schema to guide response. */ json_schema?: { [key: string]: unknown; @@ -1424,25 +815,25 @@ export interface components { * @description Higher values decrease the likelihood of repeating previous tokens. * @default 0 */ - frequency_penalty: number; + frequency_penalty?: number; /** * Format: float * @description Higher values decrease the likelihood of repeated sequences. * @default 1 */ - repetition_penalty: number; + repetition_penalty?: number; /** * Format: float * @description Higher values increase the likelihood of new topics appearing. * @default 1.1 */ - presence_penalty: number; + presence_penalty?: number; /** * Format: float * @description Probability below which less likely tokens are filtered out. * @default 0.95 */ - top_p: number; + top_p?: number; /** @description Maximum number of tokens to generate. */ max_tokens?: number; }; @@ -1477,7 +868,7 @@ export interface components { * @description Number of choices to generate. * @default 1 */ - num_choices: number; + num_choices?: number; /** * Format: float * @description Higher values make the output more random, lower values make the output more deterministic. @@ -1488,25 +879,25 @@ export interface components { * @description Higher values decrease the likelihood of repeating previous tokens. * @default 0 */ - frequency_penalty: number; + frequency_penalty?: number; /** * Format: float * @description Higher values decrease the likelihood of repeated sequences. * @default 1 */ - repetition_penalty: number; + repetition_penalty?: number; /** * Format: float * @description Higher values increase the likelihood of new topics appearing. * @default 1.1 */ - presence_penalty: number; + presence_penalty?: number; /** * Format: float * @description Probability below which less likely tokens are filtered out. * @default 0.95 */ - top_p: number; + top_p?: number; /** @description Maximum number of tokens to generate. */ max_tokens?: number; /** @description JSON schema to guide response. */ @@ -1545,7 +936,7 @@ export interface components { * @description Number of choices to generate. * @default 1 */ - num_choices: number; + num_choices?: number; /** * Format: float * @description Higher values make the output more random, lower values make the output more deterministic. @@ -1556,25 +947,25 @@ export interface components { * @description Higher values decrease the likelihood of repeating previous tokens. * @default 0 */ - frequency_penalty: number; + frequency_penalty?: number; /** * Format: float * @description Higher values decrease the likelihood of repeated sequences. * @default 1 */ - repetition_penalty: number; + repetition_penalty?: number; /** * Format: float * @description Higher values increase the likelihood of new topics appearing. * @default 1.1 */ - presence_penalty: number; + presence_penalty?: number; /** * Format: float * @description Probability below which less likely tokens are filtered out. * @default 0.95 */ - top_p: number; + top_p?: number; /** @description Maximum number of tokens to generate. */ max_tokens?: number; }; @@ -1647,7 +1038,7 @@ export interface components { * @description Number of diffusion steps. * @default 30 */ - steps: number; + steps?: number; /** * @description Number of images to generate. * @default 1 @@ -1659,12 +1050,12 @@ export interface components { * @description Height of output image, in pixels. * @default 1024 */ - height: number; + height?: number; /** * @description Width of output image, in pixels. * @default 1024 */ - width: number; + width?: number; /** @description Seeds for deterministic generation. Default is a random seed. */ seeds?: number[]; /** @@ -1672,7 +1063,7 @@ export interface components { * @description Higher values adhere to the text prompt more strongly, typically at the expense of image quality. * @default 7 */ - guidance_scale: number; + guidance_scale?: number; }; /** StableDiffusionImage */ StableDiffusionImage: { @@ -1701,19 +1092,19 @@ export interface components { * @description Number of images to generate. * @default 1 */ - num_images: number; + 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://docs.substrate.run/reference/external-files). If unset, the image data will be returned as a base64-encoded string. */ store?: string; /** * @description Height of output image, in pixels. * @default 1024 */ - height: number; + height?: number; /** * @description Width of output image, in pixels. * @default 1024 */ - width: number; + width?: number; /** @description Seeds for deterministic generation. Default is a random seed. */ seeds?: number[]; }; @@ -1743,7 +1134,7 @@ export interface components { * @description Controls the influence of the image prompt on the generated output. * @default 0.5 */ - ip_adapter_scale: number; + ip_adapter_scale?: number; /** @description Negative input prompt. */ negative_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://docs.substrate.run/reference/external-files). If unset, the image data will be returned as a base64-encoded string. */ @@ -1752,12 +1143,12 @@ export interface components { * @description Width of output image, in pixels. * @default 1024 */ - width: number; + width?: number; /** * @description Height of output image, in pixels. * @default 1024 */ - height: number; + height?: number; /** @description Random noise seeds. Default is random seeds for each generation. */ seeds?: number[]; }; @@ -1791,7 +1182,7 @@ export interface components { * @description Resolution of the output image, in pixels. * @default 1024 */ - output_resolution: number; + output_resolution?: number; /** @description Negative input prompt. */ negative_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://docs.substrate.run/reference/external-files). If unset, the image data will be returned as a base64-encoded string. */ @@ -1801,13 +1192,13 @@ export interface components { * @description Controls the influence of the input image on the generated output. * @default 0.5 */ - conditioning_scale: number; + conditioning_scale?: number; /** * Format: float * @description Controls how much to transform the input image. * @default 0.5 */ - strength: number; + strength?: number; /** @description Random noise seeds. Default is random seeds for each generation. */ seeds?: number[]; }; @@ -1832,25 +1223,25 @@ export interface components { * @default gif * @enum {string} */ - output_format: "gif" | "webp" | "mp4" | "frames"; + output_format?: "gif" | "webp" | "mp4" | "frames"; /** @description Seed for deterministic generation. Default is a random seed. */ seed?: number; /** * @description Frames per second of the generated video. Ignored if output format is `frames`. * @default 7 */ - fps: number; + fps?: number; /** * @description The motion bucket id to use for the generated video. This can be used to control the motion of the generated video. Increasing the motion bucket id increases the motion of the generated video. * @default 180 */ - motion_bucket_id: number; + motion_bucket_id?: number; /** * Format: float * @description The amount of noise added to the conditioning image. The higher the values the less the video resembles the conditioning image. Increasing this value also increases the motion of the generated video. * @default 0.1 */ - noise: number; + noise?: number; }; /** StableVideoDiffusionOut */ StableVideoDiffusionOut: { @@ -1870,17 +1261,17 @@ export interface components { * @default gif * @enum {string} */ - output_format: "gif" | "webp" | "mp4" | "frames"; + output_format?: "gif" | "webp" | "mp4" | "frames"; /** * @description Frames per second of the generated video. Ignored if output format is `frames`. * @default 7 */ - fps: number; + fps?: number; /** * @description Number of interpolation steps. Each step adds an interpolated frame between adjacent frames. For example, 2 steps over 2 frames produces 5 frames. * @default 2 */ - num_steps: number; + num_steps?: number; }; /** InterpolateFramesOut */ InterpolateFramesOut: { @@ -1946,7 +1337,7 @@ export interface components { * @description Resolution of the output image, in pixels. * @default 1024 */ - output_resolution: number; + output_resolution?: number; /** @description Negative input prompt. */ negative_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://docs.substrate.run/reference/external-files). If unset, the image data will be returned as a base64-encoded string. */ @@ -1956,7 +1347,7 @@ export interface components { * @description Controls the strength of the generation process. * @default 0.8 */ - strength: number; + strength?: number; /** @description Random noise seeds. Default is random seeds for each generation. */ seeds?: number[]; }; @@ -2036,12 +1427,12 @@ export interface components { * @description Return a mask image instead of the original content. * @default false */ - return_mask: boolean; + return_mask?: boolean; /** * @description Invert the mask image. Only takes effect if `return_mask` is true. * @default false */ - invert_mask: boolean; + invert_mask?: boolean; /** @description Hex value background color. Transparent if unset. */ 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://docs.substrate.run/reference/external-files). If unset, the image data will be returned as a base64-encoded string. */ @@ -2074,7 +1465,7 @@ export interface components { * @description Resolution of the output image, in pixels. * @default 1024 */ - output_resolution: number; + output_resolution?: number; /** @description Use "hosted" to return an image URL hosted on Substrate. You can also provide a URL to a registered [file store](https://docs.substrate.run/reference/external-files). If unset, the image data will be returned as a base64-encoded string. */ store?: string; }; @@ -2151,30 +1542,30 @@ export interface components { /** @description Prompt to guide model on the content and context of input audio. */ prompt?: string; /** - * @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. Use `auto` to automatically detect the language. * @default en */ - language: string; + language?: string; /** - * @description Segment the text into sentences with approximate timestamps. + * @description (Deprecated) Segment the text into sentences with approximate timestamps. * @default false */ - segment: boolean; + segment?: boolean; /** * @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. * @default false */ - align: boolean; + align?: boolean; /** * @description Identify speakers for each segment. Speaker IDs will be included in each segment. * @default false */ - diarize: boolean; + diarize?: boolean; /** * @description Suggest automatic chapter markers. * @default false */ - suggest_chapters: boolean; + suggest_chapters?: boolean; }; /** TranscribedWord */ TranscribedWord: { @@ -2275,6 +1666,8 @@ export interface components { speaker?: string; }[]; }[]; + /** @description Language code of transcribed text. */ + language?: string; /** @description Chapter markers, if `suggest_chapters` is enabled. */ chapters?: { /** @description Chapter title. */ @@ -2308,7 +1701,7 @@ export interface components { * @description Language of input text. Supported languages: `en, de, fr, es, it, pt, pl, zh, ar, cs, ru, nl, tr, hu, ko`. * @default en */ - language: string; + language?: string; /** @description Use "hosted" to return an audio URL hosted on Substrate. You can also provide a URL to a registered [file store](https://docs.substrate.run/reference/external-files). If unset, the audio data will be returned as a base64-encoded string. */ store?: string; }; @@ -2347,7 +1740,7 @@ export interface components { * @default jina-v2 * @enum {string} */ - model: "jina-v2" | "clip"; + model?: "jina-v2" | "clip"; }; /** EmbedTextOut */ EmbedTextOut: { @@ -2396,7 +1789,7 @@ export interface components { * @default jina-v2 * @enum {string} */ - model: "jina-v2" | "clip"; + model?: "jina-v2" | "clip"; }; /** MultiEmbedTextOut */ MultiEmbedTextOut: { @@ -2457,7 +1850,7 @@ export interface components { * @default clip * @enum {string} */ - model: "clip"; + model?: "clip"; }; /** EmbedImageOut */ EmbedImageOut: { @@ -2509,7 +1902,7 @@ export interface components { * @default clip * @enum {string} */ - model: "clip"; + model?: "clip"; }; /** MultiEmbedImageOut */ MultiEmbedImageOut: { @@ -2733,27 +2126,27 @@ export interface components { * @description Number of results to return. * @default 10 */ - top_k: number; + top_k?: number; /** * @description The size of the dynamic candidate list for searching the index graph. * @default 40 */ - ef_search: number; + ef_search?: number; /** * @description The number of leaves in the index tree to search. * @default 40 */ - num_leaves_to_search: number; + num_leaves_to_search?: number; /** * @description Include the values of the vectors in the response. * @default false */ - include_values: boolean; + include_values?: boolean; /** * @description Include the metadata of the vectors in the response. * @default false */ - include_metadata: boolean; + include_metadata?: boolean; /** @description Filter metadata by key-value pairs. */ filters?: { [key: string]: unknown; @@ -2837,23 +2230,27 @@ export interface components { headers: never; pathItems: never; } + export type $defs = Record; + +export type external = Record; + export interface operations { + /** + * Experimental + * @description Experimental node. + */ Experimental: { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; requestBody?: { content: { - /** @example { - * "name": "some_name", - * "args": { - * "foo": "bar" - * } - * } */ + /** + * @example { + * "name": "some_name", + * "args": { + * "foo": "bar" + * } + * } + */ "application/json": { /** @description Identifier. */ name: string; @@ -2872,9 +2269,6 @@ export interface operations { responses: { /** @description OK */ 200: { - headers: { - [name: string]: unknown; - }; content: { "application/json": { /** @description Response. */ @@ -2886,27 +2280,27 @@ export interface operations { }; }; }; + /** + * Box + * @description Combine multiple values into a single output. + */ Box: { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; requestBody?: { content: { - /** @example { - * "value": { - * "a": "b", - * "c": { - * "d": [ - * 1, - * 2, - * 3 - * ] - * } - * } - * } */ + /** + * @example { + * "value": { + * "a": "b", + * "c": { + * "d": [ + * 1, + * 2, + * 3 + * ] + * } + * } + * } + */ "application/json": { /** @description Values to box. */ value: unknown; @@ -2916,9 +2310,6 @@ export interface operations { responses: { /** @description OK */ 200: { - headers: { - [name: string]: unknown; - }; content: { "application/json": { /** @description The evaluated result. */ @@ -2928,20 +2319,20 @@ export interface operations { }; }; }; + /** + * If + * @description Return one of two options based on a condition. + */ If: { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; requestBody?: { content: { - /** @example { - * "condition": true, - * "value_if_true": "yes", - * "value_if_false": "no" - * } */ + /** + * @example { + * "condition": true, + * "value_if_true": "yes", + * "value_if_false": "no" + * } + */ "application/json": { /** @description Condition. */ condition: boolean; @@ -2955,9 +2346,6 @@ export interface operations { responses: { /** @description OK */ 200: { - headers: { - [name: string]: unknown; - }; content: { "application/json": { /** @description Result. Null if `value_if_false` is not provided and `condition` is false. */ @@ -2967,22 +2355,22 @@ export interface operations { }; }; }; + /** + * RunPython + * @description Run code using a Python interpreter. + */ RunPython: { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; requestBody?: { content: { - /** @example { - * "pkl_function": "g2UjA5fX2t3ZGVmYXVsdHNfX5ROjAxfX2RlZmF1bHRzX1+UTowKX19tb2R1bGVfX5SMCF9fbWFpbl9flIwHX19kb2NfX5ROjAtfX2Nsb3N1cmVfX5ROjBdfY2xvdWRwaWNrbGVfc3VibW9kdWxlc5RdlIwLX19nbG9iYWxzX1+UfZR1hpSGUjAu", - * "kwargs": {}, - * "pip_install": [ - * "numpy" - * ] - * } */ + /** + * @example { + * "pkl_function": "g2UjA5fX2t3ZGVmYXVsdHNfX5ROjAxfX2RlZmF1bHRzX1+UTowKX19tb2R1bGVfX5SMCF9fbWFpbl9flIwHX19kb2NfX5ROjAtfX2Nsb3N1cmVfX5ROjBdfY2xvdWRwaWNrbGVfc3VibW9kdWxlc5RdlIwLX19nbG9iYWxzX1+UfZR1hpSGUjAu", + * "kwargs": {}, + * "pip_install": [ + * "numpy" + * ] + * } + */ "application/json": { /** @description Pickled function. */ pkl_function?: string; @@ -3000,9 +2388,6 @@ export interface operations { responses: { /** @description OK */ 200: { - headers: { - [name: string]: unknown; - }; content: { "application/json": { /** @description Return value of your function. */ @@ -3018,20 +2403,20 @@ export interface operations { }; }; }; + /** + * ComputeText + * @description Compute text using a language model. + */ ComputeText: { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; requestBody?: { content: { - /** @example { - * "prompt": "Who is Don Quixote?", - * "temperature": 0.4, - * "max_tokens": 800 - * } */ + /** + * @example { + * "prompt": "Who is Don Quixote?", + * "temperature": 0.4, + * "max_tokens": 800 + * } + */ "application/json": { /** @description Input prompt. */ prompt: string; @@ -3066,9 +2451,6 @@ export interface operations { responses: { /** @description OK */ 200: { - headers: { - [name: string]: unknown; - }; content: { "application/json": { /** @description Text response. */ @@ -3078,20 +2460,20 @@ export interface operations { }; }; }; + /** + * MultiComputeText + * @description Generate multiple text choices using a language model. + */ MultiComputeText: { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; requestBody?: { content: { - /** @example { - * "prompt": "Who is Don Quixote?", - * "num_choices": 2, - * "max_tokens": 800 - * } */ + /** + * @example { + * "prompt": "Who is Don Quixote?", + * "num_choices": 2, + * "max_tokens": 800 + * } + */ "application/json": { /** @description Input prompt. */ prompt: string; @@ -3124,9 +2506,6 @@ export interface operations { responses: { /** @description OK */ 200: { - headers: { - [name: string]: unknown; - }; content: { "application/json": { /** @description Response choices. */ @@ -3139,22 +2518,22 @@ export interface operations { }; }; }; + /** + * BatchComputeText + * @description Compute text for multiple prompts in batch using a language model. + */ BatchComputeText: { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; requestBody?: { content: { - /** @example { - * "prompts": [ - * "Who is Don Quixote?", - * "Who is Sancho Panza?" - * ], - * "max_tokens": 800 - * } */ + /** + * @example { + * "prompts": [ + * "Who is Don Quixote?", + * "Who is Sancho Panza?" + * ], + * "max_tokens": 800 + * } + */ "application/json": { /** @description Batch input prompts. */ prompts: string[]; @@ -3178,9 +2557,6 @@ export interface operations { responses: { /** @description OK */ 200: { - headers: { - [name: string]: unknown; - }; content: { "application/json": { /** @description Batch outputs. */ @@ -3193,35 +2569,35 @@ export interface operations { }; }; }; + /** + * BatchComputeJSON + * @description Compute JSON for multiple prompts in batch using a language model. + */ BatchComputeJSON: { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; requestBody?: { content: { - /** @example { - * "prompts": [ - * "Who is Don Quixote?", - * "Who is Sancho Panza?" - * ], - * "max_tokens": 800, - * "json_schema": { - * "type": "object", - * "properties": { - * "name": { - * "type": "string", - * "description": "The name of the character." - * }, - * "bio": { - * "type": "string", - * "description": "Concise biography of the character." - * } - * } + /** + * @example { + * "prompts": [ + * "Who is Don Quixote?", + * "Who is Sancho Panza?" + * ], + * "max_tokens": 800, + * "json_schema": { + * "type": "object", + * "properties": { + * "name": { + * "type": "string", + * "description": "The name of the character." + * }, + * "bio": { + * "type": "string", + * "description": "Concise biography of the character." * } - * } */ + * } + * } + * } + */ "application/json": { /** @description Batch input prompts. */ prompts: string[]; @@ -3249,9 +2625,6 @@ export interface operations { responses: { /** @description OK */ 200: { - headers: { - [name: string]: unknown; - }; content: { "application/json": { /** @description Batch outputs. */ @@ -3268,33 +2641,33 @@ export interface operations { }; }; }; + /** + * ComputeJSON + * @description Compute JSON using a language model. + */ ComputeJSON: { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; requestBody?: { content: { - /** @example { - * "prompt": "Who wrote Don Quixote?", - * "json_schema": { - * "type": "object", - * "properties": { - * "name": { - * "type": "string", - * "description": "The name of the author." - * }, - * "bio": { - * "type": "string", - * "description": "Concise biography of the author." - * } - * } + /** + * @example { + * "prompt": "Who wrote Don Quixote?", + * "json_schema": { + * "type": "object", + * "properties": { + * "name": { + * "type": "string", + * "description": "The name of the author." * }, - * "temperature": 0.4, - * "max_tokens": 800 - * } */ + * "bio": { + * "type": "string", + * "description": "Concise biography of the author." + * } + * } + * }, + * "temperature": 0.4, + * "max_tokens": 800 + * } + */ "application/json": { /** @description Input prompt. */ prompt: string; @@ -3327,9 +2700,6 @@ export interface operations { responses: { /** @description OK */ 200: { - headers: { - [name: string]: unknown; - }; content: { "application/json": { /** @description JSON response. */ @@ -3343,34 +2713,34 @@ export interface operations { }; }; }; + /** + * MultiComputeJSON + * @description Compute multiple JSON choices using a language model. + */ MultiComputeJSON: { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; requestBody?: { content: { - /** @example { - * "prompt": "Who wrote Don Quixote?", - * "json_schema": { - * "type": "object", - * "properties": { - * "name": { - * "type": "string", - * "description": "The name of the author." - * }, - * "bio": { - * "type": "string", - * "description": "Concise biography of the author." - * } - * } + /** + * @example { + * "prompt": "Who wrote Don Quixote?", + * "json_schema": { + * "type": "object", + * "properties": { + * "name": { + * "type": "string", + * "description": "The name of the author." * }, - * "num_choices": 2, - * "temperature": 0.4, - * "max_tokens": 800 - * } */ + * "bio": { + * "type": "string", + * "description": "Concise biography of the author." + * } + * } + * }, + * "num_choices": 2, + * "temperature": 0.4, + * "max_tokens": 800 + * } + */ "application/json": { /** @description Input prompt. */ prompt: string; @@ -3406,9 +2776,6 @@ export interface operations { responses: { /** @description OK */ 200: { - headers: { - [name: string]: unknown; - }; content: { "application/json": { /** @description Response choices. */ @@ -3425,19 +2792,19 @@ export interface operations { }; }; }; + /** + * GenerateCode + * @description Generate code in the specified language based on the prompt. + */ GenerateCode: { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; requestBody?: { content: { - /** @example { - * "prompt": "Write a function that prints 'Hello, World!'", - * "language": "python" - * } */ + /** + * @example { + * "prompt": "Write a function that prints 'Hello, World!'", + * "language": "python" + * } + */ "application/json": { /** @description Input prompt. */ prompt: string; @@ -3475,9 +2842,6 @@ export interface operations { responses: { /** @description OK */ 200: { - headers: { - [name: string]: unknown; - }; content: { "application/json": { /** @description Code response. */ @@ -3487,19 +2851,19 @@ export interface operations { }; }; }; + /** + * MultiGenerateCode + * @description Generate multiple choices of code in the specified language based on the prompt. + */ MultiGenerateCode: { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; requestBody?: { content: { - /** @example { - * "prompt": "Write a function that prints 'Hello, World!'", - * "language": "python" - * } */ + /** + * @example { + * "prompt": "Write a function that prints 'Hello, World!'", + * "language": "python" + * } + */ "application/json": { /** @description Input prompt. */ prompt: string; @@ -3542,9 +2906,6 @@ export interface operations { responses: { /** @description OK */ 200: { - headers: { - [name: string]: unknown; - }; content: { "application/json": { /** @description Code response choices. */ @@ -3557,21 +2918,21 @@ export interface operations { }; }; }; + /** + * Mistral7BInstruct + * @description Compute text using [Mistral 7B Instruct](https://mistral.ai/news/announcing-mistral-7b). + */ Mistral7BInstruct: { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; requestBody?: { content: { - /** @example { - * "prompt": "Who is Don Quixote?", - * "num_choices": 2, - * "temperature": 0.4, - * "max_tokens": 800 - * } */ + /** + * @example { + * "prompt": "Who is Don Quixote?", + * "num_choices": 2, + * "temperature": 0.4, + * "max_tokens": 800 + * } + */ "application/json": { /** @description Input prompt. */ prompt: string; @@ -3623,9 +2984,6 @@ export interface operations { responses: { /** @description OK */ 200: { - headers: { - [name: string]: unknown; - }; content: { "application/json": { /** @description Response choices. */ @@ -3642,21 +3000,21 @@ export interface operations { }; }; }; + /** + * Mixtral8x7BInstruct + * @description Compute text using instruct-tuned [Mixtral 8x7B](https://mistral.ai/news/mixtral-of-experts/). + */ Mixtral8x7BInstruct: { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; requestBody?: { content: { - /** @example { - * "prompt": "Who is Don Quixote?", - * "num_choices": 2, - * "temperature": 0.4, - * "max_tokens": 800 - * } */ + /** + * @example { + * "prompt": "Who is Don Quixote?", + * "num_choices": 2, + * "temperature": 0.4, + * "max_tokens": 800 + * } + */ "application/json": { /** @description Input prompt. */ prompt: string; @@ -3708,9 +3066,6 @@ export interface operations { responses: { /** @description OK */ 200: { - headers: { - [name: string]: unknown; - }; content: { "application/json": { /** @description Response choices. */ @@ -3727,21 +3082,21 @@ export interface operations { }; }; }; + /** + * Llama3Instruct8B + * @description Compute text using instruct-tuned [Llama 3 8B](https://llama.meta.com/llama3/). + */ Llama3Instruct8B: { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; requestBody?: { content: { - /** @example { - * "prompt": "Who is Don Quixote?", - * "num_choices": 2, - * "temperature": 0.4, - * "max_tokens": 800 - * } */ + /** + * @example { + * "prompt": "Who is Don Quixote?", + * "num_choices": 2, + * "temperature": 0.4, + * "max_tokens": 800 + * } + */ "application/json": { /** @description Input prompt. */ prompt: string; @@ -3793,9 +3148,6 @@ export interface operations { responses: { /** @description OK */ 200: { - headers: { - [name: string]: unknown; - }; content: { "application/json": { /** @description Response choices. */ @@ -3812,21 +3164,21 @@ export interface operations { }; }; }; + /** + * Llama3Instruct70B + * @description Compute text using instruct-tuned [Llama 3 70B](https://llama.meta.com/llama3/). + */ Llama3Instruct70B: { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; requestBody?: { content: { - /** @example { - * "prompt": "Who is Don Quixote?", - * "num_choices": 2, - * "temperature": 0.4, - * "max_tokens": 800 - * } */ + /** + * @example { + * "prompt": "Who is Don Quixote?", + * "num_choices": 2, + * "temperature": 0.4, + * "max_tokens": 800 + * } + */ "application/json": { /** @description Input prompt. */ prompt: string; @@ -3874,9 +3226,6 @@ export interface operations { responses: { /** @description OK */ 200: { - headers: { - [name: string]: unknown; - }; content: { "application/json": { /** @description Response choices. */ @@ -3889,22 +3238,22 @@ export interface operations { }; }; }; + /** + * Firellava13B + * @description Compute text with image input using [FireLLaVA 13B](https://fireworks.ai/blog/firellava-the-first-commercially-permissive-oss-llava-model). + */ Firellava13B: { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; requestBody?: { content: { - /** @example { - * "prompt": "what are these paintings of and who made them?", - * "image_uris": [ - * "https://media.substrate.run/docs-fuji-red.jpg", - * "https://media.substrate.run/docs-fuji-blue.jpg" - * ] - * } */ + /** + * @example { + * "prompt": "what are these paintings of and who made them?", + * "image_uris": [ + * "https://media.substrate.run/docs-fuji-red.jpg", + * "https://media.substrate.run/docs-fuji-blue.jpg" + * ] + * } + */ "application/json": { /** @description Text prompt. */ prompt: string; @@ -3918,9 +3267,6 @@ export interface operations { responses: { /** @description OK */ 200: { - headers: { - [name: string]: unknown; - }; content: { "application/json": { /** @description Text response. */ @@ -3930,19 +3276,19 @@ export interface operations { }; }; }; + /** + * GenerateImage + * @description Generate an image. + */ GenerateImage: { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; requestBody?: { content: { - /** @example { - * "prompt": "hokusai futuristic supercell spiral cloud with glowing core over turbulent ocean", - * "store": "hosted" - * } */ + /** + * @example { + * "prompt": "hokusai futuristic supercell spiral cloud with glowing core over turbulent ocean", + * "store": "hosted" + * } + */ "application/json": { /** @description Text prompt. */ prompt: string; @@ -3954,9 +3300,6 @@ export interface operations { responses: { /** @description OK */ 200: { - headers: { - [name: string]: unknown; - }; content: { "application/json": { /** @description Base 64-encoded JPEG image bytes, or a hosted image url if `store` is provided. */ @@ -3966,20 +3309,20 @@ export interface operations { }; }; }; + /** + * MultiGenerateImage + * @description Generate multiple images. + */ MultiGenerateImage: { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; requestBody?: { content: { - /** @example { - * "prompt": "hokusai futuristic supercell spiral cloud with glowing core over turbulent ocean", - * "num_images": 2, - * "store": "hosted" - * } */ + /** + * @example { + * "prompt": "hokusai futuristic supercell spiral cloud with glowing core over turbulent ocean", + * "num_images": 2, + * "store": "hosted" + * } + */ "application/json": { /** @description Text prompt. */ prompt: string; @@ -3996,9 +3339,6 @@ export interface operations { responses: { /** @description OK */ 200: { - headers: { - [name: string]: unknown; - }; content: { "application/json": { /** @description Generated images. */ @@ -4011,21 +3351,21 @@ export interface operations { }; }; }; + /** + * InpaintImage + * @description Edit an image using image generation inside part of the image or the full image. + */ InpaintImage: { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; requestBody?: { content: { - /** @example { - * "image_uri": "https://media.substrate.run/docs-klimt-park.jpg", - * "mask_image_uri": "https://media.substrate.run/spiral-logo.jpeg", - * "prompt": "large tropical colorful bright anime birds in a dark jungle full of vines, high resolution", - * "store": "hosted" - * } */ + /** + * @example { + * "image_uri": "https://media.substrate.run/docs-klimt-park.jpg", + * "mask_image_uri": "https://media.substrate.run/spiral-logo.jpeg", + * "prompt": "large tropical colorful bright anime birds in a dark jungle full of vines, high resolution", + * "store": "hosted" + * } + */ "application/json": { /** @description Original image. */ image_uri: string; @@ -4041,9 +3381,6 @@ export interface operations { responses: { /** @description OK */ 200: { - headers: { - [name: string]: unknown; - }; content: { "application/json": { /** @description Base 64-encoded JPEG image bytes, or a hosted image url if `store` is provided. */ @@ -4053,22 +3390,22 @@ export interface operations { }; }; }; + /** + * MultiInpaintImage + * @description Edit multiple images using image generation. + */ MultiInpaintImage: { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; requestBody?: { content: { - /** @example { - * "image_uri": "https://media.substrate.run/docs-klimt-park.jpg", - * "mask_image_uri": "https://media.substrate.run/spiral-logo.jpeg", - * "prompt": "large tropical colorful bright anime birds in a dark jungle full of vines, high resolution", - * "num_images": 2, - * "store": "hosted" - * } */ + /** + * @example { + * "image_uri": "https://media.substrate.run/docs-klimt-park.jpg", + * "mask_image_uri": "https://media.substrate.run/spiral-logo.jpeg", + * "prompt": "large tropical colorful bright anime birds in a dark jungle full of vines, high resolution", + * "num_images": 2, + * "store": "hosted" + * } + */ "application/json": { /** @description Original image. */ image_uri: string; @@ -4089,9 +3426,6 @@ export interface operations { responses: { /** @description OK */ 200: { - headers: { - [name: string]: unknown; - }; content: { "application/json": { /** @description Generated images. */ @@ -4104,25 +3438,25 @@ export interface operations { }; }; }; + /** + * StableDiffusionXLLightning + * @description Generate an image using [Stable Diffusion XL Lightning](https://arxiv.org/abs/2402.13929). + */ StableDiffusionXLLightning: { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; requestBody?: { content: { - /** @example { - * "prompt": "hokusai futuristic supercell spiral cloud with glowing core over turbulent ocean", - * "negative_prompt": "night, moon", - * "num_images": 2, - * "seeds": [ - * 330699, - * 136464 - * ], - * "store": "hosted" - * } */ + /** + * @example { + * "prompt": "hokusai futuristic supercell spiral cloud with glowing core over turbulent ocean", + * "negative_prompt": "night, moon", + * "num_images": 2, + * "seeds": [ + * 330699, + * 136464 + * ], + * "store": "hosted" + * } + */ "application/json": { /** @description Text prompt. */ prompt: string; @@ -4153,9 +3487,6 @@ export interface operations { responses: { /** @description OK */ 200: { - headers: { - [name: string]: unknown; - }; content: { "application/json": { /** @description Generated images. */ @@ -4170,28 +3501,28 @@ export interface operations { }; }; }; + /** + * StableDiffusionXLInpaint + * @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). + */ StableDiffusionXLInpaint: { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; requestBody?: { content: { - /** @example { - * "image_uri": "https://media.substrate.run/docs-klimt-park.jpg", - * "mask_image_uri": "https://media.substrate.run/spiral-logo.jpeg", - * "prompt": "large tropical colorful bright birds in a jungle, high resolution oil painting", - * "negative_prompt": "dark, cartoon, anime", - * "strength": 0.8, - * "num_images": 2, - * "store": "hosted", - * "seeds": [ - * 1607280, - * 1720395 - * ] - * } */ + /** + * @example { + * "image_uri": "https://media.substrate.run/docs-klimt-park.jpg", + * "mask_image_uri": "https://media.substrate.run/spiral-logo.jpeg", + * "prompt": "large tropical colorful bright birds in a jungle, high resolution oil painting", + * "negative_prompt": "dark, cartoon, anime", + * "strength": 0.8, + * "num_images": 2, + * "store": "hosted", + * "seeds": [ + * 1607280, + * 1720395 + * ] + * } + */ "application/json": { /** @description Original image. */ image_uri: string; @@ -4227,9 +3558,6 @@ export interface operations { responses: { /** @description OK */ 200: { - headers: { - [name: string]: unknown; - }; content: { "application/json": { /** @description Generated images. */ @@ -4244,28 +3572,28 @@ export interface operations { }; }; }; + /** + * StableDiffusionXLControlNet + * @description Generate an image with generation structured by an input image, using Stable Diffusion XL with [ControlNet](https://arxiv.org/abs/2302.05543). + */ StableDiffusionXLControlNet: { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; requestBody?: { content: { - /** @example { - * "image_uri": "https://media.substrate.run/spiral-logo.jpeg", - * "prompt": "the futuristic solarpunk city of atlantis at sunset, cinematic bokeh HD", - * "control_method": "illusion", - * "conditioning_scale": 1, - * "strength": 1, - * "store": "hosted", - * "num_images": 2, - * "seeds": [ - * 1607226, - * 1720395 - * ] - * } */ + /** + * @example { + * "image_uri": "https://media.substrate.run/spiral-logo.jpeg", + * "prompt": "the futuristic solarpunk city of atlantis at sunset, cinematic bokeh HD", + * "control_method": "illusion", + * "conditioning_scale": 1, + * "strength": 1, + * "store": "hosted", + * "num_images": 2, + * "seeds": [ + * 1607226, + * 1720395 + * ] + * } + */ "application/json": { /** @description Input image. */ image_uri: string; @@ -4310,9 +3638,6 @@ export interface operations { responses: { /** @description OK */ 200: { - headers: { - [name: string]: unknown; - }; content: { "application/json": { /** @description Generated images. */ @@ -4327,19 +3652,19 @@ export interface operations { }; }; }; + /** + * StableVideoDiffusion + * @description Generates a video using a still image as conditioning frame. + */ StableVideoDiffusion: { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; requestBody?: { content: { - /** @example { - * "image_uri": "https://media.substrate.run/apple-forest.jpeg", - * "store": "hosted" - * } */ + /** + * @example { + * "image_uri": "https://media.substrate.run/apple-forest.jpeg", + * "store": "hosted" + * } + */ "application/json": { /** @description Original image. */ image_uri: string; @@ -4375,9 +3700,6 @@ export interface operations { responses: { /** @description OK */ 200: { - headers: { - [name: string]: unknown; - }; content: { "application/json": { /** @description Generated video. */ @@ -4389,22 +3711,22 @@ export interface operations { }; }; }; + /** + * InterpolateFrames + * @description Generates a interpolation frames between each adjacent frames. + */ InterpolateFrames: { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; requestBody?: { content: { - /** @example { - * "frame_uris": [ - * "https://media.substrate.run/apple-forest2.jpeg", - * "https://media.substrate.run/apple-forest3.jpeg" - * ], - * "store": "hosted" - * } */ + /** + * @example { + * "frame_uris": [ + * "https://media.substrate.run/apple-forest2.jpeg", + * "https://media.substrate.run/apple-forest3.jpeg" + * ], + * "store": "hosted" + * } + */ "application/json": { /** @description Frames. */ frame_uris: string[]; @@ -4432,9 +3754,6 @@ export interface operations { responses: { /** @description OK */ 200: { - headers: { - [name: string]: unknown; - }; content: { "application/json": { /** @description Generated video. */ @@ -4446,35 +3765,35 @@ export interface operations { }; }; }; + /** + * TranscribeSpeech + * @description Transcribe speech in an audio or video file. + */ TranscribeSpeech: { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; requestBody?: { content: { - /** @example { - * "audio_uri": "https://media.substrate.run/dfw-clip.m4a", - * "prompt": "David Foster Wallace interviewed about US culture, and Infinite Jest", - * "segment": true, - * "align": true, - * "diarize": true, - * "suggest_chapters": true - * } */ + /** + * @example { + * "audio_uri": "https://media.substrate.run/dfw-clip.m4a", + * "prompt": "David Foster Wallace interviewed about US culture, and Infinite Jest", + * "segment": true, + * "align": true, + * "diarize": true, + * "suggest_chapters": true + * } + */ "application/json": { /** @description Input audio. */ audio_uri: string; /** @description Prompt to guide model on the content and context of input audio. */ prompt?: string; /** - * @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. Use `auto` to automatically detect the language. * @default en */ language?: string; /** - * @description Segment the text into sentences with approximate timestamps. + * @description (Deprecated) Segment the text into sentences with approximate timestamps. * @default false */ segment?: boolean; @@ -4499,9 +3818,6 @@ export interface operations { responses: { /** @description OK */ 200: { - headers: { - [name: string]: unknown; - }; content: { "application/json": { /** @description Transcribed text. */ @@ -4540,6 +3856,8 @@ export interface operations { speaker?: string; }[]; }[]; + /** @description Language code of transcribed text. */ + language?: string; /** @description Chapter markers, if `suggest_chapters` is enabled. */ chapters?: { /** @description Chapter title. */ @@ -4555,19 +3873,19 @@ export interface operations { }; }; }; + /** + * GenerateSpeech + * @description Generate speech from text. + */ GenerateSpeech: { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; requestBody?: { content: { - /** @example { - * "text": "Substrate: an underlying substance or layer.", - * "store": "hosted" - * } */ + /** + * @example { + * "text": "Substrate: an underlying substance or layer.", + * "store": "hosted" + * } + */ "application/json": { /** @description Input text. */ text: string; @@ -4579,9 +3897,6 @@ export interface operations { responses: { /** @description OK */ 200: { - headers: { - [name: string]: unknown; - }; content: { "application/json": { /** @description Base 64-encoded WAV audio bytes, or a hosted audio url if `store` is provided. */ @@ -4591,19 +3906,19 @@ export interface operations { }; }; }; + /** + * RemoveBackground + * @description Remove the background from an image and return the foreground segment as a cut-out or a mask. + */ RemoveBackground: { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; requestBody?: { content: { - /** @example { - * "image_uri": "https://media.substrate.run/apple-forest.jpeg", - * "store": "hosted" - * } */ + /** + * @example { + * "image_uri": "https://media.substrate.run/apple-forest.jpeg", + * "store": "hosted" + * } + */ "application/json": { /** @description Input image. */ image_uri: string; @@ -4627,9 +3942,6 @@ export interface operations { responses: { /** @description OK */ 200: { - headers: { - [name: string]: unknown; - }; content: { "application/json": { /** @description Base 64-encoded JPEG image bytes, or a hosted image url if `store` is provided. */ @@ -4639,20 +3951,20 @@ export interface operations { }; }; }; + /** + * EraseImage + * @description Erase the masked part of an image, e.g. to remove an object by inpainting. + */ EraseImage: { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; requestBody?: { content: { - /** @example { - * "image_uri": "https://media.substrate.run/apple-forest.jpeg", - * "mask_image_uri": "https://media.substrate.run/apple-forest-mask.jpeg", - * "store": "hosted" - * } */ + /** + * @example { + * "image_uri": "https://media.substrate.run/apple-forest.jpeg", + * "mask_image_uri": "https://media.substrate.run/apple-forest-mask.jpeg", + * "store": "hosted" + * } + */ "application/json": { /** @description Input image. */ image_uri: string; @@ -4666,9 +3978,6 @@ export interface operations { responses: { /** @description OK */ 200: { - headers: { - [name: string]: unknown; - }; content: { "application/json": { /** @description Base 64-encoded JPEG image bytes, or a hosted image url if `store` is provided. */ @@ -4678,20 +3987,20 @@ export interface operations { }; }; }; + /** + * UpscaleImage + * @description Upscale an image using image generation. + */ UpscaleImage: { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; requestBody?: { content: { - /** @example { - * "prompt": "high resolution detailed spiral shell", - * "image_uri": "https://media.substrate.run/docs-shell-emoji.jpg", - * "store": "hosted" - * } */ + /** + * @example { + * "prompt": "high resolution detailed spiral shell", + * "image_uri": "https://media.substrate.run/docs-shell-emoji.jpg", + * "store": "hosted" + * } + */ "application/json": { /** @description Prompt to guide model on the content of image to upscale. */ prompt?: string; @@ -4710,9 +4019,6 @@ export interface operations { responses: { /** @description OK */ 200: { - headers: { - [name: string]: unknown; - }; content: { "application/json": { /** @description Base 64-encoded JPEG image bytes, or a hosted image url if `store` is provided. */ @@ -4722,23 +4028,23 @@ export interface operations { }; }; }; + /** + * SegmentUnderPoint + * @description Segment an image under a point and return the segment. + */ SegmentUnderPoint: { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; requestBody?: { content: { - /** @example { - * "image_uri": "https://media.substrate.run/docs-vg-bedroom.jpg", - * "point": { - * "x": 189, - * "y": 537 - * }, - * "store": "hosted" - * } */ + /** + * @example { + * "image_uri": "https://media.substrate.run/docs-vg-bedroom.jpg", + * "point": { + * "x": 189, + * "y": 537 + * }, + * "store": "hosted" + * } + */ "application/json": { /** @description Input image. */ image_uri: string; @@ -4757,9 +4063,6 @@ export interface operations { responses: { /** @description OK */ 200: { - headers: { - [name: string]: unknown; - }; content: { "application/json": { /** @description Detected segments in 'mask image' format. Base 64-encoded JPEG image bytes, or a hosted image url if `store` is provided. */ @@ -4769,25 +4072,25 @@ export interface operations { }; }; }; + /** + * SegmentAnything + * @description Segment an image using [SegmentAnything](https://github.com/facebookresearch/segment-anything). + */ SegmentAnything: { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; requestBody?: { content: { - /** @example { - * "image_uri": "https://media.substrate.run/docs-vg-bedroom.jpg", - * "point_prompts": [ - * { - * "x": 189, - * "y": 537 - * } - * ], - * "store": "hosted" - * } */ + /** + * @example { + * "image_uri": "https://media.substrate.run/docs-vg-bedroom.jpg", + * "point_prompts": [ + * { + * "x": 189, + * "y": 537 + * } + * ], + * "store": "hosted" + * } + */ "application/json": { /** @description Input image. */ image_uri: string; @@ -4829,9 +4132,6 @@ export interface operations { responses: { /** @description OK */ 200: { - headers: { - [name: string]: unknown; - }; content: { "application/json": { /** @description Detected segments in 'mask image' format. Base 64-encoded JPEG image bytes, or a hosted image url if `store` is provided. */ @@ -4841,22 +4141,22 @@ export interface operations { }; }; }; + /** + * SplitDocument + * @description Split document into text segments. + */ SplitDocument: { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; requestBody?: { content: { - /** @example { - * "doc_id": "example_pdf", - * "uri": "https://arxiv.org/pdf/2405.07945", - * "metadata": { - * "title": "GRASS II: Simulations of Potential Granulation Noise Mitigation Methods" - * } - * } */ + /** + * @example { + * "doc_id": "example_pdf", + * "uri": "https://arxiv.org/pdf/2405.07945", + * "metadata": { + * "title": "GRASS II: Simulations of Potential Granulation Noise Mitigation Methods" + * } + * } + */ "application/json": { /** @description URI of the document. */ uri: string; @@ -4876,9 +4176,6 @@ export interface operations { responses: { /** @description OK */ 200: { - headers: { - [name: string]: unknown; - }; content: { "application/json": { /** @description Document chunks */ @@ -4897,26 +4194,26 @@ export interface operations { }; }; }; + /** + * EmbedText + * @description Generate embedding for a text document. + */ EmbedText: { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; requestBody?: { content: { - /** @example { - * "text": "Argon is the third most abundant gas in Earth's atmosphere, at 0.934% (9340 ppmv). It is more than twice as abundant as water vapor.", - * "model": "jina-v2", - * "collection_name": "smoke_tests", - * "metadata": { - * "group": "18" - * }, - * "embedded_metadata_keys": [ - * "group" - * ] - * } */ + /** + * @example { + * "text": "Argon is the third most abundant gas in Earth's atmosphere, at 0.934% (9340 ppmv). It is more than twice as abundant as water vapor.", + * "model": "jina-v2", + * "collection_name": "smoke_tests", + * "metadata": { + * "group": "18" + * }, + * "embedded_metadata_keys": [ + * "group" + * ] + * } + */ "application/json": { /** @description Text to embed. */ text: string; @@ -4942,9 +4239,6 @@ export interface operations { responses: { /** @description OK */ 200: { - headers: { - [name: string]: unknown; - }; content: { "application/json": { /** Embedding */ @@ -4963,36 +4257,36 @@ export interface operations { }; }; }; + /** + * MultiEmbedText + * @description Generate embeddings for multiple text documents. + */ MultiEmbedText: { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; requestBody?: { content: { - /** @example { - * "model": "jina-v2", - * "items": [ - * { - * "text": "Osmium is the densest naturally occurring element. When experimentally measured using X-ray crystallography, it has a density of 22.59 g/cm3. Manufacturers use its alloys with platinum, iridium, and other platinum-group metals to make fountain pen nib tipping, electrical contacts, and in other applications that require extreme durability and hardness.", - * "metadata": { - * "group": "8" - * } - * }, - * { - * "text": "Despite its abundant presence in the universe and Solar System—ranking fifth in cosmic abundance following hydrogen, helium, oxygen, and carbon—neon is comparatively scarce on Earth.", - * "metadata": { - * "group": "18" - * } - * } - * ], - * "collection_name": "smoke_tests", - * "embedded_metadata_keys": [ - * "group" - * ] - * } */ + /** + * @example { + * "model": "jina-v2", + * "items": [ + * { + * "text": "Osmium is the densest naturally occurring element. When experimentally measured using X-ray crystallography, it has a density of 22.59 g/cm3. Manufacturers use its alloys with platinum, iridium, and other platinum-group metals to make fountain pen nib tipping, electrical contacts, and in other applications that require extreme durability and hardness.", + * "metadata": { + * "group": "8" + * } + * }, + * { + * "text": "Despite its abundant presence in the universe and Solar System—ranking fifth in cosmic abundance following hydrogen, helium, oxygen, and carbon—neon is comparatively scarce on Earth.", + * "metadata": { + * "group": "18" + * } + * } + * ], + * "collection_name": "smoke_tests", + * "embedded_metadata_keys": [ + * "group" + * ] + * } + */ "application/json": { /** @description Items to embed. */ items: { @@ -5021,9 +4315,6 @@ export interface operations { responses: { /** @description OK */ 200: { - headers: { - [name: string]: unknown; - }; content: { "application/json": { /** @description Generated embeddings. */ @@ -5042,19 +4333,19 @@ export interface operations { }; }; }; + /** + * EmbedImage + * @description Generate embedding for an image. + */ EmbedImage: { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; requestBody?: { content: { - /** @example { - * "image_uri": "https://media.substrate.run/docs-fuji-red.jpg", - * "collection_name": "smoke_tests" - * } */ + /** + * @example { + * "image_uri": "https://media.substrate.run/docs-fuji-red.jpg", + * "collection_name": "smoke_tests" + * } + */ "application/json": { /** @description Image to embed. */ image_uri: string; @@ -5074,9 +4365,6 @@ export interface operations { responses: { /** @description OK */ 200: { - headers: { - [name: string]: unknown; - }; content: { "application/json": { /** Embedding */ @@ -5095,26 +4383,26 @@ export interface operations { }; }; }; + /** + * MultiEmbedImage + * @description Generate embeddings for multiple images. + */ MultiEmbedImage: { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; requestBody?: { content: { - /** @example { - * "items": [ - * { - * "image_uri": "https://media.substrate.run/docs-fuji-red.jpg" - * }, - * { - * "image_uri": "https://media.substrate.run/docs-fuji-blue.jpg" - * } - * ], - * "collection_name": "smoke_tests" - * } */ + /** + * @example { + * "items": [ + * { + * "image_uri": "https://media.substrate.run/docs-fuji-red.jpg" + * }, + * { + * "image_uri": "https://media.substrate.run/docs-fuji-blue.jpg" + * } + * ], + * "collection_name": "smoke_tests" + * } + */ "application/json": { /** @description Items to embed. */ items: { @@ -5137,9 +4425,6 @@ export interface operations { responses: { /** @description OK */ 200: { - headers: { - [name: string]: unknown; - }; content: { "application/json": { /** @description Generated embeddings. */ @@ -5158,35 +4443,35 @@ export interface operations { }; }; }; + /** + * JinaV2 + * @description Generate embeddings for multiple text documents using [Jina Embeddings 2](https://arxiv.org/abs/2310.19923). + */ JinaV2: { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; requestBody?: { content: { - /** @example { - * "items": [ - * { - * "text": "Hassium is a superheavy element; it has been produced in a laboratory only in very small quantities by fusing heavy nuclei with lighter ones. Natural occurrences of the element have been hypothesised but never found.", - * "metadata": { - * "group": "8" - * } - * }, - * { - * "text": "Xenon is also used to search for hypothetical weakly interacting massive particles and as a propellant for ion thrusters in spacecraft.", - * "metadata": { - * "group": "18" - * } - * } - * ], - * "collection_name": "smoke_tests", - * "embedded_metadata_keys": [ - * "group" - * ] - * } */ + /** + * @example { + * "items": [ + * { + * "text": "Hassium is a superheavy element; it has been produced in a laboratory only in very small quantities by fusing heavy nuclei with lighter ones. Natural occurrences of the element have been hypothesised but never found.", + * "metadata": { + * "group": "8" + * } + * }, + * { + * "text": "Xenon is also used to search for hypothetical weakly interacting massive particles and as a propellant for ion thrusters in spacecraft.", + * "metadata": { + * "group": "18" + * } + * } + * ], + * "collection_name": "smoke_tests", + * "embedded_metadata_keys": [ + * "group" + * ] + * } + */ "application/json": { /** @description Items to embed. */ items: { @@ -5209,9 +4494,6 @@ export interface operations { responses: { /** @description OK */ 200: { - headers: { - [name: string]: unknown; - }; content: { "application/json": { /** @description Generated embeddings. */ @@ -5230,26 +4512,26 @@ export interface operations { }; }; }; + /** + * CLIP + * @description Generate embeddings for text or images using [CLIP](https://openai.com/research/clip). + */ CLIP: { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; requestBody?: { content: { - /** @example { - * "items": [ - * { - * "image_uri": "https://media.substrate.run/docs-fuji-red.jpg" - * }, - * { - * "image_uri": "https://media.substrate.run/docs-fuji-blue.jpg" - * } - * ], - * "collection_name": "smoke_tests" - * } */ + /** + * @example { + * "items": [ + * { + * "image_uri": "https://media.substrate.run/docs-fuji-red.jpg" + * }, + * { + * "image_uri": "https://media.substrate.run/docs-fuji-blue.jpg" + * } + * ], + * "collection_name": "smoke_tests" + * } + */ "application/json": { /** @description Items to embed. */ items: { @@ -5274,9 +4556,6 @@ export interface operations { responses: { /** @description OK */ 200: { - headers: { - [name: string]: unknown; - }; content: { "application/json": { /** @description Generated embeddings. */ @@ -5295,19 +4574,19 @@ export interface operations { }; }; }; + /** + * FindOrCreateVectorStore + * @description Find a vector store matching the given collection name, or create a new vector store. + */ FindOrCreateVectorStore: { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; requestBody?: { content: { - /** @example { - * "collection_name": "smoke_tests", - * "model": "jina-v2" - * } */ + /** + * @example { + * "collection_name": "smoke_tests", + * "model": "jina-v2" + * } + */ "application/json": { /** @description Vector store name. */ collection_name: string; @@ -5322,9 +4601,6 @@ export interface operations { responses: { /** @description Vector store created. */ 200: { - headers: { - [name: string]: unknown; - }; content: { "application/json": { /** @description Vector store name. */ @@ -5341,13 +4617,11 @@ export interface operations { }; }; }; + /** + * ListVectorStores + * @description List all vector stores. + */ ListVectorStores: { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; requestBody?: { content: { /** @example {} */ @@ -5357,9 +4631,6 @@ export interface operations { responses: { /** @description List of vector stores. */ 200: { - headers: { - [name: string]: unknown; - }; content: { "application/json": { /** @description List of vector stores. */ @@ -5379,19 +4650,19 @@ export interface operations { }; }; }; + /** + * DeleteVectorStore + * @description Delete a vector store. + */ DeleteVectorStore: { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; requestBody?: { content: { - /** @example { - * "collection_name": "fake_store", - * "model": "jina-v2" - * } */ + /** + * @example { + * "collection_name": "fake_store", + * "model": "jina-v2" + * } + */ "application/json": { /** @description Vector store name. */ collection_name: string; @@ -5406,9 +4677,6 @@ export interface operations { responses: { /** @description OK */ 200: { - headers: { - [name: string]: unknown; - }; content: { "application/json": { /** @description Vector store name. */ @@ -5423,25 +4691,25 @@ export interface operations { }; }; }; + /** + * QueryVectorStore + * @description Query a vector store for similar vectors. + */ QueryVectorStore: { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; requestBody?: { content: { - /** @example { - * "collection_name": "smoke_tests", - * "model": "jina-v2", - * "query_strings": [ - * "gas", - * "metal" - * ], - * "top_k": 1, - * "include_metadata": true - * } */ + /** + * @example { + * "collection_name": "smoke_tests", + * "model": "jina-v2", + * "query_strings": [ + * "gas", + * "metal" + * ], + * "top_k": 1, + * "include_metadata": true + * } + */ "application/json": { /** @description Vector store to query against. */ collection_name: string; @@ -5493,9 +4761,6 @@ export interface operations { responses: { /** @description Query results. */ 200: { - headers: { - [name: string]: unknown; - }; content: { "application/json": { /** @description Query results. */ @@ -5526,22 +4791,22 @@ export interface operations { }; }; }; + /** + * FetchVectors + * @description Fetch vectors from a vector store. + */ FetchVectors: { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; requestBody?: { content: { - /** @example { - * "collection_name": "smoke_tests", - * "model": "jina-v2", - * "ids": [ - * "dd8f3774e05d42caa53cfbaa7389c08f" - * ] - * } */ + /** + * @example { + * "collection_name": "smoke_tests", + * "model": "jina-v2", + * "ids": [ + * "dd8f3774e05d42caa53cfbaa7389c08f" + * ] + * } + */ "application/json": { /** @description Vector store name. */ collection_name: string; @@ -5558,9 +4823,6 @@ export interface operations { responses: { /** @description Vector data. */ 200: { - headers: { - [name: string]: unknown; - }; content: { "application/json": { /** @description Retrieved vectors. */ @@ -5579,27 +4841,27 @@ export interface operations { }; }; }; + /** + * UpdateVectors + * @description Update vectors in a vector store. + */ UpdateVectors: { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; requestBody?: { content: { - /** @example { - * "collection_name": "smoke_tests", - * "model": "jina-v2", - * "vectors": [ - * { - * "id": "dd8f3774e05d42caa53cfbaa7389c08f", - * "metadata": { - * "appearance": "silvery, blue cast" - * } - * } - * ] - * } */ + /** + * @example { + * "collection_name": "smoke_tests", + * "model": "jina-v2", + * "vectors": [ + * { + * "id": "dd8f3774e05d42caa53cfbaa7389c08f", + * "metadata": { + * "appearance": "silvery, blue cast" + * } + * } + * ] + * } + */ "application/json": { /** @description Vector store name. */ collection_name: string; @@ -5625,9 +4887,6 @@ export interface operations { responses: { /** @description Count of updated vectors. */ 200: { - headers: { - [name: string]: unknown; - }; content: { "application/json": { /** @description Number of vectors modified. */ @@ -5637,23 +4896,23 @@ export interface operations { }; }; }; + /** + * DeleteVectors + * @description Delete vectors in a vector store. + */ DeleteVectors: { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; requestBody?: { content: { - /** @example { - * "collection_name": "smoke_tests", - * "model": "jina-v2", - * "ids": [ - * "ac32b9a133dd4e3689004f6e8f0fd6cd", - * "629df177c7644062a68bceeff223cefa" - * ] - * } */ + /** + * @example { + * "collection_name": "smoke_tests", + * "model": "jina-v2", + * "ids": [ + * "ac32b9a133dd4e3689004f6e8f0fd6cd", + * "629df177c7644062a68bceeff223cefa" + * ] + * } + */ "application/json": { /** @description Vector store name. */ collection_name: string; @@ -5670,9 +4929,6 @@ export interface operations { responses: { /** @description Count of deleted vectors. */ 200: { - headers: { - [name: string]: unknown; - }; content: { "application/json": { /** @description Number of vectors modified. */ diff --git a/src/index.ts b/src/index.ts index 52e5fee..f111b7e 100644 --- a/src/index.ts +++ b/src/index.ts @@ -1,7 +1,7 @@ /** * 𐃏 Substrate TypeScript SDK * @generated file - * 20240617.20240815 + * 20240617.20240911 */ export { SubstrateError } from "substrate/Error"; diff --git a/src/openapi.json b/src/openapi.json index d0579aa..d578f15 100644 --- a/src/openapi.json +++ b/src/openapi.json @@ -2067,13 +2067,13 @@ "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. Use `auto` to automatically detect the language.", "x-loggable": true }, "segment": { "type": "boolean", "default": false, - "description": "Segment the text into sentences with approximate timestamps.", + "description": "(Deprecated) Segment the text into sentences with approximate timestamps.", "x-loggable": true }, "align": { @@ -2185,6 +2185,10 @@ "$ref": "#/components/schemas/TranscribedSegment" } }, + "language": { + "type": "string", + "description": "Language code of transcribed text." + }, "chapters": { "type": "array", "description": "Chapter markers, if `suggest_chapters` is enabled.",