Limit GPT queries
This commit is contained in:
parent
98137cc4fd
commit
29cea0caf6
1 changed files with 2 additions and 1 deletions
|
@ -43,7 +43,8 @@ export class UserCommand extends Command {
|
||||||
|
|
||||||
const chatCompletion = await openai.createChatCompletion({
|
const chatCompletion = await openai.createChatCompletion({
|
||||||
model: 'gpt-3.5-turbo',
|
model: 'gpt-3.5-turbo',
|
||||||
messages: [{ role: 'user', content: prompt }]
|
messages: [{ role: 'user', content: prompt }],
|
||||||
|
max_tokens: 1000
|
||||||
});
|
});
|
||||||
|
|
||||||
const content = chatCompletion.data.choices[0].message?.content || 'ERROR!';
|
const content = chatCompletion.data.choices[0].message?.content || 'ERROR!';
|
||||||
|
|
Loading…
Add table
Reference in a new issue