From 63a497fe732ce53ea0d42a9fa1e00c9abca146ba Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Kristoffer=20Bj=C3=A4rkefur?= Date: Tue, 17 Oct 2023 00:21:13 +0200 Subject: [PATCH 1/2] Cookbook - import ChatOpenAPI to make also this section run by its own --- LangChain Cookbook Part 1 - Fundamentals.ipynb | 1 + 1 file changed, 1 insertion(+) diff --git a/LangChain Cookbook Part 1 - Fundamentals.ipynb b/LangChain Cookbook Part 1 - Fundamentals.ipynb index 601125b..3fdedf3 100644 --- a/LangChain Cookbook Part 1 - Fundamentals.ipynb +++ b/LangChain Cookbook Part 1 - Fundamentals.ipynb @@ -1035,6 +1035,7 @@ ], "source": [ "from langchain.chains.openai_functions import create_structured_output_chain\n", + "from langchain.chat_models import ChatOpenAI\n", "\n", "llm = ChatOpenAI(model='gpt-4-0613', openai_api_key=openai_api_key)\n", "\n", From 932846627f4be01cd047971e954dda12d58af049 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Kristoffer=20Bj=C3=A4rkefur?= Date: Tue, 17 Oct 2023 00:25:05 +0200 Subject: [PATCH 2/2] small typo --- LangChain Cookbook Part 1 - Fundamentals.ipynb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/LangChain Cookbook Part 1 - Fundamentals.ipynb b/LangChain Cookbook Part 1 - Fundamentals.ipynb index 3fdedf3..43e57e0 100644 --- a/LangChain Cookbook Part 1 - Fundamentals.ipynb +++ b/LangChain Cookbook Part 1 - Fundamentals.ipynb @@ -976,7 +976,7 @@ "id": "07045ae3", "metadata": {}, "source": [ - "### **Output Parsers Method 2: OpenAI Fuctions**\n", + "### **Output Parsers Method 2: OpenAI Functions**\n", "When OpenAI released function calling, the game changed. This is recommended method when starting out.\n", "\n", "They trained models specifically for outputing structured data. It became super easy to specify a Pydantic schema and get a structured output.\n",