This is an integration adapter of Tisane AI with AccelByte Gaming Services for real-time chat content moderation using Extend Event Handler.
AccelByte Gaming Services provides an Extend Event Handler feature that lets you listen to platform events and execute custom logic.
For complete setup and deployment instructions, see the official AccelByte documentation.
This app listens to personal chat events from AccelByte and automatically analyzes message content using Tisane's API to detect problematic content, sentiment, entities, and more.
Configure these environment variables in your AccelByte Extend App:
| Variable | Description | Default Value |
|---|---|---|
TISANE_API_KEY |
Your Tisane API subscription key from Tisane Developer Portal | Required - No default |
TISANE_PARSE_URL |
Tisane API endpoint for text analysis | https://api.tisane.ai/parse |
TISANE_LANGUAGE_CODES |
Language code for content analysis (e.g., en, es, fr) |
en |
TISANE_SETTING_FORMAT |
Content format type. Use dialogue for chat messages |
dialogue |
TISANE_BAN_COMPETITIVE_LANGUAGE |
If true, disables the game_violence_ok flag. Default behavior (when not set or false) includes game_violence_ok. |
false |
PERSONAL_ATTACK_MESSAGE |
Message to display when a personal attack is detected. | Insult detected (if unset) |
BIGOTRY_MESSAGE |
Message to display when bigotry is detected. | Optional |
EXTERNAL_CONTACT_MESSAGE |
Message to display when external contact info is detected. | Optional |
PROFANITY_MESSAGE |
Message to display when profanity is detected. | Optional |
SEXUAL_ADVANCES_MESSAGE |
Message to display when sexual advances are detected. | Optional |
ADULT_ONLY_MESSAGE |
Message to display when adult content is detected. | Optional |
DATA_LEAK_MESSAGE |
Message to display when a data leak is detected. | Optional |
THREAT_MESSAGE |
Message to display when a threat is detected. | Optional |
- Visit https://tisane.ai/
- Sign up for an account or log in
- Go to the Developer Portal
- Copy your API subscription key (primary or secondary)
- Navigate to your Extend Event Handler App
- Go to Environment Configuration
- Under Secrets, add:
TISANE_API_KEY=your-tisane-api-key
- Under Variables (optional), add:
TISANE_PARSE_URL=https://api.tisane.ai/parseTISANE_LANGUAGE_CODES=enTISANE_SETTING_FORMAT=dialogue
When a user sends a personal chat message:
PersonalChatSentServicereceives the chat event from AccelByte- Message content is extracted from the event payload
- Request is sent to Tisane API with the message
- Tisane analyzes the content for:
- Abusive language and problematic content
- Sentiment analysis
- Named entities
- Topics and themes
- Language detection
- Analysis results are logged and can be used for moderation decisions
For local development, create a .env file with:
AB_BASE_URL=https://demo.accelbyte.io
AB_CLIENT_ID='your-client-id'
AB_CLIENT_SECRET='your-client-secret'
AB_NAMESPACE='your-namespace'
ITEM_ID_TO_GRANT='your-item-id'
# Tisane Configuration
TISANE_API_KEY='your-tisane-api-key'
TISANE_PARSE_URL=https://api.tisane.ai/parse
TISANE_LANGUAGE_CODES=en
TISANE_SETTING_FORMAT=dialogue
Run the app:
docker compose up --build