Fix static declarations
This commit is contained in:
parent
b4a5461ff8
commit
de41d5ecd8
2 changed files with 3 additions and 3 deletions
|
@ -4205,7 +4205,7 @@ int llama_token_to_str_bpe(const struct llama_context * ctx, llama_token token,
|
||||||
if (0 <= token && token < llama_n_vocab_from_model(&ctx->model)) {
|
if (0 <= token && token < llama_n_vocab_from_model(&ctx->model)) {
|
||||||
std::string result = ctx->model.vocab.id_to_token[token].tok;
|
std::string result = ctx->model.vocab.id_to_token[token].tok;
|
||||||
if (result.length() > length) {
|
if (result.length() > length) {
|
||||||
return -result.length();
|
return - result.length();
|
||||||
}
|
}
|
||||||
strcpy(str, result.c_str());
|
strcpy(str, result.c_str());
|
||||||
return result.length();
|
return result.length();
|
||||||
|
|
4
llama.h
4
llama.h
|
@ -476,11 +476,11 @@ extern "C" {
|
||||||
#include <vector>
|
#include <vector>
|
||||||
#include <string>
|
#include <string>
|
||||||
|
|
||||||
static std::string llama_token_to_str(
|
std::string llama_token_to_str(
|
||||||
const struct llama_context * ctx,
|
const struct llama_context * ctx,
|
||||||
llama_token token);
|
llama_token token);
|
||||||
|
|
||||||
static std::string llama_token_to_str_bpe(
|
std::string llama_token_to_str_bpe(
|
||||||
const struct llama_context * ctx,
|
const struct llama_context * ctx,
|
||||||
llama_token token);
|
llama_token token);
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue