This website requires JavaScript.
Explore
Help
Sign In
Mirrored-Projects
/
paperless-gpt
Watch
1
Star
0
Fork
You've already forked paperless-gpt
0
mirror of
https://github.com/icereed/paperless-gpt.git
synced
2025-03-12 21:08:00 -05:00
Code
Issues
Projects
Releases
Packages
Wiki
Activity
Actions
1
951ef8996c
paperless-gpt
/
.gitignore
3 lines
23 B
Text
Raw
Normal View
History
Unescape
Escape
:sparkles: Publish paperless-gpt
2024-09-23 07:59:50 -05:00
.env
.DS_Store
feat: add support for customizable server-side prompts - **Custom Prompt Templates**: Introduced support for user-modifiable prompt templates using Go's `text/template`. - Added default prompt templates for title and tag generation. - Templates are stored in the `prompts` directory and are loaded at startup. - If the template files do not exist, they are created with default content. - Users can modify the templates by editing the files in the `prompts` directory. - **API Endpoints for Prompts**: - Added `GET /api/prompts` endpoint to retrieve the current prompt templates. - Added `POST /api/prompts` endpoint to update the prompt templates. - These endpoints prepare for future UI support for modifying prompts. - **Thread Safety**: - Implemented a `sync.RWMutex` to ensure thread-safe access to the templates. - **Updated Backend Logic**: - Modified `getSuggestedTitle` and `getSuggestedTags` functions to use the loaded templates. - Templates utilize variables like `{{.Language}}`, `{{.Content}}`, `{{.AvailableTags}}`, and `{{.Title}}`. - **Docker and Documentation**: - Updated the `loadTemplates` function to ensure the `prompts` directory exists and to save default templates if missing. - Updated the README with instructions on how to mount the `prompts` directory in Docker and Docker Compose. - Provided guidance on modifying the prompt templates via file edits.
2024-10-16 07:49:07 -05:00
prompts/
Reference in a new issue
Copy permalink