Class: OpenApiOpenAIClient::VectorStoresApi
- Inherits:
-
Object
- Object
- OpenApiOpenAIClient::VectorStoresApi
- Defined in:
- lib/openapi_openai/api/vector_stores_api.rb
Instance Attribute Summary collapse
-
#api_client ⇒ Object
Returns the value of attribute api_client.
Instance Method Summary collapse
-
#cancel_vector_store_file_batch(vector_store_id, batch_id, opts = {}) ⇒ VectorStoreFileBatchObject
Cancel a vector store file batch.
-
#cancel_vector_store_file_batch_with_http_info(vector_store_id, batch_id, opts = {}) ⇒ Array<(VectorStoreFileBatchObject, Integer, Hash)>
Cancel a vector store file batch.
-
#create_vector_store(create_vector_store_request, opts = {}) ⇒ VectorStoreObject
Create a vector store.
-
#create_vector_store_file(vector_store_id, create_vector_store_file_request, opts = {}) ⇒ VectorStoreFileObject
Create a vector store file by attaching a [File](/docs/api-reference/files) to a [vector store](/docs/api-reference/vector-stores/object).
-
#create_vector_store_file_batch(vector_store_id, create_vector_store_file_batch_request, opts = {}) ⇒ VectorStoreFileBatchObject
Create a vector store file batch.
-
#create_vector_store_file_batch_with_http_info(vector_store_id, create_vector_store_file_batch_request, opts = {}) ⇒ Array<(VectorStoreFileBatchObject, Integer, Hash)>
Create a vector store file batch.
-
#create_vector_store_file_with_http_info(vector_store_id, create_vector_store_file_request, opts = {}) ⇒ Array<(VectorStoreFileObject, Integer, Hash)>
Create a vector store file by attaching a [File](/docs/api-reference/files) to a [vector store](/docs/api-reference/vector-stores/object).
-
#create_vector_store_with_http_info(create_vector_store_request, opts = {}) ⇒ Array<(VectorStoreObject, Integer, Hash)>
Create a vector store.
-
#delete_vector_store(vector_store_id, opts = {}) ⇒ DeleteVectorStoreResponse
Delete a vector store.
-
#delete_vector_store_file(vector_store_id, file_id, opts = {}) ⇒ DeleteVectorStoreFileResponse
Delete a vector store file.
-
#delete_vector_store_file_with_http_info(vector_store_id, file_id, opts = {}) ⇒ Array<(DeleteVectorStoreFileResponse, Integer, Hash)>
Delete a vector store file.
-
#delete_vector_store_with_http_info(vector_store_id, opts = {}) ⇒ Array<(DeleteVectorStoreResponse, Integer, Hash)>
Delete a vector store.
-
#get_vector_store(vector_store_id, opts = {}) ⇒ VectorStoreObject
Retrieves a vector store.
-
#get_vector_store_file(vector_store_id, file_id, opts = {}) ⇒ VectorStoreFileObject
Retrieves a vector store file.
-
#get_vector_store_file_batch(vector_store_id, batch_id, opts = {}) ⇒ VectorStoreFileBatchObject
Retrieves a vector store file batch.
-
#get_vector_store_file_batch_with_http_info(vector_store_id, batch_id, opts = {}) ⇒ Array<(VectorStoreFileBatchObject, Integer, Hash)>
Retrieves a vector store file batch.
-
#get_vector_store_file_with_http_info(vector_store_id, file_id, opts = {}) ⇒ Array<(VectorStoreFileObject, Integer, Hash)>
Retrieves a vector store file.
-
#get_vector_store_with_http_info(vector_store_id, opts = {}) ⇒ Array<(VectorStoreObject, Integer, Hash)>
Retrieves a vector store.
-
#initialize(api_client = ApiClient.default) ⇒ VectorStoresApi
constructor
A new instance of VectorStoresApi.
-
#list_files_in_vector_store_batch(vector_store_id, batch_id, opts = {}) ⇒ ListVectorStoreFilesResponse
Returns a list of vector store files in a batch.
-
#list_files_in_vector_store_batch_with_http_info(vector_store_id, batch_id, opts = {}) ⇒ Array<(ListVectorStoreFilesResponse, Integer, Hash)>
Returns a list of vector store files in a batch.
-
#list_vector_store_files(vector_store_id, opts = {}) ⇒ ListVectorStoreFilesResponse
Returns a list of vector store files.
-
#list_vector_store_files_with_http_info(vector_store_id, opts = {}) ⇒ Array<(ListVectorStoreFilesResponse, Integer, Hash)>
Returns a list of vector store files.
-
#list_vector_stores(opts = {}) ⇒ ListVectorStoresResponse
Returns a list of vector stores.
-
#list_vector_stores_with_http_info(opts = {}) ⇒ Array<(ListVectorStoresResponse, Integer, Hash)>
Returns a list of vector stores.
-
#modify_vector_store(vector_store_id, update_vector_store_request, opts = {}) ⇒ VectorStoreObject
Modifies a vector store.
-
#modify_vector_store_with_http_info(vector_store_id, update_vector_store_request, opts = {}) ⇒ Array<(VectorStoreObject, Integer, Hash)>
Modifies a vector store.
Constructor Details
#initialize(api_client = ApiClient.default) ⇒ VectorStoresApi
Returns a new instance of VectorStoresApi.
19 20 21 |
# File 'lib/openapi_openai/api/vector_stores_api.rb', line 19 def initialize(api_client = ApiClient.default) @api_client = api_client end |
Instance Attribute Details
#api_client ⇒ Object
Returns the value of attribute api_client.
17 18 19 |
# File 'lib/openapi_openai/api/vector_stores_api.rb', line 17 def api_client @api_client end |
Instance Method Details
#cancel_vector_store_file_batch(vector_store_id, batch_id, opts = {}) ⇒ VectorStoreFileBatchObject
Cancel a vector store file batch. This attempts to cancel the processing of files in this batch as soon as possible.
27 28 29 30 |
# File 'lib/openapi_openai/api/vector_stores_api.rb', line 27 def cancel_vector_store_file_batch(vector_store_id, batch_id, opts = {}) data, _status_code, _headers = cancel_vector_store_file_batch_with_http_info(vector_store_id, batch_id, opts) data end |
#cancel_vector_store_file_batch_with_http_info(vector_store_id, batch_id, opts = {}) ⇒ Array<(VectorStoreFileBatchObject, Integer, Hash)>
Cancel a vector store file batch. This attempts to cancel the processing of files in this batch as soon as possible.
37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 |
# File 'lib/openapi_openai/api/vector_stores_api.rb', line 37 def cancel_vector_store_file_batch_with_http_info(vector_store_id, batch_id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: VectorStoresApi.cancel_vector_store_file_batch ...' end # verify the required parameter 'vector_store_id' is set if @api_client.config.client_side_validation && vector_store_id.nil? fail ArgumentError, "Missing the required parameter 'vector_store_id' when calling VectorStoresApi.cancel_vector_store_file_batch" end # verify the required parameter 'batch_id' is set if @api_client.config.client_side_validation && batch_id.nil? fail ArgumentError, "Missing the required parameter 'batch_id' when calling VectorStoresApi.cancel_vector_store_file_batch" end # resource path local_var_path = '/vector_stores/{vector_store_id}/file_batches/{batch_id}/cancel'.sub('{' + 'vector_store_id' + '}', CGI.escape(vector_store_id.to_s)).sub('{' + 'batch_id' + '}', CGI.escape(batch_id.to_s)) # query parameters query_params = opts[:query_params] || {} # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept'] # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:debug_body] # return_type return_type = opts[:debug_return_type] || 'VectorStoreFileBatchObject' # auth_names auth_names = opts[:debug_auth_names] || ['ApiKeyAuth'] = opts.merge( :operation => :"VectorStoresApi.cancel_vector_store_file_batch", :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type ) data, status_code, headers = @api_client.call_api(:POST, local_var_path, ) if @api_client.config.debugging @api_client.config.logger.debug "API called: VectorStoresApi#cancel_vector_store_file_batch\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#create_vector_store(create_vector_store_request, opts = {}) ⇒ VectorStoreObject
Create a vector store.
93 94 95 96 |
# File 'lib/openapi_openai/api/vector_stores_api.rb', line 93 def create_vector_store(create_vector_store_request, opts = {}) data, _status_code, _headers = create_vector_store_with_http_info(create_vector_store_request, opts) data end |
#create_vector_store_file(vector_store_id, create_vector_store_file_request, opts = {}) ⇒ VectorStoreFileObject
Create a vector store file by attaching a [File](/docs/api-reference/files) to a [vector store](/docs/api-reference/vector-stores/object).
160 161 162 163 |
# File 'lib/openapi_openai/api/vector_stores_api.rb', line 160 def create_vector_store_file(vector_store_id, create_vector_store_file_request, opts = {}) data, _status_code, _headers = create_vector_store_file_with_http_info(vector_store_id, create_vector_store_file_request, opts) data end |
#create_vector_store_file_batch(vector_store_id, create_vector_store_file_batch_request, opts = {}) ⇒ VectorStoreFileBatchObject
Create a vector store file batch.
232 233 234 235 |
# File 'lib/openapi_openai/api/vector_stores_api.rb', line 232 def create_vector_store_file_batch(vector_store_id, create_vector_store_file_batch_request, opts = {}) data, _status_code, _headers = create_vector_store_file_batch_with_http_info(vector_store_id, create_vector_store_file_batch_request, opts) data end |
#create_vector_store_file_batch_with_http_info(vector_store_id, create_vector_store_file_batch_request, opts = {}) ⇒ Array<(VectorStoreFileBatchObject, Integer, Hash)>
Create a vector store file batch.
242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 |
# File 'lib/openapi_openai/api/vector_stores_api.rb', line 242 def create_vector_store_file_batch_with_http_info(vector_store_id, create_vector_store_file_batch_request, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: VectorStoresApi.create_vector_store_file_batch ...' end # verify the required parameter 'vector_store_id' is set if @api_client.config.client_side_validation && vector_store_id.nil? fail ArgumentError, "Missing the required parameter 'vector_store_id' when calling VectorStoresApi.create_vector_store_file_batch" end # verify the required parameter 'create_vector_store_file_batch_request' is set if @api_client.config.client_side_validation && create_vector_store_file_batch_request.nil? fail ArgumentError, "Missing the required parameter 'create_vector_store_file_batch_request' when calling VectorStoresApi.create_vector_store_file_batch" end # resource path local_var_path = '/vector_stores/{vector_store_id}/file_batches'.sub('{' + 'vector_store_id' + '}', CGI.escape(vector_store_id.to_s)) # query parameters query_params = opts[:query_params] || {} # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept'] # HTTP header 'Content-Type' content_type = @api_client.select_header_content_type(['application/json']) if !content_type.nil? header_params['Content-Type'] = content_type end # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:debug_body] || @api_client.object_to_http_body(create_vector_store_file_batch_request) # return_type return_type = opts[:debug_return_type] || 'VectorStoreFileBatchObject' # auth_names auth_names = opts[:debug_auth_names] || ['ApiKeyAuth'] = opts.merge( :operation => :"VectorStoresApi.create_vector_store_file_batch", :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type ) data, status_code, headers = @api_client.call_api(:POST, local_var_path, ) if @api_client.config.debugging @api_client.config.logger.debug "API called: VectorStoresApi#create_vector_store_file_batch\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#create_vector_store_file_with_http_info(vector_store_id, create_vector_store_file_request, opts = {}) ⇒ Array<(VectorStoreFileObject, Integer, Hash)>
Create a vector store file by attaching a [File](/docs/api-reference/files) to a [vector store](/docs/api-reference/vector-stores/object).
170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 |
# File 'lib/openapi_openai/api/vector_stores_api.rb', line 170 def create_vector_store_file_with_http_info(vector_store_id, create_vector_store_file_request, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: VectorStoresApi.create_vector_store_file ...' end # verify the required parameter 'vector_store_id' is set if @api_client.config.client_side_validation && vector_store_id.nil? fail ArgumentError, "Missing the required parameter 'vector_store_id' when calling VectorStoresApi.create_vector_store_file" end # verify the required parameter 'create_vector_store_file_request' is set if @api_client.config.client_side_validation && create_vector_store_file_request.nil? fail ArgumentError, "Missing the required parameter 'create_vector_store_file_request' when calling VectorStoresApi.create_vector_store_file" end # resource path local_var_path = '/vector_stores/{vector_store_id}/files'.sub('{' + 'vector_store_id' + '}', CGI.escape(vector_store_id.to_s)) # query parameters query_params = opts[:query_params] || {} # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept'] # HTTP header 'Content-Type' content_type = @api_client.select_header_content_type(['application/json']) if !content_type.nil? header_params['Content-Type'] = content_type end # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:debug_body] || @api_client.object_to_http_body(create_vector_store_file_request) # return_type return_type = opts[:debug_return_type] || 'VectorStoreFileObject' # auth_names auth_names = opts[:debug_auth_names] || ['ApiKeyAuth'] = opts.merge( :operation => :"VectorStoresApi.create_vector_store_file", :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type ) data, status_code, headers = @api_client.call_api(:POST, local_var_path, ) if @api_client.config.debugging @api_client.config.logger.debug "API called: VectorStoresApi#create_vector_store_file\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#create_vector_store_with_http_info(create_vector_store_request, opts = {}) ⇒ Array<(VectorStoreObject, Integer, Hash)>
Create a vector store.
102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 |
# File 'lib/openapi_openai/api/vector_stores_api.rb', line 102 def create_vector_store_with_http_info(create_vector_store_request, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: VectorStoresApi.create_vector_store ...' end # verify the required parameter 'create_vector_store_request' is set if @api_client.config.client_side_validation && create_vector_store_request.nil? fail ArgumentError, "Missing the required parameter 'create_vector_store_request' when calling VectorStoresApi.create_vector_store" end # resource path local_var_path = '/vector_stores' # query parameters query_params = opts[:query_params] || {} # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept'] # HTTP header 'Content-Type' content_type = @api_client.select_header_content_type(['application/json']) if !content_type.nil? header_params['Content-Type'] = content_type end # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:debug_body] || @api_client.object_to_http_body(create_vector_store_request) # return_type return_type = opts[:debug_return_type] || 'VectorStoreObject' # auth_names auth_names = opts[:debug_auth_names] || ['ApiKeyAuth'] = opts.merge( :operation => :"VectorStoresApi.create_vector_store", :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type ) data, status_code, headers = @api_client.call_api(:POST, local_var_path, ) if @api_client.config.debugging @api_client.config.logger.debug "API called: VectorStoresApi#create_vector_store\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#delete_vector_store(vector_store_id, opts = {}) ⇒ DeleteVectorStoreResponse
Delete a vector store.
303 304 305 306 |
# File 'lib/openapi_openai/api/vector_stores_api.rb', line 303 def delete_vector_store(vector_store_id, opts = {}) data, _status_code, _headers = delete_vector_store_with_http_info(vector_store_id, opts) data end |
#delete_vector_store_file(vector_store_id, file_id, opts = {}) ⇒ DeleteVectorStoreFileResponse
Delete a vector store file. This will remove the file from the vector store but the file itself will not be deleted. To delete the file, use the [delete file](/docs/api-reference/files/delete) endpoint.
365 366 367 368 |
# File 'lib/openapi_openai/api/vector_stores_api.rb', line 365 def delete_vector_store_file(vector_store_id, file_id, opts = {}) data, _status_code, _headers = delete_vector_store_file_with_http_info(vector_store_id, file_id, opts) data end |
#delete_vector_store_file_with_http_info(vector_store_id, file_id, opts = {}) ⇒ Array<(DeleteVectorStoreFileResponse, Integer, Hash)>
Delete a vector store file. This will remove the file from the vector store but the file itself will not be deleted. To delete the file, use the [delete file](/docs/api-reference/files/delete) endpoint.
375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 |
# File 'lib/openapi_openai/api/vector_stores_api.rb', line 375 def delete_vector_store_file_with_http_info(vector_store_id, file_id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: VectorStoresApi.delete_vector_store_file ...' end # verify the required parameter 'vector_store_id' is set if @api_client.config.client_side_validation && vector_store_id.nil? fail ArgumentError, "Missing the required parameter 'vector_store_id' when calling VectorStoresApi.delete_vector_store_file" end # verify the required parameter 'file_id' is set if @api_client.config.client_side_validation && file_id.nil? fail ArgumentError, "Missing the required parameter 'file_id' when calling VectorStoresApi.delete_vector_store_file" end # resource path local_var_path = '/vector_stores/{vector_store_id}/files/{file_id}'.sub('{' + 'vector_store_id' + '}', CGI.escape(vector_store_id.to_s)).sub('{' + 'file_id' + '}', CGI.escape(file_id.to_s)) # query parameters query_params = opts[:query_params] || {} # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept'] # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:debug_body] # return_type return_type = opts[:debug_return_type] || 'DeleteVectorStoreFileResponse' # auth_names auth_names = opts[:debug_auth_names] || ['ApiKeyAuth'] = opts.merge( :operation => :"VectorStoresApi.delete_vector_store_file", :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type ) data, status_code, headers = @api_client.call_api(:DELETE, local_var_path, ) if @api_client.config.debugging @api_client.config.logger.debug "API called: VectorStoresApi#delete_vector_store_file\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#delete_vector_store_with_http_info(vector_store_id, opts = {}) ⇒ Array<(DeleteVectorStoreResponse, Integer, Hash)>
Delete a vector store.
312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 |
# File 'lib/openapi_openai/api/vector_stores_api.rb', line 312 def delete_vector_store_with_http_info(vector_store_id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: VectorStoresApi.delete_vector_store ...' end # verify the required parameter 'vector_store_id' is set if @api_client.config.client_side_validation && vector_store_id.nil? fail ArgumentError, "Missing the required parameter 'vector_store_id' when calling VectorStoresApi.delete_vector_store" end # resource path local_var_path = '/vector_stores/{vector_store_id}'.sub('{' + 'vector_store_id' + '}', CGI.escape(vector_store_id.to_s)) # query parameters query_params = opts[:query_params] || {} # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept'] # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:debug_body] # return_type return_type = opts[:debug_return_type] || 'DeleteVectorStoreResponse' # auth_names auth_names = opts[:debug_auth_names] || ['ApiKeyAuth'] = opts.merge( :operation => :"VectorStoresApi.delete_vector_store", :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type ) data, status_code, headers = @api_client.call_api(:DELETE, local_var_path, ) if @api_client.config.debugging @api_client.config.logger.debug "API called: VectorStoresApi#delete_vector_store\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#get_vector_store(vector_store_id, opts = {}) ⇒ VectorStoreObject
Retrieves a vector store.
431 432 433 434 |
# File 'lib/openapi_openai/api/vector_stores_api.rb', line 431 def get_vector_store(vector_store_id, opts = {}) data, _status_code, _headers = get_vector_store_with_http_info(vector_store_id, opts) data end |
#get_vector_store_file(vector_store_id, file_id, opts = {}) ⇒ VectorStoreFileObject
Retrieves a vector store file.
493 494 495 496 |
# File 'lib/openapi_openai/api/vector_stores_api.rb', line 493 def get_vector_store_file(vector_store_id, file_id, opts = {}) data, _status_code, _headers = get_vector_store_file_with_http_info(vector_store_id, file_id, opts) data end |
#get_vector_store_file_batch(vector_store_id, batch_id, opts = {}) ⇒ VectorStoreFileBatchObject
Retrieves a vector store file batch.
560 561 562 563 |
# File 'lib/openapi_openai/api/vector_stores_api.rb', line 560 def get_vector_store_file_batch(vector_store_id, batch_id, opts = {}) data, _status_code, _headers = get_vector_store_file_batch_with_http_info(vector_store_id, batch_id, opts) data end |
#get_vector_store_file_batch_with_http_info(vector_store_id, batch_id, opts = {}) ⇒ Array<(VectorStoreFileBatchObject, Integer, Hash)>
Retrieves a vector store file batch.
570 571 572 573 574 575 576 577 578 579 580 581 582 583 584 585 586 587 588 589 590 591 592 593 594 595 596 597 598 599 600 601 602 603 604 605 606 607 608 609 610 611 612 613 614 615 616 617 618 619 620 |
# File 'lib/openapi_openai/api/vector_stores_api.rb', line 570 def get_vector_store_file_batch_with_http_info(vector_store_id, batch_id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: VectorStoresApi.get_vector_store_file_batch ...' end # verify the required parameter 'vector_store_id' is set if @api_client.config.client_side_validation && vector_store_id.nil? fail ArgumentError, "Missing the required parameter 'vector_store_id' when calling VectorStoresApi.get_vector_store_file_batch" end # verify the required parameter 'batch_id' is set if @api_client.config.client_side_validation && batch_id.nil? fail ArgumentError, "Missing the required parameter 'batch_id' when calling VectorStoresApi.get_vector_store_file_batch" end # resource path local_var_path = '/vector_stores/{vector_store_id}/file_batches/{batch_id}'.sub('{' + 'vector_store_id' + '}', CGI.escape(vector_store_id.to_s)).sub('{' + 'batch_id' + '}', CGI.escape(batch_id.to_s)) # query parameters query_params = opts[:query_params] || {} # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept'] # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:debug_body] # return_type return_type = opts[:debug_return_type] || 'VectorStoreFileBatchObject' # auth_names auth_names = opts[:debug_auth_names] || ['ApiKeyAuth'] = opts.merge( :operation => :"VectorStoresApi.get_vector_store_file_batch", :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type ) data, status_code, headers = @api_client.call_api(:GET, local_var_path, ) if @api_client.config.debugging @api_client.config.logger.debug "API called: VectorStoresApi#get_vector_store_file_batch\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#get_vector_store_file_with_http_info(vector_store_id, file_id, opts = {}) ⇒ Array<(VectorStoreFileObject, Integer, Hash)>
Retrieves a vector store file.
503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 |
# File 'lib/openapi_openai/api/vector_stores_api.rb', line 503 def get_vector_store_file_with_http_info(vector_store_id, file_id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: VectorStoresApi.get_vector_store_file ...' end # verify the required parameter 'vector_store_id' is set if @api_client.config.client_side_validation && vector_store_id.nil? fail ArgumentError, "Missing the required parameter 'vector_store_id' when calling VectorStoresApi.get_vector_store_file" end # verify the required parameter 'file_id' is set if @api_client.config.client_side_validation && file_id.nil? fail ArgumentError, "Missing the required parameter 'file_id' when calling VectorStoresApi.get_vector_store_file" end # resource path local_var_path = '/vector_stores/{vector_store_id}/files/{file_id}'.sub('{' + 'vector_store_id' + '}', CGI.escape(vector_store_id.to_s)).sub('{' + 'file_id' + '}', CGI.escape(file_id.to_s)) # query parameters query_params = opts[:query_params] || {} # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept'] # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:debug_body] # return_type return_type = opts[:debug_return_type] || 'VectorStoreFileObject' # auth_names auth_names = opts[:debug_auth_names] || ['ApiKeyAuth'] = opts.merge( :operation => :"VectorStoresApi.get_vector_store_file", :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type ) data, status_code, headers = @api_client.call_api(:GET, local_var_path, ) if @api_client.config.debugging @api_client.config.logger.debug "API called: VectorStoresApi#get_vector_store_file\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#get_vector_store_with_http_info(vector_store_id, opts = {}) ⇒ Array<(VectorStoreObject, Integer, Hash)>
Retrieves a vector store.
440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 |
# File 'lib/openapi_openai/api/vector_stores_api.rb', line 440 def get_vector_store_with_http_info(vector_store_id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: VectorStoresApi.get_vector_store ...' end # verify the required parameter 'vector_store_id' is set if @api_client.config.client_side_validation && vector_store_id.nil? fail ArgumentError, "Missing the required parameter 'vector_store_id' when calling VectorStoresApi.get_vector_store" end # resource path local_var_path = '/vector_stores/{vector_store_id}'.sub('{' + 'vector_store_id' + '}', CGI.escape(vector_store_id.to_s)) # query parameters query_params = opts[:query_params] || {} # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept'] # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:debug_body] # return_type return_type = opts[:debug_return_type] || 'VectorStoreObject' # auth_names auth_names = opts[:debug_auth_names] || ['ApiKeyAuth'] = opts.merge( :operation => :"VectorStoresApi.get_vector_store", :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type ) data, status_code, headers = @api_client.call_api(:GET, local_var_path, ) if @api_client.config.debugging @api_client.config.logger.debug "API called: VectorStoresApi#get_vector_store\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#list_files_in_vector_store_batch(vector_store_id, batch_id, opts = {}) ⇒ ListVectorStoreFilesResponse
Returns a list of vector store files in a batch.
632 633 634 635 |
# File 'lib/openapi_openai/api/vector_stores_api.rb', line 632 def list_files_in_vector_store_batch(vector_store_id, batch_id, opts = {}) data, _status_code, _headers = list_files_in_vector_store_batch_with_http_info(vector_store_id, batch_id, opts) data end |
#list_files_in_vector_store_batch_with_http_info(vector_store_id, batch_id, opts = {}) ⇒ Array<(ListVectorStoreFilesResponse, Integer, Hash)>
Returns a list of vector store files in a batch.
647 648 649 650 651 652 653 654 655 656 657 658 659 660 661 662 663 664 665 666 667 668 669 670 671 672 673 674 675 676 677 678 679 680 681 682 683 684 685 686 687 688 689 690 691 692 693 694 695 696 697 698 699 700 701 702 703 704 705 706 707 708 709 710 |
# File 'lib/openapi_openai/api/vector_stores_api.rb', line 647 def list_files_in_vector_store_batch_with_http_info(vector_store_id, batch_id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: VectorStoresApi.list_files_in_vector_store_batch ...' end # verify the required parameter 'vector_store_id' is set if @api_client.config.client_side_validation && vector_store_id.nil? fail ArgumentError, "Missing the required parameter 'vector_store_id' when calling VectorStoresApi.list_files_in_vector_store_batch" end # verify the required parameter 'batch_id' is set if @api_client.config.client_side_validation && batch_id.nil? fail ArgumentError, "Missing the required parameter 'batch_id' when calling VectorStoresApi.list_files_in_vector_store_batch" end allowable_values = ["asc", "desc"] if @api_client.config.client_side_validation && opts[:'order'] && !allowable_values.include?(opts[:'order']) fail ArgumentError, "invalid value for \"order\", must be one of #{allowable_values}" end allowable_values = ["in_progress", "completed", "failed", "cancelled"] if @api_client.config.client_side_validation && opts[:'filter'] && !allowable_values.include?(opts[:'filter']) fail ArgumentError, "invalid value for \"filter\", must be one of #{allowable_values}" end # resource path local_var_path = '/vector_stores/{vector_store_id}/file_batches/{batch_id}/files'.sub('{' + 'vector_store_id' + '}', CGI.escape(vector_store_id.to_s)).sub('{' + 'batch_id' + '}', CGI.escape(batch_id.to_s)) # query parameters query_params = opts[:query_params] || {} query_params[:'limit'] = opts[:'limit'] if !opts[:'limit'].nil? query_params[:'order'] = opts[:'order'] if !opts[:'order'].nil? query_params[:'after'] = opts[:'after'] if !opts[:'after'].nil? query_params[:'before'] = opts[:'before'] if !opts[:'before'].nil? query_params[:'filter'] = opts[:'filter'] if !opts[:'filter'].nil? # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept'] # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:debug_body] # return_type return_type = opts[:debug_return_type] || 'ListVectorStoreFilesResponse' # auth_names auth_names = opts[:debug_auth_names] || ['ApiKeyAuth'] = opts.merge( :operation => :"VectorStoresApi.list_files_in_vector_store_batch", :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type ) data, status_code, headers = @api_client.call_api(:GET, local_var_path, ) if @api_client.config.debugging @api_client.config.logger.debug "API called: VectorStoresApi#list_files_in_vector_store_batch\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#list_vector_store_files(vector_store_id, opts = {}) ⇒ ListVectorStoreFilesResponse
Returns a list of vector store files.
721 722 723 724 |
# File 'lib/openapi_openai/api/vector_stores_api.rb', line 721 def list_vector_store_files(vector_store_id, opts = {}) data, _status_code, _headers = list_vector_store_files_with_http_info(vector_store_id, opts) data end |
#list_vector_store_files_with_http_info(vector_store_id, opts = {}) ⇒ Array<(ListVectorStoreFilesResponse, Integer, Hash)>
Returns a list of vector store files.
735 736 737 738 739 740 741 742 743 744 745 746 747 748 749 750 751 752 753 754 755 756 757 758 759 760 761 762 763 764 765 766 767 768 769 770 771 772 773 774 775 776 777 778 779 780 781 782 783 784 785 786 787 788 789 790 791 792 793 794 |
# File 'lib/openapi_openai/api/vector_stores_api.rb', line 735 def list_vector_store_files_with_http_info(vector_store_id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: VectorStoresApi.list_vector_store_files ...' end # verify the required parameter 'vector_store_id' is set if @api_client.config.client_side_validation && vector_store_id.nil? fail ArgumentError, "Missing the required parameter 'vector_store_id' when calling VectorStoresApi.list_vector_store_files" end allowable_values = ["asc", "desc"] if @api_client.config.client_side_validation && opts[:'order'] && !allowable_values.include?(opts[:'order']) fail ArgumentError, "invalid value for \"order\", must be one of #{allowable_values}" end allowable_values = ["in_progress", "completed", "failed", "cancelled"] if @api_client.config.client_side_validation && opts[:'filter'] && !allowable_values.include?(opts[:'filter']) fail ArgumentError, "invalid value for \"filter\", must be one of #{allowable_values}" end # resource path local_var_path = '/vector_stores/{vector_store_id}/files'.sub('{' + 'vector_store_id' + '}', CGI.escape(vector_store_id.to_s)) # query parameters query_params = opts[:query_params] || {} query_params[:'limit'] = opts[:'limit'] if !opts[:'limit'].nil? query_params[:'order'] = opts[:'order'] if !opts[:'order'].nil? query_params[:'after'] = opts[:'after'] if !opts[:'after'].nil? query_params[:'before'] = opts[:'before'] if !opts[:'before'].nil? query_params[:'filter'] = opts[:'filter'] if !opts[:'filter'].nil? # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept'] # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:debug_body] # return_type return_type = opts[:debug_return_type] || 'ListVectorStoreFilesResponse' # auth_names auth_names = opts[:debug_auth_names] || ['ApiKeyAuth'] = opts.merge( :operation => :"VectorStoresApi.list_vector_store_files", :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type ) data, status_code, headers = @api_client.call_api(:GET, local_var_path, ) if @api_client.config.debugging @api_client.config.logger.debug "API called: VectorStoresApi#list_vector_store_files\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#list_vector_stores(opts = {}) ⇒ ListVectorStoresResponse
Returns a list of vector stores.
803 804 805 806 |
# File 'lib/openapi_openai/api/vector_stores_api.rb', line 803 def list_vector_stores(opts = {}) data, _status_code, _headers = list_vector_stores_with_http_info(opts) data end |
#list_vector_stores_with_http_info(opts = {}) ⇒ Array<(ListVectorStoresResponse, Integer, Hash)>
Returns a list of vector stores.
815 816 817 818 819 820 821 822 823 824 825 826 827 828 829 830 831 832 833 834 835 836 837 838 839 840 841 842 843 844 845 846 847 848 849 850 851 852 853 854 855 856 857 858 859 860 861 862 863 864 865 |
# File 'lib/openapi_openai/api/vector_stores_api.rb', line 815 def list_vector_stores_with_http_info(opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: VectorStoresApi.list_vector_stores ...' end allowable_values = ["asc", "desc"] if @api_client.config.client_side_validation && opts[:'order'] && !allowable_values.include?(opts[:'order']) fail ArgumentError, "invalid value for \"order\", must be one of #{allowable_values}" end # resource path local_var_path = '/vector_stores' # query parameters query_params = opts[:query_params] || {} query_params[:'limit'] = opts[:'limit'] if !opts[:'limit'].nil? query_params[:'order'] = opts[:'order'] if !opts[:'order'].nil? query_params[:'after'] = opts[:'after'] if !opts[:'after'].nil? query_params[:'before'] = opts[:'before'] if !opts[:'before'].nil? # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept'] # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:debug_body] # return_type return_type = opts[:debug_return_type] || 'ListVectorStoresResponse' # auth_names auth_names = opts[:debug_auth_names] || ['ApiKeyAuth'] = opts.merge( :operation => :"VectorStoresApi.list_vector_stores", :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type ) data, status_code, headers = @api_client.call_api(:GET, local_var_path, ) if @api_client.config.debugging @api_client.config.logger.debug "API called: VectorStoresApi#list_vector_stores\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#modify_vector_store(vector_store_id, update_vector_store_request, opts = {}) ⇒ VectorStoreObject
Modifies a vector store.
872 873 874 875 |
# File 'lib/openapi_openai/api/vector_stores_api.rb', line 872 def modify_vector_store(vector_store_id, update_vector_store_request, opts = {}) data, _status_code, _headers = modify_vector_store_with_http_info(vector_store_id, update_vector_store_request, opts) data end |
#modify_vector_store_with_http_info(vector_store_id, update_vector_store_request, opts = {}) ⇒ Array<(VectorStoreObject, Integer, Hash)>
Modifies a vector store.
882 883 884 885 886 887 888 889 890 891 892 893 894 895 896 897 898 899 900 901 902 903 904 905 906 907 908 909 910 911 912 913 914 915 916 917 918 919 920 921 922 923 924 925 926 927 928 929 930 931 932 933 934 935 936 937 |
# File 'lib/openapi_openai/api/vector_stores_api.rb', line 882 def modify_vector_store_with_http_info(vector_store_id, update_vector_store_request, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: VectorStoresApi.modify_vector_store ...' end # verify the required parameter 'vector_store_id' is set if @api_client.config.client_side_validation && vector_store_id.nil? fail ArgumentError, "Missing the required parameter 'vector_store_id' when calling VectorStoresApi.modify_vector_store" end # verify the required parameter 'update_vector_store_request' is set if @api_client.config.client_side_validation && update_vector_store_request.nil? fail ArgumentError, "Missing the required parameter 'update_vector_store_request' when calling VectorStoresApi.modify_vector_store" end # resource path local_var_path = '/vector_stores/{vector_store_id}'.sub('{' + 'vector_store_id' + '}', CGI.escape(vector_store_id.to_s)) # query parameters query_params = opts[:query_params] || {} # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept'] # HTTP header 'Content-Type' content_type = @api_client.select_header_content_type(['application/json']) if !content_type.nil? header_params['Content-Type'] = content_type end # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:debug_body] || @api_client.object_to_http_body(update_vector_store_request) # return_type return_type = opts[:debug_return_type] || 'VectorStoreObject' # auth_names auth_names = opts[:debug_auth_names] || ['ApiKeyAuth'] = opts.merge( :operation => :"VectorStoresApi.modify_vector_store", :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type ) data, status_code, headers = @api_client.call_api(:POST, local_var_path, ) if @api_client.config.debugging @api_client.config.logger.debug "API called: VectorStoresApi#modify_vector_store\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |