CustomAIService class
Example template for creating custom AI services
- Implemented types
Constructors
-
CustomAIService({required String apiEndpoint, Map<
String, String> ? headers})
Properties
- apiEndpoint → String
-
final
- hashCode → int
-
The hash code for this object.
no setterinherited
-
headers
→ Map<
String, String> ? -
final
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
Methods
-
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