-
Notifications
You must be signed in to change notification settings - Fork 34
Closed
Copy link
Labels
[Type] EnhancementA suggestion for improvement.A suggestion for improvement.
Milestone
Description
A small API enhancement:
- Currently,
ModelConfighas atoRequiredOptionsmethod, which is used as part of creating aModelRequirementsinstance. This is not ideal, as it makes theModelConfigclass, a key component of both the implementer and extender APIs, dependent on the model discovery piece, which, while crucial, is of secondary nature when making LLM calls. - Additionally,
ModelMetadatahas ameetsRequirementsmethod, which similarly means it ties a key component to that model discovery piece. - Both of these methods should be moved to another class.
- The original plan from
ARCHITECTURE.mdforesaw creating aRequirementsUtilclass for this, but after discussion with @JasonTheAdams we don't think this is a solid solution either.
We think it would be best to put both of these functionalities into ModelRequirements.
For example as follows:
public function areMetBy(ModelMetadata $metadata): boolpublic static function fromPromptData(CapabilityEnum $capability, list<Message> $messages, ModelConfig $modelConfig): self
This also means we should remove the private PromptBuilder::getModelRequirements method, as its logic will basically be moved to the second method above.
Metadata
Metadata
Assignees
Labels
[Type] EnhancementA suggestion for improvement.A suggestion for improvement.