Merge pull request #13 from fernvenue/patch-1

Redirect PosixPath to WindowsPath on Windows.
This commit is contained in:
Alex
2023-02-05 13:33:29 +00:00
committed by GitHub

View File

@@ -9,6 +9,13 @@ from langchain import OpenAI
from langchain.chains import VectorDBQAWithSourcesChain
from langchain.prompts import PromptTemplate
# Redirect PosixPath to WindowsPath on Windows
import platform
if platform.system() == "Windows":
import pathlib
temp = pathlib.PosixPath
pathlib.PosixPath = pathlib.WindowsPath
# loading the .env file
dotenv.load_dotenv()