This commit is contained in:
2023-10-23 08:32:24 +00:00
parent 465ff17357
commit c71ef812c1

View File

@@ -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()