mirror of
https://github.com/LostRuins/koboldcpp.git
synced 2025-09-10 17:14:36 +00:00
updated lite
This commit is contained in:
parent
2de1975ca2
commit
5451a8e8a9
2 changed files with 139 additions and 35 deletions
|
@ -1378,11 +1378,11 @@ def websearch(query):
|
|||
if matches.size > 100 and desclen-matches.size < 50: #good enough match
|
||||
# expand description by some chars both sides
|
||||
expandamtbefore = 250
|
||||
expandamtafter = 600
|
||||
expandamtafter = 750
|
||||
startpt = matches.a - expandamtbefore
|
||||
startpt = 0 if startpt < 0 else startpt
|
||||
endpt = matches.a + expandamtafter + desclen
|
||||
pagedesc = scraped[startpt:endpt]
|
||||
pagedesc = scraped[startpt:endpt].strip()
|
||||
except Exception:
|
||||
pass
|
||||
searchresults.append({"title":title,"url":url,"desc":desc,"content":pagedesc})
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue