Skip to content

Commit

Permalink
add input field to embedding (#16)
Browse files Browse the repository at this point in the history
  • Loading branch information
nhoffmann-newrelic committed Aug 2, 2023
1 parent eaaa640 commit 0100b4c
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions src/nr_openai_observability/build_events.py
Original file line number Diff line number Diff line change
Expand Up @@ -110,6 +110,7 @@ def build_embedding_event(response, request, response_headers, response_time):

embedding = {
"id": embedding_id,
"input": request.get("input")[:4095],
"api_key_last_four_digits": f"sk-{response.api_key[-4:]}",
"timestamp": datetime.now(),
"response_time": int(response_time * 1000),
Expand Down

0 comments on commit 0100b4c

Please sign in to comment.