You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: instrumentation/opentelemetry-instrumentation-openai/src/opentelemetry/instrumentation/openai/span_attributes.py
+56-50
Original file line number
Diff line number
Diff line change
@@ -80,133 +80,139 @@ class LLMSpanAttributes(BaseModel):
80
80
model_config=ConfigDict(extra="allow")
81
81
gen_ai_operation_name: str=Field(
82
82
...,
83
-
alias='gen_ai.operation.name',
84
-
description='The name of the operation being performed.',
83
+
alias="gen_ai.operation.name",
84
+
description="The name of the operation being performed.",
85
85
)
86
86
gen_ai_request_model: str=Field(
87
87
...,
88
-
alias='gen_ai.request.model',
89
-
description='Model name from the input request',
88
+
alias="gen_ai.request.model",
89
+
description="Model name from the input request",
90
90
)
91
91
gen_ai_response_model: Optional[str] =Field(
92
-
None, alias='gen_ai.response.model', description='Model name from the response'
description='Integer between 0 and 5 specifying the number of most likely tokens to return.',
113
+
alias="gen_ai.request.top_logprobs",
114
+
description="Integer between 0 and 5 specifying the number of most likely tokens to return.",
113
115
)
114
116
gen_ai_request_top_p: Optional[float] =Field(
115
117
None,
116
-
alias='gen_ai.request.top_p',
117
-
description='Top P value from the input request',
118
+
alias="gen_ai.request.top_p",
119
+
description="Top P value from the input request",
118
120
)
119
121
gen_ai_request_top_k: Optional[float] =Field(
120
122
None,
121
-
alias='gen_ai.request.top_k',
122
-
description='Top K results to return from the input request',
123
+
alias="gen_ai.request.top_k",
124
+
description="Top K results to return from the input request",
123
125
)
124
126
gen_ai_user: Optional[str] =Field(
125
-
None, alias='gen_ai.user', description='User ID from the input request'
127
+
None, alias="gen_ai.user", description="User ID from the input request"
126
128
)
127
129
gen_ai_prompt: Optional[str] =Field(
128
-
None, alias='gen_ai.prompt', description='Prompt text from the input request'
130
+
None,
131
+
alias="gen_ai.prompt",
132
+
description="Prompt text from the input request",
129
133
)
130
134
gen_ai_completion: Optional[str] =Field(
131
135
None,
132
-
alias='gen_ai.completion',
136
+
alias="gen_ai.completion",
133
137
description='Completion text from the response. This will be an array of json objects with the following format {"role": "", "content": ""}. Role can be one of the following values: [system, user, assistant, tool]',
0 commit comments