New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add vector store endpoints #472
Open
willywg
wants to merge
14
commits into
alexrudall:main
Choose a base branch
from
willywg:add_vector_store_endpoints
base: main
Could not load branches
Branch not found: {{ refName }}
Could not load tags
Nothing to show
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
+3,818
−3
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
… OpenAI client This commit adds tests for the vector stores endpoints in the OpenAI client. The tests cover the following functionality: - `#list`: verifies that the response contains a vector store object - `#retrieve`: verifies that the response contains a vector store object - `#create`: verifies that the response contains a vector store object - `#modify`: verifies that the response contains a vector store object - `#delete`: verifies that the response contains a vector store.deleted object These tests ensure that the vector stores functionality in the OpenAI client is working correctly.
… and deleting vector stores feat(vector_stores_create): add support for creating a vector store by sending a POST request to the API with the necessary parameters feat(vector_stores_delete): add support for deleting a vector store by sending a DELETE request to the API with the vector store ID feat(vector_stores_modify): add support for modifying a vector store by sending a POST request to the API with the vector store ID and the updated metadata feat(vector_stores_retrieve): add support for retrieving a vector store by sending a GET request to the API with the vector store ID
- Added `require_relative "openai/vector_stores"` to `lib/openai.rb` to include the vector stores module. - Added `def vector_stores` method to `lib/openai/client.rb` to initialize and return an instance of `OpenAI::VectorStores`. - Added `lib/openai/vector_stores.rb` file to define the `OpenAI::VectorStores` class with methods for listing, retrieving, creating, modifying, and deleting vector stores.
…nctionality This commit adds tests for the functionality related to vector store files in the OpenAI client. The tests cover the following scenarios: - `#list`: verifies that the list operation succeeds and returns the expected object type. - `#retrieve`: verifies that the retrieve operation succeeds and returns the expected object type. - `#create`: verifies that the create operation succeeds and returns the expected object type. - `#delete`: verifies that the delete operation succeeds and returns the expected object type. These tests ensure that the vector store files functionality is working correctly and can be used to manage vector store files effectively.
…d deleting files in a vector store This commit adds support for creating, retrieving, listing, and deleting files in a vector store. The changes include the following: 1. Added support for creating a file in a vector store. 2. Added support for retrieving a file from a vector store. 3. Added support for listing all files in a vector store. 4. Added support for deleting a file from a vector store. These changes enable users to perform CRUD operations on files within a vector store, providing more flexibility and control over the data stored in the vector store.
This commit adds a new file `vector_store_files.rb` to the `openai` library. The `VectorStoreFiles` class is implemented, which provides methods for interacting with vector store files. The class includes methods for listing, retrieving, creating, and deleting vector store files. This addition enhances the functionality of the `openai` library by allowing users to manage vector store files.
…ile batches functionality This commit adds tests for the `vector_store_file_batches` functionality in the `OpenAI::Client` class. The tests cover the following methods: - `#list`: Tests that the list method returns the expected response object. - `#retrieve`: Tests that the retrieve method returns the expected response object. - `#create`: Tests that the create method returns the expected response object. - `#cancel`: Tests that the cancel method returns the expected response object. These tests ensure that the `vector_store_file_batches` functionality is working correctly and can be used to interact with vector store file batches.
…ctor store This commit adds the functionality to retrieve file batches from a vector store. The changes include the addition of new API endpoints and the necessary logic to handle the retrieval of file batches. The following files were added or modified: - `vector_store_file_batches_retrieve.yml`: Added a new cassette file to capture the HTTP interactions for retrieving file batches from a vector store. - `vector_store_file_batches_retrieve_vector_store_setup.yml`: Added a new cassette file to capture the HTTP interactions for setting up a vector store for retrieving file batches. - `vector_store_file_batches_retrieve_file_setup.yml`: Added a new cassette file to capture the HTTP interactions for setting up a file for retrieving file batches. - `vector_store_file_batches_retrieve_vector_store_file_batch_setup.yml`: Added a new cassette file to capture the HTTP interactions for setting up a vector store file batch for retrieving file batches. These changes were made to enhance the functionality of the vector store feature and improve the overall user experience.
…vector store file batch operations feat(client.rb): add vector_store_file_batches method to OpenAI::Client to access vector store file batch operations feat(vector_store_file_batches.rb): create VectorStoreFileBatches class to handle vector store file batch operations
…les, and vector store file batches to provide information on how to manage and interact with vector stores in the API feat(README.md): add support for file search tool in the assistant by including it as a tool resource in the assistant creation request
I have been working on this branch for a couple of days. It is stable and works as expected. I think it is good to go. @alexrudall - When can we get this merged? |
adamnaamani
reviewed
May 15, 2024
adamnaamani
reviewed
May 15, 2024
Co-authored-by: Adam Naamani <[email protected]>
Co-authored-by: Adam Naamani <[email protected]>
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Hi...
I'm excited to submit this PR for the issue #463: "Add the Vector Store, Vector Store Files, and Vector Store Batch Files APIs." With the recent release of OpenAI's Assistant V2, new endpoints have been introduced, including VectorStores, VectorStoreFiles, and VectorStoreBatchFiles. These endpoints are essential for leveraging the enhanced capabilities of the updated Assistant.
In this PR, I have implemented these new endpoints, ensuring compatibility and extending our API's functionality. Additionally, I have updated the README.md with usage examples to facilitate a better understanding for developers integrating these services.
Please find below the summary of changes:
Best regards.
All Submissions: