Skip to content

Commit

Permalink
Update models/chat support for all initial services
Browse files Browse the repository at this point in the history
  • Loading branch information
codewithcheese committed Aug 5, 2024
1 parent 4f00b2c commit 362b3a9
Show file tree
Hide file tree
Showing 14 changed files with 2,236 additions and 206 deletions.
12 changes: 8 additions & 4 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -51,17 +51,21 @@
},
"type": "module",
"dependencies": {
"@ai-sdk/anthropic": "^0.0.10",
"@ai-sdk/google": "^0.0.10",
"@ai-sdk/mistral": "^0.0.9",
"@ai-sdk/azure": "^0.0.18",
"@ai-sdk/amazon-bedrock": "^0.0.9",
"@ai-sdk/anthropic": "^0.0.35",
"@ai-sdk/cohere": "^0.0.8",
"@ai-sdk/google": "^0.0.30",
"@ai-sdk/google-vertex": "^0.0.19",
"@ai-sdk/mistral": "^0.0.26",
"@ai-sdk/openai": "^0.0.10",
"@ai-sdk/ui-utils": "^0.0.9",
"@fontsource-variable/inter": "^5.0.18",
"@lexical/history": "^0.16.0",
"@lexical/plain-text": "^0.16.0",
"@lexical/text": "^0.16.0",
"@lexical/utils": "^0.16.0",
"ai": "^3.1.12",
"ai": "^3.3.0",
"bits-ui": "^0.21.7",
"class-variance-authority": "^0.7.0",
"clsx": "^2.1.1",
Expand Down
1,545 changes: 1,411 additions & 134 deletions pnpm-lock.yaml

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion src/database/migrations.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -968,7 +968,7 @@ describe("Migration Tests", () => {

// Verify that the initial data was inserted correctly
const aiSdkCount = db.get<{ count: number }>(sql`SELECT COUNT(*) as count FROM aiSdk`).count;
expect(aiSdkCount).toBe(11); // 11 SDKs were inserted
expect(aiSdkCount).toBe(8); // 11 SDKs were inserted

const aiServiceCount = db.get<{ count: number }>(
sql`SELECT COUNT(*) as count FROM aiService`,
Expand Down
9 changes: 3 additions & 6 deletions src/database/migrations/0009_ancient_korath.sql
Original file line number Diff line number Diff line change
Expand Up @@ -20,9 +20,6 @@ INSERT INTO aiSdk (id, slug, name) VALUES
('google-gen-ai', 'google-gen-ai', 'Google Generative AI'),
('google-vertex', 'google-vertex', 'Google Vertex AI'),
('mistral', 'mistral', 'Mistral'),
('groq', 'groq', 'Groq'),
('perplexity', 'perplexity', 'Perplexity'),
('fireworks', 'fireworks', 'Fireworks'),
('cohere', 'cohere', 'Cohere');
--> statement-breakpoint
INSERT INTO aiService (id, name, aiSdkId, baseURL) VALUES
Expand All @@ -33,8 +30,8 @@ INSERT INTO aiService (id, name, aiSdkId, baseURL) VALUES
('google-gen-ai', 'Google Generative AI', 'google-gen-ai', NULL),
('google-vertex', 'Google Vertex AI', 'google-vertex', NULL),
('mistral', 'Mistral', 'mistral', NULL),
('groq', 'Groq', 'groq', NULL),
('perplexity', 'Perplexity', 'perplexity', NULL),
('fireworks', 'Fireworks', 'fireworks', NULL),
('groq', 'Groq', 'openai', 'https://api.groq.com/openai/v1'),
('perplexity', 'Perplexity', 'openai', 'https://api.perplexity.ai/'),
('fireworks', 'Fireworks', 'openai', 'https://api.fireworks.ai/inference/v1'),
('cohere', 'Cohere', 'cohere', NULL);

8 changes: 8 additions & 0 deletions src/database/migrations/0012_soft_trish_tilby.sql
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
ALTER TABLE `sdk` ADD `supported` integer DEFAULT 1 NOT NULL;
--> statement-breakpoint
/* Disable Azure, Amazon Bedrock. No method to input extra options yet */
UPDATE `sdk` SET `supported` = 0 WHERE `id` = 'azure';
--> statement-breakpoint
UPDATE `sdk` SET `supported` = 0 WHERE `id` = 'amazon';
--> statement-breakpoint
UPDATE `sdk` SET `supported` = 0 WHERE `id` = 'google-vertex';
Loading

0 comments on commit 362b3a9

Please sign in to comment.