Skip to content

Commit 81b3178

Browse files
Merge branch 'webb/langchain/remove-mocks' into webb/langchain/add-basic-test
2 parents 4e39d36 + 6fd0c69 commit 81b3178

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

tests/integrations/langchain/test_langchain.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -448,11 +448,13 @@ def test_langchain_openai_tools_agent(
448448
assert tx["type"] == "transaction"
449449
assert tx["contexts"]["trace"]["origin"] == "manual"
450450

451+
invoke_agent_span = next(x for x in tx["spans"] if x["op"] == "gen_ai.invoke_agent")
451452
chat_spans = list(x for x in tx["spans"] if x["op"] == "gen_ai.chat")
452453
tool_exec_span = next(x for x in tx["spans"] if x["op"] == "gen_ai.execute_tool")
453454

454455
assert len(chat_spans) == 2
455456

457+
assert invoke_agent_span["origin"] == "auto.ai.langchain"
456458
assert chat_spans[0]["origin"] == "auto.ai.langchain"
457459
assert chat_spans[1]["origin"] == "auto.ai.langchain"
458460
assert tool_exec_span["origin"] == "auto.ai.langchain"

0 commit comments

Comments
 (0)