🔧 chore(config.yml): update Swagger API overview and paths
The Swagger API overview and paths have been updated to reflect the latest changes in the API. The changes include adding support for a new environment variable, `process.env.PORT`, to allow the application to run on a configurable port. Additionally, the Swagger API documentation has been updated to reflect the latest API version and routes. 🔍 chore(links): update links to use HTTPS instead of HTTP The links were updated to use HTTPS instead of HTTP to improve security and prevent potential man-in-the-middle attacks. 🚨 fix(Openapi.json): fix invalid JSON syntax by removing trailing comma The Openapi.json file had an invalid JSON syntax due to a trailing comma in the "file_path" field. This commit removes the trailing comma to fix the syntax error. 🔥 chore(test_graph.py): remove unnecessary comments and assertions 🚀 feat(test_graph.py): add file creation and deletion to test_file_tool_node_build and test_toolkit_node_build The comments and assertions that were removed were unnecessary and did not add any value to the code. The test_file_tool_node_build and test_toolkit_node_build tests now create a file and delete it after the test is run. This ensures that the tests are self-contained and do not leave any artifacts behind.
This commit is contained in:
parent
57f322a0e6
commit
a42b6587c5
2 changed files with 19 additions and 8 deletions
File diff suppressed because one or more lines are too long
|
|
@ -1,3 +1,5 @@
|
|||
import os
|
||||
from pathlib import Path
|
||||
from typing import Type, Union
|
||||
from langflow.graph.edge.base import Edge
|
||||
from langflow.graph.vertex.base import Vertex
|
||||
|
|
@ -269,7 +271,6 @@ def test_tool_node_build(complex_graph):
|
|||
assert tool_node is not None
|
||||
built_object = tool_node.build()
|
||||
assert built_object is not None
|
||||
# Add any further assertions specific to the ToolNode's build() method
|
||||
|
||||
|
||||
def test_chain_node_build(complex_graph):
|
||||
|
|
@ -277,7 +278,6 @@ def test_chain_node_build(complex_graph):
|
|||
assert chain_node is not None
|
||||
built_object = chain_node.build()
|
||||
assert built_object is not None
|
||||
# Add any further assertions specific to the ChainNode's build() method
|
||||
|
||||
|
||||
def test_prompt_node_build(complex_graph):
|
||||
|
|
@ -285,7 +285,6 @@ def test_prompt_node_build(complex_graph):
|
|||
assert prompt_node is not None
|
||||
built_object = prompt_node.build()
|
||||
assert built_object is not None
|
||||
# Add any further assertions specific to the PromptNode's build() method
|
||||
|
||||
|
||||
def test_llm_node_build(basic_graph):
|
||||
|
|
@ -293,23 +292,36 @@ def test_llm_node_build(basic_graph):
|
|||
assert llm_node is not None
|
||||
built_object = llm_node.build()
|
||||
assert built_object is not None
|
||||
# Add any further assertions specific to the LLMNode's build() method
|
||||
|
||||
|
||||
def test_toolkit_node_build(openapi_graph):
|
||||
# Write a file to the disk
|
||||
file_path = "api-with-examples.yaml"
|
||||
with open(file_path, "w") as f:
|
||||
f.write("openapi: 3.0.0")
|
||||
|
||||
toolkit_node = get_node_by_type(openapi_graph, ToolkitVertex)
|
||||
assert toolkit_node is not None
|
||||
built_object = toolkit_node.build()
|
||||
assert built_object is not None
|
||||
# Add any further assertions specific to the ToolkitNode's build() method
|
||||
# Remove the file
|
||||
os.remove(file_path)
|
||||
assert not Path(file_path).exists()
|
||||
|
||||
|
||||
def test_file_tool_node_build(openapi_graph):
|
||||
file_path = "api-with-examples.yaml"
|
||||
with open(file_path, "w") as f:
|
||||
f.write("openapi: 3.0.0")
|
||||
|
||||
assert Path(file_path).exists()
|
||||
file_tool_node = get_node_by_type(openapi_graph, FileToolVertex)
|
||||
assert file_tool_node is not None
|
||||
built_object = file_tool_node.build()
|
||||
assert built_object is not None
|
||||
# Add any further assertions specific to the FileToolNode's build() method
|
||||
# Remove the file
|
||||
os.remove(file_path)
|
||||
assert not Path(file_path).exists()
|
||||
|
||||
|
||||
def test_wrapper_node_build(openapi_graph):
|
||||
|
|
@ -317,7 +329,6 @@ def test_wrapper_node_build(openapi_graph):
|
|||
assert wrapper_node is not None
|
||||
built_object = wrapper_node.build()
|
||||
assert built_object is not None
|
||||
# Add any further assertions specific to the WrapperNode's build() method
|
||||
|
||||
|
||||
def test_get_result_and_thought(basic_graph):
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue