omniai-anthropic 1.0.1 → 1.0.3
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: 8eff2ca7ce3838279c86f54ebdce6872f28e6e8b023f6a9e67494458d2dfb74c
|
4
|
+
data.tar.gz: 770fa79aee0917b1271e05a925566c766b0203c21a4a8a3e2bc030fd0fb77509
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 1ecb8c35b85e6a7c88a0f882441fc44a89d7abe3504c6afd6ba20b0555bd13a24c021eaab2482e06009ef61b8b6034b19148819d78ead0ae9501d99d63ba283f
|
7
|
+
data.tar.gz: d63988b5ba55395a47c80880f47508226ad587431babe47b885724a3d3db0edd56afcbc431d291548c510523be08561d02ce520afc1be8d9acb573aebf3f43a3
|
@@ -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.3
|
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: []
|