File size: 487 Bytes
71192d1
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
from pydantic import BaseModel, Field

class TextOnlyRequest(BaseModel):
    text: str = Field(..., example="Your input text here")

class RewriteRequest(BaseModel):
    text: str = Field(..., example="Your input text here")
    instruction: str = Field(..., example="Rewrite this more concisely")
    user_api_key: str = Field(..., example="sk-...")

class TranslateRequest(BaseModel):
    text: str = Field(..., example="Translate this")
    target_lang: str = Field(..., example="fr")