HTPD

v0.1.2.post1
io.github.narendrachampaneri/htpd Checked 1 day ago Published 1 month ago

Answer questions from PDFs converted to .htpd: exact text with pages, or 'Not found in this file.'

These tools were reported by the server itself during our smoke test (tools/list), not copied from the README.

list_bundles

List the HTPD bundles (converted documents) this server can read.

contents

The table of contents of a bundle: every section with its ID, number, title and pages. Start here to see how the document is built.

ParameterTypeDescription
bundle *stringName of a bundle (see list_bundles) or the path of a bundle folder.
depthintegerShow only this many levels.

open_section

The exact text of one section, with the page of every paragraph, its place in the document, its parent, subsections and neighbours. Use the ID, the file name or the section number (e.g. '3.1').

ParameterTypeDescription
bundle *stringName of a bundle (see list_bundles) or the path of a bundle folder.
section *string

ask

Give a question; get back only the few sections of the document that answer it, with their exact text and pages - or NOT FOUND when the document does not answer it. Quote the text and cite the pages in the answer.

ParameterTypeDescription
bundle *stringName of a bundle (see list_bundles) or the path of a bundle folder.
question *string
budgetintegerMost tokens of text to return (default 3000).

figure

The picture of one figure (a diagram, chart or photo of the document) as an image, with its caption, page and section. Figures stand in the text as a line '![F12: caption]'; ask for 'F12' to see it.

ParameterTypeDescription
bundle *stringName of a bundle (see list_bundles) or the path of a bundle folder.
figure *stringe.g. 'F12'

check

List every problem of a bundle (broken links, a tree that disagrees, ...).

ParameterTypeDescription
bundle *stringName of a bundle (see list_bundles) or the path of a bundle folder.