A collection of example patterns + implementations for function calling with Large Language Models (LLMs).
- Clone and install:
git clone https://github.com/yourusername/openai-node-tool-calls.git
cd openai-node-tool-calls
npm install
- Configure environment:
cp .env.example .env
# Edit .env with your API keys
- Run any example:
# ReAct pattern CLI
npm run react-cli
# ReWOO pattern CLI
npm run plan-cli
- Implements the ReAct (Reasoning and Acting) pattern
- Interactive CLI and API server
- Real-time streaming of thoughts and actions
- Built-in error recovery and content moderation
- Implements the ReWOO (Reasoning Without Observation) pattern
- Focuses on planning and execution phases
- Efficient for complex multi-step tasks
- Built-in progress tracking and optimization
- Node.js v18 or higher
- npm or yarn
- API keys for supported LLM providers (OpenAI, Anthropic, etc.)
ISC License