diff --git a/Makefile b/Makefile index 058fb5836..338ea0ce7 100644 --- a/Makefile +++ b/Makefile @@ -592,7 +592,8 @@ main: examples/main/main.cpp ocaml-example-script.o plugin_nodejs.o plugin_oca @echo @echo '==== Run ./main -h for help. ====' @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 infill: examples/infill/infill.cpp ggml.o llama.o $(COMMON_DEPS) console.o grammar-parser.o $(OBJS) diff --git a/caml_src/step.ml b/caml_src/step.ml index 954823226..8b2569277 100644 --- a/caml_src/step.ml +++ b/caml_src/step.ml @@ -8,9 +8,13 @@ let shutdown () = Printf.printf "Shutting down Game module...\n"; flush stdout;; -let step () = - (* Printf.printf "bla\n"; *) - flush stdout;; +let step (s:string) : string = + Printf.printf "Hello Ocaml from LLama\n"; + flush stdout; + s ^ "Hello Ocaml\n";; + + + (* main/init *) let () = diff --git a/plugin_ocaml.cpp b/plugin_ocaml.cpp index 8ece24889..812501787 100644 --- a/plugin_ocaml.cpp +++ b/plugin_ocaml.cpp @@ -81,8 +81,6 @@ std::string process_output_plugin_ocaml(const std::string start, assert( step_fn ); value ocamlString = caml_copy_string(input.c_str()); - // - value result= caml_callback( *step_fn, ocamlString ); std::string resultString = "todo"; //String_val(result);