mirror of
https://github.com/LostRuins/koboldcpp.git
synced 2025-09-10 09:04:36 +00:00
ollama sync completions mostly working. stupid api.
This commit is contained in:
parent
2c1a06a07d
commit
62dde8cfb2
2 changed files with 45 additions and 16 deletions
|
@ -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;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue