File size: 1,060 Bytes
57cf043
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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
35
36
37
38
from typing import Optional
from datetime import datetime
from pydantic import BaseModel


class LlmPromptSchema(BaseModel):
    is_default: bool
    id: int
    text: str
    name: str
    type: str
    date_created: datetime

    class Config:
        json_schema_extra = {
            'example': {
                'is_default': True,
                'text': 'Я большой и страшный промпт. Я в поросятах знаю толк.',
                'name': 'Большой и страшный промпт',
                'type': 'system'
            }
        }

class LlmPromptCreateSchema(BaseModel):
    is_default: bool
    text: str
    name: str
    type: str
    class Config:
        json_schema_extra = {
            'example': {
                'is_default': True,
                'text': 'Я большой и страшный промпт. Я в поросятах знаю толк.',
                'name': 'Большой и страшный промпт',
                'type': 'system'
            }
        }