Skip to content

Commit 570670b

Browse files
committed
Quality fixes
1 parent a441dad commit 570670b

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

src/guidellm/backend/openai.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -179,7 +179,7 @@ def _build_messages(self, request: TextGenerationRequest) -> Dict:
179179
stream = io.BytesIO()
180180
im_format = image.image.format or "PNG"
181181
image.image.save(stream, format=im_format)
182-
im_b64 = base64.b64encode(stream.getvalue()).decode("ascii")
182+
im_b64 = base64.b64encode(stream.getvalue()).decode("utf-8")
183183
image_url = {"url": f"data:image/{im_format.lower()};base64,{im_b64}"}
184184
content.append({"type": "image_url", "image_url": image_url})
185185

src/guidellm/utils/images.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,4 +65,4 @@ def load_images(data: str) -> List[ImageDescriptor]:
6565
)
6666
)
6767

68-
return images
68+
return images

0 commit comments

Comments
 (0)