-
public interface ConversationClientMain entry point for ElevenLabs Conversational AI SDK
This interface provides the primary API for starting and managing conversations with ElevenLabs AI agents. It supports both public and private agents, text-only and voice conversations.
Usage:
val session = ConversationClient.startSession( ConversationConfig(agentId = "your-agent-id") )
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description public classConversationClient.Companion
-
Method Summary
Modifier and Type Method Description abstract ConversationSessionstartSession(ConversationConfig config)Start a new conversation session with the specified configuration abstract UnitendSession()End the current conversation session abstract UnitsendMessage(String message)Send a text message in the conversation abstract UnitsendFeedback(Boolean isPositive)Send feedback for the last agent response -
-
Method Detail
-
startSession
abstract ConversationSession startSession(ConversationConfig config)
Start a new conversation session with the specified configuration
- Parameters:
config- Configuration parameters for the conversation
-
endSession
abstract Unit endSession()
End the current conversation session
-
sendMessage
abstract Unit sendMessage(String message)
Send a text message in the conversation
- Parameters:
message- The message content to send
-
sendFeedback
abstract Unit sendFeedback(Boolean isPositive)
Send feedback for the last agent response
- Parameters:
isPositive- true for positive feedback, false for negative
-
-
-
-