DotPrompt.Compiler.ResponseCollector (anantha_dot_prompt v1.1.0)

Copy Markdown

Collects response blocks from AST and derives schema.

Summary

Functions

Collects all response blocks from the AST body. Returns a list of {content, line} tuples.

Compares multiple response schemas. Also identifies if they are chemically identical (same JSON source) or functionally identical (same structural schema but different source).

Derives a schema map from a JSON string. Returns a full JSON schema object.

Functions

collect_response_blocks(nodes)

Collects all response blocks from the AST body. Returns a list of {content, line} tuples.

compare_schemas(schemas)

Compares multiple response schemas. Also identifies if they are chemically identical (same JSON source) or functionally identical (same structural schema but different source).

derive_schema(json_string)

Derives a schema map from a JSON string. Returns a full JSON schema object.