generation_info={'finish_reason': 'stop', 'logprobs': None})], [Generation(text='\n\nTechCore Solutions.', generation_info={'finish_reason': 'stop', 'logprobs': None})], [Generation(text='\n\nFootwear Factory.', generation_info={'finish_reason': 'stop', 'logprobs': None})]], llm_output={'token_usage': {'prompt_tokens': 36, 'total_tokens': 55, 'completion_tokens': 19}, 'model_name': 'text-davinci-003'})predict is similar to run method except that the input keys are specified as keyword arguments instead of a Python dict.# Single input examplellm_chain.predict(product="colorful socks")    '\n\nSocktastic!'# Multiple inputs exampletemplate = """Tell me a {adjective} joke about {subject}."""prompt = PromptTemplate(template=template, input_variables=["adjective", "subject"])llm_chain = LLMChain(prompt=prompt, llm=OpenAI(temperature=0))llm_chain.predict(adjective="sad", subject="ducks")    '\n\nQ: What did the duck say when his friend died?\nA: Quack, quack, goodbye.'Parsing the outputs‚ÄãBy default, LLMChain does not parse the output even if the underlying prompt object has an output parser. If you would like to apply that output parser on the LLM output, use predict_and_parse instead of predict and apply_and_parse instead of apply.With predict:from langchain.output_parsers import CommaSeparatedListOutputParseroutput_parser = CommaSeparatedListOutputParser()template = """List all the colors in a rainbow"""prompt = PromptTemplate(template=template, input_variables=[], output_parser=output_parser)llm_chain = LLMChain(prompt=prompt, llm=llm)llm_chain.predict()    '\n\nRed, orange, yellow, green, blue, indigo, violet'With predict_and_parse:llm_chain.predict_and_parse()    ['Red', 'orange', 'yellow', 'green', 'blue', 'indigo', 'violet']Initialize from string‚ÄãYou can also construct an LLMChain from a string template directly.template = """Tell me a {adjective} joke about {subject}."""llm_chain = LLMChain.from_string(llm=llm,
An LLMChain is a simple chain that adds some functionality around language models. It is used widely throughout LangChain, including in other chains and agents.
An LLMChain is a simple chain that adds some functionality around language models. It is used widely throughout LangChain, including in other chains and agents. ->: generation_info={'finish_reason': 'stop', 'logprobs': None})], [Generation(text='\n\nTechCore Solutions.', generation_info={'finish_reason': 'stop', 'logprobs': None})], [Generation(text='\n\nFootwear Factory.', generation_info={'finish_reason': 'stop', 'logprobs': None})]], llm_output={'token_usage': {'prompt_tokens': 36, 'total_tokens': 55, 'completion_tokens': 19}, 'model_name': 'text-davinci-003'})predict is similar to run method except that the input keys are specified as keyword arguments instead of a Python dict.# Single input examplellm_chain.predict(product="colorful socks")    '\n\nSocktastic!'# Multiple inputs exampletemplate = """Tell me a {adjective} joke about {subject}."""prompt = PromptTemplate(template=template, input_variables=["adjective", "subject"])llm_chain = LLMChain(prompt=prompt, llm=OpenAI(temperature=0))llm_chain.predict(adjective="sad", subject="ducks")    '\n\nQ: What did the duck say when his friend died?\nA: Quack, quack, goodbye.'Parsing the outputs‚ÄãBy default, LLMChain does not parse the output even if the underlying prompt object has an output parser. If you would like to apply that output parser on the LLM output, use predict_and_parse instead of predict and apply_and_parse instead of apply.With predict:from langchain.output_parsers import CommaSeparatedListOutputParseroutput_parser = CommaSeparatedListOutputParser()template = """List all the colors in a rainbow"""prompt = PromptTemplate(template=template, input_variables=[], output_parser=output_parser)llm_chain = LLMChain(prompt=prompt, llm=llm)llm_chain.predict()    '\n\nRed, orange, yellow, green, blue, indigo, violet'With predict_and_parse:llm_chain.predict_and_parse()    ['Red', 'orange', 'yellow', 'green', 'blue', 'indigo', 'violet']Initialize from string‚ÄãYou can also construct an LLMChain from a string template directly.template = """Tell me a {adjective} joke about {subject}."""llm_chain = LLMChain.from_string(llm=llm,