mirror of
https://github.com/FoundationAgents/MetaGPT.git
synced 2026-04-27 17:56:23 +02:00
fix client_kwargs due to previous PR delete sync client
This commit is contained in:
parent
641c71bf18
commit
1f9234eee8
2 changed files with 4 additions and 6 deletions
|
|
@ -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 kwargs
|
||||
|
||||
def _update_costs(self, usage: CompletionUsage):
|
||||
if self.config.calc_usage and usage:
|
||||
|
|
|
|||
|
|
@ -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 kwargs
|
||||
|
||||
def _calc_usage(self, messages: list[dict], rsp: str) -> CompletionUsage:
|
||||
usage = CompletionUsage(prompt_tokens=0, completion_tokens=0, total_tokens=0)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue