File size: 998 Bytes
f1a8641
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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
API_RESPONSES = {
    200: {
        "description": "Successful response",
        "content": {
            "application/json": {
                "example": {
                    "status": "success",
                    "generated_text": [
                        {"role": "user", "content": "hey"},
                        {
                            "role": "assistant",
                            "content": "Hello! How can I assist you today?",
                        },
                    ],
                }
            }
        },
    },
    400: {
        "description": "Invalid input",
        "content": {
            "application/json": {"example": {"detail": "Input text cannot be empty"}}
        },
    },
    500: {
        "description": "Server error",
        "content": {
            "application/json": {
                "example": {
                    "detail": "Error generating response: Model failed to generate"
                }
            }
        },
    },
}