Repository navigation
Replies: 4 comments 1 reply
|
Thank you for this detailed write up, a very well-specified and clear feature request, and yes, I would definitely want to do this. Re: how it maps to the current code:
So you can already do this manually, by attaching the last chat, and then running your custom action with relevant wording. Thanks again for the well thought out FR Let me have a quick look at making a stopgap since the plumbing is there, so you won't have to manually attach etc while waiting for the proper feature to arrive (could be a while for the full production feature) |
|
I went ahead and added a minimal version of this, so no manual attaching needed. The latest code on main supports a {previous_results_section} placeholder for general-context custom actions. Type it into your action's prompt (the new-action wizard also lists it in the placeholder picker as "Previous Results of This Action"), and each run automatically includes the assistant responses from that action's last 3 saved runs, oldest to newest with dates, capped at roughly 15K characters (oldest trimmed first). A few notes:
Example ending for your prompt: "... {previous_results_section} Do not repeat news stories that appeared in the previous results. If there are not enough new credible stories, return fewer stories." The full version described above (per-action off/1/3/5 setting, stable IDs, book-scoped actions) is still planned; the placeholder will keep working after it lands. |
|
Thank you! That was fast! It took me a little while to figure out how to test the latest code directly from main, so I thought I’d share the steps in case anyone else wants to try it and is as unfamiliar with this as I am. :-)
... {previous_results_section} Do not repeat news stories that appeared in the previous results. If there are not enough new credible stories, return fewer stories. And it seems to be working well! <3 |
Uh oh!
There was an error while loading. Please reload this page.
Thanks for a very nice plugin! I’m posting this as an idea rather than an issue because I’m not sure what implementation would fit the plugin best.
The main thing I would like is for recurring actions to be able to consider their own recent results, so that news updates and similar actions do not keep returning the same items.
My use case is a recurring positive-news action based on the built-in News Update action. Each run currently starts independently, so the model may return the same positive stories again. Adding an instruction such as “do not repeat previous stories” does not help if the action cannot see what it returned during earlier runs.
I think this could also be useful for other recurring actions, for example:
One possible solution would be to add an optional setting to the action editor:
Use previous results from this action as context
Possible values could be:
There could also be optional limits, such as:
The default should probably be Off, so that existing actions continue to behave exactly as they do now.
When the action runs, the plugin could:
For example, the hidden context could be introduced to the model with something like:
The action prompt could then contain an instruction such as:
A possible Lua configuration could look something like this:
The exact field names are only suggestions.
From what I understand, the chat history already stores information about the prompt action used for continued chats. It may therefore be possible to:
If matching by the current prompt action is not stable enough, each custom action could perhaps be given a persistent internal ID, which could then be stored in the chat metadata.
Some safeguards that might be useful:
I don’t think simply continuing the same chat would be ideal. Over time, the context could become very large and it might also contain unrelated follow-up questions. A limited, action-scoped history would keep each run separate while still giving the action enough memory to avoid repeating itself.
I’m not a real developer, more a old man who did som coding before, so I don’t know what would be easiest to implement. From a user’s perspective, the important part is being able to let a recurring action remember a small number of its own recent results.
Sorry for a very long post :-)
All reactions