5#include "CoreMinimal.h"
6#include "ChatMessage.generated.h"
14USTRUCT(BlueprintType, Category =
"Voxta")
19#pragma region public API
51 const TArray<FString>&
GetAudioUrls()
const {
return m_audioUrls; }
74 m_text.Append(textContent);
75 if (!audioUrl.IsEmpty())
77 m_audioUrls.Emplace(audioUrl);
98 m_messageId(messageId),
108 UPROPERTY(BlueprintReadOnly, Category =
"Voxta", meta = (AllowPrivateAccess =
"true", DisplayName =
"Message Text (so far)"))
112 UPROPERTY(BlueprintReadOnly, Category =
"Voxta", meta = (AllowPrivateAccess =
"true", DisplayName =
"Message ID"))
116 UPROPERTY(BlueprintReadOnly, Category =
"Voxta", meta = (AllowPrivateAccess =
"true", DisplayName =
"Character ID"))
120 bool m_isComplete = false;
123 TArray<FString> m_audioUrls;
const TArray< FString > & GetAudioUrls() const
Get the list of audio URLs for this message's synthesized speech.
Definition ChatMessage.h:51
bool GetIsComplete() const
Check if this message is complete with no further chunks expected.
Definition ChatMessage.h:59
const FGuid & GetCharId() const
Get the ID of the character who sent this message.
Definition ChatMessage.h:35
bool TryAppendMoreContent(const FString &textContent, const FString &audioUrl)
Add more data to this message, as VoxtaServer notifies us of the complete data in chunks.
Definition ChatMessage.h:67
FChatMessage()=default
Default constructor.
FChatMessage(FGuid messageId, FGuid charId)
Create an instance of the chat message for the User data.
Definition ChatMessage.h:97
FStringView GetTextContent() const
Get the current text content of the message.
Definition ChatMessage.h:43
void MarkComplete()
Mark this message as complete, indicating no further chunks are expected.
Definition ChatMessage.h:85
const FGuid & GetMessageId() const
Get the unique identifier assigned to this message.
Definition ChatMessage.h:27