-
-
Notifications
You must be signed in to change notification settings - Fork 56
Open
Labels
FeatureNew featureNew featurePlatformIssues & PRs about the AI Platform componentIssues & PRs about the AI Platform componentRFCRFC = Request For Comments (proposals about features that you want to be discussed)RFC = Request For Comments (proposals about features that you want to be discussed)
Description
Allow using gemini models from google cloud, gemini models are accessible via Google Vertex AI which is a similar kind of service to AWS bedrock
https://cloud.google.com/vertex-ai
We could use the google cloud php ai sdk to implement it as it supports credential chain discovery, similar to async bedrock runtime client, see:
https://github.com/googleapis/google-cloud-php-ai-platform
Example rawPredict request:
$predictionServiceClient = new Google\Cloud\AIPlatform\V1\Client\PredictionServiceClient();
$modelUrl = \sprintf(
'projects/%s/locations/%s/%s',
$this->googleCloudProject,
self::GOOGLE_CLOUD_LOCATION,
$modelId,
);
$response = $predictionServiceClient->rawPredict(
request: RawPredictRequest::build(
endpoint: $modelUrl,
httpBody: new HttpBody(
[
'data' => \json_encode($payload)
]
)
)
);
See preview relevant issue: #146
Metadata
Metadata
Assignees
Labels
FeatureNew featureNew featurePlatformIssues & PRs about the AI Platform componentIssues & PRs about the AI Platform componentRFCRFC = Request For Comments (proposals about features that you want to be discussed)RFC = Request For Comments (proposals about features that you want to be discussed)