Skip to content

Commit 05448cf

Browse files
TLSDCgasse
andauthored
Vision fix (#105)
* changing content name * Update src/agentlab/llm/llm_utils.py --------- Co-authored-by: Maxime Gasse <[email protected]>
1 parent 6e18fb8 commit 05448cf

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

src/agentlab/llm/llm_utils.py

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,8 @@
88
import time
99
from copy import deepcopy
1010
from functools import cache
11-
from typing import TYPE_CHECKING, Any, Union
11+
from typing import TYPE_CHECKING
12+
from typing import Any, Union
1213
from warnings import warn
1314

1415
import numpy as np
@@ -353,9 +354,9 @@ def add_image(self, image: np.ndarray | Image.Image | str, detail: str = None):
353354
else:
354355
image_url = image
355356
if detail:
356-
self.add_content("image", {"url": image_url, "detail": detail})
357+
self.add_content("image_url", {"url": image_url, "detail": detail})
357358
else:
358-
self.add_content("image", image_url)
359+
self.add_content("image_url", image_url)
359360

360361
def to_markdown(self):
361362
if isinstance(self["content"], str):

0 commit comments

Comments
 (0)