From 988d58529a70ec41c2c79b1efad72f907d484ab8 Mon Sep 17 00:00:00 2001 From: Kaiyuan Hu Date: Tue, 30 May 2023 14:57:10 +0800 Subject: [PATCH] Add llm op Signed-off-by: Kaiyuan Hu --- eqa_search.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/eqa_search.py b/eqa_search.py index b3bb83e..ad40c84 100644 --- a/eqa_search.py +++ b/eqa_search.py @@ -108,6 +108,7 @@ def enhanced_qa_search_pipe(config): p = ( p.map('result', 'docs', lambda x:[i[2] for i in x]) .map(('question', 'docs', 'history'), 'prompt', ops.prompt.question_answer()) + .map('prompt', 'answer', ops.LLM.OpenAI(api_key=config.openai_api_key)) ) - return p.output('question', 'history', 'docs', 'prompt') + return p.output('answer')