Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions marker/services/openai.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,20 +27,20 @@ class OpenAIService(BaseService):
] = None
openai_image_format: Annotated[
str,
"The image format to use for the OpenAI-like service. Use 'png' for better compatability",
"The image format to use for the OpenAI-like service. Use 'png' for better compatibility",
] = "webp"

def process_images(self, images: List[Image.Image]) -> List[dict]:
"""
Generate the base-64 encoded message to send to an
openAI-compatabile multimodal model.
OpenAI-compatible multimodal model.

Args:
images: Image or list of PIL images to include
format: Format to use for the image; use "png" for better compatability.
format: Format to use for the image; use "png" for better compatibility.

Returns:
A list of OpenAI-compatbile multimodal messages containing the base64-encoded images.
A list of OpenAI-compatible multimodal messages containing the base64-encoded images.
"""
if isinstance(images, Image.Image):
images = [images]
Expand Down
Loading