Provider interface
-
interface
ProviderInterface -
- Fully qualified name
-
\Netresearch\Nr Llm\ Provider\ Contract\ Provider Interface
Contract for LLM providers.
configure(array $config): void-
Configure the provider with its Vault credential identifier and settings.
- param array $config
-
Configuration key-value pairs
supportsFeature(string|ModelCapability $feature): bool-
Check if provider supports a specific feature.
chatCompletion(array $messages, array $options = []): CompletionResponse-
Execute chat completion.
- param array $messages
-
A list of typed
Chatvalues or legacy arrays withMessage roleandcontent. Rich provider-specific arrays retain their additional fields, including tool results and multimodal content. Implementations normalize typed messages withto.Array ()
complete(string $prompt, array $options = []): CompletionResponse-
Execute simple completion from a prompt.
-
interface
VisionCapableInterface -
- Fully qualified name
-
\Netresearch\Nr Llm\ Provider\ Contract\ Vision Capable Interface
Contract for providers supporting vision/image analysis.
analyzeImage(array $content, array $options = []): VisionResponse-
Analyze an image.
- param array $content
-
A list of typed
Visionvalues.Content Llmnormalizes legacy content-part arrays before calling the provider; direct adapter calls use typed values.Service Manager:: vision () - param array $options
-
Optional configuration
- Returns
-
VisionResponse
-
interface
StreamingCapableInterface -
- Fully qualified name
-
\Netresearch\Nr Llm\ Provider\ Contract\ Streaming Capable Interface
Contract for providers supporting streaming.
-
interface
ToolCapableInterface -
- Fully qualified name
-
\Netresearch\Nr Llm\ Provider\ Contract\ Tool Capable Interface
Contract for providers supporting tool/function calling.
chatCompletionWithTools(array $messages, array $tools, array $options = []): CompletionResponse-
Chat with tool calling. Messages support multimodal content (string or array of content blocks).
- param array $messages
-
Typed
Chatvalues or provider-specific legacy message arraysMessage - param array $tools
-
A list of typed
Toolvalues.Spec Llmnormalizes legacy tool arrays before calling the provider.Service Manager:: chat With Tools ()
-
interface
DocumentCapableInterface -
- Fully qualified name
-
\Netresearch\Nr Llm\ Provider\ Contract\ Document Capable Interface
Optional capability for Base64 inline document content in chat messages. It adds capability discovery, not a separate completion method.
-
interface
DecisionCapableInterface -
- Fully qualified name
-
\Netresearch\Nr Llm\ Provider\ Contract\ Decision Capable Interface
Optional capability for providers that natively answer typed questions about a screened subject (ADR-211).
decide(DecisionSubject $subject, array $questions, array $options = []): DecisionResponse-
- param DecisionSubject $subject
-
Typed subject to evaluate
- param array $questions
-
A list of
DecisionvaluesQuestion - param array $options
-
Configuration call options, including
model - throws
-
InvalidDecisionResponseException for malformed answers; ProviderException for other provider failures
- Returns
-
Typed answers with one valid answer per question