$request_options Optional. The request options. Default empty array. * @return array Metadata for each model, mapped by model slug. * * @throws Generative_AI_Exception Thrown if the request fails or the response is invalid. */ public function list_models( array $request_options = array() ): array; /** * Gets a generative model instance for the provided model parameters. * * @since 0.1.0 * @since 0.5.0 Support for the $tools and $toolConfig arguments was added. * * @param array $model_params { * Optional. Model parameters. Default empty array. * * @type string $feature Required. Unique identifier of the feature that the model * will be used for. Must only contain lowercase letters, * numbers, hyphens. * @type string $model The model slug. By default, the model will be determined * based on heuristics such as the requested capabilities. * @type string[] $capabilities Capabilities requested for the model to support. It is * recommended to specify this if you do not explicitly specify * a model slug. * @type Tools|null $tools The tools to use for the model. Default none. * @type Tool_Config|null $toolConfig Tool configuration options. Default none. * @type Generation_Config|null $generationConfig Model generation configuration options. Default none. * @type string|Parts|Content $systemInstruction The system instruction for the model. Default none. * } * @param array $request_options Optional. The request options. Default empty array. * @return Generative_AI_Model The generative model. * * @throws InvalidArgumentException Thrown if the model slug or parameters are invalid. * @throws Generative_AI_Exception Thrown if getting the model fails. */ public function get_model( array $model_params = array(), array $request_options = array() ): Generative_AI_Model; }