Skip to content

Commit 9beb3f4

Browse files
Merge branch 'webb/langchain/tool-test' into webb/langchain/text-completion
2 parents 260b648 + 4ed8d2e commit 9beb3f4

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
@@ -709,11 +709,13 @@ def test_langchain_openai_tools_agent(
709709
assert tx["type"] == "transaction"
710710
assert tx["contexts"]["trace"]["origin"] == "manual"
711711

712+
invoke_agent_span = next(x for x in tx["spans"] if x["op"] == "gen_ai.invoke_agent")
712713
chat_spans = list(x for x in tx["spans"] if x["op"] == "gen_ai.chat")
713714
tool_exec_span = next(x for x in tx["spans"] if x["op"] == "gen_ai.execute_tool")
714715

715716
assert len(chat_spans) == 2
716717

718+
assert invoke_agent_span["origin"] == "auto.ai.langchain"
717719
assert chat_spans[0]["origin"] == "auto.ai.langchain"
718720
assert chat_spans[1]["origin"] == "auto.ai.langchain"
719721
assert tool_exec_span["origin"] == "auto.ai.langchain"

0 commit comments

Comments
 (0)