From 5defd0bdb0e68ca26da575c88116313cd48e290d Mon Sep 17 00:00:00 2001 From: sigoden Date: Wed, 22 Jan 2025 22:01:00 +0800 Subject: refactor: change default sync_models_url (#1116) --- config.example.yaml | 6 +++--- src/config/mod.rs | 3 ++- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/config.example.yaml b/config.example.yaml index 2b3c0f2..fe41a61 100644 --- a/config.example.yaml +++ b/config.example.yaml @@ -79,11 +79,11 @@ right_prompt: '{color.purple}{?session {?consume_tokens {consume_tokens}({consume_percent}%)}{!consume_tokens {consume_tokens}}}{color.reset}' # ---- misc ---- -serve_addr: 127.0.0.1:8000 # Default serve listening address +serve_addr: 127.0.0.1:8000 # Server listening address user_agent: null # Set User-Agent HTTP header, use `auto` for aichat/ save_shell_history: true # Whether to save shell execution command to the history file -# Sync models changes from the specified URL, using a CDN link rather than a direct GitHub raw link due to the higher availability and reliability of the CDN. -sync_models_url: https://cdn.jsdelivr.net/gh/sigoden/aichat/models.yaml # Or https://raw.githubusercontent.com/sigoden/aichat/refs/heads/main/models.yaml +# URL to sync model changes from, e.g., https://cdn.jsdelivr.net/gh/sigoden/aichat@main/models.yaml +sync_models_url: https://raw.githubusercontent.com/sigoden/aichat/refs/heads/main/models.yaml # ---- clients ---- clients: diff --git a/src/config/mod.rs b/src/config/mod.rs index 341470f..98bcab3 100644 --- a/src/config/mod.rs +++ b/src/config/mod.rs @@ -64,7 +64,8 @@ const CLIENTS_FIELD: &str = "clients"; const SERVE_ADDR: &str = "127.0.0.1:8000"; -const SYNC_MODELS_URL: &str = "https://cdn.jsdelivr.net/gh/sigoden/aichat/models.yaml"; +const SYNC_MODELS_URL: &str = + "https://raw.githubusercontent.com/sigoden/aichat/refs/heads/main/models.yaml"; const SUMMARIZE_PROMPT: &str = "Summarize the discussion briefly in 200 words or less to use as a prompt for future context."; -- cgit v1.2.3