[GH-ISSUE #5134] api interface /api/generate I need to make sure that every question is not answered from the previous record How to do? #49747

Closed
opened 2026-04-28 12:51:36 -05:00 by GiteaMirror · 2 comments
Owner

Originally created by @mingLvft on GitHub (Jun 19, 2024).
Original GitHub issue: https://github.com/ollama/ollama/issues/5134

api interface /api/generate I need to make sure that every question is not answered from the previous record How to do?

Originally created by @mingLvft on GitHub (Jun 19, 2024). Original GitHub issue: https://github.com/ollama/ollama/issues/5134 api interface /api/generate I need to make sure that every question is not answered from the previous record How to do?
GiteaMirror added the feature request label 2026-04-28 12:51:36 -05:00
Author
Owner

@royjhan commented on GitHub (Jun 27, 2024):

As long as you don't use the context parameter, generate does not keep chat memory.

<!-- gh-comment-id:2195699205 --> @royjhan commented on GitHub (Jun 27, 2024): As long as you don't use the `context` parameter, generate does not keep chat memory.
Author
Owner

@mdhuzaifapatel commented on GitHub (Nov 20, 2024):

As long as you don't use the context parameter, generate does not keep chat memory.

Hi @royjhan , can you please let me know how to use this context parameter, I'm unable to figure it out by reading the documentation.

I want to use the context from previous responses in current one.

Pls help me out, if possible give me a code example it would be a great help. Thanks!

<!-- gh-comment-id:2489456221 --> @mdhuzaifapatel commented on GitHub (Nov 20, 2024): > As long as you don't use the `context` parameter, generate does not keep chat memory. Hi @royjhan , can you please let me know how to use this context parameter, I'm unable to figure it out by reading the documentation. I want to use the context from previous responses in current one. Pls help me out, if possible give me a code example it would be a great help. Thanks!
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/ollama#49747