YARP
Yet Another Robot Platform
 
Loading...
Searching...
No Matches
GoogleDialogFlowCxChatBot Class Reference

googleDialogFlowCxChatBot: A yarp device to enable interaction with Google's DialogFlow CX service More...

#include </home/runner/work/yarp-documentation/yarp-documentation/yarp/opt-modules/yarp-devices-google-cloud/src/devices/googleDialogflowCxChatBot/GoogleDialogFlowCxChatBot.h>

+ Inheritance diagram for GoogleDialogFlowCxChatBot:

Public Member Functions

 GoogleDialogFlowCxChatBot ()=default
 
 GoogleDialogFlowCxChatBot (const GoogleDialogFlowCxChatBot &)=delete
 
 GoogleDialogFlowCxChatBot (GoogleDialogFlowCxChatBot &&) noexcept=delete
 
GoogleDialogFlowCxChatBotoperator= (const GoogleDialogFlowCxChatBot &)=delete
 
GoogleDialogFlowCxChatBotoperator= (GoogleDialogFlowCxChatBot &&) noexcept=delete
 
 ~GoogleDialogFlowCxChatBot () override=default
 
bool open (yarp::os::Searchable &config) override
 Open the DeviceDriver.
 
bool close () override
 Close the DeviceDriver.
 
yarp::dev::ReturnValue interact (const std::string &messageIn, std::string &messageOut) override
 Sends a message to the chatbot.
 
yarp::dev::ReturnValue setLanguage (const std::string &language) override
 Sets the chat bot language.
 
yarp::dev::ReturnValue getLanguage (std::string &language) override
 Gets the current chatbot language.
 
yarp::dev::ReturnValue getStatus (std::string &status) override
 Gets the current status of the bot.
 
yarp::dev::ReturnValue resetBot () override
 Resets the chatbot.
 
- Public Member Functions inherited from yarp::dev::DeviceDriver
 DeviceDriver ()
 
 DeviceDriver (const DeviceDriver &other)=delete
 
 DeviceDriver (DeviceDriver &&other) noexcept=delete
 
DeviceDriveroperator= (const DeviceDriver &other)=delete
 
DeviceDriveroperator= (DeviceDriver &&other) noexcept=delete
 
virtual ~DeviceDriver ()
 
virtual std::string id () const
 Return the id assigned to the PolyDriver.
 
virtual void setId (const std::string &id)
 Set the id for this device.
 
template<class T >
bool view (T *&x)
 Get an interface to the device driver.
 
virtual DeviceDrivergetImplementation ()
 Some drivers are bureaucrats, pointing at others.
 
- Public Member Functions inherited from GoogleDialogFlowCxChatBot_ParamsParser
 GoogleDialogFlowCxChatBot_ParamsParser ()
 
 ~GoogleDialogFlowCxChatBot_ParamsParser () override=default
 
bool parseParams (const yarp::os::Searchable &config) override
 Parse the DeviceDriver parameters.
 
std::string getDeviceClassName () const override
 Get the name of the DeviceDriver class.
 
