A TypeScript project that combines XState with OpenAI to create a stateful chat bot.
- Install dependencies:
pnpm install- Create a
.envfile in the root directory and add your OpenAI API key:
OPENAI_API_KEY=your_api_key_here
To run the project in development mode:
pnpm devTo build the project:
pnpm buildTo run the built project:
pnpm startThe project is currently set up with:
- TypeScript configuration
- XState and OpenAI dependencies
- Environment variable support
- Development setup with tsx
The source code will be added to the src directory.
- State management using XState
- OpenAI integration for chat completions
- Type-safe implementation
- Environment variable configuration