Command Line Interface
Once you have installed the blueprint, you can use it from the CLI.
You can either provide the path to a configuration file:
Or provide values to the arguments directly:
structured-qa \
--question "What learning rate was used?" \
--input_file "example_data/1706.03762v7.pdf" \
--output_folder "example_outputs/1706.03762v7.pdf"
structured_qa.cli.structured_qa(question, input_file=None, output_dir=None, model='bartowski/Qwen2.5-3B-Instruct-GGUF/Qwen2.5-3B-Instruct-f16.gguf', find_prompt=FIND_PROMPT, answer_prompt=ANSWER_PROMPT, from_config=None)
Structured Question Answering.
Split the input document into sections and answer the question based on the sections.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
input_file
|
str | None
|
Path to the input document. |
None
|
output_dir
|
str | None
|
None
|
|
model
|
str | None
|
Model identifier formatted as |
'bartowski/Qwen2.5-3B-Instruct-GGUF/Qwen2.5-3B-Instruct-f16.gguf'
|
question
|
str
|
The question to answer. |
required |
find_prompt
|
str
|
The prompt for finding the section. See |
FIND_PROMPT
|
answer_prompt
|
str
|
The prompt for answering the question. See |
ANSWER_PROMPT
|
from_config
|
str | None
|
The path to the config file. If provided, all other arguments will be ignored. |
None
|
Source code in src/structured_qa/cli.py
structured_qa.config.Config
Bases: BaseModel