diff options
| author | sigoden <sigoden@gmail.com> | 2023-11-02 15:33:22 +0800 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2023-11-02 15:33:22 +0800 |
| commit | 652b51509d461d2121e94304d6f00e714ebd0f9f (patch) | |
| tree | fdaeffaa52ca04553e06fcad92fe95f73c6bd2a7 /src/main.rs | |
| parent | 7c6841782d36faacc2aa3616dc3ed1b9403fa26e (diff) | |
| download | aichat-652b51509d461d2121e94304d6f00e714ebd0f9f.tar.gz | |
refactor: improve repl completer (#199)
Diffstat (limited to 'src/main.rs')
| -rw-r--r-- | src/main.rs | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/main.rs b/src/main.rs index 2bc3d63..eae9a4a 100644 --- a/src/main.rs +++ b/src/main.rs @@ -12,7 +12,7 @@ use crate::config::{Config, GlobalConfig}; use anyhow::Result; use clap::Parser; -use client::{all_models, init_client}; +use client::{init_client, list_models}; use crossbeam::sync::WaitGroup; use is_terminal::IsTerminal; use parking_lot::RwLock; @@ -36,13 +36,13 @@ fn main() -> Result<()> { exit(0); } if cli.list_models { - for model in all_models(&config.read()) { - println!("{}", model.full_name()); + for model in list_models(&config.read()) { + println!("{}", model.id()); } exit(0); } if cli.list_sessions { - let sessions = config.read().list_sessions()?.join("\n"); + let sessions = config.read().list_sessions().join("\n"); println!("{sessions}"); exit(0); } |
