Skip to content

Commit ae55fa7

Browse files
committed
Update Readme.
1 parent 176e377 commit ae55fa7

File tree

1 file changed

+9
-6
lines changed

1 file changed

+9
-6
lines changed

Diff for: README.md

+9-6
Original file line numberDiff line numberDiff line change
@@ -285,12 +285,13 @@ Multiple images can be included using the `ollama::images` container.
285285
286286
```C++
287287
ollama::image image = ollama::image::from_file("llama.jpg");
288-
ollama::image base64_image = ollama::image::from_base64_string("iVBORw0KGgoAAAANSUhEUgAAAAoAAAAKCAYAAACNMs+9AAAAFUlEQVR42mNkYPhfz0AEYBxVSF+FAP5FDvcfRYWgAAAAAElFTkSuQmCC");
288+
ollama::image image2 = ollama::image::from_file("another_llama.jpg");
289289
290290
// Include a list of images here
291-
ollama::images images={image, base64_image};
291+
ollama::images images={image, image2};
292292
293-
ollama::response response = ollama::generate("llava", "What do you see in this image?", options, images);
293+
ollama::response response =
294+
ollama::generate("llava", "What do you see in these images?", options, images);
294295
```
295296

296297
### Basic Chat Generation
@@ -326,7 +327,7 @@ You can use a collection of messages in a chat. This allows chain-of-thought pro
326327
327328
```C++
328329
ollama::message message1("user", "What are nimbus clouds?");
329-
ollama::message message2("assistant", "Nimbus clouds are dense, moisture-filled clouds that produce rain.");
330+
ollama::message message2("assistant", "Nimbus clouds are dark rain clouds.");
330331
ollama::message message3("user", "What are some other kinds of clouds?");
331332
332333
ollama::messages messages = {message1, message2, message3};
@@ -359,7 +360,8 @@ The `ollama::message` class can contain an arbitrary number of `ollama::image` o
359360
```C++
360361
ollama::image image = ollama::image::from_file("llama.jpg");
361362
362-
// We can optionally include images with each message. Vision-enabled models will be able to utilize these.
363+
// We can optionally include images with each message.
364+
//Vision-enabled models will be able to utilize these.
363365
ollama::message message_with_image("user", "What do you see in this image?", image);
364366
ollama::response response = ollama::chat("llava", message_with_image);
365367
```
@@ -376,7 +378,8 @@ Like any other generative function, options can be included during generation.
376378
ollama::options options;
377379
options["num_predict"] = 20;
378380

379-
ollama::response response = ollama::generate_embeddings("llama3:8b", "Why is the sky blue?", options);
381+
ollama::response response =
382+
ollama::generate_embeddings("llama3:8b", "Why is the sky blue?", options);
380383
```
381384
382385
### Debug Information

0 commit comments

Comments
 (0)