mirror of
https://github.com/csunny/DB-GPT.git
synced 2025-09-06 19:40:13 +00:00
feat: (0.6)New UI (#1855)
Co-authored-by: 夏姜 <wenfengjiang.jwf@digital-engine.com> Co-authored-by: aries_ckt <916701291@qq.com> Co-authored-by: wb-lh513319 <wb-lh513319@alibaba-inc.com> Co-authored-by: csunny <cfqsunny@163.com>
This commit is contained in:
@@ -37,9 +37,33 @@ def _build_model_request(input_value: Dict) -> ModelRequest:
|
||||
class LLMStrategyType(Enum):
|
||||
"""LLM strategy type."""
|
||||
|
||||
Priority = "priority"
|
||||
Auto = "auto"
|
||||
Default = "default"
|
||||
def __new__(cls, value, name_cn, description, description_en):
|
||||
"""Overide new."""
|
||||
obj = object.__new__(cls)
|
||||
obj._value_ = value
|
||||
obj.name_cn = name_cn
|
||||
obj.description = description
|
||||
obj.description_en = description_en
|
||||
return obj
|
||||
|
||||
Priority = ("priority", "优先级", "根据优先级使用模型", "Use LLM based on priority")
|
||||
Auto = ("auto", "自动", "自动选择的策略", "Automatically select LLM strategies")
|
||||
Default = (
|
||||
"default",
|
||||
"默认",
|
||||
"默认的策略",
|
||||
"Use the LLM specified by the system default",
|
||||
)
|
||||
|
||||
def to_dict(self):
|
||||
"""To dict."""
|
||||
return {
|
||||
"name": self.name,
|
||||
"name_cn": self.name_cn,
|
||||
"value": self.value,
|
||||
"description": self.description,
|
||||
"description_en": self.description_en,
|
||||
}
|
||||
|
||||
|
||||
class LLMStrategy:
|
||||
|
Reference in New Issue
Block a user