-
Notifications
You must be signed in to change notification settings - Fork 38
Closed
Labels
[Type] EnhancementA suggestion for improvement.A suggestion for improvement.
Milestone
Description
While in #99 we implemented support for RequestOptions, we never enabled callers with a reasonable way to provide them. I don't think it's currently even possible to pass request options alongside a prompt that would be used for the eventual API request to the cloud provider.
Here's what I'm proposing:
- expand
PromptBuilderwith ausingRequestOptions(RequestOptions $requestOptions): selfmethod - expand
ModelInterfacewithsetRequestOptions(RequestOptions $requestOptions): voidandgetRequestOptions(): ?RequestOptionsmethods - update the provider implementations to call
getRequestOptions()when constructing their API requests
By implementing this in ModelInterface and AbstractAiProvider, this is almost not even a breaking change. It technically is, if you're not using AbstractAiProvider. But we're so early in the lifecycle of this SDK, I doubt anyone is building custom providers yet.
Metadata
Metadata
Assignees
Labels
[Type] EnhancementA suggestion for improvement.A suggestion for improvement.