Maximilian: So we can chat with Ollama.
That's pretty straightforward.
There are two important features about this chat,
which I wanna highlight here.
One is related to multi-line messages,
because right now, if I type something here, like Hi,
and I then want to enter a new line to structure my input,
for example, if I hit Enter, I just sent this as a message,
which might not always be what I wanna do.
So in order to send multi-line messages,
you can and should use triple double quotes.
Then if you hit Enter, you don't send a message,
but you enter a new line.
So here I could now write a message like this,
and you then end with triple double quotes again.
So opening and closing triple double quotes
and in between, your multi-line message.
And this will then send the message.
So that's one important thing.
What's also important
is that when dealing with a vision model,
which Gemma3 is,
you can, of course, not just use it to handle text input,
but also image input.
Gemma3 models and a couple of other models as well
are able to extract information from images.
Now, you can, of course,
use Ollama programmatically to send images to it,
and that is something we'll explore later in this section,
but you can also use an image here in the chat.
And to do that,
all you have to do is type your prompt
like what's on this image,
and then separate it with a space,
you provide a path to that image.
In my case, it's a image called max.jpg,
which sits in the same folder as I'm currently in.
So I provide a relative path
to that image, starting with ./.
You could also have an absolute path here
to the image that might be stored somewhere else
on your system.
And now, if I sent this,
Ollama detects that I added an image to the prompt.
And for it to detect that,
your image path must come last after your prompt.
The order is important.
And it now sent this image, along with my prompt to Ollama.
And therefore, here, I get a nice output
describing what's on the image,
that it's a man in a recording setup
and that there is a thumbs-up gesture.
And that is correct
because this here is the image I sent to Ollama.
It's this max.jpg file.
So if you are working with a multimodal model
like the Gemma3 model,
which is not just capable of handling text, but also images,
you can send both to it.
It's just the order that's important.