feat: merge v0.6.9

This commit is contained in:
莘权 马 2024-02-01 22:19:14 +08:00
commit 19126e46ac
4 changed files with 45 additions and 19 deletions

View file

@ -39,6 +39,8 @@ class CostManager(BaseModel):
completion_tokens (int): The number of tokens used in the completion.
model (str): The model used for the API call.
"""
if prompt_tokens + completion_tokens == 0:
return
self.total_prompt_tokens += prompt_tokens
self.total_completion_tokens += completion_tokens
cost = (