-
Notifications
You must be signed in to change notification settings - Fork 8
WIP | Add input and output versioning schema docs #225
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change | ||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| @@ -0,0 +1,306 @@ | ||||||||||||||
| # A365 Input/Output Message Schema Examples | ||||||||||||||
|
|
||||||||||||||
| > **A365 Schema Version:** 1.0.0 | **Based on OTel Semconv:** v1.40.0 | ||||||||||||||
|
|
||||||||||||||
| --- | ||||||||||||||
|
|
||||||||||||||
| ## Input Message Examples (`gen_ai.input.messages`) | ||||||||||||||
|
|
||||||||||||||
| ### Simple — Text Chat | ||||||||||||||
|
|
||||||||||||||
| ```json | ||||||||||||||
| [ | ||||||||||||||
| { | ||||||||||||||
| "role": "system", | ||||||||||||||
| "parts": [ | ||||||||||||||
| { "type": "text", "content": "You are a helpful assistant." } | ||||||||||||||
| ] | ||||||||||||||
| }, | ||||||||||||||
| { | ||||||||||||||
| "role": "user", | ||||||||||||||
| "parts": [ | ||||||||||||||
| { "type": "text", "content": "What meetings do I have today?" } | ||||||||||||||
| ] | ||||||||||||||
| } | ||||||||||||||
| ] | ||||||||||||||
| ``` | ||||||||||||||
|
|
||||||||||||||
| ### Complex — All Input Part Types | ||||||||||||||
|
|
||||||||||||||
| A multi-turn conversation demonstrating every input part type: text, tool_call (from prior assistant turn), tool_call_response, server_tool_call, server_tool_call_response, blob, file, uri, reasoning, and a custom generic part. | ||||||||||||||
|
|
||||||||||||||
| ```json | ||||||||||||||
| [ | ||||||||||||||
| { | ||||||||||||||
| "role": "system", | ||||||||||||||
| "parts": [ | ||||||||||||||
| { "type": "text", "content": "You are a project assistant with access to tools, files, and images." } | ||||||||||||||
| ], | ||||||||||||||
| "name": "OrchestratorAgent" | ||||||||||||||
| }, | ||||||||||||||
| { | ||||||||||||||
| "role": "user", | ||||||||||||||
| "parts": [ | ||||||||||||||
| { "type": "text", "content": "Summarize the attached document, check the weather in Seattle, and describe the whiteboard photo." }, | ||||||||||||||
| { | ||||||||||||||
| "type": "file", | ||||||||||||||
| "modality": "image", | ||||||||||||||
| "mime_type": "application/pdf", | ||||||||||||||
| "file_id": "file-report-q1-2026" | ||||||||||||||
| }, | ||||||||||||||
| { | ||||||||||||||
| "type": "uri", | ||||||||||||||
| "modality": "image", | ||||||||||||||
| "mime_type": "image/png", | ||||||||||||||
| "uri": "https://sharepoint.com/sites/team/whiteboard-photo.png" | ||||||||||||||
| }, | ||||||||||||||
| { | ||||||||||||||
| "type": "blob", | ||||||||||||||
| "modality": "audio", | ||||||||||||||
| "mime_type": "audio/wav", | ||||||||||||||
| "content": "/9j/4AAQSkZJRg..." | ||||||||||||||
|
||||||||||||||
| "content": "/9j/4AAQSkZJRg..." | |
| "content": "UklGRiQAAABXQVZFZm10IBAAAAABAAEAIlYAAESsAAACABAAZGF0YQAA..." |
Copilot
AI
Mar 25, 2026
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This section claims the JSON demonstrates “every output part type” and includes “a custom generic part”, but the example shown does not include tool_call_response, file, or any custom GenericPart instance. Either adjust the claim/header, or extend the example to actually include the missing part types.
| ### Complex — All Output Part Types | |
| A response demonstrating every output part type: reasoning, text, tool_call, server_tool_call with response, and a custom generic part. Also shows multiple finish reasons. | |
| ### Complex — Multiple Output Part Types | |
| A response demonstrating several output part types: reasoning, text, server_tool_call with response, and image content as both blob and URI. |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,51 @@ | ||
| # A365 Observability Input/Output Message Schema Versions | ||
|
|
||
| ## Current Version | ||
|
|
||
| | Field | Value | | ||
| |---|---| | ||
| | **A365 Schema Version** | 1.0.0 | | ||
| | **OTel Semconv Baseline** | [v1.40.0](https://github.com/open-telemetry/semantic-conventions/tree/v1.40.0) | | ||
| | **OTel Semconv Commit** | [`30003a993`](https://github.com/open-telemetry/semantic-conventions/commit/30003a9937eb7bcde6984877149055278405e03c) | | ||
|
|
||
| ## Schema Files | ||
|
|
||
| | File | Span Attribute | Description | | ||
| |---|---|---| | ||
| | [a365-input-messages.json](a365-input-messages.json) | `gen_ai.input.messages` | Chat history sent to the model | | ||
| | [a365-output-messages.json](a365-output-messages.json) | `gen_ai.output.messages` | Model response (choices/candidates) | | ||
|
|
||
| ## OTel Semconv Compatibility Matrix | ||
|
|
||
| | A365 Schema Version | Based on OTel Semconv | Part Types | Notes | | ||
| |---|---|---|---| | ||
| | 1.0.0 | v1.40.0 | 10 (all OTel types) | Initial release. Includes ServerToolCall parts added in v1.40.0 | | ||
|
|
||
| ### OTel Input/Output Schema Change History (for reference) | ||
|
|
||
| | OTel Semconv | File SHA (input) | Changes from Previous | | ||
| |---|---|---| | ||
| | v1.36.0 | — | Schema files did not exist | | ||
| | v1.37.0 | `22910f30` | **Schema introduced.** 4 part types: Text, ToolCallRequest, ToolCallResponse, Generic. No `name` field. | | ||
| | v1.38.0 | `5fbd431f` | **Major expansion.** Added Blob, File, Uri, Reasoning parts. Added Modality enum. Added `name` field to ChatMessage. | | ||
| | v1.39.0 | `5fbd431f` | No changes (identical to v1.38.0) | | ||
| | v1.40.0 | `5585531c` | Added ServerToolCallPart, ServerToolCallResponsePart. Minor wording fix. | | ||
|
|
||
| ## Applicable Scopes | ||
|
|
||
| | A365 Scope | Uses This Schema? | Notes | | ||
| |---|---|---| | ||
| | `InvokeAgentScope` | ✅ | Full conversation context | | ||
| | `InferenceScope` | ✅ | Chat history + model response | | ||
| | `OutputScope` | ✅ | Outgoing messages to user | | ||
| | `ExecuteToolScope` | ❌ | Uses `gen_ai.tool.*` attributes instead | | ||
|
Comment on lines
+36
to
+41
|
||
|
|
||
| ## Changelog | ||
|
|
||
| ### 1.0.0 | ||
|
|
||
| - Initial A365 input/output message schema | ||
| - Profiles OTel GenAI semconv v1.40.0 input/output messages format | ||
| - Supports all OTel part types: TextPart, ToolCallRequestPart, ToolCallResponsePart, ServerToolCallPart, ServerToolCallResponsePart, BlobPart, FilePart, UriPart, ReasoningPart, GenericPart | ||
| - All objects allow `additionalProperties` for future A365-specific extensions | ||
| - Custom A365 part types can be added via `GenericPart` using `microsoft.a365.*` type prefix | ||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This example sets
modalitytoimagewhilemime_typeisapplication/pdf. That combination is confusing for readers and doesn’t match the modality meaning in the schema description; consider changing modality to a more appropriate value (or update the example to use an actual image MIME type).