rag_chat_ / settings.py
mryt66
Initial commit
a840639
raw
history blame contribute delete
918 Bytes
from pydantic import BaseModel
from typing import List
class Chunk(BaseModel):
content: str
source: str
tags: List[str] = []
type: str = "prg"
class Settings:
response_schema = {
"type": "array",
"items": {
"type": "object",
"properties": {
"content": {
"type": "string",
"description": "Text of the chunk (100-500 words, do not cut mid-sentence/paragraph/table)",
},
"source": {"type": "string", "description": "PDF filename"},
"tags": {"type": "array", "items": {"type": "string"}},
"type": {
"type": "string",
"description": "Chunk type",
"default": "prg",
},
},
"required": ["content", "source", "tags", "type"],
},
}