Skip to content

Commit 6fad40b

Browse files
committed
fix
1 parent 2a00996 commit 6fad40b

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

services/useApiService.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ const useApiService = () => {
3535
const response = await fetch(url, {
3636
headers: {
3737
'Content-Type': 'application/json',
38-
Authorization: `Bearer ${params.key ? params.key : process.env.OPENAI_API_KEY}`
38+
Authorization: `Bearer ${params.key ? params.key : process.env.NEXT_PUBLIC_OPENAI_API_KEY}`
3939
},
4040
});
4141
const res = await response.json()

utils/server/index.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ export const ChatStream = async (
4141
headers: {
4242
'accept': "*/*",
4343
'Content-Type': "application/json",
44-
Authorization: `Bearer ${key ? key : process.env.OPENAI_API_KEY}`
44+
Authorization: `Bearer ${key ? key : process.env.NEXT_PUBLIC_OPENAI_API_KEY}`
4545
},
4646
method: 'POST',
4747
body: JSON.stringify({
@@ -67,7 +67,7 @@ export const ChatWithoutStream = async (
6767
headers: {
6868
'accept': "*/*",
6969
'Content-Type': 'application/json',
70-
Authorization: `Bearer ${key ? key : process.env.OPENAI_API_KEY}`
70+
Authorization: `Bearer ${key ? key : process.env.NEXT_PUBLIC_OPENAI_API_KEY}`
7171
},
7272
method: 'POST',
7373
body: JSON.stringify({

0 commit comments

Comments
 (0)