You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Optionally, `Tools=functions` can be used to provide function specifications to the API. The purpose of this is to enable models to generate function arguments which adhere to the provided specifications.
Copy file name to clipboardExpand all lines: doc/Ollama.md
+18Lines changed: 18 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -96,6 +96,24 @@ txt = generate(chat,"What is Model-Based Design and how is it related to Digital
96
96
% Should stream the response token by token
97
97
```
98
98
99
+
## Understanding the content of an image
100
+
101
+
You can use multimodal models like `llava` to experiment with image understanding.
102
+
103
+
> [!TIP]
104
+
> Many models available for Ollama allow you to include images in the prompt, even if the model does not support image inputs. In that case, the images are silently removed from the input. This can result in unexpected outputs.
105
+
106
+
107
+
```matlab
108
+
chat = ollamaChat("llava");
109
+
image_path = "peppers.png";
110
+
messages = messageHistory;
111
+
messages = addUserMessageWithImages(messages,"What is in the image?",image_path);
testCase.assumeTrue(isenv("AZURE_OPENAI_API_KEY"),"end-to-end test requires environment variables AZURE_OPENAI_API_KEY, AZURE_OPENAI_ENDPOINT, and AZURE_OPENAI_DEPLOYMENT.");
@@ -65,6 +85,15 @@ function doReturnErrors(testCase)
testCase.assumeTrue(isenv("AZURE_OPENAI_API_KEY"),"end-to-end test requires environment variables AZURE_OPENAI_API_KEY, AZURE_OPENAI_ENDPOINT, and AZURE_OPENAI_DEPLOYMENT.");
0 commit comments