Hi, I'm going through the new
lm-format-enforcer
readme:
https://docs.llamaindex.ai/en/stable/community/integrations/lmformatenforcer.html#lm-format-enforcer . When defining a
program
how do I pass in my list of
Node
or
Document
objects so the program runs in the context of my data? I would have expected that I can pass in
nodes
in here:
nodes = node_parser.get_nodes_from_documents(documents) # existing setup
program = LMFormatEnforcerPydanticProgram(
output_cls=Album,
prompt_template_str="Generate an example album, with an artist and a list of songs. Using the movie {movie_name} as inspiration. You must answer according to the following schema: \n{json_schema}\n",
llm=LlamaCPP(),
verbose=True,
)