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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 94a8d0986de77f82632dfd0d579e9b97f2bf7021e568f892c7cc16860047627b
4
- data.tar.gz: aeb5cad4f8e4d2db064b8e0c545954f785470b0722a162f9e20cf7484f771143
3
+ metadata.gz: 2a8c08c66a5dc77950be7e708f98b406eb9ea45bd0c7b3ed1911fac9979e283f
4
+ data.tar.gz: c0895ba30b541db5637319bf8d9b3dfe3830c6db9a5f7ce84734276cce3a2720
5
5
  SHA512:
6
- metadata.gz: 9ae89d24205bd3fd6b4dfbd6db5441fe0e4cc865db14f4645c6ba9af8cb19b0e0b3bb3eb7668524cdd3021a2355b619fdd7341648be3dad6ec2bf6bea1099c9b
7
- data.tar.gz: 619783997bc2a1f170c1af1dea37d063434f7cb67adfd120c79218eefda695c1dd473877eeb64c4f324df86aebc0048207278722b9fc99a9347b6506e0a0a1ac
6
+ metadata.gz: 26da7e4d480e6b10c927151158bd740ac2f68c57d12ddac7f11861ec33f0bafb9df449972747aff92133358260464c72d952558a1cbe51799211fbfceaabe4f2
7
+ data.tar.gz: 668efc686b8b619c10af297113170ea4fd7831dd0dfe0e33bfc3504603816f306e8148daa21440413032a6c688ddb6c4213b9b5629784c4198418fd9fde4e221
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- ruby-pinecone (0.1.1)
4
+ ruby-pinecone (0.1.4)
5
5
  httparty (>= 0.18.1)
6
6
 
7
7
  GEM
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
 
@@ -52,7 +52,7 @@ module Pinecone
52
52
  end
53
53
 
54
54
  def self.project_name
55
- Thread.current[:project_name] ||= Pinecone::Client.get(prefix: 'controller', path: '/actions/whoami')['project_name']
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: '')
@@ -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
- Pinecone::Client.delete(prefix: index.prefix, path: "/vectors/delete?ids=#{ids.join(',')}")
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
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Pinecone
4
- VERSION = "0.1.2"
4
+ VERSION = "0.1.4"
5
5
  end
data/lib/pinecone.rb CHANGED
@@ -37,7 +37,7 @@ module Pinecone
37
37
  end
38
38
 
39
39
  def self.configuration
40
- Thread.current[:configuration] ||= Pinecone::Configuration.new
40
+ @configuration ||= Pinecone::Configuration.new
41
41
  end
42
42
 
43
43
  def self.configure
@@ -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.2
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-03-10 00:00:00.000000000 Z
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: Ruby library for interacting with the pineone vector database
81
+ summary: Please rather use https://rubygems.org/gems/pinecone - Ruby library for interacting
82
+ with the pineone vector database
80
83
  test_files: []