mirror of
https://github.com/hwchase17/langchain.git
synced 2025-06-22 23:00:00 +00:00
Provided default values for tags and inheritable_tags args in BaseRun… (#6858)
when running AsyncCallbackManagerForChainRun (from langchain.callbacks.manager import AsyncCallbackManagerForChainRun), provided default values for tags and inheritable_tages of empty lists in manager.py BaseRunManager. - Description: In manager.py, `BaseRunManager`, default values were provided for the `__init__` args `tags` and `inheritable_tags`. They default to empty lists (`[]`). - Issue: When trying to use Nvidia NeMo Guardrails with LangChain, the following exception was raised:
This commit is contained in:
parent
bd6a0ee9e9
commit
521c6f0233
@ -379,8 +379,8 @@ class BaseRunManager(RunManagerMixin):
|
||||
handlers: List[BaseCallbackHandler],
|
||||
inheritable_handlers: List[BaseCallbackHandler],
|
||||
parent_run_id: Optional[UUID] = None,
|
||||
tags: List[str],
|
||||
inheritable_tags: List[str],
|
||||
tags: Optional[List[str]] = None,
|
||||
inheritable_tags: Optional[List[str]] = None,
|
||||
) -> None:
|
||||
"""Initialize the run manager.
|
||||
|
||||
@ -391,15 +391,15 @@ class BaseRunManager(RunManagerMixin):
|
||||
The list of inheritable handlers.
|
||||
parent_run_id (UUID, optional): The ID of the parent run.
|
||||
Defaults to None.
|
||||
tags (List[str]): The list of tags.
|
||||
inheritable_tags (List[str]): The list of inheritable tags.
|
||||
tags (Optional[List[str]]): The list of tags.
|
||||
inheritable_tags (Optional[List[str]]): The list of inheritable tags.
|
||||
"""
|
||||
self.run_id = run_id
|
||||
self.handlers = handlers
|
||||
self.inheritable_handlers = inheritable_handlers
|
||||
self.tags = tags
|
||||
self.inheritable_tags = inheritable_tags
|
||||
self.parent_run_id = parent_run_id
|
||||
self.tags = tags or []
|
||||
self.inheritable_tags = inheritable_tags or []
|
||||
|
||||
@classmethod
|
||||
def get_noop_manager(cls: Type[BRM]) -> BRM:
|
||||
|
Loading…
Reference in New Issue
Block a user