Skip to content
Open
Show file tree
Hide file tree
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
2 changes: 1 addition & 1 deletion backend/chainlit/message.py
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ def __post_init__(self) -> None:
self.id = str(uuid.uuid4())

@classmethod
def from_dict(self, _dict: StepDict):
def from_dict(cls, _dict: StepDict):
type = _dict.get("type", "assistant_message")
return Message(
id=_dict["id"],
Expand Down
4 changes: 2 additions & 2 deletions backend/chainlit/step.py
Original file line number Diff line number Diff line change
Expand Up @@ -123,7 +123,7 @@ async def async_wrapper(*args, **kwargs):
logger.exception(e)
result = await func(*args, **kwargs)
try:
if result and not step.output:
if result is not None and not step.output:
step.output = result
except Exception as e:
step.is_error = True
Expand Down Expand Up @@ -154,7 +154,7 @@ def sync_wrapper(*args, **kwargs):
logger.exception(e)
result = func(*args, **kwargs)
try:
if result and not step.output:
if result is not None and not step.output:
step.output = result
except Exception as e:
step.is_error = True
Expand Down