This commit is contained in:
Green Sky 2024-10-25 12:54:04 +02:00
parent 301900c507
commit 31855cd1b1
No known key found for this signature in database
2 changed files with 3 additions and 2 deletions

View File

@ -140,7 +140,7 @@ RPBot::RPBot(
Contact3Registry& cr,
RegistryMessageModelI& rmm,
MessageCommandDispatcher* mcd
) : _completion(completion), _conf(conf), _cr(cr), _rmm(rmm), _mcd(mcd) {
) : _completion(completion), _conf(conf), _cr(cr), _rmm(rmm), _rmm_sr(_rmm.newSubRef(this)), _mcd(mcd) {
//system_prompt = R"sys(Transcript of a group chat, where Bob talks to online strangers.
//)sys";
@ -157,7 +157,7 @@ R"sys(Transcript of a group chat, where {self_name} talks to online strangers.
registerCommands();
_rmm.subscribe(this, RegistryMessageModel_Event::message_construct);
_rmm_sr.subscribe(RegistryMessageModel_Event::message_construct);
}
float RPBot::tick(float time_delta) {

View File

@ -21,6 +21,7 @@ struct RPBot : public RegistryMessageModelEventI {
ConfigModelI& _conf;
Contact3Registry& _cr;
RegistryMessageModelI& _rmm;
RegistryMessageModelI::SubscriptionReference _rmm_sr;
MessageCommandDispatcher* _mcd;
std::minstd_rand _rng{std::random_device{}()};