Update api/models.py
Browse files- api/models.py +4 -0
api/models.py
CHANGED
@@ -1,6 +1,10 @@
|
|
1 |
from typing import List, Optional, Union
|
2 |
from pydantic import BaseModel, Field
|
3 |
|
|
|
|
|
|
|
|
|
4 |
class MessageContent(BaseModel):
|
5 |
role: str
|
6 |
content: Union[str, List[dict]] # Handle both text and complex structures like images
|
|
|
1 |
from typing import List, Optional, Union
|
2 |
from pydantic import BaseModel, Field
|
3 |
|
4 |
+
class ImageResponse(BaseModel):
|
5 |
+
images: Union[str, List[str]] # Can handle both URLs and Base64 data
|
6 |
+
alt: Optional[str] = ""
|
7 |
+
|
8 |
class MessageContent(BaseModel):
|
9 |
role: str
|
10 |
content: Union[str, List[dict]] # Handle both text and complex structures like images
|