lammy 0.1.0 → 0.1.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (3) hide show
  1. checksums.yaml +4 -4
  2. data/lib/lammy/openai.rb +2 -1
  3. metadata +1 -1
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 8a3c37bb78fae05b1c34a205b5a763149077199651acd8f52896f887f8edda45
4
- data.tar.gz: c6af72cc5f7c29d2ee6ab211743398b8757f4b3ba9a38fcfa20031de7f625982
3
+ metadata.gz: 8b017f8a1db36acfcb44ade375afb444be57a91950d2b8fdb9b4540c7a19d2a0
4
+ data.tar.gz: 98702338c1b30893351da07ffb3cd25c3b91ab0411536a67a782ffcd52dea16b
5
5
  SHA512:
6
- metadata.gz: fe0ca83a8d96703ad5d8543ca6b96a854bf69eaac1a909925e7eb99c9a54fd6b02d9eb0faa5ee0cfadf54643b4b9f8ab3506e9a88f5df85541e161370ad6b334
7
- data.tar.gz: bd399dcb3f6a1b75a8d5f6b2dd6b3d2657a5db52c736c905a0c72285ab3feb51f545a385c3bd21269243b033568f4f96be6b4aa8d100e498f73098b97b3463a6
6
+ metadata.gz: 21363a7704447fbfec6b7d6a38ab199d907b35a7512f0ede712ee26ac3f641ee159ad4f3379a91d303d7dcea029c8923bfde7ce66d50fbad738800053165c8dc
7
+ data.tar.gz: a26916678096f4660d0abbb540655bd9b6d570c57bddfb01799b3595a5d1cf74ec8da51f8d15f837c33708fd3af48fd2212ce7218ffef05a1bceb46d2a833674
data/lib/lammy/openai.rb CHANGED
@@ -1,6 +1,7 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  require 'openai'
4
+ require 'hashie'
4
5
 
5
6
  module L
6
7
  # Use the OpenAI API's official Ruby library
@@ -26,7 +27,7 @@ module L
26
27
  )
27
28
 
28
29
  content = response.dig('choices', 0, 'message', 'content')
29
- settings[:schema] ? Hashie::Mash.new(JSON.parse(content)) : content
30
+ settings[:schema] ? ::Hashie::Mash.new(JSON.parse(content)) : content
30
31
  end
31
32
 
32
33
  # OpenAI’s text embeddings measure the relatedness of text strings. An embedding is a vector of floating point
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: lammy
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.0
4
+ version: 0.1.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Kamil Nicieja