Skip to content

Commit

Permalink
review comments and rebase
Browse files Browse the repository at this point in the history
  • Loading branch information
lmolkova committed May 29, 2024
1 parent 7bc6968 commit a01ba75
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 19 deletions.
4 changes: 0 additions & 4 deletions docs/gen-ai/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand All @@ -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
13 changes: 4 additions & 9 deletions docs/gen-ai/llm-spans.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.

<!-- semconv gen_ai.choice -->
<!-- NOTE: THIS TEXT IS AUTOGENERATED. DO NOT EDIT BY HAND. -->
<!-- see templates/registry/markdown/snippet.md.j2 -->
Expand Down Expand Up @@ -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

Expand Down
6 changes: 0 additions & 6 deletions model/trace/gen-ai.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit a01ba75

Please sign in to comment.