Skip to content

More flexible method infer_provider #1945

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

hovi
Copy link

@hovi hovi commented Jun 8, 2025

I want to make my own factory method where I create providers based on provider name and other parameters (like base_url).
I found out, that logic that does it in the library is creating providers with default constructor without possibility to pass anything to it.

PR suggests 2 changes. Either change is enough to add the required flexibility:

  • Create function that returns provider class without instantiating it
  • Add kwargs parameters to infer_provider that are passed to constructor call

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant