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) ctx := cmd.Context() gp, _, err := cli.CreateGlazedProcessorFromCobra(cmd) cobra.CheckErr(err) for _, family := range models.Families { err = gp.AddRow(ctx, family) cobra.CheckErr(err) } err = gp.Close(ctx) cobra.CheckErr(err) }, }
View Source
var ModelsCmd = &cobra.Command{ Use: "ls-models", Short: "list models", Run: func(cmd *cobra.Command, args []string) { ctx := cmd.Context() models := SimpleModelsJSON{} err := json.Unmarshal([]byte(modelsJson), &models) cobra.CheckErr(err) gp, _, err := cli.CreateGlazedProcessorFromCobra(cmd) cobra.CheckErr(err) for _, completion := range models.Completion { err = gp.AddRow(ctx, completion) cobra.CheckErr(err) } err = gp.Close(ctx) cobra.CheckErr(err) }, }
View Source
var OpenaiCmd = &cobra.Command{
Use: "openai",
Short: "OpenAI commands",
}
Functions ¶
func LoadModelsHelpFiles ¶
Types ¶
type Completion ¶
type EngineInfoCommand ¶ added in v0.1.7
type EngineInfoCommand struct {
*cmds.CommandDescription
}
func NewEngineInfoCommand ¶ added in v0.1.7
func NewEngineInfoCommand() (*EngineInfoCommand, error)
func (*EngineInfoCommand) Run ¶ added in v0.1.7
func (c *EngineInfoCommand) Run( ctx context.Context, parsedLayers map[string]*layers.ParsedParameterLayer, ps map[string]interface{}, gp middlewares.Processor, ) error
type ListEnginesCommand ¶ added in v0.1.7
type ListEnginesCommand struct {
*cmds.CommandDescription
}
func NewListEngineCommand ¶ added in v0.1.7
func NewListEngineCommand() (*ListEnginesCommand, error)
func (*ListEnginesCommand) Run ¶ added in v0.1.7
func (c *ListEnginesCommand) Run( ctx context.Context, parsedLayers map[string]*layers.ParsedParameterLayer, ps map[string]interface{}, gp middlewares.Processor, ) error
type ModelsJSON ¶
type ModelsJSON struct { Completion []Completion `json:"completion"` Families []Family `json:"families"` }
Click to show internal directories.
Click to hide internal directories.