Module: OpenAI::Helpers::StructuredOutput

Defined in:
lib/openai/helpers/structured_output.rb,
lib/openai/helpers/structured_output/boolean.rb,
lib/openai/helpers/structured_output/enum_of.rb,
lib/openai/helpers/structured_output/array_of.rb,
lib/openai/helpers/structured_output/union_of.rb,
lib/openai/helpers/structured_output/base_model.rb,
lib/openai/helpers/structured_output/parsed_json.rb,
lib/openai/helpers/structured_output/response_parser.rb,
lib/openai/helpers/structured_output/json_schema_converter.rb,
lib/openai/helpers/structured_output/chat_completion_parser.rb,
sig/openai/helpers/structured_output/response_parser.rbs,
sig/openai/helpers/structured_output/chat_completion_parser.rbs

Overview

Helpers for the structured output API.

see https://platform.openai.com/docs/guides/structured-outputs see https://json-schema.org

Based on the DSL in Internal::Type, but currently only support the limited subset of JSON schema types used in structured output APIs.

Supported types: NilClass String Symbol Integer Float Boolean, EnumOf, UnionOf, ArrayOf, BaseModel

Defined Under Namespace

Modules: ChatCompletionParser, JsonSchemaConverter, ResponseParser Classes: ArrayOf, BaseModel, Boolean, EnumOf, ParsedJson, UnionOf