Extendware Ollama AI Write – Magento 2 Extension

A powerful AI-driven content generation solution for Magento 2 that leverages both Ollama AI models and ChatGPT API to generate compelling category descriptions and content — providing flexibility between local privacy-focused processing and cloud-based AI services.

Generate high-quality, SEO-optimized category descriptions automatically using advanced AI models, with full control over content style and formatting through customizable prompt templates.

Supports integration with advanced AI models (local Ollama models and OpenAI’s ChatGPT) for high-quality content generation with flexible deployment options.

Important: This extension is dependent on the Extendware OllamaAITranslator module and requires it to be installed and configured properly.

Extendware’s Ollama AI Write includes:

  • Dual AI Support: Choice between local Ollama models and ChatGPT API

  • Privacy Options: Local processing with Ollama or cloud-based with ChatGPT

  • Customizable Prompts: Full control over content generation templates

  • Real-time Generation: Instant content creation within category management

  • Template Variables: Dynamic category and product data integration

  • License Protection: Secure licensing system with Extendware Core

Please notice, that for local Ollama usage, the extension requires a 4GB+ RAM and 10GB+ disk space for optimal performance.

Interested in Extension Installation Service?

Visit our installation service page https://www.extendware.com/magento-extension-installation-service.html for more information

Support

Got questions? Feel free to contact us! Support Form.

Installation Procedure

