Skip to content

Commit

Permalink
rename action to action_callback for clarity
Browse files Browse the repository at this point in the history
  • Loading branch information
willydouhard committed May 22, 2023
1 parent 610e172 commit de27945
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions cypress/e2e/action/main.py
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
import chainlit as cl


@cl.action("test action")
@cl.action_callback("test action")
def on_action():
cl.send_message("Executed test action!")


@cl.action("removable action")
@cl.action_callback("removable action")
def on_action(action: cl.Action):
cl.send_message("Executed removable action!")
action.remove()
Expand Down
2 changes: 1 addition & 1 deletion src/chainlit/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -354,7 +354,7 @@ def on_stop(func: Callable) -> Callable:
return func


def action(name: str) -> Callable:
def action_callback(name: str) -> Callable:
"""
Callback to call when an action is clicked in the UI.
Expand Down

0 comments on commit de27945

Please sign in to comment.