Skip to content

Commit 2b3ff55

Browse files
authored
fix: alora version and image printing in messages (#130)
1 parent 629cd9b commit 2b3ff55

File tree

3 files changed

+10
-7
lines changed

3 files changed

+10
-7
lines changed

mellea/stdlib/chat.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,10 @@ def format_for_llm(self) -> TemplateRepresentation:
6464

6565
def __str__(self):
6666
"""Pretty representation of messages, because they are a special case."""
67-
return f'mellea.Message(role="{self.role}", content="{self.content}", images="{[f"{i[:20]}..." for i in self.images]}")'
67+
images = []
68+
if self.images is not None:
69+
images = [f"{i[:20]}..." for i in self.images]
70+
return f'mellea.Message(role="{self.role}", content="{self.content}", images="{images}")'
6871

6972

7073
class ToolMessage(Message):

pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ m = "cli.m:cli"
5454

5555
hf = [
5656
"accelerate>=1.9.0",
57-
"alora>=0.2.0",
57+
"alora==0.2.0",
5858
"datasets>=4.0.0",
5959
"outlines<1.0.0",
6060
"peft>=0.16.0",

uv.lock

Lines changed: 5 additions & 5 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)