mirror of
https://github.com/LostRuins/koboldcpp.git
synced 2025-09-10 17:14:36 +00:00
added token count, updated lite
This commit is contained in:
parent
c49a469a79
commit
39dc1a46c4
5 changed files with 10 additions and 3 deletions
|
@ -164,6 +164,7 @@ def init_library():
|
|||
handle.has_finished.restype = ctypes.c_bool
|
||||
handle.get_last_eval_time.restype = ctypes.c_float
|
||||
handle.get_last_process_time.restype = ctypes.c_float
|
||||
handle.get_last_token_count.restype = ctypes.c_int
|
||||
handle.abort_generate.restype = ctypes.c_bool
|
||||
handle.get_pending_output.restype = ctypes.c_char_p
|
||||
|
||||
|
@ -465,7 +466,8 @@ class ServerRequestHandler(http.server.SimpleHTTPRequestHandler):
|
|||
elif self.path.endswith(('/api/extra/perf')):
|
||||
lastp = handle.get_last_process_time()
|
||||
laste = handle.get_last_eval_time()
|
||||
response_body = (json.dumps({"last_process":lastp,"last_eval":laste}).encode())
|
||||
lastc = handle.get_last_token_count()
|
||||
response_body = (json.dumps({"last_process":lastp,"last_eval":laste,"last_token_count":lastc}).encode())
|
||||
|
||||
if response_body is None:
|
||||
self.send_response(404)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue