From 9b6c9fd8ebd9a7a5bb8a9f482d7e9f7d46e1a46e Mon Sep 17 00:00:00 2001 From: Gabriel Almeida Date: Sun, 26 Mar 2023 09:06:38 -0300 Subject: [PATCH] fix: typing fixes --- src/backend/langflow/interface/signature.py | 2 +- src/backend/langflow/interface/types.py | 2 +- src/backend/langflow/utils/payload.py | 4 +--- 3 files changed, 3 insertions(+), 5 deletions(-) diff --git a/src/backend/langflow/interface/signature.py b/src/backend/langflow/interface/signature.py index d812bd291..0bf2ae6a4 100644 --- a/src/backend/langflow/interface/signature.py +++ b/src/backend/langflow/interface/signature.py @@ -24,7 +24,7 @@ def get_signature(name: str, object_type: str): "agents": get_agent_signature, "prompts": get_prompt_signature, "llms": get_llm_signature, - "memories": get_memory_signature, + # "memories": get_memory_signature, "tools": get_tool_signature, }.get(object_type, lambda name: f"Invalid type: {name}")(name) diff --git a/src/backend/langflow/interface/types.py b/src/backend/langflow/interface/types.py index 57f3a2578..595addb50 100644 --- a/src/backend/langflow/interface/types.py +++ b/src/backend/langflow/interface/types.py @@ -6,7 +6,7 @@ def get_type_list(): """Get a list of all langchain types""" all_types = build_langchain_types_dict() - all_types.pop("tools") + # all_types.pop("tools") for key, value in all_types.items(): all_types[key] = [item["template"]["_type"] for item in value.values()] diff --git a/src/backend/langflow/utils/payload.py b/src/backend/langflow/utils/payload.py index 5fe3d8c56..9b5714233 100644 --- a/src/backend/langflow/utils/payload.py +++ b/src/backend/langflow/utils/payload.py @@ -2,8 +2,6 @@ import contextlib import re from typing import Dict -from langflow.utils.graph import Graph, Node - def extract_input_variables(nodes): """ @@ -38,7 +36,7 @@ def get_root_node(graph): return next((node for node in graph.nodes if node not in incoming_edges), None) -def build_json(root: Node, graph: Graph) -> Dict: +def build_json(root, graph) -> Dict: if "node" not in root.data: # If the root node has no "node" key, then it has only one child, # which is the target of the single outgoing edge