File size: 755 Bytes
408128e
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
from pydantic import BaseModel, Field


class TranslateOutput(BaseModel):
    answer: str = Field(description="translated word")
    word: str = Field(description="word to be translated")


class GrammarlyOutput(BaseModel):
    corrected_sentence: str = Field(description="corrected sentence")
    incorrect: list = Field(description="list of incorrect words or phrases")
    correct: list = Field(description="list of correct words or phrases")


class ClassifyDocumentOutput(BaseModel):
    type: str = Field(description="document type RnD or Business")


class ClassifyAndSummarizeOutput(BaseModel):
    summary: str = Field(description="summary of the document")
    type: str = Field(description="document type RnD or Business")