Skip to content

Commit d3a8812

Browse files
committed
amend! chore: readme note on environment variables
fix: use same env var names as upstream `AICHAT_...` - make aichat-ng use the same environment variables as upstream Signed-off-by: blob42 <contact@blob42.xyz>
1 parent ae6cdfc commit d3a8812

3 files changed

Lines changed: 2 additions & 10 deletions

File tree

README.md

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,6 @@ instead of the non-complete OpenAI compatibility version.
1212
- Disable the terminal spinner animation which is CPU intensive. see
1313
`repl_spinner` option in `config.example.yaml`.
1414

15-
Also read [about configuration changes in this fork](#configuration-changes-in-this-fork)
16-
1715
## Install
1816

1917
### Package Managers
@@ -181,12 +179,6 @@ AIChat supports custom dark and light themes, which highlight response text and
181179
- [Custom REPL Prompt](https://github.com/sigoden/aichat/wiki/Custom-REPL-Prompt)
182180
- [FAQ](https://github.com/sigoden/aichat/wiki/FAQ)
183181

184-
## Configuration Changes in This Fork
185-
186-
### Environment
187-
188-
In this fork, each configuration parameter has an equivalent environment variable that starts with `AICHAT_NG_` instead of `AICHAT_`. For example, if the upstream uses `AICHAT_TEMPERATURE`, this fork uses `AICHAT_NG_TEMPERATURE`.
189-
190182
## Why Fork
191183

192184
Every time I suggested a modification or submitted a PR to the original author,

src/repl/mod.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -572,7 +572,7 @@ pub async fn run_repl_command(
572572
.into();
573573

574574
if new_reply != last_reply {
575-
input.set_regenerate(Some(dbg!(new_reply)));
575+
input.set_regenerate(Some(new_reply));
576576
ask(config, abort_signal.clone(), input, true).await?;
577577
}
578578
}

src/utils/mod.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ pub fn now_timestamp() -> i64 {
5555
}
5656

5757
pub fn get_env_name(key: &str) -> String {
58-
format!("{}_{key}", env!("CARGO_CRATE_NAME"),).to_ascii_uppercase()
58+
format!("AICHAT_{key}").to_ascii_uppercase()
5959
}
6060

6161
pub fn normalize_env_name(value: &str) -> String {

0 commit comments

Comments
 (0)