From 16695b77633da07caef4861a5d90a59c15a049e5 Mon Sep 17 00:00:00 2001 From: shiyu22 Date: Tue, 30 May 2023 10:20:19 +0800 Subject: [PATCH] Update with loader Signed-off-by: shiyu22 --- README.md | 1 + eqa_insert.py | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index dd4ed18..8557ecc 100644 --- a/README.md +++ b/README.md @@ -53,6 +53,7 @@ config.model = 'all-MiniLM-L6-v2' config.host = '127.0.0.1' config.port = '19530' config.collection_name = collection_name +config.source_type = 'url' p = AutoPipes.pipeline('eqa-insert', config=config) res = p('https://raw.githubusercontent.com/towhee-io/towhee/main/README.md') diff --git a/eqa_insert.py b/eqa_insert.py index 93bd3c3..d894d29 100644 --- a/eqa_insert.py +++ b/eqa_insert.py @@ -69,7 +69,7 @@ def _get_embedding_op(config): @AutoPipes.register def enhanced_qa_insert_pipe(config): - text_load_op = ops.text_loader() + text_load_op = ops.text_loader(chunk_size=config.chunk_size, source_type=config.source_type) allow_triton, sentence_embedding_op = _get_embedding_op(config) sentence_embedding_config = {}