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

One generation's metrics, without its text (gh#154). More...

#include <entropic/types/generation_result.h>

Collaboration diagram for entropic::GenerationRecord:

Public Attributes

std::string finish_reason
 "stop", "length", "error"
 
int token_count = 0
 Tokens generated.
 
int prefill_tokens = 0
 Prompt tokens actually decoded (gh#144)
 
double throughput_tok_s = 0.0
 Measured decode throughput.
 
int n_drafted = 0
 Speculative/MTP tokens proposed.
 
int n_accepted = 0
 Of those, accepted by the target.
 
GrammarProvenance grammar
 What constrained the decode.
 

Detailed Description

One generation's metrics, without its text (gh#154).

GenerationResult is rich and per-call; this is what survives the call and reaches a consumer through entropic_metrics_json. Content and tool calls are deliberately excluded — the engine keeps a bounded ring of these, and keeping the text would make it a transcript.

Version
2.13.0

Definition at line 156 of file generation_result.h.

Member Data Documentation

◆ finish_reason

std::string entropic::GenerationRecord::finish_reason

"stop", "length", "error"

Definition at line 157 of file generation_result.h.

◆ grammar

GrammarProvenance entropic::GenerationRecord::grammar

What constrained the decode.

Definition at line 163 of file generation_result.h.

◆ n_accepted

int entropic::GenerationRecord::n_accepted = 0

Of those, accepted by the target.

Definition at line 162 of file generation_result.h.

◆ n_drafted

int entropic::GenerationRecord::n_drafted = 0

Speculative/MTP tokens proposed.

Definition at line 161 of file generation_result.h.

◆ prefill_tokens

int entropic::GenerationRecord::prefill_tokens = 0

Prompt tokens actually decoded (gh#144)

Definition at line 159 of file generation_result.h.

◆ throughput_tok_s

double entropic::GenerationRecord::throughput_tok_s = 0.0

Measured decode throughput.

Definition at line 160 of file generation_result.h.

◆ token_count

int entropic::GenerationRecord::token_count = 0

Tokens generated.

Definition at line 158 of file generation_result.h.


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