Merged
Conversation
Contributor
There was a problem hiding this comment.
Pull Request Overview
This PR adds continuous integration workflows for linting and testing, and updates configuration in the Vectorize retriever along with corresponding tests.
- Adds GitHub Action workflows for Python linting (.github/workflows/lint.yml) and testing (.github/workflows/python_test.yml).
- Updates the VectorizeRetriever class to support an "environment" attribute and modifies its API client initialization.
- Adjusts tests to incorporate the new "environment" parameter and implements a retry loop for document retrieval.
Reviewed Changes
Copilot reviewed 5 out of 5 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
| .github/workflows/lint.yml | Introduces a linting workflow for the LangChain project. |
| .github/workflows/python_test.yml | Adds a testing workflow for executing Python tests across versions. |
| langchain/langchain_vectorize/retrievers.py | Updates the retriever to support an environment setting. |
| langchain/tests/test_retrievers.py | Modifies tests to utilize the new environment parameter and wait for expected results. |
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
This file contains hidden or 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
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.
This pull request introduces several key changes to the CI workflows and the
VectorizeRetrieverclass, as well as updates to the test suite to accommodate new functionality. The most important changes include the addition of linting and testing workflows, enhancement of theVectorizeRetrieverclass to support different environments, and updates to the test cases to ensure they work with the new environment settings.CI Workflow Enhancements:
ruff. (.github/workflows/lint.yml)pytest. (.github/workflows/python_test.yml)VectorizeRetrieverEnhancements:environmentattribute to theVectorizeRetrieverclass, allowing it to operate in different environments such as "prod", "dev", "local", and "staging". (langchain/langchain_vectorize/retrievers.py)model_post_initmethod to configure the API client based on the specified environment, including setting custom headers for local development. (langchain/langchain_vectorize/retrievers.py)Test Suite Updates:
environmentfixture to the test suite to provide the environment setting for tests. Updated theapi_clientfixture to use this environment setting. (langchain/tests/test_retrievers.py)environmentparameter and added a retry mechanism to ensure documents are retrieved within a specified time frame. (langchain/tests/test_retrievers.py)