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"