This function creates an interactive system to generate JSON schemas based on user descriptions. It supports multi-turn conversations until the user is satisfied with the generated schema.
generate_json_schema(
description,
llm_client,
max_iterations = 5,
interactive = TRUE,
verbose = TRUE
)A list containing the final JSON schema and conversation history
Initial description of the desired JSON structure
The LLM provider object (from llm_openai or llm_ollama)
Maximum number of refinement iterations (default: 5)
Whether to run in interactive mode (default: TRUE)
Whether to show detailed conversation logs (default: TRUE)
Zaoqu Liu; Email: liuzaoqu@163.com