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

ChatAdapter base class implementation. More...

#include <entropic/inference/adapters/adapter_base.h>
#include <entropic/types/logging.h>
#include <nlohmann/json.hpp>
#include <algorithm>
#include <atomic>
#include <cstdint>
#include <regex>
#include <sstream>
Include dependency graph for adapter_base.cpp:

Go to the source code of this file.

Namespaces

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

Functions

static std::optional< ToolCallentropic::parse_recovered_tool_call (const std::string &fixed)
 Parse a brace/quote-fixed JSON string into a ToolCall.
 
static std::optional< ToolCallentropic::regex_recovered_tool_call (const std::string &json_str)
 Last-ditch recovery: pull a tool name out via regex.
 
logger entropic::info ("JSON recovery attempt: {} chars", json_str.size())
 

Variables

 entropic::fixed = std::regex_replace(fixed, std::regex(R"(,\s*\])"), "]")
 
 entropic::try
 

Detailed Description

ChatAdapter base class implementation.

Provides shared tool-call parsing, think-block handling, JSON recovery, system prompt assembly, and response completeness detection.

Version
1.8.2

Definition in file adapter_base.cpp.