Work to simplify model config handling
Keep a direct reference to a provider.ModelConfig in TUI's AppModel, rather than the names of the provider and model
This commit is contained in:
@@ -19,7 +19,7 @@ import (
|
||||
// Prompt prompts the configured the configured model and streams the response
|
||||
// to stdout. Returns all model reply messages.
|
||||
func Prompt(ctx *lmcli.Context, messages []conversation.Message, callback func(conversation.Message)) (*api.Message, error) {
|
||||
modelConfig, err := ctx.GetModelProvider(*ctx.Config.Defaults.Model, "")
|
||||
modelConfig, err := ctx.LookupModelProvider(*ctx.Config.Defaults.Model, "")
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
@@ -203,7 +203,7 @@ Example response:
|
||||
},
|
||||
}
|
||||
|
||||
modelConfig, err := ctx.GetModelProvider(
|
||||
modelConfig, err := ctx.LookupModelProvider(
|
||||
*ctx.Config.Conversations.TitleGenerationModel, "",
|
||||
)
|
||||
if err != nil {
|
||||
|
||||
Reference in New Issue
Block a user