Merge pull request #14 from EbookFoundation/dev-david

Fixed bug regarding filepath of html. Changed setting for PrivateGPT …
pull/15/head
XxMistaCruzxX 2024-02-20 15:39:26 -05:00 committed by GitHub
commit 9d927b4c37
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 3 additions and 3 deletions

View File

@ -428,8 +428,8 @@ class AltTextHTML(AltText):
def parseFile(self, filepath: str) -> bs4.BeautifulSoup:
with open(filepath, encoding="utf8") as html:
self.filepath = filepath
l = filepath.split("/")
self.filepath = filepath.replace("\\", "/")
l = self.filepath.split("/")
self.filename = l.pop()
self.filedir = "/".join(l) + "/"
return self.parse(html)

View File

@ -15,7 +15,7 @@ class PrivateGPT(LangEngine):
"include_sources": False,
"prompt": prompt,
"stream": False,
"use_context": True,
"use_context": False,
}
r = requests.post(f"{self.host}/v1/completions", json=body)
r = r.json()