diff --git a/Cargo.lock b/Cargo.lock index 97653e124a49e3f41fdfe1d9a13682960a7777d1..0882435df934b8225238ad1ed19d409a723b4d0d 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -9256,9 +9256,9 @@ dependencies = [ [[package]] name = "tiktoken-rs" -version = "0.5.4" +version = "0.5.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f9ae5a3c24361e5f038af22517ba7f8e3af4099e30e78a3d56f86b48238fce9d" +checksum = "a4427b6b1c6b38215b92dd47a83a0ecc6735573d0a5a4c14acc0ac5b33b28adb" dependencies = [ "anyhow", "base64 0.21.4", diff --git a/Cargo.toml b/Cargo.toml index 905750f8352b02422fa0815b7a51e17d74b0daff..8434acdfd3d595d3cd3c3afd62cba52228e9e75f 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -154,6 +154,7 @@ tempdir = { version = "0.3.7" } thiserror = { version = "1.0.29" } time = { version = "0.3", features = ["serde", "serde-well-known"] } toml = { version = "0.5" } +tiktoken-rs = "0.5.7" tree-sitter = "0.20" unindent = { version = "0.1.7" } pretty_assertions = "1.3.0" diff --git a/assets/settings/default.json b/assets/settings/default.json index 42f3b3128666e84274a472fadd498652eadaa8a5..85f8a8fbc4b290c8fc7f913a44fbe0f767341510 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.toml index fb49a4b515540836a757610db5c268321f9f068b..6516e07cd43e402b78998330cd7f536f958f5bc5 100644 --- a/crates/Cargo.toml +++ b/crates/Cargo.toml @@ -29,7 +29,7 @@ postage.workspace = true rand.workspace = true log.workspace = true parse_duration = "2.1.1" -tiktoken-rs = "0.5.0" +tiktoken-rs.workspace = true matrixmultiply = "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.toml index fb49a4b515540836a757610db5c268321f9f068b..6516e07cd43e402b78998330cd7f536f958f5bc5 100644 --- a/crates/ai/Cargo.toml +++ b/crates/ai/Cargo.toml @@ -29,7 +29,7 @@ postage.workspace = true rand.workspace = true log.workspace = true parse_duration = "2.1.1" -tiktoken-rs = "0.5.0" +tiktoken-rs.workspace = true matrixmultiply = "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.toml index aee265db6eb4364c074b5182a7ec785f330a2aa5..25c9965915ddb573908ba1447b236c75c96d8edf 100644 --- a/crates/ai2/Cargo.toml +++ b/crates/ai2/Cargo.toml @@ -29,7 +29,7 @@ postage.workspace = true rand.workspace = true log.workspace = true parse_duration = "2.1.1" -tiktoken-rs = "0.5.0" +tiktoken-rs.workspace = true matrixmultiply = "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.toml index fc885f6b36248d67bd2ce288c6f5d2931d8540da..876e5e0b76ef287d6ed52b732dd082e67919f8a5 100644 --- a/crates/assistant/Cargo.toml +++ b/crates/assistant/Cargo.toml @@ -40,7 +40,7 @@ schemars.workspace = true serde.workspace = true serde_json.workspace = true smol.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.rs index 05d8d9ffebe485204108969bc4ec308eedbd2d1d..65dd588b3c171516588cc604940d7727583d089e 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.toml index 875440ef3fa866734c734830ff5c7b95550fd33c..03089279446d888b7e8554fccfadff8a460d0d97 100644 --- a/crates/semantic_index/Cargo.toml +++ b/crates/semantic_index/Cargo.toml @@ -33,7 +33,7 @@ lazy_static.workspace = true serde.workspace = true serde_json.workspace = true async-trait.workspace = true -tiktoken-rs = "0.5.0" +tiktoken-rs.workspace = true parking_lot.workspace = true rand.workspace = true schemars.workspace = true