|
Entropic 2.3.8
Local-first agentic inference engine
|
Result of a single generation call. More...
#include <entropic/types/generation_result.h>
Public Member Functions | |
| bool | ok () const |
| True if generation completed without error. | |
Public Attributes | |
| std::string | content |
| Generated text (cleaned by adapter) | |
| std::string | raw_content |
| Raw model output before adapter processing. | |
| std::vector< ToolCall > | tool_calls |
| Tool calls parsed from content. | |
| std::string | finish_reason = "stop" |
| Finish reason: "stop", "length", "error". | |
| int | token_count = 0 |
| Generated token count. | |
| double | generation_time_ms = 0.0 |
| Wall-clock generation time. | |
| double | routing_ms = 0.0 |
| Router classification time. | |
| double | swap_ms = 0.0 |
| Model swap time. | |
| double | total_ms = 0.0 |
| Total end-to-end time. | |
| double | throughput_tok_s = 0.0 |
| Measured throughput for this generation (tok/s). | |
| bool | time_limited = false |
| true if generation was terminated by time limit rather than EOS/stop sequence/max_tokens. | |
| int | original_max_tokens = 0 |
| Original max_tokens before auto-adaptation reduced it. | |
| int | seq_id = 0 |
| Sequence identifier for multi-sequence backends. | |
| entropic_error_t | error_code = ENTROPIC_OK |
| Error code (ENTROPIC_OK if no error) | |
| std::string | error_message |
| Error description (empty if no error) | |
Result of a single generation call.
Maps to Python GenerationResult dataclass.
Definition at line 30 of file generation_result.h.
|
inline |
True if generation completed without error.
Definition at line 78 of file generation_result.h.
| std::string entropic::GenerationResult::content |
Generated text (cleaned by adapter)
Definition at line 31 of file generation_result.h.
| entropic_error_t entropic::GenerationResult::error_code = ENTROPIC_OK |
Error code (ENTROPIC_OK if no error)
Definition at line 69 of file generation_result.h.
| std::string entropic::GenerationResult::error_message |
Error description (empty if no error)
Definition at line 70 of file generation_result.h.
| std::string entropic::GenerationResult::finish_reason = "stop" |
Finish reason: "stop", "length", "error".
Definition at line 34 of file generation_result.h.
| double entropic::GenerationResult::generation_time_ms = 0.0 |
Wall-clock generation time.
Definition at line 36 of file generation_result.h.
| int entropic::GenerationResult::original_max_tokens = 0 |
Original max_tokens before auto-adaptation reduced it.
0 if no adaptation occurred.
Definition at line 58 of file generation_result.h.
| std::string entropic::GenerationResult::raw_content |
Raw model output before adapter processing.
Definition at line 32 of file generation_result.h.
| double entropic::GenerationResult::routing_ms = 0.0 |
Router classification time.
Definition at line 39 of file generation_result.h.
| int entropic::GenerationResult::seq_id = 0 |
Sequence identifier for multi-sequence backends.
0 for single-sequence backends (default). Set by generate_seq() to track which sequence produced this result.
Definition at line 66 of file generation_result.h.
| double entropic::GenerationResult::swap_ms = 0.0 |
Model swap time.
Definition at line 40 of file generation_result.h.
| double entropic::GenerationResult::throughput_tok_s = 0.0 |
Measured throughput for this generation (tok/s).
Computed from token_count / generation_time_ms. 0.0 if either is 0.
Definition at line 48 of file generation_result.h.
| bool entropic::GenerationResult::time_limited = false |
true if generation was terminated by time limit rather than EOS/stop sequence/max_tokens.
Definition at line 53 of file generation_result.h.
| int entropic::GenerationResult::token_count = 0 |
Generated token count.
Definition at line 35 of file generation_result.h.
| std::vector<ToolCall> entropic::GenerationResult::tool_calls |
Tool calls parsed from content.
Definition at line 33 of file generation_result.h.
| double entropic::GenerationResult::total_ms = 0.0 |
Total end-to-end time.
Definition at line 41 of file generation_result.h.