Skip to content

Commit bd233c4

Browse files
committed
Fix timestamp merge conflicts in AI
1 parent a9b6a6e commit bd233c4

File tree

12 files changed

+3
-679
lines changed

12 files changed

+3
-679
lines changed

newrelic/hooks/external_botocore.py

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -271,8 +271,6 @@ def create_chat_completion_message_event(
271271

272272
if settings.ai_monitoring.record_content.enabled:
273273
chat_completion_message_dict["content"] = content
274-
if request_timestamp:
275-
chat_completion_message_dict["timestamp"] = request_timestamp
276274

277275
chat_completion_message_dict.update(llm_metadata_dict)
278276

newrelic/hooks/mlmodel_gemini.py

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -564,8 +564,6 @@ def create_chat_completion_message_event(
564564

565565
if settings.ai_monitoring.record_content.enabled:
566566
chat_completion_output_message_dict["content"] = message_content
567-
if request_timestamp:
568-
chat_completion_output_message_dict["timestamp"] = request_timestamp
569567

570568
chat_completion_output_message_dict.update(llm_metadata)
571569

newrelic/hooks/mlmodel_openai.py

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -215,8 +215,6 @@ def create_chat_completion_message_event(
215215

216216
if settings.ai_monitoring.record_content.enabled and message_content:
217217
chat_completion_output_message_dict["content"] = message_content
218-
if request_timestamp:
219-
chat_completion_output_message_dict["timestamp"] = request_timestamp
220218

221219
chat_completion_output_message_dict.update(llm_metadata)
222220

tests/external_botocore/_test_bedrock_chat_completion_converse.py

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,6 @@
7979
{"type": "LlmChatCompletionMessage"},
8080
{
8181
"id": None, # UUID that varies with each run
82-
"timestamp": None,
8382
"llm.conversation_id": "my-awesome-id",
8483
"llm.foo": "bar",
8584
"request_id": "c20d345e-6878-4778-b674-6b187bae8ecf",
@@ -161,7 +160,6 @@
161160
{"type": "LlmChatCompletionMessage"},
162161
{
163162
"id": None, # UUID that varies with each run
164-
"timestamp": None,
165163
"llm.conversation_id": "my-awesome-id",
166164
"llm.foo": "bar",
167165
"request_id": "f070b880-e0fb-4537-8093-796671c39239",

tests/external_botocore/_test_bedrock_chat_completion_invoke_model.py

Lines changed: 0 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,6 @@
7171
{"type": "LlmChatCompletionMessage"},
7272
{
7373
"id": None, # UUID that varies with each run
74-
"timestamp": None,
7574
"llm.conversation_id": "my-awesome-id",
7675
"llm.foo": "bar",
7776
"request_id": "48c7ee13-7790-461f-959f-04b0a4cf91c8",
@@ -133,7 +132,6 @@
133132
{"type": "LlmChatCompletionMessage"},
134133
{
135134
"id": None, # UUID that varies with each run
136-
"timestamp": None,
137135
"llm.conversation_id": "my-awesome-id",
138136
"llm.foo": "bar",
139137
"request_id": "81508a1c-33a8-4294-8743-f0c629af2f49",
@@ -196,7 +194,6 @@
196194
{"type": "LlmChatCompletionMessage"},
197195
{
198196
"id": "1234-1",
199-
"timestamp": None,
200197
"llm.conversation_id": "my-awesome-id",
201198
"llm.foo": "bar",
202199
"request_id": "228ee63f-4eca-4b7d-b679-bc920de63525",
@@ -258,7 +255,6 @@
258255
{"type": "LlmChatCompletionMessage"},
259256
{
260257
"id": None, # UUID that varies with each run
261-
"timestamp": None,
262258
"llm.conversation_id": "my-awesome-id",
263259
"llm.foo": "bar",
264260
"request_id": "6a886158-b39f-46ce-b214-97458ab76f2f",
@@ -320,7 +316,6 @@
320316
{"type": "LlmChatCompletionMessage"},
321317
{
322318
"id": None, # UUID that varies with each run
323-
"timestamp": None,
324319
"llm.conversation_id": "my-awesome-id",
325320
"llm.foo": "bar",
326321
"request_id": "ab38295d-df9c-4141-8173-38221651bf46",
@@ -383,7 +378,6 @@
383378
{"type": "LlmChatCompletionMessage"},
384379
{
385380
"id": None, # UUID that varies with each run
386-
"timestamp": None,
387381
"llm.conversation_id": "my-awesome-id",
388382
"llm.foo": "bar",
389383
"request_id": "12912a17-aa13-45f3-914c-cc82166f3601",
@@ -445,7 +439,6 @@
445439
{"type": "LlmChatCompletionMessage"},
446440
{
447441
"id": None, # UUID that varies with each run
448-
"timestamp": None,
449442
"llm.conversation_id": "my-awesome-id",
450443
"llm.foo": "bar",
451444
"request_id": "a168214d-742d-4244-bd7f-62214ffa07df",
@@ -509,7 +502,6 @@
509502
{"type": "LlmChatCompletionMessage"},
510503
{
511504
"id": None, # UUID that varies with each run
512-
"timestamp": None,
513505
"llm.conversation_id": "my-awesome-id",
514506
"llm.foo": "bar",
515507
"request_id": "48c7ee13-7790-461f-959f-04b0a4cf91c8",
@@ -569,7 +561,6 @@
569561
{"type": "LlmChatCompletionMessage"},
570562
{
571563
"id": None, # UUID that varies with each run
572-
"timestamp": None,
573564
"llm.conversation_id": "my-awesome-id",
574565
"llm.foo": "bar",
575566
"request_id": "884db5c9-18ab-4f27-8892-33656176a2e6",
@@ -628,7 +619,6 @@
628619
{"type": "LlmChatCompletionMessage"},
629620
{
630621
"id": None, # UUID that varies with each run
631-
"timestamp": None,
632622
"llm.conversation_id": "my-awesome-id",
633623
"llm.foo": "bar",
634624
"request_id": "1a72a1f6-310f-469c-af1d-2c59eb600089",
@@ -668,7 +658,6 @@
668658
{"type": "LlmChatCompletionMessage"},
669659
{
670660
"id": None, # UUID that varies with each run
671-
"timestamp": None,
672661
"llm.conversation_id": "my-awesome-id",
673662
"llm.foo": "bar",
674663
"request_id": "e8fc1dd7-3d1e-42c6-9c58-535cae563bff",
@@ -687,7 +676,6 @@
687676
{"type": "LlmChatCompletionMessage"},
688677
{
689678
"id": None, # UUID that varies with each run
690-
"timestamp": None,
691679
"llm.conversation_id": "my-awesome-id",
692680
"llm.foo": "bar",
693681
"request_id": "e8fc1dd7-3d1e-42c6-9c58-535cae563bff",
@@ -747,7 +735,6 @@
747735
{"type": "LlmChatCompletionMessage"},
748736
{
749737
"id": None, # UUID that varies with each run
750-
"timestamp": None,
751738
"llm.conversation_id": "my-awesome-id",
752739
"llm.foo": "bar",
753740
"request_id": "cce6b34c-812c-4f97-8885-515829aa9639",
@@ -811,7 +798,6 @@
811798
{"type": "LlmChatCompletionMessage"},
812799
{
813800
"id": None, # UUID that varies with each run
814-
"timestamp": None,
815801
"llm.conversation_id": "my-awesome-id",
816802
"llm.foo": "bar",
817803
"request_id": "48c7ee13-7790-461f-959f-04b0a4cf91c8",
@@ -871,7 +857,6 @@
871857
{"type": "LlmChatCompletionMessage"},
872858
{
873859
"id": None, # UUID that varies with each run
874-
"timestamp": None,
875860
"llm.conversation_id": "my-awesome-id",
876861
"llm.foo": "bar",
877862
"request_id": "884db5c9-18ab-4f27-8892-33656176a2e6",
@@ -931,7 +916,6 @@
931916
{"type": "LlmChatCompletionMessage"},
932917
{
933918
"id": None, # UUID that varies with each run
934-
"timestamp": None,
935919
"llm.conversation_id": "my-awesome-id",
936920
"llm.foo": "bar",
937921
"request_id": "1a72a1f6-310f-469c-af1d-2c59eb600089",
@@ -991,7 +975,6 @@
991975
{"type": "LlmChatCompletionMessage"},
992976
{
993977
"id": None, # UUID that varies with each run
994-
"timestamp": None,
995978
"llm.conversation_id": "my-awesome-id",
996979
"llm.foo": "bar",
997980
"request_id": "96c7306d-2d60-4629-83e9-dbd6befb0e4e",
@@ -1051,7 +1034,6 @@
10511034
{"type": "LlmChatCompletionMessage"},
10521035
{
10531036
"id": None, # UUID that varies with each run
1054-
"timestamp": None,
10551037
"llm.conversation_id": "my-awesome-id",
10561038
"llm.foo": "bar",
10571039
"request_id": "cce6b34c-812c-4f97-8885-515829aa9639",
@@ -1116,7 +1098,6 @@
11161098
{"type": "LlmChatCompletionMessage"},
11171099
{
11181100
"id": None, # UUID that varies with each run
1119-
"timestamp": None,
11201101
"llm.conversation_id": "my-awesome-id",
11211102
"llm.foo": "bar",
11221103
"request_id": "48c7ee13-7790-461f-959f-04b0a4cf91c8",
@@ -1178,7 +1159,6 @@
11781159
{"type": "LlmChatCompletionMessage"},
11791160
{
11801161
"id": None, # UUID that varies with each run
1181-
"timestamp": None,
11821162
"request_id": "b427270f-371a-458d-81b6-a05aafb2704c",
11831163
"span_id": None,
11841164
"trace_id": "trace-id",
@@ -1240,7 +1220,6 @@
12401220
{"type": "LlmChatCompletionMessage"},
12411221
{
12421222
"id": None, # UUID that varies with each run
1243-
"timestamp": None,
12441223
"request_id": "a645548f-0b3a-47ce-a675-f51e6e9037de",
12451224
"span_id": None,
12461225
"trace_id": "trace-id",
@@ -1301,7 +1280,6 @@
13011280
{"type": "LlmChatCompletionMessage"},
13021281
{
13031282
"id": None, # UUID that varies with each run
1304-
"timestamp": None,
13051283
"llm.conversation_id": "my-awesome-id",
13061284
"llm.foo": "bar",
13071285
"request_id": "1efe6197-80f9-43a6-89a5-bb536c1b822f",
@@ -1364,7 +1342,6 @@
13641342
{"type": "LlmChatCompletionMessage"},
13651343
{
13661344
"id": None, # UUID that varies with each run
1367-
"timestamp": None,
13681345
"request_id": "4f8ab6c5-42d1-4e35-9573-30f9f41f821e",
13691346
"span_id": None,
13701347
"trace_id": "trace-id",
@@ -1426,7 +1403,6 @@
14261403
{"type": "LlmChatCompletionMessage"},
14271404
{
14281405
"id": None, # UUID that varies with each run
1429-
"timestamp": None,
14301406
"request_id": "6dd99878-0919-4f92-850c-48f50f923b76",
14311407
"span_id": None,
14321408
"trace_id": "trace-id",

tests/mlmodel_gemini/test_text_generation.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,6 @@
7575
{"type": "LlmChatCompletionMessage"},
7676
{
7777
"id": None,
78-
"timestamp": None,
7978
"llm.conversation_id": "my-awesome-id",
8079
"llm.foo": "bar",
8180
"span_id": None,

tests/mlmodel_langchain/test_chain.py

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -176,7 +176,6 @@
176176
{"type": "LlmChatCompletionMessage"},
177177
{
178178
"id": None,
179-
"timestamp": None,
180179
"llm.conversation_id": "my-awesome-id",
181180
"llm.foo": "bar",
182181
"request_id": None,
@@ -236,7 +235,6 @@
236235
{"type": "LlmChatCompletionMessage"},
237236
{
238237
"id": None,
239-
"timestamp": None,
240238
"llm.conversation_id": "my-awesome-id",
241239
"llm.foo": "bar",
242240
"request_id": None,
@@ -294,7 +292,6 @@
294292
{"type": "LlmChatCompletionMessage"},
295293
{
296294
"id": None,
297-
"timestamp": None,
298295
"llm.conversation_id": "my-awesome-id",
299296
"llm.foo": "bar",
300297
"request_id": None,
@@ -352,7 +349,6 @@
352349
{"type": "LlmChatCompletionMessage"},
353350
{
354351
"id": None,
355-
"timestamp": None,
356352
"llm.conversation_id": "my-awesome-id",
357353
"llm.foo": "bar",
358354
"request_id": None,
@@ -448,7 +444,6 @@
448444
{"type": "LlmChatCompletionMessage"},
449445
{
450446
"id": None,
451-
"timestamp": None,
452447
"request_id": None,
453448
"span_id": None,
454449
"trace_id": "trace-id",
@@ -526,7 +521,6 @@
526521
{"type": "LlmChatCompletionMessage"},
527522
{
528523
"id": None,
529-
"timestamp": None,
530524
"request_id": None,
531525
"span_id": None,
532526
"trace_id": "trace-id",
@@ -561,7 +555,6 @@
561555
{"type": "LlmChatCompletionMessage"},
562556
{
563557
"id": None,
564-
"timestamp": None,
565558
"request_id": None,
566559
"span_id": None,
567560
"trace_id": "trace-id",
@@ -579,7 +572,6 @@
579572
{"type": "LlmChatCompletionMessage"},
580573
{
581574
"id": None,
582-
"timestamp": None,
583575
"request_id": None,
584576
"span_id": None,
585577
"trace_id": "trace-id",
@@ -637,7 +629,6 @@
637629
{"type": "LlmChatCompletionMessage"},
638630
{
639631
"id": None,
640-
"timestamp": None,
641632
"llm.conversation_id": "my-awesome-id",
642633
"llm.foo": "bar",
643634
"request_id": None,
@@ -696,7 +687,6 @@
696687
{"type": "LlmChatCompletionMessage"},
697688
{
698689
"id": None,
699-
"timestamp": None,
700690
"llm.conversation_id": "my-awesome-id",
701691
"llm.foo": "bar",
702692
"request_id": None,

tests/mlmodel_openai/test_chat_completion.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -111,7 +111,6 @@
111111
{"type": "LlmChatCompletionMessage"},
112112
{
113113
"id": "chatcmpl-87sb95K4EF2nuJRcTs43Tm9ntTemv-2",
114-
"timestamp": None,
115114
"llm.conversation_id": "my-awesome-id",
116115
"llm.foo": "bar",
117116
"request_id": "49dbbffbd3c3f4612aa48def69059ccd",

tests/mlmodel_openai/test_chat_completion_stream.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -112,7 +112,6 @@
112112
{"type": "LlmChatCompletionMessage"},
113113
{
114114
"id": "chatcmpl-87sb95K4EF2nuJRcTs43Tm9ntTemv-2",
115-
"timestamp": None,
116115
"llm.conversation_id": "my-awesome-id",
117116
"llm.foo": "bar",
118117
"request_id": "49dbbffbd3c3f4612aa48def69059ccd",

0 commit comments

Comments
 (0)