Skip to content

Commit

Permalink
api tweak
Browse files Browse the repository at this point in the history
  • Loading branch information
tombyrn committed Apr 4, 2023
1 parent 65f02ac commit 344ade5
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions chat-gpt.js
Original file line number Diff line number Diff line change
Expand Up @@ -16,15 +16,15 @@ const openai = new OpenAIApi(configuration);

async function generateText() {
const response = await openai.createCompletion({
model: 'text-davinci-002',
model: 'text-davinci-003',
prompt: prompt,
temperature: 0,
max_tokens: 1000,
max_tokens: 1500,
});

if(response.data.choices[0].text){
console.log('===================== Chat-GPT =====================')
console.log(response.data.choices[0].text)
console.log(response.data.choices[0].text.toString())
console.log('\n')
}
else{
Expand Down

0 comments on commit 344ade5

Please sign in to comment.