QuestionQ50

VerifiedApplication Development

A Generative AI Engineer is testing a basic prompt template in LangChain with the code below but receives an error.

Question Image

Assuming the API key is correctly defined, what change must the Generative AI Engineer make to fix the chain?

Explanation

An LLMChain must be constructed with a language-model instance as well as its prompt. Passing llm=OpenAI() provides the required model, and generate() can receive a list of input dictionaries whose adjective value fills the prompt template.

Community Discussion

No comments yet. Be the first to start the discussion!