The bytes of UTF-8 that the content attributes of `span` that can be reduced hold.
(span: ReadableSpan)
| 277 | |
| 278 | |
| 279 | def content_size(span: ReadableSpan) -> int: |
| 280 | """The bytes of UTF-8 that the content attributes of `span` that can be reduced hold.""" |
| 281 | names = ("gen_ai.input.messages", "gen_ai.output.messages", "gen_ai.system_instructions") |
| 282 | return sum(utf8_size(attributes(span).get(name, "")) for name in names) |
| 283 | |
| 284 | |
| 285 | SYSTEM: Final = "gen_ai.system_instructions" |
no test coverage detected