mirror of
https://github.com/dogkeeper886/ollama37.git
synced 2025-12-10 15:57:04 +00:00
examples: update langchain-python-simple (#3591)
- better formatting of input prompt - use invoke instead of predict
This commit is contained in:
@@ -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)
|
||||||
|
|||||||
Reference in New Issue
Block a user