Skip to content

Commit 940a455

Browse files
committed
Address CR comment
1 parent 97e60f3 commit 940a455

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

tests/integrations/langchain/test_langchain.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -147,7 +147,7 @@ def test_langchain_text_completion(
147147
) as _:
148148
with start_transaction():
149149
input_text = "What is the capital of France?"
150-
model.invoke(input_text)
150+
model.invoke(input_text, config={"run_name": "my-snazzy-pipeline"})
151151

152152
tx = events[0]
153153
assert tx["type"] == "transaction"
@@ -159,6 +159,8 @@ def test_langchain_text_completion(
159159

160160
llm_span = llm_spans[0]
161161
assert llm_span["description"] == "generate_text gpt-3.5-turbo"
162+
assert llm_span["data"]["gen_ai.system"] == "openai"
163+
assert llm_span["data"]["gen_ai.pipeline.name"] == "my-snazzy-pipeline"
162164
assert llm_span["data"]["gen_ai.request.model"] == "gpt-3.5-turbo"
163165
assert llm_span["data"]["gen_ai.response.text"] == "The capital of France is Paris."
164166
assert llm_span["data"]["gen_ai.usage.total_tokens"] == 25

0 commit comments

Comments
 (0)