Simply aborting on client side does not end generation of
streaming tokens on the koboldcpp side, creating an awful user
experience where starting a new generation does not work, and
potentially causing segfaults in koboldcpp if another generation
is started while the previous one is still processing.
koboldcpp added SSE streaming to its API as of:
https://github.com/LostRuins/koboldcpp/pull/220
This has not yet been added to release, but I figued I'd try to
get the work done to make it ready.
Work mostly hijacked from:
10bbc97069