mirror of
https://github.com/mudler/LocalAI.git
synced 2026-10-28 09:08:54 -04:00
chore: ⬆️ Update ggml-org/llama.cpp to a0e6dc7384edb8f5d927155e1d26c10b4a310e6d (#12654)
* ⬆️ Update ggml-org/llama.cpp Signed-off-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> * fix(llama-cpp): read the rendered chat prompt through str() llama.cpp now returns the chat prompt as a common_chat_prompt instead of a std::string. Convert it with a small helper that still accepts the plain string used by older forks that share this source. Signed-off-by: Ettore Di Giacinto <mudler@localai.io> --------- Signed-off-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> Signed-off-by: Ettore Di Giacinto <mudler@localai.io> Co-authored-by: mudler <2420543+mudler@users.noreply.github.com> Co-authored-by: Ettore Di Giacinto <mudler@localai.io>
This commit is contained in:
2 files changed
+8
-2
No files matched your search
@@ -1,5 +1,5 @@
|
||||
|
||||
LLAMA_VERSION?=f2cc7282ce0042641df55e0e563b75e824e2b647
|
||||
LLAMA_VERSION?=a0e6dc7384edb8f5d927155e1d26c10b4a310e6d
|
||||
LLAMA_REPO?=https://github.com/ggerganov/llama.cpp
|
||||
|
||||
CMAKE_ARGS?=
|
||||
|
||||
@@ -108,6 +108,12 @@ using grpc::Status;
|
||||
// requests without a matching "authorization: Bearer <token>" metadata header.
|
||||
|
||||
// Cached auth token — empty means auth is disabled.
|
||||
// Newer llama.cpp returns common_chat_params::prompt as a common_chat_prompt
|
||||
// (use .str()); older forks such as turboquant still return std::string.
|
||||
static inline std::string chat_prompt_str(const std::string & p) { return p; }
|
||||
template <typename T>
|
||||
static inline std::string chat_prompt_str(const T & p) { return p.str(); }
|
||||
|
||||
static std::string g_grpc_auth_token;
|
||||
|
||||
// Minimal constant-time comparison (avoids OpenSSL dependency)
|
||||
@@ -3823,7 +3829,7 @@ public:
|
||||
dummy_inputs.use_jinja = params_base.use_jinja;
|
||||
|
||||
const auto rendered = common_chat_templates_apply(ctx_server.impl->chat_params.tmpls.get(), dummy_inputs);
|
||||
rendered_template = rendered.prompt;
|
||||
rendered_template = chat_prompt_str(rendered.prompt);
|
||||
}
|
||||
|
||||
response->set_rendered_template(rendered_template);
|
||||
|
||||
Reference in new issue
Block a user