A collection of AI implementation examples and tools for various use cases, from flight simulation assistants to local LLM interactions.
This repository contains practical examples of AI integration in different contexts, demonstrating how to use various AI technologies, including:
- Voice assistants using OpenAI GPT and VOSK
- Local LLM interactions with Ollama models
- Document retrieval systems using embedding and vector search
- AI-powered terminal command generation and interpretation
- Semantic search implementations
- Flight Simulator (MSFS) AI assistant
A voice-controlled AI assistant for Microsoft Flight Simulator that provides real-time flight data through natural language conversations.
Tools for interacting with locally hosted language models via Ollama:
- Command generation from natural language descriptions
- Error explanation and troubleshooting
- Prompt-based interactions with local models
Examples of document retrieval systems that:
- Load documents from directories
- Create embeddings and vector stores
- Support history-aware retrieval chains
- Implement question-answering capabilities
Implementation of semantic search using embeddings to find relevant content based on meaning rather than exact match.
Core dependencies:
- Python 3.8+
- OpenAI API (for some examples)
- Ollama (for local LLM examples)
- VOSK (for speech recognition)
- Additional libraries in
reqs.txt
-
Clone this repository:
git clone https://github.com/yourusername/ai-examples.git cd ai-examples
-
Install required packages:
pip install -r reqs.txt
-
For speech recognition, download a VOSK model from https://alphacephei.com/vosk/models and place it in the
vosk
folder -
For examples using OpenAI, set up your API key:
export OPENAI_API_KEY=your_api_key export OPENAI_ORG=your_organization_id export OPENAI_PROJ=your_project_id
-
For local LLM examples, ensure Ollama is installed and running
python app.py
python semantic_search.py
python home/bin/ollama_prompt.py run "list all Python files in the current directory"
python home/bin/ollama_prompt.py prompt "Explain how vector embeddings work"
python home/bin/ollama_prompt.py error "pip install tensorflow" "ERROR: Could not find a version that satisfies the requirement tensorflow"
app.py
: FlightGPT application entry pointsemantic_search.py
: Example of semantic search implementationlib/
: Core libraries and modulesmodules/
: Basic functionality modulesai.py
: AI interaction wrapper for OpenAIaudio.py
: Voice recognition with VOSKmsfs.py
: Microsoft Flight Simulator interfacespeech.py
: Text-to-speech utilities
mcp/
: Model Context Protocol implementationactions.py
: Terminal command generation and executiontransport.py
: MCP message handling
chat/
: Chat implementationsopenai.py
: OpenAI-based chathistory_ollama.py
: Chat with history using Ollama
storage/
: Data storage and retrievaldocs.py
: Document storage and RAG implementation
backend/
: Backend servicesrun.py
: Command execution API
home/bin/
: Utility scriptsollama_prompt.py
: CLI for interacting with Ollama
Contributions are welcome! Please feel free to submit a Pull Request.