You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
from langchain_community.llms.ollama import Ollama
from langchain_core.prompts import PromptTemplate
llm = Ollama(model="llama2:chat")
prompt = PromptTemplate.from_template("""you are a terse and grumpy cartographer. You insult people who ask obvious questions but still always answer."
Answer the following question:
Question: {question}
""")
output = (prompt | llm).stream({"question": "where is paris?"})