UnrealVoxta 0.1.1
 
Loading...
Searching...
No Matches
VoxtaApiRequestHandler Class Reference

VoxtaApiRequestHandler Internal helper class to serialize request data which then can be sent to VoxtaServer via SignalR. More...

#include <VoxtaApiRequestHandler.h>

Static Public Member Functions

static FSignalRValue GetAuthenticateRequestData ()
 Retrieve a SignalR formatted message to authenticate the client with the server.
 
static FSignalRValue GetLoadCharactersListData ()
 Retrieve a SignalR formatted message to request the list of all characters available.
 
static FSignalRValue GetLoadScenariosListData ()
 Retrieve a SignalR formatted message to request the list of all scenarios.
 
static FSignalRValue GetLoadChatsListData (const FGuid &characterId, const FGuid &scenarioId=FGuid())
 Retrieve a SignalR formatted message to request the list of all chats for a character/scenario.
 
static FSignalRValue GetStartChatRequestData (const FAiCharData *charData, const FString &context=FString())
 Retrieve a SignalR formatted message to request a new chat session to be started with a specific character.
 
static FSignalRValue GetStopChatRequestData ()
 Retrieve a SignalR formatted message to request stopping the current chat session.
 
static FSignalRValue GetSendUserMessageData (const FGuid &sessionId, const FString &userInputText, bool generateReply, bool characterActionInference)
 Retrieve a SignalR formatted message to request the registration of a user-message to the chat.
 
static FSignalRValue GetNotifyAudioPlaybackStartedData (const FGuid &sessionId, const FGuid &messageId, int startIndex, int endIndex, double duration)
 Retrieve a SignalR formatted message to notify the server that audio playback has started.
 
static FSignalRValue GetNotifyAudioPlaybackCompletedData (const FGuid &sessionId, const FGuid &messageId)
 Retrieve a SignalR formatted message to inform the VoxtaServer that the playback is completed on the client.
 
static FSignalRValue GetUpdateContextRequestData (const FGuid &sessionId, const FString &context)
 Retrieve a SignalR formatted message to update the context of the current chat session.
 
static FSignalRValue GetRequestCharacterSpeechRequestData (const FGuid &sessionId, const FString &text)
 Retrieve a SignalR formatted message to request character speech for a session.
 
static FSignalRValue GetRevertLastSentMessageRequestData (const FGuid &sessionId)
 Retrieve a SignalR formatted message to revert the last sent message in a session.
 
static FSignalRValue GetDeleteChatRequestData (const FGuid &chatId)
 Retrieve a SignalR formatted message to delete a chat by its ID.
 
static FSignalRValue GetSetFlagsRequestData (const FGuid &sessionId, const TArray< FString > &flags)
 Retrieve a SignalR formatted message to set flags for a session.
 
static FSignalRValue GetInspectorRequestData (const FGuid &sessionId, bool enableInspector=true)
 Retrieve a SignalR formatted message to (de)activate the inspector (triggering more / less data in responses)
 

Detailed Description

VoxtaApiRequestHandler Internal helper class to serialize request data which then can be sent to VoxtaServer via SignalR.

Note: All methods and fields must be const (immutable), as this class should remain stateless.

Member Function Documentation

◆ GetAuthenticateRequestData()

FSignalRValue VoxtaApiRequestHandler::GetAuthenticateRequestData ( )
static

Retrieve a SignalR formatted message to authenticate the client with the server.

Returns
The SignalR formatted message containing the request.

◆ GetDeleteChatRequestData()

FSignalRValue VoxtaApiRequestHandler::GetDeleteChatRequestData ( const FGuid & chatId)
static

Retrieve a SignalR formatted message to delete a chat by its ID.

◆ GetInspectorRequestData()

FSignalRValue VoxtaApiRequestHandler::GetInspectorRequestData ( const FGuid & sessionId,
bool enableInspector = true )
static

Retrieve a SignalR formatted message to (de)activate the inspector (triggering more / less data in responses)

◆ GetLoadCharactersListData()

