Release v0.3.0: Customizable Server-Side Prompts #16
icereed
announced in
Announcements
Replies: 1 comment
-
Great Job, thanks :) |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
📢 Release Notes: paperless-gpt v0.3.0
We are excited to announce the release of paperless-gpt v0.3.0! This version brings significant enhancements, including customizable server-side prompts and improvements to tag handling. These updates provide greater flexibility and control over how you generate document titles and tags using AI.
🚀 New Features and Improvements
1. Customizable Server-Side Prompts
User-Defined Prompt Templates: You can now modify the prompt templates used for generating document titles and tags directly on the server side.
Prompt Templates: The application uses Go's
text/template
for the prompt templates.Persistent Storage: Templates are stored in the
prompts
directory, allowing you to customize them by editing the files.Template Variables: Use variables like
{{.Language}}
,{{.Content}}
,{{.AvailableTags}}
, and{{.Title}}
within your templates to tailor the prompts.Advanced Functions: Leverage functions from the Sprig library for more advanced templating capabilities.
Easy Integration: Simply edit the template files to adjust how the AI generates suggestions, making the system more adaptable to your specific needs.
2. Improved Tag Handling
API Pagination Fix: Resolved an issue where not all tags were fetched from paperless-ngx due to pagination limitations.
Enhanced Accuracy: With all tags available, the AI can suggest more accurate and relevant tags for your documents.
🛠 How to Update
To update to the latest version of paperless-gpt, please pull the latest Docker image:
If you're using Docker Compose, update your
docker-compose.yml
file if necessary and redeploy the stack:🔧 Custom Prompt Templates Setup
Mounting the Prompts Directory
To enable custom prompt templates, you need to mount a local
prompts
directory into the container.Docker Compose Example:
Docker Run Command Example:
Editing the Prompt Templates
Create the
prompts
Directory Locally:Start the Container:
When you first start the container with the prompts directory mounted, it will automatically create the default template files in your local
prompts
directory if they do not exist.Edit the Template Files:
prompts/title_prompt.tmpl
andprompts/tag_prompt.tmpl
with your favorite text editor.text/template
syntax.Restart the Container (if necessary):
The application automatically reloads the templates when it starts. If the container is already running, you may need to restart it to apply the changes.
Template Syntax and Variables
For
title_prompt.tmpl
:{{.Language}}
: The language specified inLLM_LANGUAGE
(default isEnglish
).{{.Content}}
: The content of the document.For
tag_prompt.tmpl
:{{.Language}}
: The language specified inLLM_LANGUAGE
.{{.AvailableTags}}
: A comma-separated list of available tags from paperless-ngx.{{.Title}}
: The suggested title for the document.{{.Content}}
: The content of the document.Note: Advanced users can utilize additional functions from the Sprig template library, as it is included in the application.
📚 Documentation
For detailed instructions on installation, configuration, and customizing prompt templates, please refer to the README on our GitHub repository.
💡 Feedback and Contributions
We appreciate your feedback! If you encounter any issues or have suggestions for new features, please open an issue on our GitHub Issues page.
Contributions are welcome. Please read our contributing guidelines before submitting a pull request.
📦 What's Next
We are continuously working to improve paperless-gpt. Upcoming features and enhancements may include:
UI Support for Prompt Editing: Providing an in-app interface to edit prompt templates without the need to access the file system.
Manual Dark Mode Toggle: Allowing users to override the system's dark mode setting within the application.
Additional LLM Support: Expanding compatibility with more Large Language Models.
Performance Improvements: Optimizing the application for faster processing and better resource utilization.
Thank you for your continued support and for using paperless-gpt to enhance your paperless-ngx experience!
This discussion was created from the release Customizable Server-Side Prompts.
Beta Was this translation helpful? Give feedback.
All reactions