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
| <aid="gen-ai-operation-name"href="#gen-ai-operation-name">`gen_ai.operation.name`</a> | string | The name of the operation being performed. [1]|`chat`; `text_completion`; `embeddings`||
18
-
| <aid="gen-ai-request-encoding-formats"href="#gen-ai-request-encoding-formats">`gen_ai.request.encoding_formats`</a> | string[]| The encoding formats requested in an embeddings operation, if specified. [2]|`["base64"]`; `["float", "binary"]`||
18
+
| <aid="gen-ai-output-type"href="#gen-ai-output-type">`gen_ai.output.type`</a> | string | Represents the content type requested by the client. [2]|`text`; `json`; `image`||
19
+
| <aid="gen-ai-request-encoding-formats"href="#gen-ai-request-encoding-formats">`gen_ai.request.encoding_formats`</a> | string[]| The encoding formats requested in an embeddings operation, if specified. [3]|`["base64"]`; `["float", "binary"]`||
19
20
| <aid="gen-ai-request-frequency-penalty"href="#gen-ai-request-frequency-penalty">`gen_ai.request.frequency_penalty`</a> | double | The frequency penalty setting for the GenAI request. |`0.1`||
20
21
| <aid="gen-ai-request-max-tokens"href="#gen-ai-request-max-tokens">`gen_ai.request.max_tokens`</a> | int | The maximum number of tokens the model generates for a request. |`100`||
21
22
| <aid="gen-ai-request-model"href="#gen-ai-request-model">`gen_ai.request.model`</a> | string | The name of the GenAI model a request is being made to. |`gpt-4`||
@@ -28,16 +29,20 @@ This document defines the attributes used to describe telemetry in the context o
28
29
| <aid="gen-ai-response-finish-reasons"href="#gen-ai-response-finish-reasons">`gen_ai.response.finish_reasons`</a> | string[]| Array of reasons the model stopped generating tokens, corresponding to each generation received. |`["stop"]`; `["stop", "length"]`||
29
30
| <aid="gen-ai-response-id"href="#gen-ai-response-id">`gen_ai.response.id`</a> | string | The unique identifier for the completion. |`chatcmpl-123`||
30
31
| <aid="gen-ai-response-model"href="#gen-ai-response-model">`gen_ai.response.model`</a> | string | The name of the model that generated the response. |`gpt-4-0613`||
31
-
| <aid="gen-ai-system"href="#gen-ai-system">`gen_ai.system`</a> | string | The Generative AI product as identified by the client or server instrumentation. [3]|`openai`||
32
+
| <aid="gen-ai-system"href="#gen-ai-system">`gen_ai.system`</a> | string | The Generative AI product as identified by the client or server instrumentation. [4]|`openai`||
32
33
| <aid="gen-ai-token-type"href="#gen-ai-token-type">`gen_ai.token.type`</a> | string | The type of token being counted. |`input`; `output`||
33
34
| <aid="gen-ai-usage-input-tokens"href="#gen-ai-usage-input-tokens">`gen_ai.usage.input_tokens`</a> | int | The number of tokens used in the GenAI input (prompt). |`100`||
34
35
| <aid="gen-ai-usage-output-tokens"href="#gen-ai-usage-output-tokens">`gen_ai.usage.output_tokens`</a> | int | The number of tokens used in the GenAI response (completion). |`180`||
35
36
36
37
**[1]`gen_ai.operation.name`:** If one of the predefined values applies, but specific system uses a different name it's RECOMMENDED to document it in the semantic conventions for specific GenAI system and use system-specific name in the instrumentation. If a different name is not documented, instrumentation libraries SHOULD use applicable predefined value.
37
38
38
-
**[2]`gen_ai.request.encoding_formats`:** In some GenAI systems the encoding formats are called embedding types. Also, some GenAI systems only accept a single format per request.
39
+
**[2]`gen_ai.output.type`:** This attribute SHOULD be used when the client requests output of a specific type. The model may return zero or more outputs of this type.
40
+
This attribute specifies the output modality and not the actual output format. For example, if an image is requested, the actual output could be a URL pointing to an image file.
41
+
Additional output format details may be recorded in the future in the `gen_ai.output.{type}.*` attributes.
39
42
40
-
**[3]`gen_ai.system`:** The `gen_ai.system` describes a family of GenAI models with specific model identified
43
+
**[3]`gen_ai.request.encoding_formats`:** In some GenAI systems the encoding formats are called embedding types. Also, some GenAI systems only accept a single format per request.
44
+
45
+
**[4]`gen_ai.system`:** The `gen_ai.system` describes a family of GenAI models with specific model identified
41
46
by `gen_ai.request.model` and `gen_ai.response.model` attributes.
42
47
43
48
The actual GenAI product may differ from the one identified by the client.
@@ -61,6 +66,17 @@ If none of these options apply, the `gen_ai.system` SHOULD be set to `_OTHER`.
61
66
62
67
---
63
68
69
+
`gen_ai.output.type` has the following list of well-known values. If one of them applies, then the respective value MUST be used; otherwise, a custom value MAY be used.
|`text`| Plain text ||
77
+
78
+
---
79
+
64
80
`gen_ai.system` has the following list of well-known values. If one of them applies, then the respective value MUST be used; otherwise, a custom value MAY be used.
65
81
66
82
| Value | Description | Stability |
@@ -91,27 +107,16 @@ If none of these options apply, the `gen_ai.system` SHOULD be set to `_OTHER`.
| <aid="gen-ai-openai-request-response-format"href="#gen-ai-openai-request-response-format">`gen_ai.openai.request.response_format`</a> | string | The response format that is requested. |`json`||
99
114
| <aid="gen-ai-openai-request-service-tier"href="#gen-ai-openai-request-service-tier">`gen_ai.openai.request.service_tier`</a> | string | The service tier requested. May be a specific tier, default, or auto. |`auto`; `default`||
100
115
| <aid="gen-ai-openai-response-service-tier"href="#gen-ai-openai-response-service-tier">`gen_ai.openai.response.service_tier`</a> | string | The service tier used for the response. |`scale`; `default`||
101
116
| <aid="gen-ai-openai-response-system-fingerprint"href="#gen-ai-openai-response-system-fingerprint">`gen_ai.openai.response.system_fingerprint`</a> | string | A fingerprint to track any eventual change in the Generative AI environment. |`fp_44709d6fcb`||
102
117
103
118
---
104
119
105
-
`gen_ai.openai.request.response_format` has the following list of well-known values. If one of them applies, then the respective value MUST be used; otherwise, a custom value MAY be used.
106
-
107
-
| Value | Description | Stability |
108
-
|---|---|---|
109
-
|`json_object`| JSON object response format ||
110
-
|`json_schema`| JSON schema response format ||
111
-
|`text`| Text response format ||
112
-
113
-
---
114
-
115
120
`gen_ai.openai.request.service_tier` has the following list of well-known values. If one of them applies, then the respective value MUST be used; otherwise, a custom value MAY be used.
| <aid="gen-ai-openai-request-response-format"href="#gen-ai-openai-request-response-format">`gen_ai.openai.request.response_format`</a> | string | Deprecated, use `gen_ai.output.type`. |`text`; `json_object`; `json_schema`|<br>Replaced by `gen_ai.output.type`. |
139
145
| <aid="gen-ai-openai-request-seed"href="#gen-ai-openai-request-seed">`gen_ai.openai.request.seed`</a> | int | Deprecated, use `gen_ai.request.seed`. |`100`|<br>Replaced by `gen_ai.request.seed` attribute. |
146
+
147
+
---
148
+
149
+
`gen_ai.openai.request.response_format` has the following list of well-known values. If one of them applies, then the respective value MUST be used; otherwise, a custom value MAY be used.
150
+
151
+
| Value | Description | Stability |
152
+
|---|---|---|
153
+
|`json_object`| JSON object response format ||
154
+
|`json_schema`| JSON schema response format ||
155
+
|`text`| Text response format ||
0 commit comments