Skip to content

Commit

Permalink
Merge pull request #2509 from newrelic/update-summary-attr-datatypes
Browse files Browse the repository at this point in the history
Update ChatCompletionSummary attribute datatypes
  • Loading branch information
hannahramadan authored Mar 18, 2024
2 parents b3a6073 + b21f4e0 commit 6ba9084
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -67,9 +67,9 @@ def chat_completions_instrumentation(parameters)
def create_chat_completion_summary(parameters)
NewRelic::Agent::Llm::ChatCompletionSummary.new(
vendor: VENDOR,
request_max_tokens: parameters[:max_tokens] || parameters['max_tokens'],
request_max_tokens: (parameters[:max_tokens] || parameters['max_tokens'])&.to_i,
request_model: parameters[:model] || parameters['model'],
temperature: parameters[:temperature] || parameters['temperature'],
temperature: (parameters[:temperature] || parameters['temperature'])&.to_f,
metadata: llm_custom_attributes
)
end
Expand Down

0 comments on commit 6ba9084

Please sign in to comment.