[PR #2063] [MERGED] Save and load sessions #9514

Closed
opened 2025-11-12 15:08:09 -06:00 by GiteaMirror · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/ollama/ollama/pull/2063
Author: @pdevine
Created: 1/19/2024
Status: Merged
Merged: 1/25/2024
Merged by: @pdevine

Base: mainHead: savesession


📝 Commits (10+)

📊 Changes

8 files changed (+312 additions, -39 deletions)

View changed files

📝 api/types.go (+2 -0)
📝 cmd/cmd.go (+11 -9)
📝 cmd/interactive.go (+127 -24)
📝 cmd/interactive_test.go (+65 -0)
📝 parser/parser.go (+11 -0)
📝 parser/parser_test.go (+35 -0)
📝 server/images.go (+47 -5)
📝 server/routes.go (+14 -1)

📄 Description

This change allows users to interactively save a session from the REPL, and then load it back up again later.

It also adds a new MESSAGE command for Modelfiles so that users can build their own session which can be created with ollama create.


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/ollama/ollama/pull/2063 **Author:** [@pdevine](https://github.com/pdevine) **Created:** 1/19/2024 **Status:** ✅ Merged **Merged:** 1/25/2024 **Merged by:** [@pdevine](https://github.com/pdevine) **Base:** `main` ← **Head:** `savesession` --- ### 📝 Commits (10+) - [`e652eac`](https://github.com/ollama/ollama/commit/e652eac38e653588ed91b4ad6a44240f4636bbe4) add message command to parser - [`ef7860f`](https://github.com/ollama/ollama/commit/ef7860f0a70bd9b9256cbba826a158478603bd8b) allow saving conversations in interactive mode - [`8ab8d14`](https://github.com/ollama/ollama/commit/8ab8d1461d08f2701bd1471fdc9def275ff10dc8) add /load command - [`dd56494`](https://github.com/ollama/ollama/commit/dd564949b8a7cc4a90ff48192b3c3efc26444f4a) fix the spinner - [`3550f2c`](https://github.com/ollama/ollama/commit/3550f2c801cfc6bb4ae8bb0bda6639284dd030ea) parser message unit tests - [`ef6502c`](https://github.com/ollama/ollama/commit/ef6502c2ec15160e5c11a5720f8bf99073892dfe) add modelfile unittest - [`7268ce6`](https://github.com/ollama/ollama/commit/7268ce6b61d23ae2a308044d46574b036537688a) fix typo - [`5b0b62a`](https://github.com/ollama/ollama/commit/5b0b62a6c9db1e84bd586a0f9d536bad7002ef36) lint issues - [`6e02929`](https://github.com/ollama/ollama/commit/6e02929aa8ddf7d58a3c0c0954c991103b4f950b) remove debug info - [`c0343b7`](https://github.com/ollama/ollama/commit/c0343b724da1b831a9b8f7f3e077f4c5d2f5b6a9) comments ### 📊 Changes **8 files changed** (+312 additions, -39 deletions) <details> <summary>View changed files</summary> 📝 `api/types.go` (+2 -0) 📝 `cmd/cmd.go` (+11 -9) 📝 `cmd/interactive.go` (+127 -24) 📝 `cmd/interactive_test.go` (+65 -0) 📝 `parser/parser.go` (+11 -0) 📝 `parser/parser_test.go` (+35 -0) 📝 `server/images.go` (+47 -5) 📝 `server/routes.go` (+14 -1) </details> ### 📄 Description This change allows users to interactively save a session from the REPL, and then load it back up again later. It also adds a new `MESSAGE` command for Modelfiles so that users can build their own session which can be created with `ollama create`. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
GiteaMirror added the pull-request label 2025-11-12 15:08:09 -06:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/ollama-ollama#9514