llama.cpp/docs
Austin 6bfe98bd80
Integration of Jinja2 Templating (#875)
* feat: Add support for jinja templating

Signed-off-by: teleprint-me <77757836+teleprint-me@users.noreply.github.com>

* fix: Refactor chat formatter and update interface for jinja templates

- Simplify the `llama2_template` in `llama_jinja_format.py` by removing unnecessary line breaks for readability without affecting functionality.
- Update `ChatFormatterInterface` constructor to accept a more generic `Optional[object]` type for the template parameter, enhancing flexibility.
- Introduce a `template` property to `ChatFormatterInterface` for standardized access to the template string.
- Replace `MetaSingleton` metaclass with `Singleton` for the `ChatFormatterFactory` to streamline the singleton implementation.

These changes enhance code readability, maintain usability, and ensure consistency in the chat formatter's design pattern usage.

* Add outline for Jinja2 templating integration documentation

Signed-off-by: teleprint-me <77757836+teleprint-me@users.noreply.github.com>

* Add jinja2 as a dependency with version range for Hugging Face transformers compatibility

Signed-off-by: teleprint-me <77757836+teleprint-me@users.noreply.github.com>

* Update jinja2 version constraint for mkdocs-material compatibility

Signed-off-by: teleprint-me <77757836+teleprint-me@users.noreply.github.com>

* Fix attribute name in AutoChatFormatter

- Changed attribute name from `self._renderer` to `self._environment`

---------

Signed-off-by: teleprint-me <77757836+teleprint-me@users.noreply.github.com>
2024-01-17 09:47:52 -05:00
..
install Update instruction to download GGUF model (#783) 2023-10-02 11:46:47 -04:00
api-reference.md docs: Add headings to API reference 2023-11-27 18:42:15 -05:00
changelog.md docs: Use pymdownx.snippets for easier docs management 2023-09-12 22:28:58 -04:00
index.md docs: Use pymdownx.snippets for easier docs management 2023-09-12 22:28:58 -04:00
requirements.txt Update readthedocs setup 2023-06-26 16:31:16 -04:00
server.md docs: add server config docs 2023-12-22 14:37:24 -05:00
templates.md Integration of Jinja2 Templating (#875) 2024-01-17 09:47:52 -05:00