Skip to content

feat: add POST /api/v1/documents/{id}/regenerate endpoint#952

Open
Arpitavj02 wants to merge 2 commits into
SdSarthak:mainfrom
Arpitavj02:main
Open

feat: add POST /api/v1/documents/{id}/regenerate endpoint#952
Arpitavj02 wants to merge 2 commits into
SdSarthak:mainfrom
Arpitavj02:main

Conversation

@Arpitavj02

Copy link
Copy Markdown

Closes #27

Added POST /api/v1/documents/{id}/regenerate endpoint in backend/app/api/v1/documents.py

  • Fetches the document by ID (must be owned by current user)
  • Validates the document is linked to an AI system
  • Re-generates content using the current state of the linked AI system
  • Falls back to template if LLM generation fails
  • Updates the existing document content and status, returns updated document

Added a new endpoint to regenerate documents based on their linked AI system and updated the existing document generation logic.
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.

Add POST /api/v1/documents/{id}/regenerate endpoint

1 participant