Enhance brewery generation: add country name parameter and improve prompt handling

This commit is contained in:
Aaron Po
2026-04-02 01:04:41 -04:00
parent 280c9c61bd
commit ac136f7179
6 changed files with 357 additions and 43 deletions

View File

@@ -13,11 +13,18 @@ public:
void load(const std::string &modelPath) override;
BreweryResult generateBrewery(const std::string &cityName,
const std::string &countryName,
const std::string &regionContext) override;
UserResult generateUser(const std::string &locale) override;
private:
std::string infer(const std::string &prompt, int maxTokens = 256);
std::string infer(const std::string &prompt, int maxTokens = 5000);
// Overload that allows passing a system message separately so chat-capable
// models receive a proper system role instead of having the system text
// concatenated into the user prompt (helps avoid revealing internal
// reasoning or instructions in model output).
std::string infer(const std::string &systemPrompt, const std::string &prompt,
int maxTokens = 5000);
llama_model *model_ = nullptr;
llama_context *context_ = nullptr;