🔥 refactor(types.py): temporarily remove the code parameter from the params dictionary in ChainVertex's build method

This commit is contained in:
Gabriel Luiz Freitas Almeida 2023-11-06 21:24:51 -03:00
commit d2ee902871

View file

@ -206,6 +206,10 @@ class ChainVertex(Vertex):
) -> Any:
if not self._built or force:
# Check if the chain requires a PromptVertex
# Temporarily remove the code from the params
self.params.pop("code", None)
for key, value in self.params.items():
if isinstance(value, PromptVertex):
# Build the PromptVertex, passing the tools if available