Entropic 2.3.8
Local-first agentic inference engine
Loading...
Searching...
No Matches
adapter_base.h File Reference

ChatAdapter concrete base class. More...

#include <entropic/types/message.h>
#include <entropic/types/tool_call.h>
#include <optional>
#include <string>
#include <string_view>
#include <unordered_set>
#include <vector>
Include dependency graph for adapter_base.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

struct  entropic::ParseResult
 Parsed tool call result: cleaned content + extracted calls. More...
 
class  entropic::ChatAdapter
 Concrete base class for chat format adapters (80% logic). More...
 

Namespaces

namespace  entropic
 Activate model on GPU (WARM → ACTIVE).
 

Detailed Description

ChatAdapter concrete base class.

Responsibilities (80% in base)
  • System prompt assembly (identity + context + tools)
  • Think-block extraction and stripping
  • Tagged tool call parsing (<tool_call>JSON</tool_call>)
  • Bare JSON tool call parsing (fallback)
  • Malformed JSON recovery
  • Tool result formatting
  • Response completeness detection (think-aware)
Subclass overrides (20%)
  • parse_tool_calls() — model-specific parsing strategy
  • format_tools() — tool definition format
  • format_tool_result() — if model needs special wrapping
  • chat_format() — chat format identifier

Internal to inference .so — nlohmann/json used internally, not in interface headers.

Version
1.8.2

Definition in file adapter_base.h.