Skip to content

Commit

Permalink
feat(vertexai): add location validation and unit comprehensive tests
Browse files Browse the repository at this point in the history
- Introduced a new method `validate_location` to sanitize and validate location input, defaulting to "us-central1" if invalid.
- Updated the provider initialization to utilize the new location validation method.
- Added extensive unit tests for the provider, covering various scenarios including location validation, request conversion, and handling of empty messages.
- Ensured that invalid characters in location parameters are filtered out correctly.
- Enhanced tests to verify the precedence of API key over credentials path in configuration.

This commit improves the robustness of the VertexAIProvider by ensuring valid location formats and enhancing test coverage.
  • Loading branch information
onyedikachi-david committed Dec 31, 2024
1 parent b26628c commit a381664
Showing 1 changed file with 486 additions and 2 deletions.
Loading

0 comments on commit a381664

Please sign in to comment.