Skip to content

Commit

Permalink
Fix client usage of the Inference API (#323)
Browse files Browse the repository at this point in the history
* Fix client usage of the Inference API

* Ensure all variants run to completion in CI

* Update one output and improve one debug call
  • Loading branch information
pquentin authored Aug 30, 2024
1 parent 7d6648a commit c68060c
Show file tree
Hide file tree
Showing 5 changed files with 252 additions and 78 deletions.
1 change: 1 addition & 0 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ on:
jobs:
notebook-tests:
strategy:
fail-fast: false
matrix:
es_stack:
- 8.14.2
Expand Down
8 changes: 4 additions & 4 deletions notebooks/search/07-inference.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -195,7 +195,7 @@
"source": [
"API_KEY = getpass(\"OpenAI API key: \")\n",
"\n",
"client.inference.put_model(\n",
"client.inference.put(\n",
" task_type=\"text_embedding\",\n",
" inference_id=\"my_openai_embedding_model\",\n",
" body={\n",
Expand All @@ -211,7 +211,7 @@
"id": "1f2e48b7",
"metadata": {},
"source": [
"**NOTE:** If you use Elasticsearch 8.12, you must change `inference_id` in the snippet above to `model_id`! "
"**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`."
]
},
{
Expand Down Expand Up @@ -409,7 +409,7 @@
],
"metadata": {
"kernelspec": {
"display_name": "Python 3.12.3 64-bit",
"display_name": "Python 3 (ipykernel)",
"language": "python",
"name": "python3"
},
Expand All @@ -423,7 +423,7 @@
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.12.3"
"version": "3.12.5"
},
"vscode": {
"interpreter": {
Expand Down
Loading

0 comments on commit c68060c

Please sign in to comment.