diff --git a/src/interface.jl b/src/interface.jl index cbb5b50..f29a03f 100644 --- a/src/interface.jl +++ b/src/interface.jl @@ -6,10 +6,18 @@ export agent, addNewMessage, clearMessage, removeLatestMsg, generatePrompt_token using JSON3, DataStructures, Dates +# ---------------------------------------------------------------------------- # +# pythoncall setting # +# ---------------------------------------------------------------------------- # # Ref: https://github.com/JuliaPy/PythonCall.jl/issues/252 +# by setting the following variables, PythonCall will use system python or conda python and +# packages installed by system or conda +# if these setting are not set (comment out), PythonCall will use its own python and package that +# installed by CondaPkg ENV["JULIA_CONDAPKG_BACKEND"] = "Null" systemPython = split(read(`which python`, String), "\n")[1] ENV["JULIA_PYTHONCALL_EXE"] = systemPython # find python location with $> which python ex. raw"/root/conda/bin/python" + using PythonCall const py_agents = PythonCall.pynew() const py_llms = PythonCall.pynew()