From d3a09c3f725cb99af2fe3dd42568f43473f181f6 Mon Sep 17 00:00:00 2001 From: Liudmila Molkova Date: Thu, 10 Oct 2024 18:55:20 -0700 Subject: [PATCH] up --- docs/gen-ai/gen-ai-events.md | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/docs/gen-ai/gen-ai-events.md b/docs/gen-ai/gen-ai-events.md index 0788d71c27..2b93c9ea81 100644 --- a/docs/gen-ai/gen-ai-events.md +++ b/docs/gen-ai/gen-ai-events.md @@ -103,7 +103,7 @@ The event name MUST be `gen_ai.system.message`. | Body Field | Type | Description | Examples | Requirement Level | |---|---|---|---|---| | `role` | string | The actual role of the message author as passed in the message. | `"system"`, `"instructions"` | `Conditionally Required`: if available and not equal to `system` | -| `content` | `AnyValue` | The contents of the system message. | `"You're a friendly bot that answers questions about OpenTelemetry."` | `Opt-In` | +| `content` | `AnyValue` | The contents of the system message. | `"You're a helpful bot"` | `Opt-In` | ## User event @@ -114,7 +114,7 @@ The event name MUST be `gen_ai.user.message`. | Body Field | Type | Description | Examples | Requirement Level | |---|---|---|---|---| | `role` | string | The actual role of the message author as passed in the message. | `"user"`, `"customer"` | `Conditionally Required`: if available and if not equal to `user` | -| `content` | `AnyValue` | The contents of the user message. | `What telemetry is reported by OpenAI instrumentations?` | `Opt-In` | +| `content` | `AnyValue` | The contents of the user message. | `What's the weather in Paris` | `Opt-In` | ## Assistant event @@ -125,8 +125,8 @@ The event name MUST be `gen_ai.assistant.message`. | Body Field | Type | Description | Examples | [Requirement Level](https://opentelemetry.io/docs/specs/semconv/general/attribute-requirement-level/) | |--------------|--------------------------------|----------------------------------------|-------------------------------------------------|-------------------| | `role` | string | The actual role of the message author as passed in the message. | `"assistant"`, `"bot"` | `Conditionally Required`: if available and if not equal to `assistant` | -| `content` | `AnyValue` | The contents of the assistant message. | `Spans, events, metrics defined by the GenAI semantic conventions.` | `Opt-In` | -| `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 | +| `content` | `AnyValue` | The contents of the assistant message. | `The weather in Paris is rainy and overcast, with temperatures around 57°F` | `Opt-In` | +| `tool_calls` | [ToolCall](#toolcall-object)[] | The tool calls generated by the model, such as function calls. | `[{"id":"call_mszuSIzqtI65i1wAUOE8w5H4", "function":{"name":"get_weather", "arguments":{"location":"Paris"}}, "type":"function"}]` | `Conditionally Required`: if available | ### `ToolCall` object @@ -134,14 +134,14 @@ The event name MUST be `gen_ai.assistant.message`. |------------|-----------------------------|------------------------------------|-------------------------------------------------|-------------------| | `id` | string | The id of the tool call | `call_mszuSIzqtI65i1wAUOE8w5H4` | `Required` | | `type` | string | The type of the tool | `function` | `Required` | -| `function` | [Function](#function-object)| The function that the model called | `{"name":"get_link_to_otel_semconv", "arguments":{"semconv":"gen_ai"}}` | `Required` | +| `function` | [Function](#function-object)| The function that the model called | `{"name":"get_weather", "arguments":{"location":"Paris"}}` | `Required` | ### `Function` object | Body Field | Type | Description | Examples | [Requirement Level](https://opentelemetry.io/docs/specs/semconv/general/attribute-requirement-level/) | |-------------|------------|----------------------------------------|----------------------------|-------------------| -| `name` | string | The name of the function to call | `get_link_to_otel_semconv` | `Required` | -| `arguments` | `AnyValue` | The arguments to pass the the function | `{"semconv": "gen_ai"}` | `Opt-In` | +| `name` | string | The name of the function to call | `get_weather` | `Required` | +| `arguments` | `AnyValue` | The arguments to pass the the function | `{"location": "Paris"}` | `Opt-In` | ## Tool event @@ -152,7 +152,7 @@ The event name MUST be `gen_ai.tool.message`. | Body Field | Type | Description | Examples | [Requirement Level](https://opentelemetry.io/docs/specs/semconv/general/attribute-requirement-level/) | |----------------|--------|-----------------------------------------------|---------------------------------|-------------------| | `role` | string | The actual role of the message author as passed in the message. | `"tool"`, `"function"` | `Conditionally Required`: if available and if not equal to `tool` | -| `content` | AnyValue | The contents of the tool message. | `opentelemetry.io` | `Opt-In` | +| `content` | AnyValue | The contents of the tool message. | `rainy, 57°F` | `Opt-In` | | `id` | string | Tool call that this message is responding to. | `call_mszuSIzqtI65i1wAUOE8w5H4` | `Required` | ## Choice event @@ -171,15 +171,15 @@ Choice event body has the following fields: |-----------------|----------------------------|-------------------------------------------------|----------------------------------------|-------------------| | `finish_reason` | string | The reason the model stopped generating tokens. | `stop`, `tool_calls`, `content_filter` | `Required` | | `index` | int | The index of the choice in the list of choices. | `1` | `Required` | -| `message` | [Message](#message-object) | GenAI response message | `{"content":"The OpenAI semantic conventions are available at opentelemetry.io"}` | `Recommended` | +| `message` | [Message](#message-object) | GenAI response message | `{"content":"The weather in Paris is rainy and overcast, with temperatures around 57°F"}` | `Recommended` | ### `Message` object | Body Field | Type | Description | Examples | [Requirement Level](https://opentelemetry.io/docs/specs/semconv/general/attribute-requirement-level/) | |----------------|--------------------------------|-----------------------------------------------|---------------------------------|-------------------| | `role` | string | The actual role of the message author as passed in the message. | `"assistant"`, `"bot"` | `Conditionally Required`: if available and if not equal to `assistant` | -| `content` | `AnyValue` | The contents of the assistant message. | `Spans, events, metrics defined by the GenAI semantic conventions.` | `Opt-In` | -| `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 | +| `content` | `AnyValue` | The contents of the assistant message. | `The weather in Paris is rainy and overcast, with temperatures around 57°F` | `Opt-In` | +| `tool_calls` | [ToolCall](#toolcall-object)[] | The tool calls generated by the model, such as function calls. | `[{"id":"call_mszuSIzqtI65i1wAUOE8w5H4", "function":{"name":"get_weather", "arguments":{"location":"Paris"}}, "type":"function"}]` | `Conditionally Required`: if available | ## Custom events