Crate kind_openai_schema

Source
Expand description

A procedural macro for deriving an OpenAI-compatible JSON schema for a Rust struct.

Structs§

GeneratedOpenAISchema
An OpenAI-compatible JSON schema produced by the OpenAI schema derive macro.

Traits§

OpenAISchema
Any type that can be used as a structured chat completion.
SubordinateOpenAISchema
A subordinate type that can be used as a field in an OpenAI schema but not as the schema itself. (enums and eventually structs when supported using $ref). This is still derived by OpenAISchema, so for all intents and purposes you can pretend that this type doesn’t exist.

Derive Macros§

OpenAISchema
Places an associated function on a struct that returns an &'static str containing its OpenAI-compatible JSON schema.