What problem does it solve?
Integrating new AI models or services into the AI Counsel deliberation system requires creating custom adapters, which involves handling subprocesses, HTTP requests, parsing outputs, and managing configuration. This skill provides a comprehensive guide to streamline the process of adding new models.
Core Features & Use Cases
- CLI Adapter Creation: Build adapters for command-line AI tools, managing subprocess execution and output parsing.
- HTTP Adapter Creation: Integrate HTTP-based AI APIs, handling request building, response parsing, and retry logic.
- Secure Configuration: Utilize environment variable substitution for API keys, keeping secrets out of config files.
- Robust Testing: Implement unit tests with mocking and VCR cassettes for HTTP interactions, ensuring reliable integrations.
- Use Case: Integrate a new local AI model served via Ollama by creating an HTTP adapter that correctly formats the API request and parses the JSON response, allowing it to participate in multi-model debates.
Quick Start
To create a new CLI adapter, create a file adapters/your_cli.py and define YourCLIAdapter inheriting from BaseCLIAdapter. Implement the parse_output method to extract the model's response from the raw CLI output.