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

Store some strings in variables in gptel-rewrite.el #677

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

rkallio
Copy link

@rkallio rkallio commented Mar 2, 2025

Hi, thanks for creating this great package.

I've been exploring gptel-rewrite, and I primarily use language models in Finnish. I noticed that each rewrite request includes the prompt string "What is the required change?". This may cause issues, particularly with Google's Gemini, which sometimes identifies itself as an English model and declines to process Finnish text. To address this, I've modified the code to make this string configurable. Additionally, I've made the "Rewrite: " string configurable as well, as I find it useful to customize. I'm willing to contribute these changes, so please let me know what adjustments are needed for them to be accepted. I feel the change is necessary to support non-english use cases.

This change introduces customization options for prompts used in the
`gptel-rewrite` function. It introduces
`gptel-rewrite--assistant-instruction-question` for defining the
prompt and `gptel-rewrite--default-rewrite-prefix` for the default
"Rewrite: " prefix.
@pabl0
Copy link
Contributor

pabl0 commented Mar 4, 2025

This could be a good idea. However, if these are user-customizable variables, it may be more appropriate to define them with defcustom instead of defvar. Additionally, a two-dash prefix typically indicates internal variables rather than user-facing options.

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.

2 participants