Skip to content

Commit

Permalink
minor fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
choccccy committed Jul 17, 2023
1 parent 1680811 commit 9b65a38
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions demo/chat_web_selects.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
Assume for the following it's at host my-llm-host, port 8000
pip install rerequisites, in addition to OgbujiPT cloned dir:
pip install prerequisites, in addition to OgbujiPT cloned dir:
click sentence_transformers qdrant-client httpx html2text
Expand Down Expand Up @@ -64,7 +64,7 @@ async def read_site(url, collection):
print('Downloading & processing', url)
async with httpx.AsyncClient(verify=False) as client:
resp = await client.get(url)
html = resp.content.decode(resp.encoding)
html = resp.content.decode(resp.encoding or 'utf-8')

# with open('/tmp/ahiajoku.igbonet.com-2000.html') as fp:
# html = fp.read()
Expand Down Expand Up @@ -109,7 +109,7 @@ async def async_main(sites, api_params):
if docs:
# Collects "chunked_doc" into "gathered_chunks"
gathered_chunks = '\n\n'.join(
doc.payload['_text'] for doc in docs
doc.payload['_text'] for doc in docs if doc.payload
)

# Build prompt the doc chunks as context
Expand Down

0 comments on commit 9b65a38

Please sign in to comment.