FSignalRValue VoxtaApiRequestHandler::GetLoadCharactersListData ( )
static

Retrieve a SignalR formatted message to request the list of all characters available.

Returns
The SignalR formatted message containing the request.

◆ GetLoadChatsListData()

FSignalRValue VoxtaApiRequestHandler::GetLoadChatsListData ( const FGuid & characterId,
const FGuid & scenarioId = FGuid() )
static

Retrieve a SignalR formatted message to request the list of all chats for a character/scenario.

◆ GetLoadScenariosListData()

FSignalRValue VoxtaApiRequestHandler::GetLoadScenariosListData ( )
static

Retrieve a SignalR formatted message to request the list of all scenarios.

◆ GetNotifyAudioPlaybackCompletedData()

FSignalRValue VoxtaApiRequestHandler::GetNotifyAudioPlaybackCompletedData ( const FGuid & sessionId,
const FGuid & messageId )
static

Retrieve a SignalR formatted message to inform the VoxtaServer that the playback is completed on the client.

Meaning it can being listening to the audioSocket for speech.

Parameters
sessionIdThe ChatSession::CHAT_ID of the currently active chat.
messageIdThe FChatMessage.GetMessageId of the message that is done with the playback.
Returns
The SignalR formatted message containing the request.

◆ GetNotifyAudioPlaybackStartedData()

FSignalRValue VoxtaApiRequestHandler::GetNotifyAudioPlaybackStartedData ( const FGuid & sessionId,
const FGuid & messageId,
int startIndex,
int endIndex,
double duration )
static

Retrieve a SignalR formatted message to notify the server that audio playback has started.

◆ GetRequestCharacterSpeechRequestData()

FSignalRValue VoxtaApiRequestHandler::GetRequestCharacterSpeechRequestData ( const FGuid & sessionId,
const FString & text )
static

Retrieve a SignalR formatted message to request character speech for a session.

◆ GetRevertLastSentMessageRequestData()

FSignalRValue VoxtaApiRequestHandler::GetRevertLastSentMessageRequestData ( const FGuid & sessionId)
static

Retrieve a SignalR formatted message to revert the last sent message in a session.

◆ GetSendUserMessageData()

FSignalRValue VoxtaApiRequestHandler::GetSendUserMessageData ( const FGuid & sessionId,
const FString & userInputText,
bool generateReply,
bool characterActionInference )
static

Retrieve a SignalR formatted message to request the registration of a user-message to the chat.

Note: By default, the addition of a user message will trigger an auto-reply from the AI character.

Parameters
sessionIdThe ChatSession::CHAT_ID of the currently active chat.
userInputTextThe text that the server should consider as what the user said.
generateReplyShould VoxtaServer generate a reply from the AI character(s) after receiving this message.
characterActionInferenceTODO
Returns
The SignalR formatted message containing the request.

◆ GetSetFlagsRequestData()

FSignalRValue VoxtaApiRequestHandler::GetSetFlagsRequestData ( const FGuid & sessionId,
const TArray< FString > & flags )
static

Retrieve a SignalR formatted message to set flags for a session.

◆ GetStartChatRequestData()

FSignalRValue VoxtaApiRequestHandler::GetStartChatRequestData ( const FAiCharData * charData,
const FString & context = FString() )
static

Retrieve a SignalR formatted message to request a new chat session to be started with a specific character.

Parameters
charDataThe full metadata of the character that you want to start a chat with.
contextContext that will be used for the chat (json value, I think?) TODO
Returns
The SignalR formatted message containing the request.

◆ GetStopChatRequestData()

FSignalRValue VoxtaApiRequestHandler::GetStopChatRequestData ( )
static

Retrieve a SignalR formatted message to request stopping the current chat session.

◆ GetUpdateContextRequestData()

FSignalRValue VoxtaApiRequestHandler::GetUpdateContextRequestData ( const FGuid & sessionId,
const FString & context )
static

Retrieve a SignalR formatted message to update the context of the current chat session.


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