ollama sync completions mostly working. stupid api.

This commit is contained in:
Concedo 2024-11-23 23:31:37 +08:00
parent 2c1a06a07d
commit 62dde8cfb2
2 changed files with 45 additions and 16 deletions

View file

@ -2533,6 +2533,10 @@ std::string gpttype_detokenize(const std::vector<int> & inputids, bool render_sp
std::string output = "";
for (auto eid : inputids)
{
if(eid<0 || eid>=n_vocab)
{
continue;
}
std::string tokenizedstr = FileFormatTokenizeID(eid, file_format, render_special);
output += tokenizedstr;
}