Documentation

MessageService
in package

Table of Contents

Properties

$memoryManager  : MemoryManager
$visionService  : VisionService

Methods

__construct()  : mixed
storeInbound()  : AiAssistantMessage
Store an inbound message
storeOutbound()  : AiAssistantMessage
Store an outbound message
generateEmbedding()  : array<string|int, mixed>
Generate embedding vector for text
indexFile()  : void
Generate embedding for file and store in memory
indexMessage()  : void
Generate embedding for message and store in memory
processFile()  : AiAssistantFile
Process and store a file attachment

Properties

Methods

storeInbound()

Store an inbound message

public storeInbound(int $userId, string $body[, array<string|int, mixed> $rawPayload = [] ][, array<string|int, mixed>|null $files = [] ]) : AiAssistantMessage
Parameters
$userId : int
$body : string
$rawPayload : array<string|int, mixed> = []
$files : array<string|int, mixed>|null = []
Return values
AiAssistantMessage

storeOutbound()

Store an outbound message

public storeOutbound(int $userId, string $body[, array<string|int, mixed> $rawPayload = [] ]) : AiAssistantMessage
Parameters
$userId : int
$body : string
$rawPayload : array<string|int, mixed> = []
Return values
AiAssistantMessage

generateEmbedding()

Generate embedding vector for text

protected generateEmbedding(string $text) : array<string|int, mixed>
Parameters
$text : string
Return values
array<string|int, mixed>

processFile()

Process and store a file attachment

protected processFile(int $userId, int $messageId, array<string|int, mixed> $fileData) : AiAssistantFile
Parameters
$userId : int
$messageId : int
$fileData : array<string|int, mixed>
Return values
AiAssistantFile

        
On this page

Search results