Skip to content

Commit c68060c

Browse files
authored
Fix client usage of the Inference API (#323)
* Fix client usage of the Inference API * Ensure all variants run to completion in CI * Update one output and improve one debug call
1 parent 7d6648a commit c68060c

File tree

5 files changed

+252
-78
lines changed

5 files changed

+252
-78
lines changed

.github/workflows/tests.yml

+1
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@ on:
1414
jobs:
1515
notebook-tests:
1616
strategy:
17+
fail-fast: false
1718
matrix:
1819
es_stack:
1920
- 8.14.2

notebooks/search/07-inference.ipynb

+4-4
Original file line numberDiff line numberDiff line change
@@ -195,7 +195,7 @@
195195
"source": [
196196
"API_KEY = getpass(\"OpenAI API key: \")\n",
197197
"\n",
198-
"client.inference.put_model(\n",
198+
"client.inference.put(\n",
199199
" task_type=\"text_embedding\",\n",
200200
" inference_id=\"my_openai_embedding_model\",\n",
201201
" body={\n",
@@ -211,7 +211,7 @@
211211
"id": "1f2e48b7",
212212
"metadata": {},
213213
"source": [
214-
"**NOTE:** If you use Elasticsearch 8.12, you must change `inference_id` in the snippet above to `model_id`! "
214+
"**NOTE:** If you use Elasticsearch 8.12, you must change `inference_id` in the snippet above to `model_id`! And `inference.put` to `inference.put_model`."
215215
]
216216
},
217217
{
@@ -409,7 +409,7 @@
409409
],
410410
"metadata": {
411411
"kernelspec": {
412-
"display_name": "Python 3.12.3 64-bit",
412+
"display_name": "Python 3 (ipykernel)",
413413
"language": "python",
414414
"name": "python3"
415415
},
@@ -423,7 +423,7 @@
423423
"name": "python",
424424
"nbconvert_exporter": "python",
425425
"pygments_lexer": "ipython3",
426-
"version": "3.12.3"
426+
"version": "3.12.5"
427427
},
428428
"vscode": {
429429
"interpreter": {

0 commit comments

Comments
 (0)