games.chess.api_client_example¶

Example client for the Chess API.

This shows how to interact with the chess API to create and play games.

Classes¶

ChessAPIClient

Simple client for the Chess API.

Functions¶

main()

Example usage of the Chess API client.

Module Contents¶

class games.chess.api_client_example.ChessAPIClient(base_url='http://localhost:8000')¶

Simple client for the Chess API.

Init .

Parameters:

base_url (str) – [TODO: Add description]

create_game(white_provider='anthropic', white_model=None, black_provider='anthropic', black_model=None, enable_analysis=True, max_moves=200)¶

Create a new game.

Parameters:
  • white_provider (str)

  • white_model (str | None)

  • black_provider (str)

  • black_model (str | None)

  • enable_analysis (bool)

  • max_moves (int)

delete_game(game_id)¶

Delete a game.

Parameters:

game_id (str)

get_game_state(game_id)¶

Get current game state.

Parameters:

game_id (str)

list_games()¶

List all active games.

list_providers()¶

Get available LLM providers.

stream_game(game_id, callback=None)¶

Stream game events.

Parameters:

game_id (str)

games.chess.api_client_example.main()¶

Example usage of the Chess API client.