diff --git a/python/langsmith/client.py b/python/langsmith/client.py index 96a38808a..b8a706116 100644 --- a/python/langsmith/client.py +++ b/python/langsmith/client.py @@ -36,6 +36,7 @@ import requests from requests import adapters as requests_adapters from urllib3.util import Retry + import langsmith from langsmith import env as ls_env from langsmith import schemas as ls_schemas diff --git a/python/pyproject.toml b/python/pyproject.toml index dec91b451..64a753cab 100644 --- a/python/pyproject.toml +++ b/python/pyproject.toml @@ -1,6 +1,6 @@ [tool.poetry] name = "langsmith" -version = "0.0.80" +version = "0.0.81" description = "Client library to connect to the LangSmith LLM Tracing and Evaluation Platform." authors = ["LangChain "] license = "MIT" diff --git a/python/tests/unit_tests/test_client.py b/python/tests/unit_tests/test_client.py index 09780345c..c3d24a351 100644 --- a/python/tests/unit_tests/test_client.py +++ b/python/tests/unit_tests/test_client.py @@ -51,10 +51,11 @@ def test_validate_api_key_if_hosted(monkeypatch: pytest.MonkeyPatch) -> None: def test_headers(monkeypatch: pytest.MonkeyPatch) -> None: monkeypatch.delenv("LANGCHAIN_API_KEY", raising=False) client = Client(api_url="http://localhost:1984", api_key="123") - assert client._headers == {"x-api-key": "123"} + assert "x-api-key" in client._headers + assert client._headers["x-api-key"] == "123" client_no_key = Client(api_url="http://localhost:1984") - assert client_no_key._headers == {} + assert "x-api-key" not in client_no_key._headers @mock.patch("langsmith.client.requests.Session")