summaryrefslogtreecommitdiffstats
path: root/src/config
diff options
context:
space:
mode:
authorsigoden <sigoden@gmail.com>2024-07-31 10:54:14 +0800
committerGitHub <noreply@github.com>2024-07-31 10:54:14 +0800
commit81cc3400d6b5a3f71e162e99e4d6dc6ca0b8a6f3 (patch)
tree12f54766f6bd1fe2e5f89e2a31c802fc78e2cab5 /src/config
parent227cd5891f7b997a0936b3302aa636935d9d6ace (diff)
downloadaichat-81cc3400d6b5a3f71e162e99e4d6dc6ca0b8a6f3.tar.gz
refactor: update models.yaml and make minor improvement (#771)
Diffstat (limited to 'src/config')
-rw-r--r--src/config/agent.rs5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/config/agent.rs b/src/config/agent.rs
index b20e108..25e128c 100644
--- a/src/config/agent.rs
+++ b/src/config/agent.rs
@@ -208,7 +208,10 @@ impl RoleLike for Agent {
#[derive(Debug, Clone, Default, Deserialize, Serialize)]
pub struct AgentConfig {
- #[serde(rename(serialize = "model", deserialize = "model"))]
+ #[serde(
+ rename(serialize = "model", deserialize = "model"),
+ skip_serializing_if = "Option::is_none"
+ )]
pub model_id: Option<String>,
#[serde(skip_serializing_if = "Option::is_none")]
pub temperature: Option<f64>,