From cfb1ddd6fc2a5ca755f02add26239781c77c2199 Mon Sep 17 00:00:00 2001 From: Simon Schampijer <3714785+erikos@users.noreply.github.com> Date: Mon, 25 Nov 2024 01:06:22 +0100 Subject: [PATCH] examples: update langchain-python-simple (#3591) - better formatting of input prompt - use invoke instead of predict --- examples/langchain-python-simple/main.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/examples/langchain-python-simple/main.py b/examples/langchain-python-simple/main.py index 8d6989c8..dafff827 100644 --- a/examples/langchain-python-simple/main.py +++ b/examples/langchain-python-simple/main.py @@ -1,6 +1,6 @@ from langchain.llms import Ollama -input = input("What is your question?") +input = input("What is your question?\n> ") llm = Ollama(model="llama3.2") -res = llm.predict(input) +res = llm.invoke(input) print (res)