MCPcopy Create free account
hub / github.com/davisking/dlib / add_token

Method add_token

examples/slm_advanced_train_ex.cpp:685–688  ·  view source on GitHub ↗

Add a single token to the context

Source from the content-addressed store, hash-verified

683
684 // Add a single token to the context
685 void add_token(int token) {
686 if (current_context_.size() >= max_context_size_) current_context_.pop_front();
687 current_context_.push_back(token);
688 }
689
690 // Add multiple tokens to the context
691 void add_tokens(const std::vector<int>& tokens) {

Callers 1

mainFunction · 0.80

Calls 3

pop_frontMethod · 0.80
sizeMethod · 0.45
push_backMethod · 0.45

Tested by

no test coverage detected