API Reference¶
summ.Summ
¶
The main entry point for both populating and querying the model.
Source code in summ/summ.py
12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 |
|
populate(path: Path, parallel: bool = True, pipe: Optional[Pipeline] = None)
¶
Populate the model with data from a given path.
PARAMETER | DESCRIPTION |
---|---|
path |
The path to the data (format depends on Importer).
TYPE:
|
parallel |
Whether to run the pipeline in parallel.
TYPE:
|
pipe |
The pipeline to use. If one is not supplied, a default one will be constructed. |
Source code in summ/summ.py
19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 |
|
query(question: str, classes: list[Classes] = [], corpus: list[Document] = [], debug: bool = True) -> str
¶
Query a pre-populated model with a given question.
PARAMETER | DESCRIPTION |
---|---|
question |
The question to ask.
TYPE:
|
n |
The number of facts to use per sub-query.
TYPE:
|
classes |
The set of tags to use as filters (AND). |
debug |
Whether to print intermediate steps.
TYPE:
|
Source code in summ/summ.py
53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 |
|