Skip to content

Commit 9d24b04

Browse files
authored
fix: Replace deprecated text-davinci-003 model with gpt-3.5-turbo-instruct model (deepset-ai#265)
1 parent c53407f commit 9d24b04

3 files changed

+5
-5
lines changed

tutorials/21_Customizing_PromptNode.ipynb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -102,7 +102,7 @@
102102
"source": [
103103
"## Trying Out PromptNode\n",
104104
"\n",
105-
"The PromptNode is the central abstraction in Haystack's large language model (LLM) support. It uses [`google/flan-t5-base`](https://huggingface.co/google/flan-t5-base) model by default, but you can replace the default model with a flan-t5 model of a different size such as `google/flan-t5-large` or a model by OpenAI such as `text-davinci-003`.\n",
105+
"The PromptNode is the central abstraction in Haystack's large language model (LLM) support. It uses [`google/flan-t5-base`](https://huggingface.co/google/flan-t5-base) model by default, but you can replace the default model with a flan-t5 model of a different size such as `google/flan-t5-large` or a model by OpenAI such as `gpt-3.5-turbo-instruct`.\n",
106106
"\n",
107107
"[Large language models](https://docs.haystack.deepset.ai/docs/language_models#large-language-models-llms) are huge models trained on enormous amounts of data. That’s why these models have general knowledge of the world, so you can ask them anything and they will be able to answer.\n",
108108
"\n",
@@ -145,7 +145,7 @@
145145
"source": [
146146
"> Note: To use PromptNode with an OpenAI model, change the model name and provide an `api_key`: \n",
147147
"> ```python\n",
148-
"> prompt_node = PromptNode(model_name_or_path=\"text-davinci-003\", api_key=<YOUR_API_KEY>)\n",
148+
"> prompt_node = PromptNode(model_name_or_path=\"gpt-3.5-turbo-instruct\", api_key=<YOUR_API_KEY>)\n",
149149
"> ```"
150150
]
151151
},

tutorials/23_Answering_Multihop_Questions_with_Agents.ipynb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -419,7 +419,7 @@
419419
"\n",
420420
"The `Agent` needs to determine the next best course of action at each iteration. It does this by using an LLM, and a prompt designed specially for this use case. Our `Agent` uses a `PromptNode` with the default [\"zero-shot-react\" `PromptTemplate` ](https://github.com/deepset-ai/haystack/blob/444a3116c42d2c8852d27aa8093ac92c8e85ab88/haystack/nodes/prompt/prompt_node.py#L337). \n",
421421
"\n",
422-
"Here, let's define an `Agent` that uses the `text-davinci-003` model by OpenAI."
422+
"Here, let's define an `Agent` that uses the `gpt-3.5-turbo-instruct` model by OpenAI."
423423
]
424424
},
425425
{
@@ -433,7 +433,7 @@
433433
"from haystack.agents import Agent\n",
434434
"from haystack.nodes import PromptNode\n",
435435
"\n",
436-
"prompt_node = PromptNode(model_name_or_path=\"text-davinci-003\", api_key=api_key, stop_words=[\"Observation:\"])\n",
436+
"prompt_node = PromptNode(model_name_or_path=\"gpt-3.5-turbo-instruct\", api_key=api_key, stop_words=[\"Observation:\"])\n",
437437
"agent = Agent(prompt_node=prompt_node)"
438438
]
439439
},

tutorials/25_Customizing_Agent.ipynb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -285,7 +285,7 @@
285285
")\n",
286286
"\n",
287287
"prompt_node = PromptNode(\n",
288-
" model_name_or_path=\"text-davinci-003\", api_key=openai_api_key, default_prompt_template=prompt_template\n",
288+
" model_name_or_path=\"gpt-3.5-turbo-instruct\", api_key=openai_api_key, default_prompt_template=prompt_template\n",
289289
")\n",
290290
"\n",
291291
"generative_pipeline = Pipeline()\n",

0 commit comments

Comments
 (0)