Add --model flag completion
This commit is contained in:
@@ -42,6 +42,16 @@ func NewContext() (*Context, error) {
|
||||
return &Context{*config, s, hl}, nil
|
||||
}
|
||||
|
||||
func (c *Context) GetModels() (models []string) {
|
||||
for _, m := range *c.Config.Anthropic.Models {
|
||||
models = append(models, m)
|
||||
}
|
||||
for _, m := range *c.Config.OpenAI.Models {
|
||||
models = append(models, m)
|
||||
}
|
||||
return
|
||||
}
|
||||
|
||||
func (c *Context) GetCompletionProvider(model string) (provider.ChatCompletionClient, error) {
|
||||
for _, m := range *c.Config.Anthropic.Models {
|
||||
if m == model {
|
||||
|
||||
Reference in New Issue
Block a user