Type 1: Zip file

  • Download your extension package from the Download page after purchasing the extension.

  • Important: Ensure you have also downloaded and installed the Extendware OllamaAITranslator module as it is a required dependency.

  • Open the extension ZIP file you downloaded and extract it to a directory on your computer using a tool like WinRar, WinZIP or similar.

  • Upload the extracted files to the app/code/Extendware directory in your Magento installation, maintaining the folder structure. If updating, overwrite the existing files.

  • Connect via SSH and run the following commands (make sure to run them as the user who owns the Magento files!

    php bin/magento module:enable --clear-static-content Extendware_Core
    
    php bin/magento module:enable --clear-static-content Extendware_OllamaAITranslator
    
    php bin/magento module:enable --clear-static-content Extendware_OllamaAIWrite
    
    php bin/magento setup:upgrade
    
    php bin/magento setup:di:compile
    
    php bin/magento setup:static-content:deploy
    
    

User Guide

We highly recommend gathering all the below information, before starting the installation.

Ollama Installation (Optional - for local AI processing)

Ollama allows you to run advanced AI content generation models locally, providing privacy and cost benefits.

Steps:

  1. Install Ollama:

    curl -fsSL https://ollama.com/install.sh | sh
    

    See official instructions for your OS.

  2. Pull and Run a Model:

    • For mistral:

      ollama pull mistral:latest
      ollama run mistral:latest
      
    • For Llama3.2:

      ollama pull llama3.2
      ollama run llama3.2
      
    • For Gemma2:

      ollama pull gemma2
      ollama run gemma2
      
    • See Ollama Model Library for more models.

  3. Configure Ollama Endpoint:
    Set your local Ollama API endpoint in the extension settings if required (http://localhost:11434 by default).

Configuration

To configure the extension, go to Dashboard → Stores → Configuration → Extendware Menu → Ollama AITranslator → Content Generation

alt_text

Configuration Overview

  • Enable Ollama AI Write → Toggle the content generation feature on or off.

  • AI Source Type → Choose between Ollama (local) and ChatGPT API.

  • Content Model → Select the Ollama model for content generation (when using local processing).

  • ChatGPT API Key → Enter your OpenAI API key (required for ChatGPT source).

  • ChatGPT Model → Specify the ChatGPT model to use (default: gpt-4o).

  • Default Prompt Template → Customize the prompt template for content generation.

alt_text

AI Source Options

Ollama (Local AI)

  • Uses locally hosted Ollama models

  • No API costs after initial setup

  • Complete data privacy - no data leaves your server

  • Requires Ollama installation and sufficient hardware resources

ChatGPT API

  • Uses OpenAI’s ChatGPT API

  • Requires valid API key and credits

  • Usage-based pricing

  • High-quality content generation with latest AI models

ChatGPT API Configuration

To use ChatGPT as your AI source, follow these steps:

  1. Obtain OpenAI API Key:

    • Visit OpenAI Platform

    • Create an account or log in to your existing account

    • Navigate to API Keys section in your OpenAI API Dashboard

    • Click “Create new secret key” and copy your API key

  2. Configure API Settings:

    • Set AI Source Type to “ChatGPT API”

    • Enter your ChatGPT API Key (this will be encrypted and stored securely)

    • Optionally specify ChatGPT Model (leave blank to use default: gpt-4o)

  3. Available ChatGPT Models:

    • gpt-4o (default) - Latest and most capable model

    • gpt-4o-mini - Faster and more cost-effective option

    • gpt-4 - Previous generation model

    • gpt-3.5-turbo - Legacy model for basic content generation

  4. API Costs and Usage:

Prompt Template Variables

The module supports dynamic variables in prompt templates:

  • {{categoryName}} → Automatically replaced with the current category name

  • {{productList}} → Automatically replaced with a list of products in the category

Important: Do not modify these placeholders in the prompt template - they are automatically replaced with actual category data.

Category Content Generation

1. Generate content using category management interface:

  • Navigate to Catalog → Categories in your Magento admin

  • Select the category you want to generate content for

  • Use the AI content generation feature in the category edit form

alt_text

2. Content Generation Process

Step 1: Generate Description Click the “Generate Description” button to create AI-powered content based on your category and products.

alt_text

alt_text

Step 2: Review Generated Content The AI will generate content based on your category name, products, and prompt template.

alt_text

Step 3: Apply Content Use the generated content by clicking “Use Content” to apply it to your category description.

alt_text

Prompt Template Best Practices

Example Prompt Templates

Basic E-commerce Description:

Write a compelling and SEO-friendly description for the {{categoryName}} category. 
Include information about the types of products available: {{productList}}. 
The description should be 2-3 paragraphs, engaging for customers, and highlight key benefits.

Brand-focused Template:

Create a professional product category description for {{categoryName}} that reflects our premium brand image. 
Mention these products: {{productList}}. 
Focus on quality, craftsmanship, and customer satisfaction. Keep it concise but impactful.

SEO-Optimized Template:

Generate an SEO-optimized category description for {{categoryName}} that includes relevant keywords. 
Products in this category: {{productList}}. 
Write 150-200 words that improve search rankings while being engaging for customers.

Important Notes

  • Dependency: This extension requires Extendware OllamaAITranslator module to be installed and properly configured.

  • ChatGPT API integration requires a valid OpenAI API key and sufficient credits.

  • Ollama-based content generation requires Ollama to be installed and running locally.

  • Content generation is best tested on staging environments before live deployment.

  • The extension includes license protection through Extendware Core integration.

  • Ensure your prompt templates are clear and specific for best content quality.


Troubleshooting

Check Ollama Service (if using local AI):

curl http://localhost:11434/api/version
ollama list

Common issues:

  • License Validation Failed: Ensure your Extendware license is valid and activated

  • Ollama not running: Restart the service (ollama serve)

  • Model not found: Ensure you have pulled the correct model (ollama pull model-name)

  • ChatGPT API Error: Verify your API key and check your OpenAI account credits

  • ChatGPT Rate Limit Exceeded: You’ve exceeded your API usage limits - check OpenAI dashboard

  • ChatGPT Invalid API Key: Ensure the API key is correctly entered and has proper permissions

  • ChatGPT Insufficient Credits: Add payment method and credits to your OpenAI account

  • Empty Content Generated: Review your prompt template and ensure it’s clear and specific

  • Endpoint unreachable: Verify your API URL and firewall settings

Testing ChatGPT API Connection:

curl -H "Authorization: Bearer YOUR_API_KEY" \
     -H "Content-Type: application/json" \
     -d '{"model":"gpt-4o","messages":[{"role":"user","content":"Hello"}],"max_tokens":10}' \
     https://api.openai.com/v1/chat/completions

Changelog

[1.0.0]

  • Initial release.