Skip to content

Commit 3cf34b1

Browse files
authored
[feat] Add support for processing and uploading multimodal messages (#94)
2 parents 75bf5f3 + 6b380fa commit 3cf34b1

26 files changed

+7665
-2997
lines changed

util/opentelemetry-util-genai/CHANGELOG-loongsuite.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,4 +7,5 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
77

88
## Unreleased
99

10-
- Add support for memory operations. ([#83](https://github.com/alibaba/loongsuite-python-agent/pull/83))
10+
- Add multimodal separation and upload support for GenAI utils. ([#94](https://github.com/alibaba/loongsuite-python-agent/pull/94))
11+
- Add support for memory operations. ([#83](https://github.com/alibaba/loongsuite-python-agent/pull/83))

util/opentelemetry-util-genai/pyproject.toml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,7 @@ upload = "opentelemetry.util.genai._upload:upload_completion_hook"
3636
[project.optional-dependencies]
3737
test = ["pytest>=7.0.0"]
3838
upload = ["fsspec>=2025.9.0"]
39+
multimodal_upload = ["httpx", "fsspec>=2025.9.0", "numpy", "soundfile"]
3940

4041
[project.urls]
4142
Homepage = "https://github.com/open-telemetry/opentelemetry-python-contrib/tree/main/util/opentelemetry-util-genai"

util/opentelemetry-util-genai/src/opentelemetry/util/genai/_extended_semconv/gen_ai_extended_attributes.py

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -114,6 +114,16 @@
114114
Note: This is an Attribute, distinct from OpenTelemetry's Span kind field.
115115
"""
116116

117+
GEN_AI_INPUT_MULTIMODAL_METADATA: Final = "gen_ai.input.multimodal_metadata"
118+
"""
119+
The multimodal metadata of the input messages.
120+
"""
121+
122+
GEN_AI_OUTPUT_MULTIMODAL_METADATA: Final = "gen_ai.output.multimodal_metadata"
123+
"""
124+
The multimodal metadata of the output messages.
125+
"""
126+
117127

118128
class GenAiSpanKindValues(Enum):
119129
AGENT = "AGENT"

0 commit comments

Comments
 (0)