1
0
Fork 0
mirror of https://gitlab.com/niansa/libjustlm.git synced 2025-03-06 20:49:17 +01:00

Added python bindings for grammar

This commit is contained in:
niansa/tuxifan 2023-09-05 09:27:45 +02:00
parent 79cf49faae
commit f5314a0dde

View file

@ -38,6 +38,9 @@ PYBIND11_MODULE(justlm_py, m) {
.def("get_prompt", &Inference::get_prompt)
.def("get_context_size", &Inference::get_context_size)
.def("is_mirostat_available", &Inference::is_mirostat_available)
.def("is_grammar_available", &Inference::is_grammar_available)
.def("load_grammar", &Inference::load_grammar)
.def("unload_grammar", &Inference::unload_grammar)
.def_readwrite("params", &Inference::params);
py::class_<Inference::Savestate>(m, "Savestate")
.def(py::init<>());