OpenAIMetadata

@Serializable
value class OpenAIMetadata

Metadata attached to an OpenAI request.

OpenAI enforces strict constraints on metadata: at most 16 key-value pairs, keys up to 64 characters, and values up to 512 characters. Use create to build an instance with validation.

For providers with different (or no) constraints, use create with ignoreConstrains = true. Note that sending metadata that violates OpenAI's limits may result in an error from the API.

Types

Link copied to clipboard
object Companion

Properties

Link copied to clipboard

The underlying key-value map.