EU user not able to retrieve a prompt from hub : "404 Client Error: Not Found for url" #34

Closed
opened 2026-02-21 17:17:01 -05:00 by yindo · 1 comment
Owner

Originally created by @DavidPautet on GitHub (Nov 12, 2024).

Hi,

I have linked my account to the EU datacenter. I am trying to implement a RAG using this official tutorial:
https://python.langchain.com/docs/tutorials/rag/

As explained in the documentation I am using (on top of the mandatory LANGCHAIN_API_KEY variable):
LANGCHAIN_ENDPOINT="https://eu.api.smith.langchain.com/"

The issue I have is related to this line of code extracted from the tutorial:
prompt = hub.pull("rlm/rag-prompt")

When trying to execute my JupyterLab Notebook I am getting:

File [/opt/homebrew/Cellar/jupyterlab/4.2.5_1/libexec/lib/python3.12/site-packages/langsmith/utils.py:150](http://localhost:8888/opt/homebrew/Cellar/jupyterlab/4.2.5_1/libexec/lib/python3.12/site-packages/langsmith/utils.py#line=149), in raise_for_status_with_text(response)
    149 try:
--> 150     response.raise_for_status()
    151 except requests.HTTPError as e:

File [/opt/homebrew/Cellar/jupyterlab/4.2.5_1/libexec/lib/python3.12/site-packages/requests/models.py:1024](http://localhost:8888/opt/homebrew/Cellar/jupyterlab/4.2.5_1/libexec/lib/python3.12/site-packages/requests/models.py#line=1023), in Response.raise_for_status(self)
   1023 if http_error_msg:
-> 1024     raise HTTPError(http_error_msg, response=self)

HTTPError: 404 Client Error: Not Found for url: https://eu.api.smith.langchain.com/commits/rlm/rag-prompt/latest

I have restarted the kernel and removed the LANGCHAIN_ENDPOINT variable and I am just having a 403 (seems to be logical because my user is not granted on the US data centre) but no more 404...

Here are my questions:

  • Should I remove my account and recreate a new one associated with US data centre? If yes, how to proceed?
  • Should I provide additional env. variable before trying to use the prompt hub?

Thanks for your help.
David

Originally created by @DavidPautet on GitHub (Nov 12, 2024). Hi, I have linked my account to the EU datacenter. I am trying to implement a RAG using this official tutorial: https://python.langchain.com/docs/tutorials/rag/ As explained in the documentation I am using (on top of the mandatory `LANGCHAIN_API_KEY` variable): `LANGCHAIN_ENDPOINT="https://eu.api.smith.langchain.com/"` The issue I have is related to this line of code extracted from the tutorial: `prompt = hub.pull("rlm/rag-prompt")` When trying to execute my JupyterLab Notebook I am getting: ``` File [/opt/homebrew/Cellar/jupyterlab/4.2.5_1/libexec/lib/python3.12/site-packages/langsmith/utils.py:150](http://localhost:8888/opt/homebrew/Cellar/jupyterlab/4.2.5_1/libexec/lib/python3.12/site-packages/langsmith/utils.py#line=149), in raise_for_status_with_text(response) 149 try: --> 150 response.raise_for_status() 151 except requests.HTTPError as e: File [/opt/homebrew/Cellar/jupyterlab/4.2.5_1/libexec/lib/python3.12/site-packages/requests/models.py:1024](http://localhost:8888/opt/homebrew/Cellar/jupyterlab/4.2.5_1/libexec/lib/python3.12/site-packages/requests/models.py#line=1023), in Response.raise_for_status(self) 1023 if http_error_msg: -> 1024 raise HTTPError(http_error_msg, response=self) HTTPError: 404 Client Error: Not Found for url: https://eu.api.smith.langchain.com/commits/rlm/rag-prompt/latest ``` I have restarted the kernel and removed the `LANGCHAIN_ENDPOINT` variable and I am just having a 403 (seems to be logical because my user is not granted on the US data centre) but no more 404... Here are my questions: - Should I remove my account and recreate a new one associated with US data centre? If yes, how to proceed? - Should I provide additional env. variable before trying to use the prompt hub? Thanks for your help. David
yindo closed this issue 2026-02-21 17:17:01 -05:00
Author
Owner

@hinthornw commented on GitHub (Nov 13, 2024):

@DavidPautet , the prmopt "rlm/rag-prompt" lives in the US instance. You'll have to pull from that one for now. Since it's public, you do not need to make an API key or US account.

If you want to keep your envirnoment pointed to your EU account, you can create a US-linked client like this:

from langsmith import Client

public_client = Client(
    api_key="it-doesn't-matter", api_url="https://api.smith.langchain.com"
)

prompt = public_client.pull_prompt("rlm/rag-prompt")
@hinthornw commented on GitHub (Nov 13, 2024): @DavidPautet , the prmopt `"rlm/rag-prompt"` lives in the US instance. You'll have to pull from that one for now. Since it's public, you do not need to make an API key or US account. If you want to keep your envirnoment pointed to your EU account, you can create a US-linked client like this: ``` from langsmith import Client public_client = Client( api_key="it-doesn't-matter", api_url="https://api.smith.langchain.com" ) prompt = public_client.pull_prompt("rlm/rag-prompt") ```
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: langchain-ai/langsmith-docs#34