LlmServiceInterface
Interface for LLM (Large Language Model) services. Plugins can provide this interface to enable AI capabilities. Other plugins can require this interface to consume AI services.
LlmServiceInterface::generateResponse()
abstract public function generateResponse(string $prompt, array $tools = [], array $messages = [], int $maxTokens = 4096): arrayGenerate a response from the LLM.
Parameters
| Name | Type | Description |
|---|---|---|
| $prompt | string | The user prompt |
| $tools | list<array<string, mixed>> | Available tools in MCP format |
| $messages | list<array<string, mixed>> | Conversation history |
| $maxTokens | int |
Returns
The LLM response (OpenAI-compatible format)