[ Index ]

PHP Cross Reference of WordPress Trunk (Updated Daily)

Search

title

Body

[close]

/wp-includes/php-ai-client/src/Providers/ApiBasedImplementation/ -> AbstractApiBasedModelMetadataDirectory.php (summary)

Base class for an API-based model metadata directory for a provider.

File Size: 161 lines (6 kb)
Included or required:0 times
Referenced: 0 times
Includes or requires: 0 files

Defines 8 functions

  listModelMetadata()
  hasModelMetadata()
  getModelMetadata()
  getExplicitModelMetadataMap()
  getModelMetadataMap()
  getCachedKeys()
  getBaseCacheKey()
  createModelMetadataForExplicitModelIds()

Functions
Functions that are not part of a class:

listModelMetadata()   X-Ref
{@inheritDoc}


hasModelMetadata(string $modelId)   X-Ref
{@inheritDoc}


getModelMetadata(string $modelId)   X-Ref
{@inheritDoc}


getExplicitModelMetadataMap(array $modelIds)   X-Ref
Gets explicit model metadata using request-local memoization.

return: array<string, ModelMetadata> Map of model ID to explicit model metadata.
param: list<string> $modelIds Model IDs for which to get explicit metadata.

getModelMetadataMap()   X-Ref
Returns the map of model ID to model metadata for all models from the provider.

return: array<string, ModelMetadata> Map of model ID to model metadata.

getCachedKeys()   X-Ref
{@inheritDoc}


getBaseCacheKey()   X-Ref
{@inheritDoc}


createModelMetadataForExplicitModelIds(array $modelIds)   X-Ref
Creates metadata for explicit model IDs without listing provider models.

Providers whose APIs accept arbitrary/current model IDs can override this to avoid a live list-models request
when callers already know the model ID they want to instantiate.

return: array<string, ModelMetadata> Map of model ID to model metadata. Omit IDs that should fall back to the
param: list<string> $modelIds The explicit model IDs.



Generated : Sun Nov 1 08:20:35 2026 Cross-referenced by PHPXref