All Plugins
Ollama
AIGenerate AI images using local Ollama models. Run image generation locally with open-source models.
Installation
npm install @teamflojo/floimg-ollama Quick Start
import createClient from "@teamflojo/floimg";
import ollama from "@teamflojo/floimg-ollama";
const floimg = createClient();
floimg.registerGenerator(ollama());
const image = await floimg.generate({
generator: "ollama",
params: {
prompt: "A friendly robot mascot waving",
model: "llava",
host: "http://localhost:11434"
}
});
await floimg.save(image, "./robot-mascot.png"); API Reference
| Parameter | Type | Required | Description |
|---|---|---|---|
prompt | string | Yes | Text description of the image to generate |
model | string | Yes | Ollama model name (e.g., llava, bakllava) |
host | string | No | Ollama server URL (default: http://localhost:11434) |
options | object | No | Model-specific generation options |
Examples
Robot Mascot
Locally generated mascot illustration
await floimg.generate({
generator: "ollama",
params: {
prompt: "A friendly robot mascot",
model: "llava"
}
});