From b4e5f75e328abf41f0e54fbab1779343525c3fdc Mon Sep 17 00:00:00 2001 From: ouguoyu Date: Wed, 18 Dec 2024 14:26:34 +0800 Subject: [PATCH] minor fixes --- docs/en/Cookbook/rag.md | 10 +++++----- docs/zh/Cookbook/rag.md | 10 +++++----- 2 files changed, 10 insertions(+), 10 deletions(-) diff --git a/docs/en/Cookbook/rag.md b/docs/en/Cookbook/rag.md index 6af80af0..0ec57caf 100644 --- a/docs/en/Cookbook/rag.md +++ b/docs/en/Cookbook/rag.md @@ -360,8 +360,8 @@ If using Milvus, we also need to pass the `doc_fields` parameter to `Document`, ```python doc_fields = { - 'comment': DocField(data_type=DocField.DTYPE_VARCHAR, max_size=65535, default_value=' '), - 'signature': DocField(data_type=DocField.DTYPE_VARCHAR, max_size=32, default_value=' '), + 'comment': DocField(data_type=DataType.VARCHAR, max_size=65535, default_value=' '), + 'signature': DocField(data_type=DataType.VARCHAR, max_size=32, default_value=' '), } ``` @@ -379,7 +379,7 @@ Here is a complete example using Milvus as the storage backend: import os import lazyllm from lazyllm import bind, config -from lazyllm.tools.rag import DocField +from lazyllm.tools.rag import DocField, DataType import shutil class TmpDir: @@ -406,8 +406,8 @@ milvus_store_conf = { } doc_fields = { - 'comment': DocField(data_type=DocField.DTYPE_VARCHAR, max_size=65535, default_value=' '), - 'signature': DocField(data_type=DocField.DTYPE_VARCHAR, max_size=32, default_value=' '), + 'comment': DocField(data_type=DataType.VARCHAR, max_size=65535, default_value=' '), + 'signature': DocField(data_type=DataType.VARCHAR, max_size=32, default_value=' '), } prompt = 'You will play the role of an AI Q&A assistant and complete a dialogue task.'\ diff --git a/docs/zh/Cookbook/rag.md b/docs/zh/Cookbook/rag.md index cca93307..54197d77 100644 --- a/docs/zh/Cookbook/rag.md +++ b/docs/zh/Cookbook/rag.md @@ -358,8 +358,8 @@ milvus_store_conf = { ```python doc_fields = { - 'comment': DocField(data_type=DocField.DTYPE_VARCHAR, max_size=65535, default_value=' '), - 'signature': DocField(data_type=DocField.DTYPE_VARCHAR, max_size=32, default_value=' '), + 'comment': DocField(data_type=DataType.VARCHAR, max_size=65535, default_value=' '), + 'signature': DocField(data_type=DataType.VARCHAR, max_size=32, default_value=' '), } ``` @@ -377,7 +377,7 @@ doc_fields = { import os import lazyllm from lazyllm import bind, config -from lazyllm.tools.rag import DocField +from lazyllm.tools.rag import DocField, DataType import shutil class TmpDir: @@ -404,8 +404,8 @@ milvus_store_conf = { } doc_fields = { - 'comment': DocField(data_type=DocField.DTYPE_VARCHAR, max_size=65535, default_value=' '), - 'signature': DocField(data_type=DocField.DTYPE_VARCHAR, max_size=32, default_value=' '), + 'comment': DocField(data_type=DataType.VARCHAR, max_size=65535, default_value=' '), + 'signature': DocField(data_type=DataType.VARCHAR, max_size=32, default_value=' '), } prompt = 'You will play the role of an AI Q&A assistant and complete a dialogue task.'\