std::string getDeviceName () const override
 Get the name of the device (i.e.
 
std::string getDocumentationOfDeviceParams () const override
 Get the documentation of the DeviceDriver's parameters.
 
std::vector< std::string > getListOfParams () const override
 Return a list of all params used by the device.
 
- Public Member Functions inherited from yarp::dev::IDeviceDriverParams
virtual ~IDeviceDriverParams ()
 
- Public Member Functions inherited from yarp::dev::IChatBot
virtual ~IChatBot ()
 Destructor.
 

Additional Inherited Members

- Public Attributes inherited from GoogleDialogFlowCxChatBot_ParamsParser
const std::string m_device_classname = {"GoogleDialogFlowCxChatBot"}
 
const std::string m_device_name = {"googleDialogFlowCxChatBot"}
 
bool m_parser_is_strict = false
 
const parser_version_type m_parser_version = {}
 
const std::string m_project_defaultValue = {""}
 
const std::string m_location_defaultValue = {""}
 
const std::string m_agent_name_defaultValue = {""}
 
const std::string m_language_code_defaultValue = {"en-US"}
 
std::string m_project = {}
 
std::string m_location = {}
 
std::string m_agent_name = {}
 
std::string m_language_code = {"en-US"}
 

Detailed Description

googleDialogFlowCxChatBot: A yarp device to enable interaction with Google's DialogFlow CX service

googleDialogFlowCxChatBot

Parameters required by this device are described in class GoogleDialogFlowCxChatBot_ParamsParser

Definition at line 34 of file GoogleDialogFlowCxChatBot.h.

Constructor & Destructor Documentation

◆ GoogleDialogFlowCxChatBot() [1/3]

GoogleDialogFlowCxChatBot::GoogleDialogFlowCxChatBot ( )
default

◆ GoogleDialogFlowCxChatBot() [2/3]

GoogleDialogFlowCxChatBot::GoogleDialogFlowCxChatBot ( const GoogleDialogFlowCxChatBot )
delete

◆ GoogleDialogFlowCxChatBot() [3/3]

GoogleDialogFlowCxChatBot::GoogleDialogFlowCxChatBot ( GoogleDialogFlowCxChatBot &&  )
deletenoexcept

◆ ~GoogleDialogFlowCxChatBot()

GoogleDialogFlowCxChatBot::~GoogleDialogFlowCxChatBot ( )
overridedefault

Member Function Documentation

◆ close()

bool GoogleDialogFlowCxChatBot::close ( )
overridevirtual

Close the DeviceDriver.

Returns
true/false on success/failure.

Reimplemented from yarp::dev::DeviceDriver.

Definition at line 97 of file GoogleDialogFlowCxChatBot.cpp.

◆ getLanguage()

yarp::dev::ReturnValue GoogleDialogFlowCxChatBot::getLanguage ( std::string &  language)
overridevirtual

Gets the current chatbot language.

Parameters
languagethe returned string (code) representing the speech language (e.g. ita, eng...). Default value is "auto".
Returns
true on success

Implements yarp::dev::IChatBot.

Definition at line 155 of file GoogleDialogFlowCxChatBot.cpp.

◆ getStatus()

yarp::dev::ReturnValue GoogleDialogFlowCxChatBot::getStatus ( std::string &  status)
overridevirtual

Gets the current status of the bot.

Parameters
statusthe current bot status
Returns
true on success

Implements yarp::dev::IChatBot.

Definition at line 161 of file GoogleDialogFlowCxChatBot.cpp.

◆ interact()

yarp::dev::ReturnValue GoogleDialogFlowCxChatBot::interact ( const std::string &  messageIn,
std::string &  messageOut 
)
overridevirtual

Sends a message to the chatbot.

Parameters
messageInthe text of the input message
messageOutthe output message
Returns
true/false

Implements yarp::dev::IChatBot.

Definition at line 102 of file GoogleDialogFlowCxChatBot.cpp.

◆ open()

bool GoogleDialogFlowCxChatBot::open ( yarp::os::Searchable config)
overridevirtual

Open the DeviceDriver.

Parameters
configis a list of parameters for the device. Which parameters are effective for your device can vary. See device invocation examples. If there is no example for your device, you can run the "yarpdev" program with the verbose flag set to probe what parameters the device is checking. If that fails too, you'll need to read the source code (please nag one of the yarp developers to add documentation for your device).
Returns
true/false upon success/failure

Reimplemented from yarp::dev::DeviceDriver.

Definition at line 40 of file GoogleDialogFlowCxChatBot.cpp.

◆ operator=() [1/2]

GoogleDialogFlowCxChatBot & GoogleDialogFlowCxChatBot::operator= ( const GoogleDialogFlowCxChatBot )
delete

◆ operator=() [2/2]

GoogleDialogFlowCxChatBot & GoogleDialogFlowCxChatBot::operator= ( GoogleDialogFlowCxChatBot &&  )
deletenoexcept

◆ resetBot()

yarp::dev::ReturnValue GoogleDialogFlowCxChatBot::resetBot ( )
overridevirtual

Resets the chatbot.

Returns
true on success

Implements yarp::dev::IChatBot.

Definition at line 168 of file GoogleDialogFlowCxChatBot.cpp.

◆ setLanguage()

yarp::dev::ReturnValue GoogleDialogFlowCxChatBot::setLanguage ( const std::string &  language)
overridevirtual

Sets the chat bot language.

Parameters
languagea string (code) representing the speech language (e.g. ita, eng...). Default value is "auto".
Returns
true on success

Implements yarp::dev::IChatBot.

Definition at line 149 of file GoogleDialogFlowCxChatBot.cpp.


The documentation for this class was generated from the following files: