common

package
v0.7.0-rc.2 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jun 14, 2026 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

View Source
const (
	MetadataDisplayName            = "display_name" // legacy fallback
	MetadataConsoleDisplayName     = "aibrix.console.display_name"
	MetadataConsoleCreatedBy       = "aibrix.console.created_by"
	MetadataConsoleTemplateName    = "aibrix.console.template_name"
	MetadataConsoleTemplateVersion = "aibrix.console.template_version"
	BatchExtraBodyField            = "extra_body"
	AIBrixExtraBodyField           = "aibrix"
	JsonNullLiteral                = "null"
)

Console-owned fields we stash on the OpenAI batch.metadata map. Namespaced to keep them out of user-supplied metadata's key space. The bare "display_name" key is kept for backwards compatibility with batches created by older console builds.

Variables

This section is empty.

Functions

func InjectExtraBodyToBatch

func InjectExtraBodyToBatch(batch *openai.Batch, extraBody json.RawMessage) *openai.Batch

InjectExtraBodyToBatch injects AIBrixExtraBody into the batch's raw JSON. The extraBody parameter is the raw AIBrixExtraBody JSON, which will be wrapped under extra_body.aibrix in the batch. Uses fast path (direct byte manipulation) when possible, falls back to map-based approach.

func ParseBatchExtraBody

func ParseBatchExtraBody(b *openai.Batch) map[string]json.RawMessage

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL