omniai-google 1.0.2 → 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: 277e333073d109c84dab0371f22b1b967145efc44b55d1080d54ef3811beda9b
4
- data.tar.gz: a62fd82c42ea3e9e925e29c627ae6244e1355f4f55c97dfa83458f7ee5e0087d
3
+ metadata.gz: 160ee5b0f488ea6fc30c0439f1e6d813ee5aedf89c0174a3e241d4c6ea68b9d7
4
+ data.tar.gz: 20f52dfc6dc50cccbb1224eaf8c61403e7e523ef13f475da7bc2ada3c024a32f
5
5
  SHA512:
6
- metadata.gz: c1bdd0fa912f62c4f574abbd39e85989849a9ae1b7ba7d2a0e54340b22fac16324a9d3655d2822bc9811be463e77654f1945567be0b469fdb6caa4f2cc986b94
7
- data.tar.gz: 1cab67ccf46e2b593e5a8ef4e19507af143f1c4bb32182af25344e0a89ef1386c8df865cf7fcfdac5a9548289de7bfddb72180dca43effe7377be7e041819e9c
6
+ metadata.gz: ba9c0537a440707d32a94ccbfdec106836c4e43b21bd9310b6d55d2ca431b96943a4a5c320c1182e4c2fc13d0bd214a5f5c7e10ab4a9f62b1fb0953dda8f3d14
7
+ data.tar.gz: 83a30a54a45daf71b0ebfbb5e53862cddec04f94c6cfddd20fb2dbb37a66d34148a66fb23ac44e9f3eba50884802ce5f4e87c94522ecd82fcb27f82fd5833a67
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
@@ -1,5 +1,7 @@
1
1
  # OmniAI::Google
2
2
 
3
+ [![CircleCI](https://circleci.com/gh/ksylvest/omniai-google.svg?style=svg)](https://circleci.com/gh/ksylvest/omniai-google)
4
+
3
5
  A Google implementation of the [OmniAI](https://github.com/ksylvest/omniai) APIs.
4
6
 
5
7
  ## Installation
@@ -10,7 +10,7 @@ module OmniAI
10
10
  @choices ||= [].tap do |choices|
11
11
  @data['candidates'].each do |candidate|
12
12
  candidate['content']['parts'].each do |part|
13
- choices << OmniAI::Chat::Choice.new(data: {
13
+ choices << OmniAI::Chat::Choice.for(data: {
14
14
  'index' => candidate['index'],
15
15
  'delta' => { 'role' => candidate['content']['role'], 'content' => part['text'] },
16
16
  })
@@ -10,7 +10,7 @@ module OmniAI
10
10
  @choices ||= [].tap do |entries|
11
11
  @data['candidates'].each do |candidate|
12
12
  candidate['content']['parts'].each do |part|
13
- entries << OmniAI::Chat::Choice.new(data: {
13
+ entries << OmniAI::Chat::Choice.for(data: {
14
14
  'index' => candidate['index'],
15
15
  'message' => { 'role' => candidate['content']['role'], 'content' => part['text'] },
16
16
  })
@@ -2,6 +2,6 @@
2
2
 
3
3
  module OmniAI
4
4
  module Google
5
- VERSION = '1.0.2'
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-google
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.2
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
@@ -70,7 +70,8 @@ files:
70
70
  - lib/omniai/google/config.rb
71
71
  - lib/omniai/google/version.rb
72
72
  homepage: https://github.com/ksylvest/omniai-google
73
- licenses: []
73
+ licenses:
74
+ - MIT
74
75
  metadata:
75
76
  homepage_uri: https://github.com/ksylvest/omniai-google
76
77
  changelog_uri: https://github.com/ksylvest/omniai-google/releases