now working v1
This commit is contained in:
parent
ad7fc5450e
commit
7025832f4d
3 changed files with 9 additions and 6 deletions
3
Makefile
3
Makefile
|
@ -592,7 +592,8 @@ main: examples/main/main.cpp ocaml-example-script.o plugin_nodejs.o plugin_oca
|
||||||
@echo
|
@echo
|
||||||
@echo '==== Run ./main -h for help. ===='
|
@echo '==== Run ./main -h for help. ===='
|
||||||
@echo
|
@echo
|
||||||
ocaml-example-script.o:
|
#nasty hack
|
||||||
|
ocaml-example-script.o: caml_src/step.ml
|
||||||
ocamlopt -g -fPIC -linkall -output-obj caml_src/step.ml -o ocaml-example-script.o
|
ocamlopt -g -fPIC -linkall -output-obj caml_src/step.ml -o ocaml-example-script.o
|
||||||
|
|
||||||
infill: examples/infill/infill.cpp ggml.o llama.o $(COMMON_DEPS) console.o grammar-parser.o $(OBJS)
|
infill: examples/infill/infill.cpp ggml.o llama.o $(COMMON_DEPS) console.o grammar-parser.o $(OBJS)
|
||||||
|
|
|
@ -8,9 +8,13 @@ let shutdown () =
|
||||||
Printf.printf "Shutting down Game module...\n";
|
Printf.printf "Shutting down Game module...\n";
|
||||||
flush stdout;;
|
flush stdout;;
|
||||||
|
|
||||||
let step () =
|
let step (s:string) : string =
|
||||||
(* Printf.printf "bla\n"; *)
|
Printf.printf "Hello Ocaml from LLama\n";
|
||||||
flush stdout;;
|
flush stdout;
|
||||||
|
s ^ "Hello Ocaml\n";;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
(* main/init *)
|
(* main/init *)
|
||||||
let () =
|
let () =
|
||||||
|
|
|
@ -81,8 +81,6 @@ std::string process_output_plugin_ocaml(const std::string start,
|
||||||
assert( step_fn );
|
assert( step_fn );
|
||||||
value ocamlString = caml_copy_string(input.c_str());
|
value ocamlString = caml_copy_string(input.c_str());
|
||||||
|
|
||||||
//
|
|
||||||
|
|
||||||
value result= caml_callback( *step_fn, ocamlString );
|
value result= caml_callback( *step_fn, ocamlString );
|
||||||
std::string resultString = "todo";
|
std::string resultString = "todo";
|
||||||
//String_val(result);
|
//String_val(result);
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue