Skip to content

Commit 14f73f5

Browse files
authored
Merge pull request #2987 from quadratichq/qa
QA May 24th
2 parents de25f8f + b338792 commit 14f73f5

File tree

153 files changed

+3448
-2262
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

153 files changed

+3448
-2262
lines changed

.gitignore

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -86,3 +86,6 @@ docker/mssql-connection/data
8686
jmeter.log
8787

8888
~$*
89+
90+
# ai
91+
/finetuning

.vscode/settings.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -78,6 +78,7 @@
7878
"jetli",
7979
"jsonwebtoken",
8080
"jwks",
81+
"kaggle",
8182
"keepalive",
8283
"keyrings",
8384
"kratos",

Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ edition = "2024"
1414
description = "Infinite data grid with Python, JavaScript, and SQL built-in"
1515
repository = "https://github.com/quadratichq/quadratic"
1616
license-file = "LICENSE"
17-
version = "0.9.0"
17+
version = "0.10.0"
1818

1919
[profile.release]
2020
# Tell `rustc` to optimize for small code size.

VERSION

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
0.9.0
1+
0.10.0

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "quadratic",
3-
"version": "0.9.0",
3+
"version": "0.10.0",
44
"author": {
55
"name": "David Kircos",
66
"email": "david@quadratichq.com",

quadratic-api/package.json

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "quadratic-api",
3-
"version": "0.9.0",
3+
"version": "0.10.0",
44
"description": "",
55
"main": "index.js",
66
"scripts": {
@@ -31,10 +31,10 @@
3131
},
3232
"author": "David Kircos",
3333
"dependencies": {
34-
"@anthropic-ai/bedrock-sdk": "^0.21.2",
35-
"@anthropic-ai/sdk": "^0.50.4",
36-
"@anthropic-ai/vertex-sdk": "^0.11.2",
37-
"@aws-sdk/client-bedrock-runtime": "^3.810.0",
34+
"@anthropic-ai/bedrock-sdk": "^0.22.1",
35+
"@anthropic-ai/sdk": "^0.52.0",
36+
"@anthropic-ai/vertex-sdk": "^0.11.4",
37+
"@aws-sdk/client-bedrock-runtime": "^3.817.0",
3838
"@aws-sdk/client-s3": "^3.427.0",
3939
"@aws-sdk/client-secrets-manager": "^3.441.0",
4040
"@aws-sdk/s3-request-presigner": "^3.427.0",
@@ -58,7 +58,7 @@
5858
"multer": "^2.0.0",
5959
"multer-s3": "^3.0.1",
6060
"newrelic": "^11.17.0",
61-
"openai": "^4.98.0",
61+
"openai": "^4.103.0",
6262
"pg": "^8.11.3",
6363
"ssh-keygen": "^0.5.0",
6464
"stripe": "^14.16.0",
Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
-- AlterEnum
2+
ALTER TYPE "AIChatSource" ADD VALUE 'model_router';
Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
-- AlterTable
2+
ALTER TABLE "User" ADD COLUMN "onboarding_responses" JSONB;

quadratic-api/prisma/schema.prisma

Lines changed: 11 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -9,15 +9,16 @@ datasource db {
99
}
1010

1111
model User {
12-
id Int @id @default(autoincrement())
13-
auth0Id String @unique @map("auth0_id")
14-
eduStatus EduStatus? @map("edu_status")
15-
ownedFiles File[] @relation(name: "OwnerRelation")
16-
createdFiles File[] @relation(name: "CreatorRelation")
17-
QFeedback QFeedback[]
18-
UserTeamRole UserTeamRole[]
19-
UserFileRole UserFileRole[]
20-
AnalyticsAIChat AnalyticsAIChat[]
12+
id Int @id @default(autoincrement())
13+
auth0Id String @unique @map("auth0_id")
14+
eduStatus EduStatus? @map("edu_status")
15+
onboardingResponses Json? @map("onboarding_responses")
16+
ownedFiles File[] @relation(name: "OwnerRelation")
17+
createdFiles File[] @relation(name: "CreatorRelation")
18+
QFeedback QFeedback[]
19+
UserTeamRole UserTeamRole[]
20+
UserFileRole UserFileRole[]
21+
AnalyticsAIChat AnalyticsAIChat[]
2122
2223
@@index([auth0Id])
2324
}
@@ -269,6 +270,7 @@ enum AIChatSource {
269270
CodeEditorCompletions @map("code_editor_completions")
270271
GetUserPromptSuggestions @map("get_user_prompt_suggestions")
271272
PDFImport @map("pdf_import")
273+
ModelRouter @map("model_router")
272274
}
273275

274276
enum AIChatMessageType {

quadratic-api/src/ai/docs/ConnectionDocs.ts

Lines changed: 2 additions & 53 deletions
Original file line numberDiff line numberDiff line change
@@ -1,61 +1,10 @@
11
export const ConnectionDocs = `# Connections Docs
22
3-
Use SQL to create live connections from your spreadsheets to your databases and data warehouses.
4-
5-
Once established, you have a live connection that can be rerun, refreshed, read from, and written to your SQL database.
3+
Use SQL to create connections from spreadsheets to databases and data warehouses.
64
75
You can both read and write to your databases from Quadratic.
86
9-
Once your connection has been made you can use your connection directly in the sheet. Open the code cell selection menu with \`/\` and select your database from the list.
10-
11-
You can now query your database from your newly opened SQL code editor. You can view the schema or open the AI assistant in the bottom.
12-
13-
The results of your SQL queries are returned to the sheet, with column 0, row 0 anchored to the cell location.
14-
15-
Query all data from a database table into the spreadsheet
16-
17-
\`\`\`sql
18-
SELECT * FROM table_name
19-
\`\`\`
20-
21-
Query a limited selection (100 rows) from a single table into the spreadsheet
22-
23-
\`\`\`sql
24-
SELECT * FROM table_name
25-
LIMIT 100
26-
\`\`\`
27-
28-
Query specific columns from a single table into the spreadsheet
29-
30-
\`\`\`sql
31-
SELECT column_name1, column_name2
32-
FROM table_name
33-
LIMIT 100
34-
\`\`\`
35-
36-
Query all unique values in a column
37-
38-
\`\`\`sql
39-
SELECT DISTINCT column_name1
40-
FROM table_name
41-
LIMIT 100
42-
\`\`\`
43-
44-
Query data conditionally
45-
46-
\`\`\`sql
47-
-- selects 3 specific columns from a table where column1 equals some value
48-
SELECT column1, column2, column3
49-
FROM table_name
50-
WHERE column1 = 'some_value';
51-
\`\`\`
52-
53-
\`\`\`sql
54-
-- selects 3 specific columns from a table where column1 equals some value and column2 equals some value
55-
SELECT column1, column2, column3
56-
FROM table_name
57-
WHERE column1 = 'some_value' AND column2 = 5;
58-
\`\`\`
7+
IMPORTANT: DO NOT under any circumstances perform SQL queries that write to the database unless a user asks for it; only perform reads by default.
598
609
You cannot do two queries at once in SQL in Quadratic. For example, you can not create a table and then query that table in the same SQL query. You'll want to generate two distinct code blocks if two queries are involved. Or 3 code blocks if three queries are involved, etc.
6110

0 commit comments

Comments
 (0)