Jump to content

Recommended Posts

Posted

Hi everyone!

I've built AiWire — a module that connects ProcessWire to AI providers (Anthropic, OpenAI, Google, xAI, OpenRouter).

GitHub: https://github.com/mxmsmnv/AiWire

aiwire.thumb.png.d4fb7499420839d6b46d40acb6b7266a.png

Spoiler

aiwire2.thumb.png.6a6514bbdcc4d3598da72d8ecf83a6e9.png

What it does

$ai = $modules->get('AiWire');

// Simple call
echo $ai->chat('What is ProcessWire?');

// Generate multiple fields at once
$ai->generate($page, [
    ['field' => 'ai_overview', 'prompt' => "Write overview..."],
    ['field' => 'ai_seo_meta', 'prompt' => "Generate meta..."],
], ['cache' => 'W']);

// Auto-fallback if provider fails
$result = $ai->askWithFallback('Translate this...', [
    'provider' => 'anthropic',
    'fallbackProviders' => ['openai', 'google'],
]);

Main features

  • Multiple API keys per provider with auto-failover
  • Connection testing from admin
  • Interactive Test Chat with parameter controls
  • File cache with TTL (day/week/month/year)
  • Save AI responses to page fields
  • Multi-turn conversations
  • Full docs with 25 real-world examples

Requirements

PHP 8.1+, ProcessWire 3.0.210+, cURL, and at least one API key.


If you try it out, I'd love to hear your feedback — whether the API makes sense, if the docs are clear, or if you run into any issues. Thanks! 🙏

  • Like 8
Posted

What a coincidence! I’d just released a big update to my PromptAI module when I saw your post 🤯 As far as I can tell from your examples, our use cases differ slightly. Looks really good!

  • Like 1
Posted

Yeah, yours feels more like an admin-focused tool for one-shot operations, while mine went in a slightly different direction. Same tree trunk, just one has deeper roots and the other has wilder branches 😄

Honestly, it all started because they gave me $50 in credits for Claude Opus 4.6 and I wanted to test what it could actually build. My very first prompt to it was roughly:

“Create a plugin that connects AI to a ProcessWire website, something like the TeleWire you made for Telegram. Use the standard approach, add support for Anthropic, xAI, OpenAI, OpenRouter — so you can add multiple API keys and it clearly shows whether each one is working or not.”

…and then, well — «And then Ostap was off» 😂 (That famous line from Ilf & Petrov’s The Twelve Chairs when Ostap Bender gets carried away and can’t stop spinning taller and taller tales.)

From that one simple request it just snowballed into the full AiWire module you see now.

  • Like 2
Posted

Haha, yeah, those $50 in Opus credits pushed me quite a bit further too while writing this update … It’s really fascinating how fast you can move with a single prompt sometimes – only to suddenly going in circles for 30 minutes for a simple bug. Wild times 😅

  • Like 2

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...