fix: typing fixes

This commit is contained in:
Gabriel Almeida 2023-03-26 09:06:38 -03:00
commit 9b6c9fd8eb
3 changed files with 3 additions and 5 deletions

View file

@ -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)

View file

@ -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()]

View file

@ -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