consolidate run functions (#126)

consolidating logic for when a chain is able to run with single input
text, single output text

open to feedback on naming, logic, usefulness
This commit is contained in:
Harrison Chase
2022-11-13 18:14:35 -08:00
committed by GitHub
parent 1fe3a4f724
commit f23b3ceb49
20 changed files with 39 additions and 143 deletions

View File

@@ -5,5 +5,5 @@ from langchain.chains.serpapi import SerpAPIChain
def test_call() -> None:
"""Test that call gives the correct answer."""
chain = SerpAPIChain()
output = chain.search("What was Obama's first name?")
output = chain.run("What was Obama's first name?")
assert output == "Barack Hussein Obama II"