File tree Expand file tree Collapse file tree 2 files changed +3
-3
lines changed Expand file tree Collapse file tree 2 files changed +3
-3
lines changed Original file line number Diff line number Diff 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 ( )
Original file line number Diff line number Diff 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 ( {
You can’t perform that action at this time.
0 commit comments