|
nanoMMO 0.97.8
Building an MMO: The Engineering Series
|
#include <storyteller.h>
Public Types | |
| using | Told = std::function<void(absl::StatusOr<std::string>)> |
| Gets the story, or why there isn't one. | |
Public Member Functions | |
| Storyteller (asio::io_context &io, std::string host) | |
| void | Tell (std::string prompt, Told told) |
Static Public Attributes | |
| static constexpr uint16_t | kPort = 8000 |
Asks mvGPT's completions API, the storyteller service, for stories, on threads of its own, so that a tick never waits for the model.
Definition at line 16 of file storyteller.h.
| using nanommo::Storyteller::Told = std::function<void(absl::StatusOr<std::string>)> |
Gets the story, or why there isn't one.
Definition at line 21 of file storyteller.h.
| nanommo::Storyteller::Storyteller | ( | asio::io_context & | io, |
| std::string | host ) |
Definition at line 30 of file storyteller.cc.
| void nanommo::Storyteller::Tell | ( | std::string | prompt, |
| Told | told ) |
Asks for a story that goes on from the prompt, and calls told with it on the io_context's thread, where the rest of the server runs.
Definition at line 33 of file storyteller.cc.
|
staticconstexpr |
Definition at line 18 of file storyteller.h.