diff options
| author | sigoden <sigoden@gmail.com> | 2023-11-01 22:15:55 +0800 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2023-11-01 22:15:55 +0800 |
| commit | f6da06dad9b2a76016209a7d58ad923c2c72f150 (patch) | |
| tree | 1c74f306c194d3289fe06ed31a39a00c27ad0ca9 /src/main.rs | |
| parent | da3c541b681b140feb52b4297167ca233535fa90 (diff) | |
| download | aichat-f6da06dad9b2a76016209a7d58ad923c2c72f150.tar.gz | |
refactor: improve code quanity (#194)
- extends ModelInfo for tokens calculating
- refactor config/session.rs, improve export, render, getter/setter
- modify main.rs, allow --model override session.model
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 b2985e2..6492b4a 100644 --- a/src/main.rs +++ b/src/main.rs @@ -37,7 +37,7 @@ fn main() -> Result<()> { } if cli.list_models { for model in all_models(&config.read()) { - println!("{}", model.stringify()); + println!("{}", model.full_name()); } exit(0); } @@ -55,15 +55,15 @@ fn main() -> Result<()> { if cli.dry_run { config.write().dry_run = true; } - if let Some(model) = &cli.model { - config.write().set_model(model)?; - } if let Some(name) = &cli.role { config.write().set_role(name)?; } if let Some(session) = &cli.session { config.write().start_session(session)?; } + if let Some(model) = &cli.model { + config.write().set_model(model)?; + } if cli.no_highlight { config.write().highlight = false; } |
