From 1b0dfbc846d074d2823e3c084b66b5db85c0f54d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E8=8E=98=E6=9D=83=20=E9=A9=AC?= Date: Fri, 2 Feb 2024 16:42:00 +0800 Subject: [PATCH] feat: Unified Cost Calculation Logic. --- metagpt/provider/metagpt_api.py | 5 ----- 1 file changed, 5 deletions(-) diff --git a/metagpt/provider/metagpt_api.py b/metagpt/provider/metagpt_api.py index 8c7daeac6..d71fa9bda 100644 --- a/metagpt/provider/metagpt_api.py +++ b/metagpt/provider/metagpt_api.py @@ -10,7 +10,6 @@ from openai.types import CompletionUsage from metagpt.configs.llm_config import LLMType from metagpt.provider import OpenAILLM from metagpt.provider.llm_provider_registry import register_provider -from metagpt.utils.exceptions import handle_exception @register_provider(LLMType.METAGPT) @@ -19,7 +18,3 @@ class MetaGPTLLM(OpenAILLM): # The current billing is based on usage frequency. If there is a future billing logic based on the # number of tokens, please refine the logic here accordingly. return CompletionUsage(prompt_tokens=0, completion_tokens=0, total_tokens=0) - - @handle_exception - def _update_costs(self, usage: CompletionUsage): - pass