Run LLM-generated code to transform data to another format
generate_code()
function, along with a prompt for the LLM:
generate_code(sample_data)
in main()
. We’ll only send a few rows of our CSV data to the LLM, because that’s all it needs to understand the shape of the data:
run_code()
, that calls the Riza Execute Function API:
main()
function to run the generated code, and print the resulting JSON: