Remove direct access to std streams from "run"

The goal is to allow running "run" while connected to other streams,
such as TCP sockets.

Signed-off-by: Thiago Padilha <thiago@padilha.cc>
This commit is contained in:
Thiago Padilha
2023-03-22 09:55:45 -03:00
parent b7f1fa6d8c
commit bf44faa0ee
3 changed files with 40 additions and 30 deletions

6
run.h
View File

@@ -3,4 +3,8 @@
#include "llama.h"
#include "utils.h"
int run(llama_context * ctx, gpt_params params);
int run(llama_context * ctx,
gpt_params params,
std::istream & instream,
FILE *outstream,
FILE *errstream);