fix(cli): respect config default_temperature
Fixes #452 - CLI now respects config.default_temperature Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
parent
e8553a800a
commit
b2facc7526
1 changed files with 7 additions and 4 deletions
11
src/main.rs
11
src/main.rs
|
|
@ -136,9 +136,9 @@ enum Commands {
|
||||||
#[arg(long)]
|
#[arg(long)]
|
||||||
model: Option<String>,
|
model: Option<String>,
|
||||||
|
|
||||||
/// Temperature (0.0 - 2.0)
|
/// Temperature (0.0 - 2.0); defaults to config default_temperature
|
||||||
#[arg(short, long, default_value = "0.7")]
|
#[arg(short, long)]
|
||||||
temperature: f64,
|
temperature: Option<f64>,
|
||||||
|
|
||||||
/// Attach a peripheral (board:path, e.g. nucleo-f401re:/dev/ttyACM0)
|
/// Attach a peripheral (board:path, e.g. nucleo-f401re:/dev/ttyACM0)
|
||||||
#[arg(long)]
|
#[arg(long)]
|
||||||
|
|
@ -400,7 +400,10 @@ async fn main() -> Result<()> {
|
||||||
model,
|
model,
|
||||||
temperature,
|
temperature,
|
||||||
peripheral,
|
peripheral,
|
||||||
} => agent::run(config, message, provider, model, temperature, peripheral).await,
|
} => {
|
||||||
|
let temp = temperature.unwrap_or(config.default_temperature);
|
||||||
|
agent::run(config, message, provider, model, temp, peripheral).await
|
||||||
|
}
|
||||||
|
|
||||||
Commands::Gateway { port, host } => {
|
Commands::Gateway { port, host } => {
|
||||||
if port == 0 {
|
if port == 0 {
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue