LLM inference in C/C++
C++ ggml
tests : adjust server string regex to also match m2 utlra results (#29648)
Georgi Gerganovc85b92c69c95
diff --git a/tools/server/server-context.cpp b/tools/server/server-context.cppindex 2036319c13..fbfcbe5125 100644--- a/tools/server/server-context.cpp+++ b/tools/server/server-context.cpp@@ -3155,7 +3155,7 @@ private:// TODO: support memory-less logits computationif (slot.task->need_logits() && !llama_get_memory(ctx_tgt)) {- send_error(slot, "the current context does not logits computation. skipping", ERROR_TYPE_SERVER);+ send_error(slot, "the current context does not support logits computation. skipping", ERROR_TYPE_SERVER);slot.release();return;}diff --git a/tools/server/tests/unit/test_completion.py b/tools/server/tests/unit/test_completion.pyindex 01732eb163..09482b75ce 100644--- a/tools/server/tests/unit/test_completion.py+++ b/tools/server/tests/unit/test_completion.py@@ -148,7 +148,7 @@ def test_completion_stream_with_openai_library_stops():if choice.finish_reason is None:assert choice.text is not Noneoutput_text += choice.text- assert match_regex("Sure, here's one for[\\s\\S]*", output_text), f'Unexpected output: {output_text}'+ assert match_regex("Sure, here's one for[\\s\\S]*|Sure! Here's one for you[\\s\\S]*", output_text), f'Unexpected output: {output_text}'@pytest.mark.parametrize("n_slots", [1, 2])