mirror of
https://github.com/hwchase17/langchain.git
synced 2025-06-24 15:43:54 +00:00
docs: clarify hub.pull behavior with non-US LangSmith endpoints (#31270)
**Description**: This PR updates the documentation to address a potential issue when using `hub.pull(...)` with non-US LangSmith endpoints (e.g., `https://eu.api.smith.langchain.com`). By default, the `hub.pull` function assumes the non US-based API URL. When the `LANGSMITH_ENDPOINT` environment variable is set to a non-US region, this can lead to `LangSmithNotFoundError 404 not found` errors when pulling public assets from the LangChain Hub. Issue: #31191 --------- Co-authored-by: Chester Curme <chester.curme@gmail.com>
This commit is contained in:
parent
0c6137ec2b
commit
ff12555bdc
@ -234,6 +234,8 @@
|
|||||||
"_ = vector_store.add_documents(documents=all_splits)\n",
|
"_ = vector_store.add_documents(documents=all_splits)\n",
|
||||||
"\n",
|
"\n",
|
||||||
"# Define prompt for question-answering\n",
|
"# Define prompt for question-answering\n",
|
||||||
|
"# N.B. for non-US LangSmith endpoints, you may need to specify\n",
|
||||||
|
"# api_url=\"https://api.smith.langchain.com\" in hub.pull.\n",
|
||||||
"prompt = hub.pull(\"rlm/rag-prompt\")\n",
|
"prompt = hub.pull(\"rlm/rag-prompt\")\n",
|
||||||
"\n",
|
"\n",
|
||||||
"\n",
|
"\n",
|
||||||
@ -535,7 +537,7 @@
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
"cell_type": "code",
|
"cell_type": "code",
|
||||||
"execution_count": 10,
|
"execution_count": null,
|
||||||
"id": "46f378c5-858c-488f-8aef-8b59a6280791",
|
"id": "46f378c5-858c-488f-8aef-8b59a6280791",
|
||||||
"metadata": {},
|
"metadata": {},
|
||||||
"outputs": [
|
"outputs": [
|
||||||
@ -553,6 +555,8 @@
|
|||||||
"source": [
|
"source": [
|
||||||
"from langchain import hub\n",
|
"from langchain import hub\n",
|
||||||
"\n",
|
"\n",
|
||||||
|
"# N.B. for non-US LangSmith endpoints, you may need to specify\n",
|
||||||
|
"# api_url=\"https://api.smith.langchain.com\" in hub.pull.\n",
|
||||||
"prompt = hub.pull(\"rlm/rag-prompt\")\n",
|
"prompt = hub.pull(\"rlm/rag-prompt\")\n",
|
||||||
"\n",
|
"\n",
|
||||||
"example_messages = prompt.invoke(\n",
|
"example_messages = prompt.invoke(\n",
|
||||||
|
Loading…
Reference in New Issue
Block a user