add android agent

This commit is contained in:
better629 2024-03-27 12:13:28 +08:00
commit 9d3571469c
33 changed files with 2076 additions and 3 deletions

View file

@ -75,6 +75,7 @@ class Config(CLIParams, YamlModel):
iflytek_api_key: str = ""
azure_tts_subscription_key: str = ""
azure_tts_region: str = ""
other: dict = dict() # other dict
@classmethod
def from_home(cls, path):
@ -127,6 +128,15 @@ class Config(CLIParams, YamlModel):
self.reqa_file = reqa_file
self.max_auto_summarize_code = max_auto_summarize_code
def set_other(self, other: dict):
self.other = other
def get_other(self, key: str, default_value: str = None):
if default_value is None:
return self.other.get(key)
else:
return self.other.get(key, default_value)
def get_openai_llm(self) -> Optional[LLMConfig]:
"""Get OpenAI LLMConfig by name. If no OpenAI, raise Exception"""
if self.llm.api_type == LLMType.OPENAI: