Session to project (#6249)

Sessions are being renamed to projects in the tracer
This commit is contained in:
Zander Chase
2023-06-23 01:11:01 -07:00
committed by GitHub
parent 9c09861946
commit b4fe7f3a09
7 changed files with 724 additions and 716 deletions

View File

@@ -176,7 +176,7 @@ async def test_arun_on_dataset(monkeypatch: pytest.MonkeyPatch) -> None:
{"result": f"Result for example {example.id}"} for _ in range(n_repetitions)
]
def mock_create_session(*args: Any, **kwargs: Any) -> None:
def mock_create_project(*args: Any, **kwargs: Any) -> None:
pass
with mock.patch.object(
@@ -186,7 +186,7 @@ async def test_arun_on_dataset(monkeypatch: pytest.MonkeyPatch) -> None:
), mock.patch(
"langchain.client.runner_utils._arun_llm_or_chain", new=mock_arun_chain
), mock.patch.object(
LangChainPlusClient, "create_session", new=mock_create_session
LangChainPlusClient, "create_project", new=mock_create_project
):
client = LangChainPlusClient(api_url="http://localhost:1984", api_key="123")
chain = mock.MagicMock()
@@ -195,7 +195,7 @@ async def test_arun_on_dataset(monkeypatch: pytest.MonkeyPatch) -> None:
dataset_name="test",
llm_or_chain_factory=lambda: chain,
concurrency_level=2,
session_name="test_session",
project_name="test_project",
num_repetitions=num_repetitions,
client=client,
)