Skip to content

Commit

Permalink
bugfix: all messages have the same ID (#15)
Browse files Browse the repository at this point in the history
  • Loading branch information
nhoffmann-newrelic committed Aug 2, 2023
1 parent 6989256 commit eaaa640
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions src/nr_openai_observability/build_events.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,10 @@


def _build_messages_events(messages, completion_id, model):
message_id = str(uuid.uuid4())
events = []
for index, message in enumerate(messages):
currMessage = {
"id": message_id,
"id": str(uuid.uuid4()),
"content": message.get("content")[:4095],
"role": message.get("role"),
"completion_id": completion_id,
Expand Down

0 comments on commit eaaa640

Please sign in to comment.