Merge branch 'form_io' of github.com:logspace-ai/langflow into form_io

This commit is contained in:
Lucas Oliveira 2023-07-06 00:29:37 -03:00
commit 26ec9c5d85
3 changed files with 10 additions and 2 deletions

View file

@ -160,7 +160,13 @@ async def stream_build(flow_id: str):
input_keys_response = build_input_keys_response(
langchain_object, artifacts
)
yield str(StreamData(event="message", data=input_keys_response))
else:
input_keys_response = {
"input_keys": {},
"memory_keys": [],
"handle_keys": [],
}
yield str(StreamData(event="message", data=input_keys_response))
chat_manager.set_cache(flow_id, langchain_object)
# We need to reset the chat history

View file

@ -73,12 +73,14 @@ def add_new_variables_to_template(input_variables, prompt_request):
advanced=False,
multiline=True,
input_types=["Document", "BaseOutputParser"],
value="", # Set the value to empty string
)
if variable in prompt_request.frontend_node.template:
# Set the new field with the old value
template_field.value = prompt_request.frontend_node.template[variable][
"value"
]
prompt_request.frontend_node.template[variable] = template_field.to_dict()
# Check if variable is not already in the list before appending

View file

@ -226,4 +226,4 @@ class Vertex:
return id(self)
def _built_object_repr(self):
return repr(self._built_object)
return "Built sucessfully" if self._built_object else "Not built yet"