diff --git a/Makefile b/Makefile index f9b2082..8eb40a1 100644 --- a/Makefile +++ b/Makefile @@ -27,3 +27,7 @@ lint: .PHONY: test test: pytest + +.PHONY: lock +lock: + poetry lock --no-update diff --git a/pyproject.toml b/pyproject.toml index 2735097..9024caf 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [tool.poetry] name = "workflowai" -version = "0.3.2" +version = "0.3.3" description = "" authors = ["Guillaume Aquilina "] readme = "README.md" diff --git a/workflowai/core/fields/image.py b/workflowai/core/fields/image.py index 151660a..df21708 100644 --- a/workflowai/core/fields/image.py +++ b/workflowai/core/fields/image.py @@ -1,10 +1,5 @@ -from pydantic import BaseModel, Field +from workflowai.core.fields.file import File -class Image(BaseModel): - name: str = Field(..., description="An optional name for the image") - content_type: str = Field(..., description="The content type of the image", examples=["image/png", "image/jpeg"]) - data: str = Field(..., description="The base64 encoded data of the image") - - def to_url(self) -> str: - return f"data:{self.content_type};base64,{self.data}" +class Image(File): + pass