Skip to content

Commit

Permalink
🪛 fix pydantic V2 schemas
Browse files Browse the repository at this point in the history
  • Loading branch information
shroominic committed Aug 22, 2023
1 parent 855366b commit 74ebbc7
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions codeinterpreterapi/schema/file.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import asyncio

from pydantic import BaseModel
from langchain.pydantic_v1 import BaseModel


class File(BaseModel):
Expand Down Expand Up @@ -60,7 +60,7 @@ def get_image(self):
img = Image.open(img_io)

# Convert image to RGB if it's not
if img.mode not in ("RGB", "L"): # L is for greyscale images
if img.mode not in ("RGB", "L"): # L is for grayscale images
img = img.convert("RGB")

return img
Expand Down
2 changes: 1 addition & 1 deletion codeinterpreterapi/schema/input.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
from pydantic import BaseModel
from langchain.pydantic_v1 import BaseModel


class CodeInput(BaseModel):
Expand Down

0 comments on commit 74ebbc7

Please sign in to comment.