Skip to content

feat: adding VertexAI#555

Merged
ogabrielluiz merged 12 commits into
releasefrom
vertex_ai
Jun 30, 2023
Merged

feat: adding VertexAI#555
ogabrielluiz merged 12 commits into
releasefrom
vertex_ai

Conversation

@ogabrielluiz
Copy link
Copy Markdown
Contributor

@ogabrielluiz ogabrielluiz commented Jun 27, 2023

Issue #416

@ogabrielluiz ogabrielluiz marked this pull request as draft June 27, 2023 19:55
@ogabrielluiz ogabrielluiz linked an issue Jun 27, 2023 that may be closed by this pull request
Base automatically changed from release to main June 27, 2023 21:33
@cachatj
Copy link
Copy Markdown

cachatj commented Jun 28, 2023

Fantastic!

@ogabrielluiz ogabrielluiz changed the base branch from main to release June 28, 2023 12:07
Base automatically changed from release to main June 28, 2023 12:32
@ogabrielluiz ogabrielluiz changed the base branch from main to release June 29, 2023 01:13
@ogabrielluiz ogabrielluiz marked this pull request as ready for review June 29, 2023 18:13
The package version has been updated from 0.2.6 to 0.2.7. This change is made to reflect the latest changes and improvements in the package.
…ield type for "credentials"

📝 chore(llms.py): improve field configuration for VertexAI template and modify field type for "credentials"
The `add_extra_fields` method is modified to add an additional field called "credentials" for the VertexAI template. The field is of type "file" and is required. It allows the user to upload a JSON file as credentials. The `format_openai_field` method is also updated to handle the new "credentials" field.
….11 to ensure compatibility

⬆️ feat(pyproject.toml): add google-cloud-aiplatform dependency to enable integration with Google Cloud AI Platform
The python dependency version has been updated to >=3.9,<3.11 to ensure compatibility with the project. Additionally, the google-cloud-aiplatform dependency has been added to enable integration with Google Cloud AI Platform services.
…texAI class

The condition for showing fields in the VertexAI class has been simplified to exclude specific field names. This improves readability and maintainability of the code.
🔧 chore(loading.py): call initialize_vertexai function when node_type is "VertexAI"
The `llm.py` file now includes a new function `initialize_vertexai` that initializes the VertexAI credentials if a `credentials` parameter is provided. This allows for the usage of VertexAI credentials in the application. In `loading.py`, the `initialize_vertexai` function is called when the `node_type` is "VertexAI", ensuring that the VertexAI credentials are properly initialized for that specific node type.
…ge class

The logic to find the matched_type in the Edge class has been simplified by removing unnecessary nested loops and using a single generator expression. This improves the readability and efficiency of the code.
…bility and maintainability

🔀 chore(custom_lists.py): add ChatVertexAI to the import statements for better modularity and extensibility
🔀 chore(custom_lists.py): add ChatVertexAI to the llm_type_to_cls_dict for better compatibility and flexibility
🔀 chore(llms.py): change required field for credentials to be optional for better user experience
🔀 chore(llms.py): add advanced and show fields for specific fields related to VertexAI for better configurability

The import statements in `custom_lists.py` have been reformatted to improve readability and maintainability. The `ChatVertexAI` class has been added to the import statements to enhance modularity and extensibility.

The `ChatVertexAI` class has been added to the `llm_type_to_cls_dict` dictionary in `custom_lists.py` to improve compatibility and flexibility.

In `llms.py`, the `required` field for the `credentials` field has been changed to be optional for a better user experience.

The `advanced` and `show` fields have been added to specific fields related to VertexAI in `llms.py` to provide better configurability.
…ug causing AttributeError

The ChatVertexAI integration is temporarily commented out due to a bug that causes an AttributeError. This bug needs to be resolved before the integration can be activated again.
🔧 fix(loading.py): remove empty lines
The type error for the service_account import in llm.py is ignored to prevent a linting error. In loading.py, empty lines were removed for code cleanliness.
@ogabrielluiz ogabrielluiz merged commit e713c02 into release Jun 30, 2023
@YamonBot YamonBot mentioned this pull request Sep 4, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Integrating VertexAI / Google LLMs

2 participants