Fix view
This commit is contained in:
parent
3e0152ee24
commit
54e6076a9d
1 changed files with 3 additions and 1 deletions
|
@ -241,7 +241,7 @@ class PromptSelector(discord.ui.View):
|
||||||
self.system_prompt = modal.value
|
self.system_prompt = modal.value
|
||||||
|
|
||||||
@discord.ui.button(label="Set System Prompt", style=discord.ButtonStyle.primary, custom_id="usr")
|
@discord.ui.button(label="Set System Prompt", style=discord.ButtonStyle.primary, custom_id="usr")
|
||||||
async def set_system_prompt(self, btn: discord.ui.Button, interaction: Interaction):
|
async def set_user_prompt(self, btn: discord.ui.Button, interaction: Interaction):
|
||||||
modal = OllamaGetPrompt(self.ctx)
|
modal = OllamaGetPrompt(self.ctx)
|
||||||
await interaction.response.send_modal(modal)
|
await interaction.response.send_modal(modal)
|
||||||
await modal.wait()
|
await modal.wait()
|
||||||
|
@ -344,6 +344,7 @@ class Ollama(commands.Cog):
|
||||||
)
|
)
|
||||||
]
|
]
|
||||||
):
|
):
|
||||||
|
system_query = None
|
||||||
if context is not None:
|
if context is not None:
|
||||||
if not self.history.get_thread(context):
|
if not self.history.get_thread(context):
|
||||||
await ctx.respond("Invalid context key.")
|
await ctx.respond("Invalid context key.")
|
||||||
|
@ -359,6 +360,7 @@ class Ollama(commands.Cog):
|
||||||
await ctx.respond("Select edit your prompts, as desired. Click done when you want to continue.", view=v)
|
await ctx.respond("Select edit your prompts, as desired. Click done when you want to continue.", view=v)
|
||||||
await v.wait()
|
await v.wait()
|
||||||
query = v.user_prompt or query
|
query = v.user_prompt or query
|
||||||
|
system_query = v.system_prompt
|
||||||
|
|
||||||
model = model.casefold()
|
model = model.casefold()
|
||||||
try:
|
try:
|
||||||
|
|
Loading…
Reference in a new issue