Skip to content

Updates to OpenAI Spans and Metrics conventions#1

Merged
cartermp merged 3 commits intocartermp:cartermp/aifrom
drewby:drewby/ai
Nov 15, 2023
Merged

Updates to OpenAI Spans and Metrics conventions#1
cartermp merged 3 commits intocartermp:cartermp/aifrom
drewby:drewby/ai

Conversation

@drewby
Copy link
Copy Markdown

@drewby drewby commented Nov 15, 2023

Changes

Here are some proposed changes based on the conversation in your PR. I know we haven't agreed to move LLM history to events, so I'm just suggesting here what it might look like if it were events.

  • Adds OpenAI Metrics from @lmolkova fork.
    • I added llm prefix to her metric names.
  • Updates to OpenAI Spans per our conversation on your PR.
    • I repeated the llm attributes in addition to the openai. This is similar to other conventions where "server.address" gets repeated for clarity.
    • I updated names and added new attributes from the recent API changes (functions are not tools, addition of seed and system_fingerprint, etc
    • Moved Messages, Tools, Choices to Span Events and made them optional with a SHOULD be configured by user of instrumentation libraries.

@cartermp cartermp merged commit b9b4d99 into cartermp:cartermp/ai Nov 15, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants