ruby-pinecone 0.1.2 → 0.1.4
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 +4 -4
 - data/Gemfile.lock +1 -1
 - data/README.md +8 -0
 - data/lib/pinecone/client.rb +1 -1
 - data/lib/pinecone/vectors.rb +8 -2
 - data/lib/pinecone/version.rb +1 -1
 - data/lib/pinecone.rb +1 -1
 - data/ruby-pinecone.gemspec +2 -2
 - metadata +7 -4
 
    
        checksums.yaml
    CHANGED
    
    | 
         @@ -1,7 +1,7 @@ 
     | 
|
| 
       1 
1 
     | 
    
         
             
            ---
         
     | 
| 
       2 
2 
     | 
    
         
             
            SHA256:
         
     | 
| 
       3 
     | 
    
         
            -
              metadata.gz:  
     | 
| 
       4 
     | 
    
         
            -
              data.tar.gz:  
     | 
| 
      
 3 
     | 
    
         
            +
              metadata.gz: 2a8c08c66a5dc77950be7e708f98b406eb9ea45bd0c7b3ed1911fac9979e283f
         
     | 
| 
      
 4 
     | 
    
         
            +
              data.tar.gz: c0895ba30b541db5637319bf8d9b3dfe3830c6db9a5f7ce84734276cce3a2720
         
     | 
| 
       5 
5 
     | 
    
         
             
            SHA512:
         
     | 
| 
       6 
     | 
    
         
            -
              metadata.gz:  
     | 
| 
       7 
     | 
    
         
            -
              data.tar.gz:  
     | 
| 
      
 6 
     | 
    
         
            +
              metadata.gz: 26da7e4d480e6b10c927151158bd740ac2f68c57d12ddac7f11861ec33f0bafb9df449972747aff92133358260464c72d952558a1cbe51799211fbfceaabe4f2
         
     | 
| 
      
 7 
     | 
    
         
            +
              data.tar.gz: 668efc686b8b619c10af297113170ea4fd7831dd0dfe0e33bfc3504603816f306e8148daa21440413032a6c688ddb6c4213b9b5629784c4198418fd9fde4e221
         
     | 
    
        data/Gemfile.lock
    CHANGED
    
    
    
        data/README.md
    CHANGED
    
    | 
         @@ -1,5 +1,13 @@ 
     | 
|
| 
       1 
1 
     | 
    
         
             
            # Ruby Pinecone
         
     | 
| 
       2 
2 
     | 
    
         | 
| 
      
 3 
     | 
    
         
            +
            ## Rather use the more full featured libary
         
     | 
| 
      
 4 
     | 
    
         
            +
             
     | 
| 
      
 5 
     | 
    
         
            +
            This was built to hit a deadline.  
         
     | 
| 
      
 6 
     | 
    
         
            +
            Please rather use https://github.com/ScotterC/pinecone
         
     | 
| 
      
 7 
     | 
    
         
            +
            It's well maintained and full featured.
         
     | 
| 
      
 8 
     | 
    
         
            +
             
     | 
| 
      
 9 
     | 
    
         
            +
            ## Description
         
     | 
| 
      
 10 
     | 
    
         
            +
             
     | 
| 
       3 
11 
     | 
    
         
             
            Ruby library to make interacting with the Pinecone Vector Database API easier.
         
     | 
| 
       4 
12 
     | 
    
         
             
            Format and workings inspired by https://github.com/alexrudall/ruby-openai
         
     | 
| 
       5 
13 
     | 
    
         | 
    
        data/lib/pinecone/client.rb
    CHANGED
    
    | 
         @@ -52,7 +52,7 @@ module Pinecone 
     | 
|
| 
       52 
52 
     | 
    
         
             
                end
         
     | 
| 
       53 
53 
     | 
    
         | 
| 
       54 
54 
     | 
    
         
             
                def self.project_name
         
     | 
| 
       55 
     | 
    
         
            -
                   
     | 
| 
      
 55 
     | 
    
         
            +
                  @project_name ||= Pinecone::Client.get(prefix: 'controller', path: '/actions/whoami')['project_name']
         
     | 
| 
       56 
56 
     | 
    
         
             
                end
         
     | 
| 
       57 
57 
     | 
    
         | 
| 
       58 
58 
     | 
    
         
             
                private_class_method def self.uri(path:, prefix: '')
         
     | 
    
        data/lib/pinecone/vectors.rb
    CHANGED
    
    | 
         @@ -18,8 +18,14 @@ module Pinecone 
     | 
|
| 
       18 
18 
     | 
    
         
             
                end
         
     | 
| 
       19 
19 
     | 
    
         | 
| 
       20 
20 
     | 
    
         
             
                # https://docs.pinecone.io/docs/manage-data#delete-vectors-by-id
         
     | 
| 
       21 
     | 
    
         
            -
                def delete(ids:)
         
     | 
| 
       22 
     | 
    
         
            -
                   
     | 
| 
      
 21 
     | 
    
         
            +
                def delete(ids:, namespace: nil, delete_all: nil)
         
     | 
| 
      
 22 
     | 
    
         
            +
                  params = {
         
     | 
| 
      
 23 
     | 
    
         
            +
                    ids: ids.join(','),
         
     | 
| 
      
 24 
     | 
    
         
            +
                    namespace: namespace,
         
     | 
| 
      
 25 
     | 
    
         
            +
                    deleteAll: delete_all
         
     | 
| 
      
 26 
     | 
    
         
            +
                  }.compact
         
     | 
| 
      
 27 
     | 
    
         
            +
                  params = params.map{ |k, v| "#{k}=#{v}" }.join('&')
         
     | 
