You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
@michaelchia I wouldn't expect that to raise an exception, since unpacking two dictionaries with shared keys does not; it only results in the second dictionary clobbering the first:
>>> a = { "key": 1 }
>>> b = { "key": 2 }
>>> c = { **a, **b }
>>> c
{'key': 2}
If this is raising an exception, could you post the exception info here? If not, I'm not clear on what the issue is.
Repeated keys are allowed in curly brackets but not for functions. e.g. {"key": 1, "key": 2} won't throw errors but something like dict(key=1, key=2) (or dict(**a, **b) as per your example) will throw an exception (TypeError: dict() got multiple values for keyword argument 'key'). if it were super().__init__(*args, **{**kwargs, **model_kwargs}) it would've been fine.
Problem
super().__init__
in L122jupyter-ai/packages/jupyter-ai-magics/jupyter_ai_magics/providers.py
Lines 111 to 122 in 96465d1
Proposed Solution
change L120 to:
The text was updated successfully, but these errors were encountered: