Skip to content

Commit

Permalink
fix optimizer redo
Browse files Browse the repository at this point in the history
  • Loading branch information
Kav-K committed Feb 3, 2023
1 parent 5d5ec3d commit 6b5ad1b
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 3 deletions.
5 changes: 4 additions & 1 deletion cogs/prompt_optimizer_cog.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
import discord
from sqlitedict import SqliteDict

from models.openai_model import Override
from services.environment_service import EnvService
from models.user_model import RedoUser
from services.image_service import ImageService
Expand Down Expand Up @@ -85,7 +86,7 @@ async def optimize_command(self, ctx: discord.ApplicationContext, prompt: str):
top_p_override=1.0,
temp_override=0.9,
presence_penalty_override=0.5,
best_of_override=2,
best_of_override=1,
max_tokens_override=80,
custom_api_key=user_api_key,
)
Expand Down Expand Up @@ -259,10 +260,12 @@ async def callback(self, interaction: discord.Interaction):
await interaction.response.send_message(
"Redoing your original request...", ephemeral=True, delete_after=20
)
overrides = Override(1.0, 0.9, 0.5)
await TextService.encapsulated_send(
self.converser_cog,
id=user_id,
prompt=prompt,
overrides=overrides,
ctx=ctx,
response_message=response_message,
custom_api_key=self.custom_api_key,
Expand Down
2 changes: 1 addition & 1 deletion gpt3discord.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@
from models.openai_model import Model


__version__ = "9.0.2"
__version__ = "9.0.3"


PID_FILE = Path("bot.pid")
Expand Down
2 changes: 1 addition & 1 deletion image_optimizer_pretext.txt
Original file line number Diff line number Diff line change
Expand Up @@ -139,6 +139,6 @@ replace [3] with a list of detailed descriptions about the environment of the sc
replace [4] with a list of detailed descriptions about the mood/feelings and atmosphere of the scene
replace [5] with a list of detailed descriptions about the technical basis like render engine/camera model and details

The outcome depends on the coherency of the prompt. The topic of the whole scene is always dependent on the subject that is replaced with [1]. There is not always a need to add lighting information, decide as neccessary. Do not use more than 50 words under any circumstance.
The outcome depends on the coherency of the prompt. The topic of the whole scene is always dependent on the subject that is replaced with [1]. There is not always a need to add lighting information, decide as neccessary. Do not use more than 40 words under any circumstance. Be concise but descriptive.

Input Prompt:

0 comments on commit 6b5ad1b

Please sign in to comment.