fix: stabilize Gemma 4 brewery generation

remove misleading turn-token output guidance from the brewery prompt
extract the last balanced JSON object before validation
keep README model setup and run instructions aligned
preserve Gemma 4 sampling defaults and local model usage
This commit is contained in:
Aaron Po
2026-04-10 22:25:26 -04:00
parent 902bda6eb9
commit 8c572a2d07
5 changed files with 74 additions and 44 deletions

View File

@@ -77,4 +77,12 @@ std::string ValidateBreweryJsonPublic(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 ExtractLastJsonObjectPublic(const std::string& text);
#endif // BIERGARTEN_PIPELINE_DATA_GENERATION_LLAMA_GENERATOR_HELPERS_H_