-
-
Notifications
You must be signed in to change notification settings - Fork 50
[Platform] Add support for Google vertex AI #297
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
base: main
Are you sure you want to change the base?
[Platform] Add support for Google vertex AI #297
Conversation
- Adds initial support to integrate text generation using vertex AI
- Adds support for embeddings
- Adds tests to verify the behavior
14ae923
to
35d9a8b
Compare
src/platform/composer.json
Outdated
@@ -22,6 +22,7 @@ | |||
"require": { | |||
"php": ">=8.2", | |||
"ext-fileinfo": "*", | |||
"google/auth": "^1.47", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please move it to require-dev
and add a check for the class existence to the implementation, like in the Bedrock one for example:
ai/src/platform/src/Bridge/Bedrock/PlatformFactory.php
Lines 37 to 39 in 11ef98f
if (!class_exists(BedrockRuntimeClient::class)) { | |
throw new RuntimeException('For using the Bedrock platform, the async-aws/bedrock-runtime package is required. Try running "composer require async-aws/bedrock-runtime".'); | |
} |
35d9a8b
to
9124195
Compare
?Contract $contract = null, | ||
): Platform { | ||
if (!class_exists(ApplicationDefaultCredentials::class)) { | ||
throw new RuntimeException('For using the Bedrock platform, the google/auth package is required. Try running "composer require google/auth".'); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
throw new RuntimeException('For using the Bedrock platform, the google/auth package is required. Try running "composer require google/auth".'); | |
throw new RuntimeException('For using the Vertex AI platform, google/auth package is required for authentication via application default credentials. Try running "composer require google/auth".'); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I did it already.
Pushing the change in a few moments.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lgtm, ship it
- Adds examples to interact with vertex ai
9124195
to
cd83b3b
Compare
Docs and AI bundle integration need to be added first. |
Changes proposed: