add examples/andriod_assistant framework

This commit is contained in:
better629 2024-01-25 16:07:33 +08:00
parent 7fe2a291f2
commit 0aba36fdad
15 changed files with 474 additions and 0 deletions

View file

@ -80,6 +80,7 @@ class Config(CLIParams, YamlModel):
AZURE_TTS_SUBSCRIPTION_KEY: str = ""
AZURE_TTS_REGION: str = ""
mermaid_engine: str = "nodejs"
other: dict = dict() # other dict
@classmethod
def from_home(cls, path):
@ -118,6 +119,12 @@ 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):
return self.other.get(key)
def get_openai_llm(self) -> Optional[LLMConfig]:
"""Get OpenAI LLMConfig by name. If no OpenAI, raise Exception"""
if self.llm.api_type == LLMType.OPENAI: