mirror of
https://github.com/aljazceru/ElasticDocs_GPT.git
synced 2025-12-17 05:44:20 +01:00
updated connection auth
This commit is contained in:
@@ -4,7 +4,6 @@
|
||||
"metadata": {
|
||||
"colab": {
|
||||
"provenance": [],
|
||||
"toc_visible": true,
|
||||
"include_colab_link": true
|
||||
},
|
||||
"kernelspec": {
|
||||
@@ -75,7 +74,7 @@
|
||||
},
|
||||
"outputs": [],
|
||||
"source": [
|
||||
"pip install eland elasticsearch transformers torch==1.11"
|
||||
"pip -q install eland elasticsearch sentence_transformers transformers torch==1.11"
|
||||
]
|
||||
},
|
||||
{
|
||||
@@ -85,7 +84,9 @@
|
||||
"from eland.ml.pytorch import PyTorchModel\n",
|
||||
"from eland.ml.pytorch.transformers import TransformerModel\n",
|
||||
"from elasticsearch import Elasticsearch\n",
|
||||
"from elasticsearch.client import MlClient"
|
||||
"from elasticsearch.client import MlClient\n",
|
||||
"\n",
|
||||
"import getpass"
|
||||
],
|
||||
"metadata": {
|
||||
"id": "wyUZXUi4RWWL"
|
||||
@@ -105,23 +106,15 @@
|
||||
"id": "r7nMIbHke37Q"
|
||||
}
|
||||
},
|
||||
{
|
||||
"cell_type": "code",
|
||||
"source": [
|
||||
"import getpass"
|
||||
],
|
||||
"metadata": {
|
||||
"id": "Xsd2m7HoTCLm"
|
||||
},
|
||||
"execution_count": null,
|
||||
"outputs": []
|
||||
},
|
||||
{
|
||||
"cell_type": "code",
|
||||
"source": [
|
||||
"es_cloud_id = getpass.getpass('Enter Elastic Cloud ID: ')\n",
|
||||
"es_api_id = getpass.getpass('Enter cluster API key ID: ') \n",
|
||||
"es_api_key = getpass.getpass('Enter cluster API key: ')"
|
||||
"es_user = getpass.getpass('Enter cluster username: ') \n",
|
||||
"es_pass = getpass.getpass('Enter cluster password: ') \n",
|
||||
"\n",
|
||||
"#es_api_id = getpass.getpass('Enter cluster API key ID: ') \n",
|
||||
"#es_api_key = getpass.getpass('Enter cluster API key: ')"
|
||||
],
|
||||
"metadata": {
|
||||
"id": "SSGgYHome69o"
|
||||
@@ -141,8 +134,11 @@
|
||||
{
|
||||
"cell_type": "code",
|
||||
"source": [
|
||||
"#es = Elasticsearch(cloud_id=es_cloud_id, \n",
|
||||
"# api_key=(es_api_id, es_api_key)\n",
|
||||
"# )\n",
|
||||
"es = Elasticsearch(cloud_id=es_cloud_id, \n",
|
||||
" api_key=(es_api_id, es_api_key)\n",
|
||||
" basic_auth=(es_user, es_pass)\n",
|
||||
" )\n",
|
||||
"es.info() # should return cluster info"
|
||||
],
|
||||
@@ -247,7 +243,8 @@
|
||||
{
|
||||
"cell_type": "markdown",
|
||||
"source": [
|
||||
"## Verify the model started without issue"
|
||||
"## Verify the model started without issue\n",
|
||||
"Should output -> {'routing_state': 'started'}"
|
||||
],
|
||||
"metadata": {
|
||||
"id": "ZytlELrsnn_O"
|
||||
|
||||
Reference in New Issue
Block a user