A comprehensive AI assistant that can search the web, access social media, generate images, and provide intelligent responses using local AI models.
- Real-time web search using SerpAPI
- Get current information and news
- Search results integrated into responses
- Reddit: Access current discussions and trends
- Twitter/X: Get real-time tweets and conversations
- Social media data integrated into responses
- Stability AI: High-quality image generation
- Bria AI: Alternative image generation API
- Automatic image request detection
- Multiple image formats and styles
- Local AI Models: Using Ollama (llama3, mistral, etc.)
- Conversation Memory: Remembers chat history
- Streaming Responses: Real-time token streaming
- Context Awareness: Uses conversation history
git clone <repository-url>
cd COLLAR_BONE_AIpython -m venv venv
# On Windows:
venv\Scripts\activate
# On macOS/Linux:
source venv/bin/activatepip install -r requirements.txtDownload and install Ollama from: https://ollama.ai/
Pull the models you want to use:
ollama pull llama3
ollama pull mistralCreate a .env file in the root directory:
# Web Search
SERP_API_KEY=your_serpapi_key_here
# Social Media
REDDIT_CLIENT_ID=your_reddit_client_id
REDDIT_CLIENT_SECRET=your_reddit_client_secret
REDDIT_USER_AGENT=collar_bone_ai/1.0
TWITTER_BEARER_TOKEN=your_twitter_bearer_token
# Image Generation
STABILITY_API_KEY=your_stability_api_key
BRIA_API_KEY=your_bria_api_key
# Optional APIs
OPENAI_API_KEY=your_openai_api_key
REPLICATE_API_KEY=your_replicate_api_keystreamlit run app.pyThe application will open in your browser at http://localhost:8501
- Choose AI Model: Select from available Ollama models in the sidebar
- Enable Live Data: Toggle web search and social media integration
- Chat: Ask questions or request images
- Image Generation: Use phrases like:
- "Generate image of a sunset"
- "Create a picture of a cat"
- "Show me a futuristic city"
- Go to https://serpapi.com/
- Sign up for a free account
- Get your API key
- Add to
.env:SERP_API_KEY=your_key
- Go to https://www.reddit.com/prefs/apps
- Create a new app
- Get Client ID and Secret
- Add to
.env:REDDIT_CLIENT_ID=your_client_id REDDIT_CLIENT_SECRET=your_client_secret
- Go to https://developer.twitter.com/
- Create a new app
- Get Bearer Token
- Add to
.env:TWITTER_BEARER_TOKEN=your_token
- Go to https://platform.stability.ai/
- Sign up and get API key
- Add credits to your account
- Add to
.env:STABILITY_API_KEY=your_key
- Go to https://bria.ai/
- Sign up and get API key
- Add to
.env:BRIA_API_KEY=your_key
COLLAR_BONE_AI/
βββ app.py # Main Streamlit application
βββ models/
β βββ chat_models.py # AI chat model integration
β βββ image_generator.py # Image generation models
βββ apis/
β βββ serp_api.py # Web search API
β βββ reddit_api.py # Reddit API
β βββ twitter_api.py # Twitter API
β βββ stability_api.py # Stability AI API
β βββ bria_api.py # Bria AI API
βββ memory/
β βββ memory_manager.py # Conversation memory
βββ utils/
β βββ config.py # Configuration utilities
βββ tests/
β βββ test_apis.py # API testing
βββ requirements.txt # Python dependencies
Test your API configurations:
python -m tests.test_apis- Make sure Ollama is running:
ollama serve - Check if models are downloaded:
ollama list - Verify connection to localhost:11434
- Check your
.envfile exists and has correct keys - Verify API keys are valid and have proper permissions
- Some APIs require credits/account activation
- Stability AI requires credits
- Bria AI may need account verification
- Check API status in the sidebar
- Fork the repository
- Create a feature branch
- Make your changes
- Test thoroughly
- Submit a pull request
This project is licensed under the MIT License.
- Ollama for local AI models
- SerpAPI for web search
- Stability AI and Bria AI for image generation
- Streamlit for the web interface