langchain-benchmarks icon indicating copy to clipboard operation
langchain-benchmarks copied to clipboard

ConnectionError

Open nxby opened this issue 2 years ago • 3 comments

Hi, I'm trying to run custom_agent.py on my computer, when it comes to this line of code: chain_results = run_on_dataset( client, dataset_name="Titanic CSV Data", llm_or_chain_factory=get_chain, evaluation=eval_config, ) it generates an error message: ConnectionError: HTTPConnectionPool(host='localhost', port=1984): Max retries exceeded with url: /sessions (Caused by NewConnectionError('<urllib3.connection.HTTPConnection object at 0x000001D88859A3A0>: Failed to establish a new connection: [WinError 10061] No connection could be made because the target machine actively refused it'))

I'm running under Windows with Python 3.9.7. Has anyone seen this error before? Thanks!

nxby avatar Aug 16 '23 19:08 nxby

Looks like you're trying to connect to a local instance of langsmith. What happens if you run langsmith status in your terminal?

hinthornw avatar Sep 11 '23 22:09 hinthornw

Looks like you're trying to connect to a local instance of langsmith. What happens if you run langsmith status in your terminal?

Hi @hinthornw , thanks for your reply! When I run langsmith status in my terminal (in Windows 11), I get this message: Error checking LangSmith server status.

Could you give me some ideas on what I should do next? Thanks!

nxby avatar Sep 12 '23 09:09 nxby

Hello I encountered a similar issue, do make sure you load the env before running the langsmith client.

from dotenv import load_dotenv
from langsmith import Client

load_dotenv()
client = Client()

lekpeng avatar Jan 18 '24 03:01 lekpeng