(self, ds_id: int, trans: Trans = None)
| 225 | return schema_str, [] |
| 226 | |
| 227 | def get_ds(self, ds_id: int, trans: Trans = None): |
| 228 | if self.ds_list: |
| 229 | for ds in self.ds_list: |
| 230 | if ds.id == ds_id: |
| 231 | return ds |
| 232 | else: |
| 233 | raise Exception("Datasource list is not found.") |
| 234 | raise Exception(f"Datasource id {ds_id} is not found." if trans is None else trans( |
| 235 | 'i18n_data_training.datasource_id_not_found', key=ds_id)) |
| 236 | |
| 237 | def convert2schema(self, ds_dict: dict, config: dict[any]) -> AssistantOutDsSchema: |
| 238 | id_marker: str = '' |
no outgoing calls
no test coverage detected