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

Possibility to customize the default prompt text to describe an image #23

Merged
merged 12 commits into from
Dec 9, 2023

Conversation

Nael-Sayegh
Copy link
Contributor

@Nael-Sayegh Nael-Sayegh commented Dec 5, 2023

Adding a checkbox to the settings panel to change the default prompt text for image description.

Fixes #17

@AAClause
Copy link
Owner

AAClause commented Dec 6, 2023

Thanks for the PR @Nael-Sayegh!

I suggest the following key/attribute renamings:

  • default_prompt -> useCustomDefaultPrompt
  • default_prompt_text -> customDefaultPromptText

self.default_prompt = imageGroup.addItem(
wx.CheckBox(
imageBox,
label=_("Use a default custom text in the prompt to describe images")
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
label=_("Use a default custom text in the prompt to describe images")
label=_("Customize default text &prompt")

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I disagree with this modification because it's not clear enough for the user. It should be specified that it is for the image description.

self.default_prompt.SetValue(config.conf["OpenAI"]["images"]["default_prompt"])

self.default_prompt_text = imageGroup.addLabeledControl(
_("Custom text"),
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
_("Custom text"),
_("Default &text prompt:"),

@@ -380,6 +379,10 @@ def __init__(
):
if not client or not conf:
return
if config.conf["OpenAI"]["images"]["default_prompt"]:
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
if config.conf["OpenAI"]["images"]["default_prompt"]:
if conf["images"]["useCustomDefaultPrompt"]:

@Nael-Sayegh
Copy link
Contributor Author

Hello,
I have made all the changes, and I have made some modifications to the image group name to facilitate understanding.

Nael-Sayegh and others added 5 commits December 9, 2023 16:24
Co-authored-by: André-Abush Clause <dev@andreabc.net>
Co-authored-by: André-Abush Clause <dev@andreabc.net>
Co-authored-by: André-Abush Clause <dev@andreabc.net>
Co-authored-by: André-Abush Clause <dev@andreabc.net>
Co-authored-by: André-Abush Clause <dev@andreabc.net>
@AAClause AAClause merged commit 5bf78b4 into AAClause:master Dec 9, 2023
@Nael-Sayegh Nael-Sayegh deleted the default-description-prompt branch December 9, 2023 15:53
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

Successfully merging this pull request may close these issues.

Provide a mechanism to define the suggested prompt for image descriptions in settings.
2 participants