Entropic 2.11.1
Local-first agentic inference engine
Loading...
Searching...
No Matches
response_parse.h
Go to the documentation of this file.
1// SPDX-License-Identifier: Apache-2.0
43#pragma once
44
47
48#include <string>
49#include <vector>
50
51namespace entropic {
52
53class LlamaCppBackend;
54
60 std::string content;
61 std::vector<ToolCall> tool_calls;
62 bool used_template = false;
63};
64
77bool calls_satisfy_schema(const std::vector<ToolCall>& calls,
78 const std::string& tools_json);
79
90 ChatAdapter* adapter,
91 const std::string& raw);
92
93} // namespace entropic
ChatAdapter concrete base class.
Concrete base class for chat format adapters (80% logic).
LlamaCppBackend — common llama.cpp patterns (15% layer).
Activate model on GPU (WARM → ACTIVE).
bool calls_satisfy_schema(const std::vector< ToolCall > &calls, const std::string &tools_json)
Check that every call's declared required parameters are present.
ParsedModelResponse parse_model_response(LlamaCppBackend *llama, ChatAdapter *adapter, const std::string &raw)
Parse a raw emission: template first, adapter second.
Content and tool calls extracted from one raw emission.
bool used_template
True when common_chat produced the calls.
std::vector< ToolCall > tool_calls
Extracted calls.
std::string content
Reasoning-stripped content.
Tool call and tool result types.