(model: str, known_approaches: list, plugin_approaches: dict)
| 360 | return package_config_path |
| 361 | |
| 362 | def parse_combined_approach(model: str, known_approaches: list, plugin_approaches: dict): |
| 363 | if model == 'auto': |
| 364 | return 'SINGLE', ['none'], model |
| 365 | |
| 366 | parts = model.split('-') |
| 367 | approaches = [] |
| 368 | operation = 'SINGLE' |
| 369 | model_parts = [] |
| 370 | parsing_approaches = True |
| 371 | |
| 372 | for part in parts: |
| 373 | if parsing_approaches: |
| 374 | if part in known_approaches or part in plugin_approaches: |
| 375 | approaches.append(part) |
| 376 | elif '&' in part: |
| 377 | operation = 'AND' |
| 378 | approaches.extend(part.split('&')) |
| 379 | elif '|' in part: |
| 380 | operation = 'OR' |
| 381 | approaches.extend(part.split('|')) |
| 382 | else: |
| 383 | parsing_approaches = False |
| 384 | model_parts.append(part) |
| 385 | else: |
| 386 | model_parts.append(part) |
| 387 | |
| 388 | if not approaches: |
| 389 | approaches = ['none'] |
| 390 | operation = 'SINGLE' |
| 391 | |
| 392 | actual_model = '-'.join(model_parts) |
| 393 | |
| 394 | return operation, approaches, actual_model |
| 395 | |
| 396 | def execute_single_approach(approach, system_prompt, initial_query, client, model, request_config: dict = None, request_id: str = None): |
| 397 | if approach in known_approaches: |
no outgoing calls
no test coverage detected