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:
|
def parseFile(self, filepath: str) -> bs4.BeautifulSoup:
|
||||||
with open(filepath, encoding="utf8") as html:
|
with open(filepath, encoding="utf8") as html:
|
||||||
self.filepath = filepath
|
self.filepath = filepath.replace("\\", "/")
|
||||||
l = filepath.split("/")
|
l = self.filepath.split("/")
|
||||||
self.filename = l.pop()
|
self.filename = l.pop()
|
||||||
self.filedir = "/".join(l) + "/"
|
self.filedir = "/".join(l) + "/"
|
||||||
return self.parse(html)
|
return self.parse(html)
|
||||||
|
|
|
@ -15,7 +15,7 @@ class PrivateGPT(LangEngine):
|
||||||
"include_sources": False,
|
"include_sources": False,
|
||||||
"prompt": prompt,
|
"prompt": prompt,
|
||||||
"stream": False,
|
"stream": False,
|
||||||
"use_context": True,
|
"use_context": False,
|
||||||
}
|
}
|
||||||
r = requests.post(f"{self.host}/v1/completions", json=body)
|
r = requests.post(f"{self.host}/v1/completions", json=body)
|
||||||
r = r.json()
|
r = r.json()
|
||||||
|
|
Loading…
Reference in New Issue