Orchestrator
in package
Table of Contents
Properties
- $flow : BaseFlow
- $llm : AIModelInterface
- $toolsRegistry : array<string|int, mixed>
Methods
- __construct() : mixed
- registerTool() : void
- Register a tool handler
- runFlow() : array<string|int, mixed>
- Run a flow
- filterTechMessages() : array<string|int, mixed>
Properties
$flow
protected
BaseFlow
$flow
$llm
protected
AIModelInterface
$llm
$toolsRegistry
protected
array<string|int, mixed>
$toolsRegistry
= []
Methods
__construct()
public
__construct(AIModelInterface $llm, BaseFlow $flow) : mixed
Parameters
- $llm : AIModelInterface
- $flow : BaseFlow
registerTool()
Register a tool handler
public
registerTool(string $name, callable $handler) : void
Parameters
- $name : string
- $handler : callable
runFlow()
Run a flow
public
runFlow(string $userPrompt[, array<string|int, mixed> &$history = [] ]) : array<string|int, mixed>
Parameters
- $userPrompt : string
- $history : array<string|int, mixed> = []
Return values
array<string|int, mixed>filterTechMessages()
protected
filterTechMessages(array<string|int, mixed> $messages) : array<string|int, mixed>
Parameters
- $messages : array<string|int, mixed>