-
public interface LlmCallbackCallback interface for Llama model. Users can implement this interface to receive the generated tokens and statistics.
Warning: These APIs are experimental and subject to change without notice
-
-
Method Summary
-
-
Method Detail
-
onResult
abstract void onResult(String result)
Called when a new result is available from JNI. Users will keep getting onResult() invocationsuntil generate() finishes.
- Parameters:
result- Last generated token
-
onStats
abstract void onStats(float tps)
Called when the statistics for the generate() is available.
- Parameters:
tps- Tokens/second for generated tokens.
-
-
-
-