Skip to content

Adding note for context deprecation in generate endpoint. #35

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Mar 28, 2025
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -417,6 +417,7 @@ This provides the most customization of the request. Users should take care to e
### Handling Context
Context from previous generate requests can be used by including a past `ollama::response` with `generate`:

**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.
```C++
std::string model = "llama3.1:8b";
ollama::response context = ollama::generate(model, "Why is the sky blue?");
Expand Down