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
Copy file name to clipboardExpand all lines: README.md
+1
Original file line number
Diff line number
Diff line change
@@ -417,6 +417,7 @@ This provides the most customization of the request. Users should take care to e
417
417
### Handling Context
418
418
Context from previous generate requests can be used by including a past `ollama::response` with `generate`:
419
419
420
+
**Note:** The Context parameter has been [deprecated](https://github.com/ollama/ollama/pull/7878) in newer versions of Ollama. It is recommended to use the `chat` endpoint for maintaining context over time.
420
421
```C++
421
422
std::string model = "llama3.1:8b";
422
423
ollama::response context = ollama::generate(model, "Why is the sky blue?");
0 commit comments