config: CLI --api-base and --api-key override config file
Co-Authored-By: Proof of Concept <poc@bcachefs.org>
This commit is contained in:
parent
2a64d8e11f
commit
912626c5f0
1 changed files with 4 additions and 0 deletions
|
|
@ -504,6 +504,10 @@ impl AppConfig {
|
||||||
.join(".consciousness/agent-sessions");
|
.join(".consciousness/agent-sessions");
|
||||||
std::fs::create_dir_all(&session_dir).ok();
|
std::fs::create_dir_all(&session_dir).ok();
|
||||||
|
|
||||||
|
// CLI --api-base and --api-key override everything
|
||||||
|
let api_base = cli.api_base.clone().unwrap_or(api_base);
|
||||||
|
let api_key = cli.api_key.clone().unwrap_or(api_key);
|
||||||
|
|
||||||
Ok(SessionConfig {
|
Ok(SessionConfig {
|
||||||
api_base, api_key, model, prompt_file,
|
api_base, api_key, model, prompt_file,
|
||||||
system_prompt, context_parts,
|
system_prompt, context_parts,
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue