MCPcopy
hub / github.com/algorithmicsuperintelligence/optillm / get_config_path

Function get_config_path

optillm/server.py:342–360  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

340 logger.warning("No plugins loaded from any location")
341
342def get_config_path():
343 # Get installed package config directory
344 import optillm
345 package_config_dir = os.path.join(os.path.dirname(optillm.__file__), 'cepo', 'configs')
346 package_config_path = os.path.join(package_config_dir, 'cepo_config.yaml')
347
348 # Get local project config directory
349 current_dir = os.getcwd() if server_config.get("config_dir", "") == "" else server_config["config_dir"]
350 local_config_dir = os.path.join(current_dir, 'optillm', 'cepo', 'configs')
351 local_config_path = os.path.join(local_config_dir, 'cepo_config.yaml')
352
353 # If local config exists and is different from package config, use local
354 if os.path.exists(local_config_path) and local_config_path != package_config_path:
355 logger.debug(f"Using local config from: {local_config_path}")
356 return local_config_path
357
358 # Otherwise use package config
359 logger.debug(f"Using package config from: {package_config_path}")
360 return package_config_path
361
362def parse_combined_approach(model: str, known_approaches: list, plugin_approaches: dict):
363 if model == 'auto':

Callers 1

parse_argsFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected