Class NativeAPI.StreamChunk
public static class NativeAPI.StreamChunk
- Inheritance
-
objectNativeAPI.StreamChunk
Methods
litert_lm_stream_chunk_get_error(nint)
Gets the error message associated with this chunk, if any.
public static extern nint litert_lm_stream_chunk_get_error(nint chunk)
Parameters
chunknint
Returns
- nint
Remarks
Returns nint.Zero if there is no error.
litert_lm_stream_chunk_get_text(nint)
Gets the text content of the chunk.
public static extern nint litert_lm_stream_chunk_get_text(nint chunk)
Parameters
chunknint
Returns
- nint
Remarks
The returned string is owned by the chunk and is only valid as long as the chunk is valid. Returns nint.Zero if there is no text content in this chunk (e.g. if it is an error or metadata-only chunk).
litert_lm_stream_chunk_is_final(nint)
Returns true if this is the final chunk of the stream.
public static extern bool litert_lm_stream_chunk_is_final(nint chunk)
Parameters
chunknint
Returns
- bool