feat: Unified Cost Calculation Logic.

This commit is contained in:
莘权 马 2024-02-02 16:42:00 +08:00
parent fa622c2f97
commit 1b0dfbc846

View file

@ -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