get working

This commit is contained in:
William Fu-Hinthorn
2024-09-13 16:57:34 -07:00
parent 4e6582bd91
commit 6cb0b0506e
8 changed files with 51 additions and 183 deletions

View File

@@ -1,14 +1,12 @@
import pytest
from langsmith import unit
from agent import graph
from langsmith import expect, unit
@pytest.mark.asyncio
@unit
async def test_agent_simple_passthrough() -> None:
res = await graph.ainvoke(
{"messages": [("user", "Who is the founder of LangChain?")]}
{"messages": [{"role": "user", "content": "What's 62 - 19?"}]}
)
assert "harrison" in str(res["messages"][-1].content).lower()
expect(res["messages"][-1]["content"][0]["text"]).to_contain("43")