| 
      
 28 
     | 
    
         
            +
                  Pinecone::Client.delete(prefix: index.prefix, path: "/vectors/delete?#{params}")
         
     | 
| 
       23 
29 
     | 
    
         
             
                end
         
     | 
| 
       24 
30 
     | 
    
         
             
              end
         
     | 
| 
       25 
31 
     | 
    
         
             
            end
         
     | 
    
        data/lib/pinecone/version.rb
    CHANGED
    
    
    
        data/lib/pinecone.rb
    CHANGED
    
    
    
        data/ruby-pinecone.gemspec
    CHANGED
    
    | 
         @@ -8,8 +8,8 @@ Gem::Specification.new do |spec| 
     | 
|
| 
       8 
8 
     | 
    
         
             
              spec.authors       = ["Matthew Hirst"]
         
     | 
| 
       9 
9 
     | 
    
         
             
              spec.email         = ["hirst.mat@gmail.com"]
         
     | 
| 
       10 
10 
     | 
    
         | 
| 
       11 
     | 
    
         
            -
              spec.summary       = "Ruby library for interacting with the pineone vector database"
         
     | 
| 
       12 
     | 
    
         
            -
              spec.description   = "Ruby library for interacting with the pineone vector database"
         
     | 
| 
      
 11 
     | 
    
         
            +
              spec.summary       = "Please rather use https://rubygems.org/gems/pinecone - Ruby library for interacting with the pineone vector database"
         
     | 
| 
      
 12 
     | 
    
         
            +
              spec.description   = "Ruby library for interacting with the pineone vector database. This was built to hit a deadline. Better to consolidate work into a single ruby pinecone libary. So please rather use https://rubygems.org/gems/pinecone "
         
     | 
| 
       13 
13 
     | 
    
         
             
              spec.homepage      = "https://github.com/hornet-network/ruby-pinecone"
         
     | 
| 
       14 
14 
     | 
    
         
             
              spec.license       = "MIT"
         
     | 
| 
       15 
15 
     | 
    
         
             
              spec.required_ruby_version = ">= 2.4.0"
         
     | 
    
        metadata
    CHANGED
    
    | 
         @@ -1,14 +1,14 @@ 
     | 
|
| 
       1 
1 
     | 
    
         
             
            --- !ruby/object:Gem::Specification
         
     | 
| 
       2 
2 
     | 
    
         
             
            name: ruby-pinecone
         
     | 
| 
       3 
3 
     | 
    
         
             
            version: !ruby/object:Gem::Version
         
     | 
| 
       4 
     | 
    
         
            -
              version: 0.1. 
     | 
| 
      
 4 
     | 
    
         
            +
              version: 0.1.4
         
     | 
| 
       5 
5 
     | 
    
         
             
            platform: ruby
         
     | 
| 
       6 
6 
     | 
    
         
             
            authors:
         
     | 
| 
       7 
7 
     | 
    
         
             
            - Matthew Hirst
         
     | 
| 
       8 
8 
     | 
    
         
             
            autorequire:
         
     | 
| 
       9 
9 
     | 
    
         
             
            bindir: exe
         
     | 
| 
       10 
10 
     | 
    
         
             
            cert_chain: []
         
     | 
| 
       11 
     | 
    
         
            -
            date: 2023- 
     | 
| 
      
 11 
     | 
    
         
            +
            date: 2023-04-28 00:00:00.000000000 Z
         
     | 
| 
       12 
12 
     | 
    
         
             
            dependencies:
         
     | 
| 
       13 
13 
     | 
    
         
             
            - !ruby/object:Gem::Dependency
         
     | 
| 
       14 
14 
     | 
    
         
             
              name: httparty
         
     | 
| 
         @@ -24,7 +24,9 @@ dependencies: 
     | 
|
| 
       24 
24 
     | 
    
         
             
                - - ">="
         
     | 
| 
       25 
25 
     | 
    
         
             
                  - !ruby/object:Gem::Version
         
     | 
| 
       26 
26 
     | 
    
         
             
                    version: 0.18.1
         
     | 
| 
       27 
     | 
    
         
            -
            description: Ruby library for interacting with the pineone vector database
         
     | 
| 
      
 27 
     | 
    
         
            +
            description: 'Ruby library for interacting with the pineone vector database. This
         
     | 
| 
      
 28 
     | 
    
         
            +
              was built to hit a deadline. Better to consolidate work into a single ruby pinecone
         
     | 
| 
      
 29 
     | 
    
         
            +
              libary. So please rather use https://rubygems.org/gems/pinecone '
         
     | 
| 
       28 
30 
     | 
    
         
             
            email:
         
     | 
| 
       29 
31 
     | 
    
         
             
            - hirst.mat@gmail.com
         
     | 
| 
       30 
32 
     | 
    
         
             
            executables: []
         
     | 
| 
         @@ -76,5 +78,6 @@ requirements: [] 
     | 
|
| 
       76 
78 
     | 
    
         
             
            rubygems_version: 3.2.22
         
     | 
| 
       77 
79 
     | 
    
         
             
            signing_key:
         
     | 
| 
       78 
80 
     | 
    
         
             
            specification_version: 4
         
     | 
| 
       79 
     | 
    
         
            -
            summary:  
     | 
| 
      
 81 
     | 
    
         
            +
            summary: Please rather use https://rubygems.org/gems/pinecone - Ruby library for interacting
         
     | 
| 
      
 82 
     | 
    
         
            +
              with the pineone vector database
         
     | 
| 
       80 
83 
     | 
    
         
             
            test_files: []
         
     |