Skip to content
1 min read · 115 words

@nhtio/adk/batteries/llm/openai_chat_completions/validation

Runtime validation schema and wrapper for OpenAI Chat Completions adapter options.

Remarks

Schema and call-site wrapper for validating OpenAIChatCompletionsAdapterOptions. Used at construction time and at the start of every iteration against the merged options shape (stash > executor > constructor). Throws E_INVALID_OPENAI_CHAT_COMPLETIONS_OPTIONS on failure — same hard-fail policy as every other ADK contract.

Variables

VariableDescription
openAIChatCompletionsOptionsSchemaValidator schema for OpenAIChatCompletionsAdapterOptions.

Functions

FunctionDescription
validateOptionsValidates an arbitrary input against openAIChatCompletionsOptionsSchema and returns the resolved options shape. Throws E_INVALID_OPENAI_CHAT_COMPLETIONS_OPTIONS (carrying the validator's error report on cause) on failure.