Entropic 2.9.5
Local-first agentic inference engine
Loading...
Searching...
No Matches
xml_parameter_parser.cpp File Reference

Shared XML <parameter=...>value</parameter> extractor. More...

#include "xml_parameter_parser.h"
#include <regex>
#include <string>
#include <utility>
Include dependency graph for xml_parameter_parser.cpp:

Go to the source code of this file.

Namespaces

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

Functions

std::unordered_map< std::string, std::string > entropic::inference::adapters::parse_xml_parameters (const std::string &func_body, const std::shared_ptr< spdlog::logger > &logger)
 Extract <parameter=NAME>value</parameter> pairs from a function body.
 

Detailed Description

Shared XML <parameter=...>value</parameter> extractor.

Version
2.4.1 (gh#79)

Definition in file xml_parameter_parser.cpp.

Function Documentation

◆ parse_xml_parameters()

std::unordered_map< std::string, std::string > entropic::inference::adapters::parse_xml_parameters ( const std::string &  func_body,
const std::shared_ptr< spdlog::logger > &  logger 
)

Extract <parameter=NAME>value</parameter> pairs from a function body.

gh#79 fix: tolerates </NAME> close tags in addition to the literal </parameter>. See the helper definitions above and the header for full contract.

@utility

Version
2.4.1

Returns a map keyed by parameter name. Empty keys / values (after trim) are skipped with a warning. The </NAME> close-tag tolerance is the gh#79 fix.

Parameters
func_bodyFunction body text (between <function=name> and the matching </function>).
loggerAdapter-owned logger for warn messages. May be null — the parser is silent in that case.
Returns
Map of trimmed parameter key to trimmed parameter value. @utility
Version
2.4.1

Definition at line 116 of file xml_parameter_parser.cpp.