add ability to specify python version

This commit is contained in:
2023-10-23 05:49:57 +00:00
parent 32bdb3a297
commit 9e77a30658
7 changed files with 629 additions and 1 deletions

View File

@@ -4,8 +4,13 @@ module interface
export agent, addNewMessage, clearMessage, removeLatestMsg, generatePrompt_tokenPrefix,
generatePrompt_tokenSuffix
using JSON3, DataStructures, Dates, PythonCall
using JSON3, DataStructures, Dates
# Ref: https://github.com/JuliaPy/PythonCall.jl/issues/252
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()
function __init__()