Skip to content

Commit

Permalink
change wrong total_tokens calculate method
Browse files Browse the repository at this point in the history
  • Loading branch information
yqwang96 authored Oct 22, 2024
1 parent e1ffb7b commit e9e8540
Showing 1 changed file with 0 additions and 1 deletion.
1 change: 0 additions & 1 deletion rag/llm/chat_model.py
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,6 @@ def chat_streamly(self, system, history, gen_conf):
resp.choices[0].delta.content = ""
ans += resp.choices[0].delta.content

total_tokens += 1
if not hasattr(resp, "usage") or not resp.usage:
total_tokens = (
total_tokens
Expand Down

0 comments on commit e9e8540

Please sign in to comment.