Closed johnnymcmike closed 3 years ago
That might be better to do outside aitextgen by using the length of the prompt, e.g.
text = text[len(prompt):]
IIRC the include_prefix
was more of a hack rather than good design.
Gotcha. I had just figured that it was somehow implemented elegantly behind the scenes (particularly in a way that lets you ignore the length of the prefix when setting a length of text to generate, saving unnecessary generation time). If it was pretty much the same hack that I now use in its stead, though, then I'll just keep using that lol. Thank you!
Essentially that part of the generation is the same (the prefix/prompt is first encoded, then generated from there)
I may add it back since there are valid normal use cases for it.
Hi, I'm working on a discord bot using this project, and I think it would be useful for there to be an option to exclude the text in the
prompt
parameter ofgenerate
from the returned output. I did something similar with gpt-2-simple in another bot that usedprefix
andinclude_prefix
, and it would be great to have something like it here.