Code at the speed of thought – Zed is a high-performance, multiplayer code editor from the creators of Atom and Tree-sitter.
Add gpt-4-1106-preview model
Joseph T. Lyons516a8790b9e7
diff --git a/Cargo.lock b/Cargo.lockindex 97653e124a4..d61fe45cf8b 100644--- a/Cargo.lock+++ b/Cargo.lock@@ -9256,9 +9256,8 @@ dependencies = [[[package]]name = "tiktoken-rs"-version = "0.5.4"-source = "registry+https://github.com/rust-lang/crates.io-index"-checksum = "f9ae5a3c24361e5f038af22517ba7f8e3af4099e30e78a3d56f86b48238fce9d"+version = "0.5.6"+source = "git+https://github.com/JosephTLyons/tiktoken-rs/?rev=edb3ea9eda1b906205b346599c43c5c0e8da1392#edb3ea9eda1b906205b346599c43c5c0e8da1392"dependencies = ["anyhow","base64 0.21.4",diff --git a/Cargo.toml b/Cargo.tomlindex 905750f8352..2e43fa45d06 100644--- a/Cargo.toml+++ b/Cargo.toml@@ -160,6 +160,9 @@ pretty_assertions = "1.3.0"git2 = { version = "0.15", default-features = false}uuid = { version = "1.1.2", features = ["v4"] }+# Point back to original crate when this is merged:+# https://github.com/zurawiki/tiktoken-rs/pull/49+tiktoken-rs = { git = "https://github.com/JosephTLyons/tiktoken-rs/", rev="edb3ea9eda1b906205b346599c43c5c0e8da1392" }tree-sitter-bash = { git = "https://github.com/tree-sitter/tree-sitter-bash", rev = "7331995b19b8f8aba2d5e26deb51d2195c18bc94" }tree-sitter-c = "0.20.1"tree-sitter-cpp = { git = "https://github.com/tree-sitter/tree-sitter-cpp", rev="f44509141e7e483323d2ec178f2d2e6c0fc041c1" }diff --git a/assets/settings/default.json b/assets/settings/default.jsonindex 42f3b312866..85f8a8fbc4b 100644--- a/assets/settings/default.json+++ b/assets/settings/default.json@@ -174,7 +174,8 @@//// 1. "gpt-3.5-turbo-0613""// 2. "gpt-4-0613""- "default_open_ai_model": "gpt-4-0613"+ // 3. "gpt-4-1106-preview"+ "default_open_ai_model": "gpt-4-1106-preview"},// Whether the screen sharing icon is shown in the os status bar."show_call_status_icon": true,@@ -270,9 +271,7 @@"copilot": {// The set of glob patterns for which copilot should be disabled// in any matching file.- "disabled_globs": [- ".env"- ]+ "disabled_globs": [".env"]},// Settings specific to journaling"journal": {@@ -381,12 +380,7 @@// Default directories to search for virtual environments, relative// to the current working directory. We recommend overriding this// in your project's settings, rather than globally.- "directories": [- ".env",- "env",- ".venv",- "venv"- ],+ "directories": [".env", "env", ".venv", "venv"],// Can also be 'csh', 'fish', and `nushell`"activate_script": "default"}diff --git a/crates/Cargo.toml b/crates/Cargo.tomlindex fb49a4b5155..6516e07cd43 100644--- a/crates/Cargo.toml+++ b/crates/Cargo.toml@@ -29,7 +29,7 @@ postage.workspace = truerand.workspace = truelog.workspace = trueparse_duration = "2.1.1"-tiktoken-rs = "0.5.0"+tiktoken-rs.workspace = truematrixmultiply = "0.3.7"rusqlite = { version = "0.29.0", features = ["blob", "array", "modern_sqlite"] }bincode = "1.3.3"diff --git a/crates/ai/Cargo.toml b/crates/ai/Cargo.tomlindex fb49a4b5155..6516e07cd43 100644--- a/crates/ai/Cargo.toml+++ b/crates/ai/Cargo.toml@@ -29,7 +29,7 @@ postage.workspace = truerand.workspace = truelog.workspace = trueparse_duration = "2.1.1"-tiktoken-rs = "0.5.0"+tiktoken-rs.workspace = truematrixmultiply = "0.3.7"rusqlite = { version = "0.29.0", features = ["blob", "array", "modern_sqlite"] }bincode = "1.3.3"diff --git a/crates/ai2/Cargo.toml b/crates/ai2/Cargo.tomlindex aee265db6eb..25c9965915d 100644--- a/crates/ai2/Cargo.toml+++ b/crates/ai2/Cargo.toml@@ -29,7 +29,7 @@ postage.workspace = truerand.workspace = truelog.workspace = trueparse_duration = "2.1.1"-tiktoken-rs = "0.5.0"+tiktoken-rs.workspace = truematrixmultiply = "0.3.7"rusqlite = { version = "0.29.0", features = ["blob", "array", "modern_sqlite"] }bincode = "1.3.3"diff --git a/crates/assistant/Cargo.toml b/crates/assistant/Cargo.tomlindex fc885f6b362..876e5e0b76e 100644--- a/crates/assistant/Cargo.toml+++ b/crates/assistant/Cargo.toml@@ -40,7 +40,7 @@ schemars.workspace = trueserde.workspace = trueserde_json.workspace = truesmol.workspace = true-tiktoken-rs = "0.5"+tiktoken-rs.workspace = true[dev-dependencies]editor = { path = "../editor", features = ["test-support"] }diff --git a/crates/assistant/src/assistant_settings.rs b/crates/assistant/src/assistant_settings.rsindex 05d8d9ffebe..65dd588b3c1 100644--- a/crates/assistant/src/assistant_settings.rs+++ b/crates/assistant/src/assistant_settings.rs@@ -9,6 +9,8 @@ pub enum OpenAIModel {ThreePointFiveTurbo,#[serde(rename = "gpt-4-0613")]Four,+ #[serde(rename = "gpt-4-1106-preview")]+ FourTurbo,}impl OpenAIModel {@@ -16,6 +18,7 @@ impl OpenAIModel {match self {OpenAIModel::ThreePointFiveTurbo => "gpt-3.5-turbo-0613",OpenAIModel::Four => "gpt-4-0613",+ OpenAIModel::FourTurbo => "gpt-4-1106-preview",}}@@ -23,13 +26,15 @@ impl OpenAIModel {match self {OpenAIModel::ThreePointFiveTurbo => "gpt-3.5-turbo",OpenAIModel::Four => "gpt-4",+ OpenAIModel::FourTurbo => "gpt-4-turbo",}}pub fn cycle(&self) -> Self {match self {OpenAIModel::ThreePointFiveTurbo => OpenAIModel::Four,- OpenAIModel::Four => OpenAIModel::ThreePointFiveTurbo,+ OpenAIModel::Four => OpenAIModel::FourTurbo,+ OpenAIModel::FourTurbo => OpenAIModel::ThreePointFiveTurbo,}}}diff --git a/crates/semantic_index/Cargo.toml b/crates/semantic_index/Cargo.tomlindex 875440ef3fa..03089279446 100644--- a/crates/semantic_index/Cargo.toml+++ b/crates/semantic_index/Cargo.toml@@ -33,7 +33,7 @@ lazy_static.workspace = trueserde.workspace = trueserde_json.workspace = trueasync-trait.workspace = true-tiktoken-rs = "0.5.0"+tiktoken-rs.workspace = trueparking_lot.workspace = truerand.workspace = trueschemars.workspace = true