Entropic 2.11.1
Local-first agentic inference engine
Loading...
Searching...
No Matches
response_parse.cpp File Reference

Template-first / adapter-second parse rule (gh#108). More...

#include "response_parse.h"
#include "llama_cpp_backend.h"
#include <entropic/types/logging.h>
#include <nlohmann/json.hpp>
#include <utility>
Include dependency graph for response_parse.cpp:

Go to the source code of this file.

Namespaces

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

Functions

static std::vector< std::string > entropic::required_params (const std::string &tools_json, const std::string &name, bool &found)
 Required parameter names declared by a tool's inputSchema.
 
static bool entropic::has_all_required (const nlohmann::json &args, const std::vector< std::string > &required, const std::string &call_name)
 Verify every required key is present, warning on the first absent one.
 
static bool entropic::one_call_satisfies_schema (const ToolCall &call, const std::string &tools_json)
 Check one call's declared required parameters are all present.
 
bool entropic::calls_satisfy_schema (const std::vector< ToolCall > &calls, const std::string &tools_json)
 Check that every call's declared required parameters are present.
 
static bool entropic::try_template_parse (LlamaCppBackend *llama, const std::string &raw, ParsedModelResponse &out)
 Tool calls from the template parser, when trustworthy.
 
ParsedModelResponse entropic::parse_model_response (LlamaCppBackend *llama, ChatAdapter *adapter, const std::string &raw)
 Parse a raw emission: template first, adapter second.
 

Variables

static auto logger = entropic::log::get("inference.parse")
 

Detailed Description

Template-first / adapter-second parse rule (gh#108).

Version
2.10.3

Definition in file response_parse.cpp.

Variable Documentation

◆ logger

auto logger = entropic::log::get("inference.parse")
static

Definition at line 18 of file response_parse.cpp.