Here is my code: from langchain_core.prompts import ChatPromptTemplate from langchain_ollama import ChatOllama from langchain_core.output_parsers import StrOutputParser llm = ChatOllama( model = 'llama3.2', temperature = 0 ) chat_template = ChatPromptTemplate.from_messages( [ ('system', "you have to give two line definition of the word given by user"), ('human', 'the word is {user_input}') ] ) message = chat_template.format_messages(user_input =...
Originally asked by Dhruva Kumar on Stack Exchange (stackoverflow) (CC BY-SA 4.0).