mirror of
https://github.com/hwchase17/langchain.git
synced 2025-09-02 03:26:17 +00:00
Harrison/add react chain (#24)
from https://arxiv.org/abs/2210.03629 still need to think if docstore abstraction makes sense
This commit is contained in:
13
tests/integration_tests/chains/test_react.py
Normal file
13
tests/integration_tests/chains/test_react.py
Normal file
@@ -0,0 +1,13 @@
|
||||
"""Integration test for self ask with search."""
|
||||
|
||||
from langchain.chains.react.base import ReActChain
|
||||
from langchain.llms.openai import OpenAI
|
||||
|
||||
|
||||
def test_react() -> None:
|
||||
"""Test functionality on a prompt."""
|
||||
llm = OpenAI(temperature=0)
|
||||
react = ReActChain(llm=llm)
|
||||
question = "Were Scott Derrickson and Ed Wood of the same nationality?"
|
||||
output = react.run(question)
|
||||
assert output == "yes"
|
Reference in New Issue
Block a user