|
|
@ -10,7 +10,7 @@ |
|
|
|
|
|
|
|
## Code Example |
|
|
|
|
|
|
|
#### Create Milvus Collection |
|
|
|
- **Create Milvus Collection** |
|
|
|
|
|
|
|
Before running the pipeline, please create Milvus collection first. |
|
|
|
|
|
|
@ -41,7 +41,7 @@ index_params = { |
|
|
|
collection.create_index(field_name="embedding", index_params=index_params) |
|
|
|
``` |
|
|
|
|
|
|
|
#### Create image embedding pipeline and set the configuration |
|
|
|
- **Create image embedding pipeline and set the configuration** |
|
|
|
|
|
|
|
> More parameters refer to the Configuration. |
|
|
|
|
|
|
@ -69,7 +69,7 @@ Then you can run `collection.num_entities` to check the number of the data in Mi |
|
|
|
|
|
|
|
### **EnhancedQAInsertConfig** |
|
|
|
|
|
|
|
#### Configuration for [Text Loader](https://towhee.io/towhee/text-loader) |
|
|
|
***Configuration for [Text Loader](https://towhee.io/towhee/text-loader)*** |
|
|
|
|
|
|
|
***chunk_size: int*** |
|
|
|
The size of each chunk, defaults to 300. |
|
|
@ -77,7 +77,7 @@ The size of each chunk, defaults to 300. |
|
|
|
***source_type: str*** |
|
|
|
The type of the soure, defaults to `'file'`, you can also set to `'url'` for you url of your documentation. |
|
|
|
|
|
|
|
#### Configuration for Sentence Embedding |
|
|
|
***Configuration for Sentence Embedding*** |
|
|
|
|
|
|
|
***model: str*** |
|
|
|
The model name in the sentence embedding pipeline, defaults to `'all-MiniLM-L6-v2'`. |
|
|
@ -97,7 +97,7 @@ Whether to normalize the embedding vectors, defaults to `True`. |
|
|
|
The number of devices, defaults to `-1`, which means using the CPU. |
|
|
|
If the setting is not `-1`, the specified GPU device will be used. |
|
|
|
|
|
|
|
#### Configuration for [Milvus](https://towhee.io/ann-insert/milvus-client) |
|
|
|
***Configuration for [Milvus](https://towhee.io/ann-insert/milvus-client)*** |
|
|
|
|
|
|
|
***host: str*** |
|
|
|
Host of Milvus vector database, default is `'127.0.0.1'`. |
|
|
|