Fix static declarations

This commit is contained in:
goerch 2023-07-26 08:30:25 +02:00
parent b4a5461ff8
commit de41d5ecd8
2 changed files with 3 additions and 3 deletions

View file

@ -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)) {
std::string result = ctx->model.vocab.id_to_token[token].tok;
if (result.length() > length) {
return -result.length();
return - result.length();
}
strcpy(str, result.c_str());
return result.length();

View file

@ -476,11 +476,11 @@ extern "C" {
#include <vector>
#include <string>
static std::string llama_token_to_str(
std::string llama_token_to_str(
const struct llama_context * ctx,
llama_token token);
static std::string llama_token_to_str_bpe(
std::string llama_token_to_str_bpe(
const struct llama_context * ctx,
llama_token token);