-
Notifications
You must be signed in to change notification settings - Fork 15
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Folding code execution effect message block #28
Conversation
EntropyYue
commented
Oct 7, 2024
src/openwebui/tools/run_code.py
Outdated
|
||
await emitter.message( | ||
f"\n<details>\n<summary>Code Execution</summary>\nI executed the following {language} code:\n```{language}\n{code}\n```\n```Output\n{output}\n```\n</details>\n" | ||
) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think this message should only be emitted if the code execution was successful. As currently written, the message is emitted in all cases, including the error cases. Please either move this to the success-case branch (line 254), or leave this here but check if status == "OK"
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Okay, I have completed the revision, but it seems better to return this content at any time, or should we use another collapsible message block to display the error?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The error is already displayed in the "status" part of the chat message, not sure there's any value in adding it as a real part of the message.
Please re-run |
completed |
Thanks! |