llama.cpp/tools
Dorin-Andrei Geman 42158ae2e8
server : fix first message identification (#13634)
* server : fix first message identification

When using the OpenAI SDK (https://github.com/openai/openai-node/blob/master/src/lib/ChatCompletionStream.ts#L623-L626) we noticed that the expected assistant role is missing in the first streaming message. Fix this by correctly checking for the first message.

Co-authored-by: Piotr Stankiewicz <piotr.stankiewicz@docker.com>
Signed-off-by: Dorin Geman <dorin.geman@docker.com>

* server : Fix checks for first role message for stream=True

Co-authored-by: Piotr Stankiewicz <piotr.stankiewicz@docker.com>
Signed-off-by: Dorin Geman <dorin.geman@docker.com>

---------

Signed-off-by: Dorin Geman <dorin.geman@docker.com>
Co-authored-by: Piotr Stankiewicz <piotr.stankiewicz@docker.com>
2025-05-21 15:07:57 +02:00
..
batched-bench batched-bench : fix pp batch contents (#13492) 2025-05-13 18:01:53 +03:00
cvector-generator llama : move end-user examples to tools directory (#13249) 2025-05-02 20:27:13 +02:00
export-lora llama : move end-user examples to tools directory (#13249) 2025-05-02 20:27:13 +02:00
gguf-split llama : move end-user examples to tools directory (#13249) 2025-05-02 20:27:13 +02:00
imatrix imatrix : Add --parse-special for enabling parsing of special tokens in imatrix calculation (#13389) 2025-05-09 11:53:58 +02:00
llama-bench kv-cache : add SWA support (#13194) 2025-05-20 08:05:46 +03:00
main llama : do not crash if there is no CPU backend (#13395) 2025-05-09 13:02:07 +02:00
mtmd mtmd-helper : bug fix to token batching in mtmd (#13650) 2025-05-20 18:55:30 +02:00
perplexity context : remove logits_all flag (#13284) 2025-05-08 14:26:50 +03:00
quantize quantize : improve tensor-type pattern matching (#13033) 2025-05-13 19:12:31 +02:00
rpc llama : do not crash if there is no CPU backend (#13395) 2025-05-09 13:02:07 +02:00
run kv-cache : simplify the interface (#13660) 2025-05-21 15:11:13 +03:00
server server : fix first message identification (#13634) 2025-05-21 15:07:57 +02:00
tokenize llama : move end-user examples to tools directory (#13249) 2025-05-02 20:27:13 +02:00
tts llama : move end-user examples to tools directory (#13249) 2025-05-02 20:27:13 +02:00
CMakeLists.txt mtmd : rename llava directory to mtmd (#13311) 2025-05-05 16:02:55 +02:00