Skip to content

Commit e226797

Browse files
gustavocidornelaswhoseoyster
authored andcommitted
fix: add missing dependencies for LangChain notebook example
1 parent d97e239 commit e226797

File tree

1 file changed

+3
-5
lines changed

1 file changed

+3
-5
lines changed

examples/tracing/langchain/langchain_callback.ipynb

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@
2020
"metadata": {},
2121
"outputs": [],
2222
"source": [
23-
"!pip install openlayer"
23+
"!pip install openlayer langchain langchain_openai"
2424
]
2525
},
2626
{
@@ -39,7 +39,6 @@
3939
"outputs": [],
4040
"source": [
4141
"import os\n",
42-
"import openai\n",
4342
"\n",
4443
"# OpenAI env variables\n",
4544
"os.environ[\"OPENAI_API_KEY\"] = \"YOUR_OPENAI_API_KEY_HERE\"\n",
@@ -92,7 +91,6 @@
9291
"metadata": {},
9392
"outputs": [],
9493
"source": [
95-
"from langchain_core.messages import HumanMessage\n",
9694
"from langchain_openai import ChatOpenAI"
9795
]
9896
},
@@ -113,7 +111,7 @@
113111
"metadata": {},
114112
"outputs": [],
115113
"source": [
116-
"chat.invoke([HumanMessage(content=\"What's the meaning of life?\")])"
114+
"chat.invoke(\"What's the meaning of life?\")"
117115
]
118116
},
119117
{
@@ -149,7 +147,7 @@
149147
"name": "python",
150148
"nbconvert_exporter": "python",
151149
"pygments_lexer": "ipython3",
152-
"version": "3.9.18"
150+
"version": "3.9.6"
153151
}
154152
},
155153
"nbformat": 4,

0 commit comments

Comments
 (0)