34 asio::post(threads_, [
this, prompt = std::move(prompt),
35 told = std::move(told)]()
mutable {
36 absl::StatusOr<std::string> story = Complete(prompt);
37 asio::post(io_, [told = std::move(told), story = std::move(story)] {
std::function< void(absl::StatusOr< std::string >)> Told
Gets the story, or why there isn't one.
Storyteller(asio::io_context &io, std::string host)
void Tell(std::string prompt, Told told)
static constexpr uint16_t kPort