examples: update langchain-python-simple (#3591)
- better formatting of input prompt - use invoke instead of predict
This commit is contained in:
parent
3987acd7ec
commit
cfb1ddd6fc
1 changed files with 2 additions and 2 deletions
|
@ -1,6 +1,6 @@
|
||||||
from langchain.llms import Ollama
|
from langchain.llms import Ollama
|
||||||
|
|
||||||
input = input("What is your question?")
|
input = input("What is your question?\n> ")
|
||||||
llm = Ollama(model="llama3.2")
|
llm = Ollama(model="llama3.2")
|
||||||
res = llm.predict(input)
|
res = llm.invoke(input)
|
||||||
print (res)
|
print (res)
|
||||||
|
|
Loading…
Reference in a new issue