mirror of
https://github.com/nomic-ai/gpt4all
synced 2024-11-06 09:20:33 +00:00
394d9b4076
* chore: boilerplate, refactor in future * chore: boilerplate * feat: can compile succesfully * document .gyp file * add src, test and fix gyp * progress on prompting and some helper methods * add destructor and basic prompting work, prepare download function * download function done * download function edits and adding documentation * fix bindings memory issue and add tests and specs * add more documentation and readme * add npmignore * Update README.md Signed-off-by: Jacob Nguyen <76754747+jacoobes@users.noreply.github.com> * Update package.json - redundant scripts Signed-off-by: Jacob Nguyen <76754747+jacoobes@users.noreply.github.com> --------- Signed-off-by: Jacob Nguyen <76754747+jacoobes@users.noreply.github.com>
15 lines
302 B
C++
15 lines
302 B
C++
|
|
#include "stdcapture.h"
|
|
|
|
CoutRedirect::CoutRedirect() {
|
|
old = std::cout.rdbuf(buffer.rdbuf()); // redirect cout to buffer stream
|
|
}
|
|
|
|
std::string CoutRedirect::getString() {
|
|
return buffer.str(); // get string
|
|
}
|
|
|
|
CoutRedirect::~CoutRedirect() {
|
|
std::cout.rdbuf(old); // reverse redirect
|
|
}
|