Skip to content

Update server-chat.cpp#2356

Open
Kontomoka5932 wants to merge 1 commit into
LostRuins:concedofrom
Kontomoka5932:patch-1
Open

Update server-chat.cpp#2356
Kontomoka5932 wants to merge 1 commit into
LostRuins:concedofrom
Kontomoka5932:patch-1

Conversation

@Kontomoka5932

Copy link
Copy Markdown

I am using:
koboldcpp-1.117.1
gemma-4-26B-A4B
http://localhost:5001/v1/chat/completions

When asking to output ONLY A NUMBER, for example 123, I get an error in the koboldcpp console:
...
Processing Prompt [BATCH] (471 / 471 tokens)
Generating (4 / 1024 tokens)
(EOS token triggered! ID:106)
[23:13:28] CtxLimit:2361/73728, Init:0.08s, Processed:471 in 1.27s (369.99T/s),
Generated:4/1024 in 0.26s (15.44T/s), Total:1.61s
Output: 123
argument of type 'int' is not iterable
...

I think the error is in the server-chat.cpp file at line 53:
{"text", item.at("content")},
The AI suggests replacing it with the following line:
{"text", item.at("content").is_string() ? item.at("content") : item.at("content").dump()},

@LostRuins

Copy link
Copy Markdown
Owner

Should be fixed in the latest rolling build, can you try https://github.com/LostRuins/koboldcpp/releases/tag/rolling

@LostRuins

Copy link
Copy Markdown
Owner

server-chat.cpp will do nothing, it's not used in koboldcpp

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants