-
Notifications
You must be signed in to change notification settings - Fork 26
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
Feature/instruct templates #56
Conversation
…uting of modifiedPrompt
Having used this for a week now, I'm not sure whether the selected template should be persistent or tied to session. Currently, it's persistent. What do you think? |
Put the import/export stuff on a separate line and fixed the name and tooltip.
I know, but it's the best I could come up with apart from just an "S" and "I".
Frankly, I can't figure out how to get the name to live-update without breaking stuff.
Just to be clear, I meant the |
Added a chat mode similar to what #61 implemented, but working with the instruct templates. You can click the indicated Icon to switch between Completion and Chat mode. |
Yes, that is better, but I think you could implement live-updating like this. I just tested it here and it seems to work fine:
Oh yeah,
Yes, it's just to be able to easily share with other sessions and avoid duplication of data. One could have a list of different World Infos, and easily switch between them. But I agree, import/export functions would mitigate this nicely.
This works pretty nicely, damn. I think this could also be tied to the session. |
…late name to live update
That works great! Added the live-updating just like you suggested, and tied
That's a great idea. It should be possible to copy a lot of the code of this PR to save and update WI to the indexedDB. Maybe I'll look into that. |
Changed the indicated useMemos to useEffect and moved |
No problem. I will try to handle it and commit to your branch before merging the PR. |
Thanks a lot. Let me know if there's anything else you need me to do. |
Alright, I think this is it. If possible, I would like you to take a second look to see if you find anything that might have broken after these changes, but otherwise this should be fine to merge now. |
Imports weren't working as templateStorage wasn't an argument for |
Nice, thanks for another great contribution! |
Thank you for polishing it up! |
I've added functionality to select from a list of instruct formats. Then you can either click a button to insert the template directly into your prompt, or you can use placeholders,
{sys}
{/sys}
{inst}
and{/inst}
in your prompt instead, which will be replaced with the selected instruct formats when being evaluated by the model. These placeholders can be used in the persistent context areas as well.Furthermore, you can add, delete, import and export templates. The UI's ugly as sin, so I'll be more than happy to implement any suggestions you can think of.
I've never worked with indexedDB before, so be sure to double check the code related to this. Judging by some situations I've seen early on, this has potential to lock up the entire page if the db version upgrade doesn't work as intended, until you either clear the storage, or downgrade mikupad.