Merge pull request #14 from EbookFoundation/dev-david
Fixed bug regarding filepath of html. Changed setting for PrivateGPT …pull/15/head
commit
9d927b4c37
|
@ -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)
|
||||
|
|
|
@ -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()
|
||||
|
|
Loading…
Reference in New Issue