text-generation-webui icon indicating copy to clipboard operation
text-generation-webui copied to clipboard

Option to save all generated output to log file

Open ill13 opened this issue 1 year ago • 1 comments

Save all generated text

Log every thing generated for later review. The saved chats are nice

ill13 avatar Mar 23 '23 04:03 ill13

  • Tired of cutting and pasting results you like?
  • Lost the query AND the results you liked?

Well, I cobbled this plugin script together to save all prompts and the resulting generated text into a text file.

Just copy the save_data folder to your extensions folder and enable it. Look in /logs for a file like 20230325_text_log.txt after generating.

The plugin:

  • Should create a new file every day.
  • Should append new prompts and results to said file
  • Can be enabled by adding --save_data to after --extensions.
  • Make sure you set --no-stream

https://github.com/ill13/text-generation-webui/tree/main/extensions/save_data

NOTE: Does not work well with streaming; the extension will write to the file after every token. silero_TTS has the same concern. This is due to how the current extension system architecture has been implemented.

ill13 avatar Mar 25 '23 15:03 ill13

I have added an option to save the current prompt that can be used for this. Nice job with the extension as well!

oobabooga avatar Mar 29 '23 02:03 oobabooga

@ill13 Thanks, I was looking for this! I added a simple debounce to your extension so I can use it without the --no-stream, works fine.. I can push to you if you want

vractal avatar Apr 04 '23 16:04 vractal

@oobabooga do you mean the download option?

vractal avatar Apr 04 '23 16:04 vractal

@vractal Feel free to fork/push as you see fit; I don't know git well enough to do so myself.

ill13 avatar Apr 06 '23 02:04 ill13