Entropic 2.3.8
Local-first agentic inference engine
Loading...
Searching...
No Matches
entropic::StreamAccumulator Struct Reference

Context passed to the streaming token callback. More...

Collaboration diagram for entropic::StreamAccumulator:

Public Attributes

std::string content
 Accumulated content.
 
EngineCallbackscallbacks
 Callback reference.
 
GenerationEventsevents
 Event flags.
 
const HookInterface * hooks
 Hook dispatch (v1.9.1)
 
int token_index = 0
 Token counter (v1.9.1)
 
bool interrupted = false
 Set when interrupt detected.
 
int * cancel_flag = nullptr
 Pointer to the backend's cancel flag (gh#20, v2.1.5).
 
void(* observer )(const char *, size_t, void *) = nullptr
 Global observer — fires on every token alongside callbacks->on_stream_chunk.
 
void * observer_data = nullptr
 Observer user_data.
 

Detailed Description

Context passed to the streaming token callback.

Definition at line 163 of file response_generator.cpp.

Member Data Documentation

◆ callbacks

EngineCallbacks* entropic::StreamAccumulator::callbacks

Callback reference.

Definition at line 165 of file response_generator.cpp.

◆ cancel_flag

int* entropic::StreamAccumulator::cancel_flag = nullptr

Pointer to the backend's cancel flag (gh#20, v2.1.5).

When the interrupt event fires, the token callback writes 1 here so the next iteration of the backend's decode loop stops within a single token instead of running to natural EOS.

Definition at line 175 of file response_generator.cpp.

◆ content

std::string entropic::StreamAccumulator::content

Accumulated content.

Definition at line 164 of file response_generator.cpp.

◆ events

GenerationEvents* entropic::StreamAccumulator::events

Event flags.

Definition at line 166 of file response_generator.cpp.

◆ hooks

const HookInterface* entropic::StreamAccumulator::hooks

Hook dispatch (v1.9.1)

Definition at line 167 of file response_generator.cpp.

◆ interrupted

bool entropic::StreamAccumulator::interrupted = false

Set when interrupt detected.

Definition at line 169 of file response_generator.cpp.

◆ observer

void(* entropic::StreamAccumulator::observer) (const char *, size_t, void *) = nullptr

Global observer — fires on every token alongside callbacks->on_stream_chunk.

(2.0.6-rc16)

Definition at line 178 of file response_generator.cpp.

◆ observer_data

void* entropic::StreamAccumulator::observer_data = nullptr

Observer user_data.

Definition at line 179 of file response_generator.cpp.

◆ token_index

int entropic::StreamAccumulator::token_index = 0

Token counter (v1.9.1)

Definition at line 168 of file response_generator.cpp.


The documentation for this struct was generated from the following file: