A split-screen translator/chat interface for testing AI language models in different languages. This tool helps users explore and red-team models by automatically translating prompts into a specified language and then translating model responses back to English.
- Split-screen interface with user and model sides
- User side always displays content in English
- Model side always displays content in the target language
- Automatic translation of user input to the target language
- Translation of model responses back to English for the user side
- Support for various language models (OpenAI, Anthropic, custom endpoints)
- Multiple target language options
- Local storage of API keys and settings
- Red-teaming language models in non-English languages
- Testing model capabilities across languages
- Exploring language-specific behaviors and biases
- Research into cross-lingual AI capabilities
- Node.js and npm installed
- Google Cloud Translation API key
- API key for your preferred language model (OpenAI, Anthropic, etc.)
-
Clone the repository
git clone https://github.com/yourusername/crosstalk.git cd crosstalk
-
Install dependencies
npm install
-
Start the development server
npm start
-
Open your browser to
http://localhost:5050
The app requires API keys for:
- Language model API (OpenAI, Anthropic, etc.)
- Translation service (Google Cloud Translation API)
Enter these in the settings panel within the app. They will be saved to your browser's localStorage for convenience.
-
Configure your settings:
- Select a model provider (OpenAI, Anthropic, or Custom)
- Enter your API key and model name
- Choose a target language
- Enter your Google Cloud Translation API key
-
Type messages in English on the user side:
- Your messages will remain in English on the user side
- Automatically translated versions appear on the model side
-
View model responses:
- The model's raw responses appear in the target language on the model side
- Automatically translated responses (to English) appear on the user side
- Test how the model responds to non-English prompts while keeping the interface accessible
- The application uses the Google Cloud Translation API for translations
- API keys are stored in your browser's localStorage for persistence
- Custom API endpoints may need adjustments to match your specific service
- Create a Google Cloud account
- Create a new project
- Enable the Cloud Translation API
- Create an API key through the Credentials page
- Add any necessary restrictions to the API key
- Create an OpenAI account at https://platform.openai.com/
- Navigate to the API keys section
- Create a new API key
- Create an Anthropic account
- Navigate to the API keys section
- Create a new API key
MIT
Created for AI safety research and testing purposes.