Skip to content

Commit

Permalink
fix: ai deps (#315)
Browse files Browse the repository at this point in the history
  • Loading branch information
okisdev authored Apr 21, 2024
1 parent 14dc441 commit b71b620
Show file tree
Hide file tree
Showing 8 changed files with 36 additions and 47 deletions.
2 changes: 1 addition & 1 deletion lib/provider/Google.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,5 @@ import { Google } from '@ai-sdk/google';

export const google = new Google({
apiKey: process.env.GOOGLE_API_KEY ?? '',
// baseUrl: process.env.OPENAI_API_ENDPOINT ?? '',
// baseURL: process.env.OPENAI_API_ENDPOINT ?? '',
});
2 changes: 1 addition & 1 deletion lib/provider/OpenAI.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,5 @@ import { OpenAI } from '@ai-sdk/openai';

export const openai = new OpenAI({
apiKey: process.env.OPENAI_API_KEY ?? '',
// baseUrl: process.env.OPENAI_API_ENDPOINT ?? '',
// baseURL: process.env.OPENAI_API_ENDPOINT ?? '',
});
2 changes: 1 addition & 1 deletion lib/search/challenger.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ export const challenger = async (messages: ExperimentalMessage[], model: SimpleM

const openai = new OpenAI({
apiKey: currentProviderSettings?.OpenAI?.apiKey ?? process.env.OPENAI_API_KEY ?? '',
// baseUrl: currentProviderSettings?.OpenAI?.endpoint ?? process.env.OPENAI_API_ENDPOINT ?? 'https://api.openai.com/v1',
// baseURL: currentProviderSettings?.OpenAI?.endpoint ?? process.env.OPENAI_API_ENDPOINT ?? 'https://api.openai.com/v1',
});

return await experimental_generateObject({
Expand Down
2 changes: 1 addition & 1 deletion lib/search/clarifier.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ export const clarifier = async (uiStream: ReturnType<typeof createStreamableUI>,

const openai = new OpenAI({
apiKey: currentProviderSettings?.OpenAI?.apiKey ?? process.env.OPENAI_API_KEY ?? '',
// baseUrl: currentProviderSettings?.OpenAI?.endpoint ?? process.env.OPENAI_API_ENDPOINT ?? 'https://api.openai.com/v1',
// baseURL: currentProviderSettings?.OpenAI?.endpoint ?? process.env.OPENAI_API_ENDPOINT ?? 'https://api.openai.com/v1',
});

await experimental_streamObject({
Expand Down
2 changes: 1 addition & 1 deletion lib/search/illustrator.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ export const illustrator = async (uiStream: ReturnType<typeof createStreamableUI

const openai = new OpenAI({
apiKey: currentProviderSettings?.OpenAI?.apiKey ?? process.env.OPENAI_API_KEY ?? '',
// baseUrl: currentProviderSettings?.OpenAI?.endpoint ?? process.env.OPENAI_API_ENDPOINT ?? 'https://api.openai.com/v1',
// baseURL: currentProviderSettings?.OpenAI?.endpoint ?? process.env.OPENAI_API_ENDPOINT ?? 'https://api.openai.com/v1',
});

await experimental_streamObject({
Expand Down
2 changes: 1 addition & 1 deletion lib/search/searcher.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ export const searcher = async (

const openai = new OpenAI({
apiKey: currentProviderSettings?.OpenAI?.apiKey ?? process.env.OPENAI_API_KEY ?? '',
// baseUrl: currentProviderSettings?.OpenAI?.endpoint ?? process.env.OPENAI_API_ENDPOINT ?? 'https://api.openai.com/v1',
// baseURL: currentProviderSettings?.OpenAI?.endpoint ?? process.env.OPENAI_API_ENDPOINT ?? 'https://api.openai.com/v1',
});

const result = await experimental_streamText({
Expand Down
8 changes: 4 additions & 4 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,10 @@
"eslint:fix": "eslint --ext .ts,.tsx --fix ."
},
"dependencies": {
"@ai-sdk/anthropic": "^0.0.0",
"@ai-sdk/google": "^0.0.0",
"@ai-sdk/openai": "^0.0.0",
"@anthropic-ai/sdk": "^0.18.0",
"@ai-sdk/anthropic": "^0.0.3",
"@ai-sdk/google": "^0.0.3",
"@ai-sdk/openai": "^0.0.2",
"@anthropic-ai/sdk": "^0.20.6",
"@aws-sdk/client-bedrock-runtime": "^3.556.0",
"@azure/openai": "^1.0.0-beta.12",
"@ducanh2912/next-pwa": "^10.2.6",
Expand Down
63 changes: 26 additions & 37 deletions pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit b71b620

Please sign in to comment.