Skip to content

Commit 99b221e

Browse files
committed
fix: send task output message as string
The message argument should now be passed as a string instead of a dict, which caused: `AttributeError: 'dict' object has no attribute 'encode'` Signed-off-by: Edward Ly <[email protected]>
1 parent 9f7d7d2 commit 99b221e

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/main.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@ def message_handler(
6868
if status == "STATUS_FAILED":
6969
AI_BOT.send_message("ERROR: Failed to generate message, please try again later", reply_to, token=token)
7070
if status == "STATUS_SUCCESSFUL":
71-
AI_BOT.send_message(task["output"], reply_to, token=token)
71+
AI_BOT.send_message(task["output"]["output"], reply_to, token=token)
7272

7373
return responses.Response()
7474

0 commit comments

Comments
 (0)