docs: Cosmetic documentation fix. Update llm_chain.ipynb. (#27394)

ATM [LLM chain
docs](https://python.langchain.com/docs/tutorials/llm_chain/#server)
say:

```
# 3. Create parser
parser = StrOutputParser()

# 4. Create chain
chain = prompt_template | model | parser


# 4. App definition
app = FastAPI(
  title="LangChain Server",
  version="1.0",
  description="A simple API server using LangChain's Runnable interfaces",
)

# 5. Adding chain route
add_routes(
    app,
    chain,
    path="/chain",
)
```

I corrected it to:


```
# 3. Create parser
parser = StrOutputParser()

# 4. Create chain
chain = prompt_template | model | parser

# 5. App definition
app = FastAPI(
  title="LangChain Server",
  version="1.0",
  description="A simple API server using LangChain's Runnable interfaces",
)

# 6. Adding chain route
add_routes(
    app,
    chain,
    path="/chain",
)
```
This commit is contained in:
Artur Barseghyan 2024-10-16 19:42:52 +02:00 committed by GitHub
parent a4392b070d
commit 88d71f6986
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -497,15 +497,14 @@
"# 4. Create chain\n",
"chain = prompt_template | model | parser\n",
"\n",
"\n",
"# 4. App definition\n",
"# 5. App definition\n",
"app = FastAPI(\n",
" title=\"LangChain Server\",\n",
" version=\"1.0\",\n",
" description=\"A simple API server using LangChain's Runnable interfaces\",\n",
")\n",
"\n",
"# 5. Adding chain route\n",
"# 6. Adding chain route\n",
"add_routes(\n",
" app,\n",
" chain,\n",