Create a training through the API
# make sure that you set your EveryAI Api Key
Everyai.api_key = "secret_api_key"
# Create a new chatbot
chatbot_options = {
name: "My chatbot", # The name of the chatbot
avatar: "", # Link to image url for chatbot avatar (optional)
business_url: "", # Link to business website (optional)
business_bio: "", # Additional details about business (optional)
}
chatbot = Everyai::Chatbot.create(chatbot_options)
puts chatbot.id # Chatbot API ID
puts chatbot.iframe_code_popup # Iframe chatbot embed code
# Find an existing chatbot
chatbot = Everyai::Chatbot.find(CHATBOT_API_ID)
# Perform additional training
chatbot.train("http://example.com")
chatbot.train("Any text added here will train the model")
# Test the chatbot
chatbot.chat("Hey whats going on")