File tree Expand file tree Collapse file tree 1 file changed +1
-16
lines changed
Expand file tree Collapse file tree 1 file changed +1
-16
lines changed Original file line number Diff line number Diff line change @@ -58,28 +58,13 @@ exports.assistant = onRequest((request, response) => {
5858 ] ,
5959 } ;
6060
61- // // Send message to AI assistant
62- // axios.post('https://api.openai.com/v1/chat/completions', data, {
63- // headers: {
64- // 'Authorization': `Bearer ${process.env.OPENAI_API_KEY}`,
65- // 'Content-Type': 'application/json',
66- // },
67- // })
68- // .then((response2) => {
69- // logger.info("AI assistant response", { structuredData: true, response: response2.data });
70- // // Send success response to the client
71- // sendSuccess({ response }, { message: "Contact request received", data: response2.data.choices });
72- // });
73-
74- // ...
75-
7661 // Send message to AI assistant
7762 const options = {
7863 hostname : 'api.openai.com' ,
7964 path : '/v1/chat/completions' ,
8065 method : 'POST' ,
8166 headers : {
82- 'Authorization' : `Bearer ${ process . env . OPENAI_API_KEYs } ` ,
67+ 'Authorization' : `Bearer ${ process . env . OPENAI_API_KEY } ` ,
8368 'Content-Type' : 'application/json' ,
8469 } ,
8570 } ;
You can’t perform that action at this time.
0 commit comments