Skip to content

Commit

Permalink
use new gpt model
Browse files Browse the repository at this point in the history
  • Loading branch information
maidi29 committed Dec 9, 2023
1 parent 16e7a8a commit 1c0ef2d
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion controllers/OpenAiController.js
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@ module.exports.generateHoroscope = async (req, res) => {
temperature: 1,
max_tokens: 2048,
});
console.log(completion)
let horoscope = completion.choices[0].text;
horoscopes[today][zodiac] = horoscope;
res.status(200).json({horoscope});
Expand Down Expand Up @@ -62,7 +63,7 @@ const horoscopePrompt = (zodiac) => {


module.exports.getAnswer = async (req, res) => {
if (!configuration.apiKey) {
if (!openai.apiKey) {
res.status(500).json({
error: {
message: "OpenAI API key not configured.",
Expand Down

0 comments on commit 1c0ef2d

Please sign in to comment.