Sets the model configuration.
Description
Merges the provided configuration with the builder’s configuration, with builder configuration taking precedence.
Parameters
$configWordPressAiClientProvidersModelsDTOModelConfigrequired- The model configuration to merge.
Source
public function usingModelConfig(ModelConfig $config): self
{
// Convert both configs to arrays
$builderConfigArray = $this->modelConfig->toArray();
$providedConfigArray = $config->toArray();
// Merge arrays with builder config taking precedence
$mergedArray = array_merge($providedConfigArray, $builderConfigArray);
// Create new config from merged array
$this->modelConfig = ModelConfig::fromArray($mergedArray);
return $this;
}
Changelog
| Version | Description |
|---|---|
| 0.1.0 | Introduced. |
User Contributed Notes
You must log in before being able to contribute a note or feedback.