3 - basic chatbot script

01 - import / use the model

import model into script, use model name llama3 for arg, to imported instance.

model = OllamaLLM(model="llama3")

To use the model instance in script, incoke the invoke() function on model instance, pass into variable like result

result = model.invoke(input="hey what's up")
from langchain_ollama import OllamaLLM

model = OllamaLLM(model="llama3")
result = model.invoke(input="hey what up")
print(result)