fix: Refactor PythonREPLToolComponent, update template, and add support for None value on secretStrInput (#3741)

* refactor: Refactor PythonREPLToolComponent to use pydantic and langchain_utilities

* update template

* add suport for None value on secretStrInput
This commit is contained in:
anovazzi1 2024-09-10 11:02:54 -03:00 committed by GitHub
commit d668424ef3
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -273,6 +273,8 @@ class SecretStrInput(BaseInputMixin, DatabaseLoadMixin):
)
elif isinstance(v, (AsyncIterator, Iterator)):
value = v
elif v is None:
value = None
else:
raise ValueError(f"Invalid value type `{type(v)}` for input `{_info.data['name']}`")
return value