-
Notifications
You must be signed in to change notification settings - Fork 467
Open
Description
I am giving gpt4o a paged document, that is in a markdown format with page separators like those:
{PAGE 1}------------------------------------------------

**PLIEGO DE CLÁUSULAS ADMINISTRATIVAS PARTICULARES QUE HA DE REGIR EN EL CONTRATO DE SUMINISTRO E INSTALACIÓN DE DIVERSO EQUIPAMIENTO ELECTROMÉDICO (I) A ADJUDICAR POR PROCEDIMIENTO ABIERTO CON PLURALIDAD DE CRITERIOS**
...
{PAGE 2}------------------------------------------------
whatever...
Now, I am asking gpt the task to create a global summary and a summary of each page. I am providing this schema:
class PageSummary(BaseModel):
page_number: int
summary: str
questions: list[str]
class PagedSummary(BaseModel):
global_summary: GlobalSummary
page_summaries: list[PageSummary]
I would like to force the output to contain, in the list of PageSummarys, exactly the number of pages that each document has. But I don't know whether that is possible or not, maybe I should create a different schema for each document, dynamically? Or is there another way?
Metadata
Metadata
Assignees
Labels
No labels