Skip to content
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

AzureLLMService: Add **kwargs in init function to pass along to super.init() #692

Open
manish-baghel opened this issue Nov 6, 2024 · 0 comments
Assignees

Comments

@manish-baghel
Copy link

manish-baghel commented Nov 6, 2024

Question

Was there any specific reason for not adding keyword args to the init function?
AzureLLMService:

class AzureLLMService(BaseOpenAILLMService):
def __init__(
self, *, api_key: str, endpoint: str, model: str, api_version: str = "2023-12-01-preview"
):
# Initialize variables before calling parent __init__() because that
# will call create_client() and we need those values there.
self._endpoint = endpoint
self._api_version = api_version
super().__init__(api_key=api_key, model=model)

Why it should be added?

  • To pass along props like name to the BaseLLMService
  • Make the arg interface same as other services.
    For eg,
    def __init__(
    self,
    *,
    api_key: str,
    model: str = "claude-3-5-sonnet-20240620",
    params: InputParams = InputParams(),
    **kwargs,
    ):
    super().__init__(**kwargs)
@manish-baghel manish-baghel changed the title AzureLLMService: Add **kwargs to init function to pass along to super.init() AzureLLMService: Add **kwargs in init function to pass along to super.init() Nov 6, 2024
@markbackman markbackman self-assigned this Dec 3, 2024
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

No branches or pull requests

2 participants