mirror of
https://github.com/LostRuins/koboldcpp.git
synced 2025-09-11 01:24:36 +00:00
every request has timestamp
This commit is contained in:
parent
ea55f69dc1
commit
a785a91e56
1 changed files with 3 additions and 4 deletions
|
@ -15,6 +15,7 @@ import platform
|
||||||
import base64
|
import base64
|
||||||
import json, sys, http.server, time, asyncio, socket, threading
|
import json, sys, http.server, time, asyncio, socket, threading
|
||||||
from concurrent.futures import ThreadPoolExecutor
|
from concurrent.futures import ThreadPoolExecutor
|
||||||
|
from datetime import datetime, timezone
|
||||||
|
|
||||||
# constants
|
# constants
|
||||||
sampler_order_max = 7
|
sampler_order_max = 7
|
||||||
|
@ -2007,8 +2008,9 @@ Enter Prompt:<br>
|
||||||
return
|
return
|
||||||
|
|
||||||
is_quiet = args.quiet
|
is_quiet = args.quiet
|
||||||
|
utfprint(f"\n{datetime.now().strftime('[%H:%M:%S] Input Received')}")
|
||||||
if (args.debugmode != -1 and not is_quiet) or args.debugmode >= 1:
|
if (args.debugmode != -1 and not is_quiet) or args.debugmode >= 1:
|
||||||
utfprint("\nInput: " + json.dumps(genparams))
|
utfprint(f"Input: " + json.dumps(genparams))
|
||||||
|
|
||||||
if args.foreground:
|
if args.foreground:
|
||||||
bring_terminal_to_foreground()
|
bring_terminal_to_foreground()
|
||||||
|
@ -3351,7 +3353,6 @@ def show_gui_msgbox(title,message):
|
||||||
pass
|
pass
|
||||||
|
|
||||||
def print_with_time(txt):
|
def print_with_time(txt):
|
||||||
from datetime import datetime
|
|
||||||
print(f"{datetime.now().strftime('[%H:%M:%S]')} " + txt, flush=True)
|
print(f"{datetime.now().strftime('[%H:%M:%S]')} " + txt, flush=True)
|
||||||
|
|
||||||
def make_url_request(url, data, method='POST', headers={}):
|
def make_url_request(url, data, method='POST', headers={}):
|
||||||
|
@ -3390,7 +3391,6 @@ def make_url_request(url, data, method='POST', headers={}):
|
||||||
|
|
||||||
#A very simple and stripped down embedded horde worker with no dependencies
|
#A very simple and stripped down embedded horde worker with no dependencies
|
||||||
def run_horde_worker(args, api_key, worker_name):
|
def run_horde_worker(args, api_key, worker_name):
|
||||||
from datetime import datetime
|
|
||||||
import random
|
import random
|
||||||
global friendlymodelname, maxhordectx, maxhordelen, exitcounter, punishcounter, modelbusy, session_starttime, sslvalid
|
global friendlymodelname, maxhordectx, maxhordelen, exitcounter, punishcounter, modelbusy, session_starttime, sslvalid
|
||||||
httpsaffix = ("https" if sslvalid else "http")
|
httpsaffix = ("https" if sslvalid else "http")
|
||||||
|
@ -4260,7 +4260,6 @@ def main(launch_args,start_server=True):
|
||||||
timer_thread.start()
|
timer_thread.start()
|
||||||
|
|
||||||
if args.model_param and (args.benchmark or args.prompt):
|
if args.model_param and (args.benchmark or args.prompt):
|
||||||
from datetime import datetime, timezone
|
|
||||||
start_server = False
|
start_server = False
|
||||||
save_to_file = (args.benchmark and args.benchmark!="stdout" and args.benchmark!="")
|
save_to_file = (args.benchmark and args.benchmark!="stdout" and args.benchmark!="")
|
||||||
benchmaxctx = maxctx
|
benchmaxctx = maxctx
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue