BuilderHelper

Functions

Link copied to clipboard
fun assertMetadata(metadata: Map<String, String>)

Asserts the given metadata map contains valid key-value pairs (see assertMetadata), and that the map has <= 16 key-value pairs.

fun assertMetadata(key: String, value: String)

Asserts the given metadata key-value pair is valid, and can be sent to the OpenAI API.

Link copied to clipboard
fun tryAddMetadata(metadata: Map<String, String>)

Throws an exception if no more metadata can be added to the given map.

Properties

Link copied to clipboard
Link copied to clipboard
const val MAX_METADATA_SIZE: Int = 16
Link copied to clipboard