]> git.djapps.eu Git - pkg/ggml/sources/llama.cpp/commit
server: Retrieve prompt template in /props (#8337)
authorBjarke Viksøe <redacted>
Sun, 7 Jul 2024 09:10:38 +0000 (11:10 +0200)
committerGitHub <redacted>
Sun, 7 Jul 2024 09:10:38 +0000 (11:10 +0200)
commitcb4d86c4d723af87d3d7e3177e9485f200391384
tree167c0e8e6e128ae3bcd9272d68dad4b93568645c
parent86e7299ef5dff0f388922dc6fcbce009e99d8005
server: Retrieve prompt template in /props (#8337)

* server: Retrieve prompt template in /props

This PR adds the following:
- Expose the model's Jinja2 prompt template from the model in the /props endpoint.
- Change log-level from Error to Warning for warning about template mismatch.

The front-end stands a better chance of actually executing the Jinja template format correctly. Server is currently just guessing it.

Ideally this should have been inside a JSON block that expose the same key/value pairs as listed during startup in "llm_load_print_meta" function.

* Make string buffer dynamic

* Add doc and better string handling

* Using chat_template naming convention

* Use intermediate vector for string assignment
examples/server/README.md
examples/server/server.cpp