MCPcopy Create free account
hub / github.com/FastFlowLM/FastFlowLM / get_function_name_tokens

Method get_function_name_tokens

src/common/AutoModel/modeling_gpt_oss.cpp:383–396  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

381}
382
383std::vector<int> GPT_OSS::get_function_name_tokens() {
384 std::vector<int> allowed;
385
386 for (const auto& tool : tools) {
387 std::string name = tool["function"]["name"];
388
389 auto tokens = this->tokenizer->encode(name);
390 for (int token : tokens) {
391 allowed.push_back(token);
392 }
393 }
394
395 return allowed;
396}
397
398void GPT_OSS::update_state(int token_id) {
399 std::string token_str = tokenizer->decode({ token_id });

Callers

nothing calls this directly

Calls 2

encodeMethod · 0.80
push_backMethod · 0.80

Tested by

no test coverage detected