
Security News
Deno 2.2 Improves Dependency Management and Expands Node.js Compatibility
Deno 2.2 enhances Node.js compatibility, improves dependency management, adds OpenTelemetry support, and expands linting and task automation for developers.
A DSL for defining conversations and workflows in Ruby. The conversations follow those workflows based on incoming messages and their intents.
This currently supports only Slack.
A conversation can be defined inline or within a ConversationRouter
.
A conversation wraps the message and is comprised of several handlers. Each ConversationHandler
defines the intent as well as a callback that get's called when that intent is reached.
Dialogue::ConversationTemplate.build(:order_shirt) do |conversation|
conversation.ask("What size do you wear?") do |response, conversation|
conversation.reply("Gotcha. Size #{response}. Noted.")
conversation.ask("What color would you like?") do |response, conversation|
conversation.reply("Great. I have you down for a #{response}.")
conversation.end("Thank you for your order.")
end
end
end.register
You can reply
to the conversation or ask
the participant a question.
You can move onto a different conversation thread with a diverge
followed by the name of the conversation.
conversation.diverge :end_order
You start
a conversation which will store a user
, a channel
, and the conversation id. This is the placeholder for the conversation.
You can end
a conversation which will clear the conversation from the storage mechanism.
A conversation can timeout
.
A message
comes in from somewhere and you can handle that message in a conversation. A message
has a user_id
and a channel_id
along with some text. If the message matches one of the stored conversations (meaning the user id and channel id match), then the conversation is continued where it left off. If the conversation is not found, then a new conversation is started.
Dialogue.find_template(:select_size).start message
Dialogue.handle(message) # Will find a template based on intent of the message
This will register the conversation for the user and channel with the factory and activate the conversation.
Dialogue
that allows you to specify templates with a name, a list of intents, and a templateConversationHandler
that handles a message based on an intentConversationRouter
lib/dialogue/version.rb
bundle exec rake release
Copyright (c) 2016, Tatsu, Inc..
This project is licensed under the MIT License.
FAQs
Unknown package
We found that dialogue demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Deno 2.2 enhances Node.js compatibility, improves dependency management, adds OpenTelemetry support, and expands linting and task automation for developers.
Security News
React's CRA deprecation announcement sparked community criticism over framework recommendations, leading to quick updates acknowledging build tools like Vite as valid alternatives.
Security News
Ransomware payment rates hit an all-time low in 2024 as law enforcement crackdowns, stronger defenses, and shifting policies make attacks riskier and less profitable.