We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent c47abd6 commit 43e5b78Copy full SHA for 43e5b78
1 file changed
effectful/handlers/llm/template.py
@@ -295,14 +295,7 @@ def define[**Q, V](
295
*typing.cast(list[MutableMapping[str, Any]], contexts)
296
)
297
298
- is_recursive = _is_recursive_signature(inspect.signature(default))
299
- # todo: make this more pythonic
300
- if not is_recursive:
301
- # drop default.__name__ from context
302
- pass
303
-
304
op = super().define(default, *args, **kwargs)
305
op.__context__ = context # type: ignore[attr-defined]
306
- # todo: drop self from contexts if not is_recursive
307
308
return typing.cast(Template[Q, V], op)
0 commit comments