Skip to content
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

Update custom-connectors.mdx #13060

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions docs/docs/connectors/custom-connectors.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@ from rasa.core.channels.channel import (
)

class MyIO(InputChannel):
def name() -> Text:
def name(self) -> Text:
"""Name of your custom channel."""
return "myio"

Expand All @@ -119,7 +119,7 @@ class MyIO(InputChannel):
@custom_webhook.route("/webhook", methods=["POST"])
async def receive(request: Request) -> HTTPResponse:
sender_id = request.json.get("sender") # method to get sender_id
text = request.json.get("text") # method to fetch text
text = request.json.get("message") # method to fetch text | changig field to 'message' to be the same as in the request to /rest endpoint
input_channel = self.name() # method to fetch input channel
metadata = self.get_metadata(request) # method to get metadata

Expand Down