logo
Browse Source

Add llm op

Signed-off-by: Kaiyuan Hu <kaiyuan.hu@zilliz.com>
main
Kaiyuan Hu 2 years ago
parent
commit
988d58529a
  1. 3
      eqa_search.py

3
eqa_search.py

@ -108,6 +108,7 @@ def enhanced_qa_search_pipe(config):
p = ( p = (
p.map('result', 'docs', lambda x:[i[2] for i in x]) p.map('result', 'docs', lambda x:[i[2] for i in x])
.map(('question', 'docs', 'history'), 'prompt', ops.prompt.question_answer()) .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')

Loading…
Cancel
Save