Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var FamiliesCmd = &cobra.Command{ Use: "ls-families", Short: "list families", Run: func(cmd *cobra.Command, args []string) { models := SimpleModelsJSON{} err := json.Unmarshal([]byte(modelsJson), &models) cobra.CheckErr(err) gp, of, err := cli.CreateGlazedProcessorFromCobra(cmd) cobra.CheckErr(err) for _, family := range models.Families { err = gp.ProcessInputObject(family) cobra.CheckErr(err) } s, err := of.Output() if err != nil { _, _ = fmt.Fprintf(os.Stderr, "Error rendering output: %s\n", err) os.Exit(1) } fmt.Print(s) cobra.CheckErr(err) }, }
View Source
var ModelsCmd = &cobra.Command{ Use: "ls-models", Short: "list models", Run: func(cmd *cobra.Command, args []string) { models := SimpleModelsJSON{} err := json.Unmarshal([]byte(modelsJson), &models) cobra.CheckErr(err) gp, of, err := cli.CreateGlazedProcessorFromCobra(cmd) cobra.CheckErr(err) for _, completion := range models.Completion { err = gp.ProcessInputObject(completion) cobra.CheckErr(err) } s, err := of.Output() if err != nil { _, _ = fmt.Fprintf(os.Stderr, "Error rendering output: %s\n", err) os.Exit(1) } fmt.Print(s) cobra.CheckErr(err) }, }
View Source
var OpenaiCmd = &cobra.Command{
Use: "openai",
Short: "OpenAI commands",
}
Functions ¶
func LoadModelsHelpFiles ¶
Types ¶
type Completion ¶
type CompletionCommand ¶ added in v0.1.4
type CompletionCommand struct {
// contains filtered or unexported fields
}
func NewCompletionCommand ¶ added in v0.1.4
func NewCompletionCommand() (*CompletionCommand, error)
func (*CompletionCommand) Description ¶ added in v0.1.4
func (j *CompletionCommand) Description() *cmds.CommandDescription
type EmbeddingsCommand ¶ added in v0.1.7
type EmbeddingsCommand struct {
// contains filtered or unexported fields
}
func NewEmbeddingsCommand ¶ added in v0.1.7
func NewEmbeddingsCommand() (*EmbeddingsCommand, error)
func (*EmbeddingsCommand) Description ¶ added in v0.1.7
func (c *EmbeddingsCommand) Description() *cmds.CommandDescription
type EngineInfoCommand ¶ added in v0.1.7
type EngineInfoCommand struct {
// contains filtered or unexported fields
}
func NewEngineInfoCommand ¶ added in v0.1.7
func NewEngineInfoCommand() (*EngineInfoCommand, error)
func (*EngineInfoCommand) Description ¶ added in v0.1.7
func (c *EngineInfoCommand) Description() *cmds.CommandDescription
type ListEnginesCommand ¶ added in v0.1.7
type ListEnginesCommand struct {
// contains filtered or unexported fields
}
func NewListEngineCommand ¶ added in v0.1.7
func NewListEngineCommand() (*ListEnginesCommand, error)
func (*ListEnginesCommand) Description ¶ added in v0.1.7
func (c *ListEnginesCommand) Description() *cmds.CommandDescription
type ModelsJSON ¶
type ModelsJSON struct { Completion []Completion `json:"completion"` Families []Family `json:"families"` }
type SimpleModelsJSON ¶
Click to show internal directories.
Click to hide internal directories.