|
16 | 16 | "\n", |
17 | 17 | "For this example, you will need:\n", |
18 | 18 | "\n", |
19 | | - "- An Elastic deployment with minimum **4GB machine learning node**\n", |
| 19 | + "- An Elastic deployment:\n", |
20 | 20 | " - we'll be using [Alibaba Elasticsearch](https://www.aliyun.com/product/bigdata/elasticsearch) for this example.\n", |
21 | 21 | "- Elasticsearch 8.16 or above\n", |
22 | 22 | "- A valid API key for the [AlibabaCloud AI Search](https://help.aliyun.com/zh/open-search/search-platform/user-guide/activate-services-and-create-api-key?spm=a2c4g.11186623.0.0.141a2105fiqCEw) is required to use the Inference API with\n", |
|
56 | 56 | }, |
57 | 57 | { |
58 | 58 | "cell_type": "code", |
59 | | - "execution_count": 2, |
| 59 | + "execution_count": 6, |
60 | 60 | "metadata": {}, |
61 | 61 | "outputs": [], |
62 | 62 | "source": [ |
|
87 | 87 | "\n", |
88 | 88 | "ELASTIC_PASSWORD = getpass(\"ELASTIC PASSWORD: \")\n", |
89 | 89 | "\n", |
90 | | - "# Please enter your ES cluster URL here\n", |
91 | 90 | "# e.g. \n", |
92 | | - "# ELASTIC_URL = \"http://es-xxx.elasticsearch.aliyuncs.com:9200\"\n", |
93 | | - "ELASTIC_URL = \"\"\n", |
| 91 | + "# hosts = \"http://es-xxx.elasticsearch.aliyuncs.com:9200\"\n", |
| 92 | + "hosts=getpass(\"Host: \")\n", |
94 | 93 | "\n", |
95 | 94 | "# Create the client instance\n", |
96 | 95 | "client = Elasticsearch(\n", |
97 | 96 | " # For local development\n", |
98 | 97 | " # hosts=[\"http://localhost:9200\"]\n", |
99 | | - " ELASTIC_URL,\n", |
| 98 | + " hosts,\n", |
100 | 99 | " basic_auth=(ELASTIC_USER, ELASTIC_PASSWORD)\n", |
101 | 100 | ")" |
102 | 101 | ] |
|
110 | 109 | }, |
111 | 110 | { |
112 | 111 | "cell_type": "code", |
113 | | - "execution_count": 8, |
| 112 | + "execution_count": null, |
114 | 113 | "metadata": {}, |
115 | | - "outputs": [ |
116 | | - { |
117 | | - "name": "stdout", |
118 | | - "output_type": "stream", |
119 | | - "text": [ |
120 | | - "{'name': 'es-cn-kvw3sriro00013ijf-data-g-2', 'cluster_name': 'es-cn-kvw3sriro00013ijf', 'cluster_uuid': 'Zh1hPR59Qf2wQpMCnzuoyQ', 'version': {'number': '8.15.0', 'build_flavor': 'default', 'build_type': 'docker', 'build_hash': '27668b65831e9e4eff409e9a3021d601e22b3f74', 'build_date': '2024-07-24T07:11:07.450209633Z', 'build_snapshot': False, 'lucene_version': '9.11.1', 'minimum_wire_compatibility_version': '7.17.0', 'minimum_index_compatibility_version': '7.0.0'}, 'tagline': 'You Know, for Search'}\n" |
121 | | - ] |
122 | | - } |
123 | | - ], |
| 114 | + "outputs": [], |
124 | 115 | "source": [ |
125 | 116 | "print(client.info())" |
126 | 117 | ] |
|
0 commit comments