changed gpt4 to gpt4 turbo to save $$$

This commit is contained in:
phixxy 2024-02-08 02:25:25 -08:00
parent 3e9391d184
commit a1a1886e17
2 changed files with 2 additions and 2 deletions

View file

@ -187,7 +187,7 @@ class ChatGPT(commands.Cog):
if ctx.author.get_role(self.premium_role): if ctx.author.get_role(self.premium_role):
await ctx.send("One moment, let me think...") await ctx.send("One moment, let me think...")
question = ctx.message.content.split(" ", maxsplit=1)[1] question = ctx.message.content.split(" ", maxsplit=1)[1]
answer = await self.answer_question(question, "gpt-4") answer = await self.answer_question(question, "gpt-4-turbo-preview")
chunks = [answer[i:i+1999] for i in range(0, len(answer), 1999)] chunks = [answer[i:i+1999] for i in range(0, len(answer), 1999)]
for chunk in chunks: for chunk in chunks:
await ctx.send(chunk) await ctx.send(chunk)

View file

@ -273,7 +273,7 @@ class PhixxyCom(commands.Cog):
title_prompt = 'generate an absurd essay title about ' + topic title_prompt = 'generate an absurd essay title about ' + topic
title = await self.answer_question(title_prompt, model="gpt-3.5-turbo") title = await self.answer_question(title_prompt, model="gpt-3.5-turbo")
prompt = 'Write a satirical essay with a serious tone titled: "' + title + '". Do not label parts of the essay.' prompt = 'Write a satirical essay with a serious tone titled: "' + title + '". Do not label parts of the essay.'
content = await self.answer_question(prompt, model="gpt-4") content = await self.answer_question(prompt, model="gpt-4-turbo-preview")
if title in content[:len(title)]: if title in content[:len(title)]:
content = content.replace(title, '', 1) content = content.replace(title, '', 1)
content = f"<p>{content}</p>" content = f"<p>{content}</p>"