ollama-ai 1.0.0 → 1.0.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/Gemfile.lock +11 -11
- data/README.md +219 -154
- data/controllers/client.rb +3 -3
- data/ollama-ai.gemspec +1 -1
- data/static/gem.rb +1 -1
- data/template.md +216 -154
- metadata +4 -4
data/controllers/client.rb
CHANGED
@@ -3,7 +3,7 @@
|
|
3
3
|
require 'faraday'
|
4
4
|
require 'json'
|
5
5
|
|
6
|
-
require_relative '../
|
6
|
+
require_relative '../components/errors'
|
7
7
|
|
8
8
|
module Ollama
|
9
9
|
module Controllers
|
@@ -79,7 +79,7 @@ module Ollama
|
|
79
79
|
url = "#{@address}#{path}"
|
80
80
|
|
81
81
|
if !callback.nil? && !server_sent_events_enabled
|
82
|
-
raise BlockWithoutServerSentEventsError,
|
82
|
+
raise Errors::BlockWithoutServerSentEventsError,
|
83
83
|
'You are trying to use a block without Server Sent Events (SSE) enabled.'
|
84
84
|
end
|
85
85
|
|
@@ -125,7 +125,7 @@ module Ollama
|
|
125
125
|
|
126
126
|
results.map { |result| result[:event] }
|
127
127
|
rescue Faraday::Error => e
|
128
|
-
raise RequestError.new(e.message, request: e, payload:)
|
128
|
+
raise Errors::RequestError.new(e.message, request: e, payload:)
|
129
129
|
end
|
130
130
|
|
131
131
|
def safe_parse_json(raw)
|
data/ollama-ai.gemspec
CHANGED
data/static/gem.rb
CHANGED
@@ -3,7 +3,7 @@
|
|
3
3
|
module Ollama
|
4
4
|
GEM = {
|
5
5
|
name: 'ollama-ai',
|
6
|
-
version: '1.0.
|
6
|
+
version: '1.0.1',
|
7
7
|
author: 'gbaptista',
|
8
8
|
summary: 'Interact with Ollama API to run open source AI models locally.',
|
9
9
|
description: "A Ruby gem for interacting with Ollama's API that allows you to run open source AI LLMs (Large Language Models) locally.",
|