🌟 The Multi-Agent Framework: First AI Software Company, Towards Natural Language Programming
Update openai_api.py
zhaoweiguo0c0cfe017f69
diff --git a/metagpt/provider/openai_api.py b/metagpt/provider/openai_api.pyindex 1d2057e50..bd9c02231 100644--- a/metagpt/provider/openai_api.py+++ b/metagpt/provider/openai_api.py@@ -114,9 +114,6 @@ class OpenAILLM(BaseLLM):elif hasattr(chunk.choices[0], "usage"):# The usage of some services is an attribute of chunk.choices[0], such as Moonshotusage = CompletionUsage(**chunk.choices[0].usage)- elif "openrouter.ai" in self.config.base_url and chunk_has_usage:- # due to it get token cost from api- usage = chunk.usagehas_finished = Truelog_llm_stream("\n")