Skip to content

Commit

Permalink
Merge pull request #1925 from quadratichq/ayush/ai_model
Browse files Browse the repository at this point in the history
fix: change default ai model
  • Loading branch information
davidkircos authored Sep 26, 2024
2 parents c45265b + 00d1ba0 commit 9cec542
Show file tree
Hide file tree
Showing 15 changed files with 26 additions and 36 deletions.
2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ edition = "2021"
description = "Infinite data grid with Python, JavaScript, and SQL built-in"
repository = "https://github.com/quadratichq/quadratic"
license-file = "LICENSE"
version = "0.5.1"
version = "0.5.2"

[profile.release]
# Tell `rustc` to optimize for small code size.
Expand Down
2 changes: 1 addition & 1 deletion VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
0.5.1
0.5.2
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "quadratic",
"version": "0.5.1",
"version": "0.5.2",
"author": {
"name": "David Kircos",
"email": "[email protected]",
Expand Down
2 changes: 1 addition & 1 deletion quadratic-api/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "quadratic-api",
"version": "0.5.1",
"version": "0.5.2",
"description": "",
"main": "index.js",
"scripts": {
Expand Down
1 change: 1 addition & 0 deletions quadratic-api/src/routes/ai/anthropic.ts
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,7 @@ anthropic_router.post(
const chunks = await anthropic.messages.create({
model,
messages,
temperature: 0,
max_tokens: 8192,
stream: true,
});
Expand Down
2 changes: 1 addition & 1 deletion quadratic-client/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "quadratic-client",
"version": "0.5.1",
"version": "0.5.2",
"author": {
"name": "David Kircos",
"email": "[email protected]",
Expand Down
12 changes: 6 additions & 6 deletions quadratic-client/src/app/ui/menus/CodeEditor/AiAssistant.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -386,17 +386,17 @@ function SelectAIModelDropdownMenu({
</DropdownMenuTrigger>

<DropdownMenuContent align="start" alignOffset={-4}>
<DropdownMenuCheckboxItem checked={isAnthropic} onCheckedChange={() => setModel('claude-3-5-sonnet-20240620')}>
<DropdownMenuCheckboxItem checked={!isAnthropic} onCheckedChange={() => setModel('gpt-4o')}>
<div className="flex w-full items-center justify-between text-xs">
<span className="pr-4">Anthropic: claude-3.5-sonnet</span>
<Anthropic fontSize="inherit" />
<span className="pr-4">OpenAI: gpt-4o</span>
<OpenAI fontSize="inherit" />
</div>
</DropdownMenuCheckboxItem>

<DropdownMenuCheckboxItem checked={!isAnthropic} onCheckedChange={() => setModel('gpt-4o')}>
<DropdownMenuCheckboxItem checked={isAnthropic} onCheckedChange={() => setModel('claude-3-5-sonnet-20240620')}>
<div className="flex w-full items-center justify-between text-xs">
<span className="pr-4">OpenAI: gpt-4o</span>
<OpenAI fontSize="inherit" />
<span className="pr-4">Anthropic: claude-3.5-sonnet</span>
<Anthropic fontSize="inherit" />
</div>
</DropdownMenuCheckboxItem>
</DropdownMenuContent>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ const CodeEditorContext = createContext<Context>({
loading: [false, () => {}],
messages: [[], () => {}],
prompt: ['', () => {}],
model: ['claude-3-5-sonnet-20240620', () => {}],
model: ['gpt-4o', () => {}],
},
codeString: [undefined, () => {}],
consoleOutput: [undefined, () => {}],
Expand All @@ -57,7 +57,7 @@ export const CodeEditorProvider = () => {
loading: useState<Context['aiAssistant']['loading'][0]>(false),
messages: useState<Context['aiAssistant']['messages'][0]>([]),
controllerRef: useRef<Context['aiAssistant']['controllerRef']['current']>(null),
model: useState<Context['aiAssistant']['model'][0]>('claude-3-5-sonnet-20240620'),
model: useState<Context['aiAssistant']['model'][0]>('gpt-4o'),
};
const codeString = useState<Context['codeString'][0]>(undefined); // update code cell
const consoleOutput = useState<Context['consoleOutput'][0]>(undefined);
Expand Down
2 changes: 1 addition & 1 deletion quadratic-connection/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "quadratic-connection"
version = "0.5.1"
version = "0.5.2"
edition = "2021"
authors = ["David DiMaria <[email protected]>"]

Expand Down
23 changes: 6 additions & 17 deletions quadratic-core/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "quadratic-core"
version = "0.5.1"
version = "0.5.2"
authors = ["Andrew Farkas <[email protected]>"]
edition = "2021"
description = "Infinite data grid with Python, JavaScript, and SQL built-in"
Expand All @@ -27,13 +27,7 @@ path = "src/bin/generate_blank_current_file.rs"
[features]
default = ["console_error_panic_hook", "js"]
# "js" feature is disabled for testing (particularly WASI benchmarks)
js = [
"js-sys",
"serde-wasm-bindgen",
"ts-rs",
"wasm-bindgen",
"wasm-bindgen-futures",
]
js = ["js-sys", "serde-wasm-bindgen", "ts-rs", "wasm-bindgen", "wasm-bindgen-futures"]
show-operations = []
multiplayer = []
files = []
Expand All @@ -44,7 +38,7 @@ async-trait = "0.1.63"
futures = "0.3.25"
itertools = "0.10.5"
rand = "0.8.5"
getrandom = { version = "*", features = ["js"] }
getrandom = { version = "0.2.15", features = ["js"] }
regex = "1.7"
serde = { version = "1.0", features = ["derive"] }
serde_json = "1.0"
Expand All @@ -68,8 +62,8 @@ console_error_panic_hook = { version = "0.1.7", optional = true }
js-sys = { version = "0.3.60", optional = true }
serde-wasm-bindgen = { version = "0.6.0", optional = true }
ts-rs = { git = "https://github.com/quadratichq/ts-rs/", rev = "812c1a8", optional = true, features = [
"uuid-impl",
"smallvec-impl",
"uuid-impl",
"smallvec-impl",
] }
wasm-bindgen = { version = "0.2.87", optional = true }
wasm-bindgen-futures = { version = "0.4.33", optional = true }
Expand All @@ -80,12 +74,7 @@ csv = "1.2.2"
indexmap = { version = "2.0.2", features = ["serde"] }
thiserror = "1.0.52"
lazy_static = "1.4.0"
parquet = { version = "51.0.0", default-features = false, features = [
"arrow",
"arrow-array",
"flate2",
"snap",
] }
parquet = { version = "51.0.0", default-features = false, features = ["arrow", "arrow-array", "flate2", "snap"] }
bytes = "1.5.0"
arrow-array = "51.0.0"
arrow-schema = "51.0.0"
Expand Down
2 changes: 1 addition & 1 deletion quadratic-files/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "quadratic-files"
version = "0.5.1"
version = "0.5.2"
edition = "2021"
authors = ["David DiMaria <[email protected]>"]

Expand Down
2 changes: 1 addition & 1 deletion quadratic-multiplayer/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "quadratic-multiplayer"
version = "0.5.1"
version = "0.5.2"
edition = "2021"
authors = ["David DiMaria <[email protected]>"]

Expand Down
2 changes: 1 addition & 1 deletion quadratic-rust-client/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "quadratic-rust-client"
version = "0.5.1"
version = "0.5.2"
edition = "2021"
authors = ["David Figatner <[email protected]>"]

Expand Down
2 changes: 1 addition & 1 deletion quadratic-rust-shared/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "quadratic-rust-shared"
version = "0.5.1"
version = "0.5.2"
edition = "2021"

# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
Expand Down
2 changes: 1 addition & 1 deletion quadratic-shared/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "quadratic-shared",
"version": "0.5.1",
"version": "0.5.2",
"description": "Code shared between quadratic-api and quadratic-client (each app has to compile this code itself)",
"main": "index.js",
"scripts": {
Expand Down

0 comments on commit 9cec542

Please sign in to comment.