A comprehensive platform that integrates various AI-powered components for knowledge management and customer support operations.
A Python-based knowledge base assistant that integrates with OpenAI and AstraDB to provide intelligent responses to PTR-related queries.
- Chat-based interface for knowledge base queries
- OpenAI-powered information extraction and response generation
- AstraDB integration for knowledge storage and retrieval
- Content summarization capabilities
- PTR-specific query filtering
- Comprehensive test suite
from components.ptr_kb_assistant import PTRKBAssistant
from dotenv import load_dotenv
import os
# Load environment variables
load_dotenv()
# Initialize the assistant
assistant = PTRKBAssistant(
openai_api_key=os.getenv('OPENAI_API_KEY'),
astra_db_config={
"secure_connect_bundle": os.getenv('ASTRA_DB_SECURE_BUNDLE_PATH'),
"client_id": os.getenv('ASTRA_DB_CLIENT_ID'),
"client_secret": os.getenv('ASTRA_DB_CLIENT_SECRET'),
"keyspace": os.getenv('ASTRA_DB_KEYSPACE')
}
)
# Process a query
result = assistant.process_query("What are the key features of PTR's 5G solutions?")
print(result)A mock implementation of the Outreach API for testing and development purposes.
- Full CRUD operations for leads, accounts, opportunities, sequences, and templates
- In-memory data storage with automatic ID generation
- Relationship management between resources
- Input validation and error handling
- Support for filtering and pagination
uvicorn mockers.outreach.mock_outreach_api:app --reload --port 8000Creates personalized emails using knowledge from various sources including Google Drive, file uploads, and LlamaCloud knowledge base.
- LlamaCloud Knowledge Base integration
- Google Drive integration
- File upload support
- OpenAI-powered email generation
- Robust file handling
- LlamaCloud Index Name
- LlamaCloud Project Name
- LlamaCloud Organization ID
- LlamaCloud API Key
A FastAPI server that provides access to Kayako support tickets using the Claude MCP protocol.
- Full MCP protocol implementation
- Streaming response support
- Comprehensive ticket data retrieval
- Search functionality
- MAXIS case handling
- Web-based testing interface
- Clone the repository:
git clone <repository-url>
cd ai-flows- Create a virtual environment:
python -m venv venv
source venv/bin/activate # On Windows: venv\Scripts\activate- Install dependencies:
pip install -r requirements.txtCreate a .env file in the root directory with the following variables:
# OpenAI Configuration
OPENAI_API_KEY=your_openai_api_key
# AstraDB Configuration
ASTRA_DB_SECURE_BUNDLE_PATH=path/to/secure-connect-bundle.zip
ASTRA_DB_CLIENT_ID=your_client_id
ASTRA_DB_CLIENT_SECRET=your_client_secret
ASTRA_DB_KEYSPACE=your_keyspace
# Outreach Configuration
OUTREACH_API_KEY=your_outreach_api_key
# Kayako Configuration
KAYAKO_BASE_URL=https://your-kayako-instance.kayako.com
KAYAKO_EMAIL=your-email@example.com
KAYAKO_PASSWORD=your-password
# Server Configuration
HOST=0.0.0.0
PORT=8000
# LlamaCloud Configuration
LLAMACLOUD_API_KEY=your_llamacloud_api_key
LLAMACLOUD_ORG_ID=your_llamacloud_org_id
LLAMACLOUD_PROJECT_NAME=your_project_name
LLAMACLOUD_INDEX_NAME=your_index_name
Run the test suite:
pytest tests/For more detailed test output:
pytest tests/ -v --log-cli-level=INFOOnce the server is running, visit:
- http://localhost:8000/docs for Swagger UI
- http://localhost:8000/redoc for ReDoc documentation
- Store sensitive credentials in the
.envfile - The
.envfile should never be committed to version control - Consider implementing additional security measures in production
- Fork the repository
- Create a feature branch
- Commit your changes
- Push to the branch
- Create a Pull Request
MIT License - see LICENSE file for details