ai-game/game
projectmoon 6fff4ecacd Allow limiting of values on derive(Gbnf) structs.
With the new helper attribute #[gbnf_limit] on a field of a struct
that has #[derive(Gbnf)], it is now possible to constrain the output
of the LLM to a specific set of values for that field. This is
extremely useful, for example, when asking the LLM to put a specific
ID in a field.

This commit also addresses numerous shortcomings of the original
implementation of the derive macro.

Deserialization of certain LLM responses currently broken as of this
commit, due to different field names in the LLM output vs what serde
expects (camelCase vs snake_case issues).
2024-03-05 20:28:00 +01:00
..
src Allow limiting of values on derive(Gbnf) structs. 2024-03-05 20:28:00 +01:00
Cargo.lock Implement derive macro to convert structs to GBNF rules. 2024-02-05 16:12:05 +01:00
Cargo.toml Implement derive macro to convert structs to GBNF rules. 2024-02-05 16:12:05 +01:00
build.rs Implement derive macro to convert structs to GBNF rules. 2024-02-05 16:12:05 +01:00
koboldcpp.json Implement derive macro to convert structs to GBNF rules. 2024-02-05 16:12:05 +01:00