MCPcopy Create free account
hub / github.com/algorithmicsuperintelligence/optillm / parse_combined_approach

Function parse_combined_approach

optillm/server.py:362–394  ·  view source on GitHub ↗
(model: str, known_approaches: list, plugin_approaches: dict)

Source from the content-addressed store, hash-verified

360 return package_config_path
361
362def 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
396def execute_single_approach(approach, system_prompt, initial_query, client, model, request_config: dict = None, request_id: str = None):
397 if approach in known_approaches:

Callers 2

test_ci_quick.pyFile · 0.90
proxyFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected