forked from CatchTheTornado/pdf-extract-api
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Related to CatchTheTornado#16 Add an optional LLM call for generating tags and summary of the file. * **app/main.py** - Add a new endpoint `/llm_tags_summary` to generate tags and summary using the LLM. - Update the `OllamaGenerateRequest` class to include a new field `generate_tags_summary`. - Update the `generate_llama` function to handle the new `generate_tags_summary` field. * **app/tasks.py** - Add a new function `generate_tags_summary` to generate tags and summary using the LLM. - Update the `ocr_task` function to include an optional call to `generate_tags_summary` after extracting text. * **client/cli.py** - Add a new command `llm_tags_summary` for generating tags and summary. - Update the `main` function to handle the new `llm_tags_summary` command. * **.env.example** - Add a new environment variable `LLM_TAGS_SUMMARY_API_URL`.
- Loading branch information
1 parent
7583f09
commit 7eeac00
Showing
4 changed files
with
60 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters