LocalAIService class

Example local AI service with rule-based responses You can replace this with actual local ML model integration

Implemented types

Constructors

LocalAIService({Map<String, String>? customResponses})

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

addCustomResponse(String keyword, String response) → void
clearContext() Future<void>
Clear conversation context
override
isAvailable() Future<bool>
Check if service is available
override
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
sendMessage({required String message, List<ChatMessage> conversationHistory = const [], Map<String, dynamic>? options}) Future<String>
Send a message and get a complete response
override
sendMessageStream({required String message, List<ChatMessage> conversationHistory = const [], Map<String, dynamic>? options}) Stream<String>
Send a message and get a streaming response
override
setOptions(Map<String, dynamic> options) → void
Set custom options
override
toString() String
A string representation of this object.
inherited

Operators

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