Update prompt_optimizer_cog.py

Signed-off-by: Kaveen Kumarasinghe <k5kumara@uwaterloo.ca>
Kaveen Kumarasinghe 1 year ago committed by GitHub
parent 17e82a30ca
commit 5424710f4f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -96,7 +96,7 @@ class ImgPromptOptimizer(discord.Cog, name="ImgPromptOptimizer"):
best_of_override=1,
max_tokens_override=60,
custom_api_key=user_api_key,
is_chatgpt_request="turbo" in str(self.model.model),
is_chatgpt_request="turbo" in str(self.model.model) or "gpt-4" in str(self.model.model),
)
# THIS USES MORE TOKENS THAN A NORMAL REQUEST! This will use roughly 4000 tokens, and will repeat the query
@ -105,7 +105,7 @@ class ImgPromptOptimizer(discord.Cog, name="ImgPromptOptimizer"):
response_text = (
str(response["choices"][0]["text"])
if not self.model.model in Models.CHATGPT_MODELS
if not (self.model.model in Models.CHATGPT_MODELS or self.model.model in Models.GPT4_MODELS)
else response["choices"][0]["message"]["content"]
)

Loading…
Cancel
Save