haive.games.chess.llm_utils =========================== .. py:module:: haive.games.chess.llm_utils .. autoapi-nested-parse:: Chess-specific LLM utilities using the game LLM factory. This module provides chess-specific utilities for creating and configuring LLMs for chess gameplay, building on the core LLM factory system. Functions --------- .. autoapisummary:: haive.games.chess.llm_utils.create_chess_engines_from_config haive.games.chess.llm_utils.create_chess_engines_simple haive.games.chess.llm_utils.get_available_chess_providers haive.games.chess.llm_utils.get_recommended_chess_models Module Contents --------------- .. py:function:: create_chess_engines_from_config(white_config, black_config, enable_analysis = True, analyzer_configs = None) Create chess engines from simple configuration dictionaries. :param white_config: Config for white player with 'provider', 'model', etc. :param black_config: Config for black player with 'provider', 'model', etc. :param enable_analysis: Whether to create analyzer engines :param analyzer_configs: Optional separate configs for analyzers :returns: Dictionary of AugLLMConfig objects for all chess roles .. rubric:: Examples >>> # Simple provider-only config >>> engines = create_chess_engines_from_config( ... white_config={"provider": "anthropic"}, ... black_config={"provider": "openai"} ... ) >>> # With custom models >>> engines = create_chess_engines_from_config( ... white_config={ ... "provider": "anthropic", ... "model": "claude-3-opus-20240229" ... }, ... black_config={ ... "provider": "azure", ... "model": "gpt-4-turbo" ... } ... ) >>> # Separate analyzer configs >>> engines = create_chess_engines_from_config( ... white_config={"provider": "anthropic"}, ... black_config={"provider": "openai"}, ... analyzer_configs={ ... "white": {"provider": "azure"}, ... "black": {"provider": "azure"} ... } ... ) .. py:function:: create_chess_engines_simple(white_provider = 'anthropic', white_model = None, black_provider = 'anthropic', black_model = None, temperature = None, enable_analysis = True) Create chess engines with simple provider/model specification. :param white_provider: Provider for white (e.g., "anthropic", "openai") :param white_model: Model for white (uses default if None) :param black_provider: Provider for black :param black_model: Model for black (uses default if None) :param temperature: Temperature for all engines :param enable_analysis: Whether to create analyzer engines :returns: Dictionary of AugLLMConfig objects .. rubric:: Examples >>> # Use defaults >>> engines = create_chess_engines_simple() >>> # Different providers >>> engines = create_chess_engines_simple( ... white_provider="anthropic", ... black_provider="openai" ... ) >>> # Custom models >>> engines = create_chess_engines_simple( ... white_provider="anthropic", ... white_model="claude-3-opus-20240229", ... black_provider="openai", ... black_model="gpt-4-turbo" ... ) .. py:function:: get_available_chess_providers() Get list of available LLM providers for chess. :returns: List of provider names .. py:function:: get_recommended_chess_models() Get recommended models for chess gameplay. :returns: Dictionary mapping providers to recommended models