Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Editing default Prompt clears prompt, even it looks like it is still there #91

Open
bmihelac opened this issue Oct 10, 2024 · 0 comments

Comments

@bmihelac
Copy link

bmihelac commented Oct 10, 2024

When editing default prompts, such as changing the label of the "AI Correction" prompt, the Prompt.prompt field's value changes from NULL to an empty string. This causes an empty prompt_value, resulting in incorrect outputs when used in the editor.

To reproduce:

  1. edit default prompt or just open and save it
  2. use it in the editor

Proposed Fixes:

  1. Prompt.prompt should not be nullable; its default should be an empty string
  2. Prompt.prompt_value should test truthiness instead of explicitly checking for None

I can submit a pull request if needed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant