mirror of
https://gitlab.com/niansa/llama_any.git
synced 2025-03-06 20:48:27 +01:00
Clear screen after reading input
This commit is contained in:
parent
06f836c0d4
commit
4d18248a78
1 changed files with 7 additions and 1 deletions
8
main.cpp
8
main.cpp
|
@ -27,11 +27,17 @@ int main()
|
|||
|
||||
// Connection loop
|
||||
for (;; rt.cooperate()) {
|
||||
// Read prompt
|
||||
const auto prompt = rt.readInput("Prompt");
|
||||
|
||||
// Clear screen
|
||||
rt.clearScreen();
|
||||
|
||||
// Display prompt
|
||||
std::cout << "Prompt: " << prompt << std::endl;
|
||||
|
||||
// Run inference
|
||||
client.ask(rt.readInput("Prompt"), [&rt] (float progress) {
|
||||
client.ask(prompt, [&rt] (float progress) {
|
||||
std::cout << unsigned(progress) << "%\r" << std::flush;
|
||||
rt.cooperate();
|
||||
}, [&rt] (std::string_view token) {
|
||||
|
|
Loading…
Add table
Reference in a new issue