Class: Roseflow::Pinecone::Client
- Inherits:
-
Object
- Object
- Roseflow::Pinecone::Client
- Defined in:
- lib/roseflow/pinecone/client.rb
Instance Attribute Summary collapse
-
#index_url ⇒ Object
Returns the value of attribute index_url.
Instance Method Summary collapse
- #collections ⇒ Object
- #create_collection(name, source) ⇒ Object
- #create_index(name, options = {}) ⇒ Object
- #delete_collection(name) ⇒ Object
- #delete_index(name) ⇒ Object
- #describe_collection(name) ⇒ Object
- #describe_index(name) ⇒ Object
- #index(name) ⇒ Object
- #indices ⇒ Object (also: #indexes)
-
#initialize(config = Config.new) ⇒ Client
constructor
A new instance of Client.
Constructor Details
Instance Attribute Details
#index_url ⇒ Object
Returns the value of attribute index_url.
12 13 14 |
# File 'lib/roseflow/pinecone/client.rb', line 12 def index_url @index_url end |
Instance Method Details
#collections ⇒ Object
38 39 40 |
# File 'lib/roseflow/pinecone/client.rb', line 38 def collections Collection.new(connection).list end |
#create_collection(name, source) ⇒ Object
46 47 48 |
# File 'lib/roseflow/pinecone/client.rb', line 46 def create_collection(name, source) Collection.new(connection).create(name, source) end |
#create_index(name, options = {}) ⇒ Object
30 31 32 |
# File 'lib/roseflow/pinecone/client.rb', line 30 def create_index(name, = {}) Index.new(connection).create(name, ) end |
#delete_collection(name) ⇒ Object
50 51 52 |
# File 'lib/roseflow/pinecone/client.rb', line 50 def delete_collection(name) Collection.new(connection).delete(name) end |
#delete_index(name) ⇒ Object
34 35 36 |
# File 'lib/roseflow/pinecone/client.rb', line 34 def delete_index(name) Index.new(connection).delete(name) end |
#describe_collection(name) ⇒ Object
42 43 44 |
# File 'lib/roseflow/pinecone/client.rb', line 42 def describe_collection(name) Collection.new(connection).describe(name) end |
#describe_index(name) ⇒ Object
26 27 28 |
# File 'lib/roseflow/pinecone/client.rb', line 26 def describe_index(name) Index.new(connection).describe(name) end |
#index(name) ⇒ Object
54 55 56 |
# File 'lib/roseflow/pinecone/client.rb', line 54 def index(name) @index ||= get_vector_index(name) end |