foobara-ollama-api 1.0.1 → 1.0.3
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/CHANGELOG.md +8 -0
- data/src/foobara/ai/ollama_api/base_command.rb +16 -0
- metadata +22 -2
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: a91664d0f4090dfb6de94d3416e7f56c422350b3ec1a351baecdfaba4400ca75
|
|
4
|
+
data.tar.gz: 49fb43a66cbd91d79cc7dbb6701cb18920b07804d6a49c4083e0a81642278ee3
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: bf06b097e97ca526fe87f0609dec49d29adea17c4b9d44a8b9aef8312125b84073a117567e23328852dbdbbe0eec8b0da58af9ebbc6984867a1934769cb956b4
|
|
7
|
+
data.tar.gz: 46f556ec20cb44370a4c9408a8f80fcdbb6955d6df6901ade141fb1660a4d589fae8f7c3d6f777f784e9380b6f4afcde22bd3e4bbab04095d24e3ec3fdd9d138
|
data/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,11 @@
|
|
|
1
|
+
## [1.0.3] - 2025-11-23
|
|
2
|
+
|
|
3
|
+
- Add support for an API key
|
|
4
|
+
|
|
5
|
+
## [1.0.2] - 2025-08-01
|
|
6
|
+
|
|
7
|
+
- Fix incorrect ruby version dependency preventing bundle updates
|
|
8
|
+
|
|
1
9
|
## [1.0.1] - 2025-07-21
|
|
2
10
|
|
|
3
11
|
- Add CachedCommand for List*Models commands like in AnthropicApi and OpenAiApi
|
|
@@ -5,6 +5,22 @@ module Foobara
|
|
|
5
5
|
include HttpApiCommand
|
|
6
6
|
|
|
7
7
|
base_url { "#{ENV["OLLAMA_API_URL"] || "http://localhost:11434"}/api" }
|
|
8
|
+
|
|
9
|
+
def build_request_headers
|
|
10
|
+
self.request_headers = if api_token
|
|
11
|
+
super.merge("x-api-Key" => api_token)
|
|
12
|
+
else
|
|
13
|
+
super
|
|
14
|
+
end
|
|
15
|
+
end
|
|
16
|
+
|
|
17
|
+
def api_token
|
|
18
|
+
key = ENV["OLLAMA_API_KEY"]
|
|
19
|
+
|
|
20
|
+
if key
|
|
21
|
+
key.empty? ? nil : key
|
|
22
|
+
end
|
|
23
|
+
end
|
|
8
24
|
end
|
|
9
25
|
end
|
|
10
26
|
end
|
metadata
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: foobara-ollama-api
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 1.0.
|
|
4
|
+
version: 1.0.3
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Miles Georgi
|
|
@@ -9,6 +9,26 @@ bindir: bin
|
|
|
9
9
|
cert_chain: []
|
|
10
10
|
date: 1980-01-02 00:00:00.000000000 Z
|
|
11
11
|
dependencies:
|
|
12
|
+
- !ruby/object:Gem::Dependency
|
|
13
|
+
name: foobara
|
|
14
|
+
requirement: !ruby/object:Gem::Requirement
|
|
15
|
+
requirements:
|
|
16
|
+
- - ">="
|
|
17
|
+
- !ruby/object:Gem::Version
|
|
18
|
+
version: 0.1.1
|
|
19
|
+
- - "<"
|
|
20
|
+
- !ruby/object:Gem::Version
|
|
21
|
+
version: 2.0.0
|
|
22
|
+
type: :runtime
|
|
23
|
+
prerelease: false
|
|
24
|
+
version_requirements: !ruby/object:Gem::Requirement
|
|
25
|
+
requirements:
|
|
26
|
+
- - ">="
|
|
27
|
+
- !ruby/object:Gem::Version
|
|
28
|
+
version: 0.1.1
|
|
29
|
+
- - "<"
|
|
30
|
+
- !ruby/object:Gem::Version
|
|
31
|
+
version: 2.0.0
|
|
12
32
|
- !ruby/object:Gem::Dependency
|
|
13
33
|
name: foobara-cached-command
|
|
14
34
|
requirement: !ruby/object:Gem::Requirement
|
|
@@ -81,7 +101,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
|
81
101
|
requirements:
|
|
82
102
|
- - ">="
|
|
83
103
|
- !ruby/object:Gem::Version
|
|
84
|
-
version: 3.4.
|
|
104
|
+
version: 3.4.0
|
|
85
105
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
|
86
106
|
requirements:
|
|
87
107
|
- - ">="
|