Nam Nguyen commited on
Commit
ecaf5c0
·
verified ·
1 Parent(s): 0753a4b

Update handler.py

Browse files
Files changed (1) hide show
  1. handler.py +2 -1
handler.py CHANGED
@@ -46,9 +46,10 @@ class EndpointHandler:
46
  min_p=0.1,
47
  )
48
 
 
49
  response = extract_assistant_response_simple(self.tokenizer.decode(outputs[0]))
50
  end = time.perf_counter()
51
  elapsed = end - start
52
 
53
- return {"response": response, "elapsed": elapsed}
54
 
 
46
  min_p=0.1,
47
  )
48
 
49
+ response_length = len(outputs[0])
50
  response = extract_assistant_response_simple(self.tokenizer.decode(outputs[0]))
51
  end = time.perf_counter()
52
  elapsed = end - start
53
 
54
+ return {"response": response, "response_token_length": response_length, "elapsed": elapsed}
55