A powerful Node.js/TypeScript GenAI application demonstrating text generation using multiple pre-trained models via the Hugging Face Inference API.
- TypeScript for type safety and better development experience
- Multiple AI Models - Story generation, code completion, and Q&A
- Environment Configuration with dotenv
- Error Handling and timeout management
- Extensible Architecture - Easy to add new models and capabilities
gpt2- General text generationmicrosoft/DialoGPT-large- Conversational AImicrosoft/CodeGPT-small-js- JavaScript code generation
-
Get a Hugging Face API Key:
- Visit Hugging Face Settings
- Create a free account and generate an API token
-
Configure Environment:
cp .env.example .env # Edit .env and add your HUGGINGFACE_API_KEY -
Install Dependencies:
npm install
-
Run the Application:
npx ts-node src/index.ts
Integra_AI/
├── src/
│ └── index.ts # Main application logic
├── .env.example # Environment variables template
├── README.md # This file
├── package.json # Dependencies
└── tsconfig.json # TypeScript configuration
- Add OpenAI GPT integration
- Build a web interface with Express.js
- Implement streaming responses
- Add more specialized AI models
- Create a CLI tool with command-line arguments
Built with ❤️ using TypeScript and Hugging Face AI models.