mirror of
https://github.com/LostRuins/koboldcpp.git
synced 2026-08-26 15:15:16 +02:00
fix(console): print websearch status on its own line (#2340)
The two websearch status messages in koboldcpp.py print with no leading
newline, so they run onto the end of the preceding generation-stats line
(which has no trailing newline), e.g.:
...Total:26.31sReturning cached websearch...
Give both the cached-result print and the new-search print a leading
newline so each starts on its own line, matching the approach already
taken elsewhere (adding the missing newline at the offending print
rather than changing the stats line). Fixes #2337.
Co-authored-by: Anai-Guo <antai12232931@anaiguo.com>
This commit is contained in:
+2
-2
@@ -3206,13 +3206,13 @@ def websearch(query):
|
||||
return []
|
||||
query = query[:300] # only search first 300 chars, due to search engine limits
|
||||
if query==websearch_lastquery:
|
||||
print("Returning cached websearch...")
|
||||
print("\nReturning cached websearch...")
|
||||
return websearch_lastresponse
|
||||
import difflib
|
||||
from html.parser import HTMLParser
|
||||
num_results = 3
|
||||
searchresults = []
|
||||
utfprint("Performing new websearch...",1)
|
||||
utfprint("\nPerforming new websearch...",1)
|
||||
|
||||
def fetch_searched_webpage(url, random_agent=False):
|
||||
from urllib.parse import quote, urlsplit, urlunsplit
|
||||
|
||||
Reference in New Issue
Block a user