huginn_ollama_agent 0.1.0 → 0.1.10
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/lib/huginn_ollama_agent/ollama_agent.rb +5 -0
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: '079d5ac6979bc3f61c17450391c7fba830471e7db33a575fdc92514b4968b5c2'
|
4
|
+
data.tar.gz: f3c36631d72eb39c5f980cac4b25c1a7053f9440fd363c8e5f3b3f8d30019f44
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: b0b0bc0dfae1f61aa4e07b1969253aab68d36b117be49e9a09da1af7e5274c081c72b41ef09f11c46754b3a5206c6478850ffb627b0e0af7a697d3b5e4f62d5d
|
7
|
+
data.tar.gz: 6ef17683e955c276c52f310886b06862b2906168518a2040b7bfae3b830f4c59597f814838af1ffd52cef96ea777d4bf35c9e694b2b57597a1ed3a27174b009a
|
@@ -17,6 +17,8 @@ module Agents
|
|
17
17
|
|
18
18
|
`prompt` the prompt to generate a response.
|
19
19
|
|
20
|
+
`image` is a base64-encoded image (for multimodal models such as llava).
|
21
|
+
|
20
22
|
`context` the context parameter returned from a previous request to /generate, this can be used to keep a short conversational memory.
|
21
23
|
|
22
24
|
`stream` if false the response will be returned as a single response object, rather than a stream of objects.
|
@@ -140,6 +142,7 @@ module Agents
|
|
140
142
|
form_configurable :model, type: :string
|
141
143
|
form_configurable :url, type: :string
|
142
144
|
form_configurable :prompt, type: :string
|
145
|
+
form_configurable :image, type: :string
|
143
146
|
form_configurable :context, type: :string
|
144
147
|
form_configurable :stream, type: :boolean
|
145
148
|
form_configurable :raw, type: :boolean
|
@@ -254,6 +257,7 @@ module Agents
|
|
254
257
|
request_payload['stream'] = boolify(interpolated['stream'])
|
255
258
|
request_payload['raw'] = boolify(interpolated['raw'])
|
256
259
|
request_payload['context'] = context if !interpolated['context'].empty?
|
260
|
+
request_payload['images'] = ["#{interpolated['image']}"] if !interpolated['image'].empty?
|
257
261
|
|
258
262
|
if check_remote_model()
|
259
263
|
if interpolated['debug'] == 'true'
|
@@ -272,6 +276,7 @@ module Agents
|
|
272
276
|
|
273
277
|
req_options = {
|
274
278
|
use_ssl: uri.scheme == "https",
|
279
|
+
read_timeout: 120
|
275
280
|
}
|
276
281
|
|
277
282
|
response = Net::HTTP.start(uri.hostname, uri.port, req_options) do |http|
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: huginn_ollama_agent
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.10
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Nicolas Germain
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2024-03-
|
11
|
+
date: 2024-03-27 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|