Active

code-examples

A curated collection of code examples and tutorials accompanying blog posts on johnsosoka.com, covering AI/LLM development, Spring applications, and automation scripts.

PythonJavaLangChainLangGraphSpring AILangChain4JTerraformAutoHotkey

code-examples

Overview

This repository contains practical code examples and tutorials designed to accompany blog posts on johnsosoka.com. Each example is self-contained and demonstrates specific concepts, patterns, or techniques in AI/LLM development, enterprise Java applications, and desktop automation.

The examples range from production-ready patterns (like PII masking middleware) to exploratory projects demonstrating emerging frameworks like Spring AI and LangChain4J.

Contents

Python Examples

ExampleDescriptionKey Technologies
custom-chatGPT-dataWorking with custom data in ChatGPTPython, OpenAI API
langchain-inference-maskingPII masking middleware for LangChain 1.0Python, LangChain, Privacy/Security
token-based-llm-langraph-routerMulti-agent query routing with conditional edgesPython, LangGraph, LLM Routing

Java Examples

ExampleDescriptionKey Technologies
spring-ai-bookingHotel booking agent using Spring AIJava, Spring Boot, Spring AI, OpenAI
langchain-booking-testsUnit testing strategies for LLM-driven applicationsJava, LangChain4J, Testing
object-mappingModelMapper library tutorialJava, ModelMapper
spotify-spring-securityOAuth 2.0 authentication with Spotify APIJava, Spring Security, OAuth 2.0

Automation & Infrastructure

ExampleDescriptionKey Technologies
ahk-recipes-examplesAutoHotkey automation recipes and snippetsAutoHotkey
terraformInfrastructure as code examplesTerraform

Usage

Each example is organized in its own directory with complete setup instructions. Navigate to the specific example directory and follow the README.md for:

  • Prerequisites and dependencies
  • Configuration steps (API keys, environment variables)
  • Running instructions
  • Usage examples

Quick Start Example

# Clone the repository
git clone https://github.com/johnsosoka/code-examples.git
cd code-examples
 
# Navigate to a specific example
cd python/langchain-inference-masking
 
# Follow the example's README for setup and execution

Repository Structure

code-examples/
├── python/              # Python-based AI/LLM examples
├── java/                # Java Spring and AI framework examples
├── terraform/           # Infrastructure as code examples
├── ahk/                 # AutoHotkey automation scripts
└── README.md
  • Blog: johnsosoka.com — Detailed explanations and tutorials
  • License: GPL v3 — See LICENSE for details