Skip to content

armgit / zed

Public Imported from GitHub
0

Code at the speed of thought – Zed is a high-performance, multiplayer code editor from the creators of Atom and Tree-sitter.

ep: Fix raw request shape (#46711)

Agus Zubiaga79c69dc622b5
diff --git a/crates/cloud_llm_client/src/predict_edits_v3.rs b/crates/cloud_llm_client/src/predict_edits_v3.rs
index af3052de18c..1c7e4d79577 100644
--- a/crates/cloud_llm_client/src/predict_edits_v3.rs
+++ b/crates/cloud_llm_client/src/predict_edits_v3.rs
@@ -219,7 +219,9 @@ impl Sub for Line {
pub struct RawCompletionRequest {
pub model: String,
pub prompt: String,
- pub max_tokens: u32,
+ #[serde(skip_serializing_if = "Option::is_none")]
+ pub max_tokens: Option<u32>,
+ #[serde(skip_serializing_if = "Option::is_none")]
pub temperature: Option<f32>,
pub stop: Vec<Cow<'static, str>>,
}
diff --git a/crates/edit_prediction/src/zeta2.rs b/crates/edit_prediction/src/zeta2.rs
index 270a4c6f589..168b31acf13 100644
--- a/crates/edit_prediction/src/zeta2.rs
+++ b/crates/edit_prediction/src/zeta2.rs
@@ -81,7 +81,7 @@ pub fn request_prediction_with_zeta2(
prompt,
temperature: None,
stop: vec![],
- max_tokens: 1024,
+ max_tokens: Some(2048),
};
log::trace!("Sending edit prediction request");