Skip to content

Commit 167e231

Browse files
.
1 parent 9ad1233 commit 167e231

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

tests/integrations/anthropic/test_anthropic.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1085,6 +1085,7 @@ def test_nonstreaming_create_message_with_system_prompt(
10851085
assert stored_messages[0]["content"] == "Hello, Claude"
10861086
assert span["data"][SPANDATA.GEN_AI_RESPONSE_TEXT] == "Hi, I'm Claude."
10871087
else:
1088+
assert SPANDATA.GEN_AI_SYSTEM_INSTRUCTIONS not in span["data"]
10881089
assert SPANDATA.GEN_AI_REQUEST_MESSAGES not in span["data"]
10891090
assert SPANDATA.GEN_AI_RESPONSE_TEXT not in span["data"]
10901091

@@ -1164,6 +1165,7 @@ async def test_nonstreaming_create_message_with_system_prompt_async(
11641165
assert stored_messages[0]["content"] == "Hello, Claude"
11651166
assert span["data"][SPANDATA.GEN_AI_RESPONSE_TEXT] == "Hi, I'm Claude."
11661167
else:
1168+
assert SPANDATA.GEN_AI_SYSTEM_INSTRUCTIONS not in span["data"]
11671169
assert SPANDATA.GEN_AI_REQUEST_MESSAGES not in span["data"]
11681170
assert SPANDATA.GEN_AI_RESPONSE_TEXT not in span["data"]
11691171

@@ -1276,6 +1278,7 @@ def test_streaming_create_message_with_system_prompt(
12761278
assert span["data"][SPANDATA.GEN_AI_RESPONSE_TEXT] == "Hi! I'm Claude!"
12771279

12781280
else:
1281+
assert SPANDATA.GEN_AI_SYSTEM_INSTRUCTIONS not in span["data"]
12791282
assert SPANDATA.GEN_AI_REQUEST_MESSAGES not in span["data"]
12801283
assert SPANDATA.GEN_AI_RESPONSE_TEXT not in span["data"]
12811284

@@ -1391,6 +1394,7 @@ async def test_streaming_create_message_with_system_prompt_async(
13911394
assert span["data"][SPANDATA.GEN_AI_RESPONSE_TEXT] == "Hi! I'm Claude!"
13921395

13931396
else:
1397+
assert SPANDATA.GEN_AI_SYSTEM_INSTRUCTIONS not in span["data"]
13941398
assert SPANDATA.GEN_AI_REQUEST_MESSAGES not in span["data"]
13951399
assert SPANDATA.GEN_AI_RESPONSE_TEXT not in span["data"]
13961400

0 commit comments

Comments
 (0)