LLMService class

Service provider class wrapping client integrations for various LLM SDKs.

Constructors

LLMService()

Properties

hashCode → int
The hash code for this object.
no setterinherited
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() → String
A string representation of this object.
inherited

Operators

operator ==(Object other) → bool
The equality operator.
inherited

Static Properties

embeddedHandler ↔ Future<LLMResponse> Function({required LlmConfig config, required List<ChatMessage> messages, String? systemPrompt, required List<MCPTool> tools})?
Pluggable delegate to handle embedded (on-device) models execution.
getter/setter pair
embeddedStreamHandler ↔ Stream<LLMStreamChunk> Function({required LlmConfig config, required List<ChatMessage> messages, String? systemPrompt, required List<MCPTool> tools})?
Pluggable delegate to handle streaming embedded (on-device) models execution.
getter/setter pair

Static Methods

clearCache() → void
Clears cached LLM clients and closes any GoogleAIClient instances.
generate({required LlmConfig config, required List<ChatMessage> messages, required List<MCPTool> tools, String? systemPrompt}) → Future<LLMResponse>
Generate completion using direct SDK adapters.
generateStream({required LlmConfig config, required List<ChatMessage> messages, required List<MCPTool> tools, String? systemPrompt}) → Stream<LLMStreamChunk>
Generate completion stream using direct SDK adapters.