Merge branch 'dev' into 146-improve-conversationchain-node

This commit is contained in:
Gabriel Luiz Freitas Almeida 2023-04-10 19:20:56 -03:00 • committed by GitHub
commit 396cb7be2b
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
36 changed files with 2055 additions and 61 deletions

View file

@ -1,6 +1,6 @@
# Test this:
import pytest
from langflow.interface.custom.types import PythonFunction
from langflow.interface.tools.custom import PythonFunction
from langflow.utils import constants

View file

@ -3,6 +3,7 @@ from typing import Type, Union
import pytest
from langchain.agents import AgentExecutor
from langchain.llms.fake import FakeListLLM
from langflow.graph import Edge, Graph, Node
from langflow.graph.nodes import (
AgentNode,
@ -14,9 +15,8 @@ from langflow.graph.nodes import (
ToolNode,
WrapperNode,
)
from langflow.utils.payload import build_json, get_root_node
from langflow.interface.run import get_result_and_thought_using_graph
from langchain.llms.fake import FakeListLLM
from langflow.utils.payload import build_json, get_root_node
# Test cases for the graph module

View file

@ -0,0 +1,12 @@
from fastapi.testclient import TestClient
from langflow.settings import settings
# check that all agents are in settings.agents
# are in json_response["agents"]
def test_vectorstores_settings(client: TestClient):
response = client.get("/all")
assert response.status_code == 200
json_response = response.json()
vectorstores = json_response["vectorstores"]
assert set(vectorstores.keys()) == set(settings.vectorstores)