- Introduction of dynamic Processors - Introduction of caching system - Introduction of a better template manager - Adaptation of ModelVariables to support dynamic Processors / Retrievers / Specialists - Start adaptation of chat client
23 lines
779 B
Python
23 lines
779 B
Python
# RAG Specialist Output - common/langchain/outputs/rag.py
|
|
from typing import List
|
|
from pydantic import Field
|
|
from .base import BaseSpecialistOutput
|
|
|
|
|
|
class RAGOutput(BaseSpecialistOutput):
|
|
"""Output schema for RAG specialist"""
|
|
"""Default docstring - to be replaced with actual prompt"""
|
|
|
|
answer: str = Field(
|
|
...,
|
|
description="The answer to the user question, based on the given sources",
|
|
)
|
|
citations: List[int] = Field(
|
|
...,
|
|
description="The integer IDs of the SPECIFIC sources that were used to generate the answer"
|
|
)
|
|
insufficient_info: bool = Field(
|
|
False, # Default value is set to False
|
|
description="A boolean indicating whether given sources were sufficient or not to generate the answer"
|
|
)
|