foobara-ollama-api 0.0.4 → 0.0.5
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 +4 -0
- data/src/foobara/ai/ollama_api/generate_chat_completion.rb +13 -0
- metadata +4 -4
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: b445a140cddac047b9ac07c2b88d71d1def1c4b07b7bf04bdbac7344ecc93f5c
|
4
|
+
data.tar.gz: 9b7ad68ad39173fc747ec5fdb5a97efc293c9748779379f900c4c30efaae2ec4
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: a3c9a10fb5edbb60c1c6bb227c3e0854094381251e84242d19e531a452695b4a351962702400ed37dfb36e897dceef05b456ed9b57fc63a362a0b9132e5a3d5d
|
7
|
+
data.tar.gz: 9d7796999662d865c3eeb2cb4bcdca186747cd5ae4c6acf0e67c29f1d6d64da79ef1eeab9184d3f9e069183fde8824b6b659cd046c1b3cbce37920710df67cfe
|
data/CHANGELOG.md
CHANGED
@@ -7,6 +7,9 @@ module Foobara
|
|
7
7
|
inputs do
|
8
8
|
model :model_enum, :required
|
9
9
|
messages [Types::Message], :required
|
10
|
+
options do
|
11
|
+
temperature :float
|
12
|
+
end
|
10
13
|
end
|
11
14
|
|
12
15
|
result Types::ChatCompletion
|
@@ -16,6 +19,16 @@ module Foobara
|
|
16
19
|
http_timeout 600
|
17
20
|
|
18
21
|
def build_request_body
|
22
|
+
inputs = {
|
23
|
+
model:,
|
24
|
+
messages:,
|
25
|
+
stream: false
|
26
|
+
}
|
27
|
+
|
28
|
+
if options && !options.empty?
|
29
|
+
inputs[:options] = options
|
30
|
+
end
|
31
|
+
|
19
32
|
self.request_body = inputs.merge(stream: false)
|
20
33
|
end
|
21
34
|
end
|
metadata
CHANGED
@@ -1,13 +1,13 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: foobara-ollama-api
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.5
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Miles Georgi
|
8
8
|
bindir: bin
|
9
9
|
cert_chain: []
|
10
|
-
date:
|
10
|
+
date: 1980-01-02 00:00:00.000000000 Z
|
11
11
|
dependencies:
|
12
12
|
- !ruby/object:Gem::Dependency
|
13
13
|
name: foobara-http-api-command
|
@@ -61,14 +61,14 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
61
61
|
requirements:
|
62
62
|
- - ">="
|
63
63
|
- !ruby/object:Gem::Version
|
64
|
-
version: 3.4.
|
64
|
+
version: 3.4.3
|
65
65
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
66
66
|
requirements:
|
67
67
|
- - ">="
|
68
68
|
- !ruby/object:Gem::Version
|
69
69
|
version: '0'
|
70
70
|
requirements: []
|
71
|
-
rubygems_version: 3.6.
|
71
|
+
rubygems_version: 3.6.9
|
72
72
|
specification_version: 4
|
73
73
|
summary: Ruby Ollama API client using foobara commands
|
74
74
|
test_files: []
|