maximus Posted yesterday at 02:56 AM Author Posted yesterday at 02:56 AM Context v1.5.0 — AI Gateway Hi, just pushed a new release. The main addition is a centralized AI Gateway — a ContextAI class that any ProcessWire module can use to make AI requests through a single shared configuration: $ai = wire('context')->ai(); // Simple $text = $ai->complete('Summarize: ' . $page->title); // Full options $result = $ai->chat([ 'messages' => [['role' => 'user', 'content' => '...']], 'model' => 'openai/gpt-4o-mini', 'caller' => 'MyModule', ]); // Gateway entry point for third-party modules $result = $ai->gateway(['caller' => 'MyModule', 'messages' => [...]]); Supported providers: OpenRouter (200+ models via one key), OpenAI, or any OpenAI-compatible endpoint. New settings fieldset: provider, API key, default model, temperature, max tokens, timeout, global system prompt, and a Test Connection button that fires a live request and shows the response time. The idea is that modules don't need to implement their own HTTP clients or manage API keys — they just call wire('context')->ai() and everything is configured in one place. GitHub: https://github.com/mxmsmnv/Context 2
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now