Green Sky c99115f0d4
refactor, add stop and force commands
refine hardcoded system prompt a little
2024-01-26 12:45:08 +01:00

48 lines
1004 B
C++

#pragma once
#include "./rpbot.hpp"
#include <string>
#include <vector>
#include <future>
#include <cstdint>
struct TagStopRPBot {};
// sleeps until onMsg or onTimer
struct StateIdle {
static constexpr const char* name {"StateIdle"};
float timeout {0.f};
bool force {false};
};
// determines if self should generate a message
struct StateNext {
static constexpr const char* name {"StateNext"};
std::string prompt;
std::vector<std::string> possible_names;
std::vector<Contact3> possible_contacts;
std::future<int64_t> future;
};
// generate message
struct StateGenerateMsg {
static constexpr const char* name {"StateGenerateMsg"};
std::string prompt;
// returns new line (single message)
std::future<std::string> future;
};
// look if it took too long/too many new messages came in
// while also optionally sleeping to make message appear not too fast
// HACK: skip, just send for now
struct StateTimingCheck {
static constexpr const char* name {"StateTimingCheck"};
int tmp;
};