-
Notifications
You must be signed in to change notification settings - Fork 3
Installation & Set‐up
The easiest installation is by downloading the AI Kit package from the MODX package provider. To build from source, follow the steps here.
Once installed, you will need to do a few things.
- Configure your LLM
- Optionally, configure the built-in Vector Database support
- Get creative!
The LLM (large language model) is what drives the AIKit assistant and functionality. We natively support the OpenAI Platform, specifically using the Chat Completions API, which has wide compatibility with other LLMs. Like Google Gemini, Deepseek Platform, and Mistral.
In theory, many LLMs advertise compatibility with OpenAI but there can be subtle differences that require a custom implementation/adaptation to be made.
AI Kit has been verified with:
- OpenAI Chat Completions (default), using the OpenAI adapter
- Claude 3.7 Sonnet via OpenRouter, using the OpenAI adapter
- Mistral "La Plateforme", using the OpenAILegacy adapter.
- Deepseek Platform, using the OpenAILegacy adapter.
To make your AI Assistant knowledgeable about your site, we offer a few tools.
Available for all users out of the box is a Function Calling based approach that allows the AI to find and load resource content. However, this requires that the AI knows to ask. That means in your prompting, you will need to explicitly tell it to find specific information to use, which is not ideal.
That works far better, is using a Vector Store (RAG). The vector store indexes your site, stores the content as vectors, and allows AI Kit to automatically infer what might be relevant resources, and pro-actively attach that content to your prompts. This makes AI Kit knowledgeable and lowers the amount of hallucinations that it spits out.
AI Kit currently supports Pinecone which offers a decently sized free plan. We expect to add others in the future and welcome pull requests, too!
Now you should be ready to go!
You can customise the system prompt (that is prefixed to all messages) in the aikit.system_prompt system setting. Use this to define language, tone of voice, preferences, personas, etc. OpenAI has a decent guide to prompting if you're looking for ideas.