Code at the speed of thought – Zed is a high-performance, multiplayer code editor from the creators of Atom and Tree-sitter.
Pass temperature to Anthropic (#17509)
maan2003d6663fcb29fc
diff --git a/crates/assistant/src/inline_assistant.rs b/crates/assistant/src/inline_assistant.rsindex 051db0f2476..246a408477b 100644--- a/crates/assistant/src/inline_assistant.rs+++ b/crates/assistant/src/inline_assistant.rs@@ -2373,19 +2373,6 @@ impl Codegen {None};- // Higher Temperature increases the randomness of model outputs.- // If Markdown or No Language is Known, increase the randomness for more creative output- // If Code, decrease temperature to get more deterministic outputs- let temperature = if let Some(language) = language_name.clone() {- if language == "Markdown".into() {- 1.0- } else {- 0.5- }- } else {- 1.0- };-let language_name = language_name.as_ref();let start = buffer.point_to_buffer_offset(edit_range.start);let end = buffer.point_to_buffer_offset(edit_range.end);@@ -2421,7 +2408,7 @@ impl Codegen {messages,tools: Vec::new(),stop: vec!["|END|>".to_string()],- temperature,+ temperature: 1.,})}diff --git a/crates/language_model/src/request.rs b/crates/language_model/src/request.rsindex 7549785b3bd..4162e9df870 100644--- a/crates/language_model/src/request.rs+++ b/crates/language_model/src/request.rs@@ -399,7 +399,7 @@ impl LanguageModelRequest {tool_choice: None,metadata: None,stop_sequences: Vec::new(),- temperature: None,+ temperature: Some(self.temperature),top_k: None,top_p: None,}