BotsAPI

class BotsAPI

Accesses the Bots API by sending user input and parsing the response.

ParameterTypeDescription
applicationApplication?Android application instance for context
networkNetworkNetwork interface for API communication
loggerLogger?Logging interface implementation
instrumentationHandlerAgentforceInstrumentationHandler?Analytics and performance monitoring
PropertyTypeDescription
BOT_IDStringBot identifier constant
SESSION_IDStringSession identifier constant

Retrieve the Bot id

Get recommended utterances

Log O11Y_FETCH_AGENTS_MARKER perf o11y.

Sends additional context to the Bots API

Parameters:

ParameterTypeDescription
botIdStringID of the bot to request a response from
sessionIdString?ID of the session that is being referenced by the input
inputRepresentationConversationInputRepresentationConversationInputRepresentation payload

Contains constants for BOT_ID and SESSION_ID.