Top AI Repos — open-source AI, indexed and scored
Top AI Repos tracks AI repositories on GitHub and answers two different questions about each one: is it moving right now, and would you bet a product on it.
Top AI Repos tracks AI repositories on GitHub and answers two different questions about each one: is it moving right now, and would you bet a product on it.
A Ruby gem for interacting with Ollama's API that allows you to run open source AI LLMs (Large Language Models) locally.
| Date | Stars |
|---|---|
| 2026-07-31 | 257 |
| 2026-08-01 | 257 |
| 2026-08-02 | 257 |
| 2026-08-06 | 257 |
Today
— stars today
This week
— stars this week
This month
— stars this month
Momentum
0.0
growth rate 0.00%/day
# Ollama AI
A Ruby gem for interacting with [Ollama](https://ollama.ai)'s API that allows you to run open source AI LLMs (Large Language Models) locally.

> _This Gem is designed to provide low-level access to Ollama, enabling people to build abstractions on top of it. If you are interested in more high-level abstractions or more user-friendly tools, you may want to consider [Nano Bots](https://github.com/icebaker/ruby-nano-bots) 💎 🤖._
## TL;DR and Quick Start
```ruby
gem 'ollama-ai', '~> 1.3.0'
```
```ruby
require 'ollama-ai'
client = Ollama.new(
credentials: { address: 'http://localhost:11434' },
options: { server_sent_events: true }
)
result = client.generate(
{ model: 'llama2',
prompt: 'Hi!' }
)
```
Result:
```ruby
[{ 'model' => 'llama2',
'created_at' => '2024-01-07T01:34:02.088810408Z',
'response' => 'Hello',
'done' => false },
{ 'model' => 'llama2',
'created_at' => '2024-01-07T01:34:02.419045606Z',
'response' => '!',
'done' => false },
# ..
{ 'model' => 'llama2',
'created_at' => '2024-01-07T01:34:07.680049831Z',
'response' => '?',
'done' => false },
{ 'model' => 'llama2',
'created_at' => '2024-01-07T01:34:07.872170352Z',
'response' => '',
'done' => true,
'context' =>
[518, 25_580,
# ...
13_563, 29_973],
'total_duration' => 11_653_781_127,
'load_duration' => 1_186_200_439,
'prompt_eval_count' => 22,
'prompt_eval_duration' => 5_006_751_000,
'eval_count' => 25,
'eval_duration' => 5_453_058_000 }]
```
## Index
- [TL;DR and Quick Start](#tldr-and-quick-start)
- [Index](#index)
- [Setup](#setup)
- [Installing](#installing)
- [Usage](#usage)
- [Client](#client)
- [Bearer Authentication](#bearer-authentication)
- [Methods](#methods)
- [generate: Generate a completion](#generate-generate-a-completion)
- [Without Streaming Events](#without-streaming-events)
- [Receiving Stream Events](#receiving-stream-events)
- [chat: Generate a chat completion](#chat-generate-a-chat-completion)
- [Back-and-Forth Conversations](#back-and-forth-conversations)
- [embeddings: Generate Embeddings](#embeddings-generate-embeddings)
- [Models](#models)
- [create: Create a Model](#create-create-a-model)
- [tags: List Local Models](#tags-list-local-models)
- [show: Show Model Information](#show-show-model-information)
- [copy: Copy a Model](#copy-copy-a-model)
- [delete: Delete a Model](#delete-delete-a-model)
- [pull: Pull a Model](#pull-pull-a-model)
- [push: Push a Model](#push-push-a-model)
- [Modes](#modes)
- [Text](#text)
- [Image](#image)
- [Streaming and Server-Sent Events (SSE)](#streaming-and-server-sent-events-sse)
- [Server-Sent Events (SSE) Hang](#server-sent-events-sse-hang)
- [New Functionalities and APIs](#new-functionalities-and-apis)
- [Request Options](#request-options)
- [Adapter](#adapter)
- [Timeout](#timeout)
- [Error Handling](#error-handling)
- [Rescuing](#rescuing)
- [For Short](#for-short)
- [Errors](#errors)
- [Development](#development)
- [Purpose](#purpose)
- [Publish to RubyGems](#publish-to-rubygems)
- [Updating the README](#updating-the-readme)
- [Resources and References](#resources-and-references)
- [Disclaimer](#disclaimer)
## Setup
### Installing
```sh
gem install ollama-ai -v 1.3.0
```
```sh
gem 'ollama-ai', '~> 1.3.0'
```
## Usage
### Client
Create a new client:
```ruby
require 'ollama-ai'
client = Ollama.new(
credentials: { address: 'http://localhost:11434' },
options: { server_sent_events: true }
)
```
#### Bearer Authentication
```ruby
require 'ollama-ai'
client = Ollama.new(
credentiExcerpt of 25,663 characters
Read on GitHubWould you bet a product on this? Bounded 0–100 and slow moving.
matched fp:68e8a1754e8bba39, topic:llm, topic:llama, topic:mistral