This monorepo contains libraries for integrating with ai_licia AI Co-Host API.
This repository contains ai_licia-client, the core client library for interacting with the ai_licia API.
npm install ai_licia-clientCreate a .env file with your ai_licia API credentials:
AI_LICIA_API_KEY=your_api_key_here
AI_LICIA_CHANNEL_NAME=your_twitch_channel_name
import { AiliciaClient, GenerationMode } from 'ai_licia-client';
// Create a client
const client = AiliciaClient.getInstance({
apiKey: 'your_api_key_here',
channelName: 'your_twitch_channel_name'
});
// Send an event to ai_licia
await client.sendEvent('The player just entered a new dungeon area');
// Trigger a generation
const response = await client.triggerGeneration('The player just defeated the boss');
console.log(response.content);
// Use fast model execution for brief, time-sensitive reactions.
await client.triggerGeneration('Tyre puncture. Tell the driver to pit safely.', {
mode: GenerationMode.FAST,
tts: true,
ttl: 8
});Creates or returns the singleton instance of the client.
config.apiKey: Your ai_licia API keyconfig.channelName: Your Twitch channel nameconfig.baseUrl(optional): Override the base URL for API requests
Sends contextual data to ai_licia.
content: The data for ai_licia to process (max 1,000 characters)ttl: Optional Time-to-Live in seconds
Triggers a reaction from ai_licia.
content: The data for ai_licia to react to (max 300 characters)options.mode: OptionalGenerationMode.STANDARDorGenerationMode.FAST. Fast mode changes model execution only.options.tts: Optional text-to-speech delivery flag. Defaults totrue.- Returns a response with the ai_licia generation content
- Game integration: Send game state events to ai_licia so she can comment on gameplay
- Stream integration: Trigger ai_licia to react to stream events (follows, subs, etc.)
- Chat moderation: Send filtered chat messages for ai_licia to respond to
- Interactive storytelling: Use ai_licia as a dynamic NPC that responds to player actions
git clone https://github.com/YOUR_USERNAME/ai_licia-monorepo.git
cd ai_licia-monorepo
npm installBuild all packages:
npm run buildOr build specific packages:
npm run build:clientContributions are what make the open source community such an amazing place to learn, inspire, and create. Any contributions you make are greatly appreciated.
- Fork the Project
- Create your Feature Branch (
git checkout -b feature/AmazingFeature) - Commit your Changes (
git commit -m 'Add some AmazingFeature') - Push to the Branch (
git push origin feature/AmazingFeature) - Open a Pull Request
Please make sure to update tests as appropriate and follow the existing code style.
Please read our Code of Conduct to keep our community approachable and respectable.
If you find a bug or have a feature request, please open an issue using the GitHub issue tracker.
This project is licensed under the MIT License - see the LICENSE file for details.
- Thanks to the ai_licia team for providing the API
- All the streamers and content creators building with ai_licia
- Contributors to this project