From 864bd5a35a31ad214483c40f74eb5a05cb7a349e Mon Sep 17 00:00:00 2001 From: "pre-commit-ci[bot]" <66853113+pre-commit-ci[bot]@users.noreply.github.com> Date: Tue, 24 Oct 2023 22:49:45 +0000 Subject: [PATCH] [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci --- packages/jupyter-ai/jupyter_ai/chat_handlers/base.py | 4 +++- packages/jupyter-ai/jupyter_ai/chat_handlers/custom.py | 4 ++++ 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/packages/jupyter-ai/jupyter_ai/chat_handlers/base.py b/packages/jupyter-ai/jupyter_ai/chat_handlers/base.py index ba0314c08..017f342fd 100644 --- a/packages/jupyter-ai/jupyter_ai/chat_handlers/base.py +++ b/packages/jupyter-ai/jupyter_ai/chat_handlers/base.py @@ -33,7 +33,9 @@ class BaseChatHandler(Configurable): Not necessary when the routing method is "slash_command".""" # TODO: make NotImplemented - help: ClassVar[str] = "This is used when the message in the chat interface is not a command" + help: ClassVar[ + str + ] = "This is used when the message in the chat interface is not a command" """What this chat handler does, which third-party models it contacts, the format of the data it returns to the user, etc. Used in the UI.""" diff --git a/packages/jupyter-ai/jupyter_ai/chat_handlers/custom.py b/packages/jupyter-ai/jupyter_ai/chat_handlers/custom.py index 2f419721a..d69b29413 100644 --- a/packages/jupyter-ai/jupyter_ai/chat_handlers/custom.py +++ b/packages/jupyter-ai/jupyter_ai/chat_handlers/custom.py @@ -8,6 +8,7 @@ CUSTOM_MESSAGE = "This handler displays a custom message in response to any prompt." + def CustomMessage(): return AgentChatMessage( id=uuid4().hex, @@ -16,9 +17,12 @@ def CustomMessage(): reply_to="", ) + """ This is a sample custom chat handler class to demonstrate entry points. """ + + class CustomChatHandler(BaseChatHandler): id = "custom" name = "Custom"