Derek Ross
Derek Ross
Ana Sayfa Hakkında RSS Akışı 📡 Yönetim
← Tüm yazılara dön How to Use Local AI Models with Shakespeare

How to Use Local AI Models with Shakespeare

25 Eyl 2025 • 4 dk okuma

Want complete control over your AI-powered website building? Local AI models offer enhanced privacy, faster responses, and dramatically reduced costs in your development workflow.

How to Use Local AI Models with Shakespeare#

Want complete control over your AI-powered website building? Local AI models offer enhanced privacy, faster responses, and dramatically reduced costs in your development workflow. With Shakespeare's support for local models including GPT-OSS, DeepSeek-R1, Gemma 3 and other models running on your machine, you can build websites entirely offline while keeping your projects and data completely private.

Why Choose Local AI Models?#

Complete Privacy#

  • No data ever leaves your machine
  • Perfect for sensitive business projects
  • Full control over your intellectual property
  • No concerns about terms of service changes

Zero Ongoing Costs#

  • Pay once for hardware, use forever
  • No per-request charges
  • No monthly subscriptions
  • Unlimited usage without budget worries

Full Customization#

  • Fine-tune models for your specific needs
  • Complete control over model behavior
  • No rate limits or usage restrictions
  • Experiment freely without costs

Getting Started: Installing Ollama#

System Requirements#

[object Object],[object Object] [object Object],[object Object],[object Object],[object Object],[object Object],[object Object]

Installation Steps#

macOS Installation#

bash
# Install via Homebrew
brew install ollama

# Or download from ollama.ai
curl -fsSL https://ollama.ai/install.sh | sh

Linux Installation#

bash
# Install via curl
curl -fsSL https://ollama.ai/install.sh | sh

# Or use package manager
sudo apt install ollama  # Ubuntu/Debian
sudo pacman -S ollama     # Arch Linux

Windows Installation#

  1. Download the installer from ollama.ai
  2. Run the installer as administrator
  3. Restart your system after installation

Choosing the Right Model#

For Website Building: Top Local Model Recommendations#

GPT-OSS - OpenAI's Open-Weight Powerhouse#

bash
ollama pull gpt-oss

Best for: Powerful reasoning, agentic tasks, versatile developer use cases

Trade-offs:

  • ✓ Excellent at complex web development
  • ⚠ Requires decent hardware

DeepSeek-R1 - Enterprise-Grade Reasoning#

bash
ollama pull deepseek-r1

Best for: Open reasoning with performance approaching O3 and Gemini 2.5 Pro

Trade-offs:

  • ✓ Leading-edge reasoning capabilities
  • ⚠ Slower inference due to reasoning depth

Gemma 3 - Google's Single-GPU Solution#

bash
ollama pull gemma3

Best for: Google's most capable model that runs on a single GPU

Trade-offs:

  • ✓ Excellent performance on consumer hardware
  • ⚠ May need more guidance for complex tasks

Quick Model Comparison#

[object Object],[object Object],[object Object],[object Object],[object Object],[object Object] [object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]

Configuring CORS for Browser Access#

Important: CORS Configuration Required

Since Shakespeare runs in your browser, you need to configure Ollama to accept cross-origin requests (CORS). This is a crucial step that allows Shakespeare to communicate with your local Ollama instance.

Checking CORS Status#

First, verify if CORS is already enabled:

bash
curl -X OPTIONS http://localhost:11434 -H "Origin: http://example.com" -H "Access-Control-Request-Method: GET" -I

If you see HTTP/1.1 403 Forbidden, CORS is not enabled and needs configuration.

Enabling CORS by Platform#

Enabling CORS on macOS#

bash
# Allow all origins (easiest for local development)
launchctl setenv OLLAMA_ORIGINS "*"

# Or specify specific origins for better security
launchctl setenv OLLAMA_ORIGINS "localhost:3000,localhost:5173,shakespeare.app"

# Optional: Make Ollama accessible on your network
launchctl setenv OLLAMA_HOST "0.0.0.0"

# Restart Ollama for changes to take effect

Enabling CORS on Linux#

Edit the Ollama service configuration:

bash
sudo systemctl edit ollama.service

Add these environment variables:

ini
[Service]
Environment="OLLAMA_HOST=0.0.0.0"
Environment="OLLAMA_ORIGINS=*"

Then restart the service:

bash
sudo service ollama restart

Enabling CORS on Windows#

  1. Open System Properties → Environment Variables
  2. Add new system variables:
    • OLLAMA_ORIGINS with value * (or specific origins)
    • OLLAMA_HOST with value 0.0.0.0 (optional, for network access)
  3. Restart Ollama from the system tray

Verifying CORS Configuration#

After configuration, test again:

bash
curl -X OPTIONS http://localhost:11434 -H "Origin: http://example.com" -H "Access-Control-Request-Method: GET" -I

Success looks like:

text
HTTP/1.1 204 No Content
Access-Control-Allow-Origin: *

Configuring Local Models in Shakespeare#

Step 1: Start Ollama Service#

bash
# Start Ollama server (with CORS already configured)
ollama serve

# The service will run on http://localhost:11434

Step 2: Test Your Model#

bash
ollama run gpt-oss "Write a simple HTML page with a header"

Step 3: Configure in Shakespeare#

  1. Open Shakespeare and go to Settings > AI Settings
  2. Scroll to "Add Custom Provider"
  3. Click to expand the custom provider section
  4. Enter the following configuration:
    • Provider Name: "ollama"
    • API Endpoint: http://localhost:11434/v1

The Bottom Line#

Local Models with Shakespeare Provide#

  • ✓ Enhanced privacy - Your code never leaves your machine
  • ✓ Faster responses - No network latency
  • ✓ Reduced costs - Zero API fees after initial setup
  • ✓ Complete control - Run any compatible model

Ready to supercharge your development workflow? Start with GPT-OSS and experience the benefits of local AI models in Shakespeare.

Ready to Build with Shakespeare?#

Start building amazing projects with AI-powered development on Nostr.

Turn your ideas into reality through natural conversation with AI.


This article was originally published on Soapbox.pub

Derek Ross

Derek Ross

The purple pill helps the orange pill go down. 🪺 NostrNests.com 🎙️ YakBak.app 🖼️ Zappix.app 🗓️ Plektos.app 🎶 ZapTrax.app 📈 Zaplytics.app 🎧 Podstr.org 📋 Nostrometer.com

derekross@nostr4.social
About Author
Derek Ross
Derek Ross ✓ derekross@nostr4.social

The purple pill helps the orange pill go down. 🪺 NostrNests.com 🎙️ YakBak.app 🖼️ Zappix.app 🗓️ Plektos.app 🎶 ZapTrax.app 📈 Zaplytics.app 🎧 Podstr.org 📋 Nostrometer.com

Value 4 Value

Comments & Discussions (0)

Decentralized replies powered by Nostr (NIP-22 / NIP-10)
Loading Nostr comments...
🏷️ Topics
Bu listede henüz öğe yok.