docs: modules pages simplified (#5116)

# docs: modules pages simplified

Fixied #5627  issue

Merged several repetitive sections in the `modules` pages. Some texts,
that were hard to understand, were also simplified.


## Who can review?

@hwchase17
@dev2049
This commit is contained in:
Leonid Ganeline
2023-06-03 14:44:32 -07:00
committed by GitHub
parent bc875a9df1
commit 95c6ed0568
7 changed files with 147 additions and 190 deletions

View File

@@ -1,19 +1,18 @@
{
"cells": [
{
"attachments": {},
"cell_type": "markdown",
"id": "6488fdaf",
"metadata": {},
"source": [
"# Chat Prompt Template\n",
"# Chat Prompt Templates\n",
"\n",
"[Chat Models](../models/chat.rst) takes a list of chat messages as input - this list commonly referred to as a prompt.\n",
"These chat messages differ from raw string (which you would pass into a [LLM](../models/llms.rst) model) in that every message is associated with a role.\n",
"[Chat Models](../models/chat.rst) take a list of `chat messages as` input - this list commonly referred to as a `prompt`.\n",
"These chat messages differ from raw string (which you would pass into a [LLM](../models/llms.rst) model) in that every message is associated with a `role`.\n",
"\n",
"For example, in OpenAI [Chat Completion API](https://platform.openai.com/docs/guides/chat/introduction), a chat message can be associated with the AI, human or system role. The model is supposed to follow instruction from system chat message more closely.\n",
"\n",
"Therefore, LangChain provides several related prompt templates to make constructing and working with prompts easily. You are encouraged to use these chat related prompt templates instead of `PromptTemplate` when querying chat models to fully exploit the potential of underlying chat model.\n"
"LangChain provides several prompt templates to make constructing and working with prompts easily. You are encouraged to use these chat related prompt templates instead of `PromptTemplate` when querying chat models to fully exploit the potential of underlying chat model.\n"
]
},
{
@@ -126,7 +125,6 @@
]
},
{
"attachments": {},
"cell_type": "markdown",
"id": "0899f681-012e-4687-a754-199a9a396738",
"metadata": {
@@ -364,7 +362,7 @@
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.10.10"
"version": "3.10.6"
}
},
"nbformat": 4,