🌟 The Multi-Agent Framework: First AI Software Company, Towards Natural Language Programming
fix client_kwargs due to previous PR delete sync client
better6291f9234eee8c5
diff --git a/metagpt/provider/fireworks_api.py b/metagpt/provider/fireworks_api.pyindex 5fe86fc1c..638b0703d 100644--- a/metagpt/provider/fireworks_api.py+++ b/metagpt/provider/fireworks_api.py@@ -85,10 +85,9 @@ class FireworksLLM(OpenAILLM):self._init_client()self.model = self.config.fireworks_api_model # `self.model` should after `_make_client` to rewrite it- def _make_client_kwargs(self) -> (dict, dict):+ def _make_client_kwargs(self) -> dict:kwargs = dict(api_key=self.config.fireworks_api_key, base_url=self.config.fireworks_api_base)- async_kwargs = kwargs.copy()- return kwargs, async_kwargs+ return kwargsdef _update_costs(self, usage: CompletionUsage):if self.config.calc_usage and usage:diff --git a/metagpt/provider/open_llm_api.py b/metagpt/provider/open_llm_api.pyindex 2893f5b30..976e95c57 100644--- a/metagpt/provider/open_llm_api.py+++ b/metagpt/provider/open_llm_api.py@@ -48,10 +48,9 @@ class OpenLLMGPTAPI(OpenAILLM):self._init_client()self.model = self.config.open_llm_api_model # `self.model` should after `_make_client` to rewrite it- def _make_client_kwargs(self) -> (dict, dict):+ def _make_client_kwargs(self) -> dict:kwargs = dict(api_key="sk-xxx", base_url=self.config.open_llm_api_base)- async_kwargs = kwargs.copy()- return kwargs, async_kwargs+ return kwargsdef _calc_usage(self, messages: list[dict], rsp: str) -> CompletionUsage:usage = CompletionUsage(prompt_tokens=0, completion_tokens=0, total_tokens=0)