Rasa::HTTP - Ruby gem for Rasa - RESTful server endpoints
The Rasa server provides endpoints to retrieve trackers of conversations as well as endpoints to modify them. Additionally, endpoints for training and testing models are provided.
This SDK is automatically generated by the OpenAPI Generator project:
- API version: 1.0.0
- Package version: 0.1
- Build package: org.openapitools.codegen.languages.RubyClientCodegen
To build the Ruby code into a gem:
gem build rasa-http-api.gemspec
Then either install the gem locally:
gem install ./rasa-http-api-0.1.gem
(for development, run gem install --dev ./rasa-http-api-0.1.gem
to install the development dependencies)
or publish the gem to a gem hosting service, e.g. RubyGems.
Finally add this to the Gemfile:
gem 'rasa-http-api', '~> 0.1'
If the Ruby gem is hosted at a git repository: https://github.com/GIT_USER_ID/GIT_REPO_ID, then add the following in the Gemfile:
gem 'rasa-http-api', :git => 'https://github.com/GIT_USER_ID/GIT_REPO_ID.git'
Include the Ruby code directly using -I
as follows:
ruby -Ilib script.rb
Please follow the installation procedure and then run the following code:
# Load the gem
require 'rasa-http-api'
# Setup authorization
Rasa::HTTP.configure do |config|
# Configure Bearer authorization (JWT): JWT
config.access_token = 'YOUR_BEARER_TOKEN'
# Configure API key authorization: TokenAuth
config.api_key['TokenAuth'] = 'YOUR API KEY'
# Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
# config.api_key_prefix['TokenAuth'] = 'Bearer'
# Configure host name, base path and scheme
config.host = 'localhost:5005'
config.base_path = '/'
config.scheme = 'http'
end
api_instance = Rasa::HTTP::DomainApi.new
begin
#Retrieve the loaded domain
result = api_instance.get_domain
p result
rescue Rasa::HTTP::ApiError => e
puts "Exception when calling DomainApi->get_domain: #{e}"
end
All URIs are relative to http://localhost:5005
Class | Method | HTTP request | Description |
---|---|---|---|
Rasa::HTTP::DomainApi | get_domain | GET /domain | Retrieve the loaded domain |
Rasa::HTTP::ModelApi | parse_model_message | POST /model/parse | Parse a message using the Rasa model |
Rasa::HTTP::ModelApi | predict_model_action | POST /model/predict | Predict an action on a temporary state |
Rasa::HTTP::ModelApi | replace_model | PUT /model | Replace the currently loaded model |
Rasa::HTTP::ModelApi | test_model_intent | POST /model/test/intents | Perform an intent evaluation |
Rasa::HTTP::ModelApi | test_model_stories | POST /model/test/stories | Evaluate stories |
Rasa::HTTP::ModelApi | train_model | POST /model/train | Train a Rasa model |
Rasa::HTTP::ModelApi | unload_model | DELETE /model | Unload the trained model |
Rasa::HTTP::ServerInformationApi | get_health | GET / | Health endpoint of Rasa Server |
Rasa::HTTP::ServerInformationApi | get_status | GET /status | Status of the Rasa server |
Rasa::HTTP::ServerInformationApi | get_version | GET /version | Version of Rasa |
Rasa::HTTP::TrackerApi | add_conversation_message | POST /conversations/{conversation_id}/messages | Add a message to a tracker |
Rasa::HTTP::TrackerApi | add_conversation_tracker_events | POST /conversations/{conversation_id}/tracker/events | Append events to a tracker |
Rasa::HTTP::TrackerApi | execute_conversation_action | POST /conversations/{conversation_id}/execute | Run an action in a conversation |
Rasa::HTTP::TrackerApi | get_conversation_story | GET /conversations/{conversation_id}/story | Retrieve an end-to-end story corresponding to a conversation |
Rasa::HTTP::TrackerApi | get_conversation_tracker | GET /conversations/{conversation_id}/tracker | Retrieve a conversations tracker |
Rasa::HTTP::TrackerApi | predict_conversation_action | POST /conversations/{conversation_id}/predict | Predict the next action |
Rasa::HTTP::TrackerApi | replace_conversation_tracker_events | PUT /conversations/{conversation_id}/tracker/events | Replace a trackers events |
Rasa::HTTP::TrackerApi | trigger_conversation_intent | POST /conversations/{conversation_id}/trigger_intent | Inject an intent into a conversation |
- Rasa::HTTP::ActionEvent
- Rasa::HTTP::ActionEventAllOf
- Rasa::HTTP::ActionExecutionRejectedEvent
- Rasa::HTTP::ActionExecutionRejectedEventAllOf
- Rasa::HTTP::ActionRequest
- Rasa::HTTP::ActiveLoopEvent
- Rasa::HTTP::ActiveLoopEventAllOf
- Rasa::HTTP::AddConversationTrackerEventsRequest
- Rasa::HTTP::AgentEvent
- Rasa::HTTP::AgentEventAllOf
- Rasa::HTTP::BasicEvent
- Rasa::HTTP::BotEvent
- Rasa::HTTP::BotEventAllOf
- Rasa::HTTP::BotMessage
- Rasa::HTTP::BotMessageAttachementInner
- Rasa::HTTP::BotMessageButtonsInner
- Rasa::HTTP::CancelReminderEvent
- Rasa::HTTP::CancelReminderEventAllOf
- Rasa::HTTP::CommonExample
- Rasa::HTTP::ConversationAccuracyReport
- Rasa::HTTP::Domain
- Rasa::HTTP::DomainConfig
- Rasa::HTTP::EndpointConfig
- Rasa::HTTP::EntitiesAddedEvent
- Rasa::HTTP::EntitiesAddedEventAllOf
- Rasa::HTTP::EntitiesAddedEventAllOfEntities
- Rasa::HTTP::Entity
- Rasa::HTTP::EntityTestError
- Rasa::HTTP::Error
- Rasa::HTTP::EvaluationItem
- Rasa::HTTP::EvaluationItemErrorsInner
- Rasa::HTTP::EvaluationItemPredictionsInner
- Rasa::HTTP::EvaluationStoriesResult
- Rasa::HTTP::EvaluationStoriesResultActionsInner
- Rasa::HTTP::EvaluationStoriesResultReport
- Rasa::HTTP::EvaluationStoriesResultReportValue
- Rasa::HTTP::Event
- Rasa::HTTP::ExecuteConversationAction200Response
- Rasa::HTTP::ExportEvent
- Rasa::HTTP::ExportEventAllOf
- Rasa::HTTP::FollowupEvent
- Rasa::HTTP::FollowupEventAllOf
- Rasa::HTTP::FormEvent
- Rasa::HTTP::FormEventAllOf
- Rasa::HTTP::FormValidationEvent
- Rasa::HTTP::FormValidationEventAllOf
- Rasa::HTTP::GetStatus200Response
- Rasa::HTTP::GetVersion200Response
- Rasa::HTTP::Intent
- Rasa::HTTP::IntentDescriptionValue
- Rasa::HTTP::IntentTestError
- Rasa::HTTP::IntentTriggerRequest
- Rasa::HTTP::LatestAction
- Rasa::HTTP::LoopInterruptedEvent
- Rasa::HTTP::LoopInterruptedEventAllOf
- Rasa::HTTP::Message
- Rasa::HTTP::ModelRequest
- Rasa::HTTP::NLUEvaluationResult
- Rasa::HTTP::ParseModelMessageRequest
- Rasa::HTTP::ParseResult
- Rasa::HTTP::PauseEvent
- Rasa::HTTP::PauseEventAllOf
- Rasa::HTTP::PredictResult
- Rasa::HTTP::PredictResultScoresInner
- Rasa::HTTP::RasaNLUData
- Rasa::HTTP::ReminderEvent
- Rasa::HTTP::ReminderEventAllOf
- Rasa::HTTP::ResetSlotsEvent
- Rasa::HTTP::ResetSlotsEventAllOf
- Rasa::HTTP::ResponseSelectorTestError
- Rasa::HTTP::RestartEvent
- Rasa::HTTP::RestartEventAllOf
- Rasa::HTTP::ResumeEvent
- Rasa::HTTP::ResumeEventAllOf
- Rasa::HTTP::RewindEvent
- Rasa::HTTP::RewindEventAllOf
- Rasa::HTTP::SessionStartedEvent
- Rasa::HTTP::SessionStartedEventAllOf
- Rasa::HTTP::SlotDescription
- Rasa::HTTP::SlotEvent
- Rasa::HTTP::SlotEventAllOf
- Rasa::HTTP::SlotValue
- Rasa::HTTP::TemplateDescription
- Rasa::HTTP::Tracker
- Rasa::HTTP::TrackerActiveLoop
- Rasa::HTTP::UndoEvent
- Rasa::HTTP::UndoEventAllOf
- Rasa::HTTP::UserEvent
- Rasa::HTTP::UserEventAllOf
- Rasa::HTTP::UserFeaturizationEvent
- Rasa::HTTP::UserFeaturizationEventAllOf
- Rasa::HTTP::YAMLTrainingRequest
- Rasa::HTTP::YAMLTrainingRequestSessionConfig
- Type: Bearer authentication (JWT)
- Type: API key
- API key parameter name: token
- Location: URL query string