adapter-factory

Community

Integrate new AI models, expand deliberation.

Authorblueman82
Version1.0.0
Installs0

System Documentation

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.

Dependency Matrix

Required Modules

httpxtenacityvcrpy

Components

Standard package

💻 Claude Code Installation

Recommended: Let Claude install automatically. Simply copy and paste the text below to Claude Code.

Please help me install this Skill:
Name: adapter-factory
Download link: https://github.com/blueman82/ai-counsel/archive/main.zip#adapter-factory

Please download this .zip file, extract it, and install it in the .claude/skills/ directory.
View Source Repository

Agent Skills Search Helper

Install a tiny helper to your Agent, search and equip skill from 471,000+ vetted skills library on demand.