* $aiplatformService = new Google\Service\Aiplatform(...); * $chat = $aiplatformService->projects_locations_endpoints_chat; * */ class ProjectsLocationsEndpointsChat extends \Google\Service\Resource { /** * Exposes an OpenAI-compatible endpoint for chat completions. * (chat.completions) * * @param string $endpoint Required. The name of the endpoint requested to serve * the prediction. Format: * `projects/{project}/locations/{location}/endpoints/{endpoint}` * @param GoogleApiHttpBody $postBody * @param array $optParams Optional parameters. * @return GoogleApiHttpBody * @throws \Google\Service\Exception */ public function completions($endpoint, GoogleApiHttpBody $postBody, $optParams = []) { $params = ['endpoint' => $endpoint, 'postBody' => $postBody]; $params = array_merge($params, $optParams); return $this->call('completions', [$params], GoogleApiHttpBody::class); } } // Adding a class alias for backwards compatibility with the previous class name. class_alias(ProjectsLocationsEndpointsChat::class, 'Google_Service_Aiplatform_Resource_ProjectsLocationsEndpointsChat');