Skip to content

Commit

Permalink
IL-167 add documentation and expose new classes
Browse files Browse the repository at this point in the history
  • Loading branch information
NiklasKoehneckeAA committed Jan 24, 2024
1 parent 319c594 commit 6ca6e25
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/intelligence_layer/use_cases/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -37,8 +37,10 @@
from .qa.long_context_qa import LongContextQaInput as LongContextQaInput
from .qa.multiple_chunk_qa import MultipleChunkQa as MultipleChunkQa
from .qa.multiple_chunk_qa import MultipleChunkQaInput as MultipleChunkQaInput
from .qa.retriever_based_qa import EnrichedSubanswer as EnrichedSubanswer
from .qa.retriever_based_qa import RetrieverBasedQa as RetrieverBasedQa
from .qa.retriever_based_qa import RetrieverBasedQaInput as RetrieverBasedQaInput
from .qa.retriever_based_qa import RetrieverBasedQaOutput as RetrieverBasedQaOutput
from .qa.single_chunk_qa import SingleChunkQa as SingleChunkQa
from .qa.single_chunk_qa import SingleChunkQaInput as SingleChunkQaInput
from .qa.single_chunk_qa import SingleChunkQaOutput as SingleChunkQaOutput
Expand Down
10 changes: 10 additions & 0 deletions src/intelligence_layer/use_cases/qa/retriever_based_qa.py
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,16 @@ class RetrieverBasedQaInput(BaseModel):


class EnrichedSubanswer(Subanswer, Generic[ID]):
"""Individual answer for a chunk that also contains the origin of the chunk.
Attributes:
answer: The answer generated by the task. Can be a string or None (if no answer was found).
chunk: Piece of the original text that answer is based on.
highlights: The specific sentences that explain the answer the most.
These are generated by the `TextHighlight` Task.
id: The id of the document where the chunk came from.
"""

id: ID


Expand Down

0 comments on commit 6ca6e25

Please sign in to comment.