omniai-anthropic 1.0.1 → 1.0.4
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/omniai/anthropic/chat.rb +9 -3
- data/lib/omniai/anthropic/client.rb +1 -1
- data/lib/omniai/anthropic/version.rb +1 -1
- metadata +6 -6
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: c7515c0b1b6a181ac412b204086d41063233ea946dcdffc20da6d7380b271597
|
4
|
+
data.tar.gz: 50025d78d8e2e3fca15fdf285155da5c3bc4a71c76514a557eb154aa1eb83c73
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 37c2635c4b2be5cb7279789bbce024e245b6187bd5cdcf7ee68ac58e730b6d0671e7d2aac2c647b67eaf2cec52d4bcad99d21891241915eb05710d4b1b1dd26b
|
7
|
+
data.tar.gz: b8376c28bc58daecd5cf21d478bca2bfe85f11458290fc49f1a5894a5cb5ba71d4a48ff3d5932a7bbc22e177e69b45ef5d4a435034b08e521d4acc52904f1bb5
|
@@ -13,9 +13,15 @@ module OmniAI
|
|
13
13
|
# chat.completion([{ role: 'system', content: 'Tell me a joke.' }])
|
14
14
|
class Chat < OmniAI::Chat
|
15
15
|
module Model
|
16
|
-
|
17
|
-
|
18
|
-
|
16
|
+
CLAUDE_INSTANT_1_0 = 'claude-instant-1.2'
|
17
|
+
CLAUDE_2_0 = 'claude-2.0'
|
18
|
+
CLAUDE_2_1 = 'claude-2.1'
|
19
|
+
CLAUDE_3_OPUS_20240229 = 'claude-3-opus-20240229'
|
20
|
+
CLAUDE_3_HAIKU_20240307 = 'claude-3-haiku-20240307'
|
21
|
+
CLAUDE_3_SONET_20240307 = 'claude-3-haiku-20240307'
|
22
|
+
CLAUDE_OPUS = CLAUDE_3_OPUS_20240229
|
23
|
+
CLAUDE_HAIKU = CLAUDE_3_HAIKU_20240307
|
24
|
+
CLAUDE_SONET = CLAUDE_3_SONET_20240307
|
19
25
|
end
|
20
26
|
|
21
27
|
protected
|
@@ -55,7 +55,7 @@ module OmniAI
|
|
55
55
|
# @param stream [Proc, nil] optional
|
56
56
|
#
|
57
57
|
# @return [OmniAI::Chat::Completion]
|
58
|
-
def chat(messages, model: Chat::Model::
|
58
|
+
def chat(messages, model: Chat::Model::CLAUDE_HAIKU, temperature: nil, format: nil, stream: nil)
|
59
59
|
Chat.process!(messages, model:, temperature:, format:, stream:, client: self)
|
60
60
|
end
|
61
61
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: omniai-anthropic
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.0.
|
4
|
+
version: 1.0.4
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Kevin Sylvestre
|
8
|
-
autorequire:
|
8
|
+
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2024-06-
|
11
|
+
date: 2024-06-15 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: event_stream_parser
|
@@ -74,7 +74,7 @@ metadata:
|
|
74
74
|
homepage_uri: https://github.com/ksylvest/omniai-anthropic
|
75
75
|
changelog_uri: https://github.com/ksylvest/omniai-anthropic/releases
|
76
76
|
rubygems_mfa_required: 'true'
|
77
|
-
post_install_message:
|
77
|
+
post_install_message:
|
78
78
|
rdoc_options: []
|
79
79
|
require_paths:
|
80
80
|
- lib
|
@@ -89,8 +89,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
89
89
|
- !ruby/object:Gem::Version
|
90
90
|
version: '0'
|
91
91
|
requirements: []
|
92
|
-
rubygems_version: 3.5.
|
93
|
-
signing_key:
|
92
|
+
rubygems_version: 3.5.3
|
93
|
+
signing_key:
|
94
94
|
specification_version: 4
|
95
95
|
summary: A generalized framework for interacting with Anthropic
|
96
96
|
test_files: []
|