omniai-anthropic 1.0.4 → 1.2.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: c7515c0b1b6a181ac412b204086d41063233ea946dcdffc20da6d7380b271597
4
- data.tar.gz: 50025d78d8e2e3fca15fdf285155da5c3bc4a71c76514a557eb154aa1eb83c73
3
+ metadata.gz: 94edb41afdba159c925d228d74af4f953ec1fe0685ee91c96604d9f2e811d285
4
+ data.tar.gz: d60b97840f9fc260fc9a5d2d7301f0f736985b6e56b5b03d470447142ef3fe9d
5
5
  SHA512:
6
- metadata.gz: 37c2635c4b2be5cb7279789bbce024e245b6187bd5cdcf7ee68ac58e730b6d0671e7d2aac2c647b67eaf2cec52d4bcad99d21891241915eb05710d4b1b1dd26b
7
- data.tar.gz: b8376c28bc58daecd5cf21d478bca2bfe85f11458290fc49f1a5894a5cb5ba71d4a48ff3d5932a7bbc22e177e69b45ef5d4a435034b08e521d4acc52904f1bb5
6
+ metadata.gz: a367fc5489ec208adbaaec7629a877ddf3f2f1f444cd8a0eac40af0a2f2072ce5d7ea82ab7a6d18de56e0a06ec23e9177b84a5856954c5961ad0967c4c527531
7
+ data.tar.gz: 3b31c67c47b8c367d0207e8f4bf73f7a498fe78e4848505ec287fb42a9307963fa13e33176f68aa160d7296a3bcfa0e5b2bab6a90a05a264b5ba9092a174336f
data/Gemfile CHANGED
@@ -11,4 +11,5 @@ gem 'rspec_junit_formatter'
11
11
  gem 'rubocop'
12
12
  gem 'rubocop-rake'
13
13
  gem 'rubocop-rspec'
14
+ gem 'simplecov'
14
15
  gem 'webmock'
data/README.md CHANGED
@@ -67,7 +67,7 @@ completion.choice.message.content # 'The capital of Canada is Ottawa.'
67
67
  `model` takes an optional string (default is `claude-3-haiku-20240307`):
68
68
 
69
69
  ```ruby
70
- completion = client.chat('Provide code for fibonacci', model: OmniAI::Anthropic::Chat::Model::OPUS)
70
+ completion = client.chat('Provide code for fibonacci', model: OmniAI::Anthropic::Chat::Model::CLAUDE_OPUS)
71
71
  completion.choice.message.content # 'def fibonacci(n)...end'
72
72
  ```
73
73
 
@@ -11,7 +11,7 @@ module OmniAI
11
11
  role = @data['role']
12
12
 
13
13
  @data['content'].map do |data, index|
14
- OmniAI::Chat::Choice.new(data: {
14
+ OmniAI::Chat::Choice.for(data: {
15
15
  'index' => index,
16
16
  'message' => { 'role' => role, 'content' => data['text'] },
17
17
  })
@@ -2,6 +2,6 @@
2
2
 
3
3
  module OmniAI
4
4
  module Anthropic
5
- VERSION = '1.0.4'
5
+ VERSION = '1.2.0'
6
6
  end
7
7
  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
4
+ version: 1.2.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Kevin Sylvestre
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2024-06-15 00:00:00.000000000 Z
11
+ date: 2024-06-20 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: event_stream_parser
@@ -69,7 +69,8 @@ files:
69
69
  - lib/omniai/anthropic/config.rb
70
70
  - lib/omniai/anthropic/version.rb
71
71
  homepage: https://github.com/ksylvest/omniai-anthropic
72
- licenses: []
72
+ licenses:
73
+ - MIT
73
74
  metadata:
74
75
  homepage_uri: https://github.com/ksylvest/omniai-anthropic
75
76
  changelog_uri: https://github.com/ksylvest/omniai-anthropic/releases