Add Citation pipeline (#78)

* add rerankers in retrieving pipeline

* update example MVP pipeline

* add citation pipeline and function call interface

* change return type of QA and AgentPipeline to Document
This commit is contained in:
Tuan Anh Nguyen Dang (Tadashi_Cin)
2023-11-16 11:24:35 +07:00
committed by GitHub
parent f8b8d86d4e
commit cc1e75b3c6
9 changed files with 223 additions and 19 deletions

View File

@@ -163,7 +163,7 @@ def test_rewoo_agent(openai_completion, llm, mock_google_search):
response = agent("Tell me about Cinnamon AI company")
openai_completion.assert_called()
assert response.output == FINAL_RESPONSE_TEXT
assert response.text == FINAL_RESPONSE_TEXT
@patch(
@@ -180,7 +180,7 @@ def test_react_agent(openai_completion, llm, mock_google_search):
response = agent("Tell me about Cinnamon AI company")
openai_completion.assert_called()
assert response.output == FINAL_RESPONSE_TEXT
assert response.text == FINAL_RESPONSE_TEXT
@patch(
@@ -224,4 +224,4 @@ def test_react_agent_with_langchain_tools(openai_completion, llm):
response = agent("Tell me about Cinnamon AI company")
openai_completion.assert_called()
assert response.output == FINAL_RESPONSE_TEXT
assert response.text == FINAL_RESPONSE_TEXT