mirror of
https://github.com/FoundationAgents/MetaGPT.git
synced 2026-06-26 15:49:42 +02:00
refine code
This commit is contained in:
parent
b16315f6c7
commit
244fa81ffe
7 changed files with 22 additions and 12 deletions
|
|
@ -78,7 +78,7 @@ class FireworksLLM(OpenAILLM):
|
|||
self.cost_manager = FireworksCostManager()
|
||||
|
||||
def _make_client_kwargs(self) -> dict:
|
||||
kwargs = dict(api_key=self.config.fireworks_api_key, base_url=self.config.fireworks_api_base)
|
||||
kwargs = dict(api_key=self.config.api_key, base_url=self.config.base_url)
|
||||
return kwargs
|
||||
|
||||
def _update_costs(self, usage: CompletionUsage):
|
||||
|
|
|
|||
|
|
@ -17,6 +17,8 @@ class YamlModel(BaseModel):
|
|||
|
||||
@classmethod
|
||||
def read_yaml(cls, file_path: Path) -> Dict:
|
||||
if not file_path.exists():
|
||||
return {}
|
||||
with open(file_path, "r") as file:
|
||||
return yaml.safe_load(file)
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue