|
Entropic 2.3.8
Local-first agentic inference engine
|
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>
Go to the source code of this file.
Namespaces | |
| namespace | entropic |
| Activate model on GPU (WARM → ACTIVE). | |
Functions | |
| static std::optional< ToolCall > | entropic::parse_recovered_tool_call (const std::string &fixed) |
| Parse a brace/quote-fixed JSON string into a ToolCall. | |
| static std::optional< ToolCall > | entropic::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 | |
ChatAdapter base class implementation.
Provides shared tool-call parsing, think-block handling, JSON recovery, system prompt assembly, and response completeness detection.
Definition in file adapter_base.cpp.