Skip to content

SirNiloc/integrate-ai

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

23 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Integrate AI Module for Foundry VTT

Latest Release Download Count discord members

Accelerate AI integration for your Foundry VTT modules with the lightweight, developer-friendly Integrate AI module. This module provides a foundation for connecting your systems to local and remote AI APIs, enabling you to build intelligent, dynamic gameplay experiences without the complexity of API setup.

Developer-Friendly Features

  • Simple API Abstraction: Clean static methods (processWithAI and chatWithAI) that handle all HTTP communication and JSON parsing for you.
  • Configuration Management: Built-in settings system using game.settings.register for base URL and model selection, making your module’s AI integration configurable by world creators.
  • Modular Design: Easy-to-use class structure (IntegrateAI) that can be extended or imported into any module with minimal overhead.
  • Error Handling: Comprehensive error management with detailed console logging for debugging AI interactions.
  • Flexible Integration: Works with any AI API that supports typical generate/chat endpoints (e.g., Ollama, LLaMA.cpp, local models).

Quick Integration

Simply import the module and use the provided static methods to connect to your AI backend:

const response = await IntegrateAI.processWithAI("Generate a fantasy creature description");
const chatResponse = await IntegrateAI.chatWithAI([
  {
    role: "user",
    content: "What is the weather like?"
  }
]);

About

Foundry VTT AI integration module

Resources

License

Stars

Watchers

Forks

Packages

No packages published