Skip to content

Commit

Permalink
docs[minor]: Add missing link to Runnables guide (langchain-ai#6566)
Browse files Browse the repository at this point in the history
Co-authored-by: Bagatur <baskaryan@gmail.com>
Co-authored-by: Brace Sproul <braceasproul@gmail.com>
  • Loading branch information
3 people authored and CarterMorris committed Nov 10, 2024
1 parent 8acc4a8 commit 89cb9cb
Showing 1 changed file with 19 additions and 5 deletions.
24 changes: 19 additions & 5 deletions docs/core_docs/docs/how_to/sequence.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,21 @@
"```"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [],
"source": [
"// @lc-docs-hide-cell\n",
"import { ChatOpenAI } from '@langchain/openai';\n",
"\n",
"const model = new ChatOpenAI({\n",
" model: \"gpt-4o\",\n",
" temperature: 0,\n",
"})"
]
},
{
"cell_type": "code",
"execution_count": 2,
Expand All @@ -72,7 +87,6 @@
"import { StringOutputParser } from \"@langchain/core/output_parsers\";\n",
"import { ChatPromptTemplate } from \"@langchain/core/prompts\";\n",
"\n",
"\n",
"const prompt = ChatPromptTemplate.fromTemplate(\"tell me a joke about {topic}\")\n",
"\n",
"const chain = prompt.pipe(model).pipe(new StringOutputParser())"
Expand Down Expand Up @@ -142,7 +156,7 @@
"const analysisPrompt = ChatPromptTemplate.fromTemplate(\"is this a funny joke? {joke}\")\n",
"\n",
"const composedChain = new RunnableLambda({\n",
" func: async (input) => {\n",
" func: async (input: { topic: string }) => {\n",
" const result = await chain.invoke(input);\n",
" return { joke: result };\n",
" }\n",
Expand Down Expand Up @@ -210,15 +224,15 @@
"\n",
"You now know some ways to chain two runnables together.\n",
"\n",
"To learn more, see the other how-to guides on runnables in this section."
"To learn more, see the other how-to guides on runnables in [this section](/docs/how_to/#langchain-expression-language-lcel)."
]
}
],
"metadata": {
"kernelspec": {
"display_name": "Deno",
"display_name": "TypeScript",
"language": "typescript",
"name": "deno"
"name": "tslab"
},
"language_info": {
"codemirror_mode": {
Expand Down

0 comments on commit 89cb9cb

Please sign in to comment.