-
Notifications
You must be signed in to change notification settings - Fork 21
Open
Copy link
Labels
[Type] EnhancementA suggestion for improvement.A suggestion for improvement.
Milestone
Description
A small API enhancement:
- Currently,
ModelConfig
has atoRequiredOptions
method, which is used as part of creating aModelRequirements
instance. This is not ideal, as it makes theModelConfig
class, 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,
ModelMetadata
has ameetsRequirements
method, 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.md
foresaw creating aRequirementsUtil
class 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): bool
public 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.