windingwind / zotero-pdf-translate

Translate PDF, EPub, webpage, metadata, annotations, notes to the target language. Support 20+ translate services.
GNU Affero General Public License v3.0
7.67k stars 359 forks source link

[Feature Request: Support for Multiple Customizable Prompts for Different Scenarios] #1010

Open qq1952804462 opened 2 weeks ago

qq1952804462 commented 2 weeks ago

Is there an existing issue for this?

Environment

Describe the feature request

I’m often frustrated when using the translation plugin in different contexts because the single default prompt is not flexible enough to handle varied scenarios. For instance:

Manuscript Cleaning: Academic manuscripts often include irrelevant elements like line numbers, watermarks, or headers/footers, which GPT should ignore during processing. Technical Clarification: In documents with numerous technical terms, GPT often lacks sufficient context to understand these terms or their specific meanings. Professional Terminology Highlighting: While studying materials filled with specialized terminology, it would be helpful if GPT could flag important or professional expressions requiring extra attention. Currently, I need to manually modify the prompt each time to fit the specific task, which is inefficient and prone to errors.

This feature would improve the usability and efficiency of the plugin by allowing users to save and switch between multiple predefined prompts tailored to their needs. This flexibility would significantly enhance workflows across different use cases, particularly for users working in academic or technical fields.

Describe the solution you'd like

The solution I'd like

Multiple Prompt Slots: Allow users to create, save, and name multiple custom prompts within the plugin settings (e.g., "Manuscript Cleaning", "Technical Clarification", "Professional Terminology Highlighting"). Easy Selection: Add a dropdown menu or similar interface to quickly select a desired prompt before processing the text. Prompt Management: Enable users to edit, delete, and update saved prompts directly in the plugin settings. Default Prompt Option: Include an option to set one of the prompts as the default for general use cases. Alternatives you've considered

Manually Editing Prompts: Currently, I manually edit the default prompt each time to fit the specific context. However, this is time-consuming and not user-friendly. External Prompt Management Tools: Using external tools to manage and copy prompts into the plugin is a workaround but interrupts the workflow and decreases productivity. Use of Macros: Some users may consider macros for automating prompt changes, but this adds unnecessary complexity for non-technical users.

Anything else?

If needed, I can provide examples of how different custom prompts would be used:

Manuscript Cleaning Prompt: "Ignore line numbers, watermarks, headers, and footers. Focus on the main academic content for translation." Technical Clarification Prompt: "If any technical term or abbreviation is unclear, suggest possible meanings and request confirmation, e.g., 'I’m not sure if this term refers to X or Y. Please clarify.'" Professional Terminology Highlighting Prompt: "Flag specialized terms and add notes, e.g., 'This expression is common in the field and might require further review.'" This feature could also benefit other plugin users in academic or technical fields who frequently need flexibility in GPT's task-specific prompts.