From 81cc3400d6b5a3f71e162e99e4d6dc6ca0b8a6f3 Mon Sep 17 00:00:00 2001 From: sigoden Date: Wed, 31 Jul 2024 10:54:14 +0800 Subject: refactor: update models.yaml and make minor improvement (#771) --- models.yaml | 12 ++++++++---- src/config/agent.rs | 5 ++++- 2 files changed, 12 insertions(+), 5 deletions(-) diff --git a/models.yaml b/models.yaml index ba7dc01..90fa297 100644 --- a/models.yaml +++ b/models.yaml @@ -835,14 +835,18 @@ max_input_tokens: 32768 input_price: 0.5 output_price: 0.5 - - name: accounts/fireworks/models/qwen2-72b-instruct - max_input_tokens: 32768 - input_price: 0.9 - output_price: 0.9 - name: accounts/fireworks/models/gemma2-9b-it max_input_tokens: 8192 input_price: 0.2 output_price: 0.2 + - name: accounts/fireworks/models/deepseek-coder-v2-instruct + max_input_tokens: 131072 + input_price: 2.7 + output_price: 2.7 + - name: accounts/fireworks/models/deepseek-coder-v2-lite-instruct + max_input_tokens: 163840 + input_price: 0.2 + output_price: 0.2 - name: accounts/fireworks/models/phi-3-vision-128k-instruct max_input_tokens: 131072 input_price: 0.2 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, #[serde(skip_serializing_if = "Option::is_none")] pub temperature: Option, -- cgit v1.2.3