]> git.djapps.eu Git - pkg/ggml/sources/llama.cpp/commit
`common`: add partial regex support (#12808)
authorOlivier Chafik <redacted>
Wed, 14 May 2025 18:50:57 +0000 (19:50 +0100)
committerGitHub <redacted>
Wed, 14 May 2025 18:50:57 +0000 (19:50 +0100)
commit3198405e98530c683d12fd123e3920f2bd2aafa5
tree71ab9da1f7d9f2ee0b1eb104ff2677a13b64902b
parentf5170c1d7a66222ca7c75d2022fec3ed87257e0b
`common`: add partial regex support (#12808)

* move string_find_partial_stop & string_ends_with to common

* add common_regex (supports partial matches)

Co-authored-by: Georgi Gerganov <redacted>
* Update common/regex-partial.cpp

Co-authored-by: Georgi Gerganov <redacted>
* Update common/regex-partial.cpp

Co-authored-by: Georgi Gerganov <redacted>
* Update common/regex-partial.h

Co-authored-by: Georgi Gerganov <redacted>
* partial regex: add missing iterator end checks

* string utils: use string_views

* direct throw to avoid ggml.h include

* regex-partial: replace missed ggml_asserts

---------

Co-authored-by: ochafik <redacted>
Co-authored-by: Georgi Gerganov <redacted>
common/CMakeLists.txt
common/common.cpp
common/common.h
common/regex-partial.cpp [new file with mode: 0644]
common/regex-partial.h [new file with mode: 0644]
tests/CMakeLists.txt
tests/test-regex-partial.cpp [new file with mode: 0644]
tools/server/server.cpp