Skip to content

Commit

Permalink
Revert completion_id changes
Browse files Browse the repository at this point in the history
  • Loading branch information
kaylareopelle committed Mar 13, 2024
1 parent e2781e3 commit cceac8e
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
3 changes: 2 additions & 1 deletion lib/new_relic/agent/llm/chat_completion_message.rb
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,8 @@ module NewRelic
module Agent
module Llm
class ChatCompletionMessage < LlmEvent
ATTRIBUTES = %i[content role sequence token_count is_response]
ATTRIBUTES = %i[content role sequence completion_id token_count
is_response]
EVENT_NAME = 'LlmChatCompletionMessage'

attr_accessor(*ATTRIBUTES)
Expand Down
2 changes: 2 additions & 0 deletions test/new_relic/agent/llm/chat_completion_message_test.rb
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,7 @@ def test_record_creates_an_event
message.response_model = 'gpt-4'
message.vendor = 'OpenAI'
message.role = 'system'
message.completion_id = 123
message.is_response = 'true'
message.token_count = 10

Expand All @@ -73,6 +74,7 @@ def test_record_creates_an_event
assert_equal 'Red-Tailed Hawk', attributes['content']
assert_equal 'system', attributes['role']
assert_equal 2, attributes['sequence']
assert_equal 123, attributes['completion_id']
assert_equal 'true', attributes['is_response']
assert_equal 10, attributes['token_count']
end
Expand Down

0 comments on commit cceac8e

Please sign in to comment.