This is a Go-based repository for learning and testing LLM-driven applications, enabling observation and convenient debugging of every LLM detail through deliberately transparent and traceable HTTP logs.
Prerequisites: Golang and an API key for any provider.
1. Clone and install dependencies
git clone https://github.com/wjiec/llm-stack.git
cd llm-stack
go mod download2. Configure your environment
cp .env.sample .envEdit .env with your provider's base URL, API key, and model name:
LLM_STACK_BASE_URL=https://api.deepseek.com
LLM_STACK_API_KEY=sk-your-key-here
LLM_STACK_MODEL=deepseek-chat3. Run an example
# Basic call
go run ./examples/llm_call/main.go
# Streaming with reasoning
go run ./examples/llm_stream/main.go
# Streaming + tool use
go run ./examples/llm_stream_tool/main.go
# Interactive chat (type /exit to quit)
go run ./examples/app_chat/main.go
# ...llm-stack is licensed under MIT License. You can find the complete text in LICENSE.