GPT API
The GPT API provides comprehensive functionality for integrating AI language models into your mods. This includes chat interactions, model configuration, system prompt management, web search capabilities, and voice synthesis integration.
Core Features
- Chat Interactions: Send messages to AI models and receive intelligent responses
- Model Management: Select and configure different AI models (GPT-3.5, GPT-4, Claude, etc.)
- System Prompts: Define AI personality and behavior through system prompts
- Web Search: Enable AI models to search the web for current information
- Voice Synthesis: Integrate with VoiceVox for text-to-speech functionality
- VRM Integration: Scope configurations to specific VRM characters
Quick Start
// Basic chat interaction
console.log(await gpt.chat("Hello, how are you?"));
// Chat with VRM character
const vrm = await Vrm.findByName("MyCharacter");
const response = await gpt.chat("Tell me a joke!", {
vrm: vrm.entity,
});
// Configure AI model
const models = await gpt.availableModels();
await gpt.saveModel("gpt-4");
// Set system prompt
await gpt.saveSystemPrompt("You are a helpful assistant.");
// Enable web search
await gpt.saveUseWebSearch(true, {vrm: vrm.entity});