mirror of
https://github.com/ollama/ollama.git
synced 2026-04-17 15:53:27 +02:00
cmd/tui: improve model picker UX (#14209)
This commit is contained in:
@@ -160,6 +160,15 @@ func IntegrationModel(appName string) string {
|
||||
return ic.Models[0]
|
||||
}
|
||||
|
||||
// IntegrationModels returns all configured models for an integration, or nil.
|
||||
func IntegrationModels(appName string) []string {
|
||||
ic, err := loadIntegration(appName)
|
||||
if err != nil || len(ic.Models) == 0 {
|
||||
return nil
|
||||
}
|
||||
return ic.Models
|
||||
}
|
||||
|
||||
// LastModel returns the last model that was run, or empty string if none.
|
||||
func LastModel() string {
|
||||
cfg, err := load()
|
||||
|
||||
Reference in New Issue
Block a user