module

Integrate AI

Endorsements
0
Installs
0.01%
Comments
0
Latest version1.2.0
Minimum Core13
Compatible Core13
Last updated10 months ago
Created10 months ago
Authors
Languages
Systems All systems
Project source Project URL

Integrate AI Module for Foundry VTT

Accelerate AI integration for your Foundry VTT modules with our lightweight, developer-friendly Integrate AI module. This module provides a foundation for connecting your modules 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 with 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 built-in, with detailed console logging for debugging AI interactions.
  • Flexible Integration: Works with any AI API that supports the standard generate/chat endpoints (e.g., Ollama, OpenAI).

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?" 
}]);

Example Modules:

Integrate AI: Gimme A Hook

Integrate AI: Gimme A Name

Perfect for Module Developers:

Whether you're building an NPC dialogue system, automated quest generator, or intelligent world-building tool, this module gives you the foundation to seamlessly integrate AI capabilities into your Foundry VTT modules. No more reinventing the wheel – focus on your creative vision, not API complexity.

 

Having trouble getting it working?

Missing a feature you want?

Join our Discord

 

 

*Currently this module is for use with Ollama, OpenAI requires further testing.

Subscribe
Notify of
0 Comments
0
Would love your thoughts, please comment.x
()
x