chat method
Future<SyniChatResponse>
chat(
- String message, {
- Map<
String, dynamic> ? hsiContext, - int seed = 0,
- SyniExecutionMode mode = SyniExecutionMode.localFirst,
Run a single chat turn. hsiContext is the conditioning payload built
by the host SDK (or null). mode picks local vs cloud — see
SyniExecutionMode.
V1 note: all modes still require install to have completed (it's where the persona is bound). Allowing pure-cloud-without-local-model install is a V2 lifecycle change.
Implementation
Future<SyniChatResponse> chat(
String message, {
Map<String, dynamic>? hsiContext,
int seed = 0,
SyniExecutionMode mode = SyniExecutionMode.localFirst,
}) async {
final (_, persona) = _requireReady();
Future<SyniChatResponse> local() =>
_localChat(persona, message, hsiContext, seed);
Future<SyniChatResponse> cloud() =>
_cloudChat(persona, message, hsiContext);
return _route(mode, local, cloud);
}