Skip to content

Commit

Permalink
minor fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
ouonline committed Dec 18, 2024
1 parent 9e2f0a7 commit b4e5f75
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 10 deletions.
10 changes: 5 additions & 5 deletions docs/en/Cookbook/rag.md
Original file line number Diff line number Diff line change
Expand Up @@ -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=' '),
}
```

Expand All @@ -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:
Expand All @@ -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.'\
Expand Down
10 changes: 5 additions & 5 deletions docs/zh/Cookbook/rag.md
Original file line number Diff line number Diff line change
Expand Up @@ -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=' '),
}
```

Expand All @@ -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:
Expand All @@ -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.'\
Expand Down

0 comments on commit b4e5f75

Please sign in to comment.