Skip to content

Commit

Permalink
move messages attributes
Browse files Browse the repository at this point in the history
  • Loading branch information
mikeldking committed Jan 2, 2024
1 parent 8b037ff commit 08fbce6
Showing 1 changed file with 19 additions and 13 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -30,19 +30,6 @@ class SpanAttributes:
The embedding vector.
"""

MESSAGE_ROLE = "message.role"
"""
The role of the message, such as "user", "agent", "function".
"""
MESSAGE_NAME = "message.name"
"""
The name of the message, often used to identify the function
that was used to generate the message.
"""
MESSAGE_TOOL_CALLS = "message.tool_calls"
"""
The tool calls generated by the model, such as function calls.
"""
TOOL_CALL_FUNCTION_NAME = "tool_call.function.name"
"""
The name of function that is being called during a tool call.
Expand Down Expand Up @@ -161,3 +148,22 @@ class SpanAttributes:
"""

OPENINFERENCE_SPAN_KIND = "openinference.span.kind"

class MessageAttributes:
"""
Attributes for a message generated by a LLM
"""

MESSAGE_ROLE = "message.role"
"""
The role of the message, such as "user", "agent", "function".
"""
MESSAGE_NAME = "message.name"
"""
The name of the message, often used to identify the function
that was used to generate the message.
"""
MESSAGE_TOOL_CALLS = "message.tool_calls"
"""
The tool calls generated by the model, such as function calls.
"""

0 comments on commit 08fbce6

Please sign in to comment.