hello world
hello world vinit tripathi here
try {
const response = await axios.post(
'https://api.openai.com/v1/chat/completions',
{
model: "gpt-3.5-turbo",
messages: [
{ role: "system", content: "You are a helpful assistant for manual testers." },
{ role: "user", content: message }
]
},
{
headers: {
'Authorization': `Bearer ${process.env.OPENAI_API_KEY}`,
'Content-Type': 'application/json'
}
}
);
return {
statusCode: 200,
body: JSON.stringify({ response: response.data.choices[0].message.content })
};