mirror of
https://github.com/FoundationAgents/MetaGPT.git
synced 2026-05-04 21:32:38 +02:00
Merge branch 'main'
This commit is contained in:
commit
c18f384356
17 changed files with 373 additions and 20 deletions
|
|
@ -45,8 +45,18 @@ class Config(metaclass=Singleton):
|
|||
self.global_proxy = self._get("GLOBAL_PROXY")
|
||||
self.openai_api_key = self._get("OPENAI_API_KEY")
|
||||
self.anthropic_api_key = self._get("Anthropic_API_KEY")
|
||||
|
||||
#星火大模型相关
|
||||
self.xinghuo_appid = self._get("xinghuo_appid")
|
||||
self.xinghuo_api_secret = self._get("xinghuo_api_secret")
|
||||
self.xinghuo_api_key = self._get("xinghuo_api_key")
|
||||
self.domain=self._get("domain")
|
||||
self.Spark_url=self._get("Spark_url")
|
||||
self.no_api_mode=self._get("no_api_mode")
|
||||
if (not self.openai_api_key or "YOUR_API_KEY" == self.openai_api_key) and (
|
||||
not self.anthropic_api_key or "YOUR_API_KEY" == self.anthropic_api_key
|
||||
)and (
|
||||
not self.xinghuo_api_key or "APIKey" == self.xinghuo_api_key
|
||||
):
|
||||
raise NotConfiguredException("Set OPENAI_API_KEY or Anthropic_API_KEY first")
|
||||
self.openai_api_base = self._get("OPENAI_API_BASE")
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue