ruby-openai-pinecone 0.1.0 → 0.1.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: ca44756c60e67cc3d25acbae85166d606872814cee6190d31048ed24df07bfb6
4
- data.tar.gz: c55877d7d7913ef0e87082916cf7a889358317f2898d612f54b1ca2db9743d88
3
+ metadata.gz: 259f447702c6f70a04fadf8ea488d436ab250f1a57c938a78a74c11afcaab230
4
+ data.tar.gz: 479f81d1dff2000fa87282bc4d85fd9b600b64dcdd1240c73ffa92ba734e3a9a
5
5
  SHA512:
6
- metadata.gz: 0d1448ea113c9d644750409f5fa6c892b1cc4771ed08f096f802bfc647a1b1f8be212334e6d759b877be8aa52054b91014f1e30c586fed83865c441b64b32f50
7
- data.tar.gz: c7c42599e325d3fb0ee5821c3394c13f422c993f3194ff14287e9a69cca441520fdb6f698a1fc02db8703ffefccd5818221e8a5c196b314146c46b13c8f7992b
6
+ metadata.gz: 7f5cdb662e46777785b57550e423c0d4e08a9a53683708c3f7ed1114f8afe5066f482459098e4e0d7d06963095ce60fc06db5bbabb830d8cc972e1e6e2cf91bf
7
+ data.tar.gz: 3d0e2b52b818217abca11407c664a4a45a1a750c3da4b88e342f8957f7f41b5123cb77d4ce1548b66e27cd8b2c60347514120b65c69f7880f05bbaf576aca56f
data/CHANGELOG.md CHANGED
@@ -1,5 +1,5 @@
1
1
  ## [Unreleased]
2
2
 
3
- ## [0.1.0] - 2023-04-28
3
+ ## [0.1.0] - 2023-04-30
4
4
 
5
5
  - Initial release
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- ruby-openai-pinecone (0.1.0)
4
+ ruby-openai-pinecone (0.1.1)
5
5
  ruby-openai (~> 3.7.0)
6
6
 
7
7
  GEM
data/README.md CHANGED
@@ -4,29 +4,25 @@ A Ruby gem for semantic search using Pinecone and OpenAI API. This gem provides
4
4
 
5
5
  ## Installation
6
6
 
7
- TODO: Replace `UPDATE_WITH_YOUR_GEM_NAME_PRIOR_TO_RELEASE_TO_RUBYGEMS_ORG` with your gem name right after releasing it to RubyGems.org. Please do not do it earlier due to security reasons. Alternatively, replace this section with instructions to install your gem from git if you don't plan to release to RubyGems.org.
8
-
9
7
  Install the gem and add to the application's Gemfile by executing:
10
8
 
11
- $ bundle add UPDATE_WITH_YOUR_GEM_NAME_PRIOR_TO_RELEASE_TO_RUBYGEMS_ORG
9
+ $ bundle add ruby-openai-pinecone
12
10
 
13
11
  If bundler is not being used to manage dependencies, install the gem by executing:
14
12
 
15
- $ gem install UPDATE_WITH_YOUR_GEM_NAME_PRIOR_TO_RELEASE_TO_RUBYGEMS_ORG
13
+ $ gem install ruby-openai-pinecone
16
14
 
17
15
  ## Usage
18
16
 
19
- TODO: Write usage instructions here
17
+ You can find instructions here - ruby-openai-pinecone/examples/test.rb
20
18
 
21
19
  ## Development
22
20
 
23
21
  After checking out the repo, run `bin/setup` to install dependencies. Then, run `rake spec` to run the tests. You can also run `bin/console` for an interactive prompt that will allow you to experiment.
24
22
 
25
- To install this gem onto your local machine, run `bundle exec rake install`. To release a new version, update the version number in `version.rb`, and then run `bundle exec rake release`, which will create a git tag for the version, push git commits and the created tag, and push the `.gem` file to [rubygems.org](https://rubygems.org).
26
-
27
23
  ## Contributing
28
24
 
29
- Bug reports and pull requests are welcome on GitHub at https://github.com/[USERNAME]/ruby-pinecone. This project is intended to be a safe, welcoming space for collaboration, and contributors are expected to adhere to the [code of conduct](https://github.com/[USERNAME]/ruby-pinecone/blob/master/CODE_OF_CONDUCT.md).
25
+ Bug reports and pull requests are welcome on GitHub at https://github.com/mcheemaa/ruby-openai-pinecone. This project is intended to be a safe, welcoming space for collaboration, and contributors are expected to adhere to the [code of conduct](https://github.com/mcheemaa/ruby-openai-pinecone/blob/master/CODE_OF_CONDUCT.md).
30
26
 
31
27
  ## License
32
28
 
@@ -34,4 +30,4 @@ The gem is available as open source under the terms of the [MIT License](https:/
34
30
 
35
31
  ## Code of Conduct
36
32
 
37
- Everyone interacting in the Ruby::Pinecone project's codebases, issue trackers, chat rooms and mailing lists is expected to follow the [code of conduct](https://github.com/[USERNAME]/ruby-pinecone/blob/master/CODE_OF_CONDUCT.md).
33
+ Everyone interacting in the Ruby::Pinecone project's codebases, issue trackers, chat rooms and mailing lists is expected to follow the [code of conduct](https://github.com/mcheemaa/ruby-openai-pinecone/blob/master/CODE_OF_CONDUCT.md).
data/examples/test.rb CHANGED
@@ -3,10 +3,10 @@ require 'ruby/openai_pinecone'
3
3
 
4
4
  # Configure the gem with your credentials
5
5
  Ruby::OpenaiPinecone.configure do |config|
6
- config.openai_api_key = "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"
7
- config.pinecone_api_key = "c008ac71-7f10-4b23-8cf5-4b8bae5242a5"
8
- config.pinecone_upsert_endpoint = "https://catalog-aff3af1.svc.us-west1-gcp-free.pinecone.io/vectors/upsert"
9
- config.pinecone_query_endpoint = "https://catalog-aff3af1.svc.us-west1-gcp-free.pinecone.io/query"
6
+ config.openai_api_key = ""
7
+ config.pinecone_api_key = ""
8
+ config.pinecone_upsert_endpoint = ""
9
+ config.pinecone_query_endpoint = ""
10
10
  end
11
11
 
12
12
  # Generate a vector for the input text
@@ -6,7 +6,7 @@ module Ruby
6
6
  module OpenaiPinecone
7
7
  class Embeddings
8
8
  def self.generate(text, model: "text-embedding-ada-002")
9
- client = OpenAI::Client.new(
9
+ client = ::OpenAI::Client.new(
10
10
  access_token: Ruby::OpenaiPinecone.configuration.openai_api_key,
11
11
  )
12
12
 
@@ -2,6 +2,6 @@
2
2
 
3
3
  module Ruby
4
4
  module OpenaiPinecone
5
- VERSION = "0.1.0"
5
+ VERSION = "0.1.1"
6
6
  end
7
7
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: ruby-openai-pinecone
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
  - Muhammad Ahmed Cheema