| [ Index ] |
PHP Cross Reference of WordPress Trunk (Updated Daily) |
[Source view] [Print] [Project Stats]
Base class for an API-based model for a provider. While this class contains no abstract methods, it is still abstract to ensure that each model class can actually perform generative AI tasks by implementing the corresponding interfaces.
| File Size: | 129 lines (4 kb) |
| Included or required: | 0 times |
| Referenced: | 0 times |
| Includes or requires: | 0 files |
| __construct(ModelMetadata $metadata, ProviderMetadata $providerMetadata) X-Ref |
| Constructor. param: ModelMetadata $metadata The metadata for the model. param: ProviderMetadata $providerMetadata The metadata for the model's provider. |
| metadata() X-Ref |
| {@inheritDoc} |
| providerMetadata() X-Ref |
| {@inheritDoc} |
| setConfig(ModelConfig $config) X-Ref |
| {@inheritDoc} |
| getConfig() X-Ref |
| {@inheritDoc} |
| setRequestOptions(RequestOptions $requestOptions) X-Ref |
| {@inheritDoc} |
| getRequestOptions() X-Ref |
| {@inheritDoc} |
| prepareFunctionParametersForRequest(FunctionDeclaration $functionDeclaration) X-Ref |
| Prepares a function parameter schema for a provider request. Returns the original parameters by default. Providers must call this hook when building their tool payload. Overrides can read the declaration annotations and return an adjusted schema without changing the original declaration. Providers still choose the API fields and encode the request. return: array<string, mixed>|null The parameter schema to use in this request. param: FunctionDeclaration $functionDeclaration The original function declaration. |
| Generated : Sun Nov 8 08:20:01 2026 | Cross-referenced by PHPXref |