SyniRuntimeFFI class
Properties
hashCode
→ int
The hash code for this object.
no setter inherited
runtimeType
→ Type
A representation of the runtime type of the object.
no setter inherited
Methods
noSuchMethod (Invocation invocation )
→ dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString ()
→ String
A string representation of this object.
inherited
Static Methods
engineFree (SyniEngineNative engine )
→ void
engineLoadModel (SyniEngineNative engine , String modelPath )
→ bool
Replaces the model on an existing engine. Returns true on success.
engineNew ()
→ SyniEngineNative
engineNewWithModel (String modelPath )
→ SyniEngineNative
Returns nullptr on failure (e.g. file not found, invalid GGUF).
engineRunJson (SyniEngineNative engine , SyniPreset preset , int seed , String requestJson )
→ String ?
Runs a synchronous inference. Returns the JSON response as a Dart
string, or null on failure. The native string buffer is freed
internally — callers do not need to call stringFree .
engineRunStreamJson (SyniEngineNative engine , SyniPreset preset , int seed , String requestJson , bool onChunk (String chunk ) )
→ String ?
Streaming inference. Same shape as engineRunJson but fires onChunk
for each emitted token chunk. Returns the final accumulated JSON.
initialize ()
→ DynamicLibrary
Force-load the native library and resolve function pointers.
stringFree (Pointer <Utf8 > ptr )
→ void
Free a string that was allocated by syni_string_free (rare — usually
the high-level methods handle this for callers).
telemetryJson (SyniEngineNative engine )
→ String ?
Telemetry snapshot as a JSON array of inference metrics (each optionally
carrying fallback diagnostics). Returns null when the engine handle is
invalid or nothing has been recorded. The native buffer is freed here.
version ()
→ String ?
Runtime semver string, or null if the call failed.