Skip to content

Commit

Permalink
🐛 fix: fix google gemini pro 1.5 lobehub#1801
Browse files Browse the repository at this point in the history
  • Loading branch information
bentwnghk committed Mar 29, 2024
1 parent f8bb555 commit 5517eef
Show file tree
Hide file tree
Showing 4 changed files with 200 additions and 372 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@
"@azure/openai": "^1.0.0-beta.11",
"@bentwnghk/ui": "latest",
"@cfworker/json-schema": "^1",
"@google/generative-ai": "^0.2.0",
"@google/generative-ai": "^0.3.1",
"@icons-pack/react-simple-icons": "^9",
"@lobehub/chat-plugin-sdk": "latest",
"@lobehub/chat-plugins-gateway": "latest",
Expand Down
17 changes: 2 additions & 15 deletions src/app/api/chat/google/route.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,19 +13,6 @@ import { POST as UniverseRoute } from '../[provider]/route';
// so if you want to use with proxy, you need comment the code below
export const runtime = 'edge';

export const preferredRegion = [
'bom1',
'cle1',
'cpt1',
'gru1',
'hnd1',
'iad1',
'icn1',
'kix1',
'pdx1',
'sfo1',
'sin1',
'syd1',
];
export const preferredRegion = ['sfo1'];

export const POST = async (req: Request) => UniverseRoute(req, { params: { provider: 'google' } });
export const POST = async (req: Request) => UniverseRoute(req, { params: { provider: 'google' } });
3 changes: 2 additions & 1 deletion src/config/modelProviders/google.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ const Google: ModelProviderCard = {
displayName: 'Gemini 1.5 Pro',
id: 'gemini-1.5-pro-latest',
tokens: 1_048_576,
vision: true,
},
{
displayName: 'Gemini Ultra',
Expand All @@ -27,4 +28,4 @@ const Google: ModelProviderCard = {
id: 'google',
};

export default Google;
export default Google;
Loading

0 comments on commit 5517eef

Please sign in to comment.