diff --git a/README.md b/README.md index a9d3881..8ec76ef 100644 --- a/README.md +++ b/README.md @@ -55,8 +55,7 @@ config.embedding_model = 'all-MiniLM-L6-v2' config.milvus_host = '127.0.0.1' config.milvus_port = '19530' config.es_enable = True -config.es_host = '127.0.0.1' -config.es_port = '9200' +config.es_connection_kwargs = {hosts=['https://localhost:9200', basic_auth=('elastic', 'password')]} p = AutoPipes.pipeline('osschat-insert', config=config) res = p('https://github.com/towhee-io/towhee/blob/main/README.md', 'osschat') @@ -134,21 +133,9 @@ The user password for [Cloud user](https://zilliz.com/cloud), defaults to `None` Whether to use Elasticsearch, default is `True`. -***es_host***: str +***es_connection_kwargs*** -Host of Elasticsearch, default is `'127.0.0.1'`. - -***es_port***: str - -Port of Elasticsearche, default is `'9200'`. - -***es_user***: str - -The user name for Elasticsearch, defaults to `None`. - -***es_password***: str - -The user password for Elasticsearch, defaults to `None`. +The connection arguments to connect elastic service.
diff --git a/osschat_insert.py b/osschat_insert.py index 92f7ccc..f7946f7 100644 --- a/osschat_insert.py +++ b/osschat_insert.py @@ -39,11 +39,7 @@ class OSSChatInsertConfig(BaseModel, extra=Extra.allow): milvus_password: Optional[str] = None # config for elasticsearch es_enable: Optional[bool] = True - es_host: Optional[str] = '127.0.0.1' - es_port: Optional[str] = '9200' - es_user: Optional[str] = None - es_password: Optional[str] = None - es_ca_certs: Optional[str] = None + es_connection_kwargs: Optional[dict] = {hosts=['https://127.0.0.1:9200'], basic_auth=('elastic', 'my_password')} _hf_models = ops.sentence_embedding.transformers().get_op().supported_model_names()