util

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Aug 11, 2023 License: Apache-2.0 Imports: 16 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 GetPipedArgs

func GetPipedArgs() (string, error)

func GetSchemas

func GetSchemas(version replicate.ModelVersion) (input *openapi3.SchemaRef, output *openapi3.SchemaRef, 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, 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