🐛 fix(memories.py): add condition to only add output_key field if template type is not VectorStoreRetrieverMemory

The output_key field is now only added to the template if the template type is not VectorStoreRetrieverMemory. This ensures that the output_key field is not added unnecessarily for templates of this type.
This commit is contained in:
Gabriel Luiz Freitas Almeida 2023-07-01 09:43:17 -03:00
commit e04eb0fd7e

View file

@ -37,6 +37,7 @@ class MemoryFrontendNode(FrontendNode):
value="", value="",
) )
) )
if self.template.type_name not in {"VectorStoreRetrieverMemory"}:
self.template.add_field( self.template.add_field(
TemplateField( TemplateField(
field_type="str", field_type="str",