createAiAssistant

fun createAiAssistant(context: Context, documentsDescriptors: List<DocumentDescriptor>, ipAddress: String, sessionId: String, jwtToken: (List<String>) -> String): AiAssistant

Factory method to create an instance of the AiAssistant.

Return

An instance of the AiAssistant class.

Parameters

context

Context The context of the application.

documentsDescriptors

List of Documents' DocumentDescriptor that we want AI Assistant to analyse and interact with.

ipAddress

IP address of a server where your instance of the Nutrient AI Assistant can be reached.

sessionId

A unique identifier for the chat session, which can be used to recall a session in the future.

jwtToken

JSON Web Token used for authentication with your instance of the Nutrient AI Assistant server. It returns list of Document identifiers that can be used for token creation.