Documentation
¶
Overview ¶
Package runware implements the Runware provider for Bifrost. Runware exposes a single synchronous endpoint that accepts an array of tasks; this provider supports its image operations (text-to-image, image-to-image, inpainting, outpainting), all of which use the "imageInference" task type.
Index ¶
- func ToBifrostImageGenerationResponse(resp *RunwareResponse) (*schemas.BifrostImageGenerationResponse, *schemas.BifrostError)
- func ToBifrostVideoGenerationResponse(result *RunwareResult) *schemas.BifrostVideoGenerationResponse
- type RunwareError
- type RunwareFrameImage
- type RunwareGetResponseRequest
- type RunwareInferenceRequest
- func ToRunwareImageEditRequest(bifrostReq *schemas.BifrostImageEditRequest) (*RunwareInferenceRequest, error)
- func ToRunwareImageGenerationRequest(bifrostReq *schemas.BifrostImageGenerationRequest) (*RunwareInferenceRequest, error)
- func ToRunwareVideoGenerationRequest(bifrostReq *schemas.BifrostVideoGenerationRequest) (*RunwareInferenceRequest, error)
- type RunwareProvider
- func (provider *RunwareProvider) BatchCancel(_ *schemas.BifrostContext, _ []schemas.Key, ...) (*schemas.BifrostBatchCancelResponse, *schemas.BifrostError)
- func (provider *RunwareProvider) BatchCreate(_ *schemas.BifrostContext, _ schemas.Key, _ *schemas.BifrostBatchCreateRequest) (*schemas.BifrostBatchCreateResponse, *schemas.BifrostError)
- func (provider *RunwareProvider) BatchDelete(_ *schemas.BifrostContext, _ []schemas.Key, ...) (*schemas.BifrostBatchDeleteResponse, *schemas.BifrostError)
- func (provider *RunwareProvider) BatchList(_ *schemas.BifrostContext, _ []schemas.Key, _ *schemas.BifrostBatchListRequest) (*schemas.BifrostBatchListResponse, *schemas.BifrostError)
- func (provider *RunwareProvider) BatchResults(_ *schemas.BifrostContext, _ []schemas.Key, ...) (*schemas.BifrostBatchResultsResponse, *schemas.BifrostError)
- func (provider *RunwareProvider) BatchRetrieve(_ *schemas.BifrostContext, _ []schemas.Key, ...) (*schemas.BifrostBatchRetrieveResponse, *schemas.BifrostError)
- func (provider *RunwareProvider) CachedContentCreate(ctx *schemas.BifrostContext, key schemas.Key, ...) (*schemas.BifrostCachedContentCreateResponse, *schemas.BifrostError)
- func (provider *RunwareProvider) CachedContentDelete(ctx *schemas.BifrostContext, keys []schemas.Key, ...) (*schemas.BifrostCachedContentDeleteResponse, *schemas.BifrostError)
- func (provider *RunwareProvider) CachedContentList(ctx *schemas.BifrostContext, keys []schemas.Key, ...) (*schemas.BifrostCachedContentListResponse, *schemas.BifrostError)
- func (provider *RunwareProvider) CachedContentRetrieve(ctx *schemas.BifrostContext, keys []schemas.Key, ...) (*schemas.BifrostCachedContentRetrieveResponse, *schemas.BifrostError)
- func (provider *RunwareProvider) CachedContentUpdate(ctx *schemas.BifrostContext, keys []schemas.Key, ...) (*schemas.BifrostCachedContentUpdateResponse, *schemas.BifrostError)
- func (provider *RunwareProvider) ChatCompletion(ctx *schemas.BifrostContext, key schemas.Key, ...) (*schemas.BifrostChatResponse, *schemas.BifrostError)
- func (provider *RunwareProvider) ChatCompletionStream(ctx *schemas.BifrostContext, postHookRunner schemas.PostHookRunner, ...) (chan *schemas.BifrostStreamChunk, *schemas.BifrostError)
- func (provider *RunwareProvider) Compaction(ctx *schemas.BifrostContext, key schemas.Key, ...) (*schemas.BifrostCompactionResponse, *schemas.BifrostError)
- func (provider *RunwareProvider) ContainerCreate(_ *schemas.BifrostContext, _ schemas.Key, ...) (*schemas.BifrostContainerCreateResponse, *schemas.BifrostError)
- func (provider *RunwareProvider) ContainerDelete(_ *schemas.BifrostContext, _ []schemas.Key, ...) (*schemas.BifrostContainerDeleteResponse, *schemas.BifrostError)
- func (provider *RunwareProvider) ContainerFileContent(_ *schemas.BifrostContext, _ []schemas.Key, ...) (*schemas.BifrostContainerFileContentResponse, *schemas.BifrostError)
- func (provider *RunwareProvider) ContainerFileCreate(_ *schemas.BifrostContext, _ schemas.Key, ...) (*schemas.BifrostContainerFileCreateResponse, *schemas.BifrostError)
- func (provider *RunwareProvider) ContainerFileDelete(_ *schemas.BifrostContext, _ []schemas.Key, ...) (*schemas.BifrostContainerFileDeleteResponse, *schemas.BifrostError)
- func (provider *RunwareProvider) ContainerFileList(_ *schemas.BifrostContext, _ []schemas.Key, ...) (*schemas.BifrostContainerFileListResponse, *schemas.BifrostError)
- func (provider *RunwareProvider) ContainerFileRetrieve(_ *schemas.BifrostContext, _ []schemas.Key, ...) (*schemas.BifrostContainerFileRetrieveResponse, *schemas.BifrostError)
- func (provider *RunwareProvider) ContainerList(_ *schemas.BifrostContext, _ []schemas.Key, ...) (*schemas.BifrostContainerListResponse, *schemas.BifrostError)
- func (provider *RunwareProvider) ContainerRetrieve(_ *schemas.BifrostContext, _ []schemas.Key, ...) (*schemas.BifrostContainerRetrieveResponse, *schemas.BifrostError)
- func (provider *RunwareProvider) CountTokens(_ *schemas.BifrostContext, _ schemas.Key, _ *schemas.BifrostResponsesRequest) (*schemas.BifrostCountTokensResponse, *schemas.BifrostError)
- func (provider *RunwareProvider) Embedding(ctx *schemas.BifrostContext, key schemas.Key, ...) (*schemas.BifrostEmbeddingResponse, *schemas.BifrostError)
- func (provider *RunwareProvider) FileContent(_ *schemas.BifrostContext, _ []schemas.Key, ...) (*schemas.BifrostFileContentResponse, *schemas.BifrostError)
- func (provider *RunwareProvider) FileDelete(_ *schemas.BifrostContext, _ []schemas.Key, ...) (*schemas.BifrostFileDeleteResponse, *schemas.BifrostError)
- func (provider *RunwareProvider) FileList(_ *schemas.BifrostContext, _ []schemas.Key, _ *schemas.BifrostFileListRequest) (*schemas.BifrostFileListResponse, *schemas.BifrostError)
- func (provider *RunwareProvider) FileRetrieve(_ *schemas.BifrostContext, _ []schemas.Key, ...) (*schemas.BifrostFileRetrieveResponse, *schemas.BifrostError)
- func (provider *RunwareProvider) FileUpload(_ *schemas.BifrostContext, _ schemas.Key, _ *schemas.BifrostFileUploadRequest) (*schemas.BifrostFileUploadResponse, *schemas.BifrostError)
- func (provider *RunwareProvider) GetProviderKey() schemas.ModelProvider
- func (provider *RunwareProvider) ImageEdit(ctx *schemas.BifrostContext, key schemas.Key, ...) (*schemas.BifrostImageGenerationResponse, *schemas.BifrostError)
- func (provider *RunwareProvider) ImageEditStream(ctx *schemas.BifrostContext, postHookRunner schemas.PostHookRunner, ...) (chan *schemas.BifrostStreamChunk, *schemas.BifrostError)
- func (provider *RunwareProvider) ImageGeneration(ctx *schemas.BifrostContext, key schemas.Key, ...) (*schemas.BifrostImageGenerationResponse, *schemas.BifrostError)
- func (provider *RunwareProvider) ImageGenerationStream(ctx *schemas.BifrostContext, postHookRunner schemas.PostHookRunner, ...) (chan *schemas.BifrostStreamChunk, *schemas.BifrostError)
- func (provider *RunwareProvider) ImageVariation(ctx *schemas.BifrostContext, key schemas.Key, ...) (*schemas.BifrostImageGenerationResponse, *schemas.BifrostError)
- func (provider *RunwareProvider) ListModels(ctx *schemas.BifrostContext, keys []schemas.Key, ...) (*schemas.BifrostListModelsResponse, *schemas.BifrostError)
- func (provider *RunwareProvider) OCR(ctx *schemas.BifrostContext, key schemas.Key, ...) (*schemas.BifrostOCRResponse, *schemas.BifrostError)
- func (provider *RunwareProvider) Passthrough(_ *schemas.BifrostContext, _ schemas.Key, _ *schemas.BifrostPassthroughRequest) (*schemas.BifrostPassthroughResponse, *schemas.BifrostError)
- func (provider *RunwareProvider) PassthroughStream(_ *schemas.BifrostContext, _ schemas.PostHookRunner, _ func(context.Context), ...) (chan *schemas.BifrostStreamChunk, *schemas.BifrostError)
- func (provider *RunwareProvider) Rerank(ctx *schemas.BifrostContext, key schemas.Key, ...) (*schemas.BifrostRerankResponse, *schemas.BifrostError)
- func (provider *RunwareProvider) Responses(ctx *schemas.BifrostContext, key schemas.Key, ...) (*schemas.BifrostResponsesResponse, *schemas.BifrostError)
- func (provider *RunwareProvider) ResponsesStream(ctx *schemas.BifrostContext, postHookRunner schemas.PostHookRunner, ...) (chan *schemas.BifrostStreamChunk, *schemas.BifrostError)
- func (provider *RunwareProvider) Speech(ctx *schemas.BifrostContext, key schemas.Key, ...) (*schemas.BifrostSpeechResponse, *schemas.BifrostError)
- func (provider *RunwareProvider) SpeechStream(ctx *schemas.BifrostContext, postHookRunner schemas.PostHookRunner, ...) (chan *schemas.BifrostStreamChunk, *schemas.BifrostError)
- func (provider *RunwareProvider) TextCompletion(ctx *schemas.BifrostContext, key schemas.Key, ...) (*schemas.BifrostTextCompletionResponse, *schemas.BifrostError)
- func (provider *RunwareProvider) TextCompletionStream(ctx *schemas.BifrostContext, postHookRunner schemas.PostHookRunner, ...) (chan *schemas.BifrostStreamChunk, *schemas.BifrostError)
- func (provider *RunwareProvider) Transcription(ctx *schemas.BifrostContext, key schemas.Key, ...) (*schemas.BifrostTranscriptionResponse, *schemas.BifrostError)
- func (provider *RunwareProvider) TranscriptionStream(ctx *schemas.BifrostContext, postHookRunner schemas.PostHookRunner, ...) (chan *schemas.BifrostStreamChunk, *schemas.BifrostError)
- func (provider *RunwareProvider) VideoDelete(_ *schemas.BifrostContext, _ schemas.Key, _ *schemas.BifrostVideoDeleteRequest) (*schemas.BifrostVideoDeleteResponse, *schemas.BifrostError)
- func (provider *RunwareProvider) VideoDownload(ctx *schemas.BifrostContext, key schemas.Key, ...) (*schemas.BifrostVideoDownloadResponse, *schemas.BifrostError)
- func (provider *RunwareProvider) VideoGeneration(ctx *schemas.BifrostContext, key schemas.Key, ...) (*schemas.BifrostVideoGenerationResponse, *schemas.BifrostError)
- func (provider *RunwareProvider) VideoList(_ *schemas.BifrostContext, _ schemas.Key, _ *schemas.BifrostVideoListRequest) (*schemas.BifrostVideoListResponse, *schemas.BifrostError)
- func (provider *RunwareProvider) VideoRemix(_ *schemas.BifrostContext, _ schemas.Key, _ *schemas.BifrostVideoRemixRequest) (*schemas.BifrostVideoGenerationResponse, *schemas.BifrostError)
- func (provider *RunwareProvider) VideoRetrieve(ctx *schemas.BifrostContext, key schemas.Key, ...) (*schemas.BifrostVideoGenerationResponse, *schemas.BifrostError)
- type RunwareResponse
- type RunwareResult
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ToBifrostImageGenerationResponse ¶
func ToBifrostImageGenerationResponse(resp *RunwareResponse) (*schemas.BifrostImageGenerationResponse, *schemas.BifrostError)
ToBifrostImageGenerationResponse converts a Runware response envelope to a Bifrost image response.
func ToBifrostVideoGenerationResponse ¶
func ToBifrostVideoGenerationResponse(result *RunwareResult) *schemas.BifrostVideoGenerationResponse
ToBifrostVideoGenerationResponse converts a Runware video task result to a Bifrost video response.
Types ¶
type RunwareError ¶
type RunwareError struct {
Code string `json:"code,omitempty"`
Message string `json:"message,omitempty"`
Parameter string `json:"parameter,omitempty"`
TaskType string `json:"taskType,omitempty"`
TaskUUID string `json:"taskUUID,omitempty"`
}
RunwareError describes a single task failure returned by the Runware API.
type RunwareFrameImage ¶
type RunwareFrameImage struct {
InputImage string `json:"inputImage"` // image UUID, URL, or base64/data-URI string
Frame *string `json:"frame,omitempty"` // "first" | "last"
}
RunwareFrameImage anchors an input image to a video frame for image-to-video generation.
type RunwareGetResponseRequest ¶
type RunwareGetResponseRequest struct {
TaskType string `json:"taskType"`
TaskUUID string `json:"taskUUID"`
}
RunwareGetResponseRequest polls an async task by its UUID.
type RunwareInferenceRequest ¶
type RunwareInferenceRequest struct {
// Common
TaskType string `json:"taskType"`
TaskUUID string `json:"taskUUID"`
Model string `json:"model"`
PositivePrompt *string `json:"positivePrompt,omitempty"`
NegativePrompt *string `json:"negativePrompt,omitempty"`
Width *int `json:"width,omitempty"`
Height *int `json:"height,omitempty"`
Seed *int `json:"seed,omitempty"`
NumberResults *int `json:"numberResults,omitempty"`
OutputType *string `json:"outputType,omitempty"` // "URL" | "base64Data" | "dataURI"
OutputFormat *string `json:"outputFormat,omitempty"` // image: "PNG"/"JPG"/"WEBP"; video: "MP4"/"WEBM"
// Image-only
Steps *int `json:"steps,omitempty"`
SeedImage *string `json:"seedImage,omitempty"` // image-to-image / inpainting / outpainting base image
MaskImage *string `json:"maskImage,omitempty"` // inpainting mask
// Video-only
DeliveryMethod *string `json:"deliveryMethod,omitempty"`
Duration *float64 `json:"duration,omitempty"`
FrameImages []RunwareFrameImage `json:"frameImages,omitempty"` // image-to-video
ReferenceImages []string `json:"referenceImages,omitempty"`
// ExtraParams carries provider-native fields with no Bifrost equivalent
// (CFGScale, scheduler, strength, maskMargin, outpaint, fps, lora, ...). Merged into
// the request body by the transport layer when passthrough is enabled.
ExtraParams map[string]interface{} `json:"-"`
}
RunwareInferenceRequest is a single Runware task. taskType selects the operation; each operation populates only the subset of fields it needs. Runware accepts an array of these objects per request; the provider wraps a single task in an array before sending.
func ToRunwareImageEditRequest ¶
func ToRunwareImageEditRequest(bifrostReq *schemas.BifrostImageEditRequest) (*RunwareInferenceRequest, error)
ToRunwareImageEditRequest converts a Bifrost image edit request to a Runware imageInference task. The first input image is the seed image; an optional mask enables inpainting. Outpainting, strength, maskMargin and other operation-specific fields flow through via extra params.
func ToRunwareImageGenerationRequest ¶
func ToRunwareImageGenerationRequest(bifrostReq *schemas.BifrostImageGenerationRequest) (*RunwareInferenceRequest, error)
ToRunwareImageGenerationRequest converts a Bifrost image generation request to a Runware imageInference task. A "seedImage" supplied via extra params (a Runware image UUID, a public URL, or a base64/data-URI string) turns the request into an image-to-image generation.
func ToRunwareVideoGenerationRequest ¶
func ToRunwareVideoGenerationRequest(bifrostReq *schemas.BifrostVideoGenerationRequest) (*RunwareInferenceRequest, error)
ToRunwareVideoGenerationRequest converts a Bifrost video generation request to a Runware videoInference task. An input reference image turns it into image-to-video generation.
func (*RunwareInferenceRequest) GetExtraParams ¶
func (r *RunwareInferenceRequest) GetExtraParams() map[string]interface{}
type RunwareProvider ¶
type RunwareProvider struct {
// contains filtered or unexported fields
}
RunwareProvider implements the Provider interface for Runware's API.
func NewRunwareProvider ¶
func NewRunwareProvider(config *schemas.ProviderConfig, logger schemas.Logger) (*RunwareProvider, error)
NewRunwareProvider creates a new Runware provider instance.
func (*RunwareProvider) BatchCancel ¶
func (provider *RunwareProvider) BatchCancel(_ *schemas.BifrostContext, _ []schemas.Key, _ *schemas.BifrostBatchCancelRequest) (*schemas.BifrostBatchCancelResponse, *schemas.BifrostError)
BatchCancel is not supported by Runware provider.
func (*RunwareProvider) BatchCreate ¶
func (provider *RunwareProvider) BatchCreate(_ *schemas.BifrostContext, _ schemas.Key, _ *schemas.BifrostBatchCreateRequest) (*schemas.BifrostBatchCreateResponse, *schemas.BifrostError)
BatchCreate is not supported by Runware provider.
func (*RunwareProvider) BatchDelete ¶
func (provider *RunwareProvider) BatchDelete(_ *schemas.BifrostContext, _ []schemas.Key, _ *schemas.BifrostBatchDeleteRequest) (*schemas.BifrostBatchDeleteResponse, *schemas.BifrostError)
BatchDelete is not supported by Runware provider.
func (*RunwareProvider) BatchList ¶
func (provider *RunwareProvider) BatchList(_ *schemas.BifrostContext, _ []schemas.Key, _ *schemas.BifrostBatchListRequest) (*schemas.BifrostBatchListResponse, *schemas.BifrostError)
BatchList is not supported by Runware provider.
func (*RunwareProvider) BatchResults ¶
func (provider *RunwareProvider) BatchResults(_ *schemas.BifrostContext, _ []schemas.Key, _ *schemas.BifrostBatchResultsRequest) (*schemas.BifrostBatchResultsResponse, *schemas.BifrostError)
BatchResults is not supported by Runware provider.
func (*RunwareProvider) BatchRetrieve ¶
func (provider *RunwareProvider) BatchRetrieve(_ *schemas.BifrostContext, _ []schemas.Key, _ *schemas.BifrostBatchRetrieveRequest) (*schemas.BifrostBatchRetrieveResponse, *schemas.BifrostError)
BatchRetrieve is not supported by Runware provider.
func (*RunwareProvider) CachedContentCreate ¶
func (provider *RunwareProvider) CachedContentCreate(ctx *schemas.BifrostContext, key schemas.Key, request *schemas.BifrostCachedContentCreateRequest) (*schemas.BifrostCachedContentCreateResponse, *schemas.BifrostError)
CachedContentCreate is unsupported on RunwareProvider. Only Gemini and Vertex AI support the named cache lifecycle.
func (*RunwareProvider) CachedContentDelete ¶
func (provider *RunwareProvider) CachedContentDelete(ctx *schemas.BifrostContext, keys []schemas.Key, request *schemas.BifrostCachedContentDeleteRequest) (*schemas.BifrostCachedContentDeleteResponse, *schemas.BifrostError)
CachedContentDelete is unsupported on RunwareProvider (see CachedContentCreate).
func (*RunwareProvider) CachedContentList ¶
func (provider *RunwareProvider) CachedContentList(ctx *schemas.BifrostContext, keys []schemas.Key, request *schemas.BifrostCachedContentListRequest) (*schemas.BifrostCachedContentListResponse, *schemas.BifrostError)
CachedContentList is unsupported on RunwareProvider (see CachedContentCreate).
func (*RunwareProvider) CachedContentRetrieve ¶
func (provider *RunwareProvider) CachedContentRetrieve(ctx *schemas.BifrostContext, keys []schemas.Key, request *schemas.BifrostCachedContentRetrieveRequest) (*schemas.BifrostCachedContentRetrieveResponse, *schemas.BifrostError)
CachedContentRetrieve is unsupported on RunwareProvider (see CachedContentCreate).
func (*RunwareProvider) CachedContentUpdate ¶
func (provider *RunwareProvider) CachedContentUpdate(ctx *schemas.BifrostContext, keys []schemas.Key, request *schemas.BifrostCachedContentUpdateRequest) (*schemas.BifrostCachedContentUpdateResponse, *schemas.BifrostError)
CachedContentUpdate is unsupported on RunwareProvider (see CachedContentCreate).
func (*RunwareProvider) ChatCompletion ¶
func (provider *RunwareProvider) ChatCompletion(ctx *schemas.BifrostContext, key schemas.Key, request *schemas.BifrostChatRequest) (*schemas.BifrostChatResponse, *schemas.BifrostError)
ChatCompletion is not supported by the Runware provider.
func (*RunwareProvider) ChatCompletionStream ¶
func (provider *RunwareProvider) ChatCompletionStream(ctx *schemas.BifrostContext, postHookRunner schemas.PostHookRunner, postHookSpanFinalizer func(context.Context), key schemas.Key, request *schemas.BifrostChatRequest) (chan *schemas.BifrostStreamChunk, *schemas.BifrostError)
ChatCompletionStream is not supported by the Runware provider.
func (*RunwareProvider) Compaction ¶
func (provider *RunwareProvider) Compaction(ctx *schemas.BifrostContext, key schemas.Key, request *schemas.BifrostCompactionRequest) (*schemas.BifrostCompactionResponse, *schemas.BifrostError)
Compaction is not supported by the Runware provider.
func (*RunwareProvider) ContainerCreate ¶
func (provider *RunwareProvider) ContainerCreate(_ *schemas.BifrostContext, _ schemas.Key, _ *schemas.BifrostContainerCreateRequest) (*schemas.BifrostContainerCreateResponse, *schemas.BifrostError)
ContainerCreate is not supported by the Runware provider.
func (*RunwareProvider) ContainerDelete ¶
func (provider *RunwareProvider) ContainerDelete(_ *schemas.BifrostContext, _ []schemas.Key, _ *schemas.BifrostContainerDeleteRequest) (*schemas.BifrostContainerDeleteResponse, *schemas.BifrostError)
ContainerDelete is not supported by the Runware provider.
func (*RunwareProvider) ContainerFileContent ¶
func (provider *RunwareProvider) ContainerFileContent(_ *schemas.BifrostContext, _ []schemas.Key, _ *schemas.BifrostContainerFileContentRequest) (*schemas.BifrostContainerFileContentResponse, *schemas.BifrostError)
ContainerFileContent is not supported by the Runware provider.
func (*RunwareProvider) ContainerFileCreate ¶
func (provider *RunwareProvider) ContainerFileCreate(_ *schemas.BifrostContext, _ schemas.Key, _ *schemas.BifrostContainerFileCreateRequest) (*schemas.BifrostContainerFileCreateResponse, *schemas.BifrostError)
ContainerFileCreate is not supported by the Runware provider.
func (*RunwareProvider) ContainerFileDelete ¶
func (provider *RunwareProvider) ContainerFileDelete(_ *schemas.BifrostContext, _ []schemas.Key, _ *schemas.BifrostContainerFileDeleteRequest) (*schemas.BifrostContainerFileDeleteResponse, *schemas.BifrostError)
ContainerFileDelete is not supported by the Runware provider.
func (*RunwareProvider) ContainerFileList ¶
func (provider *RunwareProvider) ContainerFileList(_ *schemas.BifrostContext, _ []schemas.Key, _ *schemas.BifrostContainerFileListRequest) (*schemas.BifrostContainerFileListResponse, *schemas.BifrostError)
ContainerFileList is not supported by the Runware provider.
func (*RunwareProvider) ContainerFileRetrieve ¶
func (provider *RunwareProvider) ContainerFileRetrieve(_ *schemas.BifrostContext, _ []schemas.Key, _ *schemas.BifrostContainerFileRetrieveRequest) (*schemas.BifrostContainerFileRetrieveResponse, *schemas.BifrostError)
ContainerFileRetrieve is not supported by the Runware provider.
func (*RunwareProvider) ContainerList ¶
func (provider *RunwareProvider) ContainerList(_ *schemas.BifrostContext, _ []schemas.Key, _ *schemas.BifrostContainerListRequest) (*schemas.BifrostContainerListResponse, *schemas.BifrostError)
ContainerList is not supported by the Runware provider.
func (*RunwareProvider) ContainerRetrieve ¶
func (provider *RunwareProvider) ContainerRetrieve(_ *schemas.BifrostContext, _ []schemas.Key, _ *schemas.BifrostContainerRetrieveRequest) (*schemas.BifrostContainerRetrieveResponse, *schemas.BifrostError)
ContainerRetrieve is not supported by the Runware provider.
func (*RunwareProvider) CountTokens ¶
func (provider *RunwareProvider) CountTokens(_ *schemas.BifrostContext, _ schemas.Key, _ *schemas.BifrostResponsesRequest) (*schemas.BifrostCountTokensResponse, *schemas.BifrostError)
CountTokens is not supported by the Runware provider.
func (*RunwareProvider) Embedding ¶
func (provider *RunwareProvider) Embedding(ctx *schemas.BifrostContext, key schemas.Key, request *schemas.BifrostEmbeddingRequest) (*schemas.BifrostEmbeddingResponse, *schemas.BifrostError)
Embedding is not supported by the Runware provider.
func (*RunwareProvider) FileContent ¶
func (provider *RunwareProvider) FileContent(_ *schemas.BifrostContext, _ []schemas.Key, _ *schemas.BifrostFileContentRequest) (*schemas.BifrostFileContentResponse, *schemas.BifrostError)
FileContent is not supported by Runware provider.
func (*RunwareProvider) FileDelete ¶
func (provider *RunwareProvider) FileDelete(_ *schemas.BifrostContext, _ []schemas.Key, _ *schemas.BifrostFileDeleteRequest) (*schemas.BifrostFileDeleteResponse, *schemas.BifrostError)
FileDelete is not supported by Runware provider.
func (*RunwareProvider) FileList ¶
func (provider *RunwareProvider) FileList(_ *schemas.BifrostContext, _ []schemas.Key, _ *schemas.BifrostFileListRequest) (*schemas.BifrostFileListResponse, *schemas.BifrostError)
FileList is not supported by Runware provider.
func (*RunwareProvider) FileRetrieve ¶
func (provider *RunwareProvider) FileRetrieve(_ *schemas.BifrostContext, _ []schemas.Key, _ *schemas.BifrostFileRetrieveRequest) (*schemas.BifrostFileRetrieveResponse, *schemas.BifrostError)
FileRetrieve is not supported by Runware provider.
func (*RunwareProvider) FileUpload ¶
func (provider *RunwareProvider) FileUpload(_ *schemas.BifrostContext, _ schemas.Key, _ *schemas.BifrostFileUploadRequest) (*schemas.BifrostFileUploadResponse, *schemas.BifrostError)
FileUpload is not supported by Runware provider.
func (*RunwareProvider) GetProviderKey ¶
func (provider *RunwareProvider) GetProviderKey() schemas.ModelProvider
GetProviderKey returns the provider identifier for Runware.
func (*RunwareProvider) ImageEdit ¶
func (provider *RunwareProvider) ImageEdit(ctx *schemas.BifrostContext, key schemas.Key, bifrostReq *schemas.BifrostImageEditRequest) (*schemas.BifrostImageGenerationResponse, *schemas.BifrostError)
ImageEdit performs an image edit (image-to-image, inpainting, or outpainting) request to Runware's API.
func (*RunwareProvider) ImageEditStream ¶
func (provider *RunwareProvider) ImageEditStream(ctx *schemas.BifrostContext, postHookRunner schemas.PostHookRunner, postHookSpanFinalizer func(context.Context), key schemas.Key, request *schemas.BifrostImageEditRequest) (chan *schemas.BifrostStreamChunk, *schemas.BifrostError)
ImageEditStream is not supported by the Runware provider.
func (*RunwareProvider) ImageGeneration ¶
func (provider *RunwareProvider) ImageGeneration(ctx *schemas.BifrostContext, key schemas.Key, bifrostReq *schemas.BifrostImageGenerationRequest) (*schemas.BifrostImageGenerationResponse, *schemas.BifrostError)
ImageGeneration performs a text-to-image (or image-to-image) request to Runware's API.
func (*RunwareProvider) ImageGenerationStream ¶
func (provider *RunwareProvider) ImageGenerationStream(ctx *schemas.BifrostContext, postHookRunner schemas.PostHookRunner, postHookSpanFinalizer func(context.Context), key schemas.Key, request *schemas.BifrostImageGenerationRequest) (chan *schemas.BifrostStreamChunk, *schemas.BifrostError)
ImageGenerationStream is not supported by the Runware provider.
func (*RunwareProvider) ImageVariation ¶
func (provider *RunwareProvider) ImageVariation(ctx *schemas.BifrostContext, key schemas.Key, request *schemas.BifrostImageVariationRequest) (*schemas.BifrostImageGenerationResponse, *schemas.BifrostError)
ImageVariation is not supported by the Runware provider.
func (*RunwareProvider) ListModels ¶
func (provider *RunwareProvider) ListModels(ctx *schemas.BifrostContext, keys []schemas.Key, request *schemas.BifrostListModelsRequest) (*schemas.BifrostListModelsResponse, *schemas.BifrostError)
ListModels is not supported by the Runware provider.
func (*RunwareProvider) OCR ¶
func (provider *RunwareProvider) OCR(ctx *schemas.BifrostContext, key schemas.Key, request *schemas.BifrostOCRRequest) (*schemas.BifrostOCRResponse, *schemas.BifrostError)
OCR is not supported by the Runware provider.
func (*RunwareProvider) Passthrough ¶
func (provider *RunwareProvider) Passthrough(_ *schemas.BifrostContext, _ schemas.Key, _ *schemas.BifrostPassthroughRequest) (*schemas.BifrostPassthroughResponse, *schemas.BifrostError)
Passthrough is not supported by the Runware provider.
func (*RunwareProvider) PassthroughStream ¶
func (provider *RunwareProvider) PassthroughStream(_ *schemas.BifrostContext, _ schemas.PostHookRunner, _ func(context.Context), _ schemas.Key, _ *schemas.BifrostPassthroughRequest) (chan *schemas.BifrostStreamChunk, *schemas.BifrostError)
PassthroughStream is not supported by the Runware provider.
func (*RunwareProvider) Rerank ¶
func (provider *RunwareProvider) Rerank(ctx *schemas.BifrostContext, key schemas.Key, request *schemas.BifrostRerankRequest) (*schemas.BifrostRerankResponse, *schemas.BifrostError)
Rerank is not supported by the Runware provider.
func (*RunwareProvider) Responses ¶
func (provider *RunwareProvider) Responses(ctx *schemas.BifrostContext, key schemas.Key, request *schemas.BifrostResponsesRequest) (*schemas.BifrostResponsesResponse, *schemas.BifrostError)
Responses is not supported by the Runware provider.
func (*RunwareProvider) ResponsesStream ¶
func (provider *RunwareProvider) ResponsesStream(ctx *schemas.BifrostContext, postHookRunner schemas.PostHookRunner, postHookSpanFinalizer func(context.Context), key schemas.Key, request *schemas.BifrostResponsesRequest) (chan *schemas.BifrostStreamChunk, *schemas.BifrostError)
ResponsesStream is not supported by the Runware provider.
func (*RunwareProvider) Speech ¶
func (provider *RunwareProvider) Speech(ctx *schemas.BifrostContext, key schemas.Key, request *schemas.BifrostSpeechRequest) (*schemas.BifrostSpeechResponse, *schemas.BifrostError)
Speech is not supported by the Runware provider.
func (*RunwareProvider) SpeechStream ¶
func (provider *RunwareProvider) SpeechStream(ctx *schemas.BifrostContext, postHookRunner schemas.PostHookRunner, postHookSpanFinalizer func(context.Context), key schemas.Key, request *schemas.BifrostSpeechRequest) (chan *schemas.BifrostStreamChunk, *schemas.BifrostError)
SpeechStream is not supported by the Runware provider.
func (*RunwareProvider) TextCompletion ¶
func (provider *RunwareProvider) TextCompletion(ctx *schemas.BifrostContext, key schemas.Key, request *schemas.BifrostTextCompletionRequest) (*schemas.BifrostTextCompletionResponse, *schemas.BifrostError)
TextCompletion is not supported by the Runware provider.
func (*RunwareProvider) TextCompletionStream ¶
func (provider *RunwareProvider) TextCompletionStream(ctx *schemas.BifrostContext, postHookRunner schemas.PostHookRunner, postHookSpanFinalizer func(context.Context), key schemas.Key, request *schemas.BifrostTextCompletionRequest) (chan *schemas.BifrostStreamChunk, *schemas.BifrostError)
TextCompletionStream is not supported by the Runware provider.
func (*RunwareProvider) Transcription ¶
func (provider *RunwareProvider) Transcription(ctx *schemas.BifrostContext, key schemas.Key, request *schemas.BifrostTranscriptionRequest) (*schemas.BifrostTranscriptionResponse, *schemas.BifrostError)
Transcription is not supported by the Runware provider.
func (*RunwareProvider) TranscriptionStream ¶
func (provider *RunwareProvider) TranscriptionStream(ctx *schemas.BifrostContext, postHookRunner schemas.PostHookRunner, postHookSpanFinalizer func(context.Context), key schemas.Key, request *schemas.BifrostTranscriptionRequest) (chan *schemas.BifrostStreamChunk, *schemas.BifrostError)
TranscriptionStream is not supported by the Runware provider.
func (*RunwareProvider) VideoDelete ¶
func (provider *RunwareProvider) VideoDelete(_ *schemas.BifrostContext, _ schemas.Key, _ *schemas.BifrostVideoDeleteRequest) (*schemas.BifrostVideoDeleteResponse, *schemas.BifrostError)
VideoDelete is not supported by the Runware provider.
func (*RunwareProvider) VideoDownload ¶
func (provider *RunwareProvider) VideoDownload(ctx *schemas.BifrostContext, key schemas.Key, request *schemas.BifrostVideoDownloadRequest) (*schemas.BifrostVideoDownloadResponse, *schemas.BifrostError)
VideoDownload retrieves the task, then downloads the finished video from its URL.
func (*RunwareProvider) VideoGeneration ¶
func (provider *RunwareProvider) VideoGeneration(ctx *schemas.BifrostContext, key schemas.Key, bifrostReq *schemas.BifrostVideoGenerationRequest) (*schemas.BifrostVideoGenerationResponse, *schemas.BifrostError)
VideoGeneration submits an async videoInference task and returns the queued job. The caller polls VideoRetrieve to fetch the finished video.
func (*RunwareProvider) VideoList ¶
func (provider *RunwareProvider) VideoList(_ *schemas.BifrostContext, _ schemas.Key, _ *schemas.BifrostVideoListRequest) (*schemas.BifrostVideoListResponse, *schemas.BifrostError)
VideoList is not supported by the Runware provider.
func (*RunwareProvider) VideoRemix ¶
func (provider *RunwareProvider) VideoRemix(_ *schemas.BifrostContext, _ schemas.Key, _ *schemas.BifrostVideoRemixRequest) (*schemas.BifrostVideoGenerationResponse, *schemas.BifrostError)
VideoRemix is not supported by the Runware provider.
func (*RunwareProvider) VideoRetrieve ¶
func (provider *RunwareProvider) VideoRetrieve(ctx *schemas.BifrostContext, key schemas.Key, bifrostReq *schemas.BifrostVideoRetrieveRequest) (*schemas.BifrostVideoGenerationResponse, *schemas.BifrostError)
VideoRetrieve polls a previously submitted videoInference task via a getResponse task.
type RunwareResponse ¶
type RunwareResponse struct {
Data []RunwareResult `json:"data,omitempty"`
Errors []RunwareError `json:"errors,omitempty"`
}
RunwareResponse is the universal Runware envelope: successful task outputs land in Data, per-task failures land in Errors (which can be present on a 200 response).
type RunwareResult ¶
type RunwareResult struct {
// Common
TaskType string `json:"taskType"`
TaskUUID string `json:"taskUUID"`
Status string `json:"status,omitempty"` // video: "processing" | "success" | "error"
Seed *int `json:"seed,omitempty"`
Cost float64 `json:"cost,omitempty"`
// Image
ImageUUID string `json:"imageUUID,omitempty"`
ImageURL string `json:"imageURL,omitempty"`
ImageBase64Data string `json:"imageBase64Data,omitempty"`
ImageDataURI string `json:"imageDataURI,omitempty"`
NSFWContent *bool `json:"NSFWContent,omitempty"`
// Video
VideoUUID string `json:"videoUUID,omitempty"`
VideoURL string `json:"videoURL,omitempty"`
}
RunwareResult is a single task result. Fields are populated per modality: image tasks fill the image* fields, video tasks fill the video* fields; the rest are shared.