We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent d852b06 commit 672b2dcCopy full SHA for 672b2dc
1 file changed
workflowai/core/fields/image.py
@@ -1,10 +1,5 @@
1
-from pydantic import BaseModel, Field
+from workflowai.core.fields.file import File
2
3
4
-class Image(BaseModel):
5
- name: str = Field(..., description="An optional name for the image")
6
- content_type: str = Field(..., description="The content type of the image", examples=["image/png", "image/jpeg"])
7
- data: str = Field(..., description="The base64 encoded data of the image")
8
-
9
- def to_url(self) -> str:
10
- return f"data:{self.content_type};base64,{self.data}"
+class Image(File):
+ pass
0 commit comments