diff options
| author | sigoden <sigoden@gmail.com> | 2023-11-01 10:28:54 +0800 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2023-11-01 10:28:54 +0800 |
| commit | 7f2210dbcab017ee30e8f95771e68494b4860c59 (patch) | |
| tree | 7a0c7bdc8f6930e262bf8cfdc8ffbd57aa843e40 /src/main.rs | |
| parent | 64202758ec8693dd18951c554728bb5c6b7e5eeb (diff) | |
| download | aichat-7f2210dbcab017ee30e8f95771e68494b4860c59.tar.gz | |
refactor: clients/* and config.rs (#193)
- add register_clients macro to make it easier to add a new client
- no create_client_config, just add const PROMPTS
- move ModelInfo from clients/ to config/
- model's max_tokens are optional
- improve code quanity on config/mod.rs
- add/use macro config_get_fn
Diffstat (limited to 'src/main.rs')
| -rw-r--r-- | src/main.rs | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/main.rs b/src/main.rs index 5cd82e4..b2985e2 100644 --- a/src/main.rs +++ b/src/main.rs @@ -12,7 +12,7 @@ use crate::config::{Config, SharedConfig}; use anyhow::Result; use clap::Parser; -use client::{init_client, list_models}; +use client::{all_models, init_client}; use crossbeam::sync::WaitGroup; use is_terminal::IsTerminal; use parking_lot::RwLock; @@ -36,7 +36,7 @@ fn main() -> Result<()> { exit(0); } if cli.list_models { - for model in list_models(&config.read()) { + for model in all_models(&config.read()) { println!("{}", model.stringify()); } exit(0); |
