util

package
v0.7.2 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 17, 2024 License: Apache-2.0 Imports: 20 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CoerceTypes

func CoerceTypes(inputs map[string]string, schema *openapi3.Schema) (map[string]interface{}, error)

CoerceTypes converts a map of string inputs to the types specified in the schema

func DownloadPrediction added in v0.2.0

func DownloadPrediction(ctx context.Context, prediction replicate.Prediction, dir string) error

func GetPipedArgs

func GetPipedArgs() (string, error)

func GetSchemas

func GetSchemas(version replicate.ModelVersion) (input *openapi3.Schema, output *openapi3.Schema, err error)

GetSchemas returns the input and output schemas for a model version

func IsTTY

func IsTTY() bool

IsTTY checks if is a terminal.

func ParseInputs

func ParseInputs(ctx context.Context, r8 *replicate.Client, args []string, stdin string, sep string) (map[string]string, error)

func SortedKeys

func SortedKeys(properties openapi3.Schemas) []string

SortedKeys returns the keys of the properties in the order they should be displayed

func StatusSymbol

func StatusSymbol(status replicate.Status) string

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL