Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ConnectionError #4

Open
nxby opened this issue Aug 16, 2023 · 3 comments
Open

ConnectionError #4

nxby opened this issue Aug 16, 2023 · 3 comments

Comments

@nxby
Copy link

nxby commented Aug 16, 2023

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!

@hinthornw
Copy link
Collaborator

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

@nxby
Copy link
Author

nxby commented Sep 12, 2023

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!

@lekpeng
Copy link

lekpeng commented Jan 18, 2024

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()

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants