mirror of
https://github.com/aaronpo97/the-biergarten-app.git
synced 2026-06-01 01:54:00 +00:00
Add llama grammar to ensure proper json output
This commit is contained in:
@@ -14,7 +14,7 @@
|
||||
|
||||
struct llama_model;
|
||||
struct llama_vocab;
|
||||
typedef int32_t llama_token;
|
||||
using llama_token = int32_t;
|
||||
|
||||
/**
|
||||
* @brief Normalizes and truncates regional context.
|
||||
@@ -60,12 +60,4 @@ std::optional<std::string> ValidateBreweryJson(const std::string& raw,
|
||||
std::string& name_out,
|
||||
std::string& description_out);
|
||||
|
||||
/**
|
||||
* @brief Extracts the last balanced JSON object from text.
|
||||
*
|
||||
* @param text Input text.
|
||||
* @return Extracted JSON object or an empty string if none exists.
|
||||
*/
|
||||
std::string ExtractLastJsonObject(const std::string& text);
|
||||
|
||||
#endif // BIERGARTEN_PIPELINE_INCLUDES_DATA_GENERATION_LLAMA_GENERATOR_HELPERS_H_
|
||||
|
||||
Reference in New Issue
Block a user