def create_chain_from_test(
    tools: List[Tool],
    memory: Optional[BaseMemory] = None,
    llm: Optional[BaseLanguageModel] = None,
    agent_cls=ConversationalAgent,
    **kwargs
):
    """
    Create Chain for running tests
    Args:
        tools: list of autochain tools
        memory: memory store for chain
        llm: model for agent
        agent_cls: metadata class for instantiating agent
    Returns:
        Chain
    """
    llm = llm or ChatOpenAI(temperature=0)
    memory = memory or BufferMemory()
    agent = agent_cls.from_llm_and_tools(llm=llm, tools=tools, **kwargs)
    return Chain(agent=agent, memory=memory)

    Create Chain for running tests
    Args:
        tools: list of autochain tools
        memory: memory store for chain
        llm: model for agent
        agent_cls: metadata class for instantiating agent
    Returns:
        Chain
    
autochain/workflows_evaluation/test_utils.py