forked from knowsuchagency/pdf-to-podcast
-
Notifications
You must be signed in to change notification settings - Fork 159
/
schema.py
34 lines (23 loc) · 745 Bytes
/
schema.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
"""
schema.py
"""
from typing import Literal, List
from pydantic import BaseModel, Field
class DialogueItem(BaseModel):
"""A single dialogue item."""
speaker: Literal["Host (Jane)", "Guest"]
text: str
class ShortDialogue(BaseModel):
"""The dialogue between the host and guest."""
scratchpad: str
name_of_guest: str
dialogue: List[DialogueItem] = Field(
..., description="A list of dialogue items, typically between 11 to 17 items"
)
class MediumDialogue(BaseModel):
"""The dialogue between the host and guest."""
scratchpad: str
name_of_guest: str
dialogue: List[DialogueItem] = Field(
..., description="A list of dialogue items, typically between 19 to 29 items"
)