From 492cd4183c7d5a67e141f894312400b506edad4e Mon Sep 17 00:00:00 2001 From: "junjie.jiang" Date: Wed, 7 Jun 2023 11:22:04 +0800 Subject: [PATCH] Update example Signed-off-by: junjie.jiang --- README.md | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 195d5b4..60f3cd7 100644 --- a/README.md +++ b/README.md @@ -33,14 +33,17 @@ input: p = ( pipe.input('question', 'doc', 'history') + .map('docs', 'docs', lambda x: x[:2000]) .map(('question', 'doc', 'history'), 'prompt', ops.prompt.template(temp, ['question', 'context'])) .map('prompt', 'answer', ops.LLM.OpenAI()) .output('answer') ) an1 = p('Tell me something about Towhee', towhee_docs, []).get()[0] +print(an1) -an2 = p('Give an example', towhee_docs, [('Tell me something about Towhee', an1)]).get()[0] +an2 = p('How to use it', towhee_docs, [('Tell me something about Towhee', an1)]).get()[0] +print(an2) ```