MCPcopy Create free account
hub / github.com/cactus-compute/cactus / reset

Method reset

cactus/engine/engine_constraints.cpp:1098–1117  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1096}
1097
1098void ToolCallConstrainer::reset() {
1099 generated_text_.clear();
1100 current_bias_.clear();
1101 brace_depth_ = 0;
1102 reset_needle_constraints();
1103
1104 if (model_type_ == Config::ModelType::LFM2) {
1105 state_ = State::LFM_START;
1106 } else if (is_gemma_family()) {
1107 state_ = State::GEMMA_START;
1108 } else if (is_needle()) {
1109 state_ = State::NEEDLE_START;
1110 } else {
1111 state_ = State::QWEN_START;
1112 }
1113
1114 if (active_) {
1115 compute_bias();
1116 }
1117}
1118
1119
1120void Model::set_tool_constraints(const std::vector<ToolConstraintSpec>& tools) {

Callers 1

Calls 1

clearMethod · 0.45

Tested by

no test coverage detected