Skip to content

Commit f2daa42

Browse files
committed
+
1 parent 91209a6 commit f2daa42

File tree

1 file changed

+1
-16
lines changed

1 file changed

+1
-16
lines changed

functions/index.js

Lines changed: 1 addition & 16 deletions
Original file line numberDiff line numberDiff 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
};

0 commit comments

Comments
 (0)