🔧 chore(conftest.py): add fixture for one_grouped_chat_json_flow to provide a test data file for one grouped chat

🔧 chore(conftest.py): add one_grouped_chat_json_flow fixture to read and return the contents of the one_group_chat.json file

📝 chore(one_group_chat.json): add one_group_chat.json test data file

This commit adds the one_group_chat.json file to the tests/data directory. The file contains a simple chat with a custom prompt template and conversational memory buffer. It is used for testing purposes.

🔧 chore: update node configuration for ConversationBufferMemory, ChatOpenAI, and LLMChain
📝 docs: update documentation links for ConversationBufferMemory and LLMChain

🔧 fix: update prompt template in LLMChain to include conversation history and text input variables
🔧 fix: update ConversationBufferMemory node to include description and documentation links

🎨 style: format and organize code for better readability and maintainability
This commit is contained in:
Gabriel Luiz Freitas Almeida 2023-10-05 11:39:00 -03:00
commit 533edf48f9
2 changed files with 1311 additions and 0 deletions

View file

@ -32,6 +32,9 @@ def pytest_configure():
pytest.GROUPED_CHAT_EXAMPLE_PATH = (
Path(__file__).parent.absolute() / "data" / "grouped_chat.json"
)
pytest.ONE_GROUPED_CHAT_EXAMPLE_PATH = (
Path(__file__).parent.absolute() / "data" / "one_group_chat.json"
)
pytest.CODE_WITH_SYNTAX_ERROR = """
def get_text():
@ -110,6 +113,12 @@ def grouped_chat_json_flow():
return f.read()
@pytest.fixture
def one_grouped_chat_json_flow():
with open(pytest.ONE_GROUPED_CHAT_EXAMPLE_PATH, "r") as f:
return f.read()
@pytest.fixture(name="session")
def session_fixture():
engine = create_engine(

File diff suppressed because it is too large Load diff