ServiceContext.from_defaults(llm=langchain_llm)
guidance_llm=OpenAI()
with langchain llm?program = GuidancePydanticProgram( 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" ), guidance_llm=OpenAI("text-davinci-003"), verbose=True, )
ServiceContext.from_defaults(llm=langchain_llm)
and remove the guidance_llm arg?from llama_index.llms import LangChainLLM llm = LangChainLLM(lc_llm) program = LMFormatEnforcerPydanticProgram( output_cls=Album, prompt_template_str=( "Your response should be according to the following json schema: \n" "{json_schema}\n" "Generate an example album, with an artist and a list of songs. Using" " the movie {movie_name} as inspiration. " ), llm=llm, verbose=True, )