From a01ba75e9c7db083baf007bbd34d6acb6f0c2168 Mon Sep 17 00:00:00 2001 From: Liudmila Molkova Date: Wed, 29 May 2024 15:59:25 -0700 Subject: [PATCH] review comments and rebase --- docs/gen-ai/README.md | 4 ---- docs/gen-ai/llm-spans.md | 13 ++++--------- model/trace/gen-ai.yaml | 6 ------ 3 files changed, 4 insertions(+), 19 deletions(-) diff --git a/docs/gen-ai/README.md b/docs/gen-ai/README.md index 11191bd0be..a95d47c971 100644 --- a/docs/gen-ai/README.md +++ b/docs/gen-ai/README.md @@ -16,7 +16,6 @@ use the conventions in limited non-critical workloads and share the feedback Semantic conventions for Generative AI operations are defined for the following signals: -<<<<<<< HEAD * LLMs Semantic conventions for Generative AI operations are defined for the following signals: @@ -26,8 +25,5 @@ Semantic conventions for Generative AI operations are defined for the following Semantic conventions for LLM operations are defined for the following signals: * [LLM Spans](llm-spans.md): Semantic Conventions for LLM requests - *spans*. -======= -* [Generative AI Spans](llm-spans.md): Semantic Conventions for Generative AI *spans*. ->>>>>>> 1d913bc7 (clean up and add gen-ai specific temp attribute for payload) [DocumentStatus]: https://github.com/open-telemetry/opentelemetry-specification/tree/v1.26.0/specification/document-status.md diff --git a/docs/gen-ai/llm-spans.md b/docs/gen-ai/llm-spans.md index 72780fe881..fd6b4ab792 100644 --- a/docs/gen-ai/llm-spans.md +++ b/docs/gen-ai/llm-spans.md @@ -287,11 +287,6 @@ The event name MUST be `gen_ai.tool.message`. This event describes the model-generated chat response message (choice). If GenAI model returns multiple choices, each of the message SHOULD be recorded as an individual event. -### Assistant response - -This event describes the Gen AI response message. -If Gen AI model returns multiple messages (aka choices), each of the message SHOULD be recorded as an individual event. - @@ -336,10 +331,10 @@ Response event payload has the following fields: #### `Message` object -The message structure matches one of the messages defined in this document depending on the role: - -- [Assistant message](#assistant-message) -- [Tool message](#tool-message) +| Body Field | Type | Description | Examples | Requirement Level | Sensitive | +|---|---|---|---|---|---| +| `content` | `AnyValue` | The contents of the assistant message. | `Spans, events, metrics defined by the GenAI semantic conventions.` | `Opt-In` | ![Sensitive](https://img.shields.io/badge/-sensitive-red) | +| `tool_calls` | [ToolCall](#toolcall-object)[] | The tool calls generated by the model, such as function calls. | `[{"id":"call_mszuSIzqtI65i1wAUOE8w5H4", "function":{"name":"get_link_to_otel_semconv", "arguments":"{\"semconv\":\"gen_ai\"}"}, "type":"function"}]` | `Conditionally Required`: if available | ![Mixed](https://img.shields.io/badge/-mixed-orange) | ### Recording GenAI events as span events diff --git a/model/trace/gen-ai.yaml b/model/trace/gen-ai.yaml index 51ad3b7dac..cc638d0e1a 100644 --- a/model/trace/gen-ai.yaml +++ b/model/trace/gen-ai.yaml @@ -39,12 +39,6 @@ groups: note: > If there is more than one finish reason in the response, the last one should be reported. requirement_level: recommended - events: - - gen_ai.system.message - - gen_ai.user.message - - gen_ai.assistant.message - - gen_ai.tool.message - - gen_ai.choice - id: gen_ai.common.event.attributes type: attribute_group