mirror of
https://github.com/LostRuins/koboldcpp.git
synced 2026-08-31 17:40:52 +02:00
added token count, updated lite
This commit is contained in:
+3
-1
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user