Below find the first vanilla template I created in Feb24. Good "starting" place for thoughts. [February 2024 V1.0 Alpha] <- https://github.com/alanchelmickjr/consensus/tree/Vanilla-Template-01-Backup
ERACAI (Ensemble Response through AI Consensus) is a cutting-edge AI system that leverages multiple language models to generate consensus-based responses. By querying various AI models and implementing a majority voting mechanism, ERACAI provides more reliable and balanced answers to user queries.
- Multi-Model Querying: Simultaneously queries OpenAI, Anthropic, Google, and Groq AI models.
- Consensus Mechanism: Implements majority voting to determine the best response.
- Asynchronous Processing: Utilizes asyncio for efficient parallel processing of model queries.
- Weaviate Integration: Stores results in a Weaviate vector database for future reference and analysis.
- FastAPI Backend: Provides a robust and fast API interface for easy integration.
- CLI Tool: Includes a command-line interface for quick testing and interaction.
-
Clone the repository: git clone https://github.com/yourusername/eracai.git cd eracai
-
Install the package: pip install -e .
-
Set up your environment variables by copying the '.env.example' file to '.env' and filling in your API keys: cp .env.example .env
from eracai.main import consensus_response
async def main():
result = await consensus_response("Who is the hottest actress this year?")
print(result.content)
asyncio.run(main())
Start the FastAPI server:
uvicorn eracai.api:app --reload
Then, you can send POST requests to 'http://localhost:8000/query' with a JSON body:
{
"text": "Who is the hottest actress this year?",
"max_tokens": 100,
"temperature": 0.7
}
eracai query "Who is the hottest actress this year?"
Adjust the settings in your '.env' file to configure API keys, model parameters, and Weaviate connection details.
Contributions are welcome! Please feel free to submit a Pull Request.
This project is licensed under the MIT License - see the LICENSE file for details.