Class: OpenAI::VectorStores
- Inherits:
-
Object
- Object
- OpenAI::VectorStores
- Defined in:
- lib/openai/vector_stores.rb
Instance Method Summary collapse
- #create(parameters: {}) ⇒ Object
- #delete(id:) ⇒ Object
-
#initialize(client:) ⇒ VectorStores
constructor
A new instance of VectorStores.
- #list(parameters: {}) ⇒ Object
- #modify(id:, parameters: {}) ⇒ Object
- #retrieve(id:) ⇒ Object
Constructor Details
#initialize(client:) ⇒ VectorStores
Returns a new instance of VectorStores.
3 4 5 |
# File 'lib/openai/vector_stores.rb', line 3 def initialize(client:) @client = client.beta(assistants: OpenAI::Assistants::BETA_VERSION) end |
Instance Method Details
#create(parameters: {}) ⇒ Object
15 16 17 |
# File 'lib/openai/vector_stores.rb', line 15 def create(parameters: {}) @client.json_post(path: "/vector_stores", parameters: parameters) end |
#delete(id:) ⇒ Object
23 24 25 |
# File 'lib/openai/vector_stores.rb', line 23 def delete(id:) @client.delete(path: "/vector_stores/#{id}") end |
#list(parameters: {}) ⇒ Object
7 8 9 |
# File 'lib/openai/vector_stores.rb', line 7 def list(parameters: {}) @client.get(path: "/vector_stores", parameters: parameters) end |
#modify(id:, parameters: {}) ⇒ Object
19 20 21 |
# File 'lib/openai/vector_stores.rb', line 19 def modify(id:, parameters: {}) @client.json_post(path: "/vector_stores/#{id}", parameters: parameters) end |
#retrieve(id:) ⇒ Object
11 12 13 |
# File 'lib/openai/vector_stores.rb', line 11 def retrieve(id:) @client.get(path: "/vector_stores/#{id}") end |