|
23 | 23 | "For this example, you will need:\n", |
24 | 24 | "\n", |
25 | 25 | "- An Elastic deployment:\n", |
26 | | - " - We'll be using [Elastic serverless](https://www.elastic.co/docs/current/serverless) for this example (available with a [free trial](https://cloud.elastic.co/registration?utm_source=github&utm_content=elasticsearch-labs-notebook))\n", |
| 26 | + " - We'll be using [Elastic Cloud](https://www.elastic.co/guide/en/cloud/current/ec-getting-started.html) for this example (available with a [free trial](https://cloud.elastic.co/registration?onboarding_token=vectorsearch&utm_source=github&utm_content=elasticsearch-labs-notebook))\n", |
27 | 27 | "\n", |
28 | 28 | "- Elasticsearch 8.16 or above.\n", |
29 | 29 | "\n", |
|
75 | 75 | }, |
76 | 76 | { |
77 | 77 | "cell_type": "code", |
78 | | - "execution_count": 2, |
| 78 | + "execution_count": 13, |
79 | 79 | "id": "690ff9af", |
80 | 80 | "metadata": {}, |
81 | 81 | "outputs": [], |
|
91 | 91 | "source": [ |
92 | 92 | "Now we can instantiate the Python Elasticsearch client.\n", |
93 | 93 | "\n", |
94 | | - "First provide your API key and Serverless Endpoint.\n", |
95 | | - "Then create a `client` object that instantiates an instance of the `Elasticsearch` class." |
| 94 | + "First we prompt the user for their password and Cloud ID.\n", |
| 95 | + "Then we create a `client` object that instantiates an instance of the `Elasticsearch` class." |
96 | 96 | ] |
97 | 97 | }, |
98 | 98 | { |
99 | 99 | "cell_type": "code", |
100 | | - "execution_count": 5, |
| 100 | + "execution_count": null, |
101 | 101 | "id": "195cc597", |
102 | 102 | "metadata": {}, |
103 | 103 | "outputs": [], |
104 | 104 | "source": [ |
105 | 105 | "# https://www.elastic.co/search-labs/tutorials/install-elasticsearch/elastic-cloud#finding-your-cloud-id\n", |
106 | | - "ELASTIC_SERVERLESS_ENDPOINT = getpass(\"Elastic serverless endpoint: \")\n", |
| 106 | + "ELASTIC_CLOUD_ID = getpass(\"Elastic Cloud ID: \")\n", |
107 | 107 | "\n", |
108 | 108 | "# https://www.elastic.co/search-labs/tutorials/install-elasticsearch/elastic-cloud#creating-an-api-key\n", |
109 | 109 | "ELASTIC_API_KEY = getpass(\"Elastic Api Key: \")\n", |
|
112 | 112 | "client = Elasticsearch(\n", |
113 | 113 | " # For local development\n", |
114 | 114 | " # hosts=[\"http://localhost:9200\"],\n", |
115 | | - " hosts=[ELASTIC_SERVERLESS_ENDPOINT],\n", |
| 115 | + " cloud_id=ELASTIC_CLOUD_ID,\n", |
116 | 116 | " api_key=ELASTIC_API_KEY,\n", |
117 | 117 | " request_timeout=120,\n", |
118 | 118 | " max_retries=10,\n", |
|
281 | 281 | "<a name=\"conclusion\"></a>\n", |
282 | 282 | "## Conclusion\n", |
283 | 283 | "\n", |
284 | | - "You've now learned how to configure chunking settings for an inference endpoint! For more infomration about configurable chunking, see the [configuring chunking](https://www.elastic.co/guide/en/elasticsearch/reference/current/inference-apis.html#infer-chunking-config) documentation." |
| 284 | + "You've now learned how to configure chunking settings for an inference endpoint! For more information about configurable chunking, see the [configuring chunking](https://www.elastic.co/guide/en/elasticsearch/reference/current/inference-apis.html#infer-chunking-config) documentation." |
285 | 285 | ] |
286 | 286 | } |
287 | 287 | ], |
|
0 commit comments