From 0058b3f6509ac2632b09048c02d3ff4fa17bdfa9 Mon Sep 17 00:00:00 2001 From: Martin Bielik Date: Wed, 12 Apr 2023 19:01:11 +0200 Subject: moving import openai check to python scripts --- py/utils.py | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'py/utils.py') diff --git a/py/utils.py b/py/utils.py index 56686c3..a0003a0 100644 --- a/py/utils.py +++ b/py/utils.py @@ -2,6 +2,11 @@ import datetime import sys import os +try: + import openai +except ImportError: + raise Exception("OpenAI module not found. Please install it with pip.") + is_debugging = vim.eval("g:vim_ai_debug") == "1" debug_log_file = vim.eval("g:vim_ai_debug_log_file") -- cgit v1.2.3