Interface WhisperLogitsFilterCallback
- All Superinterfaces:
com.sun.jna.Callback
public interface WhisperLogitsFilterCallback
extends com.sun.jna.Callback
Callback to filter logits.
Can be used to modify the logits before sampling.
If not null, called after applying temperature to logits.
-
Nested Class Summary
Nested classes/interfaces inherited from interface com.sun.jna.Callback
com.sun.jna.Callback.UncaughtExceptionHandler -
Field Summary
Fields inherited from interface com.sun.jna.Callback
FORBIDDEN_NAMES, METHOD_NAME -
Method Summary
Modifier and TypeMethodDescriptionvoidcallback(com.sun.jna.Pointer ctx, com.sun.jna.Pointer state, WhisperTokenData[] tokens, int n_tokens, float[] logits, com.sun.jna.Pointer user_data) Callback method to filter logits.
-
Method Details
-
callback
void callback(com.sun.jna.Pointer ctx, com.sun.jna.Pointer state, WhisperTokenData[] tokens, int n_tokens, float[] logits, com.sun.jna.Pointer user_data) Callback method to filter logits.- Parameters:
ctx- The whisper context.state- The whisper state.tokens- The array of whisper_token_data.n_tokens- The number of tokens.logits- The array of logits.user_data- User data.
-