Skip to content

Commit

Permalink
Fix type error in ApiManager
Browse files Browse the repository at this point in the history
  • Loading branch information
Pwuts committed Aug 25, 2023
1 parent 6213558 commit c6e7d21
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion autogpt/llm/api_manager.py
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ def update_cost(self, prompt_tokens, completion_tokens, model):
self.total_prompt_tokens += prompt_tokens
self.total_completion_tokens += completion_tokens
self.total_cost += prompt_tokens * model_info.prompt_token_cost / 1000
if issubclass(type(model_info), CompletionModelInfo):
if isinstance(model_info, CompletionModelInfo):
self.total_cost += (
completion_tokens * model_info.completion_token_cost / 1000
)
Expand Down

0 comments on commit c6e7d21

Please sign in to comment.