Documentation

AgentService
in package

Table of Contents

Properties

$agent  : UserAssistantAgent|null
$currentUser  : mixed
$memoryManager  : MemoryManager
$messageService  : MessageService
$rruleService  : RruleService
$smsService  : SmsService

Methods

__construct()  : mixed
processMessage()  : string
Process a user message and return agent response
setUser()  : void
Set current user for tool context Tools will be registered via registerTools() method when getTools() is called
buildPrompt()  : string
Build full prompt with user context
getConversationContext()  : array<string|int, mixed>
Get recent conversation context

Properties

Methods

processMessage()

Process a user message and return agent response

public processMessage(mixed $user, string $message[, array<string|int, mixed> $files = [] ]) : string
Parameters
$user : mixed
$message : string
$files : array<string|int, mixed> = []
Return values
string

setUser()

Set current user for tool context Tools will be registered via registerTools() method when getTools() is called

public setUser(mixed $user) : void
Parameters
$user : mixed

buildPrompt()

Build full prompt with user context

protected buildPrompt(mixed $user, string $message, array<string|int, mixed> $context[, array<string|int, mixed> $files = [] ]) : string
Parameters
$user : mixed
$message : string
$context : array<string|int, mixed>
$files : array<string|int, mixed> = []
Return values
string

getConversationContext()

Get recent conversation context

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

        
On this page

Search results