diff --git a/src/GEN_VERSION b/src/GEN_VERSION index 766f9e7..bf0b572 100644 --- a/src/GEN_VERSION +++ b/src/GEN_VERSION @@ -1 +1 @@ -20240617.20240806 \ No newline at end of file +20240617.20240814 \ No newline at end of file diff --git a/src/Nodes.ts b/src/Nodes.ts index 37b6902..b3d0850 100644 --- a/src/Nodes.ts +++ b/src/Nodes.ts @@ -1,7 +1,7 @@ /** * 𐃏 Substrate * @generated file - * 20240617.20240806 + * 20240617.20240814 */ import * as OpenAPI from "substrate/OpenAPI"; @@ -944,6 +944,40 @@ export class ComputeJSONOut extends FutureObject { return super._result() as Promise; } } +/** GenerateCodeIn */ +export class GenerateCodeIn extends FutureObject { + /** Input prompt. */ + get prompt() { + return new FutureString(this._directive.next("prompt")); + } + /** Language of the code. */ + get language() { + return new FutureString(this._directive.next("language")); + } + /** (Optional) Higher values make the output more random, lower values make the output more deterministic. */ + get temperature() { + return new FutureNumber(this._directive.next("temperature")); + } + /** (Optional) Maximum number of tokens to generate. */ + get max_tokens() { + return new FutureNumber(this._directive.next("max_tokens")); + } + /** returns the result for `GenerateCodeIn` once it's node has been run. */ + protected override async _result(): Promise { + return super._result() as Promise; + } +} +/** GenerateCodeOut */ +export class GenerateCodeOut extends FutureObject { + /** Code response. */ + get code() { + return new FutureString(this._directive.next("code")); + } + /** returns the result for `GenerateCodeOut` once it's node has been run. */ + protected override async _result(): Promise { + return super._result() as Promise; + } +} /** MultiComputeTextIn */ export class MultiComputeTextIn extends FutureObject { /** Input prompt. */ @@ -3635,6 +3669,73 @@ export class MultiComputeJSON extends Node { return super.output() as OpenAPI.components["schemas"]["MultiComputeJSONOut"]; } } +export namespace GenerateCode { + /** + * GenerateCode Input + * https://www.substrate.run/nodes#GenerateCode + */ + export type Input = FutureExpandAny< + OpenAPI.components["schemas"]["GenerateCodeIn"] + >; + + /** + * GenerateCode Output + * https://www.substrate.run/nodes#GenerateCode + */ + export type Output = OpenAPI.components["schemas"]["GenerateCodeOut"]; +} + +/** + * Generate code in the specified language. + * + * https://www.substrate.run/nodes#GenerateCode + */ +export class GenerateCode extends Node { + /** + * Input arguments: `prompt`, `language`, `temperature` (optional), `max_tokens` (optional) + * + * Output fields: `code` + * + * https://www.substrate.run/nodes#GenerateCode + */ + constructor( + args: FutureExpandAny, + options?: Options, + ) { + super(args, options); + this.node = "GenerateCode"; + } + + /** + * Retrieve this node's output from a response. + * + * Output fields: `code` + * + * https://www.substrate.run/nodes#GenerateCode + */ + protected override async result(): Promise< + OpenAPI.components["schemas"]["GenerateCodeOut"] | undefined + > { + return Promise.resolve( + this._response ? this._response.get(this) : undefined, + ) as Promise; + } + + /** + * Future reference to this node's output. + * + * Output fields: `code` + * + * https://www.substrate.run/nodes#GenerateCode + */ + override get future(): GenerateCodeOut { + return new GenerateCodeOut(new Trace([], this)); + } + + protected override output(): OpenAPI.components["schemas"]["GenerateCodeOut"] { + return super.output() as OpenAPI.components["schemas"]["GenerateCodeOut"]; + } +} export namespace Mistral7BInstruct { /** * Mistral7BInstruct Input @@ -6051,6 +6152,7 @@ export type AnyNode = | BatchComputeJSON | ComputeJSON | MultiComputeJSON + | GenerateCode | Mistral7BInstruct | Mixtral8x7BInstruct | Llama3Instruct8B @@ -6105,74 +6207,76 @@ export type NodeOutput = T extends Experimental ? OpenAPI.components["schemas"]["ComputeJSONOut"] : T extends MultiComputeJSON ? OpenAPI.components["schemas"]["MultiComputeJSONOut"] - : T extends Mistral7BInstruct - ? OpenAPI.components["schemas"]["Mistral7BInstructOut"] - : T extends Mixtral8x7BInstruct - ? OpenAPI.components["schemas"]["Mixtral8x7BInstructOut"] - : T extends Llama3Instruct8B - ? OpenAPI.components["schemas"]["Llama3Instruct8BOut"] - : T extends Llama3Instruct70B - ? OpenAPI.components["schemas"]["Llama3Instruct70BOut"] - : T extends Firellava13B - ? OpenAPI.components["schemas"]["Firellava13BOut"] - : T extends GenerateImage - ? OpenAPI.components["schemas"]["GenerateImageOut"] - : T extends MultiGenerateImage - ? OpenAPI.components["schemas"]["MultiGenerateImageOut"] - : T extends InpaintImage - ? OpenAPI.components["schemas"]["InpaintImageOut"] - : T extends MultiInpaintImage - ? OpenAPI.components["schemas"]["MultiInpaintImageOut"] - : T extends StableDiffusionXLLightning - ? OpenAPI.components["schemas"]["StableDiffusionXLLightningOut"] - : T extends StableDiffusionXLInpaint - ? OpenAPI.components["schemas"]["StableDiffusionXLInpaintOut"] - : T extends StableDiffusionXLControlNet - ? OpenAPI.components["schemas"]["StableDiffusionXLControlNetOut"] - : T extends StableVideoDiffusion - ? OpenAPI.components["schemas"]["StableVideoDiffusionOut"] - : T extends InterpolateFrames - ? OpenAPI.components["schemas"]["InterpolateFramesOut"] - : T extends TranscribeSpeech - ? OpenAPI.components["schemas"]["TranscribeSpeechOut"] - : T extends GenerateSpeech - ? OpenAPI.components["schemas"]["GenerateSpeechOut"] - : T extends RemoveBackground - ? OpenAPI.components["schemas"]["RemoveBackgroundOut"] - : T extends EraseImage - ? OpenAPI.components["schemas"]["EraseImageOut"] - : T extends UpscaleImage - ? OpenAPI.components["schemas"]["UpscaleImageOut"] - : T extends SegmentUnderPoint - ? OpenAPI.components["schemas"]["SegmentUnderPointOut"] - : T extends SegmentAnything - ? OpenAPI.components["schemas"]["SegmentAnythingOut"] - : T extends SplitDocument - ? OpenAPI.components["schemas"]["SplitDocumentOut"] - : T extends EmbedText - ? OpenAPI.components["schemas"]["EmbedTextOut"] - : T extends MultiEmbedText - ? OpenAPI.components["schemas"]["MultiEmbedTextOut"] - : T extends EmbedImage - ? OpenAPI.components["schemas"]["EmbedImageOut"] - : T extends MultiEmbedImage - ? OpenAPI.components["schemas"]["MultiEmbedImageOut"] - : T extends JinaV2 - ? OpenAPI.components["schemas"]["JinaV2Out"] - : T extends CLIP - ? OpenAPI.components["schemas"]["CLIPOut"] - : T extends FindOrCreateVectorStore - ? OpenAPI.components["schemas"]["FindOrCreateVectorStoreOut"] - : T extends ListVectorStores - ? OpenAPI.components["schemas"]["ListVectorStoresOut"] - : T extends DeleteVectorStore - ? OpenAPI.components["schemas"]["DeleteVectorStoreOut"] - : T extends QueryVectorStore - ? OpenAPI.components["schemas"]["QueryVectorStoreOut"] - : T extends FetchVectors - ? OpenAPI.components["schemas"]["FetchVectorsOut"] - : T extends UpdateVectors - ? OpenAPI.components["schemas"]["UpdateVectorsOut"] - : T extends DeleteVectors - ? OpenAPI.components["schemas"]["DeleteVectorsOut"] - : never; + : T extends GenerateCode + ? OpenAPI.components["schemas"]["GenerateCodeOut"] + : T extends Mistral7BInstruct + ? OpenAPI.components["schemas"]["Mistral7BInstructOut"] + : T extends Mixtral8x7BInstruct + ? OpenAPI.components["schemas"]["Mixtral8x7BInstructOut"] + : T extends Llama3Instruct8B + ? OpenAPI.components["schemas"]["Llama3Instruct8BOut"] + : T extends Llama3Instruct70B + ? OpenAPI.components["schemas"]["Llama3Instruct70BOut"] + : T extends Firellava13B + ? OpenAPI.components["schemas"]["Firellava13BOut"] + : T extends GenerateImage + ? OpenAPI.components["schemas"]["GenerateImageOut"] + : T extends MultiGenerateImage + ? OpenAPI.components["schemas"]["MultiGenerateImageOut"] + : T extends InpaintImage + ? OpenAPI.components["schemas"]["InpaintImageOut"] + : T extends MultiInpaintImage + ? OpenAPI.components["schemas"]["MultiInpaintImageOut"] + : T extends StableDiffusionXLLightning + ? OpenAPI.components["schemas"]["StableDiffusionXLLightningOut"] + : T extends StableDiffusionXLInpaint + ? OpenAPI.components["schemas"]["StableDiffusionXLInpaintOut"] + : T extends StableDiffusionXLControlNet + ? OpenAPI.components["schemas"]["StableDiffusionXLControlNetOut"] + : T extends StableVideoDiffusion + ? OpenAPI.components["schemas"]["StableVideoDiffusionOut"] + : T extends InterpolateFrames + ? OpenAPI.components["schemas"]["InterpolateFramesOut"] + : T extends TranscribeSpeech + ? OpenAPI.components["schemas"]["TranscribeSpeechOut"] + : T extends GenerateSpeech + ? OpenAPI.components["schemas"]["GenerateSpeechOut"] + : T extends RemoveBackground + ? OpenAPI.components["schemas"]["RemoveBackgroundOut"] + : T extends EraseImage + ? OpenAPI.components["schemas"]["EraseImageOut"] + : T extends UpscaleImage + ? OpenAPI.components["schemas"]["UpscaleImageOut"] + : T extends SegmentUnderPoint + ? OpenAPI.components["schemas"]["SegmentUnderPointOut"] + : T extends SegmentAnything + ? OpenAPI.components["schemas"]["SegmentAnythingOut"] + : T extends SplitDocument + ? OpenAPI.components["schemas"]["SplitDocumentOut"] + : T extends EmbedText + ? OpenAPI.components["schemas"]["EmbedTextOut"] + : T extends MultiEmbedText + ? OpenAPI.components["schemas"]["MultiEmbedTextOut"] + : T extends EmbedImage + ? OpenAPI.components["schemas"]["EmbedImageOut"] + : T extends MultiEmbedImage + ? OpenAPI.components["schemas"]["MultiEmbedImageOut"] + : T extends JinaV2 + ? OpenAPI.components["schemas"]["JinaV2Out"] + : T extends CLIP + ? OpenAPI.components["schemas"]["CLIPOut"] + : T extends FindOrCreateVectorStore + ? OpenAPI.components["schemas"]["FindOrCreateVectorStoreOut"] + : T extends ListVectorStores + ? OpenAPI.components["schemas"]["ListVectorStoresOut"] + : T extends DeleteVectorStore + ? OpenAPI.components["schemas"]["DeleteVectorStoreOut"] + : T extends QueryVectorStore + ? OpenAPI.components["schemas"]["QueryVectorStoreOut"] + : T extends FetchVectors + ? OpenAPI.components["schemas"]["FetchVectorsOut"] + : T extends UpdateVectors + ? OpenAPI.components["schemas"]["UpdateVectorsOut"] + : T extends DeleteVectors + ? OpenAPI.components["schemas"]["DeleteVectorsOut"] + : never; diff --git a/src/OpenAPI.ts b/src/OpenAPI.ts index 5861c57..f85b1f5 100644 --- a/src/OpenAPI.ts +++ b/src/OpenAPI.ts @@ -5,324 +5,927 @@ 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. + */ + post: operations["GenerateCode"]; + 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 */ @@ -338,7 +941,7 @@ export interface components { * @description The HTTP status code for the error. * @default 500 */ - status_code?: number; + status_code: number; }; /** ExperimentalIn */ ExperimentalIn: { @@ -352,7 +955,7 @@ export interface components { * @description Timeout in seconds. * @default 60 */ - timeout?: number; + timeout: number; }; /** ExperimentalOut */ ExperimentalOut: { @@ -420,7 +1023,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; /** @@ -428,7 +1031,7 @@ export interface components { * @default Llama3Instruct8B * @enum {string} */ - model?: + model: | "Mistral7BInstruct" | "Mixtral8x7BInstruct" | "Llama3Instruct8B" @@ -457,7 +1060,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; /** @@ -465,7 +1068,12 @@ export interface components { * @default Llama3Instruct8B * @enum {string} */ - model?: "Mistral7BInstruct" | "Mixtral8x7BInstruct" | "Llama3Instruct8B"; + model: + | "Mistral7BInstruct" + | "Mixtral8x7BInstruct" + | "Llama3Instruct8B" + | "Llama3Instruct70B" + | "gpt-4o"; }; /** ComputeJSONOut */ ComputeJSONOut: { @@ -476,6 +1084,40 @@ export interface components { /** @description If the model output could not be parsed to JSON, this is the raw text output. */ text?: string; }; + /** GenerateCodeIn */ + GenerateCodeIn: { + /** @description Input prompt. */ + prompt: string; + /** + * @description Language of the code. + * @enum {string} + */ + language: + | "python" + | "java" + | "c++" + | "javascript" + | "typescript" + | "php" + | "html" + | "c#" + | "sql" + | "ruby" + | "tex" + | "shell"; + /** + * Format: float + * @description Higher values make the output more random, lower values make the output more deterministic. + */ + temperature?: number; + /** @description Maximum number of tokens to generate. */ + max_tokens?: number; + }; + /** GenerateCodeOut */ + GenerateCodeOut: { + /** @description Code response. */ + code: string; + }; /** MultiComputeTextIn */ MultiComputeTextIn: { /** @description Input prompt. */ @@ -490,7 +1132,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; /** @@ -498,7 +1140,7 @@ export interface components { * @default Llama3Instruct8B * @enum {string} */ - model?: + model: | "Mistral7BInstruct" | "Mixtral8x7BInstruct" | "Llama3Instruct8B" @@ -521,7 +1163,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; /** @@ -529,7 +1171,7 @@ export interface components { * @default Llama3Instruct8B * @enum {string} */ - model?: "Mistral7BInstruct" | "Llama3Instruct8B"; + model: "Mistral7BInstruct" | "Llama3Instruct8B"; }; /** BatchComputeTextOut */ BatchComputeTextOut: { @@ -557,7 +1199,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; /** @@ -565,7 +1207,7 @@ export interface components { * @default Llama3Instruct8B * @enum {string} */ - model?: "Mistral7BInstruct" | "Mixtral8x7BInstruct" | "Llama3Instruct8B"; + model: "Mistral7BInstruct" | "Mixtral8x7BInstruct" | "Llama3Instruct8B"; }; /** MultiComputeJSONOut */ MultiComputeJSONOut: { @@ -592,7 +1234,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; /** @@ -600,7 +1242,7 @@ export interface components { * @default Llama3Instruct8B * @enum {string} */ - model?: "Mistral7BInstruct" | "Llama3Instruct8B"; + model: "Mistral7BInstruct" | "Llama3Instruct8B"; }; /** BatchComputeJSONOut */ BatchComputeJSONOut: { @@ -624,7 +1266,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; @@ -639,25 +1281,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; }; @@ -692,7 +1334,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; @@ -707,25 +1349,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; }; @@ -760,7 +1402,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. @@ -771,25 +1413,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. */ @@ -828,7 +1470,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. @@ -839,25 +1481,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; }; @@ -930,7 +1572,7 @@ export interface components { * @description Number of diffusion steps. * @default 30 */ - steps?: number; + steps: number; /** * @description Number of images to generate. * @default 1 @@ -942,12 +1584,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[]; /** @@ -955,7 +1597,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: { @@ -984,19 +1626,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[]; }; @@ -1026,7 +1668,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. */ @@ -1035,12 +1677,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[]; }; @@ -1074,7 +1716,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. */ @@ -1084,13 +1726,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[]; }; @@ -1115,25 +1757,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: { @@ -1153,17 +1795,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: { @@ -1229,7 +1871,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. */ @@ -1239,7 +1881,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[]; }; @@ -1319,12 +1961,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. */ @@ -1357,7 +1999,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; }; @@ -1437,27 +2079,27 @@ export interface components { * @description Language of input audio in [ISO-639-1](https://en.wikipedia.org/wiki/List_of_ISO_639_language_codes) format. * @default en */ - language?: string; + language: string; /** * @description 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: { @@ -1591,7 +2233,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; }; @@ -1630,7 +2272,7 @@ export interface components { * @default jina-v2 * @enum {string} */ - model?: "jina-v2" | "clip"; + model: "jina-v2" | "clip"; }; /** EmbedTextOut */ EmbedTextOut: { @@ -1679,7 +2321,7 @@ export interface components { * @default jina-v2 * @enum {string} */ - model?: "jina-v2" | "clip"; + model: "jina-v2" | "clip"; }; /** MultiEmbedTextOut */ MultiEmbedTextOut: { @@ -1740,7 +2382,7 @@ export interface components { * @default clip * @enum {string} */ - model?: "clip"; + model: "clip"; }; /** EmbedImageOut */ EmbedImageOut: { @@ -1792,7 +2434,7 @@ export interface components { * @default clip * @enum {string} */ - model?: "clip"; + model: "clip"; }; /** MultiEmbedImageOut */ MultiEmbedImageOut: { @@ -2016,27 +2658,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; @@ -2120,27 +2762,23 @@ 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; @@ -2159,6 +2797,9 @@ export interface operations { responses: { /** @description OK */ 200: { + headers: { + [name: string]: unknown; + }; content: { "application/json": { /** @description Response. */ @@ -2170,27 +2811,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; @@ -2200,6 +2841,9 @@ export interface operations { responses: { /** @description OK */ 200: { + headers: { + [name: string]: unknown; + }; content: { "application/json": { /** @description The evaluated result. */ @@ -2209,20 +2853,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; @@ -2236,6 +2880,9 @@ 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. */ @@ -2245,22 +2892,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; @@ -2278,6 +2925,9 @@ export interface operations { responses: { /** @description OK */ 200: { + headers: { + [name: string]: unknown; + }; content: { "application/json": { /** @description Return value of your function. */ @@ -2293,20 +2943,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; @@ -2341,6 +2991,9 @@ export interface operations { responses: { /** @description OK */ 200: { + headers: { + [name: string]: unknown; + }; content: { "application/json": { /** @description Text response. */ @@ -2350,20 +3003,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; @@ -2396,6 +3049,9 @@ export interface operations { responses: { /** @description OK */ 200: { + headers: { + [name: string]: unknown; + }; content: { "application/json": { /** @description Response choices. */ @@ -2408,22 +3064,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[]; @@ -2447,6 +3103,9 @@ export interface operations { responses: { /** @description OK */ 200: { + headers: { + [name: string]: unknown; + }; content: { "application/json": { /** @description Batch outputs. */ @@ -2459,35 +3118,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[]; @@ -2515,6 +3174,9 @@ export interface operations { responses: { /** @description OK */ 200: { + headers: { + [name: string]: unknown; + }; content: { "application/json": { /** @description Batch outputs. */ @@ -2531,33 +3193,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." + /** @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." + * } + * } * }, - * "bio": { - * "type": "string", - * "description": "Concise biography of the author." - * } - * } - * }, - * "temperature": 0.4, - * "max_tokens": 800 - * } - */ + * "temperature": 0.4, + * "max_tokens": 800 + * } */ "application/json": { /** @description Input prompt. */ prompt: string; @@ -2581,13 +3243,18 @@ export interface operations { model?: | "Mistral7BInstruct" | "Mixtral8x7BInstruct" - | "Llama3Instruct8B"; + | "Llama3Instruct8B" + | "Llama3Instruct70B" + | "gpt-4o"; }; }; }; responses: { /** @description OK */ 200: { + headers: { + [name: string]: unknown; + }; content: { "application/json": { /** @description JSON response. */ @@ -2601,34 +3268,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." + /** @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." + * } + * } * }, - * "bio": { - * "type": "string", - * "description": "Concise biography of the author." - * } - * } - * }, - * "num_choices": 2, - * "temperature": 0.4, - * "max_tokens": 800 - * } - */ + * "num_choices": 2, + * "temperature": 0.4, + * "max_tokens": 800 + * } */ "application/json": { /** @description Input prompt. */ prompt: string; @@ -2664,6 +3331,9 @@ export interface operations { responses: { /** @description OK */ 200: { + headers: { + [name: string]: unknown; + }; content: { "application/json": { /** @description Response choices. */ @@ -2680,21 +3350,79 @@ export interface operations { }; }; }; - /** - * Mistral7BInstruct - * @description Compute text using [Mistral 7B Instruct](https://mistral.ai/news/announcing-mistral-7b). - */ + GenerateCode: { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + requestBody?: { + content: { + /** @example { + * "prompt": "Write a function that prints 'Hello, World!'", + * "language": "python" + * } */ + "application/json": { + /** @description Input prompt. */ + prompt: string; + /** + * @description Language of the code. + * @enum {string} + */ + language: + | "python" + | "java" + | "c++" + | "javascript" + | "typescript" + | "php" + | "html" + | "c#" + | "sql" + | "ruby" + | "tex" + | "shell"; + /** + * Format: float + * @description Higher values make the output more random, lower values make the output more deterministic. + */ + temperature?: number; + /** @description Maximum number of tokens to generate. */ + max_tokens?: number; + }; + }; + }; + responses: { + /** @description OK */ + 200: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": { + /** @description Code response. */ + code: string; + }; + }; + }; + }; + }; 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; @@ -2746,6 +3474,9 @@ export interface operations { responses: { /** @description OK */ 200: { + headers: { + [name: string]: unknown; + }; content: { "application/json": { /** @description Response choices. */ @@ -2762,21 +3493,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; @@ -2828,6 +3559,9 @@ export interface operations { responses: { /** @description OK */ 200: { + headers: { + [name: string]: unknown; + }; content: { "application/json": { /** @description Response choices. */ @@ -2844,21 +3578,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; @@ -2910,6 +3644,9 @@ export interface operations { responses: { /** @description OK */ 200: { + headers: { + [name: string]: unknown; + }; content: { "application/json": { /** @description Response choices. */ @@ -2926,21 +3663,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; @@ -2988,6 +3725,9 @@ export interface operations { responses: { /** @description OK */ 200: { + headers: { + [name: string]: unknown; + }; content: { "application/json": { /** @description Response choices. */ @@ -3000,22 +3740,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; @@ -3029,6 +3769,9 @@ export interface operations { responses: { /** @description OK */ 200: { + headers: { + [name: string]: unknown; + }; content: { "application/json": { /** @description Text response. */ @@ -3038,19 +3781,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; @@ -3062,6 +3805,9 @@ 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. */ @@ -3071,20 +3817,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; @@ -3101,6 +3847,9 @@ export interface operations { responses: { /** @description OK */ 200: { + headers: { + [name: string]: unknown; + }; content: { "application/json": { /** @description Generated images. */ @@ -3113,21 +3862,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; @@ -3143,6 +3892,9 @@ 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. */ @@ -3152,22 +3904,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; @@ -3188,6 +3940,9 @@ export interface operations { responses: { /** @description OK */ 200: { + headers: { + [name: string]: unknown; + }; content: { "application/json": { /** @description Generated images. */ @@ -3200,25 +3955,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; @@ -3249,6 +4004,9 @@ export interface operations { responses: { /** @description OK */ 200: { + headers: { + [name: string]: unknown; + }; content: { "application/json": { /** @description Generated images. */ @@ -3263,28 +4021,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; @@ -3320,6 +4078,9 @@ export interface operations { responses: { /** @description OK */ 200: { + headers: { + [name: string]: unknown; + }; content: { "application/json": { /** @description Generated images. */ @@ -3334,28 +4095,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; @@ -3400,6 +4161,9 @@ export interface operations { responses: { /** @description OK */ 200: { + headers: { + [name: string]: unknown; + }; content: { "application/json": { /** @description Generated images. */ @@ -3414,19 +4178,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; @@ -3462,6 +4226,9 @@ export interface operations { responses: { /** @description OK */ 200: { + headers: { + [name: string]: unknown; + }; content: { "application/json": { /** @description Generated video. */ @@ -3473,22 +4240,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[]; @@ -3516,6 +4283,9 @@ export interface operations { responses: { /** @description OK */ 200: { + headers: { + [name: string]: unknown; + }; content: { "application/json": { /** @description Generated video. */ @@ -3527,23 +4297,23 @@ 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; @@ -3580,6 +4350,9 @@ export interface operations { responses: { /** @description OK */ 200: { + headers: { + [name: string]: unknown; + }; content: { "application/json": { /** @description Transcribed text. */ @@ -3633,19 +4406,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; @@ -3657,6 +4430,9 @@ 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. */ @@ -3666,19 +4442,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; @@ -3702,6 +4478,9 @@ 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. */ @@ -3711,20 +4490,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; @@ -3738,6 +4517,9 @@ 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. */ @@ -3747,20 +4529,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; @@ -3779,6 +4561,9 @@ 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. */ @@ -3788,23 +4573,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; @@ -3823,6 +4608,9 @@ 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. */ @@ -3832,25 +4620,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; @@ -3892,6 +4680,9 @@ 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. */ @@ -3901,22 +4692,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; @@ -3936,6 +4727,9 @@ export interface operations { responses: { /** @description OK */ 200: { + headers: { + [name: string]: unknown; + }; content: { "application/json": { /** @description Document chunks */ @@ -3954,26 +4748,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; @@ -3999,6 +4793,9 @@ export interface operations { responses: { /** @description OK */ 200: { + headers: { + [name: string]: unknown; + }; content: { "application/json": { /** Embedding */ @@ -4017,36 +4814,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: { @@ -4075,6 +4872,9 @@ export interface operations { responses: { /** @description OK */ 200: { + headers: { + [name: string]: unknown; + }; content: { "application/json": { /** @description Generated embeddings. */ @@ -4093,19 +4893,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; @@ -4125,6 +4925,9 @@ export interface operations { responses: { /** @description OK */ 200: { + headers: { + [name: string]: unknown; + }; content: { "application/json": { /** Embedding */ @@ -4143,26 +4946,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: { @@ -4185,6 +4988,9 @@ export interface operations { responses: { /** @description OK */ 200: { + headers: { + [name: string]: unknown; + }; content: { "application/json": { /** @description Generated embeddings. */ @@ -4203,35 +5009,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: { @@ -4254,6 +5060,9 @@ export interface operations { responses: { /** @description OK */ 200: { + headers: { + [name: string]: unknown; + }; content: { "application/json": { /** @description Generated embeddings. */ @@ -4272,26 +5081,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: { @@ -4316,6 +5125,9 @@ export interface operations { responses: { /** @description OK */ 200: { + headers: { + [name: string]: unknown; + }; content: { "application/json": { /** @description Generated embeddings. */ @@ -4334,19 +5146,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; @@ -4361,6 +5173,9 @@ export interface operations { responses: { /** @description Vector store created. */ 200: { + headers: { + [name: string]: unknown; + }; content: { "application/json": { /** @description Vector store name. */ @@ -4377,11 +5192,13 @@ export interface operations { }; }; }; - /** - * ListVectorStores - * @description List all vector stores. - */ ListVectorStores: { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; requestBody?: { content: { /** @example {} */ @@ -4391,6 +5208,9 @@ export interface operations { responses: { /** @description List of vector stores. */ 200: { + headers: { + [name: string]: unknown; + }; content: { "application/json": { /** @description List of vector stores. */ @@ -4410,19 +5230,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; @@ -4437,6 +5257,9 @@ export interface operations { responses: { /** @description OK */ 200: { + headers: { + [name: string]: unknown; + }; content: { "application/json": { /** @description Vector store name. */ @@ -4451,25 +5274,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; @@ -4521,6 +5344,9 @@ export interface operations { responses: { /** @description Query results. */ 200: { + headers: { + [name: string]: unknown; + }; content: { "application/json": { /** @description Query results. */ @@ -4551,22 +5377,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; @@ -4583,6 +5409,9 @@ export interface operations { responses: { /** @description Vector data. */ 200: { + headers: { + [name: string]: unknown; + }; content: { "application/json": { /** @description Retrieved vectors. */ @@ -4601,27 +5430,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; @@ -4647,6 +5476,9 @@ export interface operations { responses: { /** @description Count of updated vectors. */ 200: { + headers: { + [name: string]: unknown; + }; content: { "application/json": { /** @description Number of vectors modified. */ @@ -4656,23 +5488,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; @@ -4689,6 +5521,9 @@ 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 8b6830e..f8be650 100644 --- a/src/index.ts +++ b/src/index.ts @@ -1,7 +1,7 @@ /** * 𐃏 Substrate TypeScript SDK * @generated file - * 20240617.20240806 + * 20240617.20240814 */ export { SubstrateError } from "substrate/Error"; @@ -15,6 +15,7 @@ export { BatchComputeJSON, ComputeJSON, MultiComputeJSON, + GenerateCode, Mistral7BInstruct, Mixtral8x7BInstruct, Llama3Instruct8B, diff --git a/src/openapi.json b/src/openapi.json index 4504f5a..2ad63cb 100644 --- a/src/openapi.json +++ b/src/openapi.json @@ -270,7 +270,9 @@ "enum": [ "Mistral7BInstruct", "Mixtral8x7BInstruct", - "Llama3Instruct8B" + "Llama3Instruct8B", + "Llama3Instruct70B", + "gpt-4o" ], "description": "Selected model.", "default": "Llama3Instruct8B", @@ -295,6 +297,59 @@ }, "required": [] }, + "GenerateCodeIn": { + "title": "GenerateCodeIn", + "type": "object", + "properties": { + "prompt": { + "type": "string", + "description": "Input prompt." + }, + "language": { + "type": "string", + "description": "Language of the code.", + "enum": [ + "python", + "java", + "c++", + "javascript", + "typescript", + "php", + "html", + "c#", + "sql", + "ruby", + "tex", + "shell" + ] + }, + "temperature": { + "type": "number", + "format": "float", + "minimum": 0, + "maximum": 1, + "description": "Higher values make the output more random, lower values make the output more deterministic.", + "x-loggable": true + }, + "max_tokens": { + "type": "integer", + "description": "Maximum number of tokens to generate.", + "x-loggable": true + } + }, + "required": ["prompt", "language"] + }, + "GenerateCodeOut": { + "title": "GenerateCodeOut", + "type": "object", + "properties": { + "code": { + "type": "string", + "description": "Code response." + } + }, + "required": ["code"] + }, "MultiComputeTextIn": { "title": "MultiComputeTextIn", "type": "object", @@ -3351,6 +3406,42 @@ } } }, + "/GenerateCode": { + "post": { + "summary": "GenerateCode", + "operationId": "GenerateCode", + "tags": ["category:language"], + "description": "Generate code in the specified language.", + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/GenerateCodeIn" + }, + "example": { + "prompt": "Write a function that prints 'Hello, World!'", + "language": "python" + } + } + } + }, + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/GenerateCodeOut" + }, + "example": { + "code": "def hello_world():\n print('Hello, World!')\n" + } + } + } + } + } + } + }, "/Mistral7BInstruct": { "post": { "summary": "Mistral7BInstruct",