| 139 | ) |
| 140 | |
| 141 | def update(self, config: dict): |
| 142 | self.max_chat_nums = ( |
| 143 | config["max_chat_nums"] |
| 144 | if "max_chat_nums" in config |
| 145 | else self.max_chat_nums |
| 146 | ) |
| 147 | |
| 148 | self.transit_type = ( |
| 149 | config["transit_type"] |
| 150 | if "transit_type" in config |
| 151 | else self.transit_type |
| 152 | ) |
| 153 | self.transit_system_prompt = ( |
| 154 | config["transit_system"] |
| 155 | if "transit_system" in config |
| 156 | else self.transit_system_prompt |
| 157 | ) |
| 158 | self.transit_last_prompt = ( |
| 159 | config["transit_last_prompt"] |
| 160 | if "transit_last_prompt" in config |
| 161 | else self.transit_last_prompt |
| 162 | ) |
| 163 | self.transit_extract_word = ( |
| 164 | config["transit_extract_word"] |
| 165 | if "transit_extract_word" in config |
| 166 | else self.transit_extract_word |
| 167 | ) |
| 168 | |
| 169 | self.route_type = ( |
| 170 | config["route_type"] if "route_type" in config else self.route_type |
| 171 | ) |
| 172 | self.route_system_prompt = ( |
| 173 | config["route_system_prompt"] |
| 174 | if "route_system_prompt" in config |
| 175 | else self.route_system_prompt |
| 176 | ) |
| 177 | self.route_last_prompt = ( |
| 178 | config["route_last_prompt"] |
| 179 | if "route_last_prompt" in config |
| 180 | else self.route_last_prompt |
| 181 | ) |
| 182 | self.route_extract_word = ( |
| 183 | config["route_extract_word"] |
| 184 | if "route_extract_word" in config |
| 185 | else self.route_extract_word |
| 186 | ) |
| 187 | |
| 188 | def __init__(self, config_path_or_dict: Union[str, dict] = None) -> None: |
| 189 | super().__init__(config_path_or_dict) |