Skip to content

Ollama Integration

Ollama is a local AI model server that lets you run and manage large language models on your own machine, giving you fast, private, and flexible access to AI capabilities without relying on cloud services.

The Ollama Integration for Unity allows you to connect to your own Ollama instance directly from the Unity Editor or from runtime projects. Quickly integrate AI features into Unity, including text generation, chat, embeddings, and model management.

This integration provides a simple interface to interact with Ollama models programmatically. Generate text, stream responses, manage models, and retrieve embeddings for use in games, tools, or editor extensions.

You can download Ollama here.

Features

  • Generate text or chat responses from AI models
  • Stream responses in real-time
  • Create, copy, and manage models
  • Retrieve model details and list available models
  • Generate embeddings for text input

Endpoints

All Ollama endpoints are supported including:

  • Text generation
  • Chat
  • Embeddings
  • Model management (list, create, copy, delete, push, pull)
  • API version information

Example Use Cases

  • Editor Automation: Use AI to automate repetitive tasks, generate content, or assist in level design and asset creation directly within the Unity Editor.
  • Game Dialogue & Storytelling: Generate dynamic NPC dialogue or procedurally create story content.
  • Chatbots & Interactive Assistants: Build conversational interfaces or in-game helpers.
  • Semantic Search & Recommendations: Use embeddings to find similar content or recommend items.
  • Model Management: Easily create, copy, delete, push, or pull AI models from within Unity.

API Reference

For a full list of endpoints and detailed usage, see the Ollama API reference page.