diff --git a/global.json b/global.json index 67c8b3bd..f61fa353 100644 --- a/global.json +++ b/global.json @@ -1,5 +1,5 @@ { "sdk": { - "version": "8.0.409" + "version": "8.0.116" } } diff --git a/shell/agents/AIShell.Ollama.Agent/Command.cs b/shell/agents/AIShell.Ollama.Agent/Command.cs index dbc66422..d0b00a66 100644 --- a/shell/agents/AIShell.Ollama.Agent/Command.cs +++ b/shell/agents/AIShell.Ollama.Agent/Command.cs @@ -18,7 +18,7 @@ public PresetCommand(OllamaAgent agent) var usePreset = new Argument( name: "Preset", getDefaultValue: () => null, - description: "Name of a preset.").AddCompletions(PresetNameCompleter); + description: "Name of a preset."); use.AddArgument(usePreset); use.SetHandler(UsePresetAction, usePreset); @@ -26,7 +26,7 @@ public PresetCommand(OllamaAgent agent) var listPreset = new Argument( name: "Preset", getDefaultValue: () => null, - description: "Name of a preset.").AddCompletions(PresetNameCompleter); + description: "Name of a preset."); list.AddArgument(listPreset); list.SetHandler(ListPresetAction, listPreset); @@ -199,7 +199,7 @@ public ModelCommand(OllamaAgent agent) var useModel = new Argument( name: "Model", getDefaultValue: () => null, - description: "Name of a model.").AddCompletions(ModelNameCompleter); + description: "Name of a model."); use.AddArgument(useModel); use.SetHandler(UseModelAction, useModel); @@ -207,7 +207,7 @@ public ModelCommand(OllamaAgent agent) var listModel = new Argument( name: "Model", getDefaultValue: () => null, - description: "Name of a model.").AddCompletions(ModelNameCompleter); + description: "Name of a model."); list.AddArgument(listModel); list.SetHandler(ListModelAction, listModel); @@ -291,19 +291,4 @@ private async Task UseModelAction(string name) } } - private IEnumerable ModelNameCompleter(CompletionContext context) - { - try - { - // Model retrieval may throw. - var results = _agnet.Settings?.GetAllModels().Result; - if (results is not null) - { - return results; - } - } - catch (Exception) { } - - return []; - } }