lammy 0.3.0 → 0.4.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/lammy/chat.rb +10 -7
- data/lib/lammy/openai.rb +1 -1
- data/lib/lammy.rb +1 -0
- metadata +17 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: bab0a835c9ce12e44b4c5f0d4252eb3040e0d5cb3336aeefe24856f59a74a2a9
|
4
|
+
data.tar.gz: a627a3d18b19a86785a1c70d95304b5bc8ab820766faf15f7893a79d563aeb44
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 0cd66977d719fb4bf752b96c9d5fcaeb1d776fda9d3f929366b4ac41a9913f2e16de6cb1454f0116214f1a7b404b815506f3e0375ac781f5ef2304aa01e54b6c
|
7
|
+
data.tar.gz: 8c39fea57e23ce2c39a926b039c01e132482237a5c9e6af4fd1bd9de20b884845f05930be747a202f5a3982fe22bbf2f3e308f9f605d934c9897b57b095c72c0
|
data/lib/lammy/chat.rb
CHANGED
@@ -26,13 +26,16 @@ module L
|
|
26
26
|
# Call the original method to get the user message
|
27
27
|
user_message = original_method.bind(self).call(*args, &block)
|
28
28
|
|
29
|
-
case settings[:model]
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
|
34
|
-
|
35
|
-
|
29
|
+
client = case settings[:model]
|
30
|
+
when *OpenAI::MODELS
|
31
|
+
OpenAI.new(settings)
|
32
|
+
when *Claude::MODELS
|
33
|
+
Claude.new(settings)
|
34
|
+
else
|
35
|
+
raise "Unsupported model: #{settings[:model]}"
|
36
|
+
end
|
37
|
+
|
38
|
+
client.chat(user_message, @system_message)
|
36
39
|
end
|
37
40
|
end
|
38
41
|
end
|
data/lib/lammy/openai.rb
CHANGED
data/lib/lammy.rb
CHANGED
metadata
CHANGED
@@ -1,15 +1,29 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: lammy
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.4.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Kamil Nicieja
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2024-10-
|
11
|
+
date: 2024-10-03 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
|
+
- !ruby/object:Gem::Dependency
|
14
|
+
name: anthropic
|
15
|
+
requirement: !ruby/object:Gem::Requirement
|
16
|
+
requirements:
|
17
|
+
- - "~>"
|
18
|
+
- !ruby/object:Gem::Version
|
19
|
+
version: '0.3'
|
20
|
+
type: :runtime
|
21
|
+
prerelease: false
|
22
|
+
version_requirements: !ruby/object:Gem::Requirement
|
23
|
+
requirements:
|
24
|
+
- - "~>"
|
25
|
+
- !ruby/object:Gem::Version
|
26
|
+
version: '0.3'
|
13
27
|
- !ruby/object:Gem::Dependency
|
14
28
|
name: hashie
|
15
29
|
requirement: !ruby/object:Gem::Requirement
|
@@ -61,7 +75,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
61
75
|
requirements:
|
62
76
|
- - ">="
|
63
77
|
- !ruby/object:Gem::Version
|
64
|
-
version:
|
78
|
+
version: 2.6.0
|
65
79
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
66
80
|
requirements:
|
67
81
|
- - ">="
|