Add prompt hub for various use-cases (#9879)

Use prompt hub in our use-case docs and guides.
This commit is contained in:
Lance Martin
2023-09-03 15:32:22 -07:00
committed by GitHub
parent 00a7c31ffd
commit 16a27ab244
5 changed files with 335 additions and 478 deletions

View File

@@ -149,9 +149,7 @@
{
"cell_type": "code",
"execution_count": 8,
"metadata": {
"scrolled": false
},
"metadata": {},
"outputs": [],
"source": [
"from langchain.chat_models import ChatOpenAI\n",
@@ -251,7 +249,7 @@
},
{
"cell_type": "code",
"execution_count": 11,
"execution_count": 1,
"metadata": {},
"outputs": [],
"source": [
@@ -280,6 +278,25 @@
")"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"We can also access this [prompt](https://smith.langchain.com/hub/rlm/text-to-sql) in the LangChain prompt hub.\n",
"\n",
"This will work with your [LangSmith API key](https://docs.smith.langchain.com/)."
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [],
"source": [
"from langchain import hub\n",
"CUSTOM_PROMPT = hub.pull(\"rlm/text-to-sql\")"
]
},
{
"cell_type": "markdown",
"metadata": {},
@@ -854,5 +871,5 @@
}
},
"nbformat": 4,
"nbformat_minor": 2
"nbformat_minor": 4
}