Skip to content

Commit

Permalink
Always create the ~/r2ai.models symlink
Browse files Browse the repository at this point in the history
  • Loading branch information
radare committed May 14, 2024
1 parent b5a0dee commit 1d96a4f
Showing 1 changed file with 12 additions and 2 deletions.
14 changes: 12 additions & 2 deletions r2ai/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,18 @@ def __main__():
except:
pass

# run `make vectordb` because pip install vectordb2 is too old
sys.path.append(f"vectordb")

# create symlink if it doesnt exist
try:
import appdirs
dst = os.environ["HOME"] + "/.r2ai.models"
udd = appdirs.user_data_dir("r2ai")
src = os.path.join(udd, "models")
if not os.path.exists(dst):
os.symlink(src, dst)
except:
traceback.print_exc()
pass

OPENAI_KEY = ""
try:
Expand Down

0 comments on commit 1d96a4f

Please sign in